/* GoodDirector workspace system. Loaded after feature styles; no business behavior. */
:root{--base:#151719;--panel:#1d2023;--raised:#292d31;--line:#383e44;--text:#f0f2f4;--muted:#aab2bb;--accent:#bbc8ff;--accentbg:#303949;--green:#9bcec1;--rail:64px;--chat:340px;--control:40px;--radius:8px;--shadow:0 16px 48px #0003}
:root[data-theme="paper"]{color-scheme:light;--base:#f5f7fa;--panel:#fff;--raised:#edf0f5;--line:#d4dae3;--text:#172235;--muted:#546379;--accent:#244dc3;--accentbg:#e4ebff;--green:#24684d;--gold:#835d21;--purple:#725099;--shadow:0 16px 48px #20305015}
:root[data-theme="slate"]{color-scheme:dark;--base:#1b2732;--panel:#22323f;--raised:#2c4151;--line:#405666;--text:#eef5fa;--muted:#aec1cf;--accent:#a4d8f5;--accentbg:#314e61;--radius:3px}
body{background:var(--base);color:var(--text);font-family:'IBM Plex Sans',sans-serif;line-height:1.5}
.button,.first-project .button,.account-shell button{min-height:var(--control);padding:9px 14px;border-radius:var(--radius);font-size:13px;line-height:20px;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:7px;box-shadow:none}
.button{border:1px solid var(--line);background:var(--raised);color:var(--text)}
.button.primary{background:var(--accent);color:var(--base);border-color:transparent}
.button.quiet{background:transparent;border-color:transparent;color:var(--muted)}
.button:hover:not(:disabled){background:var(--accentbg);color:var(--text);filter:none}.button.primary:hover:not(:disabled){filter:brightness(1.07);background:var(--accent);color:var(--base)}
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.field input,.field select,.field textarea,.production-context select{background:var(--base);color:var(--text);border:1px solid var(--line);border-radius:var(--radius);min-height:40px;padding:9px 11px;font-size:13px}.field{gap:6px}.field textarea{line-height:1.6}
.head-actions,.actions,.form-actions,.dialog-actions{gap:8px;align-items:center;flex-wrap:wrap}
dialog{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}dialog::backdrop{background:#0008;backdrop-filter:blur(3px)}
.v1-studio .app{display:block;padding-left:var(--rail)}
.v1-studio .sidebar{position:fixed;inset:0 auto 0 0;width:var(--rail);min-height:0;height:100dvh;overflow-x:hidden;overflow-y:auto;padding:18px 8px;gap:16px;z-index:45;background:var(--panel);border-right:1px solid var(--line);transition:width .16s ease;box-shadow:none}
.v1-studio .sidebar:hover,.v1-studio .sidebar:focus-within,.v1-studio .sidebar.open{width:224px;box-shadow:var(--shadow)}
.v1-studio .sidebar .brand{padding:0 7px;min-height:30px;font-size:19px;white-space:nowrap;gap:14px}
.v1-studio .sidebar .brand-mark{flex:0 0 26px}
.v1-studio .sidebar .nav-text,.v1-studio .sidebar .nav-brand-label{opacity:0;transition:opacity .12s}
.v1-studio .sidebar:is(:hover,:focus-within,.open) :is(.nav-text,.nav-brand-label){opacity:1}
.v1-studio .sidebar .project-switch{display:none}.v1-studio .sidebar:is(:hover,:focus-within,.open) .project-switch{display:flex;min-height:48px;background:var(--base)}
.v1-studio .sidebar .nav-label{font-size:0;height:1px;margin:4px 6px;background:var(--line)}
.v1-studio .sidebar:is(:hover,:focus-within,.open) .nav-label{font-size:11px;height:auto;background:none;margin:8px 10px}
.v1-studio .nav-group{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;gap:3px}.v1-studio .nav-item{min-width:0;min-height:40px;width:100%;padding:10px 14px;display:flex;align-items:center;gap:14px;white-space:nowrap;border-radius:var(--radius);font-size:13px;color:var(--muted)}
.v1-studio .nav-item svg{width:18px;height:18px;flex:0 0 18px}.v1-studio .nav-item.active{background:var(--accentbg);color:var(--accent)}
.v1-studio .shell{min-width:0}.v1-studio .topbar{height:62px;padding:0 24px;background:var(--base);border-bottom:1px solid var(--line)}
.v1-studio .page{padding:24px;max-width:1700px;margin:auto;container-type:inline-size;container-name:workspace}
.v1-studio .page-head{gap:16px;margin-bottom:24px;align-items:center;flex-wrap:wrap}.v1-studio .page-head h1{font:500 27px/1.2 'IBM Plex Sans',sans-serif;letter-spacing:-.65px}.v1-studio .page-head p{margin-top:6px;font-size:12px;color:var(--muted)}
.v1-studio .production-context{padding:12px 24px;gap:12px;background:var(--base);border-bottom:1px solid var(--line);flex-wrap:wrap}.v1-studio .production-context label{font-size:11px}.v1-studio .production-context .button{min-height:36px;padding:7px 12px}
.v1-studio .shell.assistant-open{padding-right:var(--chat)}
.v1-studio .assistant-panel{top:62px;width:var(--chat);padding:18px 16px;background:var(--panel);color:var(--text);border-left:1px solid var(--line);box-shadow:none}
.director-panel h2{font-size:18px}.director-panel .eyebrow{display:none}.director-panel>header{align-items:center;justify-content:space-between}
.director-panel .director-header-actions .button{min-height:36px;padding:7px 10px}
.director-scroll{scrollbar-width:thin}.director-composer{background:var(--base);border:1px solid var(--line);border-radius:14px;padding:10px!important}.director-composer textarea{background:transparent!important;color:var(--text)!important;border:0!important;box-shadow:none!important;min-height:76px;font-size:14px}
.director-panel .director-tool-popover{background:var(--panel);color:var(--text);border-color:var(--line);box-shadow:var(--shadow)}
.director-panel .director-model{background:transparent;color:var(--muted)}.director-icon-control{min-width:36px;min-height:36px}.director-message{font-size:14px;line-height:1.65}
.workspace{gap:24px}.inspector{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:18px}.inspector h2,.inspector h3{font-size:16px}
.shot-card,.asset-card,.episode-row{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:none}.shot-copy{padding:14px}.shot-copy h3{font-size:14px}.shot-copy p{font-size:12px}.shot-reorder{gap:4px}.shot-reorder .button{min-height:36px;padding:7px 9px}
.production-hero{min-height:170px;padding:24px;background:var(--panel);border-color:var(--line)}.production-hero h2{font-size:30px}.hero-frame{display:none}
.empty-surface{background:transparent;min-height:220px;border:1px dashed var(--line);padding:24px}.empty-surface h2{font:500 24px/1.3 'IBM Plex Sans',sans-serif}
.storyboard-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}.storyboard-workspace>section{grid-column:1;grid-row:2}
.storyboard-workspace>.storyboard-inspector{grid-column:1;grid-row:1;min-width:0;position:static;padding:0}
.storyboard-inspector>summary{padding:13px 16px;cursor:pointer;font-weight:500;color:var(--accent)}.storyboard-inspector>summary span{font-weight:400;color:var(--muted);margin-left:12px;font-size:12px}
.storyboard-tools-body{padding:0 18px 18px}.storyboard-workspace:has(>.storyboard-inspector[open]){grid-template-columns:minmax(0,1fr) 280px}.storyboard-workspace:has(>.storyboard-inspector[open])>section{grid-row:1}.storyboard-workspace>.storyboard-inspector[open]{grid-column:2}.storyboard-inspector .selected-board-frame{max-height:190px;object-fit:contain}
:is(.video-preview,.edit-preview,.production-canvas){background:#090b0d;border-color:var(--line)}
:is(.library-items,.shot-list,.bible-grid){gap:16px}.tag{border-radius:4px;font-size:11px}.section-heading{margin:22px 0 12px}
@container workspace (max-width:850px){.workspace,.edit-workspace,.video-studio-workspace,.storyboard-workspace:has(>.storyboard-inspector[open]){grid-template-columns:minmax(0,1fr)}.storyboard-workspace>.storyboard-inspector[open]{grid-column:1;grid-row:1}.storyboard-workspace:has(>.storyboard-inspector[open])>section{grid-row:2}.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}.inspector{position:static;max-width:none}}
@container workspace (max-width:500px){.grid-2,.grid-3,.shot-grid{grid-template-columns:minmax(0,1fr)}.page-head .head-actions{width:100%}}
@media(max-width:1099px){.v1-studio .shell.assistant-open{padding-right:0}.v1-studio .assistant-panel{width:min(380px,calc(100vw - var(--rail)));box-shadow:var(--shadow)}.v1-studio .page{padding:20px}}
@media(max-width:600px){:root{--rail:56px;--control:44px}.v1-studio .sidebar{padding:14px 4px}.v1-studio .page{padding:16px}.v1-studio .topbar{padding:0 12px}.v1-studio .production-context{padding:10px 16px}.v1-studio .page-head h1{font-size:23px}.v1-studio .breadcrumbs{max-width:100%}.studio-session .account-toolbar{position:static;justify-content:flex-end;padding:8px 12px}.v1-studio .assistant-panel{top:0;z-index:50}.button{min-height:44px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Theme the existing feature surfaces while retaining white screenplay paper. */
:root[data-theme] :is(.provider-state,.detail-panel,.video-direction-card,.video-take,.library-upload,.edit-track,.director-sessions,.assistant-run,.revision-list,.model-settings,.scope-bar){background:var(--panel);color:var(--text);border-color:var(--line)}
:root[data-theme] :is(.director-session,.director-context-chip,.assistant-activity,.assistant-result,.director-permission-presets .button){color:var(--muted);border-color:var(--line)}
:root[data-theme] :is(.assistant-actions,.assistant-approval,.director-tool-popover,.edit-inspector,.muted-box){background:var(--raised);color:var(--text);border-color:var(--line)}
:root[data-theme] :is(input:not([type=range]):not([type=checkbox]):not([type=radio]),select,textarea){color:var(--text);background-color:var(--base);border-color:var(--line)}
:root[data-theme="paper"] .v1-studio .page-head h1{font-family:Newsreader,Georgia,serif;font-size:32px;letter-spacing:-.4px}
:root[data-theme="paper"] .v1-studio .page{padding:32px}.v1-studio .director-composer .button.primary{color:var(--base)}
:root[data-theme="paper"] .shot-card{box-shadow:0 3px 12px #15254408}.v1-studio .storyboard-inspector:not([open]){padding:0}
:root[data-theme="slate"] .v1-studio .page{padding:20px}:root[data-theme="slate"] .v1-studio .page-head h1{font-size:24px;letter-spacing:0}:root[data-theme="slate"] .shot-grid{gap:12px}
:root[data-theme] :is(.screenplay-paper,.screenplay-canvas,.script-paper) :is(textarea,input){background:transparent;color:#20232b}
/* Keep screenplay typography independent of application form themes. */
:root[data-theme] .screenplay-paper input,
:root[data-theme] .screenplay-paper textarea,
:root[data-theme] .screenplay-paper select{background:transparent!important;color:#252833!important;border-color:transparent}
.v1-studio .sidebar{display:flex;flex-direction:column;gap:10px}
.v1-studio .sidebar .nav-group{flex:none;gap:2px}
.v1-studio .sidebar .nav-label{padding:0;min-height:1px;line-height:16px}
@media(max-width:900px){.v1-studio .sidebar,.v1-studio .sidebar.open{display:flex;position:fixed;height:100dvh;width:var(--rail)}.v1-studio .sidebar:is(:hover,:focus-within,.open){width:224px}}
@container workspace (max-width:850px){.unified-script{grid-template-columns:minmax(0,1fr)}.unified-script .script-outline{position:static;max-height:180px;overflow:auto}.unified-paper{padding:28px}.screenplay-block.dialogue{max-width:100%;margin-inline:12%}}
.storyboard-inspector>summary [data-board-status]{display:block;margin:4px 0 0;color:var(--muted)}
.storyboard-inspector>summary [data-board-status]:empty{display:none}
.v1-studio .director-panel .director-composer{background:var(--base);border-color:var(--line);border-radius:14px}
.v1-studio .director-panel :is(.director-activity,.director-welcome,.assistant-message.from-user>strong){color:var(--muted)}
.v1-studio .director-panel :is(.assistant-message>strong,.director-activity-mark){color:var(--accent)}
.v1-studio .director-panel .director-welcome h3{color:var(--text)}
.v1-studio .director-panel :is(.director-sessions,.assistant-message,.director-references){border-color:var(--line)}
.v1-studio .director-panel .assistant-error{color:#d36559}

/* Compact navigation: every destination remains available without tall groups. */
.v1-studio .sidebar{padding:12px 8px;gap:5px;scrollbar-width:none}
.v1-studio .sidebar::-webkit-scrollbar{display:none}
.v1-studio .sidebar .brand{min-height:30px;margin-bottom:5px;font-size:18px}
.v1-studio .sidebar .nav-group{gap:1px}
.v1-studio .sidebar .nav-item{min-height:34px;padding:7px 14px;line-height:20px}
.v1-studio .sidebar .nav-label,.v1-studio .sidebar:is(:hover,:focus-within,.open) .nav-label{font-size:0;line-height:0;height:1px;min-height:1px;padding:0;margin:5px 8px;background:var(--line)}
@media(max-height:660px){.v1-studio .sidebar{padding-block:8px;gap:2px}.v1-studio .sidebar .nav-item{min-height:30px;padding-block:5px}.v1-studio .sidebar .brand{min-height:24px;margin:0}.v1-studio .sidebar .nav-label,.v1-studio .sidebar:is(:hover,:focus-within,.open) .nav-label{margin-block:3px}}

/* Scene navigation is an outline, never a full-height dashboard card. */
.v1-studio .unified-script .script-outline{padding:12px;min-height:0;height:auto;max-height:240px;overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}
.v1-studio .unified-script .script-outline .section-heading{margin:0 0 8px;gap:12px}
.v1-studio .unified-script .script-outline h3{font-size:14px;color:var(--text)}
.v1-studio .unified-script .director-scene-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:4px;overflow:visible}
.v1-studio .unified-script .director-scene-list button{width:100%;min-height:38px;margin:0;padding:8px 10px;line-height:1.4;border-radius:5px;font-size:13px;color:var(--text)}
.v1-studio .unified-script .director-scene-list button[aria-current]{background:var(--accentbg);color:var(--accent)}
.v1-studio .unified-script .director-scene-list .caption{display:block;margin-top:2px;color:var(--muted);font-size:11px}
.v1-studio .unified-script .script-outline>.button{width:auto;min-height:34px;margin-top:8px;padding:6px 12px}

/* Paper surfaces include the account workspace and all project cards. */
.account-dashboard{color:var(--text)}
.account-dashboard header{border-color:var(--line);flex-wrap:wrap}
.account-dashboard header>span{overflow-wrap:anywhere}
.account-dashboard section>p,.account-kicker,.cloud-projects small,.cloud-projects p,.account-form>p,.account-divider{color:var(--muted)}
.cloud-projects article{background:var(--panel);border-color:var(--line);color:var(--text);padding:22px}
.cloud-projects h2{color:var(--text);font:500 23px/1.35 'IBM Plex Sans',sans-serif;margin:10px 0}
.account-dashboard h1{font-size:36px;line-height:1.2}
.account-dashboard section{padding-top:28px}
.account-dashboard .cloud-projects{gap:18px}
.account-dashboard .section-heading{margin:22px 0 12px}
.account-page{background:var(--base)}
.account-loading{color:var(--text);background:var(--base)}
.production-guide{border-block:1px solid var(--line)}
.production-guide-heading{padding:18px 0}
.production-guide-heading h2{font-size:18px}
.production-guide-heading p,.production-guide li p{color:var(--muted);font-size:13px;margin-top:4px}
.production-guide ol{list-style:none;margin:0;padding:0}
.production-guide li{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:14px;padding:16px 0;border-top:1px solid var(--line)}
.production-guide li h3{font-size:15px;font-weight:500}
.production-step-number{font-size:13px;color:var(--muted)}
.production-shortcuts{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:20px 0;font-size:13px;color:var(--muted)}
.production-shortcuts>span{margin-right:8px}
.production-episodes{display:grid;gap:8px}
.production-episode{display:flex;align-items:center;gap:16px;flex-wrap:wrap;text-align:left;padding:16px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius)}
.production-episode strong{flex:1;color:var(--text)}
.production-episode span{color:var(--muted);font-size:12px}
@media(max-width:700px){.cloud-projects{grid-template-columns:1fr}.account-dashboard{padding:20px}.account-dashboard h1{font-size:28px}}
.production-step-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@container workspace (max-width:650px){.production-guide li{grid-template-columns:24px minmax(0,1fr)}.production-step-actions{grid-column:2;justify-content:flex-start}}

/* Storyboard uses the right-hand workspace for the selected shot's frame form. */
.v1-studio .shell.storyboard-panel-open{padding-right:var(--chat)}
.storyboard-frame-panel>header h2{font-size:18px;margin:0}
.storyboard-frame-panel .storyboard-tools-body{padding:0}
.storyboard-frame-panel .storyboard-tools-body>h2{font-size:15px;line-height:1.45}
.storyboard-frame-panel .selected-board-frame{height:auto;aspect-ratio:16/9;min-height:0}
.storyboard-frame-panel .head-actions{display:flex;margin:12px 0}
.storyboard-frame-panel [data-board-status]:empty{display:none}
.storyboard-frame-panel .field{margin:14px 0}
.storyboard-frame-panel .inspector{padding:0;border:0}
.storyboard-panel-open .storyboard-workspace>section{grid-row:1}
@media(max-width:800px){
 .v1-studio .shell.storyboard-panel-open{padding-right:0}
 .v1-studio .storyboard-frame-panel{position:static;width:auto;max-width:none;margin:0 16px 24px;border:1px solid var(--line);border-radius:var(--radius);box-shadow:none}
}

.storyboard-frame-panel .model-control{background:transparent;color:var(--text);border:0;padding:0;margin:12px 0}
.storyboard-frame-panel [data-board-generate]{margin-bottom:8px}
.storyboard-frame-panel .storyboard-tools-body>details{margin-top:14px}

/* Frame tools shares the conversation panel's fixed header and composer. */
.v1-studio .storyboard-frame-panel{display:flex;flex-direction:column;overflow-y:auto;gap:12px}
.storyboard-frame-panel>header{flex:none;margin-bottom:0}
.frame-tools-scroll{flex:none;overflow:visible}
.frame-tools-scroll>.selected-board-frame{margin-top:12px}
.frame-direction-composer{flex:none}
.frame-direction-composer .director-message-label{margin:0}
.frame-direction-composer textarea{width:100%;resize:vertical;max-height:180px}
.frame-direction-composer .model-control{flex:1;min-width:0;margin:0}
.frame-direction-composer .model-control .field{font-size:0;margin:0;gap:0}
.frame-direction-composer .model-control select{font-size:12px;background:transparent;border:0;width:100%;padding:6px 2px}
.frame-direction-composer .model-control [role=status]{font-size:11px}
.storyboard-frame-panel [data-board-generate]{margin:0}
.storyboard-panel-open .media-bottom{flex-wrap:wrap;gap:8px}
.storyboard-panel-open .media-bottom .head-actions{display:flex}
@media(max-width:800px){.v1-studio .storyboard-frame-panel{max-height:85dvh;min-height:480px}}

.storyboard-panel-open .shot-frame-actions{display:flex;flex-wrap:wrap;margin:10px 0;gap:8px}

.storyboard-references{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}
.storyboard-references figure{margin:0;width:84px;font-size:12px}
.storyboard-references img{width:84px;height:84px;object-fit:contain;border-radius:var(--radius);border:1px solid var(--line)}
.frame-reference-warning{color:var(--text);background:var(--accentbg);padding:12px;border-radius:var(--radius);font-size:13px;margin:12px 0}

.storyboard-linked-context h3{font-size:13px;font-weight:500;margin:14px 0 4px}

/* Quiet amber distinguishes missing references from primary generation actions. */
.storyboard-frame-panel{--frame-warning-bg:#352e21;--frame-warning-text:#e2c58f;--frame-warning-border:#716044}
:root[data-theme="paper"] .storyboard-frame-panel{--frame-warning-bg:#f5eddd;--frame-warning-text:#745521;--frame-warning-border:#d8c49d}
.storyboard-frame-panel .frame-reference-warning{background:var(--frame-warning-bg);color:var(--frame-warning-text);border:1px solid var(--frame-warning-border)}
.storyboard-frame-panel .button.frame-reference-action{background:#86612f;color:#fff;border-color:#86612f;font-weight:600;box-shadow:0 2px 3px #392a1714}
.storyboard-frame-panel .button.frame-reference-action:hover:not(:disabled){background:#705025;color:#fff;border-color:#705025;filter:none}

/* Shot cards: quiet editing toolbar, image, then a consistent action footer. */
.storyboard-workspace .shot-grid{gap:20px;align-items:stretch}
.storyboard-workspace .shot-card{display:flex;flex-direction:column;overflow:hidden;border-color:var(--line)}
.storyboard-workspace .shot-card.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.shot-card-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line)}
.shot-card-header .shot-number{font-size:12px;white-space:nowrap;color:var(--muted)}
.shot-card-tools{display:flex;gap:2px}
.shot-card-tools .shot-icon{width:32px;min-width:32px;min-height:32px;height:32px;padding:6px;border-radius:6px}
.shot-card-tools .shot-icon svg{width:17px;height:17px}
.shot-card-tools .shot-remove:hover:not(:disabled){color:#a33f36;background:#a33f3610}
.storyboard-workspace .shot-card .storyboard-image{width:100%;height:auto;min-height:0;aspect-ratio:16/9;display:flex;align-items:center;justify-content:center}
.storyboard-workspace .shot-copy{display:flex;flex-direction:column;flex:1;gap:10px;padding:16px}
.storyboard-workspace .shot-copy h3{line-height:1.45;margin:0;font-size:15px}
.storyboard-workspace .shot-copy .shot-description{line-height:1.65;margin:0;color:var(--muted)}
.shot-duration{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.shot-card-actions{margin-top:auto;padding-top:6px}
.storyboard-panel-open .shot-card-actions .shot-frame-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 8px}
.shot-card-actions .button{font-size:12px;padding:8px;white-space:normal}
.shot-card-actions .shot-video-action{width:100%;background:transparent;border-color:var(--line);font-weight:500}
.shot-card-actions .shot-video-action:hover{background:var(--accentbg);color:var(--accent)}
@media(pointer:coarse){.shot-card-tools .shot-icon{min-width:40px;min-height:40px;width:40px;height:40px}}
@container workspace (max-width:600px){.storyboard-workspace .shot-grid{grid-template-columns:minmax(0,1fr)}}

.frame-reference-suggestion{margin:10px 0;line-height:1.6}
.frame-reference-link{display:inline;padding:0;color:var(--accent);text-decoration:underline;text-underline-offset:3px;font:inherit}

/* Video generation follows Storyboard, with one scrolling form. */
.v1-studio .shell.video-panel-open{padding-right:var(--chat)}
.v1-studio .video-generation-panel{display:block;overflow-y:auto}
.video-generation-panel>header h2{font-size:18px;margin:0 0 18px}
.video-generation-panel .video-direction-fields{display:flex;flex-direction:column;gap:16px;border:0;padding:0;min-width:0}
.video-generation-panel .field{margin:0;min-width:0}
.video-generation-panel>.field{margin-bottom:18px}
.video-generation-panel .starting-frame-choice img{width:100%;max-height:150px;object-fit:contain;border-radius:var(--radius);margin:8px 0}
.video-generation-panel .model-control{background:transparent;border:0;padding:0;color:var(--text)}
.video-generation-panel .director-composer-toolbar{display:flex;align-items:center;gap:6px}
.video-generation-panel .video-camera-button{padding:6px;min-width:36px}
.video-generation-panel .video-settings h3{font-size:14px;margin:0 0 10px}
.video-generation-panel .video-setting-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.video-generation-panel [data-video-status]:empty{display:none}
.video-panel-open .video-workspace{display:block}
.video-panel-open .video-review{min-width:0}
.video-panel-open .video-take-actions{flex-wrap:wrap;gap:8px}
@media(max-width:800px){
 .v1-studio .shell.video-panel-open{padding-right:0}
 .v1-studio .video-generation-panel{position:static;width:auto;max-width:none;max-height:85dvh;margin:0 16px 24px;border:1px solid var(--line);border-radius:var(--radius);box-shadow:none}
}

.video-generation-panel .video-action-copy{white-space:pre-wrap;color:var(--muted);font-size:13px;line-height:1.65;margin:10px 0}
.video-panel-open .video-player .empty-surface{color:#e2e8f0}
.video-panel-open .video-player .empty-surface h2{color:#e2e8f0}
.video-panel-open .video-player .empty-surface p{color:#aebaca}

.video-generation-panel .starting-frame-choice>[data-page="storyboard"]{display:flex;margin:0 0 16px}
.video-generation-panel .video-camera-button{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px;font-weight:500}

/* Cast filters share the production controls and remain usable on narrow pages. */
.v1-studio .bible-scope-filters{margin:16px 0;border-block:1px solid var(--line);padding:14px 0}
.v1-studio .bible-scope-controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px}
.v1-studio .bible-scope-controls .field{flex:1 1 210px;min-width:0;margin:0}
.v1-studio .bible-scope-controls select{width:100%;text-overflow:ellipsis}
.v1-studio .bible-scope-filters .caption{margin:10px 0 0}

/* A small filmmaking companion, independent of actual request progress. */
.assistant-progress{display:flex;align-items:center;gap:16px;padding:16px 0;min-height:72px}
.assistant-progress p{margin:0}
.assistant-clapper{position:relative;display:block;flex:0 0 42px;height:32px;margin:8px 4px 0;background:var(--accentbg);border:2px solid var(--accent);border-radius:3px 3px 8px 8px;transform-origin:50% 100%;animation:assistant-clapper-hop 7s ease-in-out infinite}
.assistant-clapper-lid{position:absolute;left:-2px;top:-10px;width:42px;height:10px;border:2px solid var(--accent);border-radius:3px;background:repeating-linear-gradient(125deg,var(--accent) 0 7px,var(--panel) 7px 14px);transform-origin:2px 100%;animation:assistant-clapper-clap 7s ease-in-out infinite}
.assistant-clapper-face{position:absolute;inset:8px 9px 5px;display:flex;justify-content:space-between}
.assistant-clapper-face i{width:4px;height:5px;background:var(--accent);border-radius:50%;animation:assistant-clapper-blink 5.3s infinite;transform-origin:center}
.assistant-clapper-face b{position:absolute;width:9px;height:5px;border-bottom:2px solid var(--accent);border-radius:0 0 50% 50%;left:50%;top:8px;transform:translateX(-50%)}
@keyframes assistant-clapper-hop{0%,12%,38%,100%{transform:translateY(0) rotate(0)}18%{transform:translateY(-5px) rotate(-7deg)}25%{transform:translateY(0) rotate(5deg)}31%{transform:translateY(-2px) rotate(-3deg)}}
@keyframes assistant-clapper-clap{0%,10%,35%,100%{transform:rotate(0)}17%,24%{transform:rotate(-25deg)}28%{transform:rotate(0)}31%{transform:rotate(-9deg)}}
@keyframes assistant-clapper-blink{0%,42%,46%,73%,77%,100%{transform:scaleY(1)}44%,75%{transform:scaleY(.12)}}
@media(prefers-reduced-motion:reduce){.assistant-clapper,.assistant-clapper-lid,.assistant-clapper-face i{animation:none}}

/* Guided production dashboard: shared Paper surfaces, honest coverage and direct navigation. */
.production-dashboard { max-width: 1440px; margin: 0 auto; }
.production-hero { display:flex; justify-content:space-between; align-items:center; gap:32px; margin-bottom:24px; }
.production-hero h1 { margin:6px 0 12px; }
.production-hero p,.production-stage p,.production-next p { margin:6px 0; color:var(--muted,#63728a); }
.production-preview { position:relative; width:90px; height:72px; border-radius:7px; overflow:hidden; background:transparent; display:grid; place-items:center; color:var(--muted,#63728a); }
.production-preview img { width:100%; height:100%; object-fit:contain; position:absolute; inset:0; }
.production-preview svg { width:28px; height:28px; }
.production-cover { width:35%; height:140px; flex-shrink:0; }
.production-next { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:20px 24px; background:var(--accentbg); border:1px solid var(--line); border-radius:8px; margin-bottom:16px; }
.production-next h2,.production-stage h2 { font-size:18px; margin:0; }
.production-workflow { list-style:none; padding:0; margin:0; }
.production-stage { position:relative; display:grid; grid-template-columns:30px 90px minmax(130px,1fr) minmax(160px,1fr) 160px; gap:16px; align-items:center; padding:18px 16px; border-bottom:1px solid var(--line); }
.production-stage.is-next { background:var(--accentbg); border-radius:8px; }
.production-stage-number { display:grid; place-items:center; width:30px; height:30px; border:1px solid var(--line); border-radius:50%; background:var(--panel); position:relative; z-index:1; }
.production-stage.is-next .production-stage-number { background:#2948cc; color:white; border-color:#2948cc; }
.production-stage p { font-size:14px; line-height:1.5; }
.production-stage-progress p { color:inherit; }
.production-meter-row { display:flex; align-items:center; gap:12px; font-size:13px; margin-top:10px; }
.production-meter-row progress { appearance:none; width:100%; min-width:40px; height:8px; border:0; border-radius:8px; overflow:hidden; background:#e0e6ef; }
.production-meter-row progress::-webkit-progress-bar { background:#e0e6ef; }
.production-meter-row progress::-webkit-progress-value { background:#3656d6; border-radius:8px; }
.production-meter-row progress::-moz-progress-bar { background:#3656d6; }
.production-meter-row span { white-space:nowrap; }
.production-stage .button { justify-self:stretch; white-space:normal; }
.production-progress-note { color:var(--muted,#63728a); font-size:13px; line-height:1.6; margin:18px 0; }
@media(max-width:950px) { .production-stage { grid-template-columns:28px 76px 1fr 1fr; gap:14px; } .production-stage .production-preview { width:76px; } .production-stage > .button { grid-column:3 / -1; justify-self:end; } }
@media(max-width:650px) { .production-cover { display:none; } .production-next { align-items:flex-start; flex-direction:column; } .production-stage { grid-template-columns:28px 1fr; padding:18px 8px; } .production-stage .production-preview { display:none; } .production-stage-progress,.production-stage > .button { grid-column:2; } .production-stage > .button { justify-self:start; } }

.production-dashboard .production-hero { background:transparent; border:0; padding:0; min-height:0; }
.production-dashboard .production-hero h1 { font-family:Georgia,serif; font-weight:500; font-size:clamp(28px,3vw,42px); }

/* Keep manual creation and the assistant shortcut together. */
.bible-create-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
