:root { --ink:#28244f; --muted:#6d6987; --paper:#fff8ed; --purple:#673de6; --purple-dark:#4b28bd; --pink:#ff5c7a; --yellow:#ffc94d; --line:#e8e0f3; color-scheme:light; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html { background:var(--paper); }
body { min-height:100vh; margin:0; color:var(--ink); background:radial-gradient(circle at 8% 12%,rgba(255,201,77,.25),transparent 22rem),radial-gradient(circle at 90% 20%,rgba(101,199,244,.2),transparent 26rem),var(--paper); font-family:"Avenir Next",Avenir,"Trebuchet MS",system-ui,sans-serif; }
button,input,textarea { font:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
.studio-header { min-height:76px; padding:14px clamp(18px,4vw,56px); display:flex; align-items:center; justify-content:space-between; gap:18px; }
.brand { display:inline-flex; align-items:center; gap:12px; color:var(--ink); text-decoration:none; font-size:clamp(1.1rem,2vw,1.45rem); font-weight:900; }
.brand-mark { width:44px; height:38px; display:grid; place-items:center; border-radius:12px; color:#fff; background:var(--purple); box-shadow:5px 5px 0 var(--yellow); font-size:.85rem; }
.account-name,.eyebrow,.step-pill { color:var(--muted); font-size:.78rem; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.page-shell { width:min(1180px,calc(100% - 36px)); margin:0 auto; padding:20px 0 max(48px,env(safe-area-inset-bottom)); }
.hero { min-height:min(610px,calc(100vh - 96px)); display:grid; grid-template-columns:minmax(0,1fr) minmax(320px,.8fr); align-items:center; gap:clamp(28px,6vw,84px); }
.hero h1,.page-title { margin:8px 0 18px; font-size:clamp(2.5rem,6vw,5.8rem); line-height:.95; letter-spacing:-.055em; }
.page-title { font-size:clamp(2.2rem,5vw,4.4rem); }
.hero h1 em { color:var(--purple); font-style:normal; }
.lede { max-width:680px; color:var(--muted); font-size:clamp(1.05rem,2vw,1.3rem); line-height:1.55; }
.hero-art { position:relative; aspect-ratio:4/3; border-radius:38px; background:var(--purple); box-shadow:0 14px 38px rgba(57,40,102,.14); overflow:hidden; }
.hero-art::before { content:""; position:absolute; inset:8% 8% 22%; border:10px solid #fff; border-radius:28px; background:linear-gradient(145deg,#65c7f4,#dff6ff 65%); }
.hero-art::after { content:"▶"; position:absolute; inset:0; display:grid; place-items:center; color:var(--pink); font-size:clamp(4rem,10vw,8rem); filter:drop-shadow(7px 7px 0 #fff); }
.toy-row { position:absolute; z-index:2; inset:auto 8% 7%; display:flex; justify-content:space-between; font-size:clamp(2.2rem,7vw,5rem); }
.full-width { grid-column:1/-1; }
.movie-list h2 { margin:.2rem 0 1rem; font-size:2rem; }
.card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(270px,1fr)); gap:18px; }
.movie-card,.panel,.scene-card { padding:24px; border:2px solid rgba(103,61,230,.1); border-radius:26px; background:rgba(255,255,255,.92); box-shadow:0 10px 30px rgba(57,40,102,.08); }
.movie-card h3,.scene-card h2 { margin:10px 0 8px; }
.movie-meta { color:var(--muted); }
.empty-state { padding:32px; border:3px dashed var(--line); border-radius:26px; color:var(--muted); text-align:center; }
.actions { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin-top:24px; }
.primary-button,.secondary-button,.danger-button { min-height:56px; border:0; border-radius:18px; padding:14px 24px; display:inline-flex; align-items:center; justify-content:center; gap:10px; cursor:pointer; font-weight:900; }
.primary-button { color:#fff; background:var(--purple); box-shadow:0 8px 0 var(--purple-dark); }
.secondary-button { color:var(--ink); background:#fff; border:2px solid var(--line); }
.danger-button { color:#a52244; background:#ffe8ed; }
button:disabled { cursor:wait; opacity:.55; }
.progress-dots { margin:8px 0 30px; padding:0; list-style:none; display:flex; justify-content:center; gap:clamp(8px,3vw,38px); }
.progress-dots li { display:flex; align-items:center; gap:8px; color:#aaa3bb; font-size:.85rem; font-weight:800; }
.progress-dots span { width:32px; height:32px; display:grid; place-items:center; border-radius:50%; background:#e9e4ed; }
.progress-dots .active { color:var(--purple-dark); }
.progress-dots .active span { color:#fff; background:var(--purple); }
.form-shell { width:min(840px,100%); margin:0 auto; }
.field-label { display:block; margin:26px 0 10px; font-weight:900; font-size:1.05rem; }
.text-input,.story-input { width:100%; border:3px solid var(--line); border-radius:20px; padding:18px 20px; color:var(--ink); background:#fff; font-size:1.15rem; outline:none; }
.story-input { min-height:220px; resize:vertical; line-height:1.55; }
.text-input:focus,.story-input:focus { border-color:var(--purple); box-shadow:0 0 0 5px #eee8ff; }
.duration-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.duration-card { min-height:130px; padding:20px; border:3px solid var(--line); border-radius:22px; background:#fff; cursor:pointer; }
.duration-card:has(input:checked) { border-color:var(--purple); background:#f2edff; }
.duration-card input { width:22px; height:22px; accent-color:var(--purple); }
.duration-card strong,.duration-card span { display:block; margin-top:8px; }
.duration-card span { color:var(--muted); }
.notice { margin:18px 0; padding:16px 18px; border-radius:16px; background:#eafaf5; color:#225b49; }
.error { background:#ffe8ed; color:#9f2340; }
.record-panel { margin-top:16px; padding:18px; display:flex; align-items:center; justify-content:space-between; gap:18px; border-radius:20px; background:#f4efff; }
.screenplay-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.scene-number { width:46px; height:46px; display:grid; place-items:center; border-radius:16px; color:#fff; background:var(--purple); font-size:1.2rem; font-weight:900; }
.camera-hint { padding:14px; border-radius:14px; background:#fff3c8; line-height:1.45; }
.director-layout { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,.55fr); gap:20px; }
.camera-stage { position:relative; aspect-ratio:16/9; overflow:hidden; border-radius:26px; background:#151328; box-shadow:0 14px 38px rgba(57,40,102,.14); }
.camera-stage video,.onion-frame { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.onion-frame { pointer-events:none; opacity:var(--onion-opacity,.42); }
.camera-stage.onion-blink .onion-frame { animation:onion-blink 1s steps(1,end) infinite; }
.camera-message { position:absolute; inset:0; display:grid; place-items:center; padding:28px; color:#fff; text-align:center; }
.assist-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:16px; }
.assist-card { min-height:86px; padding:14px; display:flex; align-items:flex-start; gap:10px; border:2px solid var(--line); border-radius:18px; background:#fff; cursor:pointer; }
.assist-card:has(input:checked) { border-color:var(--purple); background:#f2edff; }
.assist-card input { width:23px; height:23px; flex:0 0 auto; accent-color:var(--purple); }
.assist-card strong,.assist-card small { display:block; }
.assist-card small { margin-top:4px; color:var(--muted); line-height:1.3; }
.assist-status { min-height:42px; margin-top:10px; display:flex; align-items:center; flex-wrap:wrap; gap:10px; color:var(--muted); font-size:.9rem; }
.stability-pill { padding:7px 11px; border-radius:999px; color:#225b49; background:#dff8ed; font-weight:900; }
.stability-pill.moving { color:#875600; background:#fff0bf; }
.stability-pill.checking { color:#5e5877; background:#eeeaf4; }
.camera-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-top:16px; }
.capture-button { min-width:170px; min-height:70px; }
.onion-control { display:flex; align-items:center; gap:8px; font-weight:800; }
.onion-control input { width:120px; accent-color:var(--purple); }
.shot-strip { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:16px; }
.shot-thumb { aspect-ratio:16/9; width:100%; object-fit:cover; border-radius:10px; border:3px solid #fff; box-shadow:0 2px 8px #cfc7de; }
.scene-tabs { display:grid; gap:8px; }
.scene-tab { min-height:52px; border:2px solid var(--line); border-radius:14px; background:#fff; color:var(--ink); text-align:left; padding:10px 14px; cursor:pointer; font-weight:800; }
.scene-tab.active { color:#fff; background:var(--purple); border-color:var(--purple); }
.preview-stage { width:min(960px,100%); margin:0 auto; }
.preview-screen { position:relative; aspect-ratio:16/9; display:grid; place-items:center; overflow:hidden; border-radius:30px; background:#151328; box-shadow:0 14px 38px rgba(57,40,102,.14); }
.preview-screen img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.preview-blend-frame { opacity:0; }
#watch .panel { margin-top:24px; }
#watch .secondary-button { text-decoration:none; }
#shareUrl { width:100%; margin-block:10px; }
.frame-counter { position:absolute; right:14px; bottom:14px; padding:8px 12px; border-radius:999px; color:#fff; background:rgba(21,19,40,.72); font-weight:900; }
.preview-controls { margin-top:18px; padding:16px; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:18px; border-radius:20px; background:#fff; }
.preview-controls label { display:flex; align-items:center; gap:8px; font-weight:900; }
.preview-only { padding:3px 7px; border-radius:999px; color:var(--muted); background:#f0edf4; font-size:.7rem; text-transform:uppercase; }
.privacy-strip { margin-top:48px; padding:18px 22px; display:flex; align-items:center; flex-wrap:wrap; gap:14px; border-radius:20px; color:#225b49; background:#eafaf5; }
.privacy-strip a { color:#225b49; font-weight:900; }
.visually-hidden { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
@keyframes onion-blink { 0%,49% { opacity:0; } 50%,100% { opacity:var(--onion-opacity,.42); } }
@media (max-width:860px) { .hero,.screenplay-grid,.director-layout { grid-template-columns:1fr; } .hero { padding-top:20px; } .hero-art { width:min(580px,100%); justify-self:center; } .duration-grid { grid-template-columns:1fr; } .duration-card { min-height:90px; } .account-name { display:none; } }
@media (max-width:760px) { .assist-grid { grid-template-columns:1fr; } .assist-card { min-height:70px; } }
@media (max-width:560px) { .page-shell { width:min(100% - 24px,1180px); } .studio-header { padding-inline:14px; } .progress-dots li { font-size:0; } .camera-toolbar,.record-panel { align-items:stretch; flex-direction:column; } .capture-button { width:100%; } .shot-strip { grid-template-columns:repeat(3,1fr); } }
@media (prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; transition:none!important; } }
