:root{color-scheme:dark;--bg:#09121d;--card:#111f2e;--line:#23384a;--text:#edf4f7;--muted:#a0b2c1;--accent:#69ead3;--gold:#f1c48c}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 90% 0,#163136 0,transparent 45%),var(--bg);color:var(--text);font:15px/1.5 system-ui,-apple-system,sans-serif;max-width:780px;margin-inline:auto;padding:20px 18px 100px}[hidden]{display:none!important}header,.brand,.sectionhead,.projectbar,.row,.infobar{display:flex;align-items:center;gap:12px}header,.sectionhead,.projectbar,.infobar{justify-content:space-between}.brand{gap:11px}.mark{display:grid;place-items:center;border:1px solid #52766f;width:44px;height:44px;border-radius:14px;color:var(--accent);font-weight:700}h1{font-size:23px;letter-spacing:-.8px;margin:0}small,.muted{color:var(--muted)}.brand small{font-size:9px;letter-spacing:2px}h2{font-size:25px;line-height:1.2;letter-spacing:-.7px;margin:5px 0 12px}h3{font-size:17px;margin:0}.dot{display:inline-block;background:var(--accent);width:6px;height:6px;border-radius:50%;margin-left:7px}#notice{min-height:46px;margin:16px 0;color:var(--muted);font-size:13px;border-bottom:1px solid var(--line);padding-bottom:12px;overflow-wrap:anywhere}button,.button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:11px 15px;background:#1b3041;border:1px solid #324a5d;border-radius:12px;color:var(--text);font:600 14px system-ui;text-decoration:none;cursor:pointer}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--accent);color:#08251f;border-color:var(--accent)}.quiet{background:transparent;border-color:var(--line);color:var(--muted)}.wide{width:100%;margin-block:8px}.row>*{flex:1;min-width:0}.row{align-items:stretch;flex-wrap:wrap}.row label{flex-basis:130px}.panel{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:17px;margin-block:15px}summary{font-weight:650;cursor:pointer;padding:5px 0}summary::marker{color:var(--accent)}label{display:block;color:var(--muted);font-size:12px;font-weight:550;margin-block:12px}input,select,textarea{display:block;width:100%;font:16px system-ui;color:var(--text);border:1px solid #344a5b;background:#0b1723;border-radius:10px;min-height:46px;padding:11px;margin-top:7px}input[type=range]{accent-color:var(--accent);padding:0;border:0;min-height:30px}input[type=checkbox]{display:inline-block;width:19px;height:19px;min-height:0;accent-color:var(--accent);margin:0 8px 0 0;vertical-align:middle}.check{font-size:13px}.login{padding:25px 5px}.login h2{font-size:45px;line-height:1.12;letter-spacing:-2px;margin-top:18px}.login em{color:var(--accent);font-style:normal}.login p{color:var(--muted);margin-block:24px}.login>.primary{width:100%;margin-block:12px}.login>small{font-size:10px}.eyebrow,.sectionhead small{font-size:9px;letter-spacing:1.6px;color:var(--accent)}.projectbar{margin-block:16px}.projectbar label{flex:1;margin:0;font-size:9px;letter-spacing:1px}.projectbar select{font-size:16px;letter-spacing:0}.sectionhead{margin:24px 0 12px}.sectionhead h2{margin-bottom:0}.pill{font-size:10px;white-space:nowrap;border:1px solid var(--line);border-radius:99px;padding:5px 10px;color:var(--accent)}.infobar{font-size:11px;color:var(--muted);padding:10px 0}.gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.asset{border:1px solid var(--line);border-radius:15px;overflow:hidden;background:var(--card);cursor:pointer}.asset.selected{border-color:var(--accent)}.asset img{width:100%;height:135px;object-fit:cover;display:block;background:#142b36}.asset .assetmeta{padding:10px}.asset strong{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.asset small{font-size:10px}.empty{text-align:center;color:var(--muted);border:1px dashed #355163;border-radius:15px;padding:30px 20px}.shot{border:1px solid var(--line);border-radius:17px;background:var(--card);padding:14px;margin-block:12px}.shot.cut{opacity:.55}.shothead{display:flex;gap:10px;align-items:center}.shothead img{width:50px;height:64px;object-fit:cover;border-radius:8px}.shothead strong{font-size:12px;overflow-wrap:anywhere}.shothead .shotname{flex:1}.shotnum{color:var(--accent);font-size:10px}.shot .tools{display:flex;gap:7px;margin-top:10px}.shot .tools button{min-height:38px;font-size:12px;padding:7px 12px}.sticky{position:sticky;bottom:80px;background:#09121df2;padding:10px 0;backdrop-filter:blur(12px)}.messages{display:flex;flex-direction:column;gap:12px;margin-block:20px}.message{padding:14px;border-radius:15px;background:var(--card);border:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere}.message.user{margin-left:20px;background:#153b3a;border-color:#2c5c54}.message small{display:block;font-size:10px;color:var(--accent);margin-bottom:5px}.suggestions{display:flex;gap:8px;overflow-x:auto;padding-bottom:8px}.suggestions button{white-space:nowrap;font-size:11px;min-height:37px;font-weight:500}.composer{position:sticky;bottom:80px;background:#09121df5;padding:10px 0}.composer button{width:100%;margin-top:9px}.composer textarea{min-height:92px;resize:vertical}.screen{background:#03090e;border:1px solid var(--line);border-radius:20px;overflow:hidden;text-align:center}.screen video{width:100%;max-height:66vh;display:block}.screen p{color:var(--muted);font-size:12px;padding:12px;margin:0}.job{padding:15px;margin-top:12px;border:1px solid var(--line);border-radius:14px;background:var(--card)}.job .row{margin-top:10px}.job progress{width:100%;accent-color:var(--accent);height:5px}.job small{display:block}.error{color:#ffb3a6}output{float:right;color:var(--accent)}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;color:var(--muted)}nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,1fr);width:min(100%,780px);padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#0c1925f5;border-top:1px solid var(--line);backdrop-filter:blur(16px);z-index:5}nav button{display:flex;flex-direction:column;gap:3px;border:0;background:transparent;color:var(--muted);font-size:11px;border-radius:10px}nav button span{font-size:9px;font-weight:400}nav button[aria-current=page]{background:#1d3d3b;color:var(--accent)}dialog{width:min(94vw,550px);max-height:90vh;border:1px solid var(--line);border-radius:20px;background:var(--bg);color:var(--text);padding:17px}dialog::backdrop{background:#000b;backdrop-filter:blur(5px)}dialog video{width:100%;max-height:65vh}footer{text-align:center;font-size:10px;color:#657e91;margin-top:35px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}@media(min-width:620px){body{padding-inline:35px}.gallery{grid-template-columns:repeat(3,1fr)}.login{max-width:450px;margin:auto}.login h2{font-size:58px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Phone icon workspace. One viewport; only the active task scrolls. */
body.authenticated{height:var(--workspace-height,100dvh);max-height:var(--workspace-height,100dvh);overflow:hidden;display:flex;flex-direction:column;padding:8px 12px 0}
.authenticated>header{flex:none;min-height:42px;gap:8px}.authenticated .brand{gap:8px;min-width:0}.authenticated .mark{width:32px;height:32px;border-radius:50%;flex:none;background:linear-gradient(145deg,#304f79,#17554f)}.authenticated h1{font-size:18px;letter-spacing:-.3px}.brand small{display:block;white-space:normal;max-width:260px;line-height:1.2;font-size:10px;letter-spacing:.02em}.authenticated>footer{display:none}
.authenticated #main{flex:1;min-height:0;display:flex;flex-direction:column;padding-bottom:calc(70px + env(safe-area-inset-bottom));position:relative}
.authenticated #notice{display:none;position:fixed;top:8px;left:50%;transform:translateX(-50%);width:min(92%,600px);max-height:70px;overflow:hidden;z-index:50;pointer-events:none;margin:0;padding:9px 12px;border:1px solid #4a746d;border-radius:12px;background:#12352ff2;color:#e5fff8;font-size:13px;line-height:1.4;box-shadow:0 6px 24px #0006}.authenticated #notice.visible{display:block}
.authenticated .projectbar{flex:none;margin:5px 0 0;gap:6px}.authenticated .projectbar label{font-size:0;flex:1;min-width:0}.authenticated .projectbar select{margin:0;font-size:14px;min-height:44px;height:44px;padding:7px 10px}.projectbar button{flex:none}
.app-navigation{display:flex;align-items:center;gap:6px;flex:none;min-height:44px}.app-navigation select{flex:1;min-width:0;margin:0;min-height:38px;padding:5px 8px;font-size:13px}.app-navigation button{flex:none}.current-edit{font-size:11px;color:#ffd999;white-space:nowrap}.current-edit:empty{display:none}
.next-hint{flex:none;font-size:12px;line-height:1.35;padding:4px 8px;margin:3px 0 7px;border-radius:8px;background:#163c35;color:#c8fff0;max-height:40px;overflow:auto}
.authenticated [data-panel]{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 2px 8px;scrollbar-width:thin}.authenticated [data-panel=edit],.authenticated [data-panel=chat]{display:flex;flex-direction:column;overflow:hidden}
.authenticated label{margin:8px 0;font-size:13px;font-weight:500}.authenticated input,.authenticated select,.authenticated textarea{min-height:44px;padding:9px;font-size:16px;margin-top:4px}.authenticated input[type=checkbox]{min-height:0;padding:0}.authenticated input[type=range]{min-height:28px;padding:0}.authenticated .panel{margin:8px 0;padding:12px;border-radius:15px}.authenticated .infobar{font-size:12px;padding:4px 0}.authenticated .gallery{gap:8px}.authenticated .asset img{height:104px}.authenticated .asset .assetmeta{padding:8px}.authenticated .asset strong{font-size:12px}.authenticated .asset small{font-size:11px}
.library-filter{display:flex;gap:6px;align-items:center}.library-filter label{flex:1;min-width:0;font-size:0}.library-filter select{font-size:14px;margin:0}.used-badge{color:#f1c48c;display:block;font-weight:600}.usage-badge{color:#86cdbd;display:block}#mediaHistory p{font-size:12px;overflow-wrap:anywhere}
button[data-icon]{display:inline-flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;min-width:44px;min-height:44px;max-width:100%;border:0;border-radius:13px;background:transparent;padding:5px 7px;color:var(--text);line-height:1.1;vertical-align:middle;touch-action:manipulation}
button[data-icon]:disabled{opacity:.38;cursor:default}.icon-tile{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:11px;background:linear-gradient(145deg,#477de0,#2648a4);color:#fff;box-shadow:inset 0 1px 1px #ffffff40,0 3px 7px #0003}.icon-tile svg{width:22px;height:22px;display:block}.icon-label{display:block;font-size:12px;font-weight:600;white-space:nowrap}
[data-tone=purple]>.icon-tile,[data-icon=chat]>.icon-tile,[data-icon=sparkles]>.icon-tile{background:linear-gradient(145deg,#b684ff,#7145cf)}[data-tone=orange]>.icon-tile,[data-icon=mic]>.icon-tile,[data-icon=scissors]>.icon-tile{background:linear-gradient(145deg,#ff9862,#d65239)}[data-tone=green]>.icon-tile,[data-icon=check]>.icon-tile,[data-icon=play]>.icon-tile,[data-icon=pause]>.icon-tile{background:linear-gradient(145deg,#4ee2ba,#16866e)}[data-icon=trash]>.icon-tile{background:linear-gradient(145deg,#fb7891,#aa3552)}[data-icon=share]>.icon-tile{background:linear-gradient(145deg,#b688ff,#7041c8)}[data-icon=save]>.icon-tile{background:linear-gradient(145deg,#54cbe9,#147a9c)}
.app-navigation button[data-icon] .icon-label,.dialog-head button[data-icon] .icon-label,.playback-line button[data-icon] .icon-label,header button[data-icon] .icon-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.app-navigation .icon-tile,.dialog-head .icon-tile,header .icon-tile{background:transparent;box-shadow:none;width:28px;height:28px}.app-navigation button[data-icon]{padding:4px;width:44px}.app-navigation button.next-action .icon-tile{background:#21483f}
.edit-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;flex:none;padding:0 0 7px}.edit-tabs button[aria-selected=true]{background:#23433d}.edit-page{flex:1;min-height:0;overflow:auto;padding-bottom:8px;overscroll-behavior:contain}.authenticated .sticky{position:static;flex:none;margin:0;padding:3px 0;border-top:1px solid var(--line);background:var(--bg);justify-content:center}.sticky button{flex:0 1 110px}.authenticated .shot{margin:8px 0;padding:10px}.shot .tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}.shot .tools button{padding:4px}.shot label{font-size:12px}.shothead img{height:44px;width:38px}summary.shothead{list-style:none;padding:0}.shothead::before{content:'▸';color:var(--accent)}details.shot[open]>.shothead::before{content:'▾'}
.authenticated nav{padding:5px 10px calc(5px + env(safe-area-inset-bottom));background:#0d1a29f7}.authenticated nav button[data-icon]{min-height:56px;padding:3px;gap:4px}.authenticated nav button[aria-current=page]{background:#25463e}.authenticated nav button[aria-current=page] .icon-label{color:#99ffe1}.authenticated nav .icon-tile{width:30px;height:30px;border-radius:10px}.authenticated nav .icon-tile svg{width:22px;height:22px}
.authenticated .screen video{height:min(43dvh,380px);max-height:none;object-fit:contain;background:#03090e;width:100%}.screen .empty{font-size:13px;border:0;min-height:180px;display:grid;place-items:center}.playback-line{display:flex;align-items:center;gap:5px;padding:2px 8px}.playback-line output{font-size:11px;white-space:nowrap;color:#ccdfec;float:none}.playback-line input{flex:1;min-width:20px;min-height:28px;margin:0}.playback-line button[data-icon]{padding:0;min-width:38px;width:38px}.playback-line .icon-tile{background:transparent;box-shadow:none;width:26px;height:26px}.task-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:3px 8px 8px}.task-row .icon-tile{width:38px;height:38px;border-radius:13px}.task-row .icon-tile svg{width:26px;height:26px}.task-row .icon-label{font-size:13px}.reel-tools{display:flex;justify-content:flex-end;gap:7px;margin-top:4px}.reel-tools button{min-width:68px}#renderSelect{margin:4px 0 7px;font-size:14px}#jobs:empty{display:none}#jobs progress{width:100%;accent-color:var(--accent);height:4px}#jobs small{font-size:12px}.screen p{margin:0}
.authenticated .messages{flex:1;min-height:20px;max-height:none;margin:0;gap:8px;overflow-y:auto;padding:5px 0}.message{padding:10px;font-size:14px;line-height:1.45}.message.user{margin-left:16px}.message small{font-size:11px;margin-bottom:3px}.authenticated #plans{flex:none;max-height:32px;overflow:auto;font-size:12px}.authenticated #plans:empty{display:none}.authenticated .composer{position:static;flex:none;display:grid;grid-template-columns:minmax(0,1fr) 62px;gap:7px;padding:5px 0;background:var(--bg)}.authenticated .composer textarea{height:94px;min-height:56px;max-height:110px;resize:none;margin:0;font-size:16px}.authenticated .composer button{width:62px;margin:0;padding:4px}.authenticated .composer .icon-tile{width:38px;height:38px}.authenticated [data-panel=chat]>details{flex:0 1 auto;max-height:28dvh;overflow:auto;margin:0 0 4px;padding:7px 10px}.authenticated [data-panel=chat]>details>summary{font-size:12px;min-height:24px}
.narration-scene-video{width:100%;max-height:34dvh;min-height:100px;object-fit:contain;background:#03090e;border-radius:12px}.scene-record-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;position:sticky;bottom:0;background:var(--card);z-index:1;padding:4px 0}.scene-record-tools button{min-width:0}.voice-take{padding:9px;border:1px solid var(--line);border-radius:12px;margin:9px 0}.voice-take audio{width:100%;max-height:40px}.voice-take .row{gap:6px}.voice-take .row label{flex-basis:100px}.voice-take .row button{flex:1}.voice-take small{font-size:12px}.edit-page h3{font-size:15px}.edit-page p{font-size:13px;line-height:1.4;margin:6px 0}#sceneRecordState{font-size:12px;color:var(--accent)}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.dialog-head h3{font-size:18px}.dialog-head button{flex:none}dialog{max-height:calc(var(--workspace-height,100dvh) - 24px);overflow:auto;overscroll-behavior:contain;padding:14px;border-radius:20px}dialog .panel{padding:10px}dialog label{font-size:13px}dialog p{font-size:13px}.publish-options{margin-top:12px;border-top:1px solid var(--line)}.publish-options .primary{min-height:44px}.cover-preview{width:46%;max-height:220px;object-fit:contain;border-radius:12px}.danger{color:white;background:#852f3b}.panel pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow:auto}
.next-action{outline:2px solid #7bffe0;outline-offset:1px;animation:next-step-pulse 1.8s ease-in-out infinite}@keyframes next-step-pulse{0%,100%{box-shadow:0 0 0 0 #69ead320}50%{box-shadow:0 0 0 4px #69ead355}}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.app-navigation,nav,button,summary,#nextHint{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
@media(max-height:600px){.authenticated>header{display:none}.authenticated .projectbar{display:none}.authenticated .composer textarea{height:56px}.authenticated [data-panel=chat]>details{display:none}.authenticated nav button[data-icon]{flex-direction:row;min-height:44px}.authenticated nav .icon-tile{width:25px;height:25px}.authenticated #main{padding-bottom:56px}.authenticated .screen video{height:35dvh}.next-hint{margin-bottom:3px;max-height:32px;font-size:11px}.edit-tabs .icon-tile{width:26px;height:26px}.edit-tabs button[data-icon]{flex-direction:row;gap:5px}}
@media(prefers-reduced-motion:reduce){.next-action{animation:none;box-shadow:0 0 0 2px #69ead344}}@media(min-width:620px){.authenticated .asset img{height:120px}.authenticated [data-panel=reels]{padding-inline:12px}.authenticated .screen video{height:min(48dvh,440px)}}
summary[data-icon]{display:flex;align-items:center;gap:7px;min-height:28px;padding:2px 0}summary[data-icon] .icon-tile{width:24px;height:24px;border-radius:8px}summary[data-icon] .icon-tile svg{width:17px;height:17px}summary[data-icon]::after{content:'⌄';margin-left:auto;color:var(--muted)}details[open]>summary[data-icon]::after{content:'⌃'}
[data-tone=green]>.icon-tile,[data-icon=check]>.icon-tile,[data-icon=play]>.icon-tile,[data-icon=pause]>.icon-tile{color:#062e25}[data-tone=orange]>.icon-tile,[data-icon=mic]>.icon-tile,[data-icon=scissors]>.icon-tile{color:#3b150c}[data-tone=purple]>.icon-tile,[data-icon=chat]>.icon-tile,[data-icon=sparkles]>.icon-tile{color:#251242}

.screen:fullscreen{display:flex;flex-direction:column;justify-content:center;background:#03090e;border:0;padding:10px}.screen:fullscreen video{flex:1;min-height:0;height:auto;max-height:none}.screen:fullscreen .task-row,.screen:fullscreen .playback-line{flex:none;width:100%;max-width:600px;margin-inline:auto}
/* Numbered task pages: selection lists scroll; focused tasks use short subpages. */
.authenticated .brand small{display:none}.authenticated>header{min-height:34px}.authenticated h1{font-size:17px}.authenticated .mark{width:26px;height:26px}.authenticated header button[data-icon]{min-height:34px;padding:2px 4px}.authenticated header .brand{flex:1}.authenticated #main{padding-bottom:calc(65px + env(safe-area-inset-bottom))}.authenticated .projectbar{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) auto;align-items:center;margin:4px 0;gap:5px}.authenticated .projectbar label{font-size:0}.authenticated .projectbar>button{display:none}.authenticated .projectbar select{min-height:36px;height:36px;margin:0;padding:5px;font-size:13px}.app-navigation{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;min-height:44px}.page-title{font-size:16px;font-weight:700;line-height:1.25;text-align:center;color:#edfff9}.next-hint{font-size:12px;line-height:1.25;margin:2px 0 5px;padding:4px 6px;max-height:36px}.app-navigation button[data-icon] .icon-label{position:static;width:auto;height:auto;overflow:visible;clip-path:none;font-size:10px}.app-navigation .icon-tile{height:22px;width:22px}.app-navigation button[data-icon]{gap:0;min-height:44px}
.authenticated nav{grid-template-columns:repeat(8,minmax(0,1fr));padding:4px 4px calc(4px + env(safe-area-inset-bottom));gap:0}.authenticated nav button[data-icon]{min-width:0;min-height:54px;padding:3px 0;gap:3px}.authenticated nav .icon-tile{height:26px;width:26px}.authenticated nav .icon-label{font-size:11px}.authenticated nav .icon-tile svg{width:19px;height:19px}.authenticated .task-page{overflow:auto;padding:5px 3px 8px;position:relative}.task-page>.form-part,.task-page>.page-body{height:100%;display:flex;flex-direction:column;gap:9px;justify-content:flex-start}.form-part>label{margin:4px 0;font-size:14px}.form-part>button{align-self:center;margin-top:auto}.form-part p{font-size:13px;line-height:1.4;margin:4px 0}.task-page input,.task-page select,.task-page textarea{font-size:16px}.page-actions,.mini-actions{display:flex;align-items:center;justify-content:space-evenly;gap:6px;flex:none}.page-actions button{flex:1;max-width:110px;min-width:0}.mini-actions button{padding:3px;min-height:40px}.mini-actions .icon-tile{width:24px;height:24px}.mini-actions .icon-label{font-size:11px}
#pageDown{position:absolute;bottom:calc(68px + env(safe-area-inset-bottom));right:5px;z-index:4;width:44px;height:32px;min-height:32px;padding:0;background:#e0fff3;color:#08251f;border:0;border-radius:20px;box-shadow:0 2px 8px #0006;font-size:28px;line-height:1;animation:scroll-cue 1.7s ease-in-out infinite}@keyframes scroll-cue{50%{transform:translateY(3px)}}
.file-context{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#c4d6e3;margin:3px 0}.trim-summary{font-size:12px;color:#a7ffe2;line-height:1.3;margin:4px 0}.trim-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.trim-fields label{margin:4px 0}.trim-fields input{margin-top:3px}.task-page video{display:block;width:100%;object-fit:contain;background:#02090d;border-radius:12px}#trimVideo{height:min(27dvh,215px);flex:1;min-height:70px}#trimVideo+.trim-summary{flex:none}.task-page[data-panel=trim] .page-actions{margin-top:auto}.task-page[data-panel=source]{display:flex;flex-direction:column;gap:7px}#sourceVideo{flex:1;min-height:100px;height:25dvh}.task-page[data-panel=source]>button{align-self:center}
.shot-choice{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;margin:8px 0;padding:5px;background:var(--card)}.shot-choice.selected{border-color:var(--accent);background:#163b36}.shot-choice.excluded{opacity:.5}.choose-shot{display:flex;justify-content:flex-start;min-height:70px;flex:1;min-width:0;gap:9px;padding:4px;background:transparent;border:0;text-align:left}.choose-shot img{height:60px;width:48px;object-fit:cover;border-radius:7px}.choose-shot span{flex:1;min-width:0}.choose-shot strong,.choose-shot small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.shot-choice>input{flex:none;width:23px;height:23px;margin:0 5px}
.task-page[data-panel=voice]{display:flex;flex-direction:column;gap:5px}.task-page[data-panel=voice] #narrationSceneVideo{flex:1;min-height:90px;max-height:none;height:20dvh}.scene-record-tools{position:static;padding:0;background:transparent}.task-page[data-panel=voice] #sceneRecordState{font-size:12px;margin:2px 0;max-height:36px;overflow:hidden}.task-page[data-panel=reels]{display:flex;flex-direction:column}.task-page[data-panel=reels] .screen{flex:1;min-height:0;display:flex;flex-direction:column}.task-page[data-panel=reels] #preview{height:15dvh;max-height:none;min-height:60px;flex:1}.task-page[data-panel=reels] .playback-line,.task-page[data-panel=reels] .task-row{flex:none}.task-page[data-panel=reels] .task-row{grid-template-columns:repeat(2,1fr)}.task-page[data-panel=export]{display:flex;flex-direction:column;gap:14px}.task-page[data-panel=export] #exportConfirm{align-self:center;margin-top:auto}.task-page[data-panel=export] p{font-size:14px;line-height:1.4}
.task-page[data-panel=chat]{display:flex;flex-direction:column}.task-page[data-panel=chat] .composer{flex:none}.task-page[data-panel=menu]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:8px}.task-page[data-panel=share],.task-page[data-panel=tools]{display:flex;flex-direction:column;align-items:stretch;gap:12px}.task-page[data-panel=share]>button,.task-page[data-panel=tools]>button{flex:0 0 auto;min-height:70px}.task-page[data-panel=publish-review] img{max-height:130px}.task-page[data-panel=publish-review]>p{font-size:12px;margin:5px 0}.task-page[data-panel=cleanup-review] pre{max-height:150px;overflow:auto}.voice-take-choice{display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius:12px;padding:10px;margin:8px 0}.voice-take-choice small{display:block;font-size:12px}
@media(max-height:600px){.authenticated .projectbar,.authenticated>header{display:none}.authenticated #main{padding-bottom:56px}.authenticated nav button[data-icon]{flex-direction:column;min-height:46px;gap:0}.authenticated nav .icon-tile{height:21px;width:21px}.authenticated nav .icon-label{font-size:10px}.page-title{font-size:14px}.next-hint{font-size:11px;max-height:28px}.task-page>.page-body{gap:3px}#trimVideo{height:70px;min-height:50px}.trim-summary,.file-context{font-size:11px}.trim-fields label{font-size:12px!important;margin:2px 0}.trim-fields input{min-height:38px!important;height:38px}.page-actions button[data-icon]{flex-direction:row;gap:4px;padding:3px;min-height:40px}.page-actions .icon-tile{height:24px;width:24px}.page-actions .icon-label{font-size:10px}.task-page[data-panel=voice] #narrationSceneVideo{min-height:50px}.form-part>label{font-size:12px;margin:0}.form-part input,.form-part select{min-height:38px;height:38px}.task-page>.form-part{gap:5px}.task-page[data-panel=chat] .composer textarea{height:54px}.mini-actions .icon-label{font-size:10px}.mini-actions button[data-icon]{flex-direction:row;min-height:30px}.task-page[data-panel=export]{gap:5px}.task-page[data-panel=export] label{margin:2px 0}.task-page[data-panel=export] p{font-size:12px;margin:2px 0}#pageDown{bottom:59px}}
@media(max-width:350px){.authenticated nav{grid-template-columns:repeat(4,1fr)}.authenticated nav button[data-icon]{flex-direction:row;min-height:42px}.authenticated #main{padding-bottom:94px}#pageDown{bottom:96px}}
@media(prefers-reduced-motion:reduce){#pageDown{animation:none}}
/* Only the listing area scrolls; the list's actions remain in view. */
.authenticated .task-page[data-panel=shots],.authenticated .task-page[data-panel=clips],.authenticated .task-page[data-panel=voice-takes],.authenticated .task-page[data-panel=accounts]{display:flex;flex-direction:column;overflow:hidden}.task-page[data-panel=shots]>#clipEditor,.task-page[data-panel=clips]>#assets,.task-page[data-panel=voice-takes]>#sceneTakeList,.task-page[data-panel=accounts]>#publishDestinations{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.task-page[data-panel=clips]>.gallery{align-content:start}.task-page[data-panel=shots]>.page-actions{flex:none}.task-page[data-panel=shots]>.page-actions:first-child{margin-bottom:5px}.task-page[data-panel=shots]>.page-actions:last-child{margin-top:5px}.task-page[data-panel=voice-takes]>#sceneTakeList{width:100%}

/* Repeated-task repair: cleanup fields and action stay together. */
.authenticated .task-page[data-panel=cleanup-review]{display:flex;flex-direction:column;gap:6px;overflow:auto}
.task-page[data-panel=cleanup-review] #cleanupList{flex:1 1 80px;min-height:38px;max-height:160px;overflow:auto;margin:0;font-size:11px}
.authenticated .task-page[data-panel=cleanup-review]>label{flex:none;margin:0;font-size:12px}
.task-page[data-panel=cleanup-review] input,.task-page[data-panel=cleanup-review] select{margin-top:2px}
.task-page[data-panel=cleanup-review]>button{flex:none;align-self:center;margin:0;min-height:44px}
.task-page[data-panel=clips] #assets{grid-auto-rows:max-content}
.task-page[data-panel=clips] .asset{min-height:154px}
.authenticated header button[data-page=menu] .icon-label{position:static;width:auto;height:auto;overflow:visible;clip-path:none;font-size:10px}
@media(max-height:600px){.task-page[data-panel=cleanup-review]{gap:3px}.task-page[data-panel=cleanup-review] #cleanupList{flex-basis:38px;max-height:60px}.task-page[data-panel=cleanup-review] input,.task-page[data-panel=cleanup-review] select{min-height:34px;height:34px;padding:4px}.task-page[data-panel=cleanup-review]>button[data-icon]{flex-direction:row;gap:5px;min-height:38px;padding:3px}.task-page[data-panel=cleanup-review]>button .icon-tile{width:25px;height:25px}.task-page[data-panel=cleanup-review] input[type=checkbox]{height:19px;min-height:19px}}

/* Minimal welcome screen; authenticated editing layout is preserved. */
body:not(.authenticated){max-width:none;min-height:100dvh;padding:24px 18px;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 12% 12%,#45387460,transparent 46%),radial-gradient(ellipse at 95% 52%,#146c7655,transparent 48%),radial-gradient(ellipse at 40% 105%,#70443835,transparent 45%),#080f20}
body:not(.authenticated)>header,body:not(.authenticated)>footer,body:not(.authenticated)>#notice:not(.visible){display:none}
body:not(.authenticated)>#notice.visible{position:fixed;z-index:10;top:8px;left:5%;width:90%;margin:0;padding:10px;background:#152f3b;border:1px solid #63827c;border-radius:12px;color:#e3fff6}
body:not(.authenticated) .login{width:min(100%,430px);max-width:430px;padding:0;display:flex;flex-direction:column;align-items:center}
body:not(.authenticated) .login h2{font-size:clamp(25px,6vw,34px);line-height:1.2;letter-spacing:-.8px;margin:0;text-align:center;color:#f3f5ff;font-weight:700}
.studio-camera{display:block;width:100%;height:auto;max-height:230px;margin:16px 0 8px;flex:none}
.login-controls{width:100%;padding:16px 20px 20px;border:1px solid #6678aa44;background:linear-gradient(135deg,#182640bd,#101d32ca);border-radius:22px;box-shadow:0 16px 48px #0003}
.login-controls label{font-size:13px;margin:0 0 14px;color:#c4d1e4}.login-controls input[type=password]{background:#091328c9;border-color:#4b627b;min-height:48px}.login-controls .check{display:flex;align-items:center;margin:4px 0 18px;font-size:13px;min-height:24px}.login-controls .primary{width:100%;min-height:48px;background:linear-gradient(100deg,#8a87ec,#68dbcf);color:#081d2a;border:0;font-size:15px;font-weight:750}
.login .welcome-credit{font-size:11px;color:#a5b4c9;margin-top:24px;text-align:center;letter-spacing:0;line-height:1.5}
@media(max-height:650px){body:not(.authenticated){padding-block:14px}.studio-camera{max-height:150px;margin:8px 0}.login .welcome-credit{margin-top:14px}.login-controls{padding:12px 16px}}

/* A destructive confirmation is an action, never the Next arrow. */
.authenticated .task-page[data-panel=cleanup-review]>button[data-action=confirmCleanup]{display:flex;flex-direction:row;gap:10px;width:100%;max-width:none;min-height:46px;padding:8px 12px;background:#9e3148;border:1px solid #dc8294;color:#fff;border-radius:12px}
.task-page[data-panel=cleanup-review]>button[data-action=confirmCleanup] .icon-tile{background:transparent;box-shadow:none;color:#fff;width:26px;height:26px}
.task-page[data-panel=cleanup-review]>button[data-action=confirmCleanup] .icon-label{font-size:14px;font-weight:700}
