:root{font:14px/1.65 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;color:#1d1d1f;background:#f5f5f7;--line:#e4e4e8;--blue:#0071e3;--muted:#707078}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit;color:inherit}button{padding:5px 11px;border:1px solid var(--line);border-radius:7px;background:white;cursor:pointer;font-size:13px;min-height:31px}button:hover{background:#f0f5fc}button:disabled{opacity:.5;cursor:wait}button.primary{background:var(--blue);color:white;border-color:var(--blue)}a{color:var(--blue)}input,select,textarea{border:1px solid var(--line);border-radius:7px;background:white;padding:7px 10px;max-width:100%}textarea{width:100%;min-height:150px;resize:vertical;line-height:1.8}input[type=checkbox]{accent-color:var(--blue)}header{padding:17px 28px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}.brand{font-size:21px;font-weight:600;letter-spacing:-1px}.row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.muted{color:var(--muted);font-size:12px}nav{padding:10px 28px;border-bottom:1px solid var(--line);display:flex;gap:5px}nav button{border:0;background:transparent;min-width:80px}nav button.active{background:#fff;box-shadow:0 1px 4px #00000012}.shell{max-width:1500px;margin:auto;display:grid;grid-template-columns:minmax(0,1fr) 330px}.shell.nochat{grid-template-columns:1fr}main{min-width:0;padding:28px}aside{border-left:1px solid var(--line);padding:20px;background:#fff;min-width:0}h1,h2,h3{font-weight:500;line-height:1.35}h1{font-size:25px;margin:0 0 7px;letter-spacing:-.7px}h2{font-size:18px;margin:0 0 12px}h3{font-size:15px;margin:0 0 8px}.paper{background:#fff;padding:23px;border-radius:13px;box-shadow:0 1px 3px #00000009;margin-bottom:19px}.lead{display:flex;align-items:start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:22px}.pill{background:#edf4fc;color:#1764af;padding:3px 8px;font-size:11px;border-radius:5px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fields label{display:flex;flex-direction:column;gap:5px}.full{grid-column:1/-1}.list{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}.list button.active{color:var(--blue);border-color:#a7ccf3;background:#edf4fc}.refs,.results{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.ref{width:175px;border:1px solid var(--line);padding:9px;border-radius:9px}.ref img{width:100%;height:115px;object-fit:contain;background:#f5f5f7;border-radius:5px}.ref input[type=text]{width:100%;font-size:12px}.result{max-width:260px}.result img,.result video{width:100%;max-height:220px;object-fit:contain;background:#f5f5f7}.result.selected{outline:2px solid var(--blue);border-radius:9px;padding:7px}.bottom{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;border-top:1px solid var(--line);margin-top:20px;padding-top:15px}.part{margin-top:17px;padding-top:16px;border-top:1px solid var(--line)}.chatmsg{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;padding:13px;margin:12px 0;background:#f5f5f7;border-radius:9px}.chatmsg.assistant{background:white;border:1px solid var(--line)}.chatinput{min-height:95px;margin-top:18px}.empty{padding:45px 15px;text-align:center;color:var(--muted)}.readonly{white-space:pre-wrap;max-width:850px;margin:20px auto;line-height:2}#status{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:#222;color:#fff;padding:12px 20px;border-radius:10px;z-index:10;max-width:90%;box-shadow:0 5px 20px #0003}details{margin:10px 0}summary{cursor:pointer;color:var(--blue)}.shotchoice{display:flex;align-items:center;gap:8px;padding:8px;border-bottom:1px solid var(--line)}.spacer{flex:1}.prompt{min-height:190px}.error{color:#b32d25;font-size:13px}.notice{background:#fff5db;border:1px solid #eedfbb;padding:13px;border-radius:8px;margin-bottom:15px;font-size:13px}.job{padding:10px 0;border-bottom:1px solid var(--line)}.project-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:15px}.project-card{text-align:left;padding:24px;font-size:17px;border:0;border-radius:13px}.small{font-size:12px}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--blue);outline-offset:3px}@media(max-width:850px){.shell{grid-template-columns:minmax(0,1fr) 280px}main{padding:18px}}@media(max-width:680px){.shell{display:block}aside{border-top:1px solid var(--line);border-left:0}header{padding:12px}nav{padding:8px;gap:0}nav button{min-width:0;flex:1}.fields{grid-template-columns:1fr}.full{grid-column:auto}.paper{padding:17px}button{min-height:38px}textarea{font-size:16px}}

#error-log-dialog{width:min(960px,94vw);max-height:85vh;border:1px solid var(--line);border-radius:14px;padding:24px;background:#fff;color:inherit}#error-log-dialog::backdrop{background:#0005}.log-entry{padding:15px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}.log-entry pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#f5f5f7;padding:12px;border-radius:8px;font-size:12px}

.asset-group+.asset-group{border-top:1px solid var(--line);padding-top:14px}.asset-group .list{margin:8px 0 14px}

.shot-scene{margin:20px 0}.shot-scene h2{margin:0}.shot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-top:12px}.shot-card{text-align:left;padding:16px;display:flex;flex-direction:column;gap:9px;border-radius:12px;white-space:normal;overflow-wrap:anywhere}.shot-card.active{border-color:var(--blue);background:#f0f6ff}.shot-description{white-space:pre-wrap}.busy-dot{width:9px;height:9px;border-radius:50%;background:var(--blue);animation:pulse 1.5s ease-in-out infinite}.ai-progress{border:1px solid #bdd9f5}.ai-progress p{margin-bottom:0}@keyframes pulse{50%{opacity:.3}}@media(prefers-reduced-motion:reduce){.busy-dot{animation:none}}

/* Approved full-width card workbench. */
.shell{max-width:none;margin:0;width:100%;grid-template-columns:minmax(0,1fr) 320px;align-items:start}.shell>main{grid-column:1;min-width:0}.shell>aside{grid-column:2;grid-row:1;position:sticky;top:0;height:100dvh;overflow-y:auto}.shell.nochat{grid-template-columns:minmax(0,1fr)}.asset-tabs{display:flex;gap:8px;margin:0 0 18px}.asset-tabs [aria-pressed=true]{color:var(--blue);background:#edf4fc;border-color:#b6d5f4}.asset-grid,.shot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px;align-items:start}.asset-card,.shot-card{margin:0;min-width:0;padding:16px;border:1px solid var(--line);box-shadow:none;display:block}.asset-card.selected,.shot-card.selected{border-color:#94bde6}.asset-card label,.shot-card label{display:block;font-size:12px;color:var(--muted)}.asset-card input,.shot-card input{width:100%;margin-top:5px}.asset-card input[type=checkbox]{width:auto}.card-name{flex:1;min-width:120px}.asset-image{height:160px;background:#eff0f3;display:flex;align-items:center;justify-content:center;margin:14px 0;border-radius:8px}.asset-image img{width:100%;height:100%;object-fit:contain}.asset-card textarea,.shot-card textarea{margin-top:5px;min-height:125px;font-size:13px}.asset-card .prompt{min-height:180px}.asset-card .compact-text,.shot-card .compact-text{min-height:82px}.asset-card .results .result{width:110px}.asset-card .refs .ref{width:125px}.asset-card .card-refs{padding:10px 0;border-bottom:1px solid var(--line);margin-bottom:14px}.shot-meta{display:grid;grid-template-columns:1fr 90px;gap:8px}.shot-card>label,.shot-meta{margin-top:12px}.roll-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.roll-production{min-width:0}.roll-card .shotchoice{align-items:start}.roll-card .prompt{min-height:240px}.roll-card>.bottom{justify-content:flex-end}.roll-card input[data-roll-name]{margin-left:8px}.shot-scene{margin-bottom:28px}#roll-picker{width:min(440px,90vw);border:1px solid var(--line);border-radius:12px;padding:24px}#roll-picker::backdrop{background:#0005}#roll-picker select{display:block;width:100%;margin-top:10px}@media(min-width:1600px){.asset-grid,.shot-grid{grid-template-columns:repeat(auto-fill,minmax(310px,1fr))}}@media(max-width:1000px){.shell{grid-template-columns:minmax(0,1fr) 275px}.asset-grid,.shot-grid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.roll-columns{grid-template-columns:1fr}}@media(max-width:680px){.shell{display:block}.shell>aside{position:static;height:auto;overflow:visible}.asset-grid,.shot-grid{grid-template-columns:1fr}}

#tasks-dialog{width:min(580px,94vw);max-height:80vh;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:22px}#tasks-dialog::backdrop{background:#0004}.task-entry{border-top:1px solid var(--line);padding:14px 0}.task-entry progress{display:block;width:100%;height:6px;margin:10px 0;accent-color:var(--blue)}

.project-entry{padding:0;overflow:hidden;margin:0}.project-entry .project-card{width:100%;border-radius:0;background:transparent;overflow-wrap:anywhere}.project-entry-actions{padding:0 20px 18px;display:flex;justify-content:flex-end}#project-dialog{width:min(440px,92vw);border:1px solid var(--line);border-radius:14px;padding:24px}#project-dialog::backdrop{background:#0005}#project-dialog label{display:block;margin-top:15px}#project-dialog input,#project-dialog select{width:100%;display:block;margin-top:6px}

.card-tools{display:flex;align-items:center;gap:8px;margin:-8px -6px 8px}.card-tools button{border:0;background:transparent;padding:0 6px;min-height:26px;color:var(--muted)}.card-tools .drag-handle{cursor:grab;font-size:21px}.card-close{margin-left:auto;font-size:21px}.card-tools .card-close:hover{color:#b32d25;background:#fff0ef}.card-heading{align-items:flex-end;flex-wrap:nowrap}.card-heading>button{margin-bottom:0;white-space:nowrap}.card-progress{font-size:11px;color:var(--blue)}.processing{animation:card-glow 1.8s ease-in-out infinite;border-color:#65aaff!important}.dragging{opacity:.45}.drop-target{outline:2px dashed var(--blue);outline-offset:3px}aside .paper{padding:12px;border:1px solid var(--line);margin-top:14px}aside #suggestion{min-height:240px}@keyframes card-glow{0%,100%{box-shadow:0 0 0 2px #0071e318,0 0 8px #0071e314}50%{box-shadow:0 0 0 3px #0071e32a,0 0 18px #0071e33b}}@media(prefers-reduced-motion:reduce){.processing{animation:none;box-shadow:0 0 0 2px #0071e333}}

.shotchoice{position:relative}.shotchoice-content{flex:1;min-width:0;overflow-wrap:anywhere}.shotchoice>button{flex-shrink:0;white-space:nowrap}.roll-shot-handle{cursor:grab;border:0;background:transparent;padding:0 5px;font-size:22px;color:var(--muted)}.roll-shot-handle:active{cursor:grabbing}.shotchoice.drop-before:before,.shotchoice.drop-after:after{content:"";position:absolute;left:0;right:0;height:3px;background:var(--blue);border-radius:2px}.shotchoice.drop-before:before{top:0}.shotchoice.drop-after:after{bottom:0}

.assignment{display:flex;gap:8px;margin:8px 0 14px}.assignment input{min-width:0;flex:1}.assignment select{max-width:110px}

/* One continuous conversation with an anchored composer. */
.shell>.conversation{display:flex;flex-direction:column;gap:12px;overflow:hidden;height:calc(100dvh - 20px)}.conversation>.lead{margin:0}.conversation-context{font-size:12px;color:var(--muted);border-bottom:1px solid var(--line);padding-bottom:10px}.conversation-messages{flex:1;min-height:100px;overflow:auto;overscroll-behavior:contain}.conversation .chatmsg{margin:0 0 14px;white-space:pre-wrap;line-height:1.8}.message-author{font-size:11px;color:var(--muted);margin-bottom:6px}.message-actions{margin-top:12px;white-space:normal}.conversation-composer{border-top:1px solid var(--line);padding-top:10px}.conversation-composer .chatinput{margin:0 0 8px;min-height:90px;max-height:220px}.conversation>.lead select{max-width:160px}@media(max-width:680px){.shell>.conversation{height:75dvh;min-height:420px}}

.proposal-shot{padding:10px 0;border-top:1px solid var(--line);font-size:12px}.scene-proposal{margin-top:12px;white-space:pre-wrap}
.shell:not(.nochat){grid-template-columns:minmax(0,1fr) 380px}.shell>.conversation{height:calc(100dvh - 124px);min-height:420px}@media(max-width:1000px){.shell:not(.nochat){grid-template-columns:minmax(0,1fr) 320px}}@media(max-width:680px){.shell>.conversation{height:75dvh}}

/* Two workspaces share a scene-aware script reference. */
.workspace-nav{align-items:center;flex-wrap:wrap}.workspace-nav>button.active{background:#285b48;color:#fff}.production-tabs{display:flex;gap:8px;padding:12px 24px 0}.production-tabs [aria-pressed=true]{background:#e6eee9;color:#285b48;border-color:#8eafa0}.shell.with-script{grid-template-columns:250px minmax(0,1fr) 330px;align-items:start}.shell.with-script>main{grid-column:2;grid-row:1;padding:22px}.shell.with-script>.conversation{grid-column:3;grid-row:1}.shell.with-script.assistant-closed{grid-template-columns:250px minmax(0,1fr)}.script-panel{grid-column:1;grid-row:1;position:sticky;top:10px;padding:20px 16px;background:#fff;border-right:1px solid var(--line);max-height:calc(100dvh - 120px);overflow:auto}.script-panel h2{font-size:16px;margin:0}.script-panel select{display:block;width:100%;margin-top:7px}.script-panel>label{display:block;margin-top:18px;font-size:12px;color:var(--muted)}.script-excerpt{white-space:pre-wrap;overflow-wrap:anywhere;font-family:'Songti SC',serif;line-height:2;font-size:14px}.script-floating .script-panel{position:fixed;top:145px;left:18px;width:280px;z-index:5;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 35px #0002}.shell.with-script.script-floating{grid-template-columns:minmax(0,1fr) 330px}.shell.with-script.script-floating>main{grid-column:1}.shell.with-script.script-floating>.conversation{grid-column:2}.shell.with-script.script-floating.assistant-closed{grid-template-columns:1fr}.shell.script-only{display:block}.asset-tabs{flex-wrap:wrap}.reference-links{display:flex;gap:15px;flex-wrap:wrap;margin:12px 0}.asset-card [data-field=searchQuery]{margin-top:7px}.shell.with-script .asset-grid,.shell.with-script .shot-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}.shell.with-script .roll-columns{grid-template-columns:1fr}.conversation textarea{width:100%}
@media(min-width:1600px){.shell.with-script{grid-template-columns:300px minmax(0,1fr) 360px}.shell.with-script .roll-columns{grid-template-columns:1fr 1fr}}
@media(max-width:1100px){.shell.with-script{grid-template-columns:205px minmax(0,1fr) 285px}.shell.with-script.assistant-closed{grid-template-columns:205px minmax(0,1fr)}.shell.with-script>main{padding:16px}.conversation>.lead select{max-width:140px}}
@media(max-width:850px){.shell.with-script{grid-template-columns:190px minmax(0,1fr)}.shell.with-script>.conversation{grid-column:2;grid-row:2;position:static;height:65dvh}.shell.with-script .script-panel{grid-row:1/3}.shell.with-script.script-floating{grid-template-columns:1fr}.shell.with-script.script-floating>.conversation{grid-column:1}}
@media(max-width:600px){.shell.with-script,.shell.with-script.assistant-closed{display:block}.script-panel{position:static;max-height:260px;border-bottom:1px solid var(--line)}.script-floating .script-panel{width:min(280px,85vw)}.workspace-nav button{flex:initial}.shell.with-script>.conversation{height:70dvh}.production-tabs{padding-left:16px}}

/* dCraft Studio 首页 */
#app.is-home{min-height:100dvh;background:#121413;color:#f0f2ed}#app.is-home .home-header{padding:20px 36px;background:#121413;border-bottom:1px solid #343935;display:flex;justify-content:flex-start;gap:34px}#app.is-home .home-brand{font-size:20px;letter-spacing:-.7px;font-weight:600;white-space:nowrap}#app.is-home .home-brand span{font-weight:400;color:#a8afa8}#app.is-home .home-current{padding:8px 0;border-bottom:1px solid #c6dfbf;color:#f0f2ed}#app.is-home .home-header-actions{margin-left:auto}#app.is-home .home-header button{background:#1d201e;color:#d7ddd4;border-color:#343935}#app.is-home .home-header button:hover{background:#303830}.home-main{padding:32px 36px 30px;max-width:1500px;margin:auto}.home-welcome{display:flex;justify-content:space-between;gap:15px;color:#a8afa8;font-size:12px;margin-bottom:18px}.home-welcome span:first-child,.home-section-heading>span{letter-spacing:2px;font-size:11px}.home-create{width:100%;min-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#f0f2ed;border:1px solid #454d44;border-radius:14px;background:radial-gradient(ellipse at 50% 105%,#3743377a,transparent 65%),radial-gradient(#85947f40 1px,transparent 1.5px),linear-gradient(155deg,#1d211e,#252b25);background-size:auto,20px 20px,auto}.home-create:hover{border-color:#c6dfbf;background:radial-gradient(ellipse at 50% 105%,#4a604a8a,transparent 65%),radial-gradient(#85947f40 1px,transparent 1.5px),linear-gradient(155deg,#1d211e,#252b25);background-size:auto,20px 20px,auto}.home-create strong{font-size:20px;font-weight:500}.home-create>span:last-child{font-size:13px;color:#b6c0b2}.home-plus{display:grid;place-items:center;width:73px;height:52px;border-radius:15px;background:linear-gradient(#fafcf6,#d6ddd1);color:#172017;font-size:34px;line-height:1}.home-projects{margin-top:38px;padding-top:25px;border-top:1px solid #343935}.home-section-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;color:#a8afa8}.home-section-heading h1{font-size:17px;font-weight:500;color:#f0f2ed;margin:0}.home-project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}.home-project{min-width:0;border:1px solid #343935;border-radius:10px;overflow:hidden;background:#1d201e}.home-project:hover{border-color:#7f9377}.home-project-open{display:block;text-align:left;width:100%;padding:0;border:0;border-radius:0;background:transparent;color:#f0f2ed}.home-project-open:hover{background:#242b24}.home-cover{position:relative;min-height:145px;padding:14px;display:flex;justify-content:center;align-items:center;overflow:hidden;background:linear-gradient(105deg,#192528 0%,#334542 49%,#9c9374 50%,#2e3630 51%,#101e20 100%)}.home-cover-1{background:repeating-linear-gradient(90deg,transparent 0 37px,#bdc8c312 38px 40px),linear-gradient(170deg,#333b42,#1d2229 70%)}.home-cover-2{background:radial-gradient(ellipse at 50% 10%,#86907455,transparent 75%),linear-gradient(110deg,#1b261e,#424c35 50%,#202b20)}.home-cover:after{content:'';position:absolute;inset:9px;border:1px solid #ffffff13}.home-cover>strong{font-family:'Songti SC',serif;letter-spacing:3px;font-weight:400;font-size:21px;text-align:center;overflow-wrap:anywhere}.home-cover-type{position:absolute;top:14px;left:16px;font-size:10px;letter-spacing:1.5px;color:#edf0e4b3}.home-project-info{display:flex;flex-direction:column;gap:7px;padding:15px}.home-project-info strong{font-size:15px;font-weight:500;overflow-wrap:anywhere}.home-project-info>span{font-size:12px;color:#a8afa8}.home-project-info .home-continue{display:flex;justify-content:space-between;margin-top:8px;color:#cfdfc8}.home-project-actions{padding:0 15px 14px;text-align:right}#app.is-home .home-project-actions button{background:transparent;color:#a8afa8;border-color:#454d44}#app.is-home .empty{color:#a8afa8}.home-footer{margin-top:28px;font-size:12px;color:#a8afa8}#workspace-dialog{width:min(520px,92vw);border:1px solid #c8d0c8;border-radius:14px;padding:25px;background:white}#workspace-dialog::backdrop{background:#0008}#workspace-dialog>p{color:var(--muted);font-size:13px}.workspace-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}.workspace-choices button{text-align:left;min-height:110px;display:flex;flex-direction:column;align-items:start;justify-content:center;gap:8px;padding:16px;background:#f5f8f4;border-color:#d7e1d6}.workspace-choices button:hover{border-color:#608466;background:#e7f0e6}.workspace-choices strong{font-size:16px;font-weight:500}.workspace-choices span{color:#667267;font-size:12px}@media(max-width:680px){#app.is-home .home-header{padding:16px;gap:16px}.home-main{padding:24px 16px}.home-welcome{flex-direction:column;gap:5px}.home-create{min-height:190px}.home-project-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}.workspace-choices{grid-template-columns:1fr}.workspace-choices button{min-height:82px}}
.previs-card{border:1px solid var(--line);box-shadow:none;margin-bottom:24px}.previs-card .lead{margin-bottom:12px}.previs-card h2{margin:0 0 5px}.previs-card textarea{min-height:160px;margin:8px 0}.previs-card .row{gap:8px}
.manual-scene{display:flex;gap:5px;margin-top:9px}.manual-scene input{width:100%;min-width:0;font-size:12px}.manual-scene button{flex-shrink:0}

/* 剧本编辑与场次导航 */
.script-page-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:20px}.script-page-head h1{margin-bottom:4px}.script-upload{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:6px 14px;background:#fff;border:1px solid var(--line);border-radius:8px;cursor:pointer;font-size:13px}.script-upload:hover{background:#f0f5fc}.script-upload:focus-within{outline:2px solid var(--blue);outline-offset:3px}.script-upload input{position:absolute;width:1px;height:1px;opacity:0}.script-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}.script-editor,.script-actions,.script-outline{margin:0}.script-editor{padding:22px;min-width:0}.script-editor-head{display:flex;justify-content:space-between;gap:12px;align-items:start;margin-bottom:14px}.script-editor-head h2{margin:0 0 4px}.script-editor-head p{margin:0}.script-editor textarea[data-script]{display:block;width:100%;min-height:580px;padding:18px;text-align:left;font-family:inherit;font-size:15px;line-height:1.9;white-space:pre-wrap;resize:vertical}.script-editor-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}.script-side{display:grid;gap:16px;min-width:0}.script-actions label{display:block;font-size:13px;color:var(--muted)}.script-actions select{display:block;width:100%;margin-top:8px}.script-actions-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:17px}.script-outline{position:sticky;top:16px}.script-outline h2{margin-bottom:10px}#script-outline-list{max-height:48vh;overflow:auto}.script-outline-item{display:block;width:100%;text-align:left;overflow-wrap:anywhere;border:0;background:transparent;color:#34493b;padding:8px 6px}.script-outline-item:hover{background:#edf3ed}@media(max-width:800px){.script-layout{grid-template-columns:1fr}.script-side{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}.script-outline{position:static}.script-editor textarea[data-script]{min-height:420px}}

/* Calm, warm surfaces for reading scripts and prompts. */
:root{color:#292d29;background:#f2f1eb;--line:#deded4;--blue:#386c5d;--muted:#71776e}
body,#app{background:#f2f1eb}header,aside,.script-panel{background:#fafaf6}.paper{background:#fafaf6;box-shadow:0 1px 4px #263a2810}.paper input,.paper textarea,.paper select,.conversation textarea{background:#fffefa}button{background:#fffefa}.chatmsg{background:#efefe8}.chatmsg.assistant{background:#fffefa}.workspace-nav>button.active{background:#386c5d}.asset-tabs [aria-pressed=true],.production-tabs [aria-pressed=true]{background:#e7efe7;color:#315d4d;border-color:#a7c0ad}
#app.is-home{background:#f2f1eb;color:#292d29}#app.is-home .home-header{background:#fafaf6;border-color:#deded4}#app.is-home .home-brand span,#app.is-home .home-welcome,#app.is-home .home-section-heading,#app.is-home .home-footer{color:#71776e}#app.is-home .home-current{color:#315d4d;border-color:#537e69}#app.is-home .home-header button{background:#fffefa;color:#343b35;border-color:#deded4}#app.is-home .home-header button:hover{background:#e9eee6}.home-create{color:#2c3a30;border-color:#d4ddcf;background:radial-gradient(#a4b5a040 1px,transparent 1.5px),linear-gradient(145deg,#edf2e9,#e3eadd);background-size:20px 20px,auto}.home-create:hover{border-color:#89a48a;background:radial-gradient(#91a48b50 1px,transparent 1.5px),linear-gradient(145deg,#e7eee4,#dce6d8);background-size:20px 20px,auto}.home-create>span:last-child{color:#647568}.home-plus{background:#fafcf8;color:#315d4d}.home-projects{border-color:#deded4}.home-section-heading h1{color:#292d29}.home-project{border-color:#deded4;background:#fafaf6}.home-project-open{color:#292d29}.home-project-open:hover{background:#f1f4ee}.home-project-info>span,#app.is-home .home-project-actions button,#app.is-home .empty{color:#71776e}.home-project-info .home-continue{color:#386c5d}#app.is-home .home-project-actions button{border-color:#deded4}
.member-card label{display:block;font-size:13px}.member-card select{display:block;width:min(100%,420px);margin-top:6px}.member-list{display:flex;gap:12px 20px;flex-wrap:wrap;margin:16px 0}.member-list label{display:flex;align-items:center;gap:5px}.member-list input{margin:0}

.home-cover>strong{color:#f5f5ef}

/* Separate the production navigation from the script reference. */
.production-tabs{padding:12px 24px 14px;border-bottom:1px solid var(--line);background:#f7f7f1}
.shell.with-script{padding-top:14px;column-gap:14px;padding-right:14px}
.shell.with-script .script-panel{margin-left:14px;border:1px solid var(--line);border-radius:12px;background:#fafaf6;top:14px;padding:18px 16px;max-height:calc(100dvh - 155px)}
.script-panel-head{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-bottom:15px;border-bottom:1px solid var(--line)}
.script-panel-kicker{font-size:9px;letter-spacing:.12em;color:#8a968a}.script-panel-head h2{font-size:16px;font-weight:600;margin:2px 0 0}.script-panel-head button{font-size:12px}
.scene-picker{padding:16px 0;border-bottom:1px solid var(--line)}.scene-picker>label{display:flex;justify-content:space-between;gap:6px;font-size:12px;color:#555e56}.scene-picker>label span{font-size:11px;color:var(--muted);white-space:nowrap}.scene-picker select{width:100%;margin-top:8px;background:#fffefa}.scene-switcher{display:flex;gap:6px;margin-top:8px}.scene-switcher button{flex:1;font-size:12px}.manual-scene-details{margin:10px 0 0;font-size:12px}.manual-scene-details summary{color:var(--blue)}.manual-scene-details p{color:var(--muted);margin:8px 0 0;line-height:1.6}
.script-excerpt-head{display:flex;justify-content:space-between;gap:7px;flex-wrap:wrap;margin:16px 0 10px;font-size:11px;color:var(--muted)}.script-excerpt-head span:first-child{font-weight:600;color:#4c5b4f}.script-excerpt{font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif;font-size:14px;line-height:1.95;letter-spacing:.01em;color:#353b35}
@media(max-width:850px){.shell.with-script{column-gap:10px;padding-right:10px}.shell.with-script .script-panel{margin-left:10px;padding:14px 12px}.scene-switcher{flex-wrap:wrap}}
@media(max-width:600px){.shell.with-script{padding:10px}.shell.with-script .script-panel{margin:0 0 12px;max-height:360px}.shell.with-script.script-floating .script-panel{margin:0}.production-tabs{padding:10px 16px 12px}}
.model-state{font-size:12px;line-height:1.5}.model-state.ok,.task-state.done{color:#23734c}.model-state.fail,.task-state.failed,.task-state.interrupted{color:#aa3b32}.model-state.unknown,.task-state.running{color:#71776e}.history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}#history-dialog{width:min(660px,94vw);max-height:80vh;overflow:auto;border:1px solid var(--line);border-radius:14px;padding:24px;background:#fafaf6}#history-dialog::backdrop{background:#0005}
