/* DR v2 (P1). Same palette as the classic site (styles.css :root). Phone first: bottom nav, full-screen shot sheet. */
:root {
  --bg: #11100e; --panel: #191816; --panel-2: #211f1b; --line: #373329; --text: #f1eadc; --muted: #a8a092;
  --gold: #c7a666; --gold-2: #e1c487; --danger: #bb695e; --good: #6f9f72; --warn: #c59b55; --info: #7d9bb8;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* .sheet/.menu/.fix set display, which would beat the hidden attribute */
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
button.on, button:hover { border-color: var(--gold); }
.muted { color: var(--muted); } .bad { color: var(--danger); }
a { color: var(--gold-2); }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.top select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.build { color: var(--muted); font: 12px ui-monospace, monospace; margin-left: auto; }
.classic { font-size: 13px; }
.startuphold { margin: 12px 16px 0; padding: 12px; border: 1px solid var(--gold); border-radius: 8px; background: #2a2416; color: var(--gold-2); }
.startuphold p { margin: 0 0 8px; }
.startuphold .row { display: flex; flex-wrap: wrap; gap: 8px; }
.focusbar { font-size: 14px; }
.focusbar[data-mode="equal"], .focusbar[data-mode="live"] { border-color: var(--line); background: var(--panel-2); color: var(--muted); }
.focusbar[data-mode="live"] p { color: var(--gold-2); }
.stuckstrip { border-color: #b4553f; background: #2a1916; color: #f0b7a8; font-size: 14px; }
.startuphold button { min-height: 44px; }
.startuphold textarea { width: 100%; margin-bottom: 8px; box-sizing: border-box; }
.turn { display: block; width: calc(100% - 32px); margin: 12px 16px 0; text-align: left; background: #2a2416; border-color: var(--gold); color: var(--gold-2); font-weight: 600; }
.places { display: flex; gap: 6px; padding: 12px 16px 0; }
.places button, .places a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--text); text-decoration: none; font-size: 14px; }
.places [data-soon] { color: var(--muted); }
.places .on { border-color: var(--gold); color: var(--gold-2); }
#inboxCount:not(:empty) { background: var(--danger); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 12px; }
main { padding: 12px 16px 96px; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters button { border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.filters b { color: var(--muted); font-weight: 500; }
.group h2 { font-size: 16px; margin: 18px 0 8px; } .group small { color: var(--muted); font-weight: 400; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.card { padding: 0; text-align: left; overflow: hidden; background: var(--panel); }
.poster { position: relative; aspect-ratio: 16 / 9; background: #000; display: grid; place-items: center; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster span { padding: 8px; color: var(--muted); font-size: 13px; }
.badge { position: absolute; right: 6px; top: 6px; background: rgba(0,0,0,.7); border-radius: 6px; padding: 1px 6px; font: 12px ui-sans-serif; font-style: normal; }
.meta { padding: 8px; } .meta p { margin: 4px 0 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chip { font-size: 12px; border-radius: 999px; padding: 1px 8px; background: var(--panel-2); border: 1px solid var(--line); margin-left: 6px; white-space: nowrap; }
.chip.approved { color: var(--good); border-color: var(--good); }
.chip.ready, .chip.question { color: var(--gold-2); border-color: var(--gold); }
.chip.rendering, .chip.queued, .chip.sent, .chip.publishing { color: var(--info); border-color: var(--info); }
.chip.chopped { color: var(--danger); border-color: var(--danger); }
.scenepick { margin-left: 6px; font-size: 12px; padding: 2px 6px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); max-width: 46vw; }
.empty { color: var(--muted); }
.groupby { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-left: auto; }
.groupby select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }
.meta .sid { display: block; color: var(--muted); font: 11px ui-monospace, monospace; margin-top: 2px; }
.meta .progress { color: var(--info); -webkit-line-clamp: 1; }
.card.picked { border-color: var(--good); box-shadow: 0 0 0 2px var(--good); } .card.dim { opacity: .45; }
.check { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 6px; border: 2px solid #fff; background: rgba(0,0,0,.5); color: #cfe6c7; display: grid; place-items: center; font-style: normal; font-weight: 700; }
.card.picked .check { background: var(--good); color: #fff; border-color: var(--good); }
.bulk { position: sticky; bottom: 12px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--gold); border-radius: 10px; }
.bulk button:disabled { opacity: .5; cursor: default; }
.bulk { flex-wrap: wrap; } .bulk > span:not(#bulkCount) { display: flex; gap: 8px; flex-wrap: wrap; } .bulk [hidden] { display: none !important; }
.removed { margin-top: 18px; color: var(--muted); } .removed summary { cursor: pointer; } .removed p { display: flex; align-items: center; gap: 8px; margin: 6px 0; } .removed small { color: var(--muted); }

.sheet { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.6); display: flex; justify-content: flex-end; }
.sheet-body { width: min(720px, 100%); height: 100%; overflow-y: auto; background: var(--panel); border-left: 1px solid var(--line); padding: 0 16px 40px; }
.sheet-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 0; background: var(--panel); }
.close { padding: 4px 12px; }
video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; display: block; }
.takes { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; }
.takes button { padding: 3px; display: grid; gap: 2px; min-width: 76px; font-size: 12px; }
.takes img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }
.verbs { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto; gap: 8px; margin: 4px 0; }
.verbs button { padding: 12px 6px; font-weight: 600; }
button.approve { background: #23331f; border-color: var(--good); color: #cfe6c7; }
.menu { display: grid; gap: 4px; padding: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; margin: 4px 0; }
.menu button, .menu a { text-align: left; background: none; border: 0; padding: 8px; color: var(--text); text-decoration: none; }
.fix { display: grid; gap: 8px; margin: 8px 0; }
.fix textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.fix .row { display: flex; gap: 8px; } .pin { color: var(--muted); font-size: 14px; }
.fixhead { margin: 0; font-size: 14px; color: var(--muted); }
.toast { min-height: 1.2em; margin: 6px 0; color: var(--good); } .toast.bad { color: var(--danger); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 8px 0; padding-bottom: 8px; }
.tabs button { border-radius: 999px; padding: 4px 12px; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: 8px 0 8px 12px; border-left: 2px solid var(--line); margin-left: 4px; }
.history li.note, .history li.action, .history li.answer, .history li.decision { border-color: var(--gold); }
.history li.reply, .history li.status, .history li.take { border-color: var(--info); }
.history .when { color: var(--muted); font-size: 12px; display: block; }
.history p { margin: 4px 0 0; white-space: pre-wrap; } .history small, .history i { color: var(--muted); }
.lock { background: #23331f; border: 1px solid var(--good); border-radius: 8px; padding: 6px 10px; }
.ask { background: var(--panel-2); border: 1px solid var(--gold); border-radius: 8px; padding: 10px; margin: 8px 0; }
.ask small { display: block; color: var(--muted); margin-top: 4px; }
.ask form { display: flex; gap: 6px; margin-top: 8px; } .ask input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.ask .link { padding: 1px 8px; font-size: 12px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; } dt { color: var(--muted); } dd { margin: 0; }
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.refs img { width: 100%; border-radius: 6px; display: block; } .refs figcaption { font-size: 11px; color: var(--muted); word-break: break-all; }
.story { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 10px; font-size: 13px; }
#inbox h2 { font-size: 16px; } #inbox h2 small { color: var(--muted); }

@media (max-width: 640px) {
  .places { position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .places > * { flex: none; }  /* CLAUDE-NOTE (11-03): 7 pills > 375 px; scroll sideways instead of clipping Cast/Sets */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bulk { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .groupby { margin-left: 0; }
  .sheet-body { border-left: 0; }
}
/* Frames tab (start / end frame pass) */
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 8px; }
.fcard { display: block; cursor: default; }
.fpair { display: grid; grid-template-columns: 1fr; gap: 2px; }
.fpair.two { grid-template-columns: 1fr 1fr; }
.fslot { width: 100%; padding: 0; border: 0; border-radius: 0; cursor: zoom-in; }
div.fslot { cursor: default; outline: 1px dashed var(--line); outline-offset: -1px; }
.fst { position: absolute; left: 6px; bottom: 6px; font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: rgba(0,0,0,.7); color: var(--good); }
.fst.fix, .fst.skip { color: var(--danger); }
.chip.f-ready, .chip.f-approved { color: var(--good); border-color: var(--good); }
.chip.f-fix, .chip.f-skip { color: var(--danger); border-color: var(--danger); }
.chip.f-none { color: var(--muted); }
.fverbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.fverbs button { padding: 4px 10px; font-size: 13px; }
.fverbs small { color: var(--muted); }
.fnote { color: var(--danger); font-size: 13px; }
#updating { position: fixed; right: 12px; bottom: 12px; z-index: 40; font-size: 12px; color: var(--muted); background: var(--panel, #1c1c1c); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; pointer-events: none; }
.finclear { color: var(--good); }
.finlist { list-style: none; margin: 8px 0; padding: 0; }
.finlist li { padding: 8px 0; border-top: 1px solid var(--line); }
.finlist small { display: block; color: var(--muted); margin-top: 2px; }
.finlist li.done b { color: var(--good); }
.finlist li.todo b { color: var(--gold-2); }
.freq { font-size: 13px; margin: 6px 0 0; color: var(--muted); }
.freq.working { color: var(--gold, #d9b45a); }
.freq.failed { color: var(--danger); }
.freq button { padding: 2px 8px; font-size: 12px; margin-left: 4px; }
.fopts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; margin-top: 6px; }
.fopts small { width: 100%; color: var(--muted); }
.fopt { display: flex; flex-direction: column; gap: 4px; width: calc(50% - 3px); }
.fopt button.approve { padding: 4px 8px; font-size: 13px; }
.fend { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.frameview { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 12px; }
.frameview[hidden] { display: none; }
.frameview img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; }
.frameview button { position: absolute; top: 12px; right: 12px; }
/* Default settings (settings-model.js): header gear, Settings page, card chip line, shot override panel */
.gear { padding: 4px 10px; font-size: 16px; line-height: 1; }
.gear.on { border-color: var(--gold); color: var(--gold-2); }
.sets { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.sets { width: 100%; text-align: left; background: none; border: 0; border-radius: 0; padding: 0; }
button.sets:hover { color: var(--text); }
.sets .ov { color: var(--gold-2); font-weight: 600; }
#settings h2 { font-size: 18px; margin: 4px 0; } #settings h2 small { color: var(--muted); font-weight: 400; }
#settingsForm, #tab-settings { display: grid; gap: 8px; max-width: 720px; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); align-items: center; gap: 6px 12px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.setting.own { border-color: var(--gold); }
.setting .sl small { display: block; color: var(--muted); font-size: 13px; }
.setting .sl em { color: var(--gold-2); font-style: normal; font-size: 12px; margin-left: 4px; }
.setting select { width: 100%; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.setting .locked { color: var(--muted); } .setting .locked small { border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.toggle { display: flex; align-items: center; gap: 8px; } .toggle input { width: 20px; height: 20px; }
button.link { background: none; border: 0; padding: 0 2px; color: var(--gold-2); text-decoration: underline; font-size: 12px; }
#settingsForm .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .setting { grid-template-columns: 1fr; }
  .top { gap: 8px; padding: 10px 12px; }
}

/* Live render progress (Ilyas 2026-11-03, the Showrunner card look): badge top-right, bar on the image's bottom edge. */
.fpair { position: relative; }
.is-live .badge { display: none; }  /* the live badge takes the top-right corner */
.live-badge { position: absolute; right: 6px; top: 6px; z-index: 2; font: 600 11px ui-sans-serif, system-ui, sans-serif; font-style: normal;
  letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: #1a160e; }
.live-badge.queued { background: rgba(0,0,0,.75); color: var(--gold-2); border: 1px solid var(--gold); }
.live-text { position: absolute; right: 6px; bottom: 9px; z-index: 2; font: 11px ui-monospace, monospace; font-style: normal;
  padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,.7); color: var(--text); white-space: nowrap; }
.live-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; z-index: 2; background: rgba(0,0,0,.55); overflow: hidden; }
.live-bar b { display: block; height: 100%; background: var(--gold); transition: width .6s ease; }
.live-bar.indeterminate b { width: 35%; animation: live-shimmer 1.4s ease-in-out infinite; }
@keyframes live-shimmer { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .live-bar.indeterminate b { animation: none; width: 100%; opacity: .5; } }
.liveline { margin: 8px 16px 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  color: var(--muted); font-size: 13px; }

/* Brief page (brief-model.js): canon + story files from the PC, editable in place */
#brief h2 { font-size: 18px; margin: 4px 0; } #brief h2 small { color: var(--muted); font-weight: 400; }
#brief h3 { font-size: 15px; margin: 16px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bdoc { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 0 0 8px; max-width: 900px; }
.bdoc summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.bdoc summary small { color: var(--muted); }
.bdoc .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.bstat { font-size: 13px; } .bstat.good { color: var(--good); } .bstat.wait { color: var(--warn, #d9a441); } .bstat.bad { color: var(--danger); }
.md { line-height: 1.5; overflow-wrap: anywhere; } .md h3, .md h4, .md h5, .md h6 { margin: 14px 0 4px; color: inherit; text-transform: none; letter-spacing: 0; }
.md pre { white-space: pre-wrap; background: var(--panel-2); padding: 6px 8px; border-radius: 6px; font-size: 13px; overflow-x: auto; }
.md pre.tbl { margin: 0; border-radius: 0; padding: 1px 8px; }
.md code { background: var(--panel-2); padding: 0 3px; border-radius: 4px; }
.btext { width: 100%; min-height: 60vh; box-sizing: border-box; background: var(--panel-2); color: inherit; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px; font: 14px/1.45 ui-monospace, Consolas, monospace; }
/* Phase bar (Showrunner port): one row of steps, scrolls sideways on a phone. */
.phasebar { position: relative; display: flex; gap: 4px; padding: 12px 16px 0; overflow-x: auto; scrollbar-width: none; }
.phasebar .step { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; padding: 5px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; line-height: 1.2; }
.phasebar .step small { font-size: 11px; font-weight: 400; opacity: .85; }
.phasebar .done { color: var(--text); background: var(--panel-2); }
.phasebar .current { border-color: var(--gold); color: var(--gold-2); }
.phasebar .skipped { opacity: .5; }
.phasebar .here { box-shadow: inset 0 -3px 0 var(--gold); }
.phasewarn { margin: 8px 16px 0; padding: 6px 10px; border-left: 3px solid var(--gold); background: #2a2416; color: var(--gold-2); font-size: 13px; }
/* Showrunner-style card overlays: number top-left, take count bottom-left, length bottom-right (hidden under a live bar). */
.poster .num, .poster .tk, .poster .dur { position: absolute; z-index: 1; font: 600 12px ui-sans-serif, system-ui, sans-serif; font-style: normal;
  background: rgba(0,0,0,.72); border-radius: 6px; padding: 1px 7px; color: #fff; }
.poster .num { left: 6px; top: 6px; } .poster .num:empty { display: none; }
.poster .tk { left: 6px; bottom: 6px; } .poster .dur { right: 6px; bottom: 6px; }
.poster.is-live .tk, .poster.is-live .dur { display: none; }
.card.open { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }

/* Take strip under the player: T1 · 5.9s on each thumbnail, the one playing outlined. */
.takes { display: block; padding: 8px 0 4px; }
.takes-head { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.takes-head small { text-transform: none; font-weight: 400; letter-spacing: 0; }
.takes-row { display: flex; gap: 8px; overflow-x: auto; }
.takes button { position: relative; padding: 0; min-width: 0; border-radius: 8px; overflow: hidden; border-width: 2px; }
.takes button.on { border-color: var(--gold); }
.takes img, .takes .nothumb { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 0; background: #000; }
.takes .tl { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.75); border-radius: 4px; padding: 0 5px; font-size: 11px; font-weight: 600; color: #fff; }

/* Detail block (model.js shotDetails). */
.details { display: grid; gap: 10px; margin: 4px 0 8px; }
.details h4 { margin: 0 0 4px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.details section p { margin: 0; }
.details .dline { margin: 2px 0; }
.stats, .pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; background: var(--panel-2); }
.pill.set { border-color: var(--info); }
.details .link { padding: 2px 10px; font-size: 13px; }
.prompt summary { cursor: pointer; color: var(--muted); } .prompt summary small { font-size: 12px; }
.prompt pre { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 10px; font-size: 13px; margin: 6px 0 0; }
.grip { display: none; }

/* CLAUDE-NOTE (Ilyas 2026-11-03: "once the UI on the right opens up, the storyboard grays out and I cant just click on a
   different shot"): wide screens dock the sheet as a right panel with no overlay; the board shrinks beside it and stays
   live. Phones keep the full-screen sheet. */
@media (min-width: 1000px) {
  :root { --panel-w: 520px; }
  .sheet { inset: 0 0 0 auto; width: var(--panel-w); background: none; }
  .sheet-body { width: 100%; position: relative; }
  body.docked main, body.docked .phasebar, body.docked .places, body.docked .phasewarn, body.docked .liveline { margin-right: var(--panel-w); }
  body.docked .turn { width: calc(100% - 32px - var(--panel-w)); }
  .grip { display: block; position: fixed; right: calc(var(--panel-w) - 4px); top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 11; }
  .grip:hover, .grip:active { background: rgba(199,166,102,.35); }
}

/* Cast + Sets pages and per-shot reference drops (castsets-model.js). */
#cast h2, #sets h2 { font-size: 18px; margin: 4px 0; } #cast h2 small, #sets h2 small { color: var(--muted); font-weight: 400; }
.castcard, .setcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.castcard h3, .setcard h3 { margin: 0 0 4px; font-size: 16px; } .castcard h3 small, .setcard h3 small { color: var(--muted); font-weight: 400; }
.castcard .desc { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.setcard h4 { margin: 12px 0 0; font-size: 13px; color: var(--gold-2); } .setcard h4.untagged { color: var(--muted); }
.refs.plates { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.refs figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.refs figcaption small { display: block; font-size: 10px; }
button.refimg { padding: 0; border: 0; background: none; border-radius: 6px; }
.refs .facing { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.refs .facing select { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; }
.refs .pills .pill { font-size: 11px; padding: 2px 6px; }
.refs button.drop { padding: 3px 8px; font-size: 12px; align-self: flex-start; }
.refs figure.dropped img { opacity: .3; filter: grayscale(1); }
.refs figure.dropped figcaption i { color: var(--danger); font-style: normal; }
.refs figure.dropped button.drop { border-color: var(--gold); color: var(--gold-2); }

/* Edit timeline (edit-view.js). Lanes scroll sideways inside .edtracks; the page itself never does. */
#edit h2 { font-size: 18px; margin: 4px 0 6px; } #edit h2 small { color: var(--muted); font-weight: 400; }
#edSummary { color: var(--muted); }
.edmon { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; margin: 8px 0; }
.edstage { position: relative; aspect-ratio: 16 / 9; max-height: 52vh; background: #000; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.edstage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.edcard { position: absolute; inset: 0; display: grid; place-items: center; background: repeating-linear-gradient(45deg, #1b1915 0 14px, #211f1b 14px 28px); }
.edcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.edcard div { position: relative; text-align: center; padding: 12px; background: rgba(0,0,0,.55); border-radius: 8px; max-width: 80%; }
.edcard p { margin: 4px 0 0; }
.ednow { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 14px; overflow: auto; }
.ednow small { color: var(--muted); display: block; } .ednow p { margin: 6px 0 0; color: var(--muted); }
.edtransport { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.edplay { min-width: 44px; font-weight: 700; }
.edtime { font: 13px ui-monospace, monospace; color: var(--muted); min-width: 150px; }
.seg { display: inline-flex; } .seg button { border-radius: 0; } .seg button:first-child { border-radius: 8px 0 0 8px; }
.seg button:last-child { border-radius: 0 8px 8px 0; } .seg button.on { background: #2a2416; color: var(--gold-2); }
.seg button:disabled, .edtransport button:disabled { opacity: .45; cursor: not-allowed; }
.edzoom { display: inline-flex; gap: 4px; }
.edzoomr { width: 120px; accent-color: var(--gold-2); touch-action: none; }
#edTracks { touch-action: pan-x; }
.edtitle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.edtitle h2 { margin-right: auto; }
.edtracks { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); max-width: 100%; }
.edinner { position: relative; min-width: 100%; padding-bottom: 6px; }
.edlane { position: relative; height: 30px; border-bottom: 1px solid var(--line); }
.edlane > div, .edlane > canvas { position: absolute; top: 0; bottom: 0; left: 0; right: 0; }
.edlab { position: sticky; left: 0; z-index: 2; display: inline-flex; align-items: center; width: 72px; height: 100%; padding-left: 8px;
  background: var(--panel); font-size: 12px; color: var(--muted); font-weight: 600; border-right: 1px solid var(--line); }
.edruler { height: 22px; cursor: pointer; }
.edruler span { position: absolute; top: 3px; font: 11px ui-monospace, monospace; color: var(--muted); border-left: 1px solid var(--line); padding-left: 3px; }
#edPartsLane { cursor: pointer; }
.edpart { position: absolute; top: 4px; bottom: 4px; border-radius: 5px; padding: 0 6px; font-size: 12px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.edshots { height: 64px; }
.edclip { position: absolute; top: 4px; bottom: 4px; padding: 0; border-radius: 5px; border: 1px solid var(--line); border-bottom: 3px solid var(--line);
  background: #000 center / cover no-repeat; overflow: hidden; text-align: left; }
.edclip span { position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 4px; font-size: 11px; background: rgba(0,0,0,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edclip i.ednot { position: absolute; top: 2px; left: 12px; font-size: 10px; font-style: normal; color: var(--warn); }
.edclip.planned { border-style: dashed; background-color: #1b1915; opacity: .85; }
.edclip.now { outline: 2px solid var(--gold); outline-offset: -2px; }
.edclip.open { box-shadow: 0 0 0 2px var(--gold-2) inset; }
.edsong { height: 44px; cursor: pointer; }
.edsong canvas { height: 40px; top: 2px; right: auto; }
.edsong.off canvas { opacity: .3; }
.edhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); pointer-events: none; z-index: 3; }
.edside { display: flex; flex-direction: column; gap: 8px; min-height: 0; max-height: 52vh; }
.edside .ednow { flex: 0 1 auto; max-height: 34%; }
.edchat { flex: 1 1 auto; min-height: 150px; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.edfeed { flex: 1 1 auto; overflow-y: auto; padding: 8px 10px; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.edmsg { padding: 6px 8px; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.edmsg.director { align-self: flex-end; max-width: 90%; background: var(--line); }
.edmsg.agent { align-self: flex-start; max-width: 95%; }
.edmsg small { display: block; color: var(--muted); font-size: 11px; }
.edmsg.failed { color: var(--danger); }
.edsay { padding: 8px; border-top: 1px solid var(--line); }
.edabout { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.edabout .off { color: var(--warn); }
.edsay textarea { width: 100%; box-sizing: border-box; resize: vertical; }
/* CLAUDE-NOTE: Ilyas 11-08: these boxes had no background, so the browser's white met the theme's near-white text and he could not see what he typed. Black on white, as he asked. */
.edsay textarea, .startuphold textarea { background: #fff; color: #111; caret-color: #111; }
.edsay textarea::placeholder, .startuphold textarea::placeholder { color: #666; }
.edsaybtns { display: flex; gap: 6px; margin-top: 6px; }
@media (max-width: 760px) { .edside { max-height: none; } .edfeed { max-height: 240px; } }
.edfade { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 3; background: #000; }
.edsel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; padding: 8px 10px; background: var(--panel); border: 1px solid var(--gold-2); border-radius: 8px; font-size: 14px; }
.edsel b { margin-right: 4px; } .edsel small { color: var(--muted); }
.edwords { height: 24px; cursor: pointer; }
.edword { position: absolute; top: 3px; bottom: 3px; padding: 0 4px; font-size: 11px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); border-left: 1px solid var(--line); }
.edclip { cursor: grab; touch-action: pan-x; user-select: none; }
.edclip.sel { outline: 2px solid var(--gold-2); outline-offset: -2px; }
.edclip.dragging { opacity: .75; z-index: 4; cursor: grabbing; }
.edclip.trimmed::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--gold); }
.edh { position: absolute; top: 0; bottom: 0; width: 9px; cursor: ew-resize; touch-action: none; z-index: 2; }
.edh.l { left: 0; } .edh.r { right: 0; }
.edclip:hover .edh, .edclip.sel .edh { background: rgba(199,166,102,.55); }
.edpin { position: absolute; top: 44px; width: 14px; height: 16px; min-height: 0; margin-left: -8px; padding: 0; z-index: 3; border: 0; border-radius: 4px; background: var(--panel); color: var(--muted); font-size: 9px; line-height: 16px; opacity: .55; }
.edpin:hover { opacity: 1; } .edpin.on { color: var(--gold); opacity: 1; }
.edguide { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--gold); pointer-events: none; z-index: 3; }
#edRuler, #edPartsLane, #edWordsLane, #edSong { touch-action: pan-x; }
.edempty { padding: 20px 0 0 84px; }
@media (max-width: 720px) {
  .edmon { grid-template-columns: 1fr; }
}

/* What changed (11-06) */
.changes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 16px; padding: 10px 12px; border: 1px solid var(--gold); border-radius: 8px; }
.changes[hidden] { display: none; }
.changes span { flex: 1 1 220px; }
.changes button { min-height: 40px; padding: 0 14px; }
.card.changed { border-color: var(--gold); }
.card.flash { animation: cardflash 1.5s ease-out 4; }
@keyframes cardflash { 0% { box-shadow: 0 0 0 4px var(--gold); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .card.flash { animation: none; } }
/* Take compare (11-06): full screen, finger-first */
.cmp { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #000; color: #fff; }
.cmp-top, .cmp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; }
.cmp-top button, .cmp-bar button { min-height: 44px; min-width: 44px; padding: 0 12px; }
.cmp-vs { opacity: .6; }
.cmp-chips { display: flex; gap: 6px; overflow-x: auto; }
.cmp-chips .on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.cmp-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; cursor: ew-resize; user-select: none; }
.cmp-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cmp-clip { position: absolute; inset: 0; }
.cmp-line { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--gold); pointer-events: none; }
.cmp-tag { position: absolute; top: 8px; padding: 2px 8px; font: 600 12px ui-sans-serif, system-ui, sans-serif; background: #000a; border-radius: 4px; pointer-events: none; }
.cmp-tag.left { left: 8px; } .cmp-tag.right { right: 8px; }
.cmp-seek { width: calc(100% - 20px); margin: 6px 10px; height: 28px; }
.cmp-tc { margin-right: auto; font-variant-numeric: tabular-nums; opacity: .8; }
.updatebar { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 9999; background: var(--gold-2, #c7a666); color: #11100e; padding: 10px 14px; border-radius: 10px; font-weight: 600; display: flex; gap: 12px; align-items: center; box-shadow: 0 4px 18px rgba(0,0,0,.5); white-space: nowrap; }
.updatebar button { background: #11100e; color: #f1eadc; border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 600; }
