
/* One primary project navigation; result pages never contain project plan forms. */
.rail-divider{height:1.1px;background:#28313d;margin:13.2px 15.4px}
.rail button small{font-size:11px;white-space:nowrap}
.project-analysis{min-width:0;overflow:auto;background:#0d131a}
.project-section-head{display:flex;align-items:center;justify-content:space-between;gap:26.4px;padding:28.6px 33px 25.3px;border-bottom:1.1px solid #26303c;background:#10161e}
.project-section-head h1{font-size:26.4px;margin:9.9px 0 11px}
.project-section-head p{display:flex;align-items:center;gap:13.2px;font-size:13.2px;color:#8596ac;margin:0}
.scope-badge{display:inline-block;border:1.1px solid #39545a;border-radius:5.5px;color:#9dccc7;padding:4.4px 8.8px;font-size:12.1px}
.project-overview,.episode-source-result{padding:28.6px 33px}
.project-upload-area{padding:30.8px;background:#151d27;border:1.1px dashed #425366;border-radius:11px}
.project-upload-area h2{font-size:23.1px;margin:14.3px 0}
.project-upload-area p{color:#8fa2ba;line-height:1.8;margin:0 0 24.2px;max-width:858px}
.project-context-line{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:22px 0;border-bottom:1.1px solid #2a3440}
.project-context-line p{color:#8294ab;font-size:13.2px;line-height:1.8;margin:7.7px 0 0}
.episode-source-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(247.5px,1fr));gap:16.5px}
.episode-source-card{padding:22px;display:flex;flex-direction:column;align-items:flex-start;gap:13.2px;min-height:170.5px;text-align:left;background:#141c26;border:1.1px solid #2b3643}
.episode-source-card:hover{border-color:#b49667;background:#20231f}
.episode-source-card b{font-size:18.7px}.episode-source-card>span:not(.tag){color:#97a6b8;font-size:13.2px}
.source-reference{margin-top:19.8px;background:#111b25;border:1.1px solid #273849;border-radius:7.7px;padding:13.2px 17.6px}
.source-reference summary{cursor:pointer;color:#93afc8;font-size:13.2px}
.source-reference video{display:block;width:min(550px,100%);max-height:308px;margin-top:17.6px}
.project-plan-page{height:100%;overflow:auto;background:#0d131a}
.project-plan-page .project-section-head{position:sticky;top:0;z-index:5}
.project-plan-content{padding:28.6px 39.6px 77px;max-width:1705px;margin:0 auto}
.project-plan-content>section{padding:26.4px 0;border-bottom:1.1px solid #293340}
.section-caption{display:flex;align-items:center;gap:13.2px;margin-bottom:17.6px}
.section-caption>span{font:12.1px ui-monospace,monospace;color:#e6b46f}
.section-caption h2{font-size:18.7px}.section-caption small{color:#7f93ab;font-size:12.1px}.section-caption button{margin-left:auto;font-size:12.1px}
.project-plan-content textarea{font-size:14.3px;line-height:1.8;min-height:0}
.project-plan-content details{margin:17.6px 0 0}.project-plan-content summary{color:#8dabc3;cursor:pointer;font-size:13.2px;margin-bottom:13.2px}
.plan-shared-settings{display:grid;grid-template-columns:264px minmax(0,1fr);gap:26.4px;margin-top:22px}
.plan-shared-settings label{margin:0}
.project-mapping-list{display:flex;flex-direction:column;margin-top:22px}
.project-mapping-row{display:grid;grid-template-columns:minmax(220px,.8fr) 30.8px minmax(330px,1.5fr);gap:26.4px;padding:22px 0;border-top:1.1px solid #222e3c;align-items:start}
.mapping-source{font-size:13.2px;line-height:1.9;padding-top:5.5px}
.mapping-source small{display:block;color:#8197ad;font-size:12.1px;margin-bottom:5.5px}
.mapping-source b{color:#cce88a}.mapping-source p{color:#8fa1b7;margin-top:8.8px;white-space:pre-wrap}
.mapping-target label{font-size:12.1px;margin-bottom:8.8px}.mapping-target textarea{width:100%;resize:vertical;overflow:auto}
.mapping-target>input{margin-top:8.8px;font-size:13.2px}
.project-mapping-row .mapping-arrow{color:#cba263;padding-top:44px}
.plan-apply{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:22px}
.plan-apply h2{font-size:18.7px}.plan-apply p{font-size:13.2px;color:#8da0b7;margin-top:9.9px}
.integration-note{flex-basis:100%;margin:0!important;color:#788ba2!important}
.project-pending{background:#212019;padding:22px!important;margin-top:22px;border:1.1px solid #6c5839;border-radius:8.8px}
.result-plan-label{display:block;color:#798fa7;font-size:11px;margin-top:5.5px}
.document-toolbar .row{flex-wrap:wrap}.document-toolbar{flex-shrink:0}
.focused-document .document-scroll{padding:15.4px 26.4px 55px}
.document-outline .outline-head{padding:19.8px 13.2px}.outline-head h3{font-size:13.2px;margin-bottom:13.2px}
.document-toolbar .primary{background:#eebc7e;color:#1d170f}
.project-analysis>.hint{margin:16.5px 33px}
#contextbar{min-height:0;padding:11px 26.4px}#contextbar.hidden{display:none}
@media(max-width:1100px){
 .project-section-head{align-items:flex-start;flex-direction:column;padding:22px}
 .project-plan-page .project-section-head{position:relative}
 .project-plan-content,.project-overview,.episode-source-result{padding:22px}
 .plan-shared-settings{grid-template-columns:1fr}
 .project-mapping-row{grid-template-columns:1fr 22px 1.4fr;gap:13.2px}
 .project-section-head .row{flex-wrap:wrap}
}

.project-plan-content textarea{overflow-y:hidden;resize:vertical}.project-analysis .original-analysis-text{max-height:none;overflow:visible}


.analysis-content,.localize-content{padding:24.2px 33px 66px}
.video-drop-area{padding:49.5px 26.4px;text-align:center;border:1.1px dashed #3c4b5c;border-radius:9.9px;cursor:pointer;background:#131b25}
.video-drop-area>span{font-size:29.7px;color:#e5bb81}.video-drop-area h2{font-size:20.9px;margin:11px 0}.video-drop-area p{color:#8c9fb6;font-size:13.2px}
.source-inline{display:flex;align-items:center;gap:26.4px;margin-bottom:26.4px}.source-inline video{width:286px;height:170.5px;background:#000;border-radius:7.7px}.source-inline h2{font-size:19.8px}.source-inline p,.source-inline small{color:#849ab4;font-size:13.2px}
.pipeline-progress{border:1.1px solid #2c394a;border-radius:9.9px;background:#111923;padding:19.8px 24.2px;margin:24.2px 0}
.pipeline-progress h3{font-size:14.3px}.pipeline-progress .progress-track{margin:13.2px 0;height:5.5px}.pipeline-progress .progress-track i{background:linear-gradient(90deg,#9875ef,#62d5d9,#e9ba7b);transition:width .4s}
.pipeline-steps{display:flex;justify-content:space-between;gap:13.2px;color:#667d96;font-size:12.1px;margin:15.4px 0}.pipeline-steps .done{color:#9cd6c5}
.pipeline-progress>p{font-size:12.1px;color:#8da2b9;margin:11px 0 0}
.analysis-overview{margin:27.5px 0}.analysis-overview summary{font-size:14.3px;color:#aabfd4;cursor:pointer}
.stream-output{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85;font:13.2px/1.9 var(--font);color:#b8c9db;padding:19.8px;background:#0a1119;border:1.1px solid #263441;border-radius:7.7px;max-height:418px;overflow:auto}
.localize-content{max-width:1705px;margin:auto}.localize-direction label{font-size:15.4px;font-weight:600;color:#d5deeb}
.direction-action{display:flex;align-items:center;gap:17.6px}.direction-action textarea{flex:1;min-height:104.5px;line-height:1.8}.direction-action button{white-space:nowrap}
.generated-plan{padding-top:13.2px}.model-summary{font-size:15.4px;color:#c9d8e6;line-height:1.9;margin-bottom:26.4px}
.model-visuals{margin-bottom:26.4px}.model-visuals summary{color:#9fb6cc;cursor:pointer;font-size:13.2px}.model-visuals p{display:grid;grid-template-columns:143px 1fr;gap:19.8px;line-height:1.8;font-size:13.2px}.model-visuals b{color:#ccad7c}.model-visuals span{color:#9aacc0}
.model-mapping-row{display:grid;grid-template-columns:1fr 27.5px 1.35fr;gap:30.8px;padding:26.4px 0;border-top:1.1px solid #263442;align-items:start}
.model-mapping-row>span{color:#c6a572;margin-top:38.5px}.model-mapping-row small{font-size:11px;color:#7892ae}.model-mapping-row h3{font-size:14.3px;color:#d2e695;margin:7.7px 0}.model-mapping-row p{font-size:13.2px;line-height:1.9;color:#aebed0;white-space:pre-wrap}.model-mapping-row .mapping-reason{color:#8e846f;font-size:12.1px}
.localize-next{padding:27.5px 0;text-align:right}
@media(max-width:990px){.direction-action{align-items:stretch;flex-direction:column}.model-mapping-row{grid-template-columns:1fr 22px 1fr;gap:15.4px}}

/* Project task is outside the episode workspace, never owned by the selected episode. */
.analysis-project-shell{height:100%;min-height:0;display:flex;flex-direction:column;background:#0d131a;overflow:auto}
.project-analysis-task{padding:17.6px 33px;border-bottom:1.1px solid #2b3948;background:#101820;flex-shrink:0}
.project-analysis-task .section-caption{margin-bottom:8.8px}
.project-analysis-task .section-caption h2{font-size:15.4px}
.project-analysis-task .pipeline-progress{margin:0;padding:11px 17.6px}
.project-analysis-task .pipeline-steps{margin:8.8px 0}
.project-analysis-task .analysis-overview{margin:13.2px 0 0}
.project-analysis-task .analysis-overview>p{font-size:13.2px;margin:11px 0}
.project-analysis-task .stream-output{max-height:209px}
.analysis-results-layout{flex:1;min-height:374px;height:auto!important;overflow:visible}
.analysis-results-layout>.document-outline{height:auto}
.analysis-results-layout>.project-analysis{overflow:auto}

/* Results take priority; the project task remains available on demand. */
.analysis-project-shell>.analysis-toolbar{min-height:68.2px;padding:13.2px 26.4px;gap:17.6px;flex-shrink:0;flex-direction:row;align-items:center}
.analysis-toolbar-title{display:flex;align-items:center;gap:19.8px;min-width:0}
.analysis-project-shell .analysis-toolbar h1{font-size:19.8px;margin:0;white-space:nowrap}
.analysis-toolbar-title p{white-space:nowrap}
.analysis-project-shell>.project-analysis-task{padding:0 26.4px}
.project-analysis-task>summary{cursor:pointer;padding:9.9px 0;font-size:13.2px;color:#9bc7bf}
.task-detail-label{color:#849ab4;margin-left:19.8px;font-size:12.1px}
.task-failed{color:#f2b584}
.analysis-task-body{padding:4.4px 0 13.2px;max-height:36vh;overflow:auto}
.analysis-results-layout{min-height:0;overflow:hidden}
.analysis-results-layout .analysis-content{padding-top:19.8px}
@media(max-width:825px){.analysis-toolbar-title{align-items:flex-start;flex-direction:column;gap:4.4px}.analysis-project-shell>.analysis-toolbar{padding:11px 15.4px}.analysis-project-shell>.project-analysis-task{padding:0 15.4px}}

/* Project scheme is a readable document, not a dashboard of progress cards. */
.design-page{height:100%;min-height:0;display:flex;flex-direction:column;background:#0e151d}
.design-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:66px;padding:13.2px 30.8px;border-bottom:1.1px solid #283441;flex-shrink:0}
.design-toolbar>div{display:flex;align-items:center;gap:19.8px}.design-toolbar h1{font-size:19.8px;margin:0}.design-toolbar small,.design-version{color:#8fa6bb;font-size:12.1px}
.design-version{color:#e5bc82}.design-scroll{flex:1;min-height:0;overflow:auto;padding:24.2px 35.2px 55px}
.design-direction{max-width:1540px;margin:auto}.design-direction label{font-size:13.2px;color:#afc3d5;margin-bottom:8.8px}
.design-direction>div{display:flex;gap:15.4px;align-items:center}.design-direction textarea{min-height:72.6px;flex:1;resize:vertical;font-size:14.3px;line-height:1.8}.design-direction button{white-space:nowrap}.design-direction>small{display:block;font-size:12.1px;color:#718ba4;margin-top:7.7px}
.design-task-status{max-width:1540px;margin:17.6px auto;display:flex;gap:17.6px;color:#8ac8bf;font-size:13.2px}.design-task-status small{color:#8da2b7}
.design-layout{max-width:1540px;margin:auto;display:grid;grid-template-columns:minmax(0,1fr) 165px;gap:49.5px;align-items:start}
.design-outline{position:sticky;top:8.8px;display:flex;flex-direction:column;gap:5.5px;border-left:1.1px solid #2a3745;padding:11px 0 11px 19.8px}.design-outline small{color:#647e97;font-size:11px;padding:0 8.8px 11px}.design-outline button{text-align:left;border:0;background:transparent;color:#8fa7bd;font-size:13.2px;padding:8.8px}.design-outline button:hover{color:#eac48f;background:#242722}
.design-section{padding:24.2px 0;border-bottom:1.1px solid #293642;scroll-margin-top:13.2px}.design-heading{display:flex;align-items:baseline;gap:13.2px;margin-bottom:17.6px;flex-wrap:wrap}.design-heading>span{font:12.1px ui-monospace,monospace;color:#c29c67}.design-heading h2{font-size:20.9px;margin:0}.design-heading small{font-size:12.1px;color:#8199ae}
.plan-copy{white-space:pre-wrap;font-size:15.4px;line-height:1.95;color:#c1d0dd;margin:11px 0}.plan-bullets{padding-left:22px;color:#a7bacb;font-size:14.3px;line-height:1.9}
.design-section details summary{font-size:13.2px;color:#8ea8bd;cursor:pointer}.source-story{background:#0a1119;border-radius:6.6px;padding:13.2px 17.6px;margin:17.6px 0}.source-story p{font-size:14.3px;line-height:1.9;color:#8fa5ba}
.design-intent{display:grid;grid-template-columns:198px 1fr;gap:19.8px;margin-bottom:17.6px}.design-intent small{display:block;color:#819aaf;font-size:12.1px}.design-intent b{display:block;font-size:14.3px}
.design-world-grid{display:grid;grid-template-columns:1fr 1fr;gap:13.2px 26.4px;margin-top:15.4px}.design-world-grid h3{font-size:13.2px;color:#d1b382}.design-world-grid .plan-copy{font-size:13.2px;line-height:1.85}
.design-asset-group>h3{font-size:14.3px;color:#9eb5c9;margin:19.8px 0 8.8px}.design-asset-group>h3 small{color:#637d95;margin-left:6.6px}
.design-mapping{display:grid;grid-template-columns:minmax(176px,.75fr) 22px minmax(275px,1.4fr);gap:22px;padding:19.8px 0;border-top:1.1px solid #23313f}.design-mapping>div{min-width:0}.design-mapping small{display:block;font-size:11px;color:#6f8ca5}.design-mapping b{display:block;color:#d0e493;font-size:14.3px;margin:7.7px 0}.design-mapping p{font-size:13.2px;line-height:1.85;color:#9fb4c8;white-space:pre-wrap}.design-arrow{align-self:center;color:#c09e70}.design-mapping .design-rationale{color:#d4deec;font-size:15.4px;line-height:1.9;margin:11px 0 13.2px;white-space:pre-wrap}.design-mapping .design-target-description.secondary p{color:#8b9dac;font-size:12.1px;line-height:1.85;margin:0}.design-target-description textarea,.design-rationale textarea{width:100%;box-sizing:border-box}.design-mapping .design-rationale .plan-copy,.design-mapping .design-rationale textarea{font-size:inherit;color:inherit;line-height:inherit;margin:0}
.design-episode{padding:13.2px 0}.design-episode h3{font-size:14.3px;color:#c1d3e1}.design-episode p{font-size:13.2px}.design-issues{color:#cdb28c}
.design-empty{padding:55px 22px;border-top:1.1px solid #2a3541}.design-empty h2{font-size:26.4px;font-weight:500;margin:16.5px 0}.design-empty p{color:#93aabd}.design-empty small{font-size:13.2px;color:#6e889f}
.design-actions{display:flex;justify-content:space-between;align-items:center;gap:17.6px;flex-shrink:0;border-top:1.1px solid #293744;padding:13.2px 28.6px;background:#101923}.design-actions>span{font-size:12.1px;color:#8da5bc}.design-actions>div{display:flex;gap:11px}.design-actions button{font-size:13.2px}
.design-section textarea{width:100%;min-height:93.5px;font-size:14.3px;line-height:1.8;resize:vertical}.design-section input{width:100%;font-size:14.3px;margin:6.6px 0}.design-error{max-width:1540px;margin:13.2px auto;background:#33271b;color:#f1c890;border:1.1px solid #695236;padding:13.2px;font-size:13.2px}
@media(max-width:1210px){.design-layout{grid-template-columns:1fr;gap:0}.design-outline{display:none}.design-scroll{padding:19.8px 26.4px}.design-actions{flex-wrap:wrap}.design-world-grid{grid-template-columns:1fr}}
@media(max-width:825px){.design-mapping{grid-template-columns:1fr 19.8px 1.3fr;gap:11px}.design-direction>div{flex-direction:column;align-items:stretch}.design-intent{grid-template-columns:1fr}.design-toolbar>div{gap:8.8px;align-items:flex-start;flex-direction:column}.design-actions>div{flex-wrap:wrap}}

/* Scheme studio: an intentional empty composer, then a full-document review workspace. */
.design-page{display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
.design-toolbar{min-height:63.8px;padding:14.3px 30.8px;background:#0d151d}
.design-toolbar h1{font-size:17.6px;letter-spacing:0.55px}.design-version{padding:4.4px 11px;border:1.1px solid #36413f;border-radius:22px;color:#abbdbe;font-size:12.1px}
.design-scroll{min-height:0;overflow:auto;padding:26.4px 39.6px 46.2px}
.brief-workspace{max-width:1584px;margin:0 auto}.brief-intro,.brief-process{display:none}
.brief-panel{border:1.1px solid #33414c;background:#121d27;border-radius:13.2px;overflow:hidden}
.brief-panel>summary{display:flex;gap:19.8px;align-items:center;cursor:pointer;padding:16.5px 22px;list-style:none}
.brief-panel>summary::-webkit-details-marker{display:none}.brief-panel>summary>span{font-size:12.1px;color:#91a6bb;white-space:nowrap}
.brief-panel>summary>b{font-size:14.3px;font-weight:500;color:#d1dde7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.brief-panel>summary>small{font-size:12.1px;color:#d7b789;white-space:nowrap}
.brief-composer{padding:26.4px}.brief-composer label{font-size:14.3px;color:#b9cbd9;margin-bottom:15.4px}
.brief-composer textarea{display:block;min-height:121px;max-height:286px;border:0;background:transparent;padding:0;box-shadow:none!important;font-size:18.7px;line-height:1.8;resize:vertical;color:#e3eaf0}
.brief-composer textarea::placeholder{color:#637d91;font-size:16.5px}
.brief-composer:focus-within{background:#14212d}
.brief-examples{display:flex;align-items:center;gap:8.8px;flex-wrap:wrap;margin:15.4px 0 24.2px}.brief-examples>span{font-size:12.1px;color:#6f879b;margin-right:6.6px}
.brief-examples button{font-size:12.1px;padding:5.5px 13.2px;border-radius:22px;background:#1a2935;border:1.1px solid #334652;color:#a7becf}.brief-examples button:hover{border-color:#b3976e;color:#edd2ab}
.brief-compose-bottom{display:flex;justify-content:space-between;align-items:center;gap:19.8px;padding-top:19.8px;border-top:1.1px solid #2a3a46}
.brief-compose-bottom>small{font-size:12.1px;color:#8098ac}.brief-compose-bottom>button{min-height:47.3px;min-width:158.4px;border-radius:7.7px;font-size:14.3px}
.design-start .design-scroll{display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% 20%,#192a33 0,transparent 65%),#0c141c;padding:clamp(26.4px,6vh,77px) 39.6px 38.5px}
.design-start .brief-workspace{width:min(968px,100%);margin:0 auto}
.design-start .brief-intro{display:block;margin-bottom:27.5px}
.brief-kicker{font-size:11px;letter-spacing:3.3px;color:#c6a16f}
.brief-intro h2{font-size:clamp(30.8px,2.5vw,46.2px);line-height:1.3;font-weight:550;letter-spacing:1.1px;margin:14.3px 0}.brief-intro h2 span{color:#ecc58e}
.brief-intro p{font-size:14.3px;line-height:1.8;color:#98aec1}
.design-start .brief-panel{border-color:#455766;box-shadow:0 24.2px 71.5px #0003}
.design-start .brief-panel>summary{display:none}
.design-start .brief-process{display:flex;justify-content:space-between;gap:22px;margin:26.4px 2.2px 0;color:#8da3b7;font-size:13.2px}
.brief-process i{font:12.1px ui-monospace,monospace;color:#cfac7e;margin-right:9.9px}
.design-start .design-layout,.design-start .design-task-status{display:none}
.design-task-status{max-width:1584px;margin:18.7px auto;gap:11px;align-items:center}
.task-live-dot{width:5.5px;height:5.5px;border-radius:50%;background:#76bdb8}
.design-layout{max-width:1584px;grid-template-columns:minmax(0,1fr) 181.5px;gap:44px}
#designBody{min-width:0;overflow:visible}
.design-outline{padding-left:15.4px}.design-outline button{display:flex;align-items:center;gap:14.3px}.design-outline button span{font:11px ui-monospace;color:#637d91}
.design-section{padding:28.6px 0 33px}.design-heading h2{font-size:23.1px}.design-heading>span{border:1.1px solid #564833;border-radius:4.4px;padding:2.2px 6.6px;color:#d4b581}
.design-world-grid>div{padding:17.6px 19.8px;background:#131f29;border:1.1px solid #2c3c49;border-radius:8.8px}
.design-mapping{border-top:0;border:1.1px solid #2b3a46;border-radius:9.9px;margin:13.2px 0;padding:22px;background:linear-gradient(90deg,#111b24 36%,#16222a 36%)}
.design-mapping>div:last-child{padding-left:8.8px}.design-mapping>div:last-child>b{font-size:16.5px}.design-mapping>div:first-child p{color:#7d94a8}
.design-episode{padding:17.6px 19.8px;border-left:2.2px solid #50665e;margin:16.5px 0;background:#111c25;border-radius:0 8.8px 8.8px 0}
.design-actions{height:auto;min-height:107.8px;padding:22px 30.8px;display:flex;justify-content:space-between;align-items:center;gap:26.4px;background:linear-gradient(100deg,#22291f,#1b252b 48%,#202a32);border-top:1.1px solid #8c744e;box-shadow:0 -8.8px 30.8px #0003;z-index:4;color:#cad7e1}
.design-decision{display:flex;align-items:center;gap:17.6px;min-width:0}
.decision-symbol{width:41.8px;height:41.8px;flex-shrink:0;border:1.1px solid #816d4b;background:#393527;color:#efcc8e;border-radius:50%;display:grid;place-items:center;font-size:18.7px}
.design-decision strong{font-size:16.5px;line-height:1.7;color:#e1e7eb;font-weight:550}.design-decision p{font-size:12.1px;line-height:1.8;color:#9db0be;margin-top:3.3px}
.design-actions>.decision-controls{display:flex;gap:11px;align-items:center;flex-shrink:0}
.design-actions button{min-height:47.3px;font-size:13.2px}.design-actions #approveDesign{min-width:286px;min-height:55px;padding:14.3px 24.2px;font-size:15.4px;background:#f0c184;border-color:#f0c184;color:#241d12;box-shadow:0 3.3px 15.4px #0002}
.design-actions #approveDesign>span{margin-left:0;font-size:16.5px;line-height:1}
.design-actions #approveDesign:disabled{opacity:1;background:#303c47;border-color:#4a5965;color:#9aabb9;box-shadow:none}
@media(max-width:1210px){.design-layout{grid-template-columns:1fr}.design-outline{display:none}.design-actions{padding:17.6px 22px;gap:13.2px}.design-decision strong{font-size:14.3px}.decision-symbol{display:none}.design-actions #approveDesign{min-width:253px}}
@media(max-width:858px){.design-scroll{padding:19.8px}.design-start .design-scroll{padding:26.4px 19.8px}.brief-composer{padding:19.8px}.brief-intro h2 br{display:none}.brief-intro h2 span{margin-left:6.6px}.design-start .brief-process{font-size:11px;gap:11px}.brief-process i{margin-right:4.4px}.design-actions{flex-direction:column;align-items:stretch;padding:13.2px 17.6px;min-height:0;gap:11px}.design-actions>.decision-controls{flex-wrap:wrap}.design-actions #approveDesign{flex:1;min-width:242px;min-height:50.6px}.design-decision p{display:none}.brief-panel>summary{gap:11px}.brief-compose-bottom{gap:11px}.brief-compose-bottom>small{max-width:176px}}

/* Keep recovery action attached to its error and aligned with the document. */
.design-error.design-error-actions{max-width:1584px;display:flex;align-items:center;justify-content:space-between;gap:22px;padding:15.4px 19.8px;border-radius:11px}
.design-error-actions.hidden{display:none}
.design-error-actions #planErrorText{flex:1;min-width:0;line-height:1.7;overflow-wrap:anywhere}
.design-error-actions #retryPlan{flex:0 0 auto;white-space:nowrap;border-color:#987347;color:#ffd69d;background:#44321f}
@media(max-width:858px){.design-error.design-error-actions{flex-wrap:wrap;gap:13.2px}.design-error-actions #planErrorText{flex-basis:100%}}

/* Scene boundaries are independent from dialogue and shot headings. */
.original-analysis-text .analysis-scene{margin:33px 0 13.2px;padding:16.5px 19.8px;background:linear-gradient(100deg,#1c292d,#101b24);border:1.1px solid #35464c;border-left:3.3px solid #e9b46f;border-radius:6.6px;break-inside:avoid}
.original-analysis-text .analysis-scene:first-child{margin-top:0}
.analysis-scene-title{display:flex;align-items:center;gap:14.3px;flex-wrap:wrap}
.analysis-scene-number{font:600 12.1px/1.6 var(--font);letter-spacing:.08em;color:#efbd7b;border:1.1px solid #695439;border-radius:4.4px;padding:2.2px 8.8px;white-space:nowrap}
.original-analysis-text .analysis-scene h2{font-size:18.7px;line-height:1.6;color:#eef2f6;margin:0}
.original-analysis-text .analysis-scene-meta{margin:8.8px 0 0;color:#a6bbc9;font-size:13.2px;overflow-wrap:anywhere}
.original-analysis-text .analysis-scene+h3{border-top:0;margin-top:11px;padding-top:8.8px}
@media(max-width:770px){.original-analysis-text .analysis-scene{padding:13.2px;margin-top:26.4px}.original-analysis-text .analysis-scene h2{font-size:16.5px}}

/* Read-only speech events have their own row, independent of visual fields. */
.original-analysis-text .analysis-dialogue{display:grid;grid-template-columns:101.2px 44px minmax(70.4px,110px) minmax(0,1fr);align-items:baseline;gap:13.2px;margin:8.8px 0;padding:12.1px 15.4px;border:1.1px solid #273640;border-left:2.2px solid #577c89;border-radius:5.5px;background:#101c24}
.analysis-dialogue-time{font:12.1px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;color:#9eafc4;overflow-wrap:anywhere}
.analysis-dialogue-kind{font-size:12.1px;color:#81bccd}
.analysis-dialogue-speaker{font-size:13.2px;color:#d6e2eb;font-weight:600;overflow-wrap:anywhere}
.analysis-dialogue-body{min-width:0;font-size:14.3px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;color:#edf1f7}
@media(max-width:836px){.original-analysis-text .analysis-dialogue{grid-template-columns:101.2px 39.6px minmax(0,1fr);gap:6.6px 11px;padding:11px 13.2px}.analysis-dialogue-body{grid-column:1/-1}}

/* Compact confirmation bar: keep the primary action visible without taking reading space. */
.design-actions{min-height:61px;padding:10.7px 26.4px;gap:13.2px;box-shadow:0 -3.3px 13.2px #0002}
.design-actions .decision-symbol{width:28.6px;height:28.6px;font-size:14.3px}
.design-actions .design-decision{align-items:center;gap:11px}
.design-actions .design-decision strong{font-size:13.2px}
.design-actions .design-decision p{display:none}
.design-actions button,.design-actions #approveDesign{min-height:37.4px;padding:6.6px 13.2px;font-size:13.2px}
.design-actions #approveDesign{min-width:0;width:auto;flex:0 0 auto;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:6.6px}
@media(max-width:858px){.design-actions{padding:7.7px 13.2px;gap:6.6px}.design-actions .design-decision{display:none}.design-actions>.decision-controls{width:100%;gap:6.6px}}

.asset-batch-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:9.9px;margin:17.6px 0 13.2px}.asset-batch-toolbar small{color:var(--muted);font-size:12.1px}.asset-card-actions{display:flex;align-items:center;justify-content:space-between;margin-top:13.2px;padding-top:11px;border-top:1.1px solid var(--border)}.asset-card-actions label{display:flex;align-items:center;gap:6.6px;font-size:13.2px;margin:0}.asset-card-actions input{width:auto}.asset-card-actions button{font-size:12.1px;padding:5.5px 11px}.rail [data-nav]{position:relative}.workflow-dot{position:absolute;right:9.9px;top:8.8px;width:7.7px;height:7.7px;border-radius:50%;background:#f0bf7a;box-shadow:0 0 0 3.3px #f0bf7a18}.workflow-dot[hidden]{display:none}.notify-pulse{animation:workflow-notify 1s ease-in-out 3}@keyframes workflow-notify{50%{box-shadow:0 0 0 6.6px #f0bf7a28;opacity:.5}}@media(prefers-reduced-motion:reduce){.notify-pulse{animation:none}}

.asset-update-bar{display:flex;justify-content:space-between;align-items:center;gap:22px;margin:22px 0 13.2px;padding:16.5px 19.8px;border:1.1px solid var(--border);border-radius:8.8px;background:#121c24}.asset-update-bar strong{display:block;font-size:14.3px}.asset-update-bar small{display:block;margin-top:6.6px;color:var(--muted);font-size:12.1px}.asset-update-bar button{flex-shrink:0}.asset-change-notice{font-size:13.2px;color:#c5aa80;margin:8.8px 0}.asset-change-notice summary{cursor:pointer}.asset-change-notice p{margin:11px 0;line-height:1.8}.asset-browse-toolbar{margin-top:27.5px!important;padding-top:19.8px;border-top:1.1px solid var(--border)}.asset-category{margin:24.2px 0 39.6px}.asset-category-heading{display:flex;align-items:center;gap:13.2px;margin-bottom:17.6px;color:#cde493}.asset-category.scenes .asset-category-heading{color:#7fd9e9}.asset-category.props .asset-category-heading{color:#e8b58a}.asset-category-heading h2{font-size:22px;margin:0;color:inherit}.asset-category-heading>span:last-of-type{font-size:13.2px;opacity:.8}.asset-category-heading>div{height:1.1px;flex:1;background:currentColor;opacity:.25}.asset-category-mark{font-size:22px;line-height:35.2px;width:35.2px;text-align:center;background:#ffffff08;border:1.1px solid currentColor;border-radius:5.5px}.asset-card-actions>span{font-size:11px;color:var(--muted)}

.asset-style-editor{margin:17.6px 0 22px;padding:17.6px 19.8px;border:1.1px solid var(--line,#293741);border-radius:11px;background:#101a21}
.asset-style-editor>label{display:block;margin-bottom:11px;font-weight:600;color:var(--text,#e8edf2)}
.asset-style-fields{display:flex;align-items:center;gap:15.4px}
.asset-style-fields textarea{font-size:16px;line-height:1.8;flex:1;min-width:0;resize:vertical;min-height:144px;overflow-y:hidden;box-sizing:border-box}
.asset-style-fields button{flex-shrink:0}
.asset-style-editor>small{display:block;margin-top:8.8px;color:var(--muted,#8ba1b2)}
@media(max-width:704px){.asset-style-fields{align-items:stretch;flex-direction:column}}

.live-output{margin:15.4px 0;padding:15.4px 19.8px;border:1.1px solid #31444e;border-radius:8.8px;background:#0c171e}
.live-output summary{cursor:pointer;color:#71d9da;font-weight:600}
.live-output p,.live-output .muted{font-size:13.2px;color:#8ba1b2;margin:8.8px 0}
.live-output pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:330px;overflow:auto;font:13.2px/1.8 monospace;color:#c7d6df;margin:11px 0 0}

.analysis-live-output{flex:1;min-height:0;overflow:auto;padding:26.4px 35.2px}
.analysis-live-output[hidden],#analysisFinalResults[hidden]{display:none!important}
.analysis-live-output .stream-output{max-height:none;overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;font-size:15.4px;line-height:1.9;margin:19.8px 0}
@media(max-width:858px){.analysis-live-output{padding:19.8px}}

.analysis-start-hint{position:fixed;z-index:30;bottom:52.8px;left:calc(50% + 41.8px);transform:translateX(-50%);max-width:calc(100vw - 121px);padding:14.3px 22px;border:1.1px solid #52796e;border-radius:8.8px;background:#19352f;color:#d6eee6;box-shadow:0 6.6px 26.4px #0004;font-size:14.3px;pointer-events:none;text-align:center}
.analysis-start-hint[hidden]{display:none!important}
.analysis-start-pulse{animation:analysis-start-breathe 2.4s ease-in-out infinite}
@keyframes analysis-start-breathe{0%,100%{box-shadow:0 0 0 0 #efbb7040}50%{box-shadow:0 0 0 6.6px #efbb7028,0 0 19.8px #efbb7040}}
@media(prefers-reduced-motion:reduce){.analysis-start-pulse{animation:none;outline:2.2px solid #efbb7080;outline-offset:3.3px}}

.analysis-episode-card{position:relative}
.analysis-episode-card>[data-project-episode]{padding-right:35.2px}
.document-nav .analysis-episode-remove{position:absolute;right:5.5px;top:5.5px;width:28.6px;height:28.6px;padding:0;margin:0;display:grid;place-items:center;border:0;border-radius:5.5px;font-size:22px;line-height:1;color:#ff6464;background:#e747471a;text-align:center;font-weight:700}
.document-nav .analysis-episode-remove:hover,.document-nav .analysis-episode-remove:focus-visible{color:#fff;background:#cf3737;box-shadow:0 0 0 2.2px #ff646440}
.document-nav .analysis-episode-remove:disabled{opacity:.3;cursor:not-allowed}

.analysis-main-pane{min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column}
.analysis-main-pane>.project-analysis{min-height:0;overflow:auto;flex:1}

.analysis-next-step{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:19.8px;padding:11px 26.4px;border-top:1.1px solid #8c744e;background:linear-gradient(100deg,#22291f,#1b252b 48%,#202a32);box-shadow:0 -3.3px 13.2px #0002;color:#cad7e1;font-size:14.3px}
.analysis-next-step[hidden]{display:none!important}
.analysis-next-step button{white-space:nowrap;padding:7.7px 15.4px;font-size:13.2px}
@media(max-width:770px){.analysis-next-step{gap:11px;padding:11px 13.2px;font-size:13.2px;flex-wrap:wrap}}

/* Default UI density: 110% of the original pixel dimensions; viewport units stay unchanged. */

/* Confirmed plans keep prose accessible without crowding the asset workspace. */
.design-fold:not([open]){padding:14px 0}
.design-fold>summary.design-heading{cursor:pointer;list-style:none;margin:0;align-items:center}
.design-fold>summary::-webkit-details-marker{display:none}
.design-fold>summary:after{content:'▸';color:#c29c67;margin-left:auto}
.design-fold[open]>summary:after{content:'▾'}
.design-fold[open]>summary{margin-bottom:18px}
.design-fold:not([open])>summary h2{font-size:23.1px}
.design-fold>summary:focus-visible{outline:2px solid #edbd81;outline-offset:5px}

/* A single compact update area immediately above library filters. */
.asset-update-section{margin-top:24px;padding-top:18px;border-top:1px solid var(--border)}
.asset-update-section .asset-update-bar{margin:0;padding:0;border:0;background:none}
.asset-update-section .asset-batch-progress{margin:12px 0 0;padding:0;border:0;background:none;font-size:12px;color:var(--muted)}
.asset-update-section .asset-batch-progress strong{color:var(--text)}
.asset-update-section progress{display:block;margin-top:8px;accent-color:var(--cyan)}
.asset-library-page .asset-browse-toolbar{border-top:0;padding-top:0;margin-top:18px!important;gap:14px}
.asset-library-page .asset-tabs{display:flex;gap:6px;align-items:center;flex-shrink:0}
.asset-library-page .asset-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px;white-space:nowrap}
.asset-library-page .asset-tabs .badge-number{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;margin:0;padding:0 5px;border-radius:11px;background:#ffffff09;font-size:11px;line-height:1;font-variant-numeric:tabular-nums}
.asset-library-page .asset-tabs button.active .badge-number{color:var(--amber);background:#edbd8115}

/* Match all three plan heading rows; keep creation beside asset search. */
#designBody>.design-fold,#designBody>#designAssets{padding-top:0}
#designBody>.design-fold:not([open]){padding-bottom:0}
#designBody>.design-fold>summary.design-heading,#designAssets>.design-heading{min-height:66px;padding:14px 0;margin:0;align-items:center}
#designBody>.design-fold[open]>summary.design-heading{margin-bottom:18px}
#planAssetsHost .asset-library-page{padding:0}
#planAssetsHost .asset-library-page>.page-heading{display:none}
#planAssetsHost .asset-style-editor{margin-top:0}
.asset-update-section .asset-update-bar{justify-content:flex-start}
.asset-library-page .asset-browse-toolbar #assetSearch{flex:1;min-width:120px;width:auto}
.asset-library-page .asset-browse-toolbar #addAsset{flex-shrink:0;white-space:nowrap}

/* The update action shares the progress row, never a separate toolbar row. */
.asset-update-section{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:end}
.asset-update-section #assetBatchProgress{grid-column:1;grid-row:1;min-width:0}
.asset-update-section .asset-update-bar{grid-column:2;grid-row:1}
.asset-update-section .asset-batch-progress{margin-top:0}
.asset-update-section progress{width:100%;height:8px}
.asset-edit-dialog>.dialog-head+p{display:none}
.asset-edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}
.asset-edit-grid label+label{margin-top:16px}
.asset-zoom{display:grid;place-items:center;position:relative;width:100%;padding:0;min-height:230px;background:#080d12;overflow:hidden;cursor:zoom-in}
.asset-zoom img{width:100%;max-height:440px;object-fit:contain;display:block}
.asset-zoom span{padding:12px;color:var(--muted)}
.asset-zoom img+span{position:absolute;bottom:8px;background:#000b;border-radius:6px;opacity:0;color:white;transition:opacity .15s}
.asset-zoom:hover img+span,.asset-zoom:focus-visible img+span{opacity:1}
#assetSaveStatus{display:block;margin-top:10px;cursor:pointer}
.asset-lightbox{position:fixed;inset:0;z-index:200;display:grid;place-items:center;background:#06090df5;padding:40px;cursor:zoom-out}
.asset-lightbox img{max-width:100%;max-height:calc(100dvh - 80px);object-fit:contain}
.asset-lightbox button{position:absolute;right:20px;top:16px;font-size:24px}
@media(max-width:770px){.asset-edit-grid{grid-template-columns:1fr}.asset-edit-grid textarea{max-height:35vh}}

.asset-grid>.asset-card{display:flex;flex-direction:column}
.asset-grid>.asset-card>.details{flex:1;display:flex;flex-direction:column}
.asset-grid>.asset-card .asset-card-actions{margin-top:auto;min-height:58px;display:flex;align-items:center;justify-content:space-between}
.asset-grid>.asset-card .details>.row{margin-bottom:16px}
.asset-card>[data-asset-zoom]{cursor:zoom-in}
.asset-image-status{height:200px;flex-shrink:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:#0a1119;color:var(--muted);text-align:center;padding:16px}
.asset-image-status small{font-size:11px}
.asset-loading-dots{display:flex;gap:7px}
.asset-loading-dots i{width:7px;height:7px;border-radius:50%;background:var(--amber);animation:asset-pulse 1.2s infinite ease-in-out}
.asset-loading-dots i:nth-child(2){animation-delay:.2s}.asset-loading-dots i:nth-child(3){animation-delay:.4s}
@keyframes asset-pulse{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}
.dialog.wide.asset-edit-dialog{width:min(1280px,94vw);max-width:1280px}
.asset-edit-dialog>.dialog-head{height:18px;justify-content:flex-end}
.asset-edit-dialog>.dialog-head h2{display:none}
.asset-edit-grid{grid-template-columns:1.15fr 1fr;gap:24px;margin-top:12px;align-items:stretch}
.asset-edit-grid>div:last-child{display:flex;flex-direction:column}
.asset-edit-grid>div:last-child>label:nth-child(2){flex:1;display:flex;flex-direction:column}
.asset-edit-grid input,.asset-edit-grid textarea{font-size:16px;line-height:1.8}
.asset-edit-grid textarea{flex:1;min-height:300px}
.asset-edit-grid .asset-zoom{min-height:360px;height:calc(100% - 64px)}
.asset-edit-grid .asset-zoom img{max-height:540px}
@media(max-width:770px){.asset-edit-grid{grid-template-columns:1fr}.asset-edit-grid .asset-zoom{height:auto;min-height:200px}}
@media(prefers-reduced-motion:reduce){.asset-loading-dots i{animation:none}}

.asset-grid>.asset-card>[data-asset-zoom],.asset-grid>.asset-card>.asset-image-status,.asset-grid>.asset-card>.asset-placeholder{width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;background:#090f15}
.asset-edit-grid .asset-zoom{height:auto;min-height:0;aspect-ratio:16/9;background:#090f15;border-color:transparent}
.asset-edit-grid .asset-zoom:hover{background:#090f15;border-color:#526473}
.asset-edit-grid .asset-zoom img{width:100%;height:100%;max-height:none;object-fit:contain}
.asset-edit-grid .asset-zoom img+span{display:none}
.asset-edit-dialog>.dialog-head{height:0;min-height:0;margin:0;position:relative}
.asset-edit-dialog #dialogClose{position:absolute;right:-12px;top:-16px}
.asset-edit-grid{align-items:start}
.new-asset-type{margin:0 32px 14px 0}.new-asset-type select{min-width:120px}
.new-asset-dialog .asset-edit-grid{margin-top:0}
.mention-menu-head .mention-create{white-space:nowrap;font-size:11px;padding:5px 8px;flex-shrink:0}

.workflow-dot.generation-pulse{animation:workflow-notify 1.3s ease-in-out infinite}
.asset-edit-grid .version-row select{min-width:0;flex:1;font-size:12px}
.asset-edit-grid .version-row button{flex-shrink:0;white-space:nowrap}
@media(prefers-reduced-motion:reduce){.workflow-dot.generation-pulse{animation:none}}

.asset-edit-dialog button:not(.asset-zoom):not(:disabled):hover{filter:brightness(1.12);border-color:#8396a8}
.asset-edit-dialog button:not(.asset-zoom):not(:disabled):active{transform:translateY(1px);filter:brightness(.92)}
.asset-edit-dialog input:hover,.asset-edit-dialog textarea:hover,.asset-edit-dialog select:hover{border-color:#53697d}
.asset-edit-dialog button:disabled{cursor:not-allowed}

.design-toolbar .design-task-status{margin:0;min-width:0;max-width:none;font-size:13.2px;gap:11px;color:#8ac8bf}
.design-toolbar>div{min-width:0}.design-toolbar h1{flex-shrink:0}.design-toolbar #planTaskStatus{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.design-toolbar #planTaskMeta{flex-shrink:0}

.design-intent{display:block}
.design-dialogue-language{display:flex;align-items:center;gap:12px;width:fit-content;max-width:100%;padding:0;border:0;border-radius:0;background:transparent}
.design-intent .design-dialogue-language small{font-size:14px;font-weight:600;color:var(--muted);white-space:nowrap}
.design-intent .design-dialogue-language b{font-size:16px;font-weight:650;color:#f0f3f7}
.design-dialogue-language input{font-size:16px;max-width:260px;min-width:0}

.analysis-empty-upload{flex:1;display:grid;place-items:center;padding:32px;min-height:260px}
.analysis-empty-upload .video-drop-area{width:min(760px,100%);min-height:220px;margin:0;padding:32px;font-size:20px;font-weight:600;color:var(--text);cursor:pointer}
.analysis-project-shell.upload-drag-over{box-shadow:inset 0 0 0 2px #edbf78}
.analysis-project-shell.upload-drag-over .video-drop-area{border-color:#edbf78;background:#25291f}

.upload-feedback{max-width:760px;margin:32px auto;padding:24px}.upload-video-placeholder{aspect-ratio:16/9;background:#080e13;border:1px solid var(--border);border-radius:12px;display:grid;place-items:center;color:var(--muted)}.upload-feedback progress{width:100%;height:8px;accent-color:#73bdb2}.upload-feedback h2{overflow-wrap:anywhere}.upload-feedback p{color:#73bdb2}

/* Project inputs sit above, never select or replace the global plan. */
.project-videos{position:relative;box-sizing:border-box;width:100%;max-width:1584px;margin:0 auto 18px;padding:14px 20px;border:1px solid var(--border,#2c3e49);border-radius:12px;background:#101a22}
.project-videos-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.project-videos-toggle{border:0;background:transparent;padding:4px 0;text-align:left;font-weight:600;font-size:15px}
.project-videos-toggle span{font-size:13px;font-weight:400;color:var(--muted,#8ba2b5);margin-left:10px}
#projectVideosStatus{flex:1;color:var(--muted,#8ba2b5);font-size:13px}
.project-videos-hint{font-size:13px;color:var(--muted,#8ba2b5);margin:8px 0 0}
.project-video-list:not([hidden]){display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.project-video-card{display:flex;align-items:flex-start;gap:8px;padding:8px 10px;border:1px solid var(--border,#2c3e49);border-radius:8px;max-width:100%;background:#0d151d}
.project-video-card>button{background:transparent;border:0;padding:3px;text-align:left}
.project-video-card>button:first-child{min-width:0}.project-video-card b{display:block;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.project-video-card span{display:block;color:var(--muted,#8ba2b5);font-size:12px;margin-top:5px}
.project-video-card [data-delete-project-video]{color:#d88686;font-size:18px}
.project-video-drop-label{display:none}.project-videos.dragging{outline:2px solid #efbd70}.project-videos.dragging .project-video-drop-label{display:grid;place-items:center;position:absolute;inset:0;background:#12212ff2;border-radius:12px;color:#efbd70;pointer-events:none}
.project-original-video{display:block;max-width:100%;max-height:300px;margin:auto;background:#000}
#projectEpisodeDetail .original-analysis-text{max-height:55vh;overflow:auto}

.design-start .project-videos{width:min(968px,100%);flex-shrink:0}

.asset-edit-grid.asset-edit-rearranged{align-items:stretch}
.asset-edit-rearranged .asset-edit-visual{display:flex;flex-direction:column;gap:12px;min-width:0}
.asset-edit-rearranged .asset-edit-description{min-width:0;display:flex;flex-direction:column;gap:12px}
.asset-edit-rearranged .asset-edit-description>label{flex:1;display:flex;flex-direction:column}
.asset-edit-rearranged .asset-edit-description textarea{flex:1;min-height:300px}
.asset-edit-rearranged .version-row{margin:0;display:flex}
.asset-edit-rearranged .asset-edit-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.asset-edit-rearranged .asset-edit-actions small{flex:1;min-width:60px}
@media(max-width:770px){.asset-edit-rearranged .asset-edit-description textarea{min-height:180px}}

.asset-edit-rearranged .asset-action-status{flex:1;min-width:160px;align-self:center}
.asset-edit-rearranged .asset-action-status small{display:block;font-size:12px;line-height:1.6}
.asset-edit-rearranged .asset-action-status small[hidden]{display:none}
.asset-edit-rearranged #assetVideoNotice{color:var(--muted)}

.asset-description-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.asset-description-heading #assetSaveStatus{text-align:right;font-size:12px;font-weight:400}

.asset-edit-rearranged #assetVideoNotice{color:var(--amber,#efbd70)}
.asset-edit-rearranged #assetVideoNotice[data-status="failed"]{color:var(--danger,#ed8585)}

/* Match the compact project-direction section instead of a notification banner. */
.project-videos{padding:0;background:#121d27;border:1.1px solid #33414c;border-radius:13.2px;overflow:hidden;margin-bottom:18px}
.project-videos-head{min-height:56px;padding:10px 22px;gap:16px;flex-wrap:wrap}
.project-videos-toggle{display:flex;align-items:center;gap:20px;flex:1;min-width:150px;padding:6px 0;background:transparent;border:0;border-radius:0}
.project-videos-toggle:hover{background:transparent;border:0}
.project-videos-toggle .project-videos-label{margin:0;font-size:12.1px;color:#91a6bb;font-weight:400;white-space:nowrap}
.project-videos-toggle b{font-size:14.3px;font-weight:500;color:#d1dde7}
.project-videos-toggle .project-videos-chevron{margin:0;font-size:12px;color:#d7b789}
#projectVideosStatus{flex:0 1 auto;font-size:12px;max-width:45%;overflow-wrap:anywhere}
#projectVideosStatus:empty{display:none}
#addProjectVideos{padding:5px 0;border:0;background:transparent;color:#d7b789;font-size:12.1px;white-space:nowrap}
#addProjectVideos:hover{background:transparent;color:#f5cd96}
.project-videos[data-expanded="true"] .project-videos-head{border-bottom:1px solid #293a46}
.project-videos .project-videos-hint{margin:0;padding:16px 22px 0;color:#8298ab;font-size:12px}
.project-videos .project-videos-hint[hidden]{display:none}
.project-videos .project-video-list:not([hidden]){display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));padding:14px 22px 20px;margin:0;gap:12px}
.project-videos .project-video-card{padding:12px;border-color:#2c404e;border-radius:9px;background:#101922}
.project-videos .project-video-card>button:first-child{flex:1}
.project-videos .project-video-card:hover{border-color:#506779;background:#14222d}
.project-videos .project-video-card span{font-size:12px;margin-top:7px;color:#91a6bb}
@media(max-width:600px){.project-videos-head{gap:10px;padding:10px 16px}.project-videos-toggle{gap:12px}.project-videos .project-video-list:not([hidden]){grid-template-columns:1fr;padding:12px 16px 16px}#projectVideosStatus{max-width:100%}}

/* First visit: brand introduction, clear upload target, then adaptation direction. */
.design-start .brief-workspace{flex-shrink:0}
.project-videos.project-videos-empty{background:#111d27;border:1px dashed #526778;overflow:hidden}
.project-videos-empty #addProjectVideos{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;min-height:190px;padding:24px;border:0;border-radius:12px;color:#d1dde7;white-space:normal;background:transparent}
.project-videos-empty #addProjectVideos:hover{background:#182935;color:#e5edf4}
.project-videos-empty .first-upload-icon{font-size:26px;line-height:1;color:#ecc58e}
.project-videos-empty #addProjectVideos strong{font-size:20px;font-weight:600;color:#ecc58e}
.project-videos-empty #addProjectVideos>span:not(.first-upload-icon){font-size:14px}
.project-videos-empty #addProjectVideos small{font-size:12px;color:#8da3b7;margin-top:3px}
.project-videos-empty #projectVideosStatus:empty{display:none}
@media(max-width:600px){.project-videos-empty #addProjectVideos{min-height:170px;padding:20px 14px}}

.creation-empty-project{display:flex;flex-direction:column;height:100%;min-height:0}.creation-empty-project h1{font-size:18px;margin:0}.creation-empty-content{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;text-align:center;gap:14px}.creation-empty-content h2{font-size:20px;margin:0}.creation-empty-content p{color:var(--muted);margin:0 0 8px;line-height:1.7}

.project-videos .project-episode-status[data-state="running"]{color:#efbd70}
.project-videos .project-episode-status[data-state="completed"]{color:#77cbb6}
.project-episode-status[data-state="running"]::before{content:"";display:inline-block;width:6px;height:6px;margin-right:7px;border-radius:50%;vertical-align:middle;background:currentColor;animation:project-analysis-breathe 2s ease-in-out infinite}
@keyframes project-analysis-breathe{0%,100%{opacity:.4}50%{opacity:1}}
@media(prefers-reduced-motion:reduce){.project-episode-status[data-state="running"]::before{animation:none}}

.dialog:has(#projectEpisodeDetail){width:min(1400px,94vw);max-width:94vw;height:min(820px,90dvh);max-height:90dvh;display:flex;flex-direction:column;overflow:hidden;padding:24px}
.dialog:has(#projectEpisodeDetail)>.dialog-head{flex-shrink:0;margin-bottom:22px}
.dialog:has(#projectEpisodeDetail)>p{display:none}
#projectEpisodeDetail{display:grid;grid-template-columns:minmax(260px,32%) minmax(0,1fr);gap:28px;flex:1;min-height:0}
.episode-source-pane,.episode-analysis-pane{display:flex;flex-direction:column;min-height:0;min-width:0}
.episode-pane-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;margin-bottom:14px}
.episode-pane-heading h3{margin:0;font-size:15px;color:#dce6ee}.episode-pane-heading>span{font-size:12px;color:#91a6bb}
.episode-player{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;background:#080d12;border:1px solid #283844;border-radius:10px;overflow:hidden}
#projectEpisodeDetail .project-original-video{width:100%;height:100%;max-height:100%;margin:0;object-fit:contain}
.episode-analysis-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:10px}
.episode-coarse{margin-bottom:16px;border-bottom:1px solid #2b3945;padding:0 0 14px}.episode-coarse summary{cursor:pointer;color:#91a6bb;font-size:13px}.episode-coarse .stream-output{max-height:none;overflow:visible;margin-top:12px}
#projectEpisodeDetail .original-analysis-text{max-height:none;overflow:visible;padding:20px;border-radius:10px}
@media(max-width:800px){.dialog:has(#projectEpisodeDetail){padding:18px}#projectEpisodeDetail{display:flex;flex-direction:column;overflow:auto;gap:22px}.episode-source-pane{flex-shrink:0}.episode-player{flex:none;height:240px}.episode-analysis-pane{flex:none}.episode-analysis-scroll{overflow:visible;padding-right:0}}

.dialog:has(#projectEpisodeDetail) #dialogClose{display:grid;place-items:center;flex-shrink:0;width:36px;height:36px;padding:0;border:1px solid #566575;border-radius:8px;background:#24313e;color:#f2f6fa;font-size:25px;line-height:1;cursor:pointer}
.dialog:has(#projectEpisodeDetail) #dialogClose:hover{background:#493238;border-color:#e19b9b;color:#fff}
.dialog:has(#projectEpisodeDetail) #dialogClose:focus-visible{outline:2px solid #efbd70;outline-offset:3px}

.episode-player{position:relative}#sourcePlaybackStatus{position:absolute;top:20px;left:16px;right:16px;text-align:center;color:#efbd70;z-index:1;pointer-events:none;font-size:13px}

/* Avoid full-screen backdrop filtering while playing source video. */
.overlay:has(#projectEpisodeDetail){backdrop-filter:none;-webkit-backdrop-filter:none;background:#000b}

.design-page{grid-template-rows:auto minmax(0,1fr)}

.dialog:has(#projectEpisodeDetail) .dialog-head{gap:16px}
.episode-rewrite-link{margin-left:auto;flex-shrink:0;animation:episode-rewrite-breathe 2.8s ease-in-out infinite}
.episode-rewrite-link[hidden]{display:none}
@keyframes episode-rewrite-breathe{0%,100%{box-shadow:0 0 0 0 #efbd7010}50%{box-shadow:0 0 0 4px #efbd7030,0 0 14px #efbd7020}}
@media(prefers-reduced-motion:reduce){.episode-rewrite-link{animation:none}}

.asset-reference-row{display:flex;align-items:center;gap:8px;min-width:0;margin-bottom:4px}
.asset-reference-row[hidden]{display:none}
.asset-edit-rearranged .asset-reference-row #setPersonReference{flex:none;min-height:0;padding:2px 7px;font-size:11px;line-height:1.6;border-radius:4px;white-space:nowrap}
.asset-edit-rearranged .asset-reference-row #setPersonReference:disabled{opacity:1;color:var(--muted);background:transparent;cursor:default}
.asset-edit-rearranged .asset-reference-row #assetReferenceNotice{min-width:0;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
