:root{font-family:ui-rounded,"Avenir Next",system-ui,-apple-system,sans-serif;color:#292638;background:#faf8f5;--purple:#7459d7;--dark:#5b42b6;--muted:#696376;--line:#e9e6ee}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}input,textarea,select{width:100%;border:1px solid #d9d4df;border-radius:10px;background:#fff;color:#292638;padding:11px 13px;line-height:1.5}textarea{resize:vertical;min-height:88px}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #bdacf5;outline-offset:2px}::selection{background:#e6ddff}.shell{min-height:100vh;display:grid;grid-template-columns:248px minmax(0,1fr)}.sidebar{background:#fff;border-right:1px solid var(--line);padding:28px 20px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;color:#2a243c;font-size:25px;font-weight:850;letter-spacing:-.04em;text-decoration:none}.brand-mark{width:36px;height:36px;margin-right:10px;color:#8c70e2}.brand-mark svg{display:block;width:100%;height:100%}.brand-dot{color:#df8f62}.sidebar-footer{margin-top:auto;padding:30px 8px 0;font-size:12px;color:var(--muted)}.side-title{margin:52px 8px 12px;font-size:12px;font-weight:750;color:var(--muted)}.project-list{display:grid;gap:5px}.project-list button{border:0;background:transparent;text-align:left;padding:10px;border-radius:9px;color:#5f586d;overflow:hidden;text-overflow:ellipsis}.project-list button.active{background:#f1edff;color:#5039a6;font-weight:750}.text-button{border:0;background:none;color:var(--dark);padding:8px;font-weight:700}.workspace{min-width:0}.topbar{height:77px;padding:0 clamp(24px,5vw,72px);display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);background:#fff;font-size:13px;color:#6c6576}.topbar strong{color:#41384d}.topbar span span{padding:0 10px}main{max-width:1120px;margin:auto;padding:44px clamp(24px,5vw,72px) 80px}h1{font-size:clamp(30px,3.6vw,42px);letter-spacing:-.035em;line-height:1.12;margin:0 0 12px}h2{font-size:20px;letter-spacing:-.02em;margin:0 0 10px}h3{font-size:16px;margin:0 0 14px}p{line-height:1.55}.intro{color:var(--muted);max-width:60ch;margin:0 0 28px}.panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:25px;margin-bottom:20px}.auth-panel{max-width:480px}.field{display:block;font-size:13px;font-weight:700;margin:18px 0 7px}.helper{color:var(--muted);font-size:13px;line-height:1.5}.button{border:0;border-radius:10px;padding:11px 16px;background:var(--purple);color:#fff;font-weight:750}.button:hover{background:var(--dark)}.button.secondary{background:#f0ecfa;color:#5039a6}.button.secondary:hover{background:#e5ddf7}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.row>input,.row>select{width:auto;flex:1}.space-between{justify-content:space-between}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}.scene{display:grid;grid-template-columns:minmax(220px, .8fr) minmax(0,1.2fr);gap:24px}.media{aspect-ratio:16/9;background:#f1edf6;border-radius:12px;display:grid;place-items:center;overflow:hidden;color:#686075;font-size:13px;text-align:center}.media img,.media video{width:100%;height:100%;object-fit:contain;background:#ede9f2}.scene-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.scene-tools button,.file-button{border:1px solid #d8d0e6;border-radius:9px;background:#fff;color:#554374;font-size:13px;font-weight:700;padding:9px 11px}.file-button{cursor:pointer}.file-button input{position:absolute;width:1px;height:1px;opacity:0}.job{font-size:13px;color:#635c6c;margin:12px 0 0}.warning{border-radius:12px;background:#fff5de;color:#594421;padding:14px 16px;font-size:13px;line-height:1.5;margin-bottom:20px}.warning a{color:inherit}.notice{background:#eee9ff;color:#4f3c8d;padding:12px 16px;border-radius:10px;margin-bottom:20px}#notice:empty{display:none}.empty{text-align:center;padding:42px 20px}.empty p{color:var(--muted)}.save-state{font-size:13px;color:var(--muted)}.scene header{display:flex;justify-content:space-between;gap:10px}.scene header span{font-size:12px;color:var(--muted)}@media(max-width:760px){.shell{display:block}.sidebar{min-height:0;padding:16px 20px;border-bottom:1px solid var(--line);border-right:0}.sidebar-footer{display:none}.side-title{margin:18px 0 8px}.project-list{display:flex;overflow-x:auto}.project-list button{white-space:nowrap}.topbar{height:58px;padding:0 20px}main{padding:28px 20px 60px}.scene{grid-template-columns:1fr;gap:18px}.panel{padding:20px}.row>input{min-width:150px}}
.audio-preview{margin-top:12px}.audio-preview audio{width:100%;max-width:340px;height:38px}
.movie-panel{margin-top:32px}.check{display:flex;align-items:center;gap:9px;margin-top:15px;font-size:14px}.check input{width:auto}.result{max-width:720px;margin-top:16px}.actions a{text-decoration:none}
.side-expenses{display:block;width:100%;text-align:left;margin-top:24px;padding:11px 10px;border:0;border-radius:10px;background:transparent;color:#5f586d;font-weight:700}.side-expenses.active{background:#f1edff;color:#5039a6}.budget-summary{display:flex;flex-wrap:wrap;gap:24px 60px;margin-bottom:28px}.budget-summary div{display:grid;gap:6px}.budget-summary span,.history-row p{color:var(--muted);font-size:13px}.budget-summary strong{font-size:24px;font-variant-numeric:tabular-nums}.budget-summary small{font-size:13px;font-weight:500}.budget-input{max-width:520px}.history-list{margin-bottom:20px}.history-row{display:flex;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line)}.history-row p{margin:5px 0 0}.history-row>strong{white-space:nowrap;font-variant-numeric:tabular-nums}
.story-draft{margin-top:22px;padding-top:22px;border-top:1px solid var(--line)}.story-draft p{font-size:14px}.story-draft ol{padding-left:22px}.story-draft li{padding:0 0 12px;line-height:1.5}.story-draft li span{display:block;color:var(--muted);font-size:13px}
.characters-panel{margin-top:20px}.hero-card{padding:18px 0;border-top:1px solid var(--line)}.hero-reference{max-width:220px}.hero-variants{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;margin:16px 0}.hero-variant button[aria-pressed="true"]{color:#246442}.character-library{margin-top:24px;padding-top:22px;border-top:1px solid var(--line)}
.imported-sample{padding:12px 0;border-top:1px solid var(--line)}.imported-sample p{font-size:13px;color:var(--muted);margin:6px 0}
.batch-panel{padding:20px 24px}.batch-panel .row{margin-top:14px}

.topbar-actions{display:flex;align-items:center;gap:10px}.topbar-actions label{font-size:12px;white-space:nowrap}.topbar-actions select{width:auto;padding:6px 8px;font-size:12px}@media(max-width:760px){.topbar{height:auto;min-height:58px;flex-wrap:wrap;padding-top:10px;padding-bottom:10px}.topbar-actions{flex-wrap:wrap}}

.scene-variants{margin:12px 0 18px}.scene-variant{max-width:320px;border:1px solid var(--line);border-radius:12px;padding:10px;margin-top:10px}.scene-variant .job{margin:8px 0}.scene-variant button[aria-pressed="true"]{color:#246442}.scene-variants details{margin-top:10px;font-size:13px;color:var(--muted)}.scene-variants summary{cursor:pointer;font-weight:700}.scene-variants-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.scene-variants-list .scene-variant{min-width:0}.scene-variant .audio-preview{margin:0}
.project-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:16px;overflow:hidden;margin:0 0 24px}.project-overview a{display:flex;align-items:flex-start;gap:10px;min-width:0;background:#fff;color:#41384d;padding:16px 14px;text-decoration:none}.project-overview a:hover{background:#f5f1ff}.project-overview a:focus-visible{position:relative;outline-offset:-3px;z-index:1}.project-overview strong,.project-overview small{display:block}.project-overview strong{font-size:13px}.project-overview small{color:var(--muted);font-size:12px;line-height:1.4;margin-top:5px}.overview-number{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:9px;background:#eee9ff;color:#5b42b6;font-size:11px;font-weight:800}.project-overview~section,.project-overview~div[id]{scroll-margin-top:18px}@media(max-width:850px){.project-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:420px){.project-overview a{padding:12px 9px;gap:7px}}
.project-archive{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}.project-archive .helper{margin:5px 8px}.archived-row{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:2px 0 2px 8px;font-size:13px;color:var(--muted)}.archived-row span{overflow:hidden;text-overflow:ellipsis}.archived-row button{flex:none}
.archived-row .archive-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;overflow:visible;flex:0 1 auto}
.volume-control{max-width:520px}.volume-control input{min-width:0}.volume-control output{min-width:3em;text-align:right;font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.provider-check{border-top:1px solid var(--line);margin-top:12px;padding-top:10px}
.export-readiness{margin-top:16px}.export-readiness p{margin:0 0 8px}.readiness-links{display:flex;flex-wrap:wrap;gap:8px 14px}.readiness-links a{color:var(--dark);font-size:13px;font-weight:700;text-underline-offset:3px}.scene{scroll-margin-top:18px}

.scene-characters{border:0;padding:0;margin:16px 0}.scene-characters legend{font-size:14px;font-weight:700;padding:0}.scene-characters .check{margin:8px 0;overflow-wrap:anywhere}.scene-characters .helper{margin:6px 0 10px}

.scene-reference-preview{max-width:220px;margin:10px 0 16px}.scene-characters a{color:var(--dark);text-underline-offset:3px}

.media-item{margin-top:14px;padding:18px}.media-item details{margin:12px 0}.media-item summary{cursor:pointer;color:var(--dark);font-weight:700}.media-item-preview{max-width:360px;margin-top:12px}

.storyboard{margin:18px 0 24px;min-width:0}.storyboard-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}.storyboard-heading h3{margin:0}.storyboard-heading p{margin:0}.storyboard-list{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(160px,200px);gap:14px;overflow-x:auto;overscroll-behavior-inline:contain;padding:14px 4px 14px 0}.storyboard-item{display:flex;flex-direction:column;gap:7px;min-width:0;text-decoration:none;color:inherit;border-radius:12px}.storyboard-item:hover strong{color:var(--dark)}.storyboard-item:focus-visible{outline-offset:3px}.storyboard-image{width:100%}.storyboard-item strong{font-size:14px}.storyboard-description{font-size:13px;line-height:1.4;min-height:2.8em;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}.storyboard-status{font-size:12px;color:var(--muted)}

.story-preview-stage{max-width:760px;margin:20px 0}.story-preview-position{font-size:14px;font-weight:700;margin:16px 0 4px}.story-preview-description{max-width:70ch;overflow-wrap:anywhere;margin:0 0 12px}.story-preview-stage video,.story-preview-stage img{width:100%;height:100%;object-fit:contain;background:#000}

.story-preview-stage.vertical{aspect-ratio:9/16;max-width:400px}
.story-preview-screen{position:relative;max-width:760px;margin:20px 0}.story-preview-screen.vertical{max-width:400px}.story-preview-screen .story-preview-stage{margin:0;max-width:none}.story-preview-caption{position:absolute;bottom:6%;left:8%;right:8%;max-height:35%;overflow:auto;padding:6px 10px;border-radius:6px;background:rgba(0,0,0,.78);color:#fff;text-align:center;font-size:clamp(14px,2vw,20px);line-height:1.35;overflow-wrap:anywhere}.story-preview-caption:focus-visible{outline:3px solid #fff;outline-offset:3px}

.file-button:focus-within,.scene:focus-visible{outline:3px solid var(--dark);outline-offset:3px}

#connection-status:empty{display:none}

.reference-list{margin:.35rem 0 .8rem;padding-left:1.4rem;color:var(--muted);font-size:.9rem;line-height:1.5}.reference-list li+li{margin-top:.2rem}

#compare-frames{margin-top:8px}#compare-frames summary{cursor:pointer;color:var(--dark);font-weight:650}.compare-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.compare-image{margin-top:8px}@media(max-width:560px){.compare-grid{grid-template-columns:1fr}}

.scene-list-controls{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}.scene-collapse{margin:8px 0 0}.scene [hidden]{display:none}

.admin-main{max-width:720px;margin:3rem auto;padding:0 1.25rem}
/* Account navigation: one primary action, projects, then optional tools. */
.side-nav{display:grid;gap:4px;margin-top:36px}.side-create,.side-link{width:100%;border:0;text-align:left;font-size:14px;line-height:1.3;border-radius:10px;padding:11px 12px;font-weight:700}.side-create{background:#7459d7;color:#fff;margin-bottom:12px}.side-create:hover{background:#5b42b6}.side-create span{font-size:19px;margin-right:5px}.side-link{display:flex;align-items:center;justify-content:space-between;background:transparent;color:#393249}.side-link:hover,.side-link.active{background:#f1edff;color:#5039a6}.side-count{font-size:12px;color:#625775;font-weight:600}.sidebar .project-list{display:grid;gap:2px;margin:0 0 14px 8px;padding-left:8px;border-left:1px solid var(--line)}.sidebar .project-list:empty{display:none}.sidebar .project-list button{font-size:13px;padding:8px 10px}.sidebar .project-list button:hover{background:#f8f6fc}.side-nav .provider-check,.side-nav .project-archive{border:0;margin:0;padding:0}.side-extra{border-top:1px solid var(--line);margin-top:15px;padding-top:12px}.side-extra summary{cursor:pointer;padding:9px 12px;color:#625a70;font-size:13px;font-weight:700}.side-extra summary:focus-visible{outline:3px solid #bdacf5;outline-offset:2px}.side-extra-content,#sidebar-extra-content{display:grid;gap:2px}.side-extra .text-button,.side-extra .side-expenses{width:100%;text-align:left;font-size:13px;font-weight:600;color:#625a70;margin:0;padding:9px 12px;border-radius:8px}.side-extra .text-button:hover,.side-extra .side-expenses:hover{background:#f6f3fb}.side-extra .helper{margin:4px 12px}.work-list{border-top:1px solid var(--line)}.work-row{width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left;padding:18px 4px;display:flex;align-items:center;justify-content:space-between;gap:20px;color:#292638}.work-row:hover{background:#f3effa}.work-row strong,.work-row small{display:block}.work-row strong{font-size:16px;overflow-wrap:anywhere}.work-row small{color:#696376;font-size:13px;margin-top:5px}.work-open{color:#5b42b6;font-weight:700;font-size:13px;white-space:nowrap}
@media(max-width:760px){.side-nav{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:20px;gap:6px}.side-create{margin:0}.side-link{min-height:44px}.sidebar .project-list{grid-column:1/-1;display:flex;border-left:0;margin:0;padding:0;overflow-x:auto}.sidebar .project-list button{flex:none;max-width:180px}.side-extra{grid-column:1/-1;margin-top:5px}.side-extra[open] #sidebar-extra-content{grid-template-columns:repeat(2,minmax(0,1fr))}.side-extra .project-archive{grid-column:1/-1}}
.film-step{margin-top:34px}.film-heroes{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:18px}.film-heroes article{padding:16px 0;border-top:1px solid var(--line)}.film-heroes p,.film-frame p{color:var(--muted);font-size:13px;margin:6px 0 0}.film-storyboard{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 16px}.film-frame strong{display:block;margin-top:10px;font-size:14px}.film-frame .media{aspect-ratio:16/9}@media(max-width:760px){.film-storyboard{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:420px){.film-storyboard{grid-template-columns:1fr}}
