/* True Storyboard, $0 Animatic & Surgical Per-Beat Cinema Director Desk (Lane FE-2 owns this file).
   UX Rules R1, R2, R4, R5, R7, R8, R11, R12, R14, R17, R18, R19, R22, R23.
   Zero horizontal viewport overflow across 1366px, 390px and 320px in EN LTR & AR RTL. */

.director {
  --director-rule: color-mix(in srgb, var(--text-1) 16%, transparent);
  padding-bottom: 36px;
}

.director .vnav {
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--director-rule);
}
.director .back { min-height: 36px; min-width: 36px; max-width: 100%; overflow-wrap: anywhere; }
.director .concept-nav { gap: 4px; }
.director .concept-nav a {
  position: relative;
  min-height: 36px;
  min-width: 38px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding-inline: 11px;
  transition: border-color .15s, background .15s, color .15s;
}
.director .concept-nav a.rendered::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
  margin-inline-start: 5px;
}
.director .concept-nav a.on {
  background: var(--accent-soft);
  border-color: var(--accent-text);
  color: var(--text-1);
}
.director .concept-nav a:hover { background: var(--surface-hover); color: var(--text-1); }

.director-heading { padding: clamp(16px, 2.4vw, 28px) 0 14px; }
.director-context,
.director-beat-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--text-3);
  font-size: var(--fs-xs);
}
.director-context > span:first-child {
  border-inline-start: 3px solid var(--accent-text);
  padding-inline-start: 9px;
  font-weight: 700;
  color: var(--text-1);
}
.director-phonetic-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.director-heading h1 {
  margin: 8px 0 4px;
  font-size: clamp(1.65rem, 3.1vw, 2.6rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-align: match-parent;
}
.director-heading p {
  max-width: 78ch;
  margin: 6px 0 0;
  color: var(--text-2);
  font-size: var(--fs-base);
  text-align: match-parent;
}
.director-heading h1:lang(ar), .director-heading h1:dir(rtl) { line-height: 1.38; letter-spacing: normal; }

/* ── Scrubbable Storyboard Filmstrip & Designed Animatic Slate Plates (R11) ──── */
.director-filmstrip-wrap {
  margin-bottom: 20px;
  min-width: 0;
  max-width: 100%;
}
.director-filmstrip-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  max-width: 100%;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}
.filmstrip-tile {
  flex: 0 0 auto;
  width: 88px;
  aspect-ratio: 9 / 16;
  padding: 0;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  text-align: start;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.filmstrip-tile:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.filmstrip-tile.on {
  border-color: var(--accent-text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-text) 28%, transparent);
}
.filmstrip-rendered {
  position: relative;
  width: 100%;
  height: 100%;
}
.filmstrip-rendered > img,
.filmstrip-rendered > span > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile-source {
  position: absolute;
  top: 5px;
  inset-inline-end: 5px;
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 700;
  background: rgb(15 15 14 / .78);
  color: #f6f3ec;
}
.tile-source.veo { color: var(--ok); }
.tile-source.cutout { color: var(--accent-text); }

/* Designed stand-in for a shot without a picture (no grey placeholder boxes, R11) */
.animatic-slate {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  color: #f6f3ec;
  overflow: hidden;
  isolation: isolate;
}
.animatic-slate.large {
  padding: 16px;
}
.slate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  z-index: 2;
}
.slate-num {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  background: rgb(12 12 11 / .62);
  color: #f6f3ec;
}
.filmstrip-rendered > .slate-num {
  position: absolute;
  top: 5px;
  inset-inline-start: 5px;
}
.slate-cam {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgb(12 12 11 / .52);
  display: grid;
  place-items: center;
  color: #f6f3ec;
}
.slate-cam .cinema-cam-svg { width: 14px; height: 14px; }
.animatic-slate.large .slate-num { font-size: var(--fs-xs); padding: 3px 9px; }
.animatic-slate.large .slate-cam { width: 30px; height: 30px; }
.animatic-slate.large .slate-cam .cinema-cam-svg { width: 20px; height: 20px; }

.slate-center {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding-block: 4px;
  z-index: 1;
}
.slate-hook {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.animatic-slate.large .slate-hook {
  font-size: var(--fs-base);
  padding: 5px 12px;
  border-radius: 8px;
}
.slate-product {
  width: 78%;
  max-height: 62%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / .08);
  border: 1px solid rgb(255 255 255 / .16);
}
.slate-product.cutout {
  background: transparent;
  border: 0;
  filter: drop-shadow(0 8px 14px rgb(0 0 0 / .48));
}
.slate-product img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.slate-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: rgb(255 255 255 / .1);
  display: grid;
  place-items: center;
}
.slate-emblem {
  display: grid;
  justify-items: center;
  gap: 5px;
}
.slate-monogram {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgb(255 255 255 / .14);
  border: 1px solid rgb(255 255 255 / .26);
  display: grid;
  place-items: center;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.animatic-slate.large .slate-monogram { width: 48px; height: 48px; font-size: var(--fs-lg); }
.slate-cam-label { font-size: var(--fs-xs); color: rgb(246 243 236 / .82); }

.slate-bottom {
  padding: 4px 6px;
  border-radius: 6px;
  background: rgb(10 10 9 / .74);
  color: #f6f3ec;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.28;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  z-index: 2;
}
.filmstrip-rendered > .slate-bottom {
  position: absolute;
  inset-inline: 4px;
  bottom: 4px;
}
.animatic-slate.large .slate-bottom {
  font-size: var(--fs-sm);
  padding: 8px 12px;
}

/* ── Main 2-Column Director Workspace ───────────────────────────────────────── */
.director-workspace {
  display: grid;
  grid-template-columns: minmax(290px, .88fr) minmax(0, 1.22fr);
  gap: clamp(18px, 2.8vw, 36px);
  align-items: start;
}
.director-media, .director-script { min-width: 0; }
.director-switcher, .director-take-picker { display: none; }

.director-console {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface-1);
}
.director-monitor-head,
.director-script-head,
.director-script-title,
.director-script-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}
.director-monitor-head {
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--text-2);
  font-size: var(--fs-xs);
}
.director-monitor-head strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--text-1);
}
.director-ratio-tabs button {
  min-height: 36px;
  min-width: 38px;
  padding: 0 10px;
  font-size: var(--fs-xs);
}

.director-stage {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 14px;
  background: #121210;
  border-block: 1px solid var(--border);
}
.director-stage .screen {
  width: min(100%, clamp(190px, 31vh, 290px));
  border-radius: 12px;
  border: 1px solid rgb(255 255 255 / .14);
  background: #090909;
  box-shadow: none;
}
.director-stage .screen.ratio-4x5 { aspect-ratio: 4 / 5; width: min(100%, 310px); }
.director-stage .screen.ratio-1x1 { aspect-ratio: 1 / 1; width: min(100%, 300px); }
.director-stage video { object-fit: contain; background: #090909; }
.director-stage .director-play-error { padding: 14px; font-size: var(--fs-base); }
.director-play-error p { margin: 10px 0 14px; }

/* Unrendered Live Animatic Stage */
.animatic-screen { position: relative; }
.animatic-stage-cta {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: rgb(12 12 11 / .4);
}
.director-animatic-btn {
  background: rgb(23 23 22 / .88) !important;
  color: #f6f3ec !important;
  border-color: rgb(255 255 255 / .42) !important;
  white-space: normal;
}
.director-animatic-btn:hover {
  background: rgb(38 38 35 / .95) !important;
  border-color: var(--accent-text) !important;
}
.animatic-wait {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgb(18 18 16 / .88);
  color: #f6f3ec;
  font-size: var(--fs-xs);
  font-weight: 600;
}
.animatic-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

/* Concept Cinema & Sound Card / Drawer */
.director-options { padding: clamp(14px, 1.8vw, 20px); }
.director-cinema-card {
  padding: 14px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  gap: 10px;
}
.director-cinema-head h3 { font-size: var(--fs-sm); margin: 0; }
.director-cinema-head p { font-size: var(--fs-xs); color: var(--text-2); margin: 3px 0 0; }
.director-cinema-body { display: grid; gap: 10px; }
.cinema-field-block { display: grid; gap: 4px; min-width: 0; }
.cinema-field-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
}
.cinema-save-receipt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--ok);
  font-weight: 600;
}
.cinema-save-receipt:empty { display: none; }

.director-cinema-drawer {
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  overflow: hidden;
}
.director-cinema-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 40px;
  min-width: 36px;
  gap: 6px 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-xs);
}
.director-cinema-drawer summary::-webkit-details-marker { display: none; }
.cinema-drawer-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-1);
}
.cinema-drawer-summary { color: var(--text-2); overflow-wrap: anywhere; }
.director-cinema-drawer[open] .director-cinema-body {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
}

/* Cutout Photo Picker */
.pp-opt.is-cutout {
  background-image:
    linear-gradient(45deg, var(--surface-hover) 25%, transparent 25%),
    linear-gradient(-45deg, var(--surface-hover) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--surface-hover) 75%),
    linear-gradient(-45deg, transparent 75%, var(--surface-hover) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.pp-opt.is-cutout img { object-fit: contain; padding: 3px; }
.pp-cutout-dot {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  font-size: 9px;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 4px;
  background: var(--surface-1);
  color: var(--accent-text);
}

/* $0 Re-cut Bar & Multi-Ratio Export Drawer */
.director-recut-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 14px;
  background: var(--accent-soft);
  color: var(--text-1);
  border-top: 1px solid color-mix(in srgb, var(--accent-text) 32%, var(--border));
  font-size: var(--fs-xs);
  font-weight: 600;
}
.director-export-drawer {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
.director-primary-dl { width: 100%; white-space: normal; }
.director-multi-box {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.director-ratio-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.director-ratio-downloads .btn {
  white-space: normal;
}
.director-export-wait {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  color: var(--text-2);
  padding-block: 4px;
}

.director-export {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}
.director-foot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.director-takes {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 116px), 1fr));
  gap: 6px;
}
.director-takes .take { min-width: 0; padding: 6px 8px; gap: 8px; line-height: 1.35; }
.director-takes .tp { width: 28px; height: 42px; border-radius: 4px; }
.director-takes strong, .director-takes small { display: block; font-size: var(--fs-xs); }
.director-takes small { color: var(--text-2); }

.director-render-controls { display: grid; gap: 12px; }
.director-render-controls .mode { align-items: flex-start; }
.director-render-controls .mode:focus-within { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.director-render-modes.wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.director-mode-card {
  gap: 9px;
}
.director-mode-card.is-cinema {
  border-color: color-mix(in srgb, var(--accent-text) 42%, var(--border-strong));
}
.director-mode-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.director-mode-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.director-mode-price {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent-text);
  white-space: nowrap;
}
.director-mode-tag {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.director-mode-card.on .director-mode-tag {
  border-color: color-mix(in srgb, var(--accent-text) 45%, transparent);
  color: var(--accent-text);
}

/* ── AI Vision Director Score & QA Strip Inspector ─────────────────────────── */
.director-vision-card {
  display: grid;
  gap: 9px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 72%, var(--surface-1));
}
.vision-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.vision-card-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-1);
}
.vision-score-pills,
.vision-receipt-row,
.vision-strip-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.vision-strip-btn {
  white-space: normal;
}
.vision-notes-drawer {
  border-top: 1px solid var(--border);
  padding-top: 6px;
}
.vision-notes-drawer summary {
  display: flex;
  align-items: center;
  min-height: 36px;
  font-size: var(--fs-xs);
  color: var(--text-2);
  cursor: pointer;
}
.vision-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  padding-top: 6px;
}
.vision-notes-col {
  display: grid;
  gap: 5px;
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.vision-notes-col strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ok);
}
.vision-notes-col.warn strong {
  color: var(--warn);
}
.vision-lb-stage {
  padding: 10px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border);
  background: #10100f;
  overflow-x: auto;
  max-width: 100%;
}
.vision-lb-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ── Kinetic Hook Word & Emphasis Preview ──────────────────────────────────── */
.kinetic-word {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--accent-text);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}
.slate-hook .kinetic-word {
  background: rgb(0 0 0 / .24);
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.beat-kinetic-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.kinetic-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent-text) 34%, transparent);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.kinetic-chip.is-hook {
  background: color-mix(in srgb, var(--accent) 20%, var(--surface-2));
  border-color: var(--accent-text);
}
.kinetic-chip-k {
  font-weight: 600;
  opacity: 0.84;
}
.beat-hook-visual {
  flex: 1 1 180px;
  overflow-wrap: anywhere;
}

/* ── Google Flow / Omni Prompt Drawer ──────────────────────────────────────── */
.flow-loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 14px;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.flow-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.flow-save-as {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.flow-filename {
  flex: 1 1 200px;
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: var(--fs-xs);
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.flow-attachments {
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  gap: 6px;
}
.flow-attachments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-xs);
}
.flow-attachments-head strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.flow-attach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
  font-size: var(--fs-xs);
}
.flow-attach-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.flow-attach-list svg.ico {
  color: var(--ok);
}
.flow-prompt-pre {
  margin: 0;
  padding: 14px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border-strong);
  background: var(--canvas);
  color: var(--text-1);
  font-family: ui-monospace, "TheYearOfTheCamel", monospace;
  font-size: var(--fs-xs);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 46vh;
  overflow-y: auto;
}
.btn.copied-ok:not(.subtle):not(.ghost) {
  background: var(--ok);
  border-color: var(--ok);
  color: var(--canvas);
  box-shadow: none;
}
.btn.subtle.copied-ok,
.btn.ghost.copied-ok {
  border-color: var(--ok);
  color: var(--ok);
}

.director-photo-choices { display: grid; gap: 6px; }
.director-photo-choices .photo-picker { margin: 0; }
.director-render { width: 100%; white-space: normal; }
.director-budget { text-align: center; margin: -4px 0 0; }
.director-render-controls > :empty { display: none; }

/* ── Preflight Readiness Strip (Right Column Top) ───────────────────────────── */
.director-preflight {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface-1);
}
.preflight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.preflight-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
}
.preflight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.preflight-row .reviewed-on {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 45%, var(--border));
  background: var(--ok-soft);
}
.preflight-details summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  min-width: 36px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  padding: 4px 6px;
}
.preflight-notes {
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: var(--text-1);
}

/* ── Surgical Per-Beat Director Cards ───────────────────────────────────────── */
.director-script-head {
  justify-content: space-between;
  gap: 10px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--director-rule);
}
.director-script-title { align-items: baseline; }
.director-script-head h2 { margin: 0; line-height: 1.3; font-size: var(--fs-xl); }
.director-script-actions { gap: 6px; }

.director-beats { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.director-beats .director-beat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin: 0;
  padding: 14px 16px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  transition: border-color .15s ease, background .15s ease;
}
.director-beats .director-beat::before { content: none; }
.director-beats .director-beat.active-beat {
  border-color: var(--accent-text);
}
.director-beats .director-beat.flagged {
  border-color: color-mix(in srgb, var(--warn) 62%, var(--border));
}
.director-beat-body { display: grid; gap: 8px; min-width: 0; }
.director-beat-meta strong { color: var(--text-1); font-size: var(--fs-xs); }
.director-beat-meta .beat-secs { margin-inline-start: auto; }
.director-beat .say {
  margin: 0;
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  font-weight: 600;
  line-height: 1.48;
  text-align: match-parent;
  overflow-wrap: anywhere;
}
.director-beat .beat-thumb {
  width: clamp(60px, 6vw, 78px);
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  overflow: hidden;
  padding: 0;
}
.director-beat .beat-thumb:hover { transform: scale(1.02); border-color: var(--accent-text); }
.director-beat .chip { white-space: normal; text-align: start; overflow-wrap: anywhere; }
.director-beat button.chip { min-height: 36px; min-width: 36px; padding: 5px 12px; }
.director-beat .sub-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }

/* Inline Camera & Lighting Override Chips + Popover */
.beat-look-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  min-width: 36px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  max-width: 100%;
  transition: border-color .15s, background .15s;
}
.beat-look-chip:hover,
.beat-look-chip.on {
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.beat-look-chip .cinema-cam-svg.xs { width: 15px; height: 15px; flex: none; }
.beat-look-chip .cinema-swatch { width: 12px; height: 12px; }

.beat-cinema-popover {
  padding: 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  display: grid;
  gap: 8px;
}
.beat-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-xs);
}

/* Per-Beat Surgical Action Bar (R19: explicit $USD on every action) */
.beat-surgical-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}
.beat-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  min-width: 36px;
  padding: 5px 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  max-width: 100%;
  text-align: start;
  transition: border-color .15s, background .15s, transform .1s;
}
.beat-act-btn:hover:not([disabled]) {
  background: var(--surface-hover);
  border-color: var(--accent-text);
}
.beat-act-btn:active:not([disabled]) { transform: scale(0.98); }
.beat-act-btn[disabled] {
  opacity: 0.52;
  cursor: not-allowed;
}

.beat-regen-wait {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--r-ctl);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.beat-regen-receipt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ok);
}
.ok-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border-radius: var(--r-ctl);
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 600;
}

/* Progressive Disclosure: Raw English Shot Prompt (R14) */
.beat-advanced-shot {
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.beat-advanced-shot summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  min-width: 36px;
  padding: 4px 6px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-3);
}
.beat-advanced-shot summary:hover { color: var(--text-1); }
.beat-advanced-shot .shot-box {
  margin: 6px 0 0;
  text-align: start;
  overflow-wrap: anywhere;
}

.director-edited { margin: 10px 0 4px; }
.director-notes { padding-block: 6px; border-bottom: 1px solid var(--director-rule); }
.director-notes summary { display: flex; align-items: center; min-height: 40px; min-width: 36px; padding-block: 8px; cursor: pointer; font-weight: 600; font-size: var(--fs-sm); }
.director-notes .kv, .director-notes pre, .director-notes .btn { margin-block: 4px 10px; }
.director-notes pre { text-align: start; }

.director-edit { --director-rule: var(--border); }
.director-edit .grid2 {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}
.director-edit-beat { display: grid; gap: 10px; }
.director-edit-beat .director-notes { padding: 0; border: 0; }
.director-edit .director-notes[open] > .field,
.director-edit .director-notes[open] > .checkrow { margin-block: 8px; }

/* ── Responsive tablet and phone (390px and 320px, zero overflow) ─────────────── */
@media (max-width: 820px) {
  .director-workspace { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

@media (max-width: 720px) {
  .director-render-modes.wide {
    grid-template-columns: minmax(0, 1fr);
  }
  .director-switcher {
    position: sticky;
    inset-block-start: 64px;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    margin-block-end: 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-ctl);
    background: var(--canvas);
  }
  .director-switcher button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: calc(var(--r-ctl) - 3px);
    background: transparent;
    color: var(--text-2);
    font-size: var(--fs-sm);
    line-height: 1.3;
    cursor: pointer;
  }
  .director-switcher button[aria-pressed="true"] {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text-1);
    font-weight: 600;
  }
  .director[data-panel="script"] .director-media,
  .director[data-panel="media"] .director-script,
  .director .director-take-name,
  .director .director-takes { display: none; }
  .director .director-take-picker {
    display: inline-block;
    width: auto;
    max-width: 100%;
    min-height: 38px;
    font-size: var(--fs-sm);
  }
  .director-stage .screen { width: min(100%, 60vw, 260px); }
  .director .vnav { gap: 6px 12px; padding-block: 10px; }
}

@media (max-width: 560px) {
  .director-switcher { inset-block-start: 57px; }
  .filmstrip-tile { width: 76px; }
  .director-beats .director-beat {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 13px;
    gap: 10px;
  }
  .director-beat .beat-thumb {
    width: 64px;
  }
  .director-export-drawer,
  .director-export,
  .director-options {
    padding: 12px;
  }
}

@media (max-width: 390px) {
  .director .concept-nav { flex: 1 0 100%; }
  .director .concept-nav a { min-width: 36px; padding-inline: 8px; }
  .director-script-actions { width: 100%; }
  .beat-act-btn { width: 100%; justify-content: center; }
  .director-ratio-downloads .btn { flex: 1 1 100%; justify-content: center; }
}

/* ── The plain video page (UX rules 1, 4, 6, 7, 11, 12, 13, 15, 17, 21, 22) ─────
   One column of plain content beside the video; the workshop sits in .vp-details. Flat surfaces only:
   no glow, no gradient, no frosted glass. Logical properties keep right to left correct. */
.vp { padding-bottom: 56px; }
.vp .btn { box-shadow: none; }
.vp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 12px 0 8px;
}
.vp-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  max-width: 100%;
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.vp-back:hover { color: var(--text-1); }
.vp-pager { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-sm); }
.vp-page-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--r-ctl);
  color: var(--text-1);
  text-decoration: none;
}
.vp-page-link:hover { background: var(--surface-2); }
.vp-page-link.off { visibility: hidden; }
.vp-count { padding: 0 6px; color: var(--text-2); }

.vp-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-top: 8px;
}
.vp-frame { position: sticky; inset-block-start: 80px; min-width: 0; }
.vp-screen {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface-1);
}
.vp-screen video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vp-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  padding: 24px 22px;
  text-align: center;
}
.vp-tile p { margin: 0; }
.vp-tile-line { color: var(--text-1); font-size: var(--fs-xl); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.vp-tile-step { color: var(--text-1); font-size: var(--fs-lg); font-weight: 600; line-height: 1.4; }
.vp-tile .bar { margin: 4px 0; }
.vp-tile-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-1);
  font-size: var(--fs-lg);
  font-weight: 600;
}
.vp-failed .vp-tile-head .ico { color: var(--bad); flex: none; }
.vp-quiet { margin: 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.55; }

.vp-side { display: grid; gap: 32px; align-content: start; min-width: 0; }
.vp-head h1 { margin: 0 0 4px; font-size: var(--fs-2xl); line-height: 1.25; overflow-wrap: anywhere; }
[dir="rtl"] .vp-head h1 { line-height: 1.45; }
.vp-side h2 { margin: 0 0 12px; font-size: var(--fs-lg); line-height: 1.35; }
.vp-act { display: grid; gap: 10px; }
.vp-act-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vp-act-row .btn { white-space: normal; text-align: center; }
.vp-act-msg:empty { display: none; }
/* Feedback is one line, glyph plus words, with its way on beside it: never a box inside a box. */
.vp-line-msg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.vp-line-msg p { display: inline-flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--text-1); font-size: var(--fs-sm); line-height: 1.55; }
.vp-line-msg .ico { flex: none; margin-top: 3px; }
.vp-line-msg.is-bad .ico { color: var(--bad); }
.vp-line-msg.is-info .ico { color: var(--text-2); }
.vp-line-msg .vp-quiet { flex-basis: 100%; }
.vp-note { margin: 0; color: var(--text-1); font-size: var(--fs-sm); line-height: 1.55; }
.vp-strong { margin: 0 0 2px; font-weight: 600; }
.vp-wait-line { display: flex; align-items: flex-start; gap: 12px; }
.vp-wait-line .spin { flex: none; margin-top: 4px; }
.vp-wait-line p + p { margin-top: 2px; }
.vp-versions { display: inline-flex; align-items: center; gap: 4px; justify-self: start; color: var(--text-2); font-size: var(--fs-sm); }
.vp-versions [data-vp-version] { padding: 0 6px; }
.vp-icon-btn { justify-content: center; width: 44px; min-height: 44px; padding: 0; border-color: transparent; }
.vp-link {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.vp-lines { display: grid; gap: 14px; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: vpline; }
.vp-lines li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 10px;
  counter-increment: vpline;
}
.vp-lines li::before {
  content: counter(vpline);
  grid-row: 1 / span 2;
  padding-top: 2px;
  color: var(--text-3);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.vp-say { margin: 0; color: var(--text-1); font-size: var(--fs-base); line-height: 1.6; overflow-wrap: anywhere; }
.vp-onscreen { margin: 2px 0 0; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.vp-change { display: grid; gap: 10px; }
.vp-change h2 { margin-bottom: 2px; }
.vp-change textarea { width: 100%; }
.vp-change textarea:disabled { opacity: .6; cursor: not-allowed; }
.vp-flags { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.vp-flags li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--fs-base); line-height: 1.55; }
.vp-flags .ico { flex: none; margin-top: 4px; color: var(--warn); }
.vp-checks-slot:empty { display: none; }

.vp-details { margin-top: 56px; border-top: 1px solid var(--border); }
.vp-details > summary {
  min-height: 52px;
  padding: 15px 0;
  color: var(--text-2);
  font-weight: 600;
  cursor: pointer;
}
.vp-details > summary:hover, .vp-details[open] > summary { color: var(--text-1); }
.vp-details-body { padding-top: 4px; }
.vp-gone { max-width: 640px; padding: 24px 0; }

@media (max-width: 860px) {
  .vp-grid { grid-template-columns: minmax(0, 1fr); }
  .vp-frame { position: static; width: min(100%, 300px); margin-inline: auto; }
}

@media (max-width: 420px) {
  .vp-frame { width: min(100%, 260px); }
  .vp-act-row .btn { flex: 1 1 100%; }
  .vp-pager { width: 100%; justify-content: space-between; }
  .vp-side { gap: 28px; }
}

/* The words of an ad follow their own direction: an Arabic script reads from the right on an English screen. */
html[dir] .vp .vp-say[dir="auto"],
html[dir] .vp .vp-tile-line[dir="auto"] { text-align: start; }

/* ── Director localized review, playable defect cards, disagreements and repair receipts ── */
.vp-quality {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.vp-quality-head {
  font-size: var(--fs-base);
  line-height: 1.4;
  color: var(--text-1);
}
.vp-quality-pass {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--text-1);
  font-size: var(--fs-sm);
}
.vp-quality-pass .ico { color: var(--ok); flex: none; }

.vp-defect-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.vp-defect-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface-1);
  min-width: 0;
}
.vp-defect-card.is-critical {
  border-color: color-mix(in srgb, var(--bad) 42%, var(--border));
}
.vp-defect-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.vp-defect-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--accent-text);
  background: var(--accent-soft);
  color: var(--text-1);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.vp-defect-jump:hover {
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--accent) 28%);
}
.vp-defect-jump.small {
  min-height: 32px;
  padding: 0 9px;
  font-size: var(--fs-xs);
  margin-inline-start: 6px;
}
.vp-defect-jump .ico { color: var(--accent-text); flex: none; }
.vp-defect-text {
  margin: 0;
  color: var(--text-1);
  font-size: var(--fs-sm);
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-align: start;
}
.vp-defect-fix {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-align: start;
}
.vp-defect-audio {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}
.vp-seek-status { margin: 0; min-height: 0; }
.vp-seek-status:empty { display: none; }

.vp-disagreement {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--border));
  background: var(--surface-1);
  min-width: 0;
}
.vp-disagreement-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-size: var(--fs-sm);
}
.vp-disagreement-head .ico { color: var(--warn); flex: none; }
.vp-disagreement-note {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
  line-height: 1.5;
  text-align: start;
}
.vp-obs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.vp-obs-card {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-width: 0;
}
.vp-obs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: var(--fs-xs);
}
.vp-obs-text {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-xs);
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-align: start;
}

.vp-repair-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.vp-repair-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface-1);
  min-width: 0;
}
.vp-repair-card.is-accepted {
  border-color: color-mix(in srgb, var(--ok) 40%, var(--border));
}
.vp-repair-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-sm);
}
.vp-repair-dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.vp-repair-dl > div {
  display: grid;
  gap: 2px;
}
.vp-repair-dl dt {
  color: var(--text-3);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.vp-repair-dl dd {
  margin: 0;
  color: var(--text-1);
  font-size: var(--fs-sm);
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-align: start;
}

.vp-quality-notes {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.vp-quality-notes > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.vp-quality-list {
  margin: 6px 0 0;
  padding-inline-start: 20px;
  display: grid;
  gap: 6px;
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.vp-quality-list li {
  overflow-wrap: anywhere;
  text-align: start;
}

.vp-shot-checks,
.vp-speech-checks {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.vp-shot-checks > strong,
.vp-speech-checks > strong {
  display: block;
  font-size: var(--fs-base);
  line-height: 1.4;
}
.vp-shot-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.vp-shot-checks details > summary,
.vp-speech-checks details > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.vp-speech-item {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border);
  background: var(--surface-1);
}

@media (max-width: 520px) {
  .vp-obs-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Wave 2: Frame stack, A/B compare toggle & interactive beat timeline ───── */
.vp-frame-stack {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.vp-ab-compare {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface-1);
}
.vp-ab-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}
.vp-ab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: calc(var(--r-ctl) - 2px);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.vp-ab-btn.is-on {
  background: var(--surface-1);
  border-color: var(--accent-text);
  color: var(--text-1);
}
.vp-ab-btn .ico { color: var(--ok); width: 14px; height: 14px; }
.vp-ab-score { color: var(--text-3); font-size: 0.72rem; }
.vp-ab-btn.is-on .vp-ab-score { color: var(--accent-text); }
.vp-ab-note {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--text-2);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.vp-timeline {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface-1);
  min-width: 0;
}
.vp-tl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.vp-tl-now { color: var(--text-1); font-weight: 600; }
.vp-tl-track {
  display: flex;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.vp-tl-seg {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 0 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color .15s, background .15s, color .15s;
}
.vp-tl-seg:hover { border-color: var(--border-strong); color: var(--text-1); }
.vp-tl-seg.is-active {
  border-color: var(--accent-text);
  color: var(--text-1);
}
.vp-tl-fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 0%;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  pointer-events: none;
  transition: width .12s linear;
}
.vp-tl-seg-num { position: relative; z-index: 1; }
.vp-tl-dot {
  position: relative;
  z-index: 1;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.vp-tl-dot.is-warn { background: var(--warn); }
.vp-tl-dot.is-ok { background: var(--ok); }

/* ── Wave 2: Live Production Theater & Anti-Slop Guard Ticker ──────────────── */
.vp-theater {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface-1);
  min-width: 0;
}
.vp-theater-head {
  display: grid;
  gap: 2px;
}
.vp-theater-head strong { font-size: var(--fs-sm); color: var(--text-1); }
.vp-theater-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
}
.vp-theater-beat {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 6px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-width: 0;
}
.vp-theater-beat.is-live { border-color: var(--accent-text); }
.vp-theater-beat.is-verified,
.vp-theater-beat.is-done { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.vp-theater-beat.is-redoing,
.vp-theater-beat.is-retrying { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); }
.vp-theater-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-1);
  display: grid;
  place-items: center;
  color: var(--text-3);
}
.vp-theater-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-theater-thumb.is-live { background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface-1)); }
.vp-theater-beat-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
}
.vp-theater-num { color: var(--text-1); font-weight: 600; }
.vp-theater-tag {
  padding: 1px 5px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
}
.vp-theater-tag.is-ok {
  background: color-mix(in srgb, var(--ok) 15%, var(--surface-1));
  color: var(--ok);
}
.vp-theater-tag.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.vp-theater-state {
  font-size: 0.7rem;
  color: var(--text-2);
  line-height: 1.25;
}
.vp-theater-line {
  font-size: 0.7rem;
  color: var(--text-3);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  max-height: calc(2 * 1.35em);
}

.vp-slop-ticker {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface-1);
  min-width: 0;
}
.vp-slop-ticker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.vp-slop-ticker-head strong { font-size: var(--fs-base); color: var(--text-1); }
.vp-slop-ticker-head .chip { margin-inline-start: auto; }
.vp-guard-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  flex: 0 0 auto;
  animation: vpGuardPulse 1.8s ease-in-out infinite;
}
@keyframes vpGuardPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(0.85); }
}
.vp-ticker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.vp-ticker-item {
  display: grid;
  gap: 2px;
  padding-inline-start: 10px;
  border-inline-start: 2px solid var(--border-strong);
  font-size: var(--fs-xs);
}
.vp-ticker-item.is-caught { border-inline-start-color: var(--warn); }
.vp-ticker-item.is-redone { border-inline-start-color: var(--accent-text); }
.vp-ticker-item.is-verified { border-inline-start-color: var(--ok); }
.vp-ticker-text { color: var(--text-1); line-height: 1.45; }
.vp-ticker-detail { color: var(--text-2); line-height: 1.4; }

/* ── Wave 2: 5-Axis Quality & Anti-Slop Scorecard ─────────────────────────── */
.vp-scorecard {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: var(--surface-1);
  min-width: 0;
}
.vp-scorecard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.vp-scorecard-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vp-scorecard-title-row strong { font-size: var(--fs-base); color: var(--text-1); }
.vp-scorecard-overall {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-1);
}
.vp-scorecard-overall.is-ok {
  background: color-mix(in srgb, var(--ok) 15%, var(--surface-2));
  color: var(--ok);
}
.vp-scorecard-overall.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.vp-scorecard-overall.is-bad {
  background: var(--bad-soft);
  color: var(--bad);
}
.vp-scorecard-summary {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.5;
}
.vp-scorecard-axes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.vp-axis {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
  min-width: 0;
}
.vp-axis-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  font-size: var(--fs-xs);
}
.vp-axis-label {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vp-axis-val { color: var(--text-1); font-weight: 700; }
.vp-axis-bar {
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}
.vp-axis-bar > i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent-text);
}
.vp-axis.is-ok .vp-axis-bar > i { background: var(--ok); }
.vp-axis.is-warn .vp-axis-bar > i { background: var(--warn); }
.vp-axis.is-bad .vp-axis-bar > i { background: var(--bad); }

.vp-slop-audit {
  border-top: 1px solid var(--border);
  padding-top: 6px;
}
.vp-slop-audit > summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}
.vp-audit-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.vp-audit-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.vp-audit-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.vp-audit-text { margin: 0; font-size: var(--fs-sm); color: var(--text-1); line-height: 1.45; }
.vp-audit-detail { margin: 0; font-size: var(--fs-xs); color: var(--text-2); line-height: 1.45; }

/* ── Wave 2: Interactive plain script rows & One-Tap Shot Redo modal ──────── */
.vp-lines li {
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
}
.vp-lines li.is-playing {
  background: var(--surface-1);
  border-color: color-mix(in srgb, var(--accent-text) 55%, var(--border));
}
.vp-line-body { display: grid; gap: 4px; min-width: 0; }
.vp-line-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.vp-line-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.vp-line-time:hover { border-color: var(--accent-text); color: var(--text-1); }
.vp-line-time .ico { width: 12px; height: 12px; color: var(--accent-text); }
.vp-line-redo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-inline-start: auto;
  transition: border-color .15s, color .15s, background .15s;
}
.vp-line-redo:hover:not([disabled]) {
  border-color: var(--accent-text);
  background: var(--accent-soft);
  color: var(--accent-text);
}
.vp-line-redo[disabled] { opacity: .5; cursor: not-allowed; }
.vp-line-redo .ico { width: 13px; height: 13px; }
.vp-line-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  font-size: var(--fs-xs);
  font-weight: 600;
}
.vp-line-status.is-running { color: var(--accent-text); }
.vp-line-status.is-ok { color: var(--ok); }
.vp-line-status.is-bad { color: var(--bad); }

.vp-redo-preview {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  background: var(--surface-2);
}
.vp-redo-thumb {
  width: 40px;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--surface-1);
}
.vp-redo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-redo-context { display: grid; gap: 3px; min-width: 0; }
.vp-redo-context p { margin: 0; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.4; }
.vp-redo-options { display: grid; gap: 6px; }
.vp-redo-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  border: 1.5px solid var(--border);
  background: var(--surface-1);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.vp-redo-opt.on {
  border-color: var(--accent-text);
  background: var(--accent-soft);
}
.vp-redo-opt-main { display: grid; gap: 2px; min-width: 0; }
.vp-redo-opt-main strong { font-size: var(--fs-sm); color: var(--text-1); }
.vp-redo-opt-price {
  flex: 0 0 auto;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-1);
}
.vp-redo-note { width: 100%; min-height: 56px; }
.vp-redo-body { gap: 10px; padding-bottom: 12px; }
.vp-redo-balance { margin: 0; }
.vp-redo-warn:empty { display: none; }
.vp-theater-strip { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
.beat-act-btn.is-redo {
  border-color: var(--accent-text);
  background: var(--accent-soft);
  color: var(--text-1);
}

@media (max-width: 860px) {
  .vp-frame { width: 100%; max-width: 420px; }
  .vp-frame .vp-screen { max-width: 300px; margin-inline: auto; }
}
@media (max-width: 560px) {
  .vp-scorecard-axes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vp-theater-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .vp-frame { width: 100%; }
  .vp-frame .vp-screen { max-width: 260px; margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .vp-guard-pulse { animation: none; }
  .vp-tl-fill, .vp-ab-btn, .vp-tl-seg, .vp-lines li, .vp-line-redo, .vp-redo-opt { transition: none; }
}
