: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;
  --shadow: 0 12px 36px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(199,166,102,.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 72px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(17,16,14,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.topbar h1, .panel-heading h2, .viewer-head h2 { margin: 2px 0 0; }
.topbar h1 { font-size: clamp(20px, 4vw, 30px); letter-spacing: -.03em; }
.eyebrow {
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.source-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}
.source-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 12px rgba(111,159,114,.7);
}

.source-strip {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.source-option {
  min-height: 64px;
  text-align: left;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 10px 12px;
}
.source-option strong, .source-option span { display: block; }
.source-option span { color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.35; }
.source-option.active { border-color: var(--gold); background: rgba(199,166,102,.08); }

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow-x: auto;
}
.tab {
  flex: none;
  white-space: nowrap;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 13px 16px;
}
#plan-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 520px; border: 0; background: var(--bg, #111); }
#plan-shot { margin-right: 8px; }
.tab.active { color: var(--gold-2); border-bottom-color: var(--gold); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

#review-tab.active, #compare-tab.active {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  min-height: calc(100vh - 170px);
}
.scene-list-panel {
  border-right: 1px solid var(--line);
  background: rgba(25,24,22,.55);
}
.panel-heading {
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-heading h2 { font-size: 20px; }
.scene-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.scene-filter-row[hidden] { display: none; }
.scene-filter-row select {
  min-width: 0;
  max-width: 65%;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
}
.scene-list { padding: 8px; }
/* CLAUDE-NOTE (2026-09-30, Ilyas: "add a scroll bar to the scene column on the left"): on desktop the column pins
   under the sticky topbar (height tracked in --topbar-h by index.html) and the scene list scrolls on its own with a visible scrollbar, so 99+ scenes don't
   push the viewer off-screen. The phone layout (<=760px, horizontal strip) is overridden in the media query below. */
@media (min-width: 761px) {
  .scene-list-panel {
    position: sticky;
    top: var(--topbar-h, 82px);
    align-self: start;
    height: calc(100vh - var(--topbar-h, 82px));
    display: flex;
    flex-direction: column;
  }
  .scene-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: scroll;
    scrollbar-width: auto;
    scrollbar-color: var(--gold) rgba(255,255,255,.06);
  }
  .scene-list::-webkit-scrollbar { width: 12px; }
  .scene-list::-webkit-scrollbar-track { background: rgba(255,255,255,.06); }
  .scene-list::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 6px; border: 3px solid rgba(25,24,22,.9); }
}
.scene-card {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 4px;
}
.scene-card:hover { background: var(--panel-2); }
.scene-card.active {
  background: rgba(199,166,102,.09);
  border-color: rgba(199,166,102,.45);
}
.scene-card-title { font-weight: 700; line-height: 1.3; }
.scene-card-sub { color: var(--muted); font-size: 11px; margin-top: 5px; }
.version-badge { display: inline-block; margin-top: 7px; margin-right: 6px; padding: 3px 7px; border: 1px solid var(--gold); border-radius: 999px; color: var(--gold-2); font-size: 10px; font-weight: 800; }
.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  margin-top: 7px;
  color: var(--muted);
}
.status-pill.approved { border-color: rgba(111,159,114,.7); color: #9bc49e; }
.status-pill.revision_requested { border-color: rgba(187,105,94,.7); color: #d98f85; }
.status-pill.submitted { border-color: var(--gold); color: var(--gold-2); }
.status-pill.seen { border-color: var(--good); color: #9bc49e; }
.status-pill.pending { border-color: rgba(187,105,94,.7); color: #d98f85; }
.status-pill.needs_clarification, .status-pill.override_open { border-color: var(--warn); color: var(--warn); }

.viewer-panel { padding: 18px; min-width: 0; }
.empty-viewer {
  min-height: 55vh;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}
/* CLAUDE-NOTE: display:grid above beat the UA [hidden] rule, so the empty state never hid (review + compare). */
.empty-viewer[hidden] { display: none; }
.empty-mark {
  margin: 0 auto 12px;
  width: 64px; height: 64px;
  display: grid; place-content: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 900;
  letter-spacing: .08em;
}
.viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.viewer-head select, .note-row select, .note-row input {
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
}
.submission-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
}
.submission-actions, .note-mode-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.note-mode-controls label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 11px; }
.danger-btn {
  border: 1px solid var(--danger);
  background: rgba(187,105,94,.1);
  color: #d98f85;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 700;
}
.video-stage {
  position: relative;
  width: 100%;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
#review-video {
  width: 100%;
  max-height: 70vh;
  display: block;
  background: #000;
}
.annotation-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: none;
}
.video-stage.drawing-mode .annotation-layer {
  pointer-events: auto;
  cursor: crosshair;
}
.annotation-ellipse {
  fill: rgba(255,255,255,.04);
  stroke: #f6e58d;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.9));
}
.review-transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}
.transport-left, .transport-right { display: flex; gap: 7px; flex-wrap: wrap; }
.active-tool {
  border-color: var(--gold) !important;
  background: rgba(199,166,102,.12) !important;
  color: var(--gold-2) !important;
}
.annotation-hint {
  margin-top: 8px;
  padding: 9px 11px;
  border: 1px dashed rgba(199,166,102,.55);
  border-radius: 8px;
  color: var(--gold-2);
  background: rgba(199,166,102,.06);
  font-size: 11px;
}
.annotation-status {
  margin: 8px 0;
  color: var(--gold-2);
  font-size: 11px;
  font-weight: 700;
}
.comment-markers {
  position: relative;
  height: 20px;
  margin: 3px 6px 0;
  border-top: 1px solid var(--line);
}
.comment-marker {
  position: absolute;
  top: -4px;
  width: 10px;
  height: 10px;
  padding: 0;
  transform: translateX(-50%);
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.comment-marker.revision {
  background: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}
.comment-marker.approval {
  background: var(--good);
  box-shadow: 0 0 0 1px var(--good);
}
.scene-meta-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  margin-top: 12px;
}
.meta-card, .note-composer, .scene-notes-section, .shot-section, .references-section {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
}
.meta-card { padding: 12px; }
.meta-card p { margin: 5px 0 0; color: var(--muted); white-space: pre-wrap; line-height: 1.4; }
.meta-label { color: var(--gold); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }

.shot-section, .references-section, .note-composer, .scene-notes-section { margin-top: 12px; padding: 14px; }
.section-title-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.section-title-row h3, .scene-notes-section h3 { margin: 0; font-size: 15px; }
.timeline { display: flex; gap: 6px; flex-wrap: wrap; }
.shot-chip {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 11px;
}
.shot-chip.gap { color: var(--warn); border-style: dashed; }
.references {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(120px,1fr));
  gap: 8px;
}
.reference-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 9px;
  overflow: hidden;
}
.reference-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: #0a0a0a; }
.reference-card span { display: block; padding: 7px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }

.note-row { display: grid; grid-template-columns: 140px 1fr; gap: 8px; margin-bottom: 8px; }
.note-composer textarea {
  width: 100%;
  resize: vertical;
  color: var(--text);
  background: #12110f;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
}
.primary-btn, .ghost-btn, .order-move {
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 700;
}
.primary-btn { border: 1px solid var(--gold); color: #17130c; background: var(--gold-2); }
.ghost-btn, .order-move { border: 1px solid var(--line); color: var(--text); background: transparent; }
.primary-btn:hover { filter: brightness(1.05); }
.ghost-btn:hover, .order-move:hover { border-color: var(--gold); }

.note-card {
  border-top: 1px solid var(--line);
  padding: 11px 0;
}
.note-card:first-child { border-top: 0; }
.note-card.has-spatial { border-left: 2px solid rgba(199,166,102,.55); padding-left: 10px; }
.note-card.with-screenshot { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); gap: 12px; align-items: start; }
.note-thumbnail { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.note-thumbnail img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #000; }
.note-content { min-width: 0; }
.all-note-scene { margin-top: 12px; color: var(--muted); font-size: 11px; font-weight: 700; }
.note-head { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.note-card p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.45; }
.note-kind { color: var(--gold); text-transform: uppercase; font-weight: 800; }
.note-version { margin-left: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.note-version.older { color: var(--warn); }
.note-jump {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.note-jump:hover { color: var(--gold-2); }
.spatial-badge {
  display: inline-block;
  margin-left: 6px;
  color: var(--gold-2);
  font-size: 10px;
  font-weight: 700;
}

.order-shell, .activity-shell { max-width: 1000px; margin: 0 auto; padding: 18px; }
.order-list { padding-top: 10px; }
.order-card {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
}
.order-index {
  color: var(--gold);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}
.order-title { font-weight: 700; }
.order-meta { color: var(--muted); font-size: 11px; margin-top: 3px; }
.order-actions { display: flex; gap: 5px; }
.order-move { padding: 7px 10px; min-width: 38px; }
.mirror-badge { color: #9bc49e; }
.stale-mirror-badge { color: var(--warn); }
.build-badge { color: var(--warn); }
.placeholder-badge { color: var(--muted); }
.button-row { display: flex; gap: 8px; }

.muted { color: var(--muted); font-size: 12px; line-height: 1.4; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 99;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  padding: 10px 15px;
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 12px;
}

@media (max-width: 760px) {
  .submission-panel { display: block; }
  .submission-actions { margin-top: 9px; }
  .topbar { align-items: flex-start; }
  .source-chip { max-width: 150px; }
  .source-strip { grid-template-columns: 1fr; }
  .source-option:not(.active) { display: none; }
  #review-tab.active, #compare-tab.active { display: block; }
  .scene-list-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .scene-list {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 8px 10px 12px;
    scroll-snap-type: x proximity;
  }
  .scene-card { min-width: 220px; border: 1px solid var(--line); scroll-snap-align: start; }
  .viewer-panel { padding: 12px; }
  .viewer-head { display: block; }
  .viewer-head select { width: 100%; margin-top: 10px; }
  .review-transport { align-items: stretch; flex-direction: column; }
  .transport-left, .transport-right { width: 100%; }
  .transport-left .ghost-btn, .transport-right .ghost-btn { flex: 1; }
  .scene-meta-grid { grid-template-columns: 1fr; }
  .note-row { grid-template-columns: 1fr; }
  .note-card.with-screenshot { grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); gap: 9px; }
  .references { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .order-shell, .activity-shell { padding: 10px; }
  .order-card { grid-template-columns: 38px minmax(0,1fr); }
  .order-actions { grid-column: 2; }
  .panel-heading { padding: 14px 10px; }
}

.comment-marker.stale {
  opacity: .45;
  background: transparent;
  border-color: var(--warn);
  box-shadow: 0 0 0 1px var(--warn);
}

/* Multi-project shell + compact references */
.project-picker-wrap { min-width: 0; }
.project-select {
  display: block;
  width: min(100%, 240px);
  margin-top: 4px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  font-weight: 750;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.references-disclosure, .script-disclosure {
  padding: 0;
  overflow: hidden;
}
.references-disclosure > summary, .script-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  list-style: revert;
}
.references-disclosure[open] > summary, .script-disclosure[open] > summary {
  border-bottom: 1px solid var(--line);
}
.references-disclosure > .references {
  padding: 12px;
}
.references-disclosure:not([open]) > .references {
  display: none;
}

.note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.note-edit {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 750;
}
.note-edit:hover { border-color: var(--gold); }
#cancel-note-edit { margin-left: 8px; }
.note-delete {
  border: 1px solid rgba(187,105,94,.45);
  background: transparent;
  color: #d98f85;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 750;
}
.note-delete:hover {
  border-color: var(--danger);
  background: rgba(187,105,94,.08);
}

.references-disclosure > summary, .script-disclosure > summary {
  list-style: none;
}
.references-disclosure > summary::-webkit-details-marker, .script-disclosure > summary::-webkit-details-marker {
  display: none;
}
.references-disclosure > summary::after, .script-disclosure > summary::after {
  content: "▸";
  margin-left: auto;
  color: var(--gold);
  transition: transform .15s ease;
}
.references-disclosure[open] > summary::after, .script-disclosure[open] > summary::after {
  transform: rotate(90deg);
}

.script-disclosure { margin-top: 10px; }
.script-content { padding: 14px; color: var(--text); font-size: 14px; }
.script-content pre {
  margin: 12px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.5;
}
.script-images { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 10px; margin-top: 16px; }
.script-images img { width: 100%; height: auto; border-radius: 8px; }

/* CLAUDE-NOTE: Scene player zoom. .video-stage clips; .video-zoom is the transformed layer holding the
   video + annotation SVG (see index.html note). transform-origin 0 0 matches zoom.js math. */
.video-zoom {
  position: relative;
  transform-origin: 0 0;
  will-change: transform;
}
.video-stage { touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.video-stage.dragging { cursor: grabbing; }
/* Fullscreen: the zoom layer and video fill the stage so getVideoContentBox()'s contain-box math still holds. */
.video-stage:fullscreen { border: 0; }
.video-stage:fullscreen .video-zoom, .video-stage:fullscreen #review-video { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.zoom-hint, .compare-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(17,16,14,.75);
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.zoom-hint[hidden] { display: none; }
.scene-search {
  display: block;
  flex-shrink: 0;
  width: calc(100% - 16px);
  margin: 6px 8px 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.scene-search:focus { outline: none; border-color: var(--accent, #c9a45c); }
/* Back/Next shot buttons over the player: dim until hovered so they don't hide the frame; gone while drawing a mark. */
.shot-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(17,16,14,.55);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  opacity: .55;
  transition: opacity .15s, background .15s;
}
.shot-nav.prev { left: 8px; }
.shot-nav.next { right: 8px; }
.video-stage:hover .shot-nav { opacity: .85; }
.shot-nav:hover, .shot-nav:focus-visible { opacity: 1; background: rgba(17,16,14,.85); }
.shot-nav:disabled { opacity: .15; cursor: default; }
.video-stage.drawing-mode .shot-nav { display: none; }
@media (max-width: 720px) { .shot-nav { padding: 8px 9px; font-size: 12px; opacity: .7; } }
.player-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}
.player-bar input[type=range], .compare-transport input[type=range] {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 28px;
  accent-color: var(--gold);
}
.player-btn { min-width: 44px; height: 40px; padding: 0 10px; }
/* CLAUDE-NOTE (2026-10-09): the trim band sits under the transparent range track and marks the trim range. */
.scrub-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.trim-band { position: absolute; top: 9px; bottom: 9px; border-radius: 4px; pointer-events: none;
  background: rgba(187,105,94,.55); box-shadow: 0 0 0 1px var(--danger); }
.trim-band.keep { background: rgba(111,159,114,.55); box-shadow: 0 0 0 1px var(--good); }
.trim-band[hidden] { display: none; }
.scrub-wrap input[type=range] { position: relative; }
.trim-editor { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--danger); border-radius: 8px; background: rgba(187,105,94,.07); }
.trim-editor[hidden] { display: none; }
.trim-head { font-size: 12px; }
.trim-points { display: flex; flex-wrap: wrap; gap: 7px; align-items: stretch; }
.trim-points > * { min-height: 40px; }
.trim-points select { flex: 1 1 160px; }
.trim-point { flex: 1 1 110px; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text);
  font-variant-numeric: tabular-nums; font-size: 12px; }
.trim-point:not(:disabled):hover { border-color: var(--gold); }
.action-trim { color: #d98f85; font-variant-numeric: tabular-nums; }
.set-link-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.set-link-row[hidden] { display: none; }
.set-link-row select { min-height: 36px; flex: 1 1 160px; }
.set-link-label { font-weight: 700; flex: 1 1 auto; }
.set-view-shots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.set-linked-head { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 6px; font-size: 12px; }
.mini-btn { padding: 2px 8px; font-size: 11px; font-weight: 700; color: var(--text); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.mini-btn:hover { border-color: var(--gold); }
.trim-ab { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(0,0,0,.72); }
.trim-ab-card { width: min(1200px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 10px; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.trim-ab-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.trim-ab-head button { margin-left: auto; }
.trim-ab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trim-ab-grid figure { margin: 0; display: grid; gap: 4px; }
.trim-ab-grid figcaption { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.trim-ab-grid video { width: 100%; background: #000; border-radius: 8px; }
.trim-ab-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@media (max-width: 760px) { .trim-ab-grid { grid-template-columns: 1fr; } }
.redo-pick { display: grid; gap: 4px; flex: 1 1 180px; font-size: 12px; color: var(--muted); }
.redo-pick select { min-height: 40px; }
.manual-pick { margin: 6px 0; }
.manual-pick textarea, .manual-pick input { width: 100%; min-height: 40px; box-sizing: border-box; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px; font: inherit; }
.trim-points .primary-btn { flex: 1 1 auto; }
.player-time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.player-time b { color: var(--gold-2); font-weight: 700; }

/* Compare loupe */
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg[hidden] { display: none; }
.seg button {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 8px 12px;
  font-weight: 700;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--gold-2); color: #17130c; }
.compare-controls, .compare-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.compare-pick { display: flex; align-items: center; gap: 6px; min-width: 0; }
.compare-pick select {
  min-width: 0;
  max-width: min(70vw, 360px);
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
}
.pick-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--line);
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
}
.pick-badge.b, .compare-badge.b { background: var(--gold-2); color: #17130c; }
.compare-stage { display: grid; gap: 10px; }
@media (min-width: 1100px) { .compare-stage.both { grid-template-columns: 1fr 1fr; } }
.compare-fig { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.compare-fig[hidden] { display: none; }
.compare-fig figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.compare-tag { color: var(--muted); font-size: 11px; font-weight: 500; text-align: right; }
.compare-tag.bad { color: #d98f85; }
.compare-vp {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 6px;
  touch-action: pan-y;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.compare-vp.dragging { cursor: grabbing; }
.compare-vp video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  pointer-events: none;
  display: block;
}
.compare-vp video.flip-layer { z-index: 1; }
.compare-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(17,16,14,.78);
  font-weight: 800;
  font-size: 13px;
  pointer-events: none;
}
.compare-load {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}
.compare-load[hidden] { display: none; }
.compare-transport {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 10px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(25,24,22,.96);
  backdrop-filter: blur(10px);
}
.compare-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.compare-buttons .player-time { margin-left: auto; }
@media (max-width: 760px) {
  .player-bar { flex-wrap: wrap; }
  .player-bar .scrub-wrap { order: -1; flex-basis: 100%; }
  .player-bar .player-time { margin-right: auto; }
}

/* CLAUDE-NOTE (2026-09-30): take picker, one-tap decisions, binding director lock, Before/After wipe and the
   Continuity strip. Buttons are >=44px tall for thumb taps — Ilyas reviews on his phone. */
.take-panel {
  margin: -2px 0 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  display: grid;
  gap: 9px;
}
.take-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.take-pick { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 0; }
.take-panel > * { min-width: 0; }
.take-pick select, .quick-note, .lock-editor select, .lock-editor input, .lock-editor textarea, #continuity-group {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  color: var(--text);
  background: #12110f;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
}
.take-pick select { flex: 1; text-overflow: ellipsis; }
#continuity-group { width: auto; max-width: 100%; }
.take-hint { color: var(--warn); }
.take-hint[hidden], .decision-banner[hidden] { display: none; }
.decision-banner {
  padding: 9px 11px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: rgba(199,166,102,.1);
  color: var(--gold-2);
  font-size: 12px;
  line-height: 1.45;
}
.quick-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.qa-btn {
  min-height: 44px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
  font-size: 12px;
  touch-action: manipulation;
}
.qa-btn:hover { border-color: var(--gold); }
.qa-btn:disabled { opacity: .5; }
.qa-btn.approve { border-color: var(--good); color: #9bc49e; }
.qa-btn.approve.on { background: var(--good); color: #0f140f; }
.qa-btn.reroll { border-color: var(--danger); color: #d98f85; }
.qa-btn.redo_startframe { border-color: var(--danger); color: #d98f85; }
.quick-note { width: 100%; }
.take-actions-log { display: grid; gap: 4px; font-size: 11px; }
.take-actions-log:empty { display: none; }
.action-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: baseline; color: var(--text); }
.action-row.done { opacity: .6; }
.action-kind { font-weight: 800; color: var(--gold-2); text-transform: uppercase; font-size: 10px; letter-spacing: .04em; }
.action-kind.approve { color: #9bc49e; }
.lock-editor { border-top: 1px solid var(--line); padding-top: 8px; }
.lock-editor summary { cursor: pointer; font-weight: 700; font-size: 12px; }
.lock-editor label { display: grid; gap: 4px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.lock-editor .button-row { margin-top: 10px; }
.status-pill.locked { border-color: var(--gold); color: var(--gold-2); }
/* CLAUDE-NOTE (Ilyas 2026-10-12): production status (agent-written) - SOLID fills with explicit text colours so the
   pill reads on any card/background (light or dark), unlike the outline pills. Re-roll looks muted while queued. */
.status-pill.queued { border-color: #3d6fb0; background: #2c5a94; color: #fff; }
.status-pill.rendering { border-color: #7a55b8; background: #5f3d9a; color: #fff; }
.status-pill.dialogue { border-color: #2b8f86; background: #1f6f68; color: #fff; }
.status-pill.publishing { border-color: #5f9a52; background: #3f7a35; color: #fff; }
.status-pill.needs { border-color: #e0a63a; background: #f0c060; color: #1d1608; }
/* CLAUDE-NOTE (Ilyas 2026-10-22): voice tags from the EL v4 audit. v4 = quiet outline (the norm); the two that need
   action are solid so they stand out in the list. */
.status-pill.voice-v4 { border-color: #2b8f86; color: #2b8f86; }
.status-pill.voice-dxrevive { border-color: #b8552b; background: #9a3d1f; color: #fff; }
.status-pill.voice-no_line { border-color: #b02b5a; background: #8f1f47; color: #fff; }
.status-banner { padding: 9px 11px; border: 1px solid; border-radius: 8px; color: #fff; font-size: 12px; line-height: 1.45; }
.status-banner.queued { border-color: #3d6fb0; background: #2c5a94; }
.status-banner.rendering { border-color: #7a55b8; background: #5f3d9a; }
.status-banner.dialogue { border-color: #2b8f86; background: #1f6f68; }
.status-banner.publishing { border-color: #5f9a52; background: #3f7a35; }
.status-banner.needs { border-color: #e0a63a; background: #f0c060; color: #1d1608; }
.status-banner .muted { color: inherit; opacity: .8; }
.status-banner[hidden] { display: none; }
.qa-btn.already-queued { opacity: .55; border-style: dashed; filter: grayscale(.6); }
/* CLAUDE-NOTE (Ilyas 2026-10-12): merge shots - merged card / sent request / agent suggestion chips + editor. */
.status-pill.merge-pill { border-color: var(--line); color: var(--text); }
.status-pill.merge-pill.suggested { border-style: dashed; color: var(--muted); }
.merge-members { display: grid; gap: 6px; margin: 6px 0; }
.merge-member { display: flex; gap: 8px; align-items: center; min-height: 36px; font-size: 13px; }
.merge-member.fixed { color: var(--muted); }
.merge-camera { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; margin: 6px 0; display: grid; gap: 6px; font-size: 13px; }
.merge-camera label { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 36px; }
.merge-camera select { min-height: 36px; max-width: 100%; }
.merge-suggestion, .merge-locks { font-size: 12px; padding: 6px 8px; border-radius: 6px; border: 1px dashed var(--line); margin: 6px 0; }
.merge-locks { border-color: var(--gold); color: var(--gold-2); }
/* CLAUDE-NOTE (Ilyas 2026-10-14): add-one-more-shot button + cancel / undo merge row. */
.merge-add { justify-self: start; min-height: 36px; }
.merge-member:has(input:disabled) { opacity: .55; }
.merge-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 6px; margin: 6px 0; }
.merge-status button { min-height: 32px; }
.carried-note { margin: 6px 0; font-size: 13px; }

#continuity-tab.active { display: block; }
.continuity-shell { max-width: 1100px; margin: 0 auto; padding: 18px; }
.continuity-shell .panel-heading { gap: 12px; flex-wrap: wrap; }
.continuity-strip { display: grid; gap: 10px; margin-top: 12px; }
.cont-row {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 9px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
}
.cont-row:hover { border-color: var(--gold); }
.cont-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cont-title { font-weight: 700; font-size: 12px; }
.cont-take { font-size: 10px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.cont-take.approved { color: #9bc49e; }
.cont-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.cont-thumbs figure { margin: 0; position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 5px; overflow: hidden; }
.cont-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cont-thumbs figcaption {
  position: absolute; left: 4px; bottom: 3px; padding: 0 4px; border-radius: 3px;
  background: rgba(17,16,14,.75); font-size: 9px; color: var(--muted);
}
.cont-thumbs figure.missing div { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 10px; }

body.wipe-open { overflow: hidden; }
.wipe-dialog {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(10,9,8,.97);
  overflow: auto;
}
.wipe-dialog[hidden] { display: none; }
.wipe-head { display: flex; align-items: center; gap: 8px; }
.wipe-label { flex: 1; min-width: 0; font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wipe-label.after { text-align: right; color: var(--gold-2); }
.wipe-stage {
  position: relative;
  width: 100%;
  max-height: 72vh;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 6px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.wipe-layer { position: absolute; inset: 0; pointer-events: none; }
.wipe-layer video {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  object-fit: contain; transform-origin: 0 0; display: block;
}
.wipe-divider {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: var(--gold-2); box-shadow: 0 0 6px rgba(0,0,0,.8); pointer-events: none; z-index: 2;
}
.wipe-pos { width: 100%; min-height: 36px; accent-color: var(--gold); }

@media (max-width: 760px) {
  .quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .continuity-shell { padding: 10px; }
}

/* Questions tab + floating overlay (2026-10-01) */
.q-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.q-closed-toggle { color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.q-empty { padding: 12px 0; }
#questions-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.q-card { min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 12px; }
.q-card.answered { border-color: rgba(111,159,114,.55); }
.q-card.closed { opacity: .6; }
.q-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.q-status { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.q-status.open { color: var(--warn); border-color: var(--warn); }
.q-status.answered { color: var(--good); border-color: var(--good); }
.q-status.auto_proceeded { color: var(--accent, var(--muted)); border-color: var(--accent, var(--line)); }
.q-default { font-size: 12px; margin: 4px 0; }
.q-topic { font-size: 11px; color: var(--muted); }
.q-text { line-height: 1.45; }
.q-context { margin-top: 4px; }
.q-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.q-link { font-size: 12px; color: var(--gold-2); border: 1px solid var(--gold); border-radius: 99px; padding: 3px 10px; text-decoration: none; }
.q-link:hover { background: rgba(199,166,102,.12); }
/* Codex-NOTE: Inline shot references retain prose layout; chips below keep their existing pill styling. */
.q-text.q-links, .q-context.q-links { display: block; }
.q-text.q-links { margin-top: 0; }
.q-inline-link { font-size: inherit; border: 0; border-radius: 0; padding: 0; text-decoration: underline; }
.q-image { display: block; width: fit-content; margin-top: 10px; }
.q-image img { display: block; max-width: 100%; width: 480px; max-height: 240px; object-fit: contain; border-radius: 6px; }
.q-image-dialog { max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); padding: 12px; background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.q-image-dialog::backdrop { background: rgba(0,0,0,.75); }
.q-image-dialog img { display: block; max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; margin-top: 8px; }
.q-answer, .q-result { margin-top: 8px; padding: 8px; border-radius: 6px; background: var(--panel-2); font-size: 13px; line-height: 1.4; white-space: pre-wrap; }
.q-answer .eyebrow, .q-result .eyebrow { display: block; margin-bottom: 2px; }
.q-form { display: flex; gap: 8px; margin-top: 8px; align-items: flex-end; }
.q-form textarea { flex: 1; min-width: 0; resize: vertical; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.q-spacer { flex: 1; }
/* Inbox kinds + open-count badge (Ilyas 2026-10-12) */
.q-head { flex-wrap: wrap; }
.q-kind { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); color: var(--text); white-space: nowrap; }
.q-kind.kind-task { color: var(--good); }
.q-kind.kind-fyi { color: var(--muted); }
.q-time { font-size: 11px; white-space: nowrap; }
.q-quick { white-space: nowrap; }
.tab.nav-item { position: relative; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  background: var(--warn); color: #11100e; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.nav-badge[hidden] { display: none; }
body.nav-collapsed .nav-badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }

.questions-float {
  position: fixed; z-index: 60; top: 120px; right: 16px; left: auto;
  width: min(380px, calc(100vw - 32px)); height: min(520px, calc(100vh - 140px));
  min-width: 260px; min-height: 44px; resize: both; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--gold); border-radius: 10px; box-shadow: var(--shadow);
}
.questions-float[style*="left"] { right: auto; }
.questions-float[hidden] { display: none; }
.questions-float-head {
  display: flex; gap: 8px; align-items: center; padding: 8px 10px; cursor: move; touch-action: none; user-select: none;
  background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.questions-float-head .ghost-btn { padding: 3px 9px; }
.questions-float-slot { flex: 1; overflow: auto; padding: 10px; }
.questions-float.collapsed { height: auto !important; min-height: 0; resize: none; }
.questions-float.collapsed .questions-float-slot { display: none; }

/* CLAUDE-NOTE (2026-10-02, Ilyas): chopping block = loud, unmistakable but non-destructive. Red diagonal hatch +
   dimmed card + solid red pill; the take panel gets a hatched banner. Toggled off by the header switch (JS drops
   the .chopped class), never by CSS alone, so the filter and per-shot toggle keep working either way. */
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chop-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border: 1px solid rgba(208,87,75,.6); border-radius: 999px;
  color: #e7a197; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.chop-switch input { accent-color: #c0453a; margin: 0; }
.scene-card.chopped {
  opacity: .62;
  border-color: rgba(208,87,75,.75);
  background-image: repeating-linear-gradient(135deg, rgba(192,69,58,.30) 0 7px, transparent 7px 16px);
}
.scene-card.chopped:hover, .scene-card.chopped.active { opacity: .92; }
.scene-card.chopped .scene-card-title { text-decoration: line-through; text-decoration-color: rgba(230,110,98,.85); }
.status-pill.chop { border-color: #d0574b; background: #8e2a22; color: #fff; font-weight: 800; letter-spacing: .03em; }
.chop-banner {
  padding: 9px 11px;
  border: 1px solid #d0574b;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, rgba(192,69,58,.22) 0 8px, rgba(192,69,58,.08) 8px 18px);
  color: #f3c2bb;
  font-size: 12px;
  line-height: 1.45;
}
.chop-banner strong { color: #fff; }
.chop-banner[hidden] { display: none; }
.chop-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: stretch; }
.chop-row select, .chop-row input {
  color: var(--text); background: #12110f; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px;
  min-width: 0;
}
.chop-row input { flex: 1 1 180px; }
.chop-row button { min-height: 40px; }
.chop-row button[hidden] { display: none; }
@media (max-width: 760px) {
  .topbar-right { flex-direction: column; align-items: flex-end; gap: 6px; }
  .chop-row select { flex: 0 0 auto; }
  .chop-row input { flex: 1 1 100%; order: 3; }
  .chop-row button { flex: 1 1 auto; }
}
/* CLAUDE-NOTE (2026-10-05): older-cut notes collapse under the current cut's notes */
.other-cut-notes { margin-top: 12px; }
.other-cut-notes > summary { cursor: pointer; color: var(--muted, #8a8a8a); font-size: 13px; padding: 6px 0; }
.other-cut-notes[open] > summary { margin-bottom: 8px; }
.unlock-btn { margin: 6px 0 4px; }

/* ------------------------------------------------------------------ Sets tab (pilot 2026-10-05) */
/* CLAUDE-NOTE: same two-column shell as Compare; on phones it stacks, the 3D stage keeps a 4:3-ish height so the
   on-screen walk pad stays reachable with a thumb, and the sidebar (views / toggles / notes) follows below. */
#sets-tab.active {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  min-height: calc(100vh - 170px);
}
.set-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.set-main { min-width: 0; }
.set-stage {
  position: relative;
  height: min(68vh, 720px);
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0e0d0c;
  touch-action: none;
}
.set-stage canvas { display: block; width: 100%; height: 100%; outline: none; }
.set-mode-badge {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3;
  padding: 6px 12px; border-radius: 999px; background: rgba(199,166,102,.92); color: #17130c;
  font-size: 12px; font-weight: 700; pointer-events: none;
}
.set-mode-badge[hidden] { display: none; }
.set-help {
  position: absolute; left: 10px; bottom: 8px; z-index: 2; color: rgba(241,234,220,.55);
  font-size: 11px; pointer-events: none;
}
.set-pad {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  display: grid; grid-template-columns: repeat(3, 40px); grid-template-rows: repeat(3, 40px); gap: 4px;
}
.set-pad button {
  border: 1px solid rgba(241,234,220,.25); border-radius: 8px; background: rgba(17,16,14,.6);
  color: var(--text); font-size: 15px; touch-action: none; user-select: none; -webkit-user-select: none;
}
.set-pad button:active { background: rgba(199,166,102,.5); }
.set-pad [data-pad="w"] { grid-column: 2; grid-row: 1; }
.set-pad [data-pad="a"] { grid-column: 1; grid-row: 2; }
.set-pad [data-pad="s"] { grid-column: 2; grid-row: 3; }
.set-pad [data-pad="d"] { grid-column: 3; grid-row: 2; }
.set-pad [data-pad="r"] { grid-column: 3; grid-row: 1; }
.set-pad [data-pad="f"] { grid-column: 3; grid-row: 3; }
@media (hover: hover) and (pointer: fine) { .set-pad { opacity: .45; } .set-pad:hover { opacity: 1; } }
.set-hotspots { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: thin; }
.set-hotspots .ghost-btn { white-space: nowrap; flex: 0 0 auto; }
.set-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; }
.set-check, .set-bright { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.set-bright input { width: 120px; }
.set-inline-form, .set-note-form {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px; margin: 4px 0 8px; border: 1px solid var(--gold); border-radius: 10px; background: var(--panel);
}
.set-inline-form[hidden], .set-note-form[hidden] { display: none; }
.set-note-form { flex-direction: column; align-items: stretch; }
.set-inline-form input, .set-note-form textarea, .set-note-form select {
  flex: 1 1 200px; min-width: 0; padding: 8px 10px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; font: inherit;
}
.set-note-row { display: flex; gap: 8px; flex-wrap: wrap; }
.set-note-row select { flex: 0 1 150px; }
.set-side details { border: 1px solid var(--line); border-radius: 10px; background: rgba(25,24,22,.55); margin-bottom: 10px; }
.set-side summary { cursor: pointer; padding: 10px 12px; font-weight: 700; }
.set-side details > div { padding: 0 10px 10px; }
.set-items { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.set-item {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px; align-items: start;
  padding: 6px; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
}
.set-item:hover { background: var(--panel-2); }
.set-item.active { border-color: var(--gold); }
.set-item img, .set-thumb-empty { width: 72px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; background: #000; }
.set-item-title { font-weight: 700; font-size: 13px; }
.set-note-text { font-size: 13px; margin: 3px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.set-del { padding: 3px 8px; font-size: 11px; }
.set-toggle { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.set-submission { padding-bottom: 6px; font-size: 12px; }
.set-note-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.set-note-actions button:disabled { opacity: .5; cursor: default; }
@media (max-width: 1100px) { .set-layout { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  #sets-tab.active { display: block; }
  .set-stage { height: 62vh; min-height: 280px; }
  .set-help { display: none; }
}
.set-tour {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
}
.set-tour[hidden] { display: none; }
.set-tour-label { font-weight: 700; font-size: 12px; color: var(--gold-2); }
.set-tour input[type="range"] { flex: 1 1 160px; min-width: 120px; accent-color: var(--gold); }
.set-tour-time { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); min-width: 92px; }
@media (max-width: 760px) { .set-tour input[type="range"] { flex-basis: 100%; order: 5; } }
.set-tour-path { max-width: 200px; padding: 6px 8px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.set-tour-path[hidden] { display: none; }

/* CLAUDE-NOTE (Ilyas 2026-10-10): Film tab — whole-film playlist of latest cuts + a depleting transition pool. */
.film-shell { padding: 18px; max-width: 1400px; margin: 0 auto; }
.film-player { background: #000; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 12px 0; }
.film-stage { position: relative; aspect-ratio: 16 / 9; max-height: 62vh; margin: 0 auto; }
.film-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; visibility: hidden; }
.film-video.film-front { visibility: visible; }
/* Film fullscreen = the whole player box: video fills, transport (prev/play/next/exit) stays along the bottom. */
.film-player:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; margin: 0; }
.film-player:fullscreen .film-stage { flex: 1; max-height: none; aspect-ratio: auto; width: 100%; }
.film-player:fullscreen .film-video { object-fit: contain; }
.film-transport { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: var(--panel); flex-wrap: wrap; }
.film-transport #film-now { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.film-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.film-hint { font-size: 12px; margin: 0 0 8px; }
.film-strip { display: flex; flex-direction: column; }
.film-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: grab; }
.film-card.film-surf { background: var(--panel-2); border-style: dashed; margin-left: 28px; padding: 4px 8px; }
.film-card.film-scene { border-color: var(--warn); }
.film-card.film-empty { opacity: .5; }
.film-card.playing { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.film-thumb { width: 64px; height: 36px; border-radius: 4px; background: #000; display: grid; place-items: center; overflow: hidden;
  color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.film-thumb img { width: 100%; height: 100%; object-fit: cover; }
.film-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film-gap { height: 8px; display: grid; place-items: center; border-radius: 6px; transition: height .12s; }
.film-gap span { display: none; color: var(--gold); font-weight: 700; }
.film-gap.armed, .film-gap.drop-hover { height: 26px; border: 1px dashed var(--gold); cursor: pointer; }
.film-gap.armed span, .film-gap.drop-hover span { display: block; }
.film-card.drop-hover { border-top: 3px solid var(--gold); }
.film-side { position: sticky; top: 12px; display: grid; gap: 12px; }
.film-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--panel); }
.film-box.drop-hover { border-color: var(--gold); }
.film-box h3 { margin: 0 0 8px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.film-box .pill { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.film-pool { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pool-clip { display: grid; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2);
  color: var(--text); font-size: 11px; cursor: grab; }
.pool-clip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; }
.film-tray { display: grid; gap: 6px; max-height: 40vh; overflow: auto; }
.tray-scene { display: grid; text-align: left; gap: 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel-2); color: var(--text); cursor: grab; }
.tray-scene span { font-size: 11px; color: var(--muted); }
.pool-clip.armed, .tray-scene.armed { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.film-out { padding: 2px 8px; }
@media (max-width: 900px) {
  .film-layout { grid-template-columns: 1fr; }
  .film-side { position: static; order: -1; }
  .film-shell { padding: 12px; }
  .film-card { grid-template-columns: 48px minmax(0, 1fr); }
  .film-card .order-actions { grid-column: 2; }
  .film-thumb { width: 48px; height: 27px; }
}

/* CLAUDE-NOTE (Ilyas 2026-10-14): Cards tab - compact rows (video | card text) he scrolls through one by one.
   Approved rows get a subtle green left border; the video column stays small so ~2-3 rows fit on a laptop screen. */
.cards-shell { max-width: 1400px; margin: 0 auto; padding: 18px; }
.cards-heading { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-bottom: 8px; }
.cards-heading .pill { font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: middle; font-weight: 400; }
.cards-filters { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.cards-filters .active { border-color: var(--gold); color: var(--gold-2); }
.cards-list { display: grid; gap: 8px; }
.card-group-head { margin: 14px 0 2px; padding: 6px 2px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-group-head strong { color: var(--gold); margin-right: 4px; }
.card-purpose { margin-left: 8px; font-size: 13px; }
.card-row { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: 12px; padding: 8px; background: var(--panel);
  border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; }
.card-row.status-approved { border-left-color: var(--good); }
.card-row.status-edited { border-left-color: var(--warn); }
/* CLAUDE-NOTE (Ilyas 2026-10-14: "nothing is being filtered"): .card-row/.card-group-head set display, which beats the
   [hidden] attribute the filter uses; force hidden rows out. */
.card-row[hidden], .card-group-head[hidden] { display: none; }
.card-row.saving { opacity: .7; }
.card-media { display: grid; gap: 4px; align-content: start; }
.card-video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; }
.card-take-nav { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.card-take-btn { padding: 2px 9px; }
.card-badge { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold-2); }
.card-body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.card-head { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.card-shot-link { background: none; border: 0; padding: 0; color: var(--gold-2); font-weight: 700; font-size: 15px; }
.card-title { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-text { width: 100%; min-height: 64px; resize: vertical; overflow: hidden; padding: 8px 10px; line-height: 1.45; font-size: 14px;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.card-text:focus { outline: none; border-color: var(--gold); }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; }
.card-spacer { flex: 1; }
.card-state.saved { color: var(--muted); }
.card-state.unsaved { color: var(--warn); font-weight: 700; }
.card-state.approved { color: var(--good); font-weight: 700; }
.card-state.stale { color: var(--danger); font-weight: 700; }
.card-agent { white-space: pre-wrap; font-size: 13px; padding: 6px 10px; border-left: 2px solid var(--line); }
.card-conflict { font-size: 13px; padding: 6px 10px; border: 1px solid var(--danger); border-radius: 8px; }
.card-conflict pre { white-space: pre-wrap; font: inherit; margin: 6px 0; }
.card-status-badge { margin-left: auto; flex: 0 0 auto; font-size: 11px; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); }
.card-status-badge.approved { border-color: var(--good); color: var(--good); }
.card-status-badge.edited { border-color: var(--warn); color: var(--warn); }
.card-status-badge.stale { border-color: var(--danger); color: var(--danger); font-weight: 700; }
.cards-empty { padding: 24px 12px; font-size: 14px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
@media (max-width: 760px) {
  .cards-shell { padding: 10px; }
  .card-row { grid-template-columns: 1fr; }
  .card-purpose { display: none; }
}

/* CLAUDE-NOTE (Ilyas 2026-10-16): Split markers on the scrubber + the split editor (reuses .trim-editor layout). */
.split-ticks { position: absolute; inset: 0; pointer-events: none; }
.split-tick { position: absolute; top: 4px; bottom: 4px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--accent, #e3b341); box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
#split-editor { border-color: var(--accent, #e3b341); background: rgba(227,179,65,.07); }
#split-pieces { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
#split-pieces li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* CLAUDE-NOTE (Ilyas 2026-10-16): Make previz form with a reference-image drop zone (previz-form.js). */
.previz-form .previz-mode { border: 0; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.previz-form .previz-mode label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.previz-form .previz-mode input[type="radio"] { flex: none; width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--gold, #c9a96a); }
.previz-form .previz-shot { color: var(--muted); margin: 0 0 10px; }
.previz-form textarea { width: 100%; box-sizing: border-box; }
.previz-drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 18px 12px; border: 1.5px dashed rgba(163,155,140,.55);
  border-radius: 10px; color: var(--muted); cursor: pointer; transition: border-color .12s, background .12s; }
.previz-drop strong { color: var(--text); }
.previz-drop:hover, .previz-drop:focus-visible, .previz-drop.over { border-color: var(--gold, #c9a96a); background: rgba(201,169,106,.07); outline: none; }
.previz-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.previz-thumbs:empty { display: none; }
.previz-thumbs figure { position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; border: 1px solid var(--line, #2e2b26); }
.previz-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.previz-thumb-del { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 16px; line-height: 24px; cursor: pointer; }
.previz-status { min-height: 1.2em; color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }

/* CLAUDE-NOTE (2026-10-16): universal Undo (sidebar foot / phone top bar) + split pieces marked Delete. */
.undo-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.undo-btn:not(:disabled) { border-color: var(--gold); color: var(--gold); }
/* Inline (not a popover): the sidebar scrolls, so an absolutely placed panel got clipped. */
.undo-panel { flex-basis: 100%; max-height: 40vh; overflow: auto; padding: 6px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; }
.undo-panel ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.undo-panel li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; font-size: 12px; }
.split-piece-deleted > strong, .split-piece-deleted > .muted { text-decoration: line-through; opacity: .55; }
.split-piece-deleted .split-del-btn { border-color: var(--gold); color: var(--gold); }
