/* Studio: one room, one scene at a time, the director's conversation docked beside it.
   Tokens, buttons, frames, ledger and device come from app.css. */
.studio-body { height: 100dvh; overflow: hidden; display: grid; grid-template-rows: 72px minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); --dock: clamp(360px, 30vw, 460px); }
/* The conversation leads, on the left; the stage (screening, board, stills, site) takes the rest. */
.work { min-height: 0; min-width: 0; display: grid; grid-template-columns: var(--dock) minmax(0, 1fr); transition: grid-template-columns 0.6s var(--ease); }
.dock-off .work { grid-template-columns: 0px minmax(0, 1fr); }
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.86rem; }
.link-btn {
  background: none; border: 0; padding: 0.4rem 0; cursor: pointer; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem;
}
.link-btn:hover { color: var(--text); }
.eyebrow { font: 500 0.74rem/1 "Geist Mono", monospace; color: var(--accent); letter-spacing: 0.02em; text-transform: uppercase; }
.spin { animation: spin 1.2s linear infinite; display: inline-block; }

/* Top bar */
.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 0 clamp(16px, 3vw, 28px); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent); position: relative; z-index: 20;
}
.topbar-right { justify-self: end; display: flex; align-items: center; gap: 0.5rem; }
.balance {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.8rem; border-radius: 999px;
  border: 1px solid var(--line); font: 500 0.82rem/1 "Geist Mono", monospace; color: var(--text-2);
}
.balance.bump { animation: bump 0.9s var(--ease); }
@keyframes bump { 30% { border-color: var(--accent); color: var(--text); } }

/* Stepper: dots on a rail; the fill glides to the current step. */
.stepper { list-style: none; padding: 0; margin: 0; position: relative; display: flex; --w: clamp(64px, 7vw, 92px); }
.stepper li { width: var(--w); position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.stepper::before, .stepper-fill { content: ""; position: absolute; left: calc(var(--w) / 2); right: calc(var(--w) / 2); top: 14px; height: 1px; background: var(--line-2); }
.stepper-fill { background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 0.9s var(--ease); }
.stepper .dot {
  width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-size: 0.85rem;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--text-3);
  transition: background 0.5s var(--ease), color 0.5s, border-color 0.5s, transform 0.5s var(--ease);
}
.stepper .lbl { font-size: 0.72rem; color: var(--text-3); transition: color 0.4s; }
.stepper li.done .dot { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.stepper li.active .dot { background: var(--accent); color: var(--accent-ink); border-color: transparent; transform: scale(1.08); }
.stepper li.active .lbl, .stepper li.done .lbl { color: var(--text); }

/* The room */
.room { position: relative; overflow: hidden; overflow: clip; min-height: 0; } /* clip: focus can never scroll it */
.light {
  position: absolute; inset: -30%; pointer-events: none; opacity: 0.6;
  background:
    radial-gradient(38% 34% at 28% 32%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%),
    radial-gradient(34% 30% at 78% 72%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}
.bignum {
  position: absolute; right: clamp(8px, 4vw, 60px); bottom: 40px; pointer-events: none; user-select: none;
  font: 600 clamp(160px, 28vw, 420px)/0.8 Geist, sans-serif; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px var(--line-2);
}
.scene {
  position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column;
  padding: clamp(20px, 3.4vw, 48px) clamp(16px, 3.6vw, 56px) 24px;
}
.kinetic { font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }
.kinetic .w { display: inline-block; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 0.88rem; color: var(--text-2);
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip:active { transform: scale(0.97); }
.chip-quiet { border-style: dashed; }

/* 1. Pitch */
.pitch { margin: auto 0; width: min(100%, 980px); }
.pitch h1 { margin-top: 1rem; font-size: clamp(2.8rem, 7vw, 6.2rem); }
.lede { margin-top: 1rem; color: var(--text-2); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 52ch; }
.pitch-box {
  margin-top: 2rem; border: 1px solid var(--line-2); border-radius: var(--r); background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: blur(8px); transition: border-color 0.3s, transform 0.4s var(--ease), box-shadow 0.4s;
}
.pitch-box:focus-within { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 6px var(--accent-soft); }
.pitch-box.dragging { border-color: var(--accent); transform: scale(1.005); }
.pitch-box textarea {
  display: block; width: 100%; resize: none; border: 0; outline: none; background: transparent;
  padding: 1.2rem 1.3rem 0.4rem; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.5; min-height: 7.5em;
}
.pitch-box textarea::placeholder { color: var(--text-3); }
.pitch-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; padding: 0.8rem 0.9rem 0.9rem 1.1rem; }
.refs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ref { position: relative; width: 58px; height: 58px; border-radius: var(--r-media); overflow: hidden; border: 1px solid var(--line-2); }
.ref img { width: 100%; height: 100%; object-fit: cover; }
.ref button {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 99px; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 0.7rem; background: rgb(0 0 0 / 0.65); color: #fff; opacity: 0; transition: opacity 0.2s;
}
.ref:hover button, .ref button:focus-visible { opacity: 1; }
.ref-add {
  height: 58px; padding: 0 1rem; border-radius: var(--r-media); border: 1px dashed var(--line-2); cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-2); font-size: 0.88rem; transition: border-color 0.2s, color 0.2s;
}
.ref-add i { font-size: 1.3rem; color: var(--accent); }
.ref-add:hover { border-color: var(--accent); color: var(--text); }
.starters { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.reading { margin: auto 0; width: min(100%, 900px); }
.reading-text { margin-top: 1.2rem; font-size: clamp(1.4rem, 2.8vw, 2.3rem); line-height: 1.35; letter-spacing: -0.02em; }
.reading-text span { color: var(--text-3); transition: color 0.5s; }
.reading-text span.seen { color: var(--text-2); }
.reading-text span.lit { color: var(--accent); transition: none; }

/* 2. The brief, while the director writes the shots */
.brief { margin: auto 0; width: min(100%, 980px); }
.confirm-title { margin-top: 1rem; font-size: clamp(2.2rem, 4.6vw, 4.2rem); max-width: 16ch; }
.brief-rows { margin-top: 2rem; display: grid; gap: 0; max-width: 680px; }
.brief-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 1rem; padding: 0.85rem 0; border-top: 1px solid var(--line); }
.brief-row dt { font: 500 0.74rem/1.9 "Geist Mono", monospace; color: var(--text-3); }
.brief-row dd { margin: 0; }
.c-refs { margin-top: 1.2rem; display: flex; gap: 8px; flex-wrap: wrap; }
.c-refs img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-media); border: 1px solid var(--line-2); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.seg-wrap { flex-wrap: wrap; border-radius: 18px; }
.seg button {
  flex: 1 1 auto; border: 0; background: transparent; cursor: pointer; padding: 0.45rem 0.7rem; border-radius: 999px;
  font-size: 0.82rem; color: var(--text-2); white-space: nowrap; transition: background 0.25s var(--ease), color 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
.directing { margin-top: 2.4rem; }
.ghost-strip { margin-top: 1rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 1fr); gap: 12px; overflow: hidden; }
.ghost-strip span {
  aspect-ratio: 16 / 9; border-radius: var(--r-media); border: 1px solid var(--line-2);
  background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--accent) 16%, transparent) 50%, transparent 70%) var(--surface);
  background-size: 250% 100%; animation: shimmer 2.2s infinite linear; animation-delay: calc(var(--i) * 0.18s);
}

/* 4. Board */
.board-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.board-top h2 { margin-top: 0.6rem; font-size: clamp(1.7rem, 2.8vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.board-top p:not(.eyebrow) { color: var(--text-2); margin-top: 0.3rem; max-width: 60ch; }
.strip {
  flex: none; margin-block: auto; display: grid; grid-auto-flow: column; gap: 14px; overflow-x: auto; padding-bottom: 0.6rem;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.strip .frame { scroll-snap-align: start; position: relative; }
.frame .media.working {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  border: 1px dashed var(--accent); background: color-mix(in srgb, var(--bg-2) 60%, transparent); color: var(--accent);
}
.frame .media.working i { font-size: 1.3rem; animation: spin 2.4s linear infinite; }
.frame .media.working span { font: 500 0.7rem/1 "Geist Mono", monospace; }

/* A planned frame is a shot waiting to be exposed, not an empty box: a storyboard plate with a
   viewfinder, a frame number and a quiet "when you pay" note — the same framing language as the stage. */
.frame .media.planned {
  display: grid; place-items: center; overflow: hidden; isolation: isolate; color: var(--text-3);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line-2));
  background:
    radial-gradient(130% 92% at 50% -8%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 62%),
    linear-gradient(180deg, var(--surface-2), #0b0b0d);
}
.frame .media.planned::before {   /* viewfinder corner brackets */
  content: ""; position: absolute; inset: 11px; z-index: 1; pointer-events: none; opacity: 0.55;
  background:
    linear-gradient(var(--accent), var(--accent)) left top / 15px 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left top / 1.5px 15px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 15px 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right top / 1.5px 15px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 15px 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) left bottom / 1.5px 15px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 15px 1.5px no-repeat,
    linear-gradient(var(--accent), var(--accent)) right bottom / 1.5px 15px no-repeat;
}
.frame .media.planned::after {    /* a slow sheen, so the plate reads as alive */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent 42%, color-mix(in srgb, var(--accent) 9%, transparent) 50%, transparent 58%);
  background-size: 260% 100%; animation: shimmer 3.6s infinite linear;
}
.plate-no { z-index: 0; font: 600 clamp(2.2rem, 6vw, 3.8rem)/1 "Geist Mono", monospace; letter-spacing: -0.04em;
  color: color-mix(in srgb, var(--text-3) 26%, transparent); }
.plate-move { z-index: 0; font-size: 1.9rem; color: color-mix(in srgb, var(--accent) 55%, var(--text-3)); }
.plate-badge {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 4px 9px; border-radius: 999px;
  font: 500 0.66rem/1 "Geist Mono", monospace; letter-spacing: 0.02em; color: var(--text-2);
  background: color-mix(in srgb, var(--bg) 72%, transparent); border: 1px solid var(--line-2); backdrop-filter: blur(4px);
}
.plate-badge i { color: var(--accent); font-size: 0.85rem; }
@media (prefers-reduced-motion: reduce) { .frame .media.planned::after { animation: none; } }
.redo { position: absolute; inset: auto 8px 8px auto; opacity: 0; transition: opacity 0.25s; }
.frame:hover .redo, .redo:focus-within { opacity: 1; }
@media (hover: none) { .redo { opacity: 1; } }
.redo-btn {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.7rem; border-radius: 999px; border: 0; cursor: pointer;
  background: rgb(10 10 12 / 0.72); color: #f3f1ec; font-size: 0.8rem; backdrop-filter: blur(6px);
}
.redo-panel {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5; padding: 0.9rem; border-radius: var(--r-media);
  background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--shadow); display: grid; gap: 0.6rem;
}
.redo-panel label { font-size: 0.8rem; color: var(--text-2); }
.redo-panel textarea {
  width: 100%; resize: vertical; padding: 0.6rem 0.7rem; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--bg-2); font-size: 0.85rem; line-height: 1.45; outline: none;
}
.redo-actions { display: flex; justify-content: space-between; align-items: center; }
/* 5. Deliver */
.deliver { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: clamp(16px, 2.4vw, 32px); }
.deliver-view { display: flex; flex-direction: column; min-height: 0; gap: 0.8rem; }
.deliver .device { flex: 1; aspect-ratio: auto; min-height: 260px; }
.deliver-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.edit-hint { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--text-2); }
.edit-hint i { color: var(--accent); }
.deliver-actions { display: flex; gap: 0.5rem; }
.words {
  min-height: 0; overflow-y: auto; padding: 1.1rem 1.1rem 1.4rem; border-radius: var(--r); border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--surface) 92%, transparent); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.words-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.words-head h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; }
.words-tools { display: inline-flex; align-items: center; gap: 0.8rem; }
.undo-btn { font-size: 0.8rem; padding: 0; }
.save-state { font: 500 0.72rem/1 "Geist Mono", monospace; color: var(--text-3); }
.save-state.ok { color: var(--ok); }
.save-state.warn { color: var(--warn); }
.beat-card { padding: 0.7rem 0.7rem 0.6rem; margin-bottom: 0.6rem; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 50%, transparent); }
.beat-card .wf { margin-bottom: 0.5rem; }
.beat-ctl { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.beat-ctl > .wf-label { width: 100%; margin: 0; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 14px); gap: 3px; padding: 5px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); flex: none; }
.pos-grid button { width: 14px; height: 14px; border-radius: 3px; border: 0; padding: 0; cursor: pointer; background: var(--line-2); transition: background 0.2s, transform 0.2s var(--ease); }
.pos-grid button:hover { background: var(--text-3); }
.pos-grid button[aria-checked="true"] { background: var(--accent); transform: scale(1.1); }
.seg-mini { padding: 3px; flex-wrap: wrap; }
.seg-mini button { padding: 0.3rem 0.5rem; font-size: 0.74rem; }
.why { margin-top: 0.45rem; font-size: 0.74rem; color: var(--text-3); line-height: 1.4; }
.voice { margin-top: 0.8rem; font-size: 0.8rem; color: var(--text-3); font-style: italic; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.word-fields { margin-top: 0.6rem; transition: opacity 0.3s; }
.word-fields.busy { opacity: 0.35; pointer-events: none; }
.wf-group { padding-top: 1rem; }
.wf-group h3 { font: 500 0.72rem/1 "Geist Mono", monospace; color: var(--accent); text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 0.5rem; }
.wf { display: block; margin-bottom: 0.55rem; }
.wf-label { display: block; font-size: 0.74rem; color: var(--text-3); margin-bottom: 0.2rem; }
.wf-label[data-hint]::after { content: " · " attr(data-hint); }
.wf input, .wf textarea {
  width: 100%; padding: 0.5rem 0.65rem; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2);
  outline: none; resize: none; line-height: 1.45; font-size: 0.9rem; transition: border-color 0.2s; overflow: hidden;
}
.wf input:focus, .wf textarea:focus { border-color: var(--accent); }

/* Tour */
.tour { position: fixed; inset: 0; z-index: 100; }
.tour-spot {
  position: absolute; border-radius: 18px; pointer-events: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 0 200vmax rgb(8 8 10 / 0.66);
  transition: top 0.6s var(--ease), left 0.6s var(--ease), width 0.6s var(--ease), height 0.6s var(--ease);
}
.tour-card {
  position: absolute; width: min(360px, calc(100vw - 32px)); padding: 1.3rem 1.3rem 1rem;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow);
  transition: top 0.6s var(--ease), left 0.6s var(--ease);
}
.tour-count { font: 500 0.72rem/1 "Geist Mono", monospace; color: var(--accent); margin-bottom: 0.6rem; }
.tour-card h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; }
.tour-card p { margin-top: 0.45rem; color: var(--text-2); font-size: 0.93rem; }
.tour-nav { margin-top: 1.1rem; display: flex; justify-content: space-between; align-items: center; }
.tour-btns { display: flex; gap: 0.5rem; }

@media (prefers-reduced-motion: no-preference) {
  .light { animation: drift 22s ease-in-out infinite alternate; }
  @keyframes drift { to { transform: translate3d(6%, -4%, 0) rotate(8deg); } }
}
@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-card, .stepper-fill { transition: none; }
}

@media (max-width: 1100px) {
  .stepper .lbl { display: none; }
  .hide-sm { display: none; }
  .deliver { grid-template-columns: 1fr; }
  .deliver .device { min-height: 60dvh; flex: none; }
  .words { overflow: visible; }
}
@media (max-width: 900px) {
  .studio-body { height: auto; min-height: 100dvh; overflow: auto; grid-template-rows: auto minmax(calc(100dvh - 120px), 1fr); }
  .topbar { grid-template-columns: 1fr auto; padding-top: 10px; padding-bottom: 10px; }
  .stepper { grid-column: 1 / -1; order: 3; justify-content: space-between; margin: 8px 0 4px; --w: 56px; }
  .balance span { display: none; }
  .scene { position: relative; inset: auto; min-height: calc(100dvh - 176px); overflow: visible; }
  .room { overflow: visible; }
  .brief-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .pitch-foot { flex-direction: column; align-items: stretch; }
  .pitch-foot .btn { justify-content: center; }
  .bignum { display: none; }
}

/* Payment, inside the decision card */
.pay-wallet { display: inline-flex; align-items: center; gap: 0.4rem; font: 500 0.8rem/1 "Geist Mono", monospace; color: var(--text-2); }
.pay-wallet:empty { display: none; }
.pay-manual { display: grid; gap: 0.6rem; font-size: 0.88rem; color: var(--text-2); }
.pay-manual b { color: var(--text); }
.pm-addr { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.pm-addr code { font: 0.8rem/1.4 "Geist Mono", monospace; padding: 0.4rem 0.6rem; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); word-break: break-all; }
.pm-tx { display: flex; gap: 0.5rem; }
.pm-tx input { flex: 1; min-width: 0; padding: 0.55rem 0.8rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); outline: none; font: 0.82rem/1 "Geist Mono", monospace; }
.pm-tx input:focus { border-color: var(--accent); }

/* Camera moves on the delivered film, each refilmable */
.moves { position: relative; display: grid; gap: 0.5rem; }
.moves-head { display: flex; justify-content: space-between; align-items: baseline; font: 500 0.72rem/1 "Geist Mono", monospace; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.03em; }
.moves-left { text-transform: none; letter-spacing: 0; }
.moves-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(120px, 170px); gap: 10px; overflow-x: auto; scrollbar-width: thin; }
.move-tile { position: relative; display: grid; gap: 0.35rem; }
.move-tile video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-media); background: var(--bg-2); border: 1px solid var(--line); }
.move-tile.drifts video { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.move-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; font-size: 0.78rem; }
.move-meta b { font-weight: 500; }
.drift { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--warn); font-size: 0.72rem; }
.refilm-btn { font-size: 0.8rem; padding: 0; justify-self: start; }
.refilm-btn:disabled, .redo-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.refilm-panel { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 5; display: grid; gap: 0.5rem; padding: 0.9rem; border-radius: var(--r-media); border: 1px solid var(--accent); background: var(--surface); box-shadow: var(--shadow); }
.refilm-panel label { font-size: 0.82rem; color: var(--text-2); }
.refilm-panel textarea { width: 100%; resize: vertical; padding: 0.6rem 0.7rem; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 0.85rem; line-height: 1.45; outline: none; }

/* The director's own score on each still */
.score {
  position: absolute; left: 10px; top: 10px; z-index: 2; padding: 0.22rem 0.55rem; border-radius: 999px;
  font: 500 0.72rem/1.2 "Geist Mono", monospace; background: rgb(0 0 0 / 0.55); color: #fff; backdrop-filter: blur(6px);
}
.score.low { background: color-mix(in srgb, var(--warn) 85%, black); color: #1a1206; }


/* The director: a conversation docked beside the work */
.dock {
  position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid var(--line); background: var(--bg-2); order: -1;
}
.dock-off .dock { visibility: hidden; }
.dock-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); flex: none; }
.avatar {
  position: relative; width: 34px; height: 34px; flex: none; border-radius: 99px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1rem;
}
.avatar::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 99px;
  background: var(--ok); border: 2px solid var(--bg-2);
}
.dock.thinking .avatar::after { background: var(--accent); }
.dock-who { display: grid; min-width: 0; line-height: 1.25; }
.dock-who strong { font-size: 0.92rem; font-weight: 600; }
.dock-who span { font-size: 0.76rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock.thinking .dock-who span { color: var(--accent); }
.icon-btn {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 99px; border: 0; cursor: pointer;
  background: transparent; color: var(--text-2); font-size: 1rem;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.dock-toggle { display: none; }

.dock-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.thread { list-style: none; margin: 0; padding: 1.1rem 1rem 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; min-height: 100%; justify-content: flex-end; }
.thread > li { font-size: 0.92rem; line-height: 1.55; overflow-wrap: anywhere; }
.thread .turn { margin-top: 0.7rem; }
.thread .stamp { align-self: center; margin: 0.6rem 0 0.2rem; font: 500 0.68rem/1 "Geist Mono", monospace; color: var(--text-3); }
.thread .you { align-self: flex-end; max-width: 86%; margin-top: 0.7rem; }
.thread .you .bubble {
  padding: 0.6rem 0.9rem; border-radius: 18px 18px 6px 18px; background: var(--surface-2); border: 1px solid var(--line);
  white-space: pre-wrap;
}
.thread .you.pending .bubble { opacity: 0.6; }
.thread .agent { align-self: flex-start; max-width: 100%; color: var(--text); white-space: pre-wrap; }
.thread .agent.turn::before, .thread .steps.turn::before {
  content: "Director"; display: block; margin-bottom: 0.2rem; font: 500 0.68rem/1.4 "Geist Mono", monospace; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.thread .steps.turn::before { margin-bottom: 0.35rem; }
.thread .steps ol {
  list-style: none; margin: 0; padding: 0.15rem 0 0.15rem 0.85rem; border-left: 1px solid var(--line-2); display: grid; gap: 0.3rem;
}
.thread .step { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.8rem; line-height: 1.45; color: var(--text-3); }
.thread .step > i { color: var(--ok); flex: none; font-size: 0.85rem; position: relative; top: 1px; }
.thread .step.bad > i { color: var(--warn); }
.thread .step details { min-width: 0; }
.thread .step summary { cursor: pointer; list-style: none; }
.thread .step summary::-webkit-details-marker { display: none; }
.thread .step summary::after { content: " ›"; color: var(--text-3); }
.thread .step details[open] summary::after { content: " ⌄"; }
.thread .step summary:hover, .thread .step details[open] summary { color: var(--text-2); }
.thread .step .detail {
  margin-top: 0.35rem; padding: 0.55rem 0.7rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
  color: var(--text-2); white-space: pre-wrap; font-size: 0.78rem;
}
.thread .empty { margin: auto 0.4rem 0; color: var(--text-3); font-size: 0.86rem; text-align: center; text-wrap: balance; }
.thread .live { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; }
.thread .typing { padding: 0.75rem 0.9rem; border-radius: 18px 18px 18px 6px; background: var(--surface-2); gap: 0.28rem; }
.thread .typing span { width: 6px; height: 6px; border-radius: 9px; background: var(--text-3); }
.thread .working {
  padding: 0.5rem 0.85rem; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  font-size: 0.82rem; color: var(--text);
}
.thread .working i { color: var(--accent); }
.thread .working em { font: normal 500 0.72rem/1 "Geist Mono", monospace; color: var(--text-3); }
.thread .working em:empty { display: none; }

.jump {
  position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.85rem; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 0.8rem; box-shadow: var(--shadow);
}

.dock-foot { flex: none; padding: 0.4rem 0.9rem 0.9rem; display: grid; gap: 0.5rem; }
.suggest { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.suggest:empty { display: none; }
.suggest .chip { flex: none; padding: 0.38rem 0.75rem; font-size: 0.8rem; }
.composer {
  display: flex; align-items: flex-end; gap: 0.4rem; padding: 0.4rem 0.4rem 0.4rem 0.95rem; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line-2); transition: border-color 0.2s, box-shadow 0.3s;
}
.composer:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
.composer textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; padding: 0.42rem 0;
  font-size: 0.92rem; line-height: 1.45; max-height: 160px;
}
.composer textarea::placeholder { color: var(--text-3); }
.composer-send {
  width: 34px; height: 34px; flex: none; border-radius: 99px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 0.95rem; transition: opacity 0.2s, transform 0.2s var(--ease);
}
.composer-send:disabled { opacity: 0.3; cursor: default; }
.composer-send:not(:disabled):active { transform: scale(0.92); }
body.agent-working #pitch-go { opacity: 0.5; pointer-events: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: min(520px, calc(100vw - 32px));
  padding: 0.7rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2);
  color: var(--text); font-size: 0.88rem; box-shadow: var(--shadow);
}
.toast.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }

/* The decision in front of you: the price, or the stills */
.decide {
  display: grid; gap: 0.55rem; padding: 0.95rem 1rem 0.85rem; border-radius: 18px;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line-2));
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.decide > div { display: grid; gap: 0.55rem; }
.decide-top { display: flex !important; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.decide-kicker { font: 500 0.7rem/1.35 "Geist Mono", monospace; color: var(--accent); text-transform: uppercase; letter-spacing: 0.03em; }
.decide-price { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.decide-body { font-size: 0.82rem; line-height: 1.45; color: var(--text-2); }
.decide .btn-block { justify-content: center; }
.decide-alt { justify-self: center; font-size: 0.8rem; padding: 0; }
.decide-note { font-size: 0.78rem; line-height: 1.4; color: var(--text-2); }
.decide-note:empty { display: none; }
.decide-note.warn { color: var(--warn); }
.pay-manual { font-size: 0.82rem; }

@media (prefers-reduced-motion: no-preference) {
  .thread .typing span { animation: dots 1.2s infinite; }
  .thread .typing span:nth-child(2) { animation-delay: 0.15s; }
  .thread .typing span:nth-child(3) { animation-delay: 0.3s; }
  @keyframes dots { 40% { transform: translateY(-3px); opacity: 1; } 0%, 80%, 100% { opacity: 0.4; } }
  .dock.thinking .avatar::after { animation: pulse 1.1s ease-in-out infinite; }
  @keyframes pulse { 50% { transform: scale(0.7); } }
}

/* Small screens: the conversation is a sheet; closed it is just the composer and the director's status. */
@media (max-width: 900px) {
  .work { display: block; }
  .studio-body { overflow-x: clip; }
  .room { overflow-x: clip; }
  .room { padding-bottom: calc(var(--sheet, 150px) + 16px); }
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-height: 100dvh; border-left: 0;
    border-top: 1px solid var(--line-2); border-radius: 20px 20px 0 0; box-shadow: 0 -20px 60px rgb(0 0 0 / 0.35);
    transition: height 0.5s var(--ease);
  }
  .dock-off .dock { display: none; }
  .dock-head { cursor: pointer; padding: 0.7rem 0.9rem; }
  .dock-toggle { display: grid; margin-left: auto; }
  .dock-toggle i { transition: transform 0.4s var(--ease); }
  .dock.open { height: 88dvh; }
  .dock.open .dock-toggle i { transform: rotate(180deg); }
  .dock:not(.open) .dock-scroll, .dock:not(.open) .suggest, .dock:not(.open) .jump { display: none; }
}

/* Your films: every film this browser made */
.films { position: relative; }
.films-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(340px, calc(100vw - 24px));
  max-height: min(70vh, 520px); overflow-y: auto; padding: 0.5rem; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.films-head { padding: 0.45rem 0.6rem 0.5rem; font: 500 0.7rem/1 "Geist Mono", monospace; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.03em; }
.films-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.film-pick {
  width: 100%; display: grid; gap: 0.15rem; text-align: left; padding: 0.6rem 0.7rem; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); cursor: pointer;
}
.film-pick:hover { background: var(--surface-2); }
.film-pick strong { font-size: 0.9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film-pick span { font-size: 0.76rem; color: var(--text-3); }
.film-pick.current { background: var(--accent-soft); }
.film-pick.current span::after { content: " · open now"; color: var(--accent); }
.films-none { padding: 0.6rem 0.7rem 0.8rem; font-size: 0.84rem; color: var(--text-3); }

/* ---------------- the director's stage: its live work, on the canvas ---------------- */
.stage {
  position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(20px, 3.4vw, 48px) clamp(16px, 3.6vw, 56px);
  background: radial-gradient(60% 50% at 30% 40%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--bg);
}
.stage-inner { width: min(100%, 820px); margin: auto 0; }
.stage-act { display: inline-flex; align-items: center; gap: 0.5rem; }
.stage-pulse { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-soft); animation: stage-pulse 1.6s var(--ease) infinite; }
@keyframes stage-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.stage-say { margin-top: 1rem; font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.12; min-height: 1.2em; max-width: 20ch; }
.stage-meta { margin-top: 1rem; font: 500 0.82rem/1 "Geist Mono", monospace; color: var(--text-3); }
.stage-trail { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.stage-trail li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; color: var(--text-2); }
.stage-trail li i { font-size: 1rem; }
.stage-trail li.done i { color: var(--ok, #7fcf96); }
.stage-trail li.now { color: var(--text); }
.stage-trail li.now i { color: var(--accent); }
.stage-nudge { margin-top: 1.6rem; display: flex; align-items: center; gap: 0.8rem; font-size: 0.86rem; color: var(--text-3); }

/* A slow light leak drifts across the set, so the stage is never quite still. */
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(38% 42% at 32% 34%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 72%);
  animation: stage-drift 15s ease-in-out infinite alternate;
}
@keyframes stage-drift { from { transform: translate(-4%, -2%) scale(1); } to { transform: translate(6%, 4%) scale(1.12); } }

/* Sound toggle, tucked in the corner. */
.stage-sound { position: absolute; top: clamp(16px, 2.4vw, 28px); right: clamp(16px, 3vw, 40px); z-index: 3; }
.stage-sound.off { opacity: 0.55; }

/* The user's reference, treated like film while the director works it. */
body.has-film .stage { flex-direction: row; align-items: center; gap: clamp(20px, 3vw, 48px); }
body.has-film .stage-inner { width: min(46%, 560px); margin: 0; }
.stage-film {
  position: relative; flex: 1 1 0; align-self: center; aspect-ratio: 4 / 5; max-height: 74vh;
  border-radius: 14px; overflow: hidden; background: #0b0b0d;
  box-shadow: 0 30px 80px -42px rgba(0, 0, 0, 0.8), inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}
.film-frame { position: absolute; inset: 0; }
.film-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity 1.2s var(--ease); transform-origin: 50% 40%;
  animation: kenburns 20s ease-in-out infinite alternate;
}
.film-img.on { opacity: 1; }
@keyframes kenburns { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.15) translate(-2.5%, -2.5%); } }
.film-vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(72% 72% at 50% 44%, transparent 54%, rgba(0, 0, 0, 0.55)); }
.film-grain {
  position: absolute; inset: -60%; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain 1.1s steps(3) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-6%, 4%); } 66% { transform: translate(4%, -5%); } 100% { transform: translate(-3%, 3%); } }
/* 'reading' — a scan line sweeps the image, which sits half-desaturated until it is understood. */
.film-scan { position: absolute; left: 0; right: 0; top: 0; height: 32%; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--accent) 34%, transparent) 50%, transparent); }
.stage-film.act-brief .film-img { filter: grayscale(0.45) contrast(1.05); }
.stage-film.act-brief .film-scan { opacity: 1; animation: film-scan 2.8s var(--ease) infinite; }
@keyframes film-scan { 0% { transform: translateY(-120%); } 100% { transform: translateY(360%); } }
/* 'framing' — a rule-of-thirds grid and a focus reticle breathe as the camera finds the shot. */
.film-guides { position: absolute; inset: 9%; pointer-events: none; opacity: 0; transform-origin: 50% 45%;
  transition: opacity 0.5s var(--ease); border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 2px; }
.stage-film.act-board .film-guides { opacity: 0.8; animation: reframe 5.5s var(--ease) infinite alternate; }
@keyframes reframe { from { transform: scale(1.07); } to { transform: scale(0.93); } }
.film-guides::before { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, transparent calc(33.33% - 0.5px), color-mix(in srgb, var(--accent) 45%, transparent) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to right, transparent calc(66.66% - 0.5px), color-mix(in srgb, var(--accent) 45%, transparent) 66.66%, transparent calc(66.66% + 0.5px)),
    linear-gradient(to bottom, transparent calc(33.33% - 0.5px), color-mix(in srgb, var(--accent) 45%, transparent) 33.33%, transparent calc(33.33% + 0.5px)),
    linear-gradient(to bottom, transparent calc(66.66% - 0.5px), color-mix(in srgb, var(--accent) 45%, transparent) 66.66%, transparent calc(66.66% + 0.5px)); }
.film-guides::after { content: ""; position: absolute; left: 50%; top: 45%; width: 20px; height: 20px; transform: translate(-50%, -50%); opacity: 0.85;
  background: linear-gradient(var(--accent), var(--accent)) center / 1.5px 100% no-repeat, linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat; }
.film-tag { position: absolute; left: 12px; bottom: 11px; z-index: 2; font: 500 0.7rem/1 "Geist Mono", monospace; letter-spacing: 0.08em;
  text-transform: uppercase; color: #fff; padding: 4px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); }
.film-tag:empty { display: none; }
@media (max-width: 760px) {
  body.has-film .stage { flex-direction: column; justify-content: center; }
  body.has-film .stage-inner { width: 100%; }
  .stage-film { width: 100%; flex: 0 0 auto; aspect-ratio: 16 / 10; max-height: 36vh; }
}

.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* While the stage is up, the dock stays available but the pitch box is gone (handled in JS). */
@media (prefers-reduced-motion: reduce) {
  .stage-pulse, .spin, .stage::after, .film-img, .film-grain, .film-scan, .film-guides { animation: none; }
}

/* A delivered film whose files were lost in an update */
.device-lost { display: none; }
.deliver.lost .device { display: grid; place-items: center; border: 1px dashed var(--line-2); background: var(--bg-2); }
.deliver.lost .device iframe, .deliver.lost .deliver-actions, .deliver.lost .moves, .deliver.lost .edit-hint { display: none; }
.deliver.lost .device-lost { display: grid; justify-items: center; gap: 0.6rem; max-width: 30ch; text-align: center; color: var(--text-2); font-size: 0.95rem; }
.deliver.lost .device-lost i { font-size: 1.6rem; color: var(--text-3); }

/* ---------------- The screening ---------------- */
.screening {
  position: absolute; inset: 0; z-index: 4; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(18px, 2.6vw, 36px) clamp(20px, 4vw, 64px) clamp(18px, 2.6vw, 32px);
  background: var(--bg); overflow: hidden;
}
.sc-top { display: flex; align-items: center; gap: 1.2rem; }
.sc-progress { flex: 1; display: flex; gap: 6px; }
.sc-progress span { flex: 1; height: 2px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.sc-progress span i { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(0); }
.sc-progress span.done i { transform: scaleX(1); }
.sc-skip {
  border: 0; background: none; cursor: pointer; padding: 0.35rem 0.2rem; color: var(--text-3);
  font-size: 0.82rem; letter-spacing: 0.01em; transition: color 0.2s;
}
.sc-skip:hover { color: var(--text); }
/* The plate is sized from the screening area itself, with a fixed reserve below it for the caption, so the
   words can never land on the picture whatever the window: plate + caption always fit the container. */
.sc-viewport {
  position: relative; min-height: 0; perspective: 1800px; margin: clamp(14px, 2vw, 26px) 0;
  container-type: size;
}
.sc-frame {  /* cq units resolve against .sc-viewport only on its children, so the sizes live here */
  --cap: clamp(7.5rem, 22cqh, 10rem); --pw: min(100cqw, calc((100cqh - var(--cap)) * 16 / 9));
  position: absolute; inset: 0; margin: 0; display: grid; grid-template-columns: var(--pw);
  grid-template-rows: auto var(--cap); align-content: center; justify-content: center; justify-items: start;
  opacity: 0; will-change: transform, opacity; transform-origin: 50% 42%; overflow: hidden;
}
.sc-frame[hidden] { display: none; }  /* the class sets display: grid, which would otherwise beat [hidden] */
.sc-plate {
  position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 14px;
  overflow: hidden; background: linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.05) inset, 0 40px 120px -30px rgb(0 0 0 / 0.55);
}
.sc-plate img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: blur(14px);
  transform: scale(1.04); transition: opacity 1.4s var(--ease), filter 1.6s var(--ease), transform 1.8s var(--ease);
}
.sc-plate.has-sketch img { opacity: 1; filter: none; transform: none; }
.sc-shot {
  position: absolute; left: clamp(18px, 2.4vw, 32px); bottom: clamp(10px, 1.6vw, 22px);
  font: 600 clamp(72px, 10vw, 150px)/0.8 Geist, sans-serif; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px var(--line-2); transition: opacity 0.8s var(--ease);
}
.sc-plate.has-sketch .sc-shot { opacity: 0; }
.sc-frame figcaption { display: grid; align-content: start; gap: 0.5rem; padding-top: clamp(14px, 3cqh, 24px); max-width: min(100%, 48ch); }
.sc-label { font: 500 0.76rem/1 "Geist Mono", monospace; color: var(--text-3); letter-spacing: 0.02em; }
.sc-text {
  font-size: clamp(1.05rem, min(2.1vw, 4.6cqh), 1.85rem); font-weight: 600; letter-spacing: -0.022em; line-height: 1.22;
  text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-text .w { display: inline-block; }
.sc-move {
  justify-self: start; display: inline-flex; align-items: center; gap: 0.55rem; max-width: min(100%, 70ch);
  padding: 0.5rem 0.9rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 0.84rem; color: var(--text-2); opacity: 0; transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}
.sc-move.on { opacity: 1; transform: none; }
.sc-move i { color: var(--accent); font-size: 1rem; flex: none; }
.sc-move span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-end {
  position: absolute; inset: 0; display: grid; align-content: center; justify-items: start; gap: 1rem;
  padding: 0 clamp(20px, 4vw, 64px);
}
.sc-title { font-size: clamp(3rem, 7vw, 6rem); font-weight: 600; letter-spacing: -0.045em; line-height: 0.98; }
.sc-title .w { display: inline-block; }
.sc-tagline { font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--text-2); max-width: 44ch; }
.sc-ask { margin-top: 1.2rem; font-size: 1rem; color: var(--text); }
.screening-on .stage { display: none; }

/* Board tiles: the pencil sketch stands in until the real still is shot */
.frame .media.planned.sketched { border: 0; background: var(--surface); }
.frame .media.planned.sketched img { width: 100%; height: 100%; object-fit: cover; }
.board-top { align-items: flex-end; }
#replay-btn { flex: none; }

@media (max-width: 900px) {
  .dock { order: 0; }
  .screening { position: fixed; inset: 0 0 var(--sheet, 150px) 0; z-index: 30; padding: 16px; }
  .sc-text { font-size: clamp(1rem, 4.4cqh, 1.2rem); }
}
@media (prefers-reduced-motion: reduce) {
  .sc-plate img, .sc-move, .sc-shot { transition: opacity 0.6s linear; transform: none; filter: none; }
}

/* While the sketches are drawn: one quiet line and a hairline that fills as they land */
.sc-prep { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1.1rem; }
.sc-prep-line { font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: 500; letter-spacing: -0.015em; color: var(--text-2); }
.sc-prep-line span { font: 500 0.82rem/1 "Geist Mono", monospace; color: var(--text-3); margin-left: 0.6rem; }
.sc-prep-track { width: min(280px, 60vw); height: 2px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.sc-prep-track span { display: block; height: 100%; background: var(--text); transform-origin: left; transform: scaleX(0.04);
  transition: transform 0.9s var(--ease); }
