/* The Log and Story workspaces (DESIGN-SYSTEM.md, "Workspaces: Log → Story → Edit"). Tokens only. Edit keeps the
   layout in app.css; these areas take over when .app has ws-log or ws-story. */
#clipsPanel, #txPanel, #inspPanel, #overPanel, #boardPanel { display: none; }
.app:not(.ws-story) .story-only, .app:not(.ws-log) .log-only { display: none !important; }

/* ---------- layouts ---------- */
/* Track sizes are variables that js/panels.js sets from the splitters (part 7a); the fallbacks are the defaults. */
.app.ws-log { grid-template-columns: var(--col-l, 300px) minmax(0, 1fr) var(--col-r, 340px); grid-template-rows: var(--bar-h) minmax(0, var(--row-src, 46%)) minmax(0, 1fr);
  grid-template-areas: "bar bar bar" "clips src insp" "clips tx insp"; }
.app.ws-log #clipsPanel { grid-area: clips; display: flex; }
.app.ws-log #txPanel { grid-area: tx; display: flex; }
.app.ws-log #inspPanel { grid-area: insp; display: flex; }
.app.ws-log.tx-all #txPanel { display: none; }
.app.ws-log.tx-all #logPanel { grid-area: tx; display: flex; }
.app.ws-story { grid-template-columns: var(--col-src, 540px) minmax(0, 1fr); grid-template-rows: var(--bar-h) var(--row-src, 300px) minmax(0, 1fr);
  grid-template-areas: "bar bar" "src over" "board board"; }
.app.ws-story #overPanel { grid-area: over; display: flex; }
.app.ws-story #boardPanel { grid-area: board; display: flex; }
.app.ws-log #prgPanel, .app.ws-log #binPanel, .app.ws-log #tlPanel,
.app.ws-story #prgPanel, .app.ws-story #binPanel, .app.ws-story #tlPanel, .app.ws-story #logPanel { display: none; }
.app.ws-log .log-only { display: inline-flex; }
.app.ws-story .story-only { display: inline-flex; }
.app.ws-story #smarkin, .app.ws-story #smarkout, .app.ws-story #sinfo, .app.ws-log #sinfo { display: none; }
.app.ws-story #srcPanel .tabs .title { font-size: 0; } .app.ws-story #srcPanel .tabs .title::after { content: "Paper edit"; font-size: var(--fs); }
#logTabs [data-back] { display: none; } .app.ws-log #logTabs [data-back] { display: inline-flex; }
#smake { margin-left: 10px; align-self: center; }
#smake kbd { color: inherit; border-color: currentColor; opacity: .7; }

/* ---------- shared bits ---------- */
.key { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-s); color: var(--dim); font: var(--fw-quiet) var(--fs-s) var(--ui); white-space: nowrap; border: 0; cursor: pointer;
  background: linear-gradient(var(--key-top), var(--key)); box-shadow: var(--key-shadow); transition: transform var(--t-key) var(--ease), box-shadow var(--t-key) var(--ease), color var(--t); }
.key:hover { color: var(--bright); }
.key.led { padding-left: 19px; }
.key.led::before { content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--led-off); opacity: .6; }
.key.on { color: var(--bright); font-weight: var(--fw-on); transform: translateY(1px); box-shadow: var(--key-pressed); }
.key.led.on::before { background: var(--hot); opacity: 1; box-shadow: 0 0 6px var(--hot-glow); }
.key.hot { background: linear-gradient(var(--hot), var(--hot-press)); color: var(--on-hot); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 0 rgba(0,0,0,.6), 0 3px 10px var(--hot-glow); }
.key.sq { width: 28px; height: 26px; padding: 0; justify-content: center; color: var(--text); }
.key kbd { font: 500 var(--fs-xs) var(--mono); border: 1px solid var(--edge2); border-radius: var(--r-xs); padding: 0 4px; }
.lcd { background: var(--lcd); color: var(--lcd-text); box-shadow: var(--lcd-inset); border-radius: var(--r-s); padding: 3px 8px; font: 500 var(--fs-tc) var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lcd.small { font-size: 12.5px; padding: 2px 7px; }
.lcd.over { color: var(--warn-text); }
.led-dot { display: inline-block; width: var(--led); height: var(--led); border-radius: 50%; flex: none; }
.led-dot.star { background: var(--star); box-shadow: 0 0 5px var(--star); }
.led-dot.warn { background: var(--warn); box-shadow: 0 0 5px var(--warn); }
.led-dot.rej { background: var(--reject); box-shadow: 0 0 5px var(--reject); }
.led-dot.note { background: var(--note); }
.led-dot.off { background: var(--led-off); opacity: .6; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid var(--edge2); background: none; color: var(--text); font: var(--fs-s) var(--ui); white-space: nowrap; cursor: pointer; }
.chip i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.chip.sug { border-style: dashed; color: var(--dim); }
.chip.add { color: var(--faint); border-color: var(--edge); }
.chip.on { border-color: var(--hot); color: var(--bright); background: color-mix(in srgb, var(--hot) 12%, transparent); }
.chip .dim { font-size: var(--fs-xs); }
.tabs .n { font-family: var(--mono); color: var(--dim); font-weight: 400; margin-left: 2px; }
.empty-note { padding: 24px 18px; color: var(--dim); line-height: 1.6; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.faint { color: var(--faint); }
.hint { color: var(--faint); font-size: var(--fs-s); }
.sp { flex: 1; }
.linkish { background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-decoration: underline dotted; cursor: pointer; }
.th { position: relative; aspect-ratio: 16/9; border-radius: var(--r-xs); overflow: hidden; background: var(--black); }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity var(--t-slow) var(--ease); }
.th img[src] { opacity: 1; }
.th > i:not(.nothumb) { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--faint)); }
.th .nothumb { position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, var(--well) 0 6px, var(--well2) 6px 12px); }
.rate { display: inline-flex; gap: 2px; } .rate i { width: 6px; height: 6px; border-radius: 50%; background: var(--led-off); opacity: .6; }
.rate i.on { background: var(--star); opacity: 1; box-shadow: 0 0 4px var(--star); }

#sscrub .r { position: absolute; top: 0; bottom: 0; border-radius: 3px; opacity: .8; pointer-events: none; }

/* ---------- Log: clip list ---------- */
.cover { padding: 10px 12px 8px; border-bottom: 1px solid var(--row-line); flex: none; }
.cover .ch { display: flex; align-items: baseline; gap: 4px; } .cover b { color: var(--bright); }
.prog { margin-top: 8px; height: 6px; border-radius: 3px; background: var(--groove); box-shadow: inset 0 1px 2px rgba(0,0,0,.6); overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--hot); box-shadow: 0 0 6px var(--hot-glow); }
#clips { flex: 1; overflow: auto; }
.crow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--row-line); cursor: pointer; }
.crow:hover, .brow:hover { background: var(--hover); }
.crow.sel, .brow.sel { background: var(--sel); box-shadow: inset 3px 0 var(--hot); }
.crow .nm, .brow .nm { min-width: 0; } .crow .nm b, .brow .nm b { display: block; color: var(--bright); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow small, .brow small { display: block; color: var(--dim); font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow .rt { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.crow .cov { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 34px; gap: 8px; align-items: center; font-size: var(--fs-xs); color: var(--dim); text-align: right; }
.cov .bar { position: relative; height: 5px; border-radius: 2px; background: var(--groove); }
.cov .bar i { position: absolute; top: 0; bottom: 0; background: var(--c); min-width: 1px; }
.cov .bar .ph { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--bright); display: none; }
.crow.sel .cov .bar .ph { display: block; }
.facet { padding: 4px 12px 8px; } .facet .lbl { color: var(--dim); font-size: var(--fs-s); margin: 8px 0 6px; display: flex; justify-content: space-between; }
.facet .lbl a { color: var(--blue-text); }

/* ---------- Log: transcript ---------- */
#txPanel .extra { gap: 12px; }
.follow { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--dim); font: var(--fs-s) var(--ui); cursor: pointer; }
.follow i { width: 6px; height: 6px; border-radius: 50%; background: var(--led-off); }
.follow.on i { background: var(--ok); box-shadow: 0 0 5px var(--ok); }
.tx { flex: 1; overflow: auto; position: relative; }
.tx.v-tx { padding: 8px 0 40vh; }
.para { display: grid; grid-template-columns: 74px minmax(0, 1fr) 210px; gap: 0 14px; padding: 6px 14px; }
.para .spk { text-align: right; font-size: var(--fs-xs); color: var(--dim); padding-top: 4px; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.para .spk button { background: none; border: 0; color: var(--dim); font: inherit; padding: 0; cursor: pointer; text-align: right; }
.para .spk button:hover { color: var(--bright); }
.para .spk .mono { color: var(--faint); }
.para p { margin: 0; font: 400 15px/1.75 var(--words); color: var(--dim); user-select: none; }
.para .w { cursor: text; border-radius: 2px; }
.para .w.past { color: var(--text); }
.para .w.now { color: var(--live); text-shadow: 0 0 10px var(--live-glow); }
.para .w.b { text-decoration: underline 2px var(--c); text-underline-offset: 4px; }
.para .w.sel { background: color-mix(in srgb, var(--blue) 30%, transparent); color: var(--bright); box-shadow: 0 0 0 1px color-mix(in srgb, var(--blue) 50%, transparent); }
.para.iv p { font-style: italic; color: var(--faint); }
.para.iv p .w.past { color: var(--dim); }
.para.iv .spk button { color: var(--faint); font-style: italic; }
.para .side { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.mb { display: block; text-align: left; background: none; border: 0; border-left: 2px solid var(--c); padding: 1px 0 1px 8px; color: var(--text); font: var(--fs-s)/1.35 var(--ui); cursor: pointer; }
.mb small { display: flex; gap: 4px; align-items: center; margin-top: 2px; color: var(--dim); font-family: var(--mono); font-size: var(--fs-xs); }
.mb:hover span { color: var(--bright); }
.newb:not(:empty) { border-left: 2px solid var(--blue); padding: 1px 0 1px 8px; font-size: var(--fs-s); color: var(--bright); }
.newb small { display: block; color: var(--dim); }
.selbar { position: absolute; z-index: 5; display: none; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: var(--r-m); background: var(--menu-bg); border: 1px solid var(--edge2); box-shadow: var(--shadow-menu); font-size: var(--fs-s); }
.selbar.on { display: flex; }
.selbar .q { color: var(--bright); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--row-line); cursor: pointer; }
.brow .rt { display: flex; gap: 4px; }

/* ---------- Log: shots ---------- */
.shotbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--row-line); flex: none; font-size: var(--fs-s); color: var(--dim); }
.shotbar[hidden] { display: none; }
.shotbar input[type=search] { flex: 1 1 160px; min-width: 120px; background: var(--lcd); box-shadow: var(--lcd-inset); border: 0; border-radius: var(--r); color: var(--text); padding: 5px 9px; font: var(--fs-s) var(--ui); }
.shotbar select, .otools select { background: var(--well); color: var(--text); border: 1px solid var(--edge2); border-radius: var(--r-s); padding: 3px 6px; font: var(--fs-s) var(--ui); }
.sgroup { padding: 4px 14px 10px; }
.sgroup h4 { margin: 10px 0 8px; font: 500 var(--fs) var(--ui); color: var(--bright); }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.scard { cursor: pointer; border-radius: var(--r); padding: 4px; border: 1px solid transparent; min-width: 0; }
.scard:hover { background: var(--hover); }
.scard.sel { border-color: color-mix(in srgb, var(--blue) 60%, transparent); background: var(--sel); }
.scard .sl { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; } .scard b { color: var(--bright); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard small { display: block; color: var(--dim); font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard small.faint { color: var(--faint); font-size: var(--fs-xs); }
.gstat { display: inline-block; margin-top: 4px; padding: 0 6px; border-radius: var(--r); font-size: var(--fs-xs); color: var(--dim); border: 1px solid var(--line, currentColor); }
.gstat.g-approved { color: var(--bright); border-color: var(--blue); } .gstat.g-change-requested { color: var(--hot); border-color: var(--hot); }
.chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--dim); }
.strips { display: flex; flex-direction: column; gap: 2px; }
.srow { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px; border-radius: var(--r); cursor: pointer; }
.srow:hover { background: var(--hover); } .srow.sel { background: var(--sel); box-shadow: inset 3px 0 var(--hot); }
.srow .nm b { display: block; color: var(--bright); font-weight: 500; } .srow .nm small { display: block; color: var(--dim); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.stable { border-collapse: collapse; width: max-content; min-width: 100%; font-size: var(--fs-s); }
.stable th { position: sticky; top: 0; background: var(--body-hi); color: var(--dim); font-weight: 500; text-align: left; padding: 6px 10px; cursor: pointer; white-space: nowrap; border-bottom: 1px solid var(--edge); }
.stable th.on { color: var(--bright); }
.stable td { padding: 5px 10px; border-bottom: 1px solid var(--row-line2); color: var(--text); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.stable tr { cursor: pointer; } .stable tbody tr:hover { background: var(--hover); } .stable tr.sel { background: var(--sel); }

/* ---------- Log: the shot grid, Lightroom-style (part 5) ----------
   G: the grid is the whole centre (no Source). E: the loupe, Source as the centre with a filmstrip under it. */
@media (min-width: 821px) {
  .app.ws-log.lr-grid { grid-template-rows: var(--bar-h) minmax(0, 1fr); grid-template-areas: "bar bar bar" "clips tx insp"; }
  .app.ws-log.lr-grid #srcPanel { display: none; }
  .app.ws-log.lr-loupe { grid-template-rows: var(--bar-h) minmax(0, 1fr) var(--row-strip, 176px); }
}
.tx.v-grid { max-width: none; --cell: 190px; }
.tx.v-grid .sgrid { grid-template-columns: repeat(auto-fill, minmax(min(var(--cell), 100%), 1fr)); gap: calc(var(--cell) / 14 + 4px); }
.gcard { position: relative; }
.gcard.multi { background: var(--sel); border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
.gcard.sel { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.gcard .th .ov { position: absolute; z-index: 1; }
.gcard .th .pk { top: 7px; left: 7px; }
.gcard .th .offl { right: 6px; top: 6px; padding: 0 6px; border-radius: var(--r-xs); background: color-mix(in srgb, var(--black) 72%, transparent); color: var(--dim); font: 500 var(--fs-xs) var(--ui); line-height: 18px; }
.gcard .th .gstat { left: 6px; bottom: 6px; margin: 0; line-height: 16px; background: color-mix(in srgb, var(--black) 72%, transparent); }
.gcard .sl .sp { flex: 1; }
.gcard .gst { flex: none; }
.gst.off { background: var(--led-off); opacity: .6; }
.gst.graded { background: var(--note); box-shadow: 0 0 5px var(--note); }
.gst.ok { background: var(--ok); box-shadow: 0 0 5px var(--ok); }
.gst.warn { background: var(--warn); box-shadow: 0 0 5px var(--warn); }
.gcard.compact .sl { margin-top: 5px; }
.gbadges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.gb { font: 500 var(--fs-xs) var(--ui); font-style: normal; color: var(--dim); border: 1px solid var(--edge2); border-radius: var(--r-pill); padding: 0 6px; line-height: 16px; }
.gb.log { color: var(--blue-text); border-color: var(--blue-dim); }
.gb.nt { color: var(--note); }
.gsize { display: inline-flex; align-items: center; gap: 6px; }
.gsize input { width: 120px; accent-color: var(--blue); }
.gsize i { display: block; border: 1.5px solid var(--dim); border-radius: 2px; }
.gsize .gs-s { width: 8px; height: 6px; } .gsize .gs-l { width: 14px; height: 10px; }
/* the loupe's filmstrip: one row of compact cards under the monitor */
.tx.v-grid.loupe { overflow-x: auto; overflow-y: hidden; padding: 0; }
.lstrip { display: flex; gap: 8px; padding: 10px 12px; height: 100%; align-items: stretch; }
.lstrip .gcard { flex: 0 0 auto; width: 168px; }
/* View options (⌘J): a menu body that stays open while you tick */
.vopts { position: fixed; z-index: 30; width: 340px; max-width: calc(100vw - 16px); max-height: 80vh; overflow: auto; padding: 10px 12px 12px; background: var(--menu-bg); border: 1px solid var(--edge2); border-radius: var(--r-m); box-shadow: var(--shadow-menu); animation: pop var(--t-mid) ease-out; }
.vopts .vh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .vopts .vh b { color: var(--bright); font-weight: 500; }
.vopts .lbl { color: var(--dim); font-size: var(--fs-s); margin: 12px 0 6px; }
.vopts .seg { display: flex; gap: 6px; align-items: center; } .vopts .seg .hint { margin-left: auto; }
.vopts .ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; font-size: var(--fs-s); }
.vopts .chk { display: inline-flex; align-items: center; gap: 6px; color: var(--text); cursor: pointer; }
.vopts .chk input { accent-color: var(--blue); margin: 0; }
.vopts .caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.vopts select { background: var(--well); color: var(--text); border: 1px solid var(--edge2); border-radius: var(--r-s); padding: 3px 4px; font: var(--fs-s) var(--ui); min-width: 0; }
.vopts .row { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- Log: Inspector ---------- */
.insp { flex: 1; overflow: auto; padding: 4px 14px 14px; }
.insp .lbl { color: var(--dim); font-size: var(--fs-s); margin: 16px 0 7px; display: flex; justify-content: space-between; gap: 8px; }
.quote { margin: 12px 0 0; font: 400 15px/1.55 var(--words); color: var(--bright); max-height: 9.5em; overflow: auto; }
.inout { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 12px; font-size: var(--fs-s); }
.keys3 { display: flex; flex-wrap: wrap; gap: 6px; }
.others { margin-top: 6px; }
.rating { display: flex; gap: 6px; } .rating .key { width: 34px; justify-content: center; padding: 6px 0; font-family: var(--mono); }
.rating .key.lit { color: var(--star-text); }
.tagrows { display: grid; grid-template-columns: 72px 1fr; gap: 6px 10px; align-items: center; font-size: var(--fs-s); }
.facts { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 4px 10px; font-size: var(--fs-s); word-break: break-word; }
.insp textarea.note { width: 100%; resize: vertical; min-height: 64px; background: var(--lcd); box-shadow: var(--lcd-inset); border: 0; color: var(--text); font: var(--fs) / 1.45 var(--ui); padding: 8px 10px; border-radius: var(--r); }
.insp textarea.note:disabled { opacity: .5; }
.onote { margin-top: 6px; font-size: var(--fs-s); color: var(--dim); } .onote b { color: var(--text); margin-right: 6px; }
.row2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; font-size: var(--fs-s); }
/* one Log (part 6): a moment open inside a shot sits above the shot's record; an interview's clip record has a hint */
.insp .moment { margin: 0 -14px; padding: 2px 14px 14px; background: var(--panel2); border-bottom: 1px solid var(--row-line); }
.insp .moment .row2 { margin-top: 12px; }
.insp .lbl.sect { color: var(--text); text-transform: none; }
.insp .hintline { margin-top: 12px; font-size: var(--fs-s); line-height: 1.5; }
.brow .rt { display: flex; gap: 6px; align-items: center; }
.pks .rate, .pkb .rate { margin-right: 4px; vertical-align: middle; }
/* Edit's bin showing Log's clip list or its Filters: the passage pick filters don't apply */
#binPanel.cliplist .binpicks { display: none; }
#binCount .linkish { color: var(--blue-text); }
.inspfoot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--row-line); font-size: var(--fs-s); }
#inspPanel .ctx { padding: 0; }

/* ---------- Story: overview ---------- */
.over { flex: 1; overflow: auto; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 14px; }
.figs { display: flex; gap: 34px; align-items: flex-end; flex-wrap: wrap; }
.figs b { display: block; font-size: 26px; font-weight: 500; color: var(--bright); line-height: 1.1; }
.figs small { color: var(--dim); font-size: var(--fs-s); }
.figs .warn b { color: var(--warn-text); }
.ostrip { position: relative; display: flex; gap: 2px; height: 22px; margin-top: 16px; }
.ostrip .blk { position: relative; min-width: 6px; background: var(--key); border-radius: 2px; cursor: pointer; }
.ostrip .blk:hover { background: var(--raise-hover); }
.ostrip .blk.on { box-shadow: inset 0 0 0 1px var(--blue); }
.ostrip .blk.gap { background: repeating-linear-gradient(-45deg, var(--warn) 0 3px, transparent 3px 7px); opacity: .75; }
.ostrip .bn { position: absolute; top: 25px; left: 0; font: var(--fs-xs) var(--mono); color: var(--faint); }
.ostrip .actname { position: absolute; bottom: 25px; left: 0; font-size: var(--fs-xs); color: var(--dim); white-space: nowrap; }
.ostrip .sph { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--blue); box-shadow: 0 0 5px var(--blue); }
.otools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Story: board ---------- */
.board { flex: 1; display: flex; gap: 8px; padding: 10px; overflow: auto; align-items: stretch; }
.lane { flex: 0 0 236px; min-width: 0; display: flex; flex-direction: column; background: var(--body-hi); border-radius: var(--r); box-shadow: inset 0 1px 0 var(--key-hi); min-height: 0; transition: box-shadow var(--t); }
.lane.drop { box-shadow: inset 0 0 0 1px var(--blue); }
.lane.inbox { background: color-mix(in srgb, var(--blue) 6%, var(--body-hi)); }
.lh { padding: 9px 10px 8px; flex: none; }
.lt { color: var(--bright); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lt b { font-weight: 500; }
.lm { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: var(--fs-s); white-space: nowrap; min-width: 0; }
/* a shot job's scene lanes: the sheet's cast · property · AM/PM under the title, and a tag on scenes not on the sheet */
.lh .ln { min-height: 1.35em; margin-top: 3px; font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offsheet { font-size: var(--fs-xs); color: var(--warn-text); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: var(--r-pill); padding: 0 6px; line-height: 16px; white-space: nowrap; }
.sc .cm .rate { margin-left: 2px; }
.lane .cards { position: relative; flex: 1; overflow-y: auto; padding: 2px 6px 10px; display: flex; flex-direction: column; gap: 5px; }
.lane .empty-note { padding: 14px 6px; font-size: var(--fs-s); }
/* an empty lane: same lane, a quiet drop target */
.lane.nil .empty-note { margin: 2px 0; padding: 18px 8px; border: 1px dashed var(--edge2); border-radius: var(--r-s); text-align: center; color: var(--dim); }
.lane.nil .empty-note small { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--faint); }
.lane.nil.drop .empty-note { border-color: var(--blue); color: var(--text); }
.actsep { flex: 0 0 14px; position: relative; } .actsep::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--edge2); }
.lh .lk { min-height: 1.4em; margin-bottom: 4px; font-size: var(--fs-xs); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc { position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; padding: 5px; border-radius: var(--r-s); background: var(--panel2); box-shadow: inset 0 1px 0 var(--key-hi); cursor: grab; user-select: none; touch-action: manipulation; }
.sc:hover { background: var(--raise-hover); }
.sc.sel { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--blue) 70%, transparent); }
.sc.playing { box-shadow: inset 3px 0 var(--hot); background: color-mix(in srgb, var(--hot) 9%, var(--panel2)); }
.sc .prog { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--hot); display: none; }
.sc.playing .prog { display: block; }
.sc .g { color: var(--text); font-size: var(--fs-s); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc .cm { display: flex; gap: 5px; align-items: center; margin-top: 4px; font-size: var(--fs-xs); color: var(--dim); }
.sc .cn { margin-top: 4px; font-size: var(--fs-xs); color: var(--dim); } .sc .cn b { color: var(--text); margin-right: 4px; }
.sc.ghosted { opacity: .3; }
.sc.lifted { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; box-shadow: 0 0 0 1px var(--blue), var(--shadow-card); }
body.dragging, body.dragging * { cursor: grabbing !important; }
.insline { position: absolute; left: 6px; right: 6px; height: 2px; border-radius: 1px; background: var(--blue); box-shadow: 0 0 6px var(--blue); pointer-events: none; }
.paperbar { display: none; align-items: center; gap: 6px; padding: 0 14px 8px; font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; }
.app.ws-story .paperbar { display: flex; }
.paperbar b { color: var(--bright); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }

/* ---------- phone width: one column; Log and Story stay usable without a mouse ---------- */
@media (max-width: 820px) {
  .app.ws-log, .app.ws-story { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .app.ws-log { grid-template-areas: "bar" "src" "tx" "insp" "clips"; }
  .app.ws-story { grid-template-areas: "bar" "src" "over" "board"; }
  .app.ws-log #clipsPanel { height: 50vh; }
  .app.ws-log #txPanel { height: 70vh; }
  .app.ws-log #inspPanel { height: auto; max-height: none; }
  .app.ws-log .insp { overflow: visible; }
  .app.ws-story #overPanel { height: auto; }
  .app.ws-story #boardPanel { height: 78vh; }
  .board { scroll-snap-type: x mandatory; }
  .lane { flex-basis: min(86vw, 300px); scroll-snap-align: start; }
  .ostrip .actname { display: none; }  /* they collide this narrow; each act opens a lane header instead */
  .para { grid-template-columns: minmax(0, 1fr); padding: 6px 12px; }
  .para .spk { flex-direction: row; justify-content: flex-start; gap: 8px; text-align: left; }
  .para .side { flex-direction: row; flex-wrap: wrap; }
  .figs { gap: 18px; } .figs b { font-size: 20px; }
  .otools .hint, #txTabs .hint { display: none; }
  #smake { margin-left: 4px; padding: 5px 8px; } #smake kbd { display: none; }
  .sgrid, .tx.v-grid .sgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gsize { display: none; }
  .selbar { left: 8px !important; right: 8px; flex-wrap: wrap; }
  .tabs { overflow-x: auto; }
  .app.ws-story .paperbar { flex-wrap: wrap; white-space: normal; }
  .inspfoot { position: sticky; bottom: 0; background: var(--panel); }
}

/* ---------- Inspector: Colour (grade.js) ---------- */
.colour { margin-top: 4px; }
.colour .colnote { margin: 2px 0 8px; font-size: var(--fs-xs); line-height: 1.45; }
.colour .colcams { margin-bottom: 8px; flex-wrap: wrap; }
.colrows { display: grid; gap: 6px; }
.colrow { display: grid; grid-template-columns: 84px minmax(0, 1fr) 52px; align-items: center; gap: 8px; font-size: var(--fs-s); }
.colrow input[type=range] { width: 100%; accent-color: var(--blue); }
.colrow output { text-align: right; font-size: var(--fs-xs); color: var(--text); }
.colour .colkeys { margin-top: 10px; }

/* Colour beside the Program monitor (Edit): a column at the panel's right; the picture, scrub and transport make room */
#prgPanel { --pcw: clamp(210px, 38%, 300px); }
#prgPanel.colouron > :not(.pcolour) { margin-right: var(--pcw); }
.pcolour { position: absolute; top: 0; right: 0; bottom: 0; width: var(--pcw); z-index: 4; overflow: auto; padding: 0 12px 12px;
  background: var(--panel); border-left: 1px solid var(--groove); }
.pcolour .pchead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; height: 36px; margin: 0 -12px 6px; padding: 0 8px 0 12px;
  background: var(--panel); border-bottom: 1px solid var(--groove); font-weight: var(--fw-on); color: var(--bright); }
.pcolour .pchead .faint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-quiet); }
.pcolour .colour > .lbl:first-child { display: none; }  /* the head already says Colour */
@media (max-width: 820px) { #prgPanel.colouron > :not(.pcolour) { margin-right: 0; } .pcolour { position: static; width: auto; border-left: 0; border-top: 1px solid var(--groove); } }
.colour .colall { margin-top: 6px; }
.colour .colall .key { flex: 1; }
