/* CutLuma Studio (/studio). Paper, ink and one highlighter yellow (tokens in app.css); shots look like frames on a
   contact sheet, the chosen one circled in grease pencil. Logic: public/js/studio.js. */
body.studio { background: var(--bg); min-height: 100vh; }
.st-crumb { font: 600 13px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--border-2); }
.st-credit { font-size: 13px; color: var(--text-2); padding: 5px 10px; border: 1px solid var(--border-2); border-radius: 99px; background: var(--panel); white-space: nowrap; }
.st-credit b { font-family: var(--mono); color: var(--text); }
.st-credit a { margin-left: 6px; font-weight: 600; color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.st-eyebrow { font: 600 12px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }

/* ---------- start ---------- */
.st-start, .st-closed { max-width: 900px; margin: 0 auto; padding: 64px 20px 90px; }
.st-start h1, .st-closed h1 { font: 800 clamp(36px, 6.4vw, 68px) / 0.98 var(--display); letter-spacing: -0.03em; margin: 0 0 18px; text-wrap: balance; }
.st-start h1 mark { background: linear-gradient(transparent 58%, var(--accent) 58% 92%, transparent 92%); color: inherit; padding: 0 0.06em; }
.st-lede { font-size: 19px; line-height: 1.5; color: var(--text-2); max-width: 620px; margin: 0 0 30px; text-wrap: pretty; }
.st-idea { background: var(--field); border: 2px solid var(--pop-border); border-radius: var(--radius); box-shadow: var(--pop-shadow); }
.st-idea textarea { display: block; width: 100%; border: 0; outline: 0; resize: vertical; background: transparent; color: var(--text); font: 500 20px / 1.45 var(--font); padding: 20px 22px 8px; min-height: 108px; }
.st-idea textarea::placeholder { color: var(--muted); opacity: 0.8; }
.st-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px 14px; border-top: 1px dashed var(--border-2); }
.st-opts .st-vibe { width: auto; height: 36px; flex: none; }
.st-seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.st-seg button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 0; border-right: 1px solid var(--border-2); background: transparent; color: var(--text-2); font: 600 13px var(--font); cursor: pointer; }
.st-seg button:last-child { border-right: 0; }
.st-seg button:hover { background: var(--panel-2); }
.st-seg button.on { background: var(--fill); color: var(--bg); }
.st-seg.sm button { height: 28px; padding: 0 9px; font-size: 12px; }
.st-ar { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; }
.st-ar.tall { width: 8px; height: 13px; }
.st-ar.wide { width: 15px; height: 9px; }
.st-ideas { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.st-ideas button { border: 1px dashed var(--border-2); background: transparent; color: var(--text-2); font: 500 13px var(--font); padding: 7px 12px; border-radius: 99px; cursor: pointer; text-align: start; }
.st-ideas button:hover { border-style: solid; border-color: var(--text); color: var(--text); background: var(--accent-soft); }
.st-how { list-style: none; counter-reset: how; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 56px 0 0; padding: 0; border-top: 2px solid var(--text); }
.st-how li { counter-increment: how; padding: 16px 16px 4px 0; display: flex; flex-direction: column; gap: 6px; }
.st-how li::before { content: '0' counter(how); font: 600 12px var(--mono); color: var(--muted); }
.st-how b { font: 700 19px var(--display); }
.st-how span { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.st-how em { align-self: flex-start; font: 600 12px var(--mono); font-style: normal; background: var(--accent); color: var(--on-accent); padding: 3px 7px; border-radius: 3px; margin-top: 4px; }
#st-mine h2 { font: 700 22px var(--display); margin: 60px 0 14px; }
.st-mine { display: flex; flex-wrap: wrap; gap: 16px; }
.st-poster { width: 132px; display: flex; flex-direction: column; gap: 4px; color: var(--text); text-decoration: none; }
.st-poster.wide { width: 220px; }
.st-poster img, .st-poster > span { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--stage); border: 1px solid var(--text); border-radius: var(--radius-sm); transition: transform 0.15s, box-shadow 0.15s; }
.st-poster.wide img, .st-poster.wide > span { aspect-ratio: 16 / 9; }
.st-poster:hover img, .st-poster:hover > span { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--text); }
.st-poster b { font-size: 14px; line-height: 1.25; margin-top: 4px; }
.st-poster small { color: var(--muted); font: 500 11px var(--mono); }

/* ---------- waiting for the director ---------- */
.st-wait { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 20px; }
.st-wait h2 { font: 700 26px var(--display); margin: 8px 0 0; }
.st-wait ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font: 500 13px var(--mono); color: var(--muted); }
.st-wait li { opacity: 0; animation: st-step 0.5s forwards; }
@keyframes st-step { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.st-clap { width: 92px; height: 66px; position: relative; }
.st-clap i { position: absolute; left: 0; right: 0; border: 2px solid var(--text); border-radius: 3px; }
.st-clap i:first-child { top: 0; height: 16px; transform-origin: 4px 100%; background: repeating-linear-gradient(-55deg, var(--text) 0 9px, var(--accent) 9px 18px); animation: st-clap 1.1s ease-in-out infinite; }
.st-clap i:last-child { top: 18px; bottom: 0; background: var(--text); }
@keyframes st-clap { 0%, 55%, 100% { transform: rotate(0); } 25% { transform: rotate(-24deg); } }

/* ---------- film ---------- */
.st-film { --stage-w: clamp(230px, 23vw, 310px); --shot-w: 148px; padding: 18px 22px 120px; }
.st-film[data-aspect='16:9'] { --stage-w: clamp(340px, 38vw, 560px); --shot-w: 210px; }
.st-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 520px); gap: 6px 24px; align-items: end; margin-bottom: 18px; }
.st-title { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 800 30px / 1.1 var(--display); letter-spacing: -0.02em; padding: 2px 0; border-bottom: 2px solid transparent; }
.st-title:hover, .st-title:focus { border-bottom-color: var(--accent); }
.st-logline { margin: 2px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.4; }
.st-note { display: flex; gap: 8px; }
.st-note .input { flex: 1; }
.st-alts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-height: 0; }
.st-alts button { border: 1px dashed var(--border-2); background: transparent; color: var(--text-2); font: 500 13px var(--font); padding: 4px 10px; border-radius: 99px; cursor: pointer; }
.st-alts button:hover { border-style: solid; border-color: var(--text); background: var(--accent-soft); color: var(--text); }
.st-work { display: grid; grid-template-columns: var(--stage-w) minmax(0, 1fr) 330px; gap: 22px; align-items: start; }

/* the screen */
.st-stage { position: sticky; top: 74px; }
.st-screen { position: relative; aspect-ratio: 9 / 16; container-type: inline-size; background: var(--stage); border: 2px solid var(--pop-border); border-radius: var(--radius); box-shadow: var(--pop-shadow); overflow: hidden; cursor: pointer; }
.st-film[data-aspect='16:9'] .st-screen { aspect-ratio: 16 / 9; }
.st-img, .st-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.st-img { will-change: transform; }
.st-stage[data-kind='still'] .st-img, .st-stage[data-kind='video'] .st-vid { display: block; }
.st-blank { position: absolute; inset: 10px; display: none; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 22% 14px 14px; border: 1.5px dashed #55524a; border-radius: 4px; color: #b9b4a4; font-size: 13px; line-height: 1.45; text-align: center; }
.st-blank b { font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.st-stage[data-kind='blank'] .st-blank { display: flex; }
.st-cap { position: absolute; left: 7%; right: 7%; bottom: 13%; text-align: center; color: #fff; font: 800 7.4cqw / 1.12 var(--display); letter-spacing: -0.01em; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 0, 0, 0.6); opacity: 0; pointer-events: none; text-wrap: balance; }
.st-film[data-aspect='16:9'] .st-cap { font-size: 4.4cqw; bottom: 9%; }
.st-cap.in { animation: st-cap 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards; }
@keyframes st-cap { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
.st-tag { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 6px; background: rgba(17, 17, 15, 0.82); color: #e9e5d8; font: 600 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; }
.st-tag b { color: var(--accent); }
.st-tag i { font-style: normal; }
.st-big { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); border: 2px solid #17150f; box-shadow: 3px 3px 0 #17150f; cursor: pointer; transition: transform 0.12s, opacity 0.2s; }
.st-big svg { width: 26px; height: 26px; margin-left: 3px; }
.st-big:hover { transform: scale(1.06); }
.st-stage.playing .st-big { opacity: 0; pointer-events: none; }
.st-transport { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.st-track { position: relative; flex: 1; display: flex; gap: 3px; height: 16px; cursor: pointer; }
.st-track i { border-radius: 2px; border: 1.5px solid var(--text); min-width: 4px; }
.st-track i.blank { border-style: dashed; border-color: var(--border-2); }
.st-track i.still { background: var(--panel-3); }
.st-track i.filmed { background: var(--accent); }
.st-track u { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: var(--red); border-radius: 2px; pointer-events: none; }
.st-time { font: 500 11px var(--mono); color: var(--muted); white-space: nowrap; }

/* the contact sheet */
.st-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--shot-w), 1fr)); gap: 18px 16px; padding: 4px; }
.st-shot { position: relative; display: flex; flex-direction: column; padding: 11px 0 0; border: 0; border-radius: 4px; background: #17150f; color: #e9e5d8; text-align: start; cursor: pointer; font: inherit; overflow: visible; transition: transform 0.14s; }
.st-shot::before { content: ''; position: absolute; left: 6px; right: 6px; top: 3px; height: 6px; background-image: radial-gradient(circle, var(--bg) 2.3px, transparent 2.7px); background-size: 11px 6px; opacity: 0.85; }
.st-shot:hover { transform: translateY(-2px); }
.st-shot.on { outline: 3px solid var(--accent); outline-offset: 3px; transform: rotate(-0.7deg); box-shadow: 5px 5px 0 var(--text); z-index: 1; }
.st-edge { display: flex; align-items: baseline; gap: 6px; padding: 3px 8px 5px; font: 600 10px var(--mono); letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
.st-edge b { color: var(--accent); font-size: 12px; }
.st-edge i { font-style: normal; overflow: hidden; text-overflow: ellipsis; flex: 1; opacity: 0.85; }
.st-edge u { text-decoration: none; opacity: 0.6; }
.st-pic { position: relative; display: block; aspect-ratio: 9 / 16; margin: 0 5px; overflow: hidden; background: #24231e; border-radius: 2px; }
.st-film[data-aspect='16:9'] .st-pic { aspect-ratio: 16 / 9; }
.st-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-ghost { position: absolute; inset: 6px; display: flex; align-items: center; padding: 8px; border: 1px dashed #55524a; border-radius: 2px; color: #a8a393; font-size: 11px; line-height: 1.4; }
.st-hatch { position: absolute; inset: 0; display: none; background: repeating-linear-gradient(-45deg, rgba(255, 214, 10, 0.34) 0 10px, rgba(17, 17, 15, 0.3) 10px 20px); background-size: 200% 100%; animation: st-hatch 1.1s linear infinite; }
.st-shot.is-filming .st-hatch, .st-shot.is-drawing .st-hatch { display: block; }
.st-shot.is-drawing .st-hatch { background: linear-gradient(100deg, transparent 30%, rgba(255, 253, 248, 0.28) 50%, transparent 70%); background-size: 220% 100%; animation-duration: 1.3s; }
@keyframes st-hatch { to { background-position: -56.6px 0; } }
.st-capline { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; margin: 6px 5px 0; padding: 5px 7px; background: var(--field); color: var(--text); font: 600 12.5px / 1.3 var(--font); border-radius: 2px; }
.st-state { padding: 6px 8px 7px; font: 600 10px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: #a8a393; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-shot.planned .st-state, .st-shot.is-filmed .st-state { color: var(--accent); }
.st-shot.is-filmed .st-pic::after { content: '▶'; position: absolute; right: 6px; bottom: 6px; width: 22px; height: 22px; display: grid; place-items: center; font-size: 10px; background: var(--accent); color: #17150f; border-radius: 50%; border: 1.5px solid #17150f; }
.st-shot.changed { animation: st-changed 1.6s ease-out; }
@keyframes st-changed { 0%, 40% { box-shadow: 0 0 0 5px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* the inspector */
.st-side { position: sticky; top: 74px; max-height: calc(100vh - 176px); overflow: auto; display: flex; flex-direction: column; gap: 13px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.st-side-head { display: flex; align-items: center; gap: 8px; }
.st-side-head b { font: 700 17px var(--display); }
.st-side-head > span:not(.spacer) { font: 600 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.st-f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.st-f small { font-weight: 500; color: var(--muted); margin-left: 4px; }
.st-f textarea.input { resize: vertical; line-height: 1.4; font-size: 13px; }
.st-tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.st-tiers button, .st-takes button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 8px; border: 1px solid var(--border-2); border-radius: var(--radius-sm); background: var(--field); color: var(--text); cursor: pointer; font: inherit; min-width: 0; }
.st-tiers b, .st-takes b { font-size: 13px; }
.st-tiers em, .st-takes em { font: 500 11px var(--mono); font-style: normal; color: var(--muted); }
.st-tiers button:hover, .st-takes button:hover { border-color: var(--text); }
.st-tiers button.on, .st-takes button.on { background: var(--fill); border-color: var(--fill); color: var(--bg); }
.st-tiers button.on em, .st-takes button.on em { color: var(--accent); }
.st-hint { margin: 2px 0 0; font-weight: 500; font-size: 12px; line-height: 1.4; color: var(--muted); }
.st-takes { display: flex; flex-wrap: wrap; gap: 5px; }
.st-takes span { font-size: 11px; font-weight: 500; opacity: 0.8; }
.st-takes button.is-failed { opacity: 0.55; cursor: default; }
.st-takes button.is-running { border-style: dashed; cursor: progress; }
.st-hist { display: inline-flex; gap: 4px; }
.st-hist button { width: 26px; height: 30px; padding: 0; border: 1.5px solid var(--border-2); border-radius: 3px; overflow: hidden; background: var(--stage); cursor: pointer; }
.st-hist button.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent); }
.st-hist img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-redirect { display: flex; gap: 6px; }
.st-redirect .input { flex: 1; min-width: 0; }

/* the budget bar */
body.st-has-film .toasts { bottom: 104px; }
.st-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 12px 22px; background: var(--panel); border-top: 2px solid var(--text); }
.st-dial { flex: 1 1 380px; display: grid; grid-template-columns: auto minmax(120px, 1fr); align-items: center; gap: 4px 14px; }
.st-dial label { font: 600 12px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.st-dial label b { font-size: 18px; letter-spacing: 0; color: var(--text); margin-left: 6px; }
.st-dial.off { opacity: 0.55; }
.st-dial input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border: 1.5px solid var(--text); border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p), var(--field) var(--p)); outline-offset: 4px; cursor: pointer; }
.st-dial input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--fill); border: 3px solid var(--accent); box-shadow: 0 0 0 1.5px var(--text); cursor: grab; }
.st-dial input[type='range']::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--fill); border: 3px solid var(--accent); box-shadow: 0 0 0 1.5px var(--text); cursor: grab; }
.st-mix { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; min-height: 20px; }
.st-mix span { font: 600 10.5px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border: 1px solid var(--border-2); border-radius: 3px; color: var(--text-2); }
.st-mix .k-filmed { background: var(--accent); border-color: var(--text); color: var(--on-accent); }
.st-mix .k-cinema, .st-mix .k-omni, .st-mix .k-lite { background: var(--fill); border-color: var(--fill); color: var(--bg); }
.st-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.st-acts .btn { height: 42px; padding: 0 18px; font-weight: 600; }

/* ---------- credit, packs ---------- */
.st-credit button { margin-left: 6px; padding: 0; border: 0; background: none; font: 600 13px var(--font); color: var(--text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.st-pay-why { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: var(--text-2); }
.st-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 14px; }
.st-packs button { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; text-align: start; background: var(--field); border: 2px solid var(--border-2); border-radius: var(--radius); color: var(--text); font: inherit; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s; }
.st-packs button:hover, .st-packs button.pick { border-color: var(--text); }
.st-packs button:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--text); background: var(--accent-soft); }
.st-packs b { font: 800 26px var(--display); }
.st-packs span { font-size: 13px; font-weight: 600; }
.st-packs em { font: 500 11px var(--mono); font-style: normal; color: var(--muted); }
.st-packs button:has(span:not(:empty)) span { color: var(--text-2); }
.st-free { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }
.st-free button { padding: 0; border: 0; background: none; font: 600 14px var(--font); color: var(--text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.st-idea.nudge { animation: st-nudge 0.5s; }
@keyframes st-nudge { 30% { box-shadow: 10px 10px 0 var(--accent), 10px 10px 0 2px var(--text); transform: translate(-3px, -3px); } }

/* ---------- starting points and the gallery ---------- */
.st-h2 { font: 700 22px var(--display); margin: 54px 0 14px; display: flex; align-items: baseline; gap: 12px; }
.st-h2 small { font: 500 12px var(--mono); color: var(--muted); }
.st-recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.st-recipe { display: flex; flex-direction: column; gap: 6px; min-height: 118px; padding: 14px; text-align: start; background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius); color: var(--text); font: inherit; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s, background 0.12s; }
.st-recipe i { align-self: flex-start; font: 600 10.5px var(--mono); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; background: var(--fill); color: var(--accent); padding: 3px 7px; border-radius: 3px; }
.st-recipe b { font: 700 17px / 1.2 var(--display); flex: 1; }
.st-recipe span { font: 500 11px var(--mono); color: var(--muted); }
.st-recipe:hover { border-color: var(--text); background: var(--field); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--text); }
button.st-poster { padding: 0; border: 0; background: none; font: inherit; text-align: start; cursor: pointer; }
.st-poster-pic { position: relative; display: block; }
.st-poster-pic i { position: absolute; left: 8px; bottom: 8px; width: 30px; height: 30px; display: grid; place-items: center; font-size: 12px; font-style: normal; background: var(--accent); color: #17150f; border: 1.5px solid #17150f; border-radius: 50%; box-shadow: 2px 2px 0 #17150f; padding-left: 2px; }
.st-view.st-film { padding: 0; display: grid; grid-template-columns: var(--stage-w) minmax(0, 1fr); gap: 22px; align-items: start; }
.st-view .st-stage { position: static; }
.st-view-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.st-view-facts { margin: 0; font: 500 12px var(--mono); color: var(--muted); }
.st-view-idea { margin: 0; padding: 10px 12px; background: var(--accent-soft); border-left: 3px solid var(--text); font-size: 14px; line-height: 1.45; }
.st-admin { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- looks, the product picture, the poster, the camera deck ---------- */
.st-extra { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; border-top: 1px dashed var(--border-2); }
.st-looks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-looks span { font: 600 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.st-looks button, .st-deck button { border: 1px solid var(--border-2); background: var(--panel); color: var(--text-2); font: 600 12px var(--font); padding: 5px 10px; border-radius: 99px; cursor: pointer; }
.st-looks button:hover, .st-deck button:hover { border-color: var(--text); color: var(--text); background: var(--accent-soft); }
.st-looks button.on { background: var(--fill); border-color: var(--fill); color: var(--bg); }
.st-prop-add { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: center; width: 100%; padding: 10px 12px; text-align: start; background: transparent; border: 1.5px dashed var(--border-2); border-radius: var(--radius-sm); color: var(--text); font: inherit; cursor: pointer; }
.st-prop-add b { grid-column: 2; font-size: 14px; }
.st-prop-add span { grid-column: 2; font-size: 13px; color: var(--text-2); }
.st-prop-add img { grid-row: 1 / span 2; width: 52px; height: 52px; object-fit: cover; border: 1.5px solid var(--text); border-radius: 3px; }
.st-prop-add:hover, .st-prop-add.has { border-style: solid; border-color: var(--text); background: var(--accent-soft); }
.st-tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--text-2); }
.st-tools label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.st-tools select.input { width: auto; height: 30px; font-size: 13px; padding: 0 8px; }
.st-tool-prop { display: inline-flex; align-items: center; gap: 8px; }
.st-tool-prop img { width: 30px; height: 30px; object-fit: cover; border: 1.5px solid var(--text); border-radius: 3px; }
.st-tool-prop button { padding: 0; border: 0; background: none; font: 600 13px var(--font); color: var(--text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.st-tool-music { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 320px; min-width: 0; }
.st-tool-music .input { flex: 1; min-width: 120px; height: 30px; font-size: 13px; }
.st-linkish { padding: 0; border: 0; background: none; font: 600 13px var(--font); color: var(--text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.st-deck { display: flex; flex-wrap: wrap; gap: 5px; margin-top: -6px; }
.st-deck button { font-size: 11px; padding: 3px 8px; }
.st-posterview { display: grid; grid-template-columns: minmax(180px, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.st-posterview > img { width: 100%; border: 2px solid var(--pop-border); border-radius: var(--radius); box-shadow: var(--pop-shadow); display: block; }
.st-posterview p { margin: 0 0 14px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.st-posterview .st-hist { margin-top: 14px; }
.st-posterview .st-hist button { width: 40px; height: 52px; }
@media (max-width: 720px) { .st-posterview { grid-template-columns: 1fr; } }

/* ---------- narration ---------- */
.st-chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.st-chk input { accent-color: var(--text); }
.st-voice { margin-top: -6px; }
.st-voice select.input { width: auto; flex: 1 1 130px; height: 30px; font-size: 12px; padding: 0 8px; }
.st-voice small { font: 500 11px var(--mono); }
.st-warn { color: var(--yellow); }
.st-edge s { text-decoration: none; font-size: 8.5px; background: var(--accent); color: #17150f; padding: 1px 4px; border-radius: 2px; }

/* ---------- scenes on the contact sheet ---------- */
.st-scene { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; margin: 8px 0 -6px; padding-bottom: 5px; border-bottom: 2px solid var(--text); font: 700 16px var(--display); }
.st-scene:first-child { margin-top: 0; }
.st-scene i { font: 600 11px var(--mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 720px) {
  .st-view.st-film { grid-template-columns: 1fr; }
  .st-view .st-stage { max-width: 260px; }
}

/* ---------- the second door on the start screen ---------- */
.st-door { display: grid; grid-template-columns: 1fr auto; gap: 2px 18px; align-items: center; width: 100%; margin-top: 26px; padding: 14px 18px; text-align: start; background: var(--panel); border: 1px solid var(--border-2); border-radius: var(--radius); color: var(--text); font: inherit; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s; }
.st-door b { font: 700 17px var(--display); }
.st-door span { grid-column: 1; font-size: 14px; color: var(--text-2); }
.st-door i { grid-row: 1 / span 2; grid-column: 2; font: 600 13px var(--mono); font-style: normal; background: var(--accent); color: var(--on-accent); padding: 6px 10px; border-radius: 3px; border: 1px solid var(--text); white-space: nowrap; }
.st-door:hover { border-color: var(--text); transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--text); }

/* ---------- replace: pick a video ---------- */
.rp-pick { max-width: 900px; margin: 0 auto; padding: 56px 20px 90px; }
.rp-pick h1 { font: 800 clamp(34px, 6vw, 62px) / 0.98 var(--display); letter-spacing: -0.03em; margin: 0 0 18px; }
.rp-pick h1 mark { background: linear-gradient(transparent 58%, var(--accent) 58% 92%, transparent 92%); color: inherit; padding: 0 0.06em; }
.rp-doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rp-door { display: flex; flex-direction: column; gap: 6px; padding: 18px; text-align: start; background: var(--field); border: 2px solid var(--pop-border); border-radius: var(--radius); box-shadow: var(--cta-shadow); color: var(--text); font: inherit; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.rp-door:hover { transform: translate(-2px, -2px); box-shadow: var(--pop-shadow); background: var(--accent-soft); }
.rp-door b { font: 700 19px var(--display); }
.rp-door span { font-size: 14px; line-height: 1.4; color: var(--text-2); }
#rp-more { margin-top: 22px; }
.rp-busy { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.rp-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.rp-lib button { display: flex; flex-direction: column; gap: 4px; padding: 0 0 6px; background: transparent; border: 0; color: var(--text); text-align: start; font: inherit; cursor: pointer; min-width: 0; }
.rp-lib img, .rp-lib i { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--stage); border: 1px solid var(--text); border-radius: var(--radius-sm); }
.rp-lib button:hover img, .rp-lib button:hover i { box-shadow: 3px 3px 0 var(--text); transform: translate(-1px, -1px); }
.rp-lib b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-lib small { font: 500 11px var(--mono); color: var(--muted); }
.rp-link { display: flex; flex-direction: column; gap: 10px; max-width: 620px; padding: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.rp-from { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.rp-from .input { width: 76px; height: 32px; }
.rp-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--text-2); cursor: pointer; }
.rp-check input { margin-top: 2px; accent-color: var(--text); }
.rp-rules { margin: 34px 0 0; padding-top: 14px; border-top: 2px solid var(--text); font-size: 13px; line-height: 1.5; color: var(--text-2); max-width: 640px; }

/* ---------- replace: the workbench ---------- */
.rp { padding: 18px 22px 120px; }
.rp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rp-head .st-title { max-width: 720px; }
.rp-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr) minmax(0, 1.25fr); gap: 22px; align-items: start; }
.rp.tall .rp-cols { grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1fr) minmax(220px, 0.8fr); }
.rp-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rp-col h2 { display: flex; align-items: center; gap: 9px; margin: 0; font: 700 18px var(--display); }
.rp-col h2 i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--fill); color: var(--accent); font: 600 12px var(--mono); font-style: normal; }
.rp-view { position: relative; aspect-ratio: var(--ar); max-height: 62vh; margin: 0 auto; width: 100%; background: var(--stage); border: 2px solid var(--pop-border); border-radius: var(--radius); box-shadow: var(--pop-shadow); overflow: hidden; cursor: crosshair; }
.rp.tall .rp-view { width: auto; height: 56vh; }
.rp-view video { display: block; width: 100%; height: 100%; object-fit: fill; }
.rp-mark { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 3px solid var(--accent); border-radius: 50%; box-shadow: 0 0 0 2px #17150f, inset 0 0 0 2px #17150f; pointer-events: none; animation: rp-mark 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@keyframes rp-mark { from { transform: scale(2.2); opacity: 0; } }
.rp-tip { margin: 0; font: 500 12px var(--mono); color: var(--muted); }
.rp-window { display: flex; align-items: center; gap: 10px; }
.rp-window input[type='range'] { flex: 1; accent-color: var(--text); }
.rp-with { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; }
.rp-slot { aspect-ratio: 1; display: grid; place-items: center; background: var(--field); border: 1.5px dashed var(--border-2); border-radius: var(--radius-sm); overflow: hidden; color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }
.rp-slot:has(img) { border: 2px solid var(--text); padding: 0; box-shadow: 3px 3px 0 var(--text); }
.rp-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-with-acts { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
.rp-with-acts form { display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: flex-start; }
.rp-empty { display: flex; flex-direction: column; justify-content: center; gap: 6px; aspect-ratio: var(--ar); max-height: 62vh; padding: 20px; border: 1.5px dashed var(--border-2); border-radius: var(--radius); color: var(--muted); font-size: 13px; line-height: 1.45; text-align: center; }
.rp-empty b { color: var(--text-2); font-size: 15px; }
.rp-fail { margin: 8px 0 0; font-size: 13px; color: var(--red); }
.rp-working { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 10px; background: var(--accent-soft); border: 1px solid var(--text); border-radius: var(--radius-sm); font-size: 13px; }
#rp-result { display: flex; flex-direction: column; gap: 10px; }
.rp-compare { position: relative; aspect-ratio: var(--ar); max-height: 62vh; margin: 0 auto; width: 100%; background: var(--stage); border: 2px solid var(--pop-border); border-radius: var(--radius); box-shadow: var(--pop-shadow); overflow: hidden; cursor: ew-resize; touch-action: none; user-select: none; }
.rp.tall .rp-compare { width: auto; height: 56vh; }
.rp-compare video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.rp-compare .a { clip-path: inset(0 0 0 var(--cut)); }
.rp-handle { position: absolute; top: 0; bottom: 0; left: var(--cut); width: 4px; margin-left: -2px; background: var(--accent); box-shadow: 0 0 0 1.5px #17150f; pointer-events: none; }
.rp-handle::after { content: '⇆'; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #17150f; border: 2px solid #17150f; font-size: 14px; }
.rp-compare span { position: absolute; top: 10px; background: rgba(17, 17, 15, 0.82); color: #e9e5d8; font: 600 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; pointer-events: none; }
.rp-compare .l { left: 10px; }
.rp-compare .r { right: 10px; color: var(--accent); }
.rp-sum { flex: 1 1 320px; font-size: 14px; color: var(--text-2); }
.rp-sum b { font-family: var(--mono); color: var(--text); }
.rp-miss { color: var(--yellow); font-weight: 600; }
@media (max-width: 1100px) {
  .rp-cols, .rp.tall .rp-cols { grid-template-columns: 1fr 1fr; }
  .rp-cols > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .rp-doors, .rp-cols, .rp.tall .rp-cols { grid-template-columns: 1fr; }
  .rp-pick { padding: 32px 16px 70px; }
  .rp { padding: 14px 14px 170px; }
  .st-door { grid-template-columns: 1fr; }
  .st-door i { grid-row: auto; grid-column: 1; justify-self: start; margin-top: 6px; }
}

@media (max-width: 1180px) {
  .st-work { grid-template-columns: var(--stage-w) minmax(0, 1fr); }
  .st-side { grid-column: 1 / -1; position: static; max-height: none; }
  .st-head { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .st-start, .st-closed { padding: 36px 16px 70px; }
  .st-how { grid-template-columns: 1fr 1fr; }
  .st-film { padding: 14px 14px 190px; --shot-w: 128px; }
  .st-film[data-aspect='16:9'] { --shot-w: 160px; }
  .st-work { grid-template-columns: 1fr; }
  .st-stage { position: static; max-width: 300px; margin: 0 auto; width: 100%; }
  .st-film[data-aspect='16:9'] .st-stage { max-width: none; }
  .st-title { font-size: 24px; }
  .st-crumb, #st-films { display: none; }
  .st-bar { padding: 10px 14px; }
  .st-acts { width: 100%; }
  .st-acts .btn { flex: 1; padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-hatch, .st-clap i, .st-cap.in, .st-wait li { animation: none; opacity: 1; }
}
