/* Production desk inside the studio shell. */
body.studio-crm .search-kbd { display: none; }
#dealHubBtn {
  background: #c8820a;
  color: #1a1208;
}
#dealHubBtn:hover,
#dealHubBtn.is-on {
  background: #e0a04a;
  color: #1a1208;
  box-shadow: inset 0 0 0 2px #1a1208;
}

.crm-role.actor { background: #1a1208; color: #e0a04a; }
.cast-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0 0 12px; }
.cast-photos img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; background: #1a1208; }

body.studio-crm #nav [data-view="slf"],
body.studio-crm #nav [data-view="properties"],
body.studio-crm #nav [data-view="underwrite"],
body.studio-crm #nav [data-view="jv"],
body.studio-crm #nav [data-view="queue"],
body.studio-crm #nav [data-view="venture"],
body.studio-crm #nav [data-view="lists"],
body.studio-crm #nav [data-view="property-data"],
body.studio-crm #nav [data-view="comps"],
body.studio-crm #nav [data-view="direct-mail"] { display: none !important; }
body.studio-crm #nav > .nav-section:has(+ [data-view="lists"]) { display: none !important; }

body.studio-crm .crm-craft-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 8px; }
body.studio-crm .crm-craft-add { display: flex; gap: 6px; margin: 0 0 8px; }
body.studio-crm .crm-craft-add input { flex: 1; min-width: 0; }
body.studio-crm #crmCompany,
body.studio-crm #crmProject { max-width: 100%; }

body.studio-crm #marketBtn,
body.studio-crm #dateBtn,
body.studio-crm #teamBtn,
body.studio-crm #taskBtn { display: none !important; }

body.studio-crm .topbar { z-index: 40; }
body.studio-crm #bellPop { z-index: 80; }
body.studio-crm #bellPop .item { white-space: normal; line-height: 1.35; }

body.studio-crm:not(.studio-ref) .page { display: none !important; }
body.sign-session #view-sign { display: block !important; }

body.studio-crm.studio-ref #studioDesk { display: none !important; }

#studioDesk[hidden] { display: none !important; }

body.studio-crm #studioDesk {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--bg);
  min-height: 0;
}

.desk-bar, .desk-tabs, .desk-page-head, .desk-subtabs { flex: none; }

.desk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 0;
  flex-wrap: wrap;
}

.desk-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 650;
}

.desk-switch select, .desk-inline input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}

.desk-switch select { min-width: 220px; }

.desk-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.desk-inline input { min-width: 220px; }

.desk-tabs, .desk-subtabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.desk-tab {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.desk-tab span {
  display: inline-block;
  margin-left: 6px;
  min-width: 16px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--gold-dim);
  color: var(--navy);
  font-size: 11px;
}

.desk-tab.on { color: var(--navy); border-bottom-color: var(--gold); }
.desk-tab-add { color: var(--gold); }

.desk-error { margin: 8px 16px 0; color: #8d2b2b; font-size: 13px; }
.desk-body { flex: 1; min-height: 0; overflow: auto; }
body.studio-crm #studioDesk.is-editor .desk-body { overflow: hidden; display: flex; flex-direction: column; }

.desk-list, .desk-empty { padding: 16px; }
.desk-list-head, .desk-page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.desk-list h1, .desk-page-head h1, .desk-empty h1, .desk-empty h2 {
  margin: 0 0 4px;
  font-family: Georgia, serif;
  font-weight: 500;
  color: var(--navy);
}
.desk-list p, .desk-empty p, .desk-hint { margin: 0; color: var(--ink-2); font-size: 13px; max-width: 640px; }
.desk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 14px; }
.desk-card {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.desk-card:hover { border-color: var(--gold); }
.desk-card b { font-size: 16px; color: var(--navy); }
.desk-card span, .desk-kicker { color: var(--ink-3); font-size: 12px; }
.desk-page { display: flex; flex-direction: column; min-height: 100%; height: 100%; }
.desk-page-head { padding: 12px 16px 0; align-items: center; }
.desk-stage { flex: 1; min-height: 280px; display: flex; flex-direction: column; }
.desk-stage[hidden] { display: none !important; }
body.studio-crm #studioDesk.is-editor .desk-page { flex: 1; min-height: 0; }
body.studio-crm #studioDesk.is-editor .desk-stage[data-stage="script"] {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.desk-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px 0;
  flex-wrap: wrap;
}
.desk-tools[hidden],
.desk-tools [hidden] { display: none !important; }
.desk-tool-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.desk-status { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.desk-status.ok { color: #3d6b32; }
.desk-status.bad { color: #8d2b2b; }
.desk-peers { display: flex; gap: 4px; }
.desk-peers .peer {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.desk-export { position: relative; }
.desk-fly {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px #120e0818;
}
.desk-fly[hidden] { display: none !important; }
.desk-fly button {
  text-align: left;
  background: #fff;
  border: 0;
  border-radius: 4px;
  padding: 8px 10px;
  color: var(--ink);
}
.desk-fly button:hover { background: var(--bg); }

.desk-script {
  --bg: #f6f1e8;
  --panel: #ffffff;
  --panel2: #fffdf8;
  --ink: #120e08;
  --muted: #6d6458;
  --blood: #8d2b2b;
  --blood-dim: #8d2b2b;
  --paper: #fffdf8;
  --script: #1c1612;
  --amber: #c8820a;
  --line: #e4d8c4;
  --day: #8a6a12;
  --night: #2a5a78;
  --dawn: #a85a32;
  --sidebar: 240px;
  --top: 0px;
  --fmt: 0px;
  flex: 1;
  min-height: 0;
  height: 100%;
  display: block;
  background: #f6f1e8;
  color: #120e08;
}
.desk-script.sp-on { --fmt: 42px; }

@media print {
  body.printing-script .sidebar,
  body.printing-script .topbar,
  body.printing-script .desk-bar,
  body.printing-script .desk-tabs,
  body.printing-script .desk-page-head,
  body.printing-script .desk-subtabs,
  body.printing-script .desk-tools,
  body.printing-script .desk-phone-gate { display: none !important; }
  body.printing-script #studioDesk { position: static; background: #fff; }
}
.desk-lib-stage, [data-stage="shared"] { padding: 14px 16px 24px; gap: 10px; overflow: auto; }
.desk-share { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--navy); }
.files-main .desk-share { margin: 0 0 12px; }
.ops-doc-preview .desk-params { align-items: start; }
.desk-rows { display: flex; flex-direction: column; gap: 8px; }
.desk-row { display: grid; grid-template-columns: minmax(160px, 240px) 1fr auto; gap: 8px; }
.desk-row input { height: 34px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; background: #fff; }
.nav-count { margin-left: auto; color: var(--gold-2); font-size: 11px; }
.desk-loading { color: var(--ink-3); }

.desk-subtabs [hidden] { display: none !important; }
.desk-game-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px 0; }
.desk-stage[data-stage="setup"],
.desk-stage[data-stage="cutscenes"],
.desk-stage[data-stage="beats"],
.desk-stage[data-stage="choices"],
.desk-stage[data-stage="tasks"],
.desk-stage[data-stage="notes"],
.desk-stage[data-stage="seasons"],
.desk-stage[data-stage="cast"] { overflow: auto; padding: 16px; gap: 12px; }
.desk-cast-block { display: flex; flex-direction: column; gap: 8px; }
.desk-cast-block h2, .desk-cast-add h2 { margin: 8px 0 0; font-size: 15px; color: var(--navy); }
.desk-cast-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(120px, 150px) minmax(100px, 1fr) minmax(120px, 160px) 130px 120px auto;
  gap: 8px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
}
.desk-cast-name { font-weight: 650; color: var(--navy); }
.desk-cast-row select,
.desk-cast-row input,
.desk-cast-add select,
.desk-cast-add input {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  min-width: 0;
}
.desk-cast-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.desk-cast-add h2,
.desk-cast-add [data-cast-results],
.desk-cast-add .desk-hint { flex: 1 0 100%; }
.desk-cast-add [data-cast-results] { display: flex; flex-direction: column; gap: 4px; }
.desk-cast-add [data-cast-results] .btn { text-align: left; }
.desk-cast-name { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.desk-sides { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.desk-sides h2 { margin: 0; font-size: 15px; }
.desk-sides-scenes { display: flex; flex-direction: column; gap: 6px; }
.desk-sides input { height: 34px; border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; }
.desk-dates, .desk-calls { margin: 12px 16px 0; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 10px; }
.desk-dates h2, .desk-calls h2 { margin: 0; font-size: 15px; color: var(--navy); }
.desk-date-row, .desk-call-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.desk-date-row p, .desk-call-row p { margin: 2px 0 0; }
.desk-date-form, .desk-call-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.desk-date-form h2,
.desk-date-form [data-date-results],
.desk-date-form [data-date-picked],
.desk-date-form .desk-hint,
.desk-date-form input[name="note"],
.desk-call-form h2,
.desk-call-form [data-call-results],
.desk-call-form [data-call-picked],
.desk-call-form [data-call-poster-results],
.desk-call-form [data-call-poster-picked],
.desk-call-form .desk-hint,
.desk-call-form textarea { flex: 1 0 100%; }
.desk-date-form input,
.desk-date-form select,
.desk-call-form input,
.desk-call-form select,
.desk-call-form textarea { border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; background: #fff; color: var(--ink); }
.desk-date-form input,
.desk-date-form select,
.desk-call-form input,
.desk-call-form select { height: 34px; }
.desk-call-form textarea { min-height: 72px; padding: 8px; }
.desk-audition-wrap { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.desk-audition { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.desk-audition label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.desk-audition input, .desk-audition select, .desk-audition textarea { border: 1px solid var(--line); border-radius: 4px; padding: 8px; background: #fff; color: var(--ink); font: inherit; }
.desk-audition textarea { min-height: 88px; }
.desk-audition-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.desk-audition-scenes, .desk-audition-lines { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.desk-audition-lines { max-height: 420px; }
.desk-audition [data-cut-panel][hidden] { display: none; }
.desk-audition label.uw-check { flex-direction: row; align-items: flex-start; gap: 8px; }
.desk-audition label.uw-check input { width: auto; height: auto; margin-top: 3px; }
.desk-manager { display: flex; flex-direction: column; gap: 12px; max-width: 980px; }
.desk-manager > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); max-width: 420px; }
.desk-manager select, .desk-character input, .desk-character select, .desk-character textarea,
.desk-actor-sheet input, .desk-actor-sheet select, .desk-actor-sheet textarea { border: 1px solid var(--line); border-radius: 4px; padding: 8px; background: #fff; color: var(--ink); font: inherit; }
.desk-character, .desk-actor-sheet { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.desk-character label, .desk-actor-sheet label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.desk-character textarea, .desk-actor-sheet textarea { min-height: 72px; }
.desk-actor-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.desk-actor-list { display: flex; flex-direction: column; gap: 6px; }
.desk-actor-list .btn { text-align: left; }
.desk-actor-list .btn.on { border-color: var(--gold); color: var(--navy); }
@media (max-width: 800px) { .desk-actor-layout { grid-template-columns: 1fr; } }
.sides-doc { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; max-width: 640px; }
.sides-doc h3 { margin: 0 0 8px; font-size: 14px; letter-spacing: 0.04em; }
.sides-doc-scene { margin: 0 0 16px; }
.home-sheet { max-width: 720px; }
.home-sheet h2 { margin: 0 0 8px; font-family: Georgia, serif; font-weight: 500; }
.home-sheet h3 { margin: 16px 0 4px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.home-sides { white-space: pre-wrap; margin: 0; line-height: 1.5; }
.desk-date-picked, .desk-date-form [data-date-results],
.desk-call-form [data-call-results], .desk-call-form [data-call-picked],
.desk-call-form [data-call-poster-results], .desk-call-form [data-call-poster-picked] { display: flex; flex-wrap: wrap; gap: 6px; }
.desk-bar .btn.on { border-color: var(--gold); color: var(--navy); }
#performerHome { display: none; }
.home-wrap { max-width: 760px; margin: 0 auto; padding: 28px 16px 48px; }
.home-wrap h1 { margin: 4px 0 16px; font-family: Georgia, serif; font-weight: 500; }
.home-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.home-job { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px; margin-bottom: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.home-job h3 { margin: 0; font-size: 16px; }
.home-job p { margin: 4px 0 0; }
.home-job-act { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.home-side-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.home-scene { margin: 0 0 16px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.home-scene h3 { margin: 0 0 8px; font-size: 14px; letter-spacing: 0.04em; }
.home-line { margin: 0 0 6px; }
.home-line-character { font-weight: 650; text-align: center; margin-top: 10px; }
.home-line-slug { font-weight: 650; }
.home-line-dialogue { margin-left: 12%; margin-right: 12%; }
.home-line-parenthetical { margin-left: 20%; margin-right: 18%; font-style: italic; }
.home-board { padding: 18px 20px 40px; }
.home-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.home-board .kpi.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.home-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.home-card {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: inherit;
  font: inherit;
  min-height: 0;
}
.home-card h3 { margin: 0; font-size: 16px; color: var(--navy); }
.home-card p { margin: 0; }
.home-card:hover, .home-card:focus { border-color: var(--gold); outline: none; }
.home-card-pages { color: var(--ink-2); font-size: 13px; }
.home-group { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 4px; }
.home-group h2 { margin: 8px 0 0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; }
.home-group .home-job { width: 100%; }
.home-empty { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 22px 18px; }
.home-empty h2 { margin: 0 0 6px; font-size: 18px; font-weight: 560; }
.home-empty p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.home-nav-page { padding-left: 28px; }
.home-cal { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.home-cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.home-cal-bar strong { font-size: 16px; }
.home-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.home-cal-dow { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); text-align: center; padding-bottom: 4px; }
.home-cal-day { min-height: 72px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: left; padding: 4px 6px; font: inherit; color: inherit; }
.home-cal-day.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.home-cal-day.is-out { visibility: hidden; }
.home-cal-day.has { background: #fffaf2; }
.home-cal-num { display: block; font-size: 12px; font-weight: 650; }
.home-cal-mark { display: block; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-cal-list { margin-top: 12px; }
.home-settings { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; max-width: 640px; }
.home-settings h2 { margin: 0 0 8px; font-size: 18px; }
.home-settings h3 { margin: 16px 0 6px; font-size: 14px; }
.home-settings p { margin: 0 0 8px; }
.home-nav-empty { margin: 4px 16px 10px; color: #8b98a8; font-size: 12px; }
.home-top-title { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; color: var(--navy); }
body.performer-home { --sidebar: 196px; }
body.performer-home .brand-sub { white-space: normal; line-height: 1.35; }
body.performer-home .sidebar { display: flex !important; }
body.performer-home .home-top-title { display: block; }
body.performer-home #deskNav { display: block; }
body.performer-home #deskNav .nav-item { display: flex; }
body.performer-home #nav > .nav-section,
body.performer-home #nav > .nav-item,
body.performer-home #dealHubBtn,
body.performer-home #collapseBtn,
body.performer-home .nav-foot,
body.performer-home .search-wrap,
body.performer-home #marketBtn,
body.performer-home #dateBtn,
body.performer-home #teamBtn,
body.performer-home #bellBtn,
body.performer-home #taskBtn,
body.performer-home #studioDesk,
body.performer-home .page,
body.performer-home #userPop [data-view="settings"] { display: none !important; }
body.performer-home #performerHome { display: block; }
body.performer-home.desk-phone-block #app { display: block !important; }
body.performer-home .desk-phone-gate { display: none !important; }
body.caller-home { --sidebar: 0px; }
body.caller-home .app { grid-template-columns: minmax(0, 1fr); }
body.caller-home .sidebar { display: none !important; }
body.caller-home .topbar,
body.caller-home .main { grid-column: 1; }
body.caller-home .search-wrap,
body.caller-home #marketBtn,
body.caller-home #dateBtn,
body.caller-home #teamBtn,
body.caller-home #bellBtn,
body.caller-home #taskBtn,
body.caller-home #studioDesk,
body.caller-home #dealHubBtn,
body.caller-home .page { display: none !important; }
body.caller-home #callerHome { display: block; }
body.caller-home.desk-phone-block #app { display: block !important; }
body.caller-home .desk-phone-gate { display: none !important; }
@media (max-width: 800px) {
  .home-job { flex-direction: column; align-items: stretch; }
}
.desk-setup h2, .desk-season h2, .desk-series-block > h2 { margin: 8px 0 0; font-size: 16px; color: var(--navy); }
.desk-kinds, .desk-tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.desk-kind, .desk-track {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; cursor: pointer;
}
.desk-kind.on, .desk-kind:has(input:checked), .desk-track:has(input:checked) { border-color: var(--gold); background: #fffaf2; }
.desk-kind b, .desk-track b { color: var(--navy); font-size: 14px; }
.desk-kind span, .desk-track span { color: var(--ink-2); font-size: 12px; font-weight: 500; }
.desk-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.desk-param, .desk-field, .desk-notes { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 650; color: var(--ink-3); }
.desk-param input, .desk-field input, .desk-field textarea, .desk-field select, .desk-notes textarea, .desk-piece textarea, .desk-choice select, .desk-loose-row select {
  border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); font: inherit; font-weight: 500; padding: 8px 10px;
}
.desk-field textarea { min-height: 72px; width: 100%; resize: vertical; }
.desk-piece > textarea, .desk-notes textarea { min-height: 180px; width: 100%; resize: vertical; }
.desk-stack { display: flex; flex-direction: column; gap: 10px; }
.desk-piece, .desk-node, .desk-season {
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.desk-piece-head, .desk-node-head, .desk-season-head, .desk-line, .desk-choice { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.desk-piece-head input, .desk-node-head input, .desk-line input, .desk-choice input {
  flex: 1; min-width: 140px; height: 34px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; background: #fff;
}
.desk-choice select { min-width: 180px; height: 34px; }
.desk-lines, .desk-choices { display: flex; flex-direction: column; gap: 8px; }
.desk-series-block { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.desk-series-link {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  background: transparent; border: 0; padding: 0; color: var(--navy); font-family: Georgia, serif; font-size: 22px; text-align: left;
}
.desk-series-link span { font-family: inherit; font-size: 12px; color: var(--gold); font-weight: 650; }
.desk-loose { display: flex; flex-direction: column; gap: 8px; }
.desk-loose-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 320px); gap: 8px; align-items: end; }
.desk-row.desk-task { grid-template-columns: minmax(140px, 1.4fr) 110px minmax(120px, 1fr) auto; }
.desk-row.desk-lib { align-items: end; }
.desk-lib-files, .desk-lib-props { grid-template-columns: minmax(120px, 1.1fr) 132px 132px minmax(110px, .8fr) minmax(140px, 1fr) auto; }
.desk-lib-characters { grid-template-columns: minmax(140px, 1.2fr) 150px minmax(120px, .8fr) minmax(140px, 1fr) auto; }
.desk-row.desk-lib .btn { height: 34px; }
#studioTaskBar[hidden] { display: none !important; }
body.studio-crm #view-priorities [data-view="deal-hub"] { display: none !important; }

#view-sales .desk-tabs { padding: 0; margin: 0 0 14px; }
#view-sales .kpi-strip.dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#view-sales .kpi { cursor: default; }
#view-sales .kpi .kpi-value { text-align: left; }
#view-sales #salesAir { align-items: flex-start; flex-wrap: wrap; }
#view-sales #salesAir > span:not(.alert-chip) { flex: 1 1 240px; min-width: 0; }
#view-sales a { color: var(--gold); }
#view-sales .mod-b > h2 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}
#view-sales .sales-cash {
  font-size: 42px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
#view-sales .sales-bar {
  height: 8px;
  background: var(--bg-muted);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}
#view-sales .sales-bar > span {
  display: block;
  height: 100%;
  background: var(--gold);
}
#view-sales .sales-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: flex-end;
}
#view-sales .sales-tools .field { flex: 1; min-width: 140px; margin: 0; }
#view-sales .sales-path {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
#view-sales .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#view-sales .pkg-on { box-shadow: inset 0 0 0 2px var(--gold); }
#view-sales tr.on td { background: var(--gold-dim); }
#view-sales .sales-proposal {
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 12px;
}
#view-sales .sales-sign {
  display: flex;
  gap: 24px;
  margin-top: 18px;
}
#view-sales .sales-sign div {
  flex: 1;
  border-top: 1px solid var(--ink);
  padding-top: 6px;
}
#view-sales .ob-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}
#view-sales .ob-steps button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
#view-sales .ob-steps button.on { color: var(--navy); border-bottom-color: var(--gold); }
#salesPrint { display: none; }
.book-stage { min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 28px 16px 40px; }
.book-card { width: min(520px, 100%); max-height: none; flex-shrink: 0; overflow: visible; background: #fff; border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 18px 50px rgba(12, 20, 30, 0.12); animation: book-in 180ms ease-out; }
@keyframes book-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.book-card.air-card { width: min(960px, 100%); }
.book-list-page { width: 100%; padding: 4px 0 24px; }
.book-list-page h2,
#view-sales .book-list-page h2,
#view-client .book-list-page h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: 0; text-transform: none; font-weight: 650; color: var(--ink); }
.book-list-page .book-list { max-height: none; }
.book-screen { width: 100%; min-height: 70vh; display: flex; flex-direction: column; }
.book-steps { display: flex; flex-wrap: wrap; gap: 0; width: 100%; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.book-steps button { border: 0; background: transparent; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 10px 12px; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.book-steps button.done { color: var(--ink); }
.book-steps button.on { color: var(--navy); border-bottom-color: var(--gold); }
.book-panes { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: 28px; align-items: start; width: 100%; }
.book-main { min-width: 0; }
.book-screen .book-card,
#view-sales .book-screen .book-card,
#view-client .book-screen .book-card { width: 100%; max-width: none; border-radius: 0; box-shadow: none; background: transparent; padding: 0 4px 8px 0; animation: none; }
.book-screen .book-card h2,
#view-sales .book-screen .book-card h2,
#view-client .book-screen .book-card h2 { font-size: 28px; line-height: 1.15; }
.book-side { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 8px; position: sticky; top: 12px; }
.book-side-ask { margin: 0 0 4px; font-size: 32px; font-weight: 650; letter-spacing: -0.03em; color: var(--ink); }
.book-side-lines { list-style: none; margin: 8px 0 0; padding: 0; }
.book-side-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.book-side-lines b { font-weight: 650; }
.book-side-lines span { color: var(--ink-2); text-align: right; }
.book-side-note { margin: 12px 0 8px; color: var(--ink-2); line-height: 1.45; max-height: 180px; overflow: auto; }
.book-compare { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.book-compare b { display: block; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px; }
.book-compare p { margin: 0 0 8px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.book-term-choice { display: flex; gap: 8px; margin: 0 0 12px; }
.book-term-choice .btn { flex: 1; }
.book-screen .book-ask { width: 100%; }
.book-panes-one { grid-template-columns: 1fr; }
.book-letter { max-width: 8.5in; margin: 8px auto 18px; }
.book-letter .jv-sheets { width: 100%; }
.book-letter .jv-doc,
.book-letter .jv-sheet { width: min(8.5in, 100%); min-width: 0; height: auto !important; min-height: 0 !important; max-height: none !important; margin: 0 auto 16px; padding: 0.7in 0.75in 0.6in; box-sizing: border-box; overflow: visible; background: #fff; color: #111; font-family: "Times New Roman", Times, serif; font-size: 11.5pt; line-height: 1.38; box-shadow: 0 12px 36px rgba(28, 25, 21, 0.12); border: 1px solid #e6e0d4; }
#view-sales .book-screen .book-letter h1,
#view-client .book-screen .book-letter h1 { text-align: center; font-size: 13.5pt; letter-spacing: 0.08em; margin: 0 0 12px; font-weight: 700; text-transform: none; color: #111; line-height: 1.3; }
#view-sales .book-screen .book-letter h2,
#view-client .book-screen .book-letter h2 { font-size: 11.5pt; margin: 16px 0 6px; border-bottom: 1px solid #111; padding-bottom: 2px; letter-spacing: 0.04em; text-transform: none; font-weight: 700; color: #111; line-height: 1.3; }
.book-letter p { margin: 0 0 10px; }
.book-letter table { width: 100%; border-collapse: collapse; font-size: 10.5pt; margin: 0 0 12px; }
.book-letter td, .book-letter th { text-align: left; padding: 4px 8px 4px 0; vertical-align: top; }
.book-ink { max-width: 8.5in; margin: 0 auto 8px; }
.book-sign-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.book-ink-one b { display: block; margin: 0 0 6px; }
.book-ink-one img { display: block; max-width: 280px; height: 72px; object-fit: contain; background: #fff; }
.book-pad { width: 100%; height: 140px; background: #fff; border: 1px solid var(--line); border-radius: 8px; touch-action: none; cursor: crosshair; }
@media (max-width: 800px) { .book-sign-row { grid-template-columns: 1fr; } }
.leave-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.leave-tools .btn { width: auto; margin: 0; }
.leave-note-edit { max-width: 8.5in; margin: 16px auto 0; }
.leave-deck { width: 100%; }
@media (max-width: 900px) {
  .book-panes { grid-template-columns: 1fr; }
  .book-side { position: static; }
}
.book-kicker { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.book-card h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.book-card.pitch h2,
#view-sales .book-card.pitch h2,
#view-client .book-card.pitch h2 { font-size: 28px; line-height: 1.15; }
.book-lead { margin: 0 0 12px; line-height: 1.45; color: var(--ink-2); }
.book-price { margin: 0 0 6px; font-size: 40px; font-weight: 650; letter-spacing: -0.03em; color: var(--ink); }
.book-example { background: #f3f6fb; border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; }
.book-example b { display: block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #1d4f8c; margin: 0 0 4px; }
.book-example p { margin: 0; color: var(--ink); line-height: 1.45; }
.book-needs { margin: 0 0 14px; padding: 0 0 0 18px; color: var(--ink-2); }
.book-needs li { margin: 0 0 4px; }
.book-pill { display: inline-block; margin: 0 0 10px; padding: 3px 8px; border-radius: 999px; background: #e7eef8; color: #1d4f8c; font-size: 12px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; }
.book-act { width: 100%; margin: 4px 0 8px; }
.book-quiet { display: block; margin: 0 0 8px; padding: 4px 0; border: 0; background: transparent; color: var(--ink-3); font: inherit; font-size: 14px; cursor: pointer; }
.book-row { display: flex; align-items: stretch; gap: 8px; margin: 0 0 8px; }
.book-row-main { flex: 1; text-align: left; background: #fff; border: 1px solid #1d4f8c; box-shadow: inset 0 0 0 1px #1d4f8c; border-radius: 12px; padding: 12px 14px; font: inherit; color: inherit; cursor: pointer; }
.book-row-main b { display: block; font-size: 15px; }
.book-row-main span { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.book-row-off { border: 0; background: transparent; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; padding: 0 4px; }
.book-card textarea { min-height: 84px; border-radius: 12px; padding: 10px 12px; font: inherit; line-height: 1.45; }
.book-progress { display: flex; gap: 3px; margin: 0 0 14px; }
.book-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); display: block; }
.book-progress i.on { background: #1d4f8c; }
.book-choice { display: grid; grid-template-columns: 1fr auto; gap: 10px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 8px; font: inherit; color: inherit; cursor: pointer; }
.book-choice b { display: block; font-size: 15px; }
.book-choice span span { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.book-choice.on { border-color: #1d4f8c; box-shadow: inset 0 0 0 1px #1d4f8c; }
.book-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.book-ask { width: min(520px, 100%); margin: 12px 0 0; color: var(--ink-3); font-size: 13px; }
.book-list { max-height: 320px; overflow: auto; margin-bottom: 12px; }
.book-card .field { margin: 0 0 10px; }
.book-card input, .book-card select, .book-card textarea { width: 100%; }
.book-items { margin: 0 0 14px; padding: 0; list-style: none; }
.book-items li { position: relative; margin: 0 0 4px; padding-left: 14px; line-height: 1.4; }
.book-items li:before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: #1d4f8c; }
.book-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 8px; }
.book-item.on { border-color: #1d4f8c; box-shadow: inset 0 0 0 1px #1d4f8c; }
.book-item > b { display: block; font-size: 15px; }
.book-item-meta { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.35; margin: 2px 0 8px; }
.book-term, .book-doc table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 12px; }
.book-term td, .book-term th, .book-doc td, .book-doc th { text-align: left; padding: 6px 8px 6px 0; vertical-align: top; }
.book-term .num, .book-doc .num { text-align: right; }
.book-doc { margin: 4px 0 12px; font-size: 14px; line-height: 1.45; }
.book-doc h1 { margin: 0 0 8px; font-size: 18px; letter-spacing: 0; text-transform: none; }
#view-sales .book-card .book-doc h2,
#view-client .book-card .book-doc h2 { margin: 14px 0 6px; font-size: 15px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.book-link { margin: 0 0 8px; }
.air-frame { background: #111820; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 12px; }
.air-frame video { width: 100%; height: 100%; display: block; background: #111820; object-fit: contain; }
.air-controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.air-vol { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.air-vol input { width: 120px; }
body.client-session #siteHome,
body.client-session #loginGate,
body.client-session .sidebar,
body.client-session .topbar { display: none !important; }
body.client-session #app,
body.client-session .app { display: block !important; visibility: visible; pointer-events: auto; position: static !important; height: auto !important; overflow: auto !important; width: 100% !important; background: #eef1f4; }
body.client-session.desk-phone-block #app { display: block !important; }
body.client-session #view-client { display: block !important; }
body.client-session .book-stage,
body.client-session .book-screen { min-height: 100vh; }
#view-sales .book-card h2 { letter-spacing: 0; text-transform: none; font-size: 22px; font-weight: 650; }
@media print {
  body.sales-printing * { visibility: hidden; }
  body.sales-printing #salesProposal,
  body.sales-printing #salesProposal *,
  body.sales-printing #salesPrint,
  body.sales-printing #salesPrint * { visibility: visible; }
  body.sales-printing #salesProposal,
  body.sales-printing #salesPrint {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    border: 0;
    box-shadow: none;
    display: block !important;
  }
}
.files-add input[data-studio-field],
.files-add select.ops-desk-select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
  background: #fff;
  color: inherit;
}
.prod-files { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.prod-tree { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; max-height: 70vh; overflow: auto; }
.prod-tree button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 8px; border-radius: 4px; cursor: pointer; font: inherit; color: inherit; }
.prod-tree button.on { background: rgba(200, 130, 10, 0.16); }
.prod-cat { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding: 12px 8px 4px; }
.prod-project { padding: 4px 8px 8px; }
.prod-editor { min-width: 0; }
.prod-editor h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.desk-stage > .btn, .desk-node > .btn { align-self: flex-start; }
.desk-inline input[name="episodeNumber"], .desk-inline input[name="number"] { min-width: 72px; width: 84px; }
.desk-empty-note { margin: 0; color: var(--ink-3); font-size: 13px; }

@media (max-width: 800px) {
  .desk-row, .desk-row.desk-task, .desk-row.desk-lib, .desk-lib-files, .desk-lib-props, .desk-lib-characters, .desk-loose-row, .desk-cast-row { grid-template-columns: 1fr; }
  .prod-files { grid-template-columns: 1fr; }
  .desk-switch select, .desk-inline input { min-width: 0; width: 100%; }
  .desk-inline input[name="episodeNumber"], .desk-inline input[name="number"] { width: 84px; }
}
