@media not (min-width:1100px){:root{--mobile-gutter:clamp(16px, 3vw, 30px);--mobile-target:44px;--mobile-safe-bottom:env(safe-area-inset-bottom,0px)}html,body,.authorization-page,.account-page,.account-shell,.account-column,.account-page.script-page,.account-shell.character-workspace.script-workspace{min-width:0;min-height:0}body{overflow-wrap:anywhere}.account-page,.authorization-page{min-height:100dvh}.account-shell,.account-shell.character-workspace.script-workspace{grid-template-columns:minmax(0,1fr);align-content:start;overflow:visible}.account-column,.script-workspace .account-column,.video-stage-layout,.final-stage-layout,.frame-inspector-column{grid-template-rows:none;align-content:start;min-width:0}.account-column,.account-content{grid-template-columns:minmax(0,1fr)}.authorization-page{background:var(--surface-form);padding:0;display:block}.authorization-shell{aspect-ratio:auto;background:var(--surface-form);width:100%;min-width:0;min-height:100dvh;box-shadow:none;border:0;border-radius:0;flex-direction:column;display:flex}.brand-panel{padding:26px var(--mobile-gutter) 14px;background:0 0}.brand-logo{display:block;position:static}.brand-copy{display:none}.form-panel{padding:14px var(--mobile-gutter) 24px;align-items:flex-start}.auth-card{max-width:480px}.language-switcher{width:max-content;margin:12px var(--mobile-gutter) calc(16px + var(--mobile-safe-bottom)) auto;position:static}.language-switcher button{min-width:var(--mobile-target);min-height:var(--mobile-target)}.account-rail:not(.character-project-rail){height:auto;padding:10px var(--mobile-gutter);border-right:0;border-bottom:1px solid var(--border-shell);background:var(--surface-card);grid-template-columns:minmax(81px,1fr) minmax(0,max-content);align-items:center;gap:8px;display:grid;position:static}.account-rail:has(>a.account-user-compact){grid-template-columns:minmax(81px, 1fr) minmax(0, max-content) var(--mobile-target)}.account-rail:not(.character-project-rail) :is(.account-logo-link,.account-new-project,.account-nav,.account-user-compact,.project-steps){width:auto;min-width:0;height:auto;position:static}.account-rail:not(.character-project-rail) .account-logo-link{min-height:var(--mobile-target);align-items:center;display:flex}.account-new-project{text-align:center;padding:8px 10px}.account-nav-label,.account-rail>div.account-user-compact,.account-nav>span.account-nav-item:not(.account-nav-item-active),.account-rail:not(.character-project-rail)>.project-steps-label{display:none}.account-rail:not(.character-project-rail)>a.account-user-compact{width:var(--mobile-target);min-height:var(--mobile-target);border:0;justify-content:center;padding:0}.account-rail>a.account-user-compact>span:last-child{display:none}.account-nav{grid-column:1/-1;gap:8px;display:flex}.account-nav-item{min-width:0;min-height:var(--mobile-target);flex:1 1 0;height:auto}.account-header{min-height:54px;padding:8px var(--mobile-gutter);background:var(--surface-card);flex-wrap:wrap;gap:8px}.account-header-actions,.projects-header-title,.projects-header-filters,.account-projects-heading,.account-project-filters{flex-wrap:wrap}.account-header-actions{min-width:0;margin-inline-start:auto}.account-projects-heading{gap:6px 10px}.account-project-filters{flex:0 0 100%;margin-inline-start:0}.projects-header-filters{width:100%}.projects-header-filters a,.account-project-filters a{align-items:center;display:inline-flex}.account-content,.projects-content,.project-form-content,.character-library-content,.location-library-content,.character-detail-content,.script-content,.frames-content,.frame-inspector-content,.video-stage-content,.final-stage-content{min-width:0;padding:18px var(--mobile-gutter) calc(24px + var(--mobile-safe-bottom));overflow:visible}.account-content{gap:12px}.account-profile-card,.account-projects-card,.account-empty-card{border-radius:8px;min-width:0;min-height:0;padding:14px}.account-profile-card{gap:12px}.account-profile-card>div{min-width:0}.account-profile-card .account-avatar{flex-basis:48px;width:48px;height:48px}.account-active-project{min-height:0}.account-current-project-main{grid-template-columns:88px minmax(0,1fr);gap:10px}.account-project-cover-current{aspect-ratio:16/9;width:100%;height:auto}.account-current-project-copy h2,.account-project-tile-copy h3{white-space:normal}.account-project-tile-copy h3{-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:2lh;display:-webkit-box}.account-project-tile-meta{flex-wrap:wrap}.account-project-grid,.character-library-panel:not(.character-library-empty),.location-library-grid:not(.location-library-empty){--card-min:128px;--card-gap:12px;grid-template-columns:repeat(auto-fill, minmax(min(100%, max(var(--card-min), (100% - 3 * var(--card-gap)) / 4)), 1fr));gap:var(--card-gap)}.account-project-grid{--card-min:116px;--card-gap:10px}.projects-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:10px}.projects-active-card,.projects-card{border-radius:8px;min-height:0;padding:12px}.projects-active-card{gap:12px}.projects-active-preview{flex-basis:96px;width:96px;height:62px}.projects-active-copy>div{flex-wrap:wrap}.projects-card-copy h2,.projects-card-copy p{overflow-wrap:anywhere;white-space:normal}.project-form-content{display:block}.project-form{width:100%;max-width:540px;margin-inline:auto}.project-format-card img{aspect-ratio:2}.project-create-button{width:100%}.account-shell .character-project-rail,.script-workspace .character-project-rail{z-index:10;grid-template-columns:var(--mobile-target) minmax(0, 1fr) var(--mobile-target);height:auto;min-height:0;padding:calc(6px + env(safe-area-inset-top,0px)) var(--mobile-gutter) 8px;border-right:0;border-bottom:1px solid var(--border-shell);background:var(--surface-card);grid-template-areas:"menu project return""steps steps steps";align-items:center;gap:6px 10px;display:grid;position:sticky;top:0}.account-shell .character-project-rail :is(.account-logo-link,.character-project-label,.character-steps-label){display:none}.account-shell .character-project-rail .character-project-summary{background:0 0;border:0;grid-area:project;min-width:0;min-height:0;padding:2px 0;display:flex;position:static}.character-project-summary strong{font-size:14px;font-weight:700}.character-project-summary span{font-size:11px}.account-shell .character-project-rail .project-step-controls{display:contents}.account-shell .character-project-rail .project-step-controls>:is(a,button){width:var(--mobile-target);height:var(--mobile-target);padding:0;font-size:0}.character-project-rail .project-step-controls>a{grid-area:menu}.character-project-rail .project-step-controls>button{grid-area:return}.character-project-rail .project-step-controls>a:before{content:"☰" / "";font-size:20px}.character-project-rail .project-step-controls>button:before{content:"↶" / "";font-size:22px}.account-shell .character-project-steps,.account-rail:not(.character-project-rail)>.project-steps{flex-direction:row;grid-area:steps;justify-content:space-between;align-items:center;gap:3px;min-width:0;display:flex;position:static}.account-rail:not(.character-project-rail)>.project-steps{grid-area:auto/1/auto/-1}.project-steps li{gap:0;min-width:0;height:28px;padding:0;font-size:0}.project-steps li>span{border-radius:5px;flex:0 0 23px;width:23px;height:23px}.project-steps .project-step-active{background:#e8a83b2e;border-radius:6px;gap:4px;height:auto;min-height:28px;padding:2px 4px;font-size:11px;line-height:1.2}.project-steps .project-step-processing:after{flex:0 0 12px;margin-left:0}.character-project-header,.script-workspace .character-project-header{border:0;min-height:0;padding:0}.character-project-header>:is(strong,.character-style-chip,.character-stage-badge){display:none}.character-project-header>:is(.character-header-neighbours,.final-stage-process-badge){margin:8px var(--mobile-gutter)}.character-library-heading,.location-library-heading,.frames-heading,.frame-inspector-heading,.video-stage-heading,.final-stage-title-row{flex-flow:wrap;align-items:flex-start;gap:12px;min-height:0}:is(.character-library-heading,.location-library-heading,.frames-heading,.video-stage-heading,.final-stage-title-row)>div:first-child{flex:300px;min-width:0}.character-heading-actions,.location-heading-actions,.frames-heading-actions,.video-stage-heading-actions,.frame-inspector-heading>div:last-child,.frames-recovery-error>div,.frame-prompt-actions,.video-candidate-blocker{flex-wrap:wrap}:is(.character-heading-actions,.location-heading-actions,.frames-heading-actions,.video-stage-heading-actions){min-width:0;max-width:100%}.character-library-panel,.location-library-grid{margin-top:14px}.character-library-empty,.location-library-empty{place-content:start;min-height:0}.character-empty-state{width:100%}.character-add-card,.location-add-card{border-radius:8px;min-height:160px;padding:12px}.character-draft-card,.location-card{border-radius:8px;min-width:0}.character-draft-card h2,.location-card h2{white-space:normal}.generation-failed-actions,.character-header-neighbours{flex-wrap:wrap}.character-detail-actions{grid-template-columns:repeat(auto-fit,minmax(min(100%,max(125px,25% - 6px)),1fr));align-items:stretch;gap:8px}.character-detail-actions>:is(a,button){min-height:var(--mobile-target);text-align:center}.character-detail-meta{grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:12px}.character-detail-grid,.location-detail-grid,.script-editor-layout,.script-editor-layout-with-issues,.script-template-card,.frame-inspector-grid,.voice-text-grid,.montage-grid,.final-video-layout{grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));align-items:start;gap:12px}.frame-inspector-grid,.character-detail-grid,.location-detail-grid{height:auto;min-height:0}.candidate-comparison-grid,.frame-prompt-comparison>div,.video-version-grid,.video-prompt-detail-content,.voice-text-version-grid,.tts-ready-grid,.tts-version-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px}.frames-grid,.video-prompt-grid,.video-result-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:12px}.script-entities,.script-agent-scene-details,.video-detail-content{grid-template-columns:minmax(0,1fr);gap:12px}.character-detail-portrait,.character-detail-info,.location-detail-image,.frame-inspector-card,.voice-text-card,.voice-text-version-grid article,.montage-assets-card,.final-video-layout{min-width:0;min-height:0}.character-detail-portrait>img,.character-detail-placeholder{aspect-ratio:4/5;height:auto}.location-detail-image>img{aspect-ratio:16/9;height:auto}.candidate-version-card{min-width:0}.candidate-version-card>p{min-height:0}.candidate-version-actions,.frame-prompt-candidate-actions{flex-wrap:wrap}.script-agent-chat-revisions .script-agent-history{min-height:220px;max-height:45dvh}.script-agent-history{min-height:240px;max-height:55dvh}.script-agent-composer>div,.script-agent-proposal>header,.script-agent-screenplay-scene>header{flex-wrap:wrap}.script-agent-proposal-review{min-height:0;padding:16px}.script-agent-message{max-width:100%}.script-agent-screenplay-prose p{overflow-wrap:anywhere}.frames-footer-card,.video-stage-footer,.video-stage-footer>div{flex-wrap:wrap;gap:8px}.frames-size-control{display:none}.video-stage-footer>div:has(>button){display:none}.frame-card-actions a,.video-prompt-actions>:is(a,button){width:100%}.frames-preparing-panel,.video-stage-preparing{padding:14px}.frame-inspector-shell,.frame-inspector-layout{min-width:0;height:auto;min-height:0;overflow:visible}.frame-inspector-layout{grid-template-columns:minmax(0,1fr)}.frame-scene-list{min-width:0;height:auto;min-height:0;padding:10px var(--mobile-gutter);border-right:0;border-bottom:1px solid var(--border-shell);background:var(--surface-card);position:static}.frame-scene-list>p{margin:0 0 6px}.frame-scene-list nav{overscroll-behavior-inline:contain;gap:6px;min-width:0;padding-bottom:6px;display:flex;overflow-x:auto}.frame-scene-list nav a{flex:0 0 76px;grid-template-columns:auto minmax(0,1fr);gap:4px;min-height:64px;padding:5px}.frame-scene-list nav a small{grid-column:1/-1}.frame-scene-thumb{width:100%}.frame-scene-list-controls{border:0;padding:6px 0 0;position:static}.frame-inspector-header{min-height:0;padding:10px var(--mobile-gutter);flex-wrap:wrap;gap:7px}.frame-inspector-header>strong{white-space:normal;flex:1 0 100%;max-width:none}.frame-inspector-header>div{flex-wrap:wrap;margin-left:0}.frame-inspector-image{aspect-ratio:16/9;height:auto;min-height:0}.frame-image-panel{grid-template-rows:auto auto}.frame-prompt-panel{grid-template-rows:auto auto auto}.frame-prompt-panel textarea{min-height:160px}.video-stage-tabs,.final-stage-tabs,.frame-inspector-tabs{min-width:0;min-height:var(--mobile-target);padding:0 var(--mobile-gutter);flex-wrap:wrap;gap:0 10px}.final-stage-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;display:grid}.final-stage-tabs a,.video-stage-tabs button,.frame-inspector-tabs>:is(a,span){min-height:var(--mobile-target);text-align:center;white-space:normal;justify-content:center;height:auto;padding:6px 2px}.final-stage-tabs a{flex-direction:column;gap:2px;font-size:11px}.final-stage-tabs a span{white-space:normal;padding:2px 3px;font-size:8px}.video-prompt-detail-content pre,.video-version-grid pre{overflow-wrap:anywhere;min-height:0;max-height:42dvh}.video-version-grid video,.video-version-placeholder{aspect-ratio:16/9;height:auto;min-height:0}.video-prompt-detail-actions{flex-wrap:wrap}.video-prompt-detail-actions>button{flex:120px}.voice-text-card{grid-template-rows:auto auto}.voice-text-card>.voice-text-copy{padding:14px}.voice-text-card footer{flex-wrap:wrap;gap:6px;padding:10px 14px}.voice-gender-options{gap:8px}.voice-gender-options>button{grid-template-columns:30px minmax(0,1fr);gap:6px;min-height:56px;padding:8px}.voice-gender-options>button>:last-child{grid-column:2}.voice-preview-list article{grid-template-columns:auto minmax(0,1fr) auto;gap:8px}.voice-preview-list article>:is(audio,.voice-preview-loading){grid-area:2/1/auto/-1;width:100%;min-width:0}.voice-preview-list .voice-waveform{display:none}.voice-preview-list article>small{grid-area:1/3}.voice-preview-list article>button{grid-column:1/-1}.voice-choice-footer{flex-wrap:wrap;gap:10px;padding:12px}.voice-choice-footer>button,.tts-montage-card>button{width:100%;min-width:0}.voice-choice-footer[data-selected=true]{z-index:3;bottom:max(8px, var(--mobile-safe-bottom));grid-template-columns:minmax(0,1fr) minmax(0,2fr);display:grid;position:sticky;box-shadow:0 2px 8px #2e29261f}.voice-preview-list :is(button,audio){scroll-margin-block-end:96px}.tts-version-player{grid-template-columns:minmax(0,1fr);gap:6px}.tts-version-player audio{width:100%}.montage-progress-card{grid-template-columns:28px minmax(0,1fr);gap:8px;padding:12px}.montage-progress-card>:is(time,button){grid-column:2}.montage-progress-icon{width:28px;height:28px}.montage-scene-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,72px),1fr))}.final-video-main,.final-video-scenes{grid-template-rows:auto auto}.final-video-file-card{flex-wrap:wrap;gap:10px;padding:12px}.final-video-file-card .stage-action-button{width:100%}.final-video-scenes li{grid-template-columns:18px 44px minmax(0,1fr) auto;gap:6px}.final-video-scenes li>div{width:44px}.final-stage-standalone-error{min-height:70dvh;padding:20px var(--mobile-gutter)}:is(.character-dialog-overlay,.project-dialog-overlay,.project-return-overlay){z-index:50;min-height:0;padding:max(10px, env(safe-area-inset-top,0px)) 0 0;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}:is(.character-dialog,.character-fix-dialog,.character-delete-dialog,.location-skip-dialog,.project-dialog,.project-delete-dialog,.project-return-dialog,.video-version-dialog){width:min(100%,560px);min-width:0;max-width:100%;max-height:calc(100dvh - max(10px, env(safe-area-inset-top,0px)));padding:16px var(--mobile-gutter) calc(16px + var(--mobile-safe-bottom));overscroll-behavior:contain;border-radius:16px 16px 0 0;overflow-y:auto}:is(.character-dialog,.character-fix-dialog,.character-delete-dialog,.location-skip-dialog,.project-dialog)>*{flex-shrink:0}:is(.character-dialog-actions,.character-delete-actions,.project-dialog-actions,.location-skip-actions,.project-return-actions){grid-template-columns:minmax(0,1fr);gap:8px;display:grid}:is(.character-dialog-actions,.character-delete-actions,.project-dialog-actions,.location-skip-actions,.project-return-actions)>button{width:100%}.project-return-options{max-height:none;overflow:visible}.project-return-options>button{grid-template-columns:32px minmax(0,1fr);gap:7px;padding:10px}.project-return-options em{text-align:left;grid-column:2}.video-version-dialog header>button{width:var(--mobile-target);min-width:var(--mobile-target);height:var(--mobile-target)}:is(.authorization-page,.account-page,.project-return-dialog) :is(input:not([type=file]):not([type=radio]):not([type=checkbox]),textarea,select){font-size:16px}:is(.authorization-page,.account-page,.project-return-dialog) button:not(.project-open-surface-button),:is(.account-new-project,.account-secondary-button,.account-project-filters a,.projects-header-filters a,.project-pagination>a,.character-stage-link,.character-header-neighbours a,.frame-scene-list-controls a,.frame-inspector-header a,.frame-inspector-content a,.frame-card-actions a,.stage-action-button){min-height:var(--mobile-target);white-space:normal;overflow-wrap:anywhere;max-width:100%}.stage-action-button{text-align:center;line-height:1.3}.loading-spinner{flex-shrink:0}}.mobile-stage-dock{display:contents}.mobile-stage-dock.mobile-stage-dock-mobile-only,.mobile-stage-dock>.mobile-stage-skip-empty{display:none}.voice-choice-footer>.mobile-stage-dock{display:contents}.tts-montage-card>.mobile-stage-dock>button{min-width:190px}.desktop-help,.script-confirm-details{display:contents}.script-agent-context>.desktop-help>p{grid-column:1/-1}.mobile-tap-help,.frame-mobile-controls,.frame-mobile-close-gallery,.frame-mobile-selected,.frame-mobile-status,.frame-mobile-error,.character-mobile-image-placeholder,.compact-state-icon,.compact-version-number{display:none}@media not (min-width:1100px){.frame-desktop-status,.frame-scene-list-controls{display:none}.frame-mobile-error,.frame-mobile-selected{display:inline}.frame-mobile-status{flex-wrap:wrap;align-items:center;gap:6px;display:inline-flex}.frame-mobile-version{white-space:nowrap;border-left:1px solid;padding-left:6px}.frame-mobile-controls{align-items:center;gap:8px;padding-bottom:8px;display:flex}.frame-mobile-close-gallery{min-height:44px;margin:12px var(--mobile-gutter) 0;border:1px solid var(--border-shell);background:var(--surface-form);color:var(--text-primary);border-radius:9px;justify-content:center;align-self:flex-start;align-items:center;gap:8px;padding:10px 14px;font:600 13px/1.5 Manrope,sans-serif;text-decoration:none;display:inline-flex}.compact-state-label{align-items:center;gap:6px;display:inline-flex}.location-card-meta{flex-wrap:wrap}.location-card-meta>.compact-state-pending,.character-draft-card .compact-state-pending{white-space:nowrap;flex-shrink:0}.location-card-meta .compact-state-text,.character-draft-card .compact-state-text{background:0 0;min-height:0;padding:0}.compact-state-icon{flex-shrink:0;display:block}.compact-version-status{align-items:center;gap:6px;display:inline-flex}.compact-version-number{border-left:1px solid;padding-left:6px;display:inline}.compact-state-ready{color:#407a5c}.compact-state-failed{color:var(--danger)}.compact-state-cancelled{color:var(--text-secondary)}.compact-state-label:not(.compact-state-pending)>.compact-state-text{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.frame-mobile-controls .project-step-controls{border:0;flex:1;gap:8px;width:auto;padding:0;display:flex;position:static;inset:auto}.frame-mobile-controls :is(a,button){border:1px solid var(--border-shell);width:44px;height:44px;color:var(--text-primary);background:var(--surface-card);border-radius:6px;place-items:center;text-decoration:none;display:grid}.frame-mobile-controls .project-step-controls>:is(a,button){padding:0;font-size:0}.frame-mobile-controls .project-step-controls>a:before{content:"☰" / "";font-size:20px}.frame-mobile-controls .project-step-controls>button:before{content:"↶" / "";font-size:22px}.frame-scene-list nav a small{justify-content:center;align-items:center;min-height:20px;display:flex}.character-preview-card{position:relative}.character-preview-card[data-preview-state=loading] .character-draft-card>img,.character-preview-card[data-preview-state=failed] .character-draft-card>img{visibility:hidden}.character-preview-card .character-mobile-image-placeholder{aspect-ratio:16/10;text-align:center;background:var(--surface-form);justify-content:center;align-items:center;gap:6px;padding:8px;font-size:11px;display:flex;position:absolute;inset:0 0 auto}.character-preview-card[data-mobile-zoom-ready=false]>.gallery-image-zoom,.character-preview-card[data-preview-state=loading] .generation-card:before,.desktop-help,.mobile-redundant-badge{display:none}:is(.character-library-heading,.location-library-heading,.frames-heading,.video-stage-heading,.final-stage-title-row)>div:first-child:has(>.mobile-tap-help){width:100%;min-height:44px;position:relative}:is(.character-library-heading,.location-library-heading,.frames-heading,.video-stage-heading,.final-stage-title-row)>div:first-child:has(>.mobile-tap-help)>h1{padding-right:44px}:is(.character-library-heading,.location-library-heading,.frames-heading,.video-stage-heading,.final-stage-title-row)>div:first-child>.mobile-tap-help{max-width:none;position:static}:is(.character-library-heading,.location-library-heading,.frames-heading,.video-stage-heading,.final-stage-title-row)>div:first-child>.mobile-tap-help>summary{position:absolute;top:0;right:0}:is(.character-library-heading,.location-library-heading,.frames-heading,.video-stage-heading,.final-stage-title-row)>div:first-child>.mobile-tap-help>div{border:1px solid var(--border-shell);background:var(--surface-form);border-radius:9px;margin-top:10px;padding:12px;position:static}:is(.character-library-heading,.location-library-heading,.frames-heading,.video-stage-heading,.final-stage-title-row)>div:first-child>.mobile-tap-help>div>p{margin:0}.mobile-tap-help{max-width:100%;display:block;position:relative}.mobile-tap-help>summary{cursor:pointer;width:44px;height:44px;color:var(--text-primary);place-items:center;list-style:none;display:grid}.mobile-tap-help>summary::-webkit-details-marker{display:none}.mobile-tap-help>div{overflow-wrap:anywhere;padding:8px 0}.script-heading>div{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.script-heading .mobile-tap-help[open]{flex-basis:100%}.script-agent-context{border-radius:8px;order:-1;gap:8px;padding:10px}.script-agent-context>.mobile-tap-help{grid-column:1/-1}.script-agent-context section>span{letter-spacing:0;margin-bottom:4px}.script-agent-context .mobile-tap-help>summary{height:44px}.script-agent-confirm{border-radius:8px;margin-top:10px;padding:10px}.script-agent-confirm>div{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.script-agent-confirm>div>span{letter-spacing:0;margin:0}.script-confirm-details{display:block}.script-agent-confirm .mobile-tap-help[open]{flex-basis:100%}.script-agent-chat,.script-agent-chat.script-agent-chat-revisions{flex-direction:column;max-height:none;display:flex;overflow:visible}.script-agent-chat .script-agent-history,.script-agent-chat.script-agent-chat-revisions .script-agent-history{min-height:96px;height:var(--script-chat-max-height,40dvh);max-height:var(--script-chat-max-height,40dvh);overscroll-behavior:contain;flex:0 auto;padding:12px;overflow-y:auto}.script-agent-chat .script-agent-composer{z-index:9;left:calc(var(--script-viewport-left,0px) + var(--mobile-gutter));width:calc(var(--script-viewport-width,100%) - 2 * var(--mobile-gutter));bottom:calc(var(--script-viewport-bottom,0px) + var(--mobile-stage-dock-height,80px));border:1px solid var(--border-shell);background:var(--surface-card);border-radius:8px 8px 0 0;flex-direction:column;gap:6px;padding:8px;display:flex;position:fixed}.script-agent-chat .script-agent-composer textarea{resize:none;border-radius:6px;flex:none;height:76px;min-height:56px;max-height:min(120px,20dvh);overflow-y:auto}.script-agent-composer>div{justify-content:flex-end}.mobile-approval-overlay{z-index:1100}.mobile-approval-sheet{padding:24px 20px calc(20px + var(--mobile-safe-bottom));color:var(--text-primary);font-family:Manrope,sans-serif}.mobile-approval-heading{align-items:flex-start;gap:12px;display:flex}.mobile-approval-heading h2{letter-spacing:-.02em;flex:1;margin:5px 0 0;font-size:20px;font-weight:700;line-height:1.35}.mobile-approval-close{appearance:none;border:1px solid var(--border-shell);width:44px;height:44px;color:var(--text-primary);cursor:pointer;background:0 0;border-radius:9px;flex:0 0 44px;place-items:center;display:grid}.mobile-approval-sheet>p{margin:16px 0 0;font-size:14px;line-height:1.65}.mobile-approval-sheet .project-dialog-actions{gap:10px;margin-top:24px}.mobile-approval-sheet .project-dialog-actions>button{appearance:none;white-space:normal;border-radius:9px;height:auto;min-height:48px;padding:12px 16px;font:700 14px/1.5 Manrope,sans-serif}.mobile-approval-sheet button:focus-visible{outline:2px solid var(--accent-border);outline-offset:3px}.mobile-stage-dock{z-index:8;padding:10px var(--mobile-gutter) calc(10px + var(--mobile-safe-bottom));border-top:1px solid var(--border-shell);background:var(--surface-card);gap:8px;display:flex;position:fixed;inset:auto 0 0}.mobile-stage-dock>:is(button,a){flex:1;width:100%;min-height:48px;margin:0}.mobile-stage-dock.mobile-stage-dock-mobile-only{display:flex}.mobile-stage-dock>.mobile-stage-skip-empty{display:block}.mobile-stage-continue-empty,.location-empty-skip-secondary{display:none}body:has(.mobile-stage-dock) .language-switcher{margin-bottom:calc(16px + var(--mobile-stage-clearance,80px) + var(--mobile-safe-bottom))}:is(.project-form,.character-library-content,.location-library-content,.frames-content,.script-content,.video-stage-content,.final-stage-content):has(.mobile-stage-dock){padding-bottom:calc(24px + var(--mobile-stage-dock-height,80px));scroll-padding-bottom:var(--mobile-stage-dock-height,80px)}.script-content:has(.mobile-stage-dock){padding-bottom:calc(24px + var(--mobile-stage-dock-height,80px) + var(--script-composer-height,160px))}.voice-choice-footer[data-selected=true]{box-shadow:none;position:static}.voice-choice-footer>.mobile-stage-dock{flex-direction:row;display:flex}.tts-montage-card>.mobile-stage-dock>button{min-width:0}.script-content .mobile-stage-dock{bottom:var(--script-viewport-bottom,0px);left:var(--script-viewport-left,0px);width:var(--script-viewport-width,100%);right:auto}}@media (600px<=width<1100px){.project-steps li{gap:4px;height:auto;min-height:28px;font-size:11px;line-height:1.2}.account-rail:not(.character-project-rail) .account-nav{justify-self:start}.frame-scene-list-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.frame-scene-list-controls button{min-height:var(--mobile-target);grid-column:auto}:is(.character-dialog-overlay,.project-dialog-overlay,.project-return-overlay){align-items:center;padding:16px}:is(.character-dialog,.character-fix-dialog,.character-delete-dialog,.location-skip-dialog,.project-dialog,.project-delete-dialog,.project-return-dialog,.video-version-dialog){border-radius:16px;max-height:calc(100dvh - 32px)}.video-version-dialog{width:min(100%,900px)}}@media (1100px<=width<1280px){.character-library-heading,.character-heading-actions,.frame-inspector-heading,.frame-inspector-heading>div:last-child{flex-wrap:wrap}.location-detail-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.character-detail-meta{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:12px}.frame-inspector-grid{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr)}}
.password-input{min-width:0;display:block;position:relative}.password-input>input{width:100%;padding-right:50px}.password-input>button{width:44px;height:100%;min-height:44px;color:var(--text-secondary);cursor:pointer;background:0 0;border:0;place-items:center;padding:0;display:grid;position:absolute;top:0;right:2px}.password-input>button:focus-visible{outline:2px solid var(--accent-border);outline-offset:-4px;border-radius:6px}.inspectable-image{border-radius:inherit;cursor:zoom-in;background:#eeece8;border:0;width:100%;min-width:0;height:100%;min-height:0;padding:0;line-height:0;display:block;position:relative;overflow:hidden}.inspectable-image>img{object-fit:contain;width:100%;height:100%;display:block}.image-enlarge-icon{border:1px solid var(--border-shell);width:32px;height:32px;color:var(--text-primary);background:#fffcfaf0;border-radius:6px;place-items:center;display:grid;position:absolute;bottom:8px;right:8px}.inspectable-image:focus-visible{outline:2px solid var(--accent-border);outline-offset:2px}.character-detail-portrait>.inspectable-image{border-radius:8px;flex:1}.character-reference-row>.inspectable-image{border-radius:6px;flex:0 0 68px;width:68px;height:68px}.fix-reference-preview>.inspectable-image{width:74px;height:60px;color:var(--text-primary);background:#eeece8;flex:0 0 74px;padding:0}.fix-reference-preview>.inspectable-image img{width:100%;height:100%}.character-reference-row .image-enlarge-icon,.fix-reference-preview .image-enlarge-icon{width:24px;height:24px;bottom:2px;right:2px}.montage-scene-grid .image-enlarge-icon,.final-video-scenes .image-enlarge-icon{display:none}.character-fix-summary>.inspectable-image,.character-delete-summary>.inspectable-image{border-radius:6px;flex:0 0 124px;width:124px;height:80px}.character-draft-card>img,.location-card>img,.character-create-reference img,.location-create-reference img,.character-photo-preview img,.location-photo-preview img,.character-photo-dropzone img,.frame-scene-thumb img,.frame-card img,.frames-grid img,.character-draft-card img,.location-card img,.candidate-version-media img,.character-fix-summary img,.character-delete-summary img,.video-prompt-media img,.video-scene-media video,.video-prompt-detail-media img{object-fit:contain}.image-viewer-overlay,.prompt-editor-overlay{z-index:1300;height:100dvh;min-height:0;position:fixed;inset:0}.image-viewer{color:#fff;background:#151515;flex-direction:column;width:100%;height:100%;min-height:0;display:flex}.image-viewer header{padding:max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));justify-content:space-between;align-items:center;gap:12px;display:flex}.image-viewer h2{overflow-wrap:anywhere;min-width:0;margin:0;font-size:15px;line-height:1.4}.image-viewer-tools{flex:none;gap:4px;display:flex}.image-viewer-tools button{color:#fff;cursor:pointer;background:#252525;border:1px solid #555;border-radius:6px;place-items:center;width:44px;height:44px;padding:0;display:grid}.image-viewer button:focus-visible{outline:2px solid var(--accent-fill);outline-offset:2px}.image-viewer-versions{justify-content:center;gap:6px;padding:0 12px 8px;display:flex}.image-viewer-versions button{color:#fff;cursor:pointer;background:#252525;border:1px solid #666;border-radius:6px;min-height:44px;padding:8px 16px}.image-viewer-versions button[aria-pressed=true]{border-color:var(--accent-fill);background:var(--accent-fill);color:#27231e}.image-viewer-stage{min-width:0;min-height:0;padding-bottom:env(safe-area-inset-bottom);flex:1;position:relative;overflow:hidden}.image-zoom-wrapper,.image-zoom-content{width:100%!important;height:100%!important}.image-zoom-wrapper{touch-action:none}.image-zoom-content>img{object-fit:contain;-webkit-user-select:none;user-select:none;width:100%;height:100%;display:block}.image-viewer-error{text-align:center;background:#292929;padding:12px;position:absolute;bottom:12px;left:12px;right:12px}.image-viewer-loading{pointer-events:none;place-items:center;display:grid;position:absolute;inset:0}.uploaded-reference-zoom{border:1px solid var(--border-shell);background:var(--surface-form);border-radius:6px;width:44px;height:44px;margin:6px 0 0 auto}.uploaded-reference-zoom>img{display:none}.uploaded-reference-zoom .image-enlarge-icon{background:0 0;border:0;width:100%;height:100%;position:static}.media-inspection-card{min-width:0;position:relative}.media-inspection-card>:is(.character-card-link,.location-card-link){height:100%}.gallery-image-zoom{z-index:2;border:1px solid var(--border-shell);background:#fffcfaf0;border-radius:6px;width:44px;height:44px;position:absolute;top:8px;right:8px}.gallery-image-zoom>img{display:none}.gallery-image-zoom .image-enlarge-icon{background:0 0;border:0;width:100%;height:100%;position:static}.responsive-comparison{min-width:0}.comparison-switch{display:none}.comparison-panel{display:contents}.comparison-panel>:is(article,section){min-width:0}.frame-prompt-comparison>.responsive-comparison{display:block}.frame-prompt-comparison-panels{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;display:grid}.scene-navigation{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;padding:0 0 14px;display:none}.scene-navigation>button{border:1px solid var(--border-shell);background:var(--surface-form);min-width:0;min-height:44px;color:var(--text-primary);font:inherit;cursor:pointer;border-radius:6px;justify-content:center;align-items:center;gap:4px;padding:6px 10px;display:flex}.scene-navigation>button:disabled{cursor:default;opacity:.4}.scene-navigation>button span{overflow-wrap:anywhere;min-width:0}.scene-navigation>span{color:var(--text-secondary);white-space:nowrap;font-size:12px}.prompt-editor-inline{min-width:0;min-height:0;display:flex;position:relative}.frame-prompt-panel .prompt-editor-inline textarea{resize:vertical;min-height:160px;padding-right:52px}.prompt-editor-expand{border:1px solid var(--border-shell);background:var(--surface-form);width:40px;height:40px;color:var(--text-primary);cursor:pointer;border-radius:6px;place-items:center;padding:0;display:grid;position:absolute;top:6px;right:6px}.prompt-editor-overlay{background:#00000073;place-items:center;padding:24px;display:grid}.prompt-editor-dialog{background:var(--surface-form);border-radius:8px;flex-direction:column;width:min(100%,980px);height:min(100%,860px);min-height:0;display:flex;overflow:hidden}.prompt-editor-dialog header{border-bottom:1px solid var(--border-shell);flex:none;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;display:flex}.prompt-editor-dialog h2{overflow-wrap:anywhere;min-width:0;margin:0;font-size:17px}.prompt-editor-dialog header button{border:1px solid var(--border-shell);cursor:pointer;background:0 0;border-radius:6px;flex:none;place-items:center;width:44px;height:44px;padding:0;display:grid}.prompt-editor-dialog>textarea{resize:none;outline-offset:-2px;background:var(--surface-form);width:100%;min-height:80px;color:var(--text-primary);border:0;flex:1;padding:18px;font:400 16px/1.65 Manrope,sans-serif;display:block;overflow-y:auto}.prompt-editor-dialog footer{padding:12px 16px max(12px, env(safe-area-inset-bottom));border-top:1px solid var(--border-shell);flex:none;justify-content:flex-end;display:flex}.prompt-editor-dialog>:is(.frames-error,.frame-inspector-notice){flex:none;margin:0;padding:8px 16px}@media not (min-width:1100px){.scene-navigation{display:grid}.comparison-switch{border:1px solid var(--border-shell);background:#eeeae5;border-radius:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin-bottom:12px;padding:4px;display:grid}.comparison-switch button{overflow-wrap:anywhere;min-width:0;min-height:44px;color:var(--text-secondary);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:5px;padding:8px;font:600 13px Manrope,sans-serif}.comparison-switch button[aria-selected=true]{border-color:var(--accent-border);background:var(--surface-form);color:var(--text-primary);box-shadow:0 1px 3px #00000014}.responsive-comparison .comparison-panels{grid-template-columns:minmax(0,1fr)}.comparison-panel{min-width:0;display:block}.comparison-panel[data-active=false]{display:none}.comparison-panel[data-active=true]{animation:.16s ease-out comparison-reveal}.candidate-version-media{aspect-ratio:16/9}.character-detail-portrait>.inspectable-image{aspect-ratio:4/5;flex:none;height:auto}.location-detail-image>.inspectable-image{aspect-ratio:16/9}.frame-prompt-panel .prompt-editor-inline textarea{min-height:220px;max-height:45dvh;font-size:16px}.frame-prompt-actions{flex-wrap:wrap}.frame-prompt-actions>button{white-space:normal;max-width:100%;min-height:44px}.prompt-editor-expand{width:44px;height:44px}.prompt-editor-overlay{padding:0}.prompt-editor-dialog{border-radius:0;width:100%;height:100%}.prompt-editor-dialog header{padding-top:max(8px, env(safe-area-inset-top))}.prompt-editor-dialog footer>button{width:100%;min-height:44px}}@media not (min-width:400px){.image-viewer header{flex-wrap:wrap}.image-viewer h2{flex:1 0 100%;font-size:13px}.image-viewer-tools{margin-left:auto}}@keyframes comparison-reveal{0%{opacity:.6}to{opacity:1}}@media (prefers-reduced-motion:reduce){.comparison-panel[data-active=true]{animation:none}}.script-agent-chat:not(.script-agent-chat-revisions){max-height:var(--script-chat-max-height,65dvh);flex-direction:column;display:flex}.script-agent-chat:not(.script-agent-chat-revisions) .script-agent-history{flex:auto;min-height:0;max-height:none}.script-agent-chat:not(.script-agent-chat-revisions) .script-agent-composer{background:var(--surface-form);flex:none}.script-agent-global-voiceover{scroll-margin-block:16px}.script-agent-global-voiceover:focus{outline:2px solid var(--accent-border);outline-offset:4px}.script-agent-global-voiceover .script-agent-voiceover-hint{color:var(--text-secondary);margin:4px 0 10px;font-size:13px}.frame-inspector-column{position:relative}.frame-scene-loading{z-index:5;background:#faf7f3f5;padding:26px 16px;position:absolute;inset:0}.frame-scene-loading>div{justify-content:center;align-items:center;gap:12px;min-height:120px;display:flex;position:sticky;top:24px}
