:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-subtle: #f3f4f6;
  --surface-hover: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --ink: #111827;
  --ink-2: #4b5563;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --primary: #111827;
  --primary-hover: #1f2937;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --ok-border: #a7f3d0;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --warn-border: #fde68a;
  --err: #dc2626;
  --err-soft: #fef2f2;
  --err-border: #fecaca;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-sm: 0 6px 20px rgba(17, 24, 39, 0.06);
  --shadow-lg: 0 20px 50px rgba(17, 24, 39, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- Brand & Common Chrome ---------------- */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.brand-title { font-weight: 700; font-size: 15px; color: var(--ink); line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 6px 13px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}
.pill-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); color: var(--ink); }
.pill-divider { color: var(--border-strong); }
.mini-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.mini-dot.warn { background: var(--warn); }

/* ---------------- View A: Pure-White Project Hub ---------------- */
.hub-view { min-height: 100vh; display: flex; flex-direction: column; }

.hub-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
}
.hub-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hub-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.hub-main {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 34px 28px 60px;
}
.hub-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hub-hero h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.hub-subtitle { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }

.hub-status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 22px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}
.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.hub-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.hub-card-top { display: flex; gap: 13px; align-items: flex-start; }
.hub-card-thumb {
  width: 62px;
  height: 82px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  flex-shrink: 0;
}
.hub-card-info { flex: 1; min-width: 0; }
.hub-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.hub-card-meta { font-size: 12px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }

.hub-progress-row { display: flex; flex-direction: column; gap: 6px; }
.hub-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
}
.hub-progress-track {
  height: 6px;
  border-radius: 99px;
  background: var(--surface-subtle);
  overflow: hidden;
}
.hub-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--primary);
  transition: width 0.25s ease;
}
.hub-progress-fill.complete { background: var(--ok); }

.hub-card-actions { display: flex; gap: 8px; margin-top: auto; }
.hub-card-actions button { flex: 1; }

/* ---------------- View B: 7-Step Forced Guided Wizard ---------------- */
.wizard-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.wizard-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 28px 14px;
}

.wizard-top-row {
  max-width: 1040px;
  margin: 0 auto 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.wizard-top-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.v-sep { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; }
.wiz-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wiz-title-wrap h1 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 2px 9px;
  border-radius: 99px;
  white-space: nowrap;
}
.wizard-top-right { display: flex; align-items: center; gap: 10px; }

.mode-switch {
  display: inline-flex;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.mode-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.mode-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }

/* 7-Step Linear Progress Stepper with Hard Locks */
.wiz-stepper {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
@media (max-width: 760px) { .wiz-stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .wiz-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.wiz-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
  min-width: 0;
}
.wiz-step:hover:not(.locked) { border-color: var(--border-strong); background: var(--surface-hover); }
.wiz-step.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.wiz-step.done {
  border-color: var(--ok-border);
  background: var(--ok-soft);
  color: var(--ok);
}
.wiz-step.locked {
  background: var(--surface-subtle);
  border-color: var(--border);
  color: var(--muted-2);
  cursor: not-allowed;
  opacity: 0.78;
}

.wiz-step-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wiz-step.active .wiz-step-badge { background: rgba(255, 255, 255, 0.22); color: #ffffff; }
.wiz-step.done .wiz-step-badge { background: var(--ok); color: #ffffff; }
.wiz-step.locked .wiz-step-badge { background: transparent; font-size: 11px; }

.wiz-step-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Focused Stage Container */
.wizard-body {
  flex: 1;
  padding: 26px 28px 104px;
}
.wizard-container {
  max-width: 980px;
  margin: 0 auto;
}

.step-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.step-intro-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.015em; }
.step-intro-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.step-intro-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.card-hint { font-size: 12.5px; color: var(--muted); margin: -6px 0 14px; }

/* ---------------- Step 1: House Upload & Script Draft ---------------- */
.house-hero-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) { .house-hero-card { grid-template-columns: 1fr; } }
.house-hero-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

/* ---------------- Step 2: MJ Cast & Expression Picker ---------------- */
.mj-role-block {
  margin-bottom: 14px;
  padding: 15px 16px;
  background: var(--bg);
  border-radius: 11px;
  border: 1px solid var(--border);
}
.mj-role-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mj-cands {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 820px) { .mj-cands { grid-template-columns: repeat(2, 1fr); } }
.mj-cand {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.14s, box-shadow 0.14s;
}
.mj-cand:hover { border-color: var(--border-strong); }
.mj-cand.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14); }
.mj-cand img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--surface-subtle); }
.mj-cand-bar {
  padding: 7px 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  border-top: 1px solid var(--border);
}
.mj-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--accent);
  color: #ffffff;
}

/* Unified Turnaround <-> 2x2 Expression Binding Card */
.cast-bind-card {
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.cast-bind-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cast-bind-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cast-bind-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}
@media (max-width: 760px) {
  .cast-bind-pair { grid-template-columns: 1fr; }
  .cast-bind-link { justify-self: center; }
}
.cast-bind-media {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.cast-bind-media > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  background: var(--surface-subtle);
}
.cast-bind-media-cap {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}
.cast-bind-face-chip {
  position: absolute;
  left: 8px;
  bottom: 42px;
  width: 46px;
  height: 60px;
  border-radius: 7px;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  background: var(--surface);
  cursor: zoom-in;
}
.cast-bind-face-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cast-bind-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-2);
  white-space: nowrap;
}
.cast-bind-link.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}
.cast-bind-link.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}
.cast-bind-empty {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface-subtle);
  padding: 12px;
  text-align: center;
}
.cast-bind-stale-banner {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.anchors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.anchor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.anchor-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  cursor: zoom-in;
  background: var(--surface-subtle);
  display: block;
}
.anchor-card .cap {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--border);
}
.anchor-tag {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-subtle);
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.anchor-tag.ref-only { background: var(--accent-soft); color: var(--accent); }

/* ---------------- Step 3: Text-Only Script & Sequence Cards ---------------- */
.script-list { display: flex; flex-direction: column; gap: 14px; }
.script-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}
.shot-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}
.shot-head-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shot-head-actions { display: flex; align-items: center; gap: 6px; }
.shot-order-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.shot-badge {
  background: var(--surface-subtle);
  color: var(--ink-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.dryrun-drawer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
}
.dryrun-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.dryrun-item {
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* ---------------- Step 4 & 5: Sub-Tab Shot Focus Pills ---------------- */
.subshot-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.subshot-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.subshot-tab:hover { border-color: var(--border-strong); color: var(--ink); }
.subshot-tab.active { background: var(--primary); border-color: var(--primary); color: #ffffff; }
.subshot-tab .dot-ok { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.subshot-tab .dot-warn { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }

.triptych-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 720px) { .triptych-row { grid-template-columns: 1fr; } }
.frame-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.frame-slot img, .frame-slot .frame-empty {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  background: var(--surface-subtle);
}
.frame-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted-2);
  cursor: default;
}
.frame-slot-foot {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  border-top: 1px solid var(--border);
}

/* Step 5 Video Focused Card */
.video-focus-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 820px) { .video-focus-grid { grid-template-columns: 1fr; } }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.video-wrap {
  width: 100%;
  max-height: 440px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  justify-content: center;
}
.video-wrap video { max-height: 440px; width: auto; max-width: 100%; aspect-ratio: 9/16; display: block; }
.qa-strip { width: 100%; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--border); display: block; }

/* ---------------- Step 6: Sequence, Live 9:16 Top Banner & Synthesis ---------------- */
.stage6-layout {
  display: grid;
  grid-template-columns: 272px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) { .stage6-layout { grid-template-columns: 1fr; } }

.preview-sticky { position: sticky; top: 116px; }
.phone-preview-shell {
  max-width: 285px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 9px;
  box-shadow: var(--shadow-sm);
}
.phone-preview-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}
.phone-preview-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone-preview-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: 12.5px;
}

.live-poster-banner {
  position: absolute;
  top: 7.5%;
  left: 5%;
  right: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 3;
}
.live-poster-line1 {
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
  -webkit-text-stroke: 3.5px rgba(17, 24, 39, 0.92);
  paint-order: stroke fill;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.42);
  -webkit-font-smoothing: antialiased;
  word-break: break-word;
}
.live-poster-line2 {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  color: #ffe600;
  font-weight: 900;
  font-size: 25px;
  line-height: 1.2;
  text-align: center;
  -webkit-text-stroke: 3.8px rgba(17, 24, 39, 0.92);
  paint-order: stroke fill;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.42);
  -webkit-font-smoothing: antialiased;
  word-break: break-word;
}
.live-bottom-sub {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 7%;
  text-align: center;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.38;
  padding: 2px 6px;
  border-radius: 6px;
  paint-order: stroke fill;
  -webkit-font-smoothing: antialiased;
}
.preview-caption-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 4px 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.sequence-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 10px; }
.seq-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seq-chip.is-first { background: var(--accent-soft); border-color: var(--accent-border); }
.seq-chip-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.seq-idx { font-size: 11px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.seq-chip-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.seq-chip-btns { display: flex; gap: 6px; justify-content: space-between; }

.accordion-clean {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.accordion-clean summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-clean summary::-webkit-details-marker { display: none; }
.accordion-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.hook-segs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.hook-seg-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.hook-seg-card.active { border-color: var(--accent); background: var(--accent-soft); }

/* ---------------- Step 7: Screening Room ---------------- */
.screening-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 740px) { .screening-layout { grid-template-columns: 1fr; } }
.phone-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
}
.phone-frame video { width: 100%; aspect-ratio: 9/16; border-radius: 18px; display: block; background: #111827; }
.master-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.bio-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.bio-card pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------------- Sticky Bottom Forced Footer & Log Drawer ---------------- */
.log-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 68px;
  z-index: 25;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.08);
  display: none;
  flex-direction: column;
}
.log-drawer.open { display: flex; }
.log-header {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 28px;
}
.log-status-left { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; }
.log-actions { display: flex; gap: 8px; align-items: center; }
.log-body {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 28px 14px;
  max-height: 190px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.wizard-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68px;
  z-index: 30;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
}
.wizard-footer-inner {
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.wiz-foot-left, .wiz-foot-right { display: flex; align-items: center; gap: 10px; }
.wiz-gate-hint {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: center;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wiz-gate-hint.ok { color: var(--ok); }
.wiz-gate-hint.warn { color: var(--warn); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); display: inline-block; }
.status-dot.running { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.2s infinite; }
.status-dot.done { background: var(--ok); }
.status-dot.error { background: var(--err); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---------------- Buttons, Pills, Inputs & Modals ---------------- */
.btn-primary {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.14s, opacity 0.14s;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.38; cursor: not-allowed; }
.btn-lg { padding: 11px 18px; font-size: 13.5px; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-secondary:hover:not(:disabled) { background: var(--surface-subtle); border-color: var(--ink-2); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-subtle); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-chip {
  background: var(--surface-subtle);
  color: var(--ink-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.btn-chip:hover { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }

.btn-danger {
  background: var(--err-soft);
  color: var(--err);
  border: 1px solid var(--err-border);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-xs { padding: 4px 9px; font-size: 11.5px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }
.btn-full { width: 100%; }

.meta-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--surface-subtle);
  color: var(--ink-2);
}
.meta-pill.ok { background: var(--ok-soft); color: var(--ok); }
.meta-pill.accent { background: var(--accent-soft); color: var(--accent); }
.meta-pill.warn { background: var(--warn-soft); color: var(--warn); }

input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 13px;
  outline: none;
  width: 100%;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
textarea { resize: vertical; line-height: 1.55; }

.form-row { display: grid; gap: 12px; }
.two-col { grid-template-columns: 1fr 1fr; }
.four-col { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .two-col, .four-col { grid-template-columns: 1fr 1fr; } }

.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field-label-inline { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; flex-wrap: wrap; }
.preset-btns { display: flex; gap: 6px; flex-wrap: wrap; }

.drop-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 24px 16px;
  background: var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}
.drop-zone:hover {
  border-color: var(--ink-2);
  background: var(--surface-hover);
}
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.drop-file-input { display: none; }
.drop-zone-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  margin-bottom: 8px;
}
.drop-zone.drag-over .drop-zone-icon {
  color: var(--accent);
  border-color: var(--accent-border);
}
.drop-zone-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.drop-zone-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
.drop-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.upload-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; justify-content: center; }
.upload-thumb-wrap { position: relative; display: inline-block; }
.upload-previews img { width: 72px; height: 96px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); display: block; }
.upload-thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}
.upload-thumb-remove:hover { background: var(--err); color: #ffffff; border-color: var(--err); }

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.checkbox-row input { width: auto; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.modal-header h2 { margin: 0; font-size: 16.5px; color: var(--ink); }
.modal-subtitle { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.modal-close {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--ink-2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; }

.lightbox-inner {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  background: var(--surface);
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.lightbox-inner img { max-width: 86vw; max-height: 80vh; border-radius: 10px; display: block; }
.lightbox-close { position: absolute; top: -12px; right: -12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.lightbox-caption { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--ink); }

.summary-callout { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.env-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.env-badge { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--surface-subtle); color: var(--muted); }
.env-badge.ok { color: var(--ok); background: var(--ok-soft); }
.env-badge.warn { color: var(--warn); background: var(--warn-soft); }
.env-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.env-detail-item { background: var(--bg); border: 1px solid var(--border); padding: 9px 11px; border-radius: 8px; font-size: 12px; }
.ledger-list { display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow-y: auto; }
.ledger-item { display: flex; justify-content: space-between; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 12px; }

.toast {
  position: fixed;
  bottom: 84px;
  right: 28px;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  z-index: 99;
  box-shadow: var(--shadow-lg);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.inline-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------- Step 1A/1B: Custom Drama Director Intake & 3-Pick-1 Proposals ---------------- */
.mood-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mood-chip {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}
.mood-chip:hover { border-color: var(--ink); color: var(--ink); }
.mood-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.vision-audit-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}
.highlight-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.highlight-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.proposal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 860px) { .proposal-grid { grid-template-columns: 1fr; } }

.proposal-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  box-shadow: var(--shadow-xs);
}
.proposal-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.proposal-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14), var(--shadow-sm);
}

.proposal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.proposal-title { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.proposal-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.pkg-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  width: fit-content;
}
.pkg-badge.none { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-border); }
.pkg-badge.top_banner { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.pkg-badge.minimal_tag { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }

.banner-mini-preview {
  background: #1f2937;
  border-radius: 9px;
  padding: 9px 10px;
  text-align: center;
}
.banner-mini-l1 { color: #ffffff; font-weight: 800; font-size: 13px; }
.banner-mini-l2 {
  display: inline-block;
  margin-top: 2px;
  background: transparent;
  color: #ffe600;
  border: none;
  border-radius: 0;
  padding: 0;
  font-weight: 900;
  font-size: 14px;
}

.proposal-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
}
.proposal-block strong { color: var(--ink); font-size: 11.5px; display: block; margin-bottom: 2px; }

.check-row-mini { display: flex; flex-wrap: wrap; gap: 6px; }
.check-chip {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--ink-2);
}
.check-chip.ok { background: var(--ok-soft); color: var(--ok); }

.beat-preview-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 2px;
}
.beat-preview-item {
  font-size: 11.5px;
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.spinner-dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--ink);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Step 1B / Step 2: Casting Director ---------------- */
.cast-role-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cast-role-pill {
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-2);
}

.cast-design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.cast-design-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cast-design-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.cast-design-meta {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.cast-prompt-box {
  margin-top: 8px;
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  word-break: break-word;
}
.cast-feedback-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.cast-feedback-bar input {
  flex: 1 1 320px;
}
.cast-role-redesign {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.role-redesign-input {
  width: 100%;
  resize: vertical;
  min-height: 54px;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
}
.role-redesign-input:focus {
  outline: none;
  border-color: var(--accent);
}
.cast-role-redesign-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.cast-bind-redesign {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.bind-role-redesign-input {
  flex: 1 1 280px;
  font-size: 12.5px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
.bind-role-redesign-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------------- Step 3 / Step 6: Video Director Guardrails & Subtitle Packaging ---------------- */
.guardrail-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.guardrail-pill {
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok-border);
}

.director-brief-line,
.guardrail-note-line {
  font-size: 12px;
  line-height: 1.5;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-2);
  margin-bottom: 8px;
}
.guardrail-note-line {
  background: #fafafa;
  color: var(--muted);
}

.live-minimal-tag {
  position: absolute;
  top: 7%;
  left: 6%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
}
.live-minimal-tag.style-clean_white {
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  border-color: #e5e7eb;
}
.live-minimal-tag .tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
}

.live-poster-banner.theme-red_gold .live-poster-line2 {
  color: #ffe600;
}
.live-poster-banner.theme-ink_gold .live-poster-line2 {
  color: #ff9f0a;
}
.live-poster-banner.theme-white_clean .live-poster-line2 {
  color: #ff3b30;
}

.live-sub-hl {
  font-weight: 800;
  text-decoration: none;
}

.pkg-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.pkg-mode-tab {
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.pkg-mode-tab.active {
  background: var(--primary);
  color: #ffffff;
}

.sub-cue-preview-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

/* ---------------- Browser GPU Local Compositor (Zero Server Load) ---------------- */
.gpu-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--ok-border);
  background: var(--ok-soft);
  color: var(--ink);
  font-size: 13px;
}
.gpu-status-strip.fallback {
  border-color: var(--warn-border);
  background: var(--warn-soft);
}
.gpu-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.local-progress-card {
  background: var(--surface);
  border: 1.5px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.local-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}
.local-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: var(--surface-subtle);
  overflow: hidden;
}
.local-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #16a34a, #2563eb);
  border-radius: 99px;
  transition: width 0.14s ease;
}

/* ---------------- Custom Duration Controls & Step 6 Apply Bar ---------------- */
.duration-control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.duration-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.duration-num-input {
  width: 96px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}
.shot-sec-edit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px 7px;
  font-size: 12px;
  color: var(--ink-2);
}
.edit-shot-sec {
  width: 48px !important;
  padding: 2px 4px !important;
  font-size: 12px !important;
  font-weight: 700;
  text-align: center;
  border: none !important;
  background: transparent !important;
  font-variant-numeric: tabular-nums;
}
.edit-step6-sub {
  font-size: 12.5px !important;
  padding: 6px 9px !important;
}
.pkg-apply-bar {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pkg-apply-bar.dirty {
  background: var(--warn-soft);
  border-color: var(--warn-border);
}
.pkg-apply-hint {
  font-size: 12px;
  color: var(--ink-2);
  flex: 1 1 260px;
}
.pkg-apply-bar.dirty .pkg-apply-hint {
  color: var(--warn);
  font-weight: 600;
}
