/* SalesVidGen — Premium step ⑤ (N1, UX audit 22 Oct): the preview player, the Director's check, "Ready to film?" and the
   compact scene cards on a phone. The player is a small screening monitor: the one place on the page that is black, the
   shape of the final video, the words on it in the film's own faces. The check reads like a director's note pinned beside
   it: amber rule while there is something to fix, green when there is not. App theme tokens everywhere else. */

/* ---------- Preview + check, side by side on a wide screen ---------- */
.bd-top { display: grid; gap: 1.6rem; align-items: start; }
.bd-top:has(.bd-preview-slot:empty):has(.bd-check-slot:empty) { display: none; }
.bd-preview-slot:empty, .bd-check-slot:empty { display: none; }
@media (min-width: 720px) {
  .bd-top.has-check { grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 2.2rem; }
}

/* ---------- The player ---------- */
.pw { display: grid; gap: 0.75rem; max-width: 320px; }
.pw-head { display: grid; gap: 0.2rem; }
.pw-title { margin: 0; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25; color: var(--text-primary); }
.pw-note { margin: 0; font-size: 0.82rem; line-height: 1.45; color: var(--text-secondary); font-variant-numeric: lining-nums; }
.pw-screen { display: grid; gap: 0.5rem; }
.pw-frame { position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: var(--radius-sm); background: #000; container-type: inline-size; isolation: isolate; }
.pw-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 40%; will-change: transform; }
.pw-ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; color: rgba(255, 255, 255, 0.6); font-size: 0.85rem; text-align: center;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 10px, transparent 10px 20px); }
.pw-where { position: absolute; top: 0.55rem; left: 0.55rem; z-index: 2; margin: 0; display: inline-flex; align-items: baseline; gap: 0.35rem;
  padding: 0.18rem 0.55rem; border-radius: 999px; background: rgba(0, 0, 0, 0.5); color: rgba(255, 255, 255, 0.92); font-size: 0.72rem; font-weight: 600; }
.pw-n { font-family: var(--font-display); font-size: 0.9rem; font-variant-numeric: lining-nums tabular-nums; }
.pw-cues { position: absolute; z-index: 2; left: 6%; right: 6%; top: 16%; display: grid; justify-items: center; gap: 0.2em; text-align: center; pointer-events: none; }
.pw-cue { color: #fff; line-height: 1.02; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.6); overflow-wrap: anywhere; animation: pwPop 0.28s var(--ease, ease-out) both; }
.pw-cue.is-hero { font-family: var(--font-body); font-weight: 800; font-size: 10cqw; text-transform: uppercase; letter-spacing: -0.01em; }
.pw-cue.is-hero.is-num { font-size: 14cqw; letter-spacing: -0.02em; }
.pw-cue.is-label, .pw-cue.is-serif { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 6.5cqw; }
.pw-line { position: absolute; z-index: 2; left: 7%; right: 7%; bottom: 8%; margin: 0; padding: 0.3em 0.55em; border-radius: 4px; text-align: center;
  background: rgba(0, 0, 0, 0.58); color: #fff; font-size: 4.6cqw; line-height: 1.35; overflow-wrap: anywhere; }
.pw-line.hidden { display: none; }
.pw-big { position: absolute; z-index: 3; inset: 0; margin: auto; width: 64px; height: 64px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.pw-big svg { width: 30px; height: 30px; margin-left: 3px; }
.pw-big:hover { background: rgba(0, 0, 0, 0.72); }
.pw-big:focus-visible, .pw-btn:focus-visible, .pw-seg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pw-big.hidden { display: none; }
@keyframes pwPop { from { opacity: 0; transform: translateY(6%) scale(0.96); } to { opacity: 1; transform: none; } }

/* Scene bar: one segment per scene, as long as the scene; tap to jump */
.pw-bar { display: flex; gap: 3px; align-items: center; height: 24px; }
.pw-seg { position: relative; flex: 1 1 0; min-width: 4px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.pw-seg::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--border-strong); }
.pw-fill { position: absolute; left: 0; top: 10px; height: 4px; width: 0; border-radius: 2px; background: var(--accent); }
.pw-seg.is-on::before { background: var(--text-tertiary); }
.pw-ctrl { display: flex; align-items: center; gap: 0.4rem; }
.pw-btn { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%;
  background: var(--bg-surface); color: var(--text-primary); cursor: pointer; }
.pw-btn svg { width: 20px; height: 20px; }
.pw-play { width: 52px; height: 52px; background: var(--accent); border-color: var(--accent); color: #fff; }
.pw-play svg { width: 24px; height: 24px; }
.pw-time { margin-left: auto; font-size: 0.82rem; color: var(--text-secondary); font-variant-numeric: lining-nums tabular-nums; }

/* ---------- Our director checked every scene ---------- */
.dc { display: grid; gap: 1rem; padding: 1.1rem 1.2rem 1.15rem; border: 1px solid var(--border-color); border-left: 3px solid var(--warning);
  border-radius: var(--radius-sm); background: var(--bg-surface); min-width: 0; }
.dc.is-ok { border-left-color: var(--success); gap: 0.4rem; }
.dc-ok { margin: 0; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.35; color: var(--success); }
.dc-head { display: grid; gap: 0.25rem; }
.dc-title { margin: 0; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.25; color: var(--text-primary); }
.dc-good { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--success); }
.dc-list, .dc-moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.dc-item { position: relative; display: grid; gap: 0.25rem; padding-left: 1.1rem; min-width: 0; }
.dc-item::before { content: ''; position: absolute; left: 0; top: 0.42rem; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--warning); }
.dc-what { margin: 0; font-weight: 700; font-size: 0.97rem; line-height: 1.4; color: var(--text-primary); }
.dc-why { margin: 0; font-size: 0.86rem; line-height: 1.45; color: var(--text-secondary); }
.dc-fixline { margin: 0; font-size: 0.88rem; font-weight: 600; line-height: 1.45; color: var(--accent); }
.dc-moves { gap: 0.55rem; margin-top: 0.15rem; }
.dc-move { display: grid; gap: 0.35rem; justify-items: start; font-size: 0.88rem; line-height: 1.45; color: var(--text-primary); }
.dc-scenes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.25rem; }
.dc-scene { display: inline-flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.dc-go, .dc-drop { min-height: 34px; padding: 0 0.7rem; border: 0; background: none; font: inherit; font-size: 0.82rem; color: var(--text-primary); cursor: pointer; font-variant-numeric: lining-nums; }
.dc-drop { padding: 0 0.6rem; border-left: 1px solid var(--border-strong); color: var(--text-secondary); font-size: 1rem; line-height: 1; }
.dc-go:hover, .dc-drop:hover { background: var(--accent-subtle); }
.dc-go:focus-visible, .dc-drop:focus-visible, .dc-again:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dc-small { margin: 0; font-size: 0.8rem; line-height: 1.45; color: var(--text-tertiary); }
.dc-again { padding: 0; border: 0; background: none; font: inherit; font-size: inherit; color: var(--text-secondary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Scene cards: the check's mark, the details behind "More" ---------- */
.bd-noted { position: absolute; top: 0.45rem; right: 0.45rem; z-index: 2; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--warning); color: #1a1405; font-size: 0.7rem; font-weight: 700; }
.bd-more { margin-top: 0.35rem; }
.bd-more summary { cursor: pointer; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); padding: 0.2rem 0; min-height: 32px; display: flex; align-items: center; }
.bd-more summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bd-more[open] { display: grid; gap: 0.3rem; }
.bd-change-open[aria-expanded="true"] { border-color: var(--accent); }

/* ---------- Ready to film? ---------- */
.as-back { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; background: rgba(0, 0, 0, 0.6); }
.as-sheet { width: min(100%, 31rem); display: grid; gap: 1rem; padding: 1.5rem 1.4rem 1.3rem; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: linear-gradient(var(--bg-elevated), var(--bg-elevated)), var(--bg-base); box-shadow: var(--shadow-lg); }
.as-title:focus { outline: none; }
.as-title { margin: 0; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.2; color: var(--text-primary); }
.as-text { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--text-primary); font-variant-numeric: lining-nums; }
.as-text strong { font-weight: 800; }
.as-small { margin: 0.5rem 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); }
.as-warn { margin: 0.6rem 0 0; padding-left: 0.6rem; border-left: 3px solid var(--warning); font-size: 0.88rem; line-height: 1.45; color: var(--text-primary); }
.as-btns { display: grid; gap: 0.5rem; }
.as-btns .btn { width: 100%; justify-content: center; min-height: 46px; }

/* ---------- Phone (390 px): player on top, the check under it, compact cards ---------- */
@media (max-width: 719px) {
  .pw { max-width: min(100%, calc(52vh * 9 / 16 + 2px)); justify-self: center; width: 100%; }
  .bd-top { gap: 1.2rem; }
  .bd-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .bd-tile { display: grid; grid-template-columns: min(28vw, 104px) minmax(0, 1fr); gap: 0.75rem; align-items: start;
    padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-color); }
  .bd-tile .bd-text { gap: 0.2rem; }
  .bd-tile .bd-change-open { margin-top: 0.3rem; }
  .bd-more { margin-top: 0.1rem; }
  .bd-more summary { min-height: 28px; }
  .bd-tile .bd-pic { width: 100%; }
  .bd-tile .bd-change { grid-column: 1 / -1; }
  .bd-tile .bd-k { display: none; }
  .bd-tile .bd-more .bd-k { display: block; }
  .bd-num { font-size: 1.3rem; }
  .bd-says { font-size: 0.92rem; }
  .bd-noted { top: auto; bottom: 0.35rem; right: 0.35rem; left: 0.35rem; text-align: center; }
  .as-back { place-items: end center; padding: 0; }
  .as-sheet { width: 100%; border-radius: var(--radius) var(--radius) 0 0; padding-bottom: calc(1.3rem + env(safe-area-inset-bottom, 0px)); }
  .dc { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-cue { animation: none; }
  .pw-img { transform: none !important; }
}
