/* Five-stage director workspace. */
.d-header{margin-top:22px;margin-bottom:24px}.d-header .page-subtitle{max-width:760px}.d-worknav{display:flex;align-items:center;border-bottom:1px solid var(--line);}.d-library-link{color:var(--muted);border:0;background:none;cursor:pointer}.d-project-name{font-weight:650;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.d-stepnav{display:flex;margin-left:auto}.d-stepnav button{border:1px solid transparent;display:flex;align-items:center;gap:8px;background:none;color:var(--muted);cursor:pointer;border-radius:999px;}.d-stepnav small{font-size:11px;font-family:monospace;opacity:.65}.d-stepnav button:hover{background:var(--surface-2);color:var(--text)}.d-stepnav button.active{color:var(--accent);}.d-demo-mark{width:100%;text-align:right;font-size:11px;color:var(--muted);margin-top:-4px;letter-spacing:0}.d-section-top{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:16px}.d-section-top h2,.d-settings h2,.d-reference-column h2,.d-script-tools h2,.d-asset-inspector h2{font-size:17px;font-weight:650;margin:0}.d-section-top h3{font-size:14px;margin:0}.d-section-top .eyebrow{display:block;margin-bottom:7px;font-size:11px;letter-spacing:0}.d-code{font-family:monospace;font-size:12px;color:var(--accent);letter-spacing:0;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));padding:5px 8px;border-radius:5px;background:color-mix(in srgb,var(--accent) 8%,transparent)}
.d-library-toolbar{display:flex;align-items:center;justify-content:space-between;margin:30px 0 20px;color:var(--muted)}.d-library-toolbar .input{width:320px}.d-project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));}.d-project-card{border:1px solid var(--line);border-radius:15px;background:var(--surface);overflow:hidden;transition:border-color .2s,transform .2s}.d-project-card:hover{border-color:color-mix(in srgb,var(--accent) 50%,var(--line));}.d-project-cover{display:block;position:relative;width:100%;padding:0;overflow:hidden;border:0;cursor:pointer;text-align:left}.d-cover-label,.d-cover-corner{position:absolute;bottom:16px;left:16px;padding:5px 9px;border:1px solid #ffffff44;border-radius:5px;font-size:11px}.d-cover-corner{left:auto;right:16px;top:16px;bottom:auto}.d-project-body>small{font-size:11px;letter-spacing:0;color:var(--muted)}.d-project-body h2 button{color:var(--text);padding:0;border:0;background:none;cursor:pointer}.d-project-body p{font-size:13px;color:var(--muted);display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;}.d-project-stats{display:flex;gap:12px;color:var(--muted);font-size:11px;}.d-project-foot{display:flex;gap:12px;justify-content:space-between;border-top:1px solid var(--line);padding-top:16px;font-size:11px;color:var(--muted)}.d-project-foot button{color:var(--accent);border:0;background:none;cursor:pointer}.d-project-foot button:first-of-type{margin-left:auto;color:var(--muted)}.d-project-card[hidden]{display:none}
.d-overview-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:50px}.d-metrics{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:26px 0;margin:22px 0}.d-metrics>div{display:flex;flex-direction:column;gap:10px;border-right:1px solid var(--line);padding:0 20px}.d-metrics>div:first-child{padding-left:0}.d-metrics>div:last-child{border:0}.d-metrics strong{font-size:32px;font-weight:500;font-family:monospace;color:var(--accent)}.d-metrics span{font-size:12px;color:var(--muted)}.d-stage-list>button{display:flex;align-items:center;width:100%;text-align:left;border:0;border-bottom:1px solid var(--line);padding:24px 6px;background:none;cursor:pointer;color:var(--text)}.d-stage-list>button:hover{background:color-mix(in srgb,var(--accent) 4%,transparent)}.d-stage-number{font-size:23px;color:var(--muted);font-family:monospace;width:55px;opacity:.6}.d-stage-list strong{display:block;font-size:16px;margin-bottom:7px}.d-stage-list small{color:var(--muted);font-size:12px}.d-stage-status{margin-left:auto;color:var(--accent);font-size:12px}.d-overview-hero{height:260px;position:relative;overflow:hidden;border-radius:14px;border:1px solid var(--line)}.d-hero-caption{position:absolute;bottom:22px;left:25px;display:flex;flex-direction:column;color:#f5f5f7;gap:8px;text-shadow:0 2px 12px #000}.d-hero-caption>span{font-size:11px;letter-spacing:0;color:#eee}.d-hero-caption strong{font-size:24px}.d-hero-caption small{font-size:11px;opacity:.65}.d-settings{padding:24px 0;display:grid;gap:15px}.d-settings h2{margin-bottom:4px}.d-select-field{display:flex;align-items:center;gap:16px;justify-content:space-between}.d-select-field>span{font-size:12px;color:var(--muted);white-space:nowrap}.d-select-field .select{max-width:230px;width:65%}
.d-script-layout{display:grid;grid-template-columns:200px minmax(0,1fr) 255px;gap:24px}.d-episode-list{padding-right:20px;border-right:1px solid var(--line)}.d-episode-list .d-section-top{margin:0 0 20px}.d-episode{display:flex;flex-direction:column;gap:9px;background:none;border:1px solid transparent;border-radius:10px;text-align:left;cursor:pointer;color:var(--text);width:100%;padding:16px 12px;margin-bottom:8px}.d-episode.active{background:color-mix(in srgb,var(--accent) 6%,var(--surface));border-color:color-mix(in srgb,var(--accent) 32%,var(--line))}.d-episode small{font-family:monospace;font-size:11px;letter-spacing:0;color:var(--accent)}.d-episode strong{font-size:13px;line-height:1.6}.d-episode>span{font-size:11px;color:var(--muted)}.d-episode-note{font-size:11px;color:var(--muted);line-height:2;padding:25px 12px;border-top:1px solid var(--line);margin-top:26px}.d-script-paper{min-width:0}.d-script-paper>.d-section-top{padding:0 0 18px;border-bottom:1px solid var(--line);flex-wrap:wrap}.d-script-paper .d-section-top .select{max-width:160px}.d-script-editor{box-sizing:border-box;background:transparent;color:var(--text);resize:vertical;border:0;width:100%;min-height:530px;outline:none;font-family:inherit}.d-script-footer{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);padding:16px 0;border-top:1px solid var(--line)}.d-script-tools{display:flex;flex-direction:column;gap:12px;border-left:1px solid var(--line);padding-left:24px}.d-script-tools>p{font-size:13px;color:var(--muted);line-height:1.8;margin-top:0}.d-source-note{padding:20px 0;margin-top:16px;border-top:1px solid var(--line)}.d-source-note small,.d-source-note strong{display:block;margin-bottom:10px}.d-source-note small{color:var(--muted);font-size:11px}.d-source-note strong{font-size:13px;color:var(--accent)}.d-source-note p{font-size:12px;color:var(--muted);line-height:1.8}.d-script-tools .field{font-size:12px}.d-script-tools .textarea{width:100%}
.d-asset-toolbar,.d-shots-toolbar{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:25px 0;color:var(--muted);font-size:12px;flex-wrap:wrap}.d-assets-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:32px}.d-asset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start}.d-asset-card{padding:0;text-align:left;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface);color:var(--text);cursor:pointer}.d-asset-card.active{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 25%,transparent)}.d-asset-image{position:relative;overflow:hidden}.d-asset-image>span{position:absolute;bottom:8px;left:10px;font-size:11px;background:#171719b8;padding:3px 5px;color:#f5f5f7}.d-asset-card>div:last-child{padding:16px}.d-asset-card small{display:block;font-size:11px;margin-bottom:7px}.d-asset-card strong{font-size:15px}.d-asset-card p{font-size:11px;color:var(--muted);margin-bottom:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:40px}.d-asset-inspector{border-left:1px solid var(--line);display:flex;flex-direction:column;}.d-asset-inspector p{font-size:12px;line-height:1.8}.d-asset-inspector .field{font-size:12px}.d-asset-inspector .input,.d-asset-inspector .textarea{width:100%}.d-shot-group{margin:24px 0 35px;border-top:1px solid var(--line)}.d-shot-group-head{display:flex;align-items:center;gap:15px;padding:22px 0}.d-shot-group-head h2{font-size:16px;margin:0 0 6px}.d-shot-group-head small{font-size:11px;color:var(--muted)}.d-shot-group-head .toolbar{margin-left:auto}.d-shot-group-head .button{font-size:11px}.d-shot-table{overflow:auto}.d-shot-table table{width:100%;border-collapse:collapse;text-align:left;font-size:12px;table-layout:fixed;min-width:780px}.d-shot-table th{color:var(--muted);font-weight:500;letter-spacing:0;border-bottom:1px solid var(--line)}.d-shot-table td{border-bottom:1px solid var(--line);vertical-align:top}.d-shot-table th:nth-child(1){width:125px}.d-shot-table th:nth-child(2){width:140px}.d-shot-table th:nth-child(4){width:160px}.d-shot-table th:nth-child(5){width:74px}.d-shot-table th:last-child{width:56px}.d-shot-table td:first-child strong{display:block;color:var(--accent);font-family:monospace;font-size:11px;margin-bottom:7px}.d-shot-table td:first-child>span{font-size:12px;line-height:1.7}.d-shot-table .textarea{width:100%;min-height:90px;padding:8px;resize:vertical}.d-shot-table .button{font-size:11px;padding:5px 8px;min-height:28px}.d-duration-input{display:flex;align-items:center;gap:5px}.d-duration-input input{width:56px;text-align:center;padding:8px 4px}.d-move-buttons{display:flex;gap:4px;margin-top:12px}
.d-board{display:grid;grid-template-columns:minmax(255px,1.05fr) minmax(340px,1.25fr) minmax(225px,.75fr);gap:25px;align-items:start}.d-preview-column,.d-prompt-column,.d-reference-column{min-width:0}.d-preview-head{display:flex;align-items:center;gap:9px;margin-bottom:14px}.d-preview-head strong{font-size:13px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.d-preview-head>.d-status{margin-left:auto}.d-status{white-space:nowrap;font-size:11px;border-radius:4px;background:var(--surface-2);color:var(--muted)}.d-status-done{color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,var(--surface))}.d-status-failed{color:#ed9a9a;background:color-mix(in srgb,#ad5757 15%,var(--surface))}.d-status-running,.d-status-queued{color:var(--accent-2);background:color-mix(in srgb,var(--accent-2) 12%,var(--surface))}.d-preview-screen{position:relative;aspect-ratio:var(--d-preview-ratio,16/10);max-height:400px;overflow:hidden;box-shadow:0 14px 40px #0003;border:1px solid color-mix(in srgb,var(--accent) 25%,var(--line));border-radius:12px;background:#000}.d-safe-frame{position:absolute;inset:7%;border:1px solid #ffffff17;pointer-events:none}.d-safe-frame:before,.d-safe-frame:after{content:'';position:absolute;background:#ffffff33;width:7px;height:1px;left:-4px;top:50%}.d-safe-frame:after{left:auto;right:-4px}.d-preview-overlay{position:absolute;left:14px;top:12px;}.d-preview-slate{position:absolute;bottom:15px;left:15px;right:15px;display:flex;justify-content:space-between;font-family:monospace;font-size:11px}.d-preview-slate b{font-weight:400}.d-preview-controls{display:flex;align-items:center;margin-top:15px}.d-preview-controls .button{font-size:11px;}.d-preview-caption{font-size:12px;color:var(--muted);line-height:1.8;padding:0 0 18px;border-bottom:1px solid var(--line)}.d-shot-duration-list{margin-top:22px}.d-shot-duration-list .d-section-top>span{font-size:11px;color:var(--muted)}.d-shot-duration-list>label{display:flex;align-items:center;gap:7px;padding:12px 0;border-bottom:1px solid var(--line);font-size:12px}.d-shot-duration-list>label>span{flex:1;line-height:1.6}.d-shot-duration-list>label>span small{font-size:11px;display:block;font-family:monospace;color:var(--accent);margin-bottom:5px}.d-shot-duration-list input{width:56px;text-align:center;font-size:12px;padding:7px 3px}.d-shot-duration-list>label>small{color:var(--muted);font-size:11px}.d-preview-state{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:22px;text-align:center;}.d-state-orbit{width:52px;height:52px;display:grid;place-items:center;border:1px solid #ffffff5c;border-radius:50%;font-size:30px;}.d-running .d-state-orbit,.d-queued .d-state-orbit{animation:d-spin 3s linear infinite}.d-preview-state>small{font-size:11px;line-height:1.8;max-width:230px}.d-preview-state .button{font-size:11px}
.d-prompt-column{padding:0 5px}.d-prompt-column .d-section-top .button{font-size:11px;min-height:30px;padding:6px 10px}.d-prompt-label{display:block;margin-top:20px}.d-prompt-label>span{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:13px;font-weight:650}.d-prompt-label small{font-size:11px;color:var(--muted);font-weight:400}.d-prompt-editor{width:100%;padding:15px 17px;background:color-mix(in srgb,var(--surface) 85%,transparent);color:var(--text);border:1px solid var(--line);border-radius:10px;font-family:inherit;font-size:13px;line-height:1.9;resize:vertical;box-sizing:border-box;outline:none}.d-prompt-editor:focus{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 8%,transparent)}.d-image-prompt{height:152px}.d-video-prompt{height:220px}.d-prompt-actions{display:flex;align-items:center;gap:12px;padding:13px 0;flex-wrap:wrap}.d-prompt-actions .button{font-size:11px;min-height:29px;padding:4px 8px}.d-prompt-actions>label{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted)}.d-prompt-actions>span{font-size:11px;color:var(--muted);margin-left:auto}.d-generation-console{margin-top:12px;padding-top:22px;border-top:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));position:relative}.d-generation-console:before{position:absolute;top:-1px;width:55%;height:1px;background:linear-gradient(90deg,transparent,var(--accent),transparent);box-shadow:0 0 8px color-mix(in srgb,var(--accent) 35%,transparent)}.d-console-options{display:grid;gap:16px}.d-console-options .d-select-field{display:flex;flex-direction:column;align-items:stretch;gap:8px}.d-console-options .d-select-field .select{width:100%;max-width:none;font-size:11px;min-height:34px;padding:6px 9px}.d-console-options .d-select-field>span,.d-group-duration>span{font-size:11px;color:var(--muted)}.d-group-duration{display:flex;flex-direction:column;gap:8px}.d-group-duration strong{font-size:22px;color:var(--accent);font-family:monospace;font-weight:500;padding:3px 0}.d-group-duration small{font-size:11px;font-family:inherit;color:var(--muted);margin-left:7px}.d-generate-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:24px}.d-generate-row>span{font-size:11px;color:var(--muted);max-width:170px;line-height:1.7}.d-generate-row>.button{font-size:12px;white-space:nowrap;box-shadow:0 0 22px color-mix(in srgb,var(--accent) 12%,transparent)}.d-reference-column{border-left:1px solid var(--line);padding-left:22px}.d-reference-column>.d-section-top{align-items:end;margin-bottom:12px}.d-reference-column .badge{font-size:11px;white-space:nowrap}.d-reference-column>p{font-size:11px;color:var(--muted);line-height:1.7;margin:12px 0 20px}.d-ref-section{margin-bottom:22px}.d-ref-section h3{font-weight:500;color:var(--muted);display:flex;justify-content:space-between;margin-bottom:12px}.d-ref-section h3 small{font-family:monospace;font-size:11px}.d-reference{display:flex;align-items:center;gap:10px;width:100%;margin-bottom:8px;border:1px solid transparent;border-radius:8px;background:var(--surface);padding:7px;text-align:left;cursor:pointer;color:var(--text)}.d-reference.selected{border-color:color-mix(in srgb,var(--accent) 45%,var(--line));background:color-mix(in srgb,var(--accent) 4%,var(--surface))}.d-reference>div{height:48px;width:53px;border-radius:5px;position:relative;flex:0 0 auto;overflow:hidden}.d-reference>span{display:block;min-width:0;flex:1}.d-reference strong{font-size:11px;display:block;margin-bottom:5px;font-weight:500}.d-reference small{display:block;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:125px}.d-reference>i{font-style:normal;color:var(--muted);font-size:13px}.d-reference.selected>i{color:var(--accent)}.d-ref-note{font-size:11px;margin-top:22px;padding-top:18px;border-top:1px solid var(--line);color:var(--muted)}.d-ref-note .textarea{width:100%;font-size:11px;margin-top:10px}
.d-timeline{margin-top:30px;padding:24px 0 12px;border-top:1px solid var(--line)}.d-timeline-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.d-timeline-heading>div>small{display:block;font-size:11px;letter-spacing:0;margin-bottom:8px}.d-timeline-heading strong{font-size:13px;font-weight:500}.d-timeline-heading strong>span{color:var(--accent);margin-left:15px;font-family:monospace}.d-transport{display:flex;gap:12px;align-items:center}.d-transport .button{min-height:28px;padding:5px 9px;font-size:11px}.d-transport>span{font-size:11px;font-family:monospace}.d-group-strip{display:flex;gap:12px;overflow-x:auto;padding:0 0 16px;align-items:start;scrollbar-width:thin}.d-group-strip>.button{white-space:nowrap;align-self:center;font-size:11px}.d-group-thumb{background:none;padding:0;text-align:left;border:0;color:var(--text);cursor:pointer;min-width:130px;width:130px;flex:0 0 auto}.d-group-thumb>div{height:68px;position:relative;overflow:hidden;margin-bottom:10px}.d-group-thumb.active>div{border-color:var(--accent);}.d-group-thumb .d-status{position:absolute;bottom:5px;right:5px;font-size:11px;}.d-group-thumb strong{display:flex;align-items:center;justify-content:space-between;font-family:monospace;font-size:11px;color:var(--muted);font-weight:500}.d-group-thumb.active strong{color:var(--accent)}.d-group-thumb>small{display:block;font-size:11px;margin-top:6px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.d-time-ruler{position:relative;height:25px;margin:10px 0 0;background:repeating-linear-gradient(90deg,var(--line) 0 1px,transparent 1px 2%);background-size:100% 5px;background-repeat:no-repeat;background-position:bottom}.d-time-ruler>span{position:absolute;font-size:11px;color:var(--muted);font-family:monospace;transform:translateX(-50%)}.d-time-ruler>span:first-child{transform:none}.d-time-ruler>span:last-child{transform:translateX(-100%)}.d-time-track{display:flex;height:58px;position:relative;cursor:ew-resize;touch-action:none;outline:none;background:var(--surface-2);border-bottom:1px solid var(--line)}.d-time-track:focus-visible{box-shadow:0 0 0 2px var(--accent)}.d-time-block{min-width:0;box-sizing:border-box;border:1px solid var(--line);border-right-color:var(--bg);border-left:0;display:flex;flex-direction:column;gap:6px;justify-content:center;padding:8px 12px;color:var(--text);overflow:hidden;pointer-events:none}.d-time-block.active{border-top-color:var(--d-hue);box-shadow:inset 0 2px 0 var(--d-hue)}.d-time-block strong{font-size:11px;font-weight:500;font-family:monospace}.d-time-block>span{font-size:11px;color:var(--muted);white-space:nowrap}.d-playhead{position:absolute;top:-10px;bottom:-6px;width:1px;background:var(--accent);pointer-events:none;z-index:3;max-width:100%}.d-playhead>span{display:block;position:absolute;top:-1px;left:-4px;width:9px;height:9px;background:var(--accent);clip-path:polygon(0 0,100% 0,100% 60%,50% 100%,0 60%)}.d-timeline-note{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin:15px 0 4px}.d-board-bottom{display:flex;gap:20px;align-items:center;justify-content:space-between;margin-top:8px;color:var(--muted);font-size:11px}.d-board-bottom .button{font-size:11px;min-height:31px;padding:6px 10px}
.d-export-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:35px}.d-final-screen{border:1px solid var(--line);border-radius:14px;position:relative;overflow:hidden}.d-final-caption{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:end;padding:35px;color:#f5f5f7;}.d-final-caption>small{font-size:11px;letter-spacing:0;color:#eee}.d-final-caption h2{margin:10px 0 18px;letter-spacing:0}.d-final-caption>span{font-size:11px;color:#eee;margin-bottom:8px}.d-export-console{border-left:1px solid var(--line);padding-left:28px}.d-export-console>h2{font-size:23px;margin:12px 0 22px}.d-export-facts>div{display:flex;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line);font-size:12px}.d-export-facts span{color:var(--muted)}.d-export-facts strong{font-weight:500}.d-warning{font-size:11px;line-height:1.8;color:var(--accent-2);padding:12px 0}.d-export-progress{margin:25px 0}.d-export-progress>div{display:flex;gap:10px;align-items:center;padding:9px 0;color:var(--muted);font-size:11px}.d-export-progress i{font-style:normal;font-size:11px;border:1px solid var(--line);border-radius:50%;width:20px;height:20px;display:grid;place-items:center}.d-export-progress .done{color:var(--accent)}.d-export-progress .done i{border-color:color-mix(in srgb,var(--accent) 45%,var(--line))}.d-export-progress .current{color:var(--accent-2)}.d-export-console .button{font-size:12px}.d-export-console>.muted{font-size:11px;line-height:1.9;margin-top:22px}.d-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:370px;color:var(--muted);gap:15px;grid-column:1/-1}.d-empty h2{font-size:20px;color:var(--text);margin:0}.d-empty p{font-size:13px;max-width:470px;line-height:1.8;text-align:center}.d-empty-orbit{border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;color:var(--accent);}.d-ninegrid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.d-ninegrid>div{height:100px;position:relative;overflow:hidden;border-radius:6px}.d-ninegrid>div>span{position:absolute;left:8px;bottom:8px;font-size:11px;color:#f5f5f7}.d-history-list{display:grid;gap:15px}.d-history-list>label{display:grid;grid-template-columns:20px 1fr;gap:8px;border:1px solid var(--line);}.d-history-list small{grid-column:2;font-size:11px;color:var(--muted);line-height:1.8}
/* Cinematic CSS study: warm repair-shop window, rain glass, street silhouettes, macro camera. */
@keyframes d-spin{to{transform:rotate(360deg)}}
@media(max-width:1180px){.d-demo-mark{display:none}.d-stepnav{width:100%;margin-left:0;justify-content:space-between}.d-script-layout{grid-template-columns:170px minmax(0,1fr)}.d-script-tools{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);padding:20px 0;display:grid;grid-template-columns:repeat(3,1fr)}.d-script-tools h2,.d-script-tools>p,.d-source-note{grid-column:1/-1}.d-board{grid-template-columns:minmax(250px,1fr) minmax(340px,1.2fr);gap:25px}.d-reference-column{grid-column:1/-1;border-left:0;padding-left:0;border-top:1px solid var(--line);padding-top:24px;display:grid;gap:15px}.d-reference-column>.d-section-top,.d-reference-column>p{grid-column:1/-1;margin:0}.d-reference-column>.button{align-self:start}.d-ref-note{margin-top:0}.d-asset-grid{grid-template-columns:repeat(2,1fr)}.d-project-grid{grid-template-columns:repeat(2,1fr)}.d-export-layout{grid-template-columns:minmax(0,1fr) 265px}.d-overview-layout{gap:30px}.d-metrics>div{padding:0 12px}.d-metrics strong{font-size:27px}}
@media(max-width:760px){.d-stepnav{overflow:auto;}.d-stepnav button{white-space:nowrap;border-radius:999px;}.d-worknav{gap:12px}.d-header{margin-top:20px}.d-project-grid,.d-overview-layout,.d-assets-layout,.d-export-layout{grid-template-columns:1fr}.d-library-toolbar{gap:15px;align-items:start;flex-direction:column}.d-library-toolbar .input{width:100%}.d-script-layout{grid-template-columns:1fr}.d-episode-list{border:0;padding:0;display:flex;overflow:auto;gap:8px}.d-episode-list>.d-section-top{min-width:80px;flex-direction:column;justify-content:start}.d-episode{min-width:160px;max-width:200px}.d-episode-note{display:none}.d-script-tools{grid-template-columns:1fr}.d-script-tools>*{grid-column:1!important}.d-script-editor{min-height:420px}.d-board{grid-template-columns:1fr}.d-preview-screen{max-height:330px;aspect-ratio:16/10}.d-ref-section{margin-bottom:10px}.d-reference>div{height:54px;width:65px}.d-reference-column .d-ref-section{display:grid;gap:8px}.d-ref-section h3{grid-column:1/-1;margin-bottom:0}.d-reference{gap:7px}.d-timeline-heading{align-items:start;flex-direction:column;}.d-board-bottom{align-items:start;flex-direction:column}.d-timeline-note{flex-direction:column;gap:6px}.d-asset-inspector{border-left:0;padding:20px 0;border-top:1px solid var(--line)}.d-shot-group-head .toolbar{width:100%}.d-metrics strong{font-size:26px}.d-stage-status{font-size:11px}.d-export-console{border:0;padding:20px 0}.d-final-screen{height:300px}.d-reference-column>.d-section-top{grid-column:1/-1}.d-generation-console{padding-bottom:12px}.d-console-options{gap:12px}.d-generate-row{gap:8px}.d-generate-row>span{max-width:130px}.d-ninegrid>div{height:75px}}
@media(prefers-reduced-motion:reduce){.d-scene,.d-project-card{transition:none}.d-running .d-state-orbit,.d-queued .d-state-orbit{animation:none}}
/* Keep editor controls within their available columns. */
.d-board>*,.d-reference-column>*,.d-ref-section,.d-reference,.d-reference>span,.d-generation-console,.d-console-options>*,.d-ref-note{min-width:0}.d-ref-note .textarea{box-sizing:border-box;max-width:100%}.d-console-options{grid-template-columns:repeat(2,minmax(0,1fr))}.d-prompt-label>span{gap:8px;flex-wrap:wrap}.d-preview-head{flex-wrap:wrap}.d-board-bottom .toolbar{flex-wrap:wrap}
@media(max-width:1180px){.d-reference-column{grid-template-columns:repeat(3,minmax(0,1fr))}.d-reference strong{overflow-wrap:anywhere}.d-reference small{max-width:100%}}
@media(max-width:1000px){.d-board{grid-template-columns:minmax(0,1fr)}.d-preview-column{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.6fr);gap:0 24px}.d-preview-head{grid-column:1/-1}.d-preview-screen{grid-column:1;grid-row:2}.d-shot-duration-list{grid-column:2;grid-row:2/5;margin-top:0}.d-preview-controls,.d-preview-caption{grid-column:1}.d-reference-column{grid-template-columns:repeat(2,minmax(0,1fr))}.d-reference-column>.d-section-top,.d-reference-column>p{grid-column:1/-1}.d-prompt-column{padding:0}.d-generation-console .d-console-options{grid-template-columns:repeat(3,minmax(0,1fr))}.d-generation-console .select{max-width:100%}.d-prompt-column .d-section-top{flex-wrap:wrap}}
@media(max-width:760px){.d-preview-column{display:block}.d-shot-duration-list{margin-top:22px}.d-reference-column{grid-template-columns:minmax(0,1fr)}.d-reference-column>*{grid-column:1}.d-reference-column .d-ref-section{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}.d-reference-column .d-reference{min-width:0;padding:6px;gap:6px}.d-reference-column .d-reference>div{width:42px;height:49px}.d-reference-column .d-reference>span{min-width:0}.d-reference strong{font-size:11px}.d-reference small{max-width:100%;font-size:11px}.d-generation-console .d-console-options{grid-template-columns:repeat(2,minmax(0,1fr))}.d-generate-row{flex-wrap:wrap}.d-board .d-section-top{min-width:0}.d-reference-column>.d-section-top{gap:10px;flex-wrap:wrap}.d-reference-column .d-ref-section h3{grid-column:1/-1}}
/* The thumbnail cells and the video track share one scale and one scroller.
   Decorative spacing lives inside each cell, never between timed segments. */
.d-sequence-scroll{width:100%;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.d-sequence-scale{width:max(100%,var(--d-min-track));min-width:100%;padding:0;box-sizing:border-box}
.d-sequence-scale .d-group-strip{width:100%;gap:0;padding-left:0;padding-right:0;overflow:visible;box-sizing:border-box;align-items:start}
.d-sequence-scale .d-group-thumb{width:var(--d-group-width);min-width:0;max-width:none;flex:0 0 var(--d-group-width);padding:0 4px;box-sizing:border-box;border-left:1px solid var(--line)}
.d-sequence-scale .d-group-thumb:first-child{border-left:0}
.d-sequence-scale .d-group-thumb>div{width:100%;box-sizing:border-box}
.d-sequence-scale .d-group-thumb strong{font-size:14px;line-height:18px;overflow:hidden;white-space:nowrap}
.d-sequence-scale .d-group-thumb>small{font-size:12px;line-height:15px;overflow:hidden}
.d-sequence-scale .d-time-ruler,.d-sequence-scale .d-time-track{width:100%;margin-left:0;margin-right:0;box-sizing:border-box}
.d-sequence-scale .d-time-block{flex:0 0 auto}
.d-time-ruler>.d-boundary{background:var(--bg);padding:0 4px;line-height:17px;z-index:1}
.d-time-ruler>.d-boundary:after{content:'';position:absolute;left:50%;bottom:-7px;height:7px;width:1px;background:var(--accent)}
.d-time-ruler>.d-boundary-first{padding-left:0;transform:none}
.d-time-ruler>.d-boundary-first:after{left:0}
.d-time-ruler>.d-boundary-last{padding-right:0;transform:translateX(-100%)}
.d-time-ruler>.d-boundary-last:after{left:auto;right:0}
.d-prompt-label>span>.button{min-height:24px;font-size:11px;padding:3px 8px;line-height:16px;white-space:nowrap}
/* Episode context is a narrow in-product rail, independent of the site sidebar. */
.d-episode-workspace{display:grid;grid-template-columns:118px minmax(0,1fr);gap:20px;min-width:0}.d-stage-content{min-width:0}.d-episode-rail{min-width:0;border-right:1px solid var(--line);padding-right:12px;display:flex;flex-direction:column;align-self:stretch}.d-rail-head{display:flex;justify-content:space-between;align-items:center;}.d-rail-items{display:flex;flex-direction:column;overflow-y:auto;min-height:0;scrollbar-width:thin}.d-rail-episode{text-align:left;color:var(--muted);background:transparent;cursor:pointer;min-width:0}.d-rail-episode.active{color:var(--accent);}.d-rail-episode strong{display:block;font-weight:500}.d-rail-episode>span{display:block;font-size:11px;line-height:1.65;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.d-rail-episode small{color:var(--muted)}.d-rail-note{font-size:11px;line-height:1.9;color:var(--muted);padding:20px 6px;margin-top:auto}.d-current-label{font-size:16px;color:var(--muted);margin:26px 0 10px}.d-script-layout.d-script-scoped{grid-template-columns:minmax(0,1fr) 250px}
.d-asset-tile{position:relative;min-width:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}.d-asset-tile.active{border-color:var(--accent)}.d-asset-tile .d-asset-card{display:block;border:0;width:100%;border-radius:0}.d-asset-check{position:absolute;top:8px;left:8px;z-index:12;display:flex;align-items:center;gap:5px;border-radius:4px;background:color-mix(in srgb,var(--surface) 90%,transparent);font-size:11px;color:var(--text);cursor:pointer}.d-asset-check input,.d-group-check input{accent-color:var(--accent);width:16px;height:16px;margin:0;cursor:pointer}.d-asset-image .d-status{font-size:11px}.d-group-cell{position:relative;min-width:0;flex:0 0 var(--d-group-width);box-sizing:border-box}.d-group-check{position:absolute;top:4px;left:8px;z-index:12;background:var(--surface);border:1px solid var(--line);border-radius:4px;display:grid;place-items:center;padding:3px;cursor:pointer}.d-group-cell:has(input:checked) .d-group-thumb>div{box-shadow:inset 0 0 0 1px var(--accent-2);border-color:var(--accent-2)}.d-sequence-scale .d-group-cell>.d-group-thumb{box-sizing:border-box}
.d-prompt-title{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:36px}.d-prompt-tabs{display:flex;gap:4px}.d-prompt-tabs .button{font-size:12px;padding:5px 9px;min-height:30px;background:transparent;border-color:transparent}.d-prompt-tabs [aria-pressed=true]{border-color:color-mix(in srgb,var(--accent) 40%,var(--line));color:var(--accent);background:var(--soft)}.d-prompt-title>.toolbar{gap:6px}.d-prompt-title>.toolbar .button{font-size:11px;padding:5px 8px;min-height:28px}.d-full-prompt{min-height:320px;font-size:14px;line-height:1.85}.d-reference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.d-reference-tile{background:transparent;border:0;padding:0;min-width:0;color:var(--text);text-align:left;cursor:pointer}.d-reference-tile>div{position:relative;width:100%;overflow:hidden;border:1px solid var(--line);}.d-reference-tile i{position:absolute;right:6px;top:6px;font-size:12px;font-style:normal;color:var(--text);display:grid;place-items:center;background:var(--surface);border:1px solid var(--line)}.d-reference-tile strong{display:block;margin-top:7px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.d-detail-shots{display:grid;gap:24px}.d-detail-shots>section{border-top:1px solid var(--line);padding-top:20px}.d-detail-shots .textarea,.d-detail-shots .input{width:100%}.d-detail-fields{display:grid;grid-template-columns:minmax(0,1fr) 100px;gap:15px;margin-bottom:16px}.d-detail-fields>label{display:flex;flex-direction:column;gap:7px;font-size:12px}.d-task-list{display:grid;gap:13px}.d-task-list>div{display:flex;justify-content:space-between;align-items:center;font-size:13px;border-bottom:1px solid var(--line);padding-bottom:10px}.d-ref-note{display:block}
@media(max-width:1000px){.d-episode-workspace{grid-template-columns:100px minmax(0,1fr);gap:16px}.d-script-layout.d-script-scoped{grid-template-columns:minmax(0,1fr)}.d-stage-content .d-preview-column{display:block}.d-prompt-column .d-generation-console .d-console-options{grid-template-columns:repeat(2,minmax(0,1fr))}.d-prompt-title{flex-wrap:wrap;margin-bottom:12px}.d-reference-column .d-ref-section{display:block;grid-column:auto}.d-reference-column .d-reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.d-full-prompt{height:350px}.d-stage-content .d-board-bottom{align-items:flex-start;flex-wrap:wrap}.d-asset-toolbar .toolbar{gap:10px}}
@media(max-width:650px){.d-episode-workspace{grid-template-columns:minmax(0,1fr);gap:16px}.d-episode-rail{display:block;border-right:0;border-bottom:1px solid var(--line);padding:0 0 12px;overflow:hidden}.d-rail-head{margin-bottom:9px}.d-rail-items{flex-direction:row;overflow-x:auto;overflow-y:hidden;padding-bottom:4px}.d-rail-episode{flex:0 0 105px;}.d-rail-episode strong{font-size:13px}.d-rail-episode>span{font-size:11px;margin:5px 0}.d-rail-note{display:none}.d-stage-content .d-assets-layout{grid-template-columns:minmax(0,1fr)}.d-stage-content .d-asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.d-stage-content .d-asset-card>div:last-child{padding:13px}.d-prompt-title .toolbar{gap:4px}.d-prompt-title .button{font-size:11px}.d-generation-console .d-generate-row{align-items:flex-start}.d-generate-row>.toolbar{flex-wrap:wrap}.d-reference-column .d-ref-section{grid-column:1}.d-stage-content .d-worknav{gap:10px}.d-group-check{left:6px;padding:2px}}
/* Checkbox sits outside the navigation button, preserving exact timed cells. */
.d-sequence-scale .d-group-cell>.d-group-thumb{width:100%;min-width:0;max-width:none;flex:none}
/* Upload is the empty script's main action; the filled script keeps one editor. */
.d-script-upload-workspace{max-width:1100px;margin:0 auto;min-width:0}
.d-upload-intro{text-align:center;margin:36px 0 25px}
.d-upload-intro .eyebrow{color:var(--accent);font-size:11px;letter-spacing:0}
.d-upload-intro h2{font-weight:550;letter-spacing:0;margin:12px 0}
.d-upload-intro p{color:var(--muted);font-size:14px;line-height:1.8;margin:0}
.d-upload-zone{position:relative;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;width:100%;min-height:330px;padding:36px 24px;cursor:pointer;text-align:center;border:1px dashed color-mix(in srgb,var(--accent) 45%,var(--line));border-radius:20px;background:radial-gradient(ellipse at 50% 0,color-mix(in srgb,var(--accent) 8%,transparent),transparent 65%),var(--surface);color:var(--text);transition:border-color .18s,background .18s,box-shadow .18s}
.d-upload-zone:hover,.d-upload-zone:focus-visible,.d-upload-zone.d-upload-drag{outline:0;border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--surface));box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 8%,transparent)}
.d-upload-plus{display:grid;place-items:center;width:76px;height:76px;border-radius:22px;background:color-mix(in srgb,var(--accent) 9%,var(--surface));border:1px solid color-mix(in srgb,var(--accent) 25%,var(--line));color:var(--accent);font-size:47px;font-weight:250;line-height:1;box-shadow:0 12px 34px color-mix(in srgb,var(--accent) 8%,transparent);margin-bottom:5px}
.d-upload-zone>strong{font-size:19px;font-weight:550;line-height:1.5;max-width:100%;overflow-wrap:anywhere}
.d-upload-hint{line-height:1.7;color:var(--muted)}
.d-upload-zone>small{line-height:1.8;max-width:100%;overflow-wrap:anywhere}
.d-upload-zone.d-upload-ready{border-style:solid;border-color:color-mix(in srgb,var(--accent) 50%,var(--line))}
.d-upload-zone.d-upload-ready>small{color:var(--accent)}
.d-upload-zone[aria-busy=true]{cursor:progress}
.d-upload-footnote{font-size:12px;color:var(--muted);line-height:1.8;text-align:center;margin:18px 0 26px}
.d-project-notes{border-top:1px solid var(--line);margin-top:30px;padding:17px 0;font-size:13px;color:var(--muted)}
.d-project-notes>summary,.d-more-actions>summary{cursor:pointer;line-height:1.8;color:var(--muted);font-size:12px}
.d-project-notes .d-source-note{border:0;margin:0;padding:20px 0 5px}
.d-project-notes .textarea{width:100%;box-sizing:border-box;margin-top:8px}
.d-more-actions{padding:6px 0}
.d-more-actions[open]>summary{margin-bottom:12px;color:var(--accent)}
.dialog-body:has([data-d-new-script-file]){gap:22px}
.dialog-body .d-upload-zone{min-height:250px;padding:26px 20px;border-radius:15px;gap:10px}
.dialog-body .d-upload-plus{width:64px;height:64px;font-size:40px;border-radius:18px}
.dialog-body .d-upload-zone>strong{font-size:17px}
.dialog-body .d-upload-footnote{margin:-8px 0 0}
@media(max-width:650px){.d-upload-intro{margin:22px 0}.d-upload-intro h2{font-size:23px}.d-upload-zone{min-height:280px;padding:28px 18px;border-radius:16px}.d-upload-plus{width:66px;height:66px}.d-upload-hint{font-size:13px}.d-upload-zone>small{font-size:11px}.d-script-upload-workspace .d-section-top>.toolbar{gap:8px;flex-wrap:wrap}.d-script-upload-workspace .d-section-top .button{font-size:12px;padding:6px 10px}.d-project-notes{margin-top:20px}}
@media(prefers-reduced-motion:reduce){.d-upload-zone{transition:none}}
/* Real media uses the full preview area without cropping reference images. */
.d-real-image,.d-preview-screen>video,.d-final-screen>video{display:block;width:100%;height:100%;object-fit:contain;background:var(--surface-2)}
.d-media-empty{width:100%;height:100%;min-height:60px;display:flex;align-items:center;justify-content:center;color:var(--muted);background:var(--surface-2)}
.d-preview-screen>video,.d-final-screen>video{position:absolute;inset:0}
.d-preview-screen>.d-real-image{position:absolute;inset:0}
.d-final-screen{aspect-ratio:16/9;height:auto;min-height:220px}
.d-sync-status{color:var(--muted);white-space:nowrap}
.d-candidate-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:8px 0;font-size:12px;min-width:0}
.d-candidate-bar>.toolbar{margin-left:auto}.d-candidate-bar>.error{width:100%;margin:0;overflow-wrap:anywhere}
.d-candidate-output{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.7;max-height:55vh;overflow:auto;margin:0}
.d-split-mode{display:flex;align-items:center;gap:6px;flex-shrink:0;border:0;border-radius:0;overflow:visible}
.d-split-mode .button{border:0;border-radius:999px;min-height:30px;padding:5px 10px;font-size:12px;background:transparent}
.d-split-mode .button[aria-pressed=true]{color:var(--accent);background:var(--soft)}
.d-job-status{font-size:11px;color:var(--muted);overflow-wrap:anywhere}.d-preview-head .d-job-status{margin-left:auto}
.d-preview-head>.error{position:absolute;top:35px;left:0;z-index:3;background:var(--surface);padding:6px;max-width:100%;font-size:11px}
.d-task-list>div{flex-wrap:wrap;min-width:0}.d-task-list>div>span{flex:1;overflow-wrap:anywhere}.d-task-list>div>.error{width:100%;margin:0}
.d-header .page-title{letter-spacing:0}.d-header .page-subtitle:empty{display:none}
.d-header .toolbar{flex-wrap:wrap}.d-project-card,.d-asset-tile,.d-asset-card,.d-upload-zone,.dialog-body .d-upload-zone{border-radius:16px}
.d-asset-inspector{min-width:0}.d-asset-inspector>.button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.d-asset-grid>.d-empty{grid-column:1/-1}.d-project-grid>.d-empty{grid-column:1/-1}
.d-stage-content *{letter-spacing:0}.d-preview-screen,.d-project-cover,.d-asset-image{background:var(--surface-2)}
.d-resource-picker{border:0;border-top:1px solid var(--line);padding:14px 0;margin:0;display:grid;gap:12px}.d-resource-picker legend{font-size:13px}.d-resource-picker label{display:flex;align-items:center;gap:10px;font-size:13px}.d-resource-picker input{accent-color:var(--accent)}.d-manual-script{margin-top:20px}.d-manual-script .d-script-editor{border:1px solid var(--line);border-radius:6px;padding:15px;min-height:220px}
.d-preview-controls .button{min-width:32px;min-height:30px}.d-preview-overlay{pointer-events:none}
@media(max-width:650px){.d-worknav{gap:8px}.d-stepnav{width:100%;overflow-x:auto;margin-left:0}.d-stepnav button{flex-shrink:0;font-size:12px;border-radius:999px;}.d-sync-status{margin-left:auto}.d-header{margin:16px 0}.d-candidate-bar>.toolbar{margin-left:0}.d-final-screen{min-height:180px}.d-console-options .d-select-field{min-width:0}.d-console-options .select{min-width:0}.d-board-bottom .toolbar{flex-wrap:wrap}}
/* Director surfaces follow the shared studio palette; editing stays unframed. */
.d-header .eyebrow{font-size:11px;color:var(--muted);letter-spacing:0;display:flex;align-items:center;gap:8px}
.d-header .eyebrow:before{content:'';width:5px;height:5px;background:var(--accent-2)}
.d-header .page-title{font-weight:600;margin:5px 0 4px}
.d-header .page-subtitle{font-size:12px;color:var(--muted)}
.d-worknav{padding-bottom:12px}.d-stepnav button{border-radius:999px}.d-stepnav button.active{box-shadow:none;border-color:transparent;border-bottom-color:transparent;background:var(--soft)}
.d-sync-status{display:inline-flex;align-items:center;gap:6px}.d-sync-status:before{content:'';width:5px;height:5px;background:var(--success);border-radius:50%}
.d-sync-status[data-sync=error]:before{background:var(--danger)}.d-sync-status[data-sync=pending]:before,.d-sync-status[data-sync=saving]:before{background:var(--warning)}
.d-episode-rail{padding-top:4px}.d-rail-head strong{color:var(--muted);font-weight:500}
.d-rail-episode{border:0;border-left:2px solid transparent;border-radius:16px;}.d-rail-episode.active{border-color:var(--accent);background:var(--soft)}
.d-rail-episode strong{font-size:13px}.d-rail-episode small{font-size:11px}
.d-project-grid{gap:18px}.d-project-card{box-shadow:none}.d-project-card:hover{transform:none}
.d-project-cover{height:auto;aspect-ratio:16/9}.d-project-body{padding:18px}.d-project-body h2{font-size:18px;line-height:1.45;margin:0 0 10px;overflow-wrap:anywhere}.d-project-body p{min-height:42px;-webkit-line-clamp:2;line-height:1.7}
.d-project-stats{flex-wrap:wrap;padding:10px 0 16px}.d-cover-label,.d-cover-corner{background:var(--surface);color:var(--text);border-color:var(--line)}
.d-asset-grid{gap:16px}.d-asset-image{height:auto;aspect-ratio:4/3}.d-asset-card small{color:var(--muted)}.d-asset-card p{line-height:1.6}.d-asset-card .d-status{background:var(--surface);color:var(--text)}
.d-asset-check{border:1px solid var(--line);padding:5px}.d-asset-check>span{display:none}
.d-asset-inspector{gap:16px;padding-left:22px}.d-asset-inspector .d-section-top h2{font-size:16px}
.d-preview-screen,.d-final-screen{border-radius:4px;box-shadow:none;border-color:var(--line)}
.d-preview-overlay{background:var(--surface);color:var(--muted);padding:5px 8px;border:1px solid var(--line);border-radius:4px;font-size:11px;letter-spacing:0;text-shadow:none}
.d-preview-controls{gap:6px}.d-preview-controls .button{padding:5px 9px}.d-preview-head .d-code{padding:4px 7px;background:transparent}
.d-generation-console:before{display:none}
.d-reference-column h2{font-size:15px}.d-reference-tile>div{height:auto;aspect-ratio:1;border-radius:4px}.d-reference-tile.selected>div{box-shadow:none;}

.d-reference-tile i{border-radius:4px;width:19px;height:19px}.d-reference-tile strong{font-size:11px}.d-ref-section h3{font-size:11px}
.d-status-UNKNOWN,.d-status-unknown{color:var(--warning)}.d-status-FAILED,.d-status-failed{color:var(--danger)}
.d-job-status[data-status=UNKNOWN]{color:var(--warning)}
.d-group-thumb>div{border-radius:4px}.d-group-thumb.active>div{box-shadow:none}.d-group-thumb .d-status{background:var(--surface);color:var(--muted)}
.d-time-track{border-radius:0}.d-time-block{background:var(--surface-2)}.d-time-block strong{color:var(--accent)}
.d-playhead{box-shadow:none}.d-time-ruler>.d-boundary{font-size:11px;color:var(--muted)}
.d-script-paper>.d-section-top h2{font-size:15px}.d-script-paper>.d-section-top{padding-bottom:12px}.d-script-editor{font-size:14px;line-height:1.95;padding:20px 0}
.d-upload-zone,.dialog-body .d-upload-zone{border-radius:20px;min-height:200px;padding:28px 18px;background:var(--surface-2);box-shadow:none;border:1px dashed var(--line);gap:9px}
.d-upload-zone:hover,.d-upload-zone.d-upload-drag{border-color:var(--accent);background:var(--soft);box-shadow:none;transform:none}
.d-upload-zone>strong,.dialog-body .d-upload-zone>strong{font-size:16px;font-weight:500}.d-upload-plus,.dialog-body .d-upload-plus{width:48px;height:48px;border:1px solid var(--line);background:var(--surface);color:var(--accent);border-radius:50%;box-shadow:none;display:grid;place-items:center}
.d-upload-zone>small{font-size:11px;color:var(--muted)}.d-upload-hint{font-size:12px}
#qj-dialog:has([data-d-import-preview]){width:min(660px,calc(100vw - 32px));border-radius:8px}
.dialog-body:has([data-d-import-preview]){gap:18px}.d-import-title{gap:8px}.d-import-title .input{width:100%}
.d-import-summary{display:flex;align-items:center;gap:18px;padding:17px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:14px}
.d-import-summary>strong{font-family:monospace;font-size:28px;color:var(--accent);font-weight:500;display:flex;gap:5px;align-items:baseline;flex-shrink:0}.d-import-summary>strong>span{font-family:inherit;font-size:12px;color:var(--muted)}
.d-import-summary>span{font-size:12px;min-width:0;overflow-wrap:anywhere}.d-import-summary small{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.d-import-episodes{display:grid;gap:9px;max-height:220px;overflow:auto;scrollbar-width:thin;padding:2px}
.d-import-episode{display:grid;grid-template-columns:25px minmax(0,1fr) 70px;gap:10px;align-items:center}.d-import-episode>span{font-family:monospace;font-size:11px;color:var(--muted)}.d-import-episode .input{width:100%;min-width:0;font-size:12px;padding:7px 9px}.d-import-episode>small{font-size:11px;text-align:right;color:var(--muted);font-family:monospace;white-space:nowrap}
.d-import-target{display:flex;align-items:center;gap:16px;font-size:12px;min-width:0}.d-import-target>span{color:var(--muted);flex-shrink:0}.d-import-target strong{font-weight:500;overflow-wrap:anywhere}
@media(max-width:650px){
  .d-header .page-title{font-size:22px}.d-header .eyebrow{font-size:11px}.d-worknav{padding-bottom:10px}.d-stepnav{gap:2px}.d-stepnav button{padding:7px 8px;border-radius:999px;}
  .d-project-name{max-width:180px}.d-library-toolbar .input{width:100%}.d-project-body h2{font-size:17px}
  .d-rail-episode{flex-basis:108px;border-left:0;border-bottom:2px solid transparent;padding:8px}.d-rail-items{gap:5px}
  .d-preview-screen{border-radius:4px;aspect-ratio:var(--d-preview-ratio);min-height:190px}.d-preview-head .d-code{font-size:11px}
  .d-prompt-title{gap:8px}.d-prompt-tabs{flex:1}.d-prompt-tabs .button{font-size:11px;padding:5px 7px}
  .d-reference-column .d-reference-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.d-reference-column{padding-top:18px}
  .d-timeline{padding-top:18px;margin-top:20px}.d-timeline-heading{gap:9px}.d-transport{gap:8px}.d-transport>span{font-size:11px}
  .d-board-bottom>.toolbar{gap:6px}.d-board-bottom .button{font-size:11px;padding:6px 8px}
  .dialog-body:has([data-d-import-preview]){padding:18px;gap:16px}.dialog-body .d-upload-zone{min-height:170px}
  .d-import-episode{grid-template-columns:21px minmax(0,1fr) 56px;gap:6px}.d-import-episode>small{font-size:11px}
}

/* Readable, neutral tools around the footage. */
.d-header .page-title{font-size:24px;line-height:1.35}
.d-project-body p,.d-asset-card p,.d-script-tools>p,.d-asset-inspector p{font-size:13px;line-height:1.75}
.d-section-top,.d-shot-group-head,.d-preview-head,.d-timeline-heading{min-width:0}
.d-shot-table th{font-size:11px;padding:12px;background:var(--surface-2)}
.d-shot-table td{padding:16px 12px;line-height:1.7}
.d-shot-table .textarea{font-size:13px;line-height:1.75}
.d-status{line-height:1.5;padding:4px 7px}
.d-status-done,.d-status-running,.d-status-queued{color:var(--text);background:var(--surface-2)}
.d-preview-state{background:var(--surface);color:var(--text)}
.d-preview-state>small{color:var(--muted)}
.d-state-orbit{color:var(--text);border-color:var(--line);box-shadow:none}
.d-failed .d-state-orbit{color:var(--danger);border-color:var(--danger);background:transparent}
.d-empty-orbit{box-shadow:none;width:64px;height:64px;font-size:30px}
.d-overview-hero,.d-episode,.d-history-list>label{border-radius:8px}
.d-generate-row>.button,.d-asset-card.active{box-shadow:none}
.d-reference-tile.selected i{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.d-reference-tile.selected>div{border-color:var(--accent)}
.d-reference strong,.d-reference-tile strong{font-size:12px;line-height:1.5}
.d-reference small{line-height:1.6}
.d-preview-slate{color:#f5f5f5}
.d-hero-caption>span,.d-hero-caption small{color:#eee;opacity:1}
.d-final-caption{background:rgba(0,0,0,.32)}
.d-final-caption h2{font-size:26px;line-height:1.4}
.d-final-caption>small,.d-final-caption>span{color:#eee}
.d-generation-console{border-top-color:var(--line)}
.d-generation-console:before{content:none}
.d-time-track,.d-time-block{background:var(--surface-2)}
.d-time-block.active{background:var(--soft)}
.d-upload-intro h2{font-size:22px;line-height:1.4}
.d-history-list>label{background:transparent;border-width:0 0 1px;border-radius:0;padding:16px 0}
.d-task-list>div{gap:10px;line-height:1.65}
.d-console-options .d-select-field,.d-group-duration{min-width:0}
.d-console-options .select{width:100%;max-width:100%;min-width:0}
.d-prerequisites,.d-batch-status{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 0;border-top:1px solid var(--line);line-height:1.6}
.d-prerequisites>span{flex:1;min-width:120px;overflow-wrap:anywhere;color:var(--muted)}
.d-batch-status>p{flex-basis:100%;margin:0}
.d-batch-source-note{color:var(--muted);font-size:12px}.d-batch-candidate-image{display:block;max-width:100%;max-height:320px;object-fit:contain;margin:12px 0}
.d-candidate-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.d-candidate-compare section{min-width:0}.d-candidate-compare h2{font-size:16px;margin:0 0 14px}
.d-candidate-compare article{padding:14px 0;border-top:1px solid var(--line)}
.d-candidate-compare h3{font-size:14px;margin:8px 0}.d-candidate-compare p,.d-candidate-compare pre{font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.d-review-shot{padding:10px 0}.d-review-shot p{margin:5px 0}.d-candidate-raw{margin-top:20px}
.d-plan-facts{display:grid;grid-template-columns:1fr 2fr;gap:16px}.d-plan-facts dd{margin:0}.d-plan-facts dt{color:var(--muted)}
.d-review-video{display:block;width:100%;max-height:360px;background:#000;object-fit:contain}
.d-image-controls{display:grid;gap:12px;margin:16px 0}.d-history-consent{display:flex;align-items:flex-start;gap:10px;margin-top:20px;line-height:1.8}
.d-import-excerpt{padding:0 0 12px}.d-import-excerpt pre{max-height:200px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.8}
@media(max-width:760px){
  .d-rail-head .button{min-width:44px;}
  #page .d-stage-content .button,#page .d-stage-content select,.d-stepnav button,.d-rail-head button,.d-preview-controls button,.d-transport button{min-height:44px}
  .d-stage-content .toolbar{flex-wrap:wrap}.d-stage-content .toolbar>.button{max-width:100%;white-space:normal}
  .d-split-mode{flex-wrap:wrap;gap:6px}.d-split-mode button{min-height:44px}
  .d-candidate-compare{grid-template-columns:minmax(0,1fr);gap:20px}
  .d-asset-inspector,.d-reference-column,.d-export-console{position:static;max-height:none;min-width:0}
  .d-timeline-heading{flex-wrap:wrap;gap:12px}.d-group-check,.d-asset-check{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
  .d-plan-facts{grid-template-columns:1fr 1.5fr}.d-prerequisites .toolbar{width:100%}
}
@media(max-width:760px){
  .d-worknav,.d-stepnav,.d-board,.d-shots-toolbar,.d-shot-group,.d-shot-table,.d-export-layout,.d-export-layout>section{max-width:100%;min-width:0}
  .d-export-layout{grid-template-columns:minmax(0,1fr)}
  .d-stepnav{padding-bottom:3px}
  .d-shot-group-head{flex-wrap:wrap;gap:12px}
  .d-shot-group-head .toolbar{margin-left:0;flex-wrap:wrap}
  .d-reference-column .d-reference strong{font-size:12px}
  .d-reference-column .d-reference small{font-size:11px}
  .d-project-foot,.d-preview-controls{flex-wrap:wrap}
  .d-project-foot button,.d-project-body h2 button{min-width:44px;min-height:44px}
  .d-project-foot button{padding:8px}
  .d-project-body h2 button{text-align:left;max-width:100%}
  .d-preview-head{flex-wrap:wrap}
  .d-preview-head .d-job-status{white-space:normal}
  .d-final-caption{padding:22px}
}

/* Director navigation and low-frequency actions share one compact treatment. */
.d-stage-content>.d-header{margin:18px 0 22px;gap:16px;align-items:center}
.d-stage-content>.d-header .eyebrow{display:none}
.d-stage-content>.d-header .page-title{margin:0;font-size:24px;line-height:1.4}
.d-stage-content>.d-header .page-subtitle{margin:4px 0 0;font-size:13px;line-height:1.6}
.d-worknav{gap:10px;padding:0 0 10px;flex-wrap:wrap}
.d-stepnav{gap:4px;min-width:0}
.d-stepnav button{min-height:38px;padding:7px 12px;font-size:14px;white-space:nowrap;border-radius:999px;}
.d-sync-status{font-size:13px}
.d-rail-head{margin-bottom:8px;min-height:36px}
.d-rail-head strong{font-size:13px}
.d-rail-head .button{width:36px;height:36px;min-height:36px;padding:0;display:grid;place-items:center}
.d-rail-items{gap:4px}
.d-rail-episode{padding:10px 8px}
.d-rail-episode>span,.d-rail-episode small{font-size:13px;line-height:1.5}
.d-rail-episode small{font-family:inherit;white-space:nowrap}
.d-rail-episode>span{margin:4px 0}
.d-project-foot button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 10px;font-size:13px}
.d-project-foot button[data-action="director:deleteProject"]{width:36px;min-width:36px;padding:0}
.d-actions-menu{position:relative;flex:none}
.d-storyboard-actions,.d-export-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;max-width:100%}
.d-export-actions>[data-d-film-download]{min-width:0;max-width:100%}
.d-export-actions [data-d-film-download]>.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;max-width:100%;font-size:14px}
.d-actions-menu>summary{display:grid;place-items:center;width:38px;height:38px;list-style:none;border:1px solid transparent;border-radius:50%;cursor:pointer;color:var(--muted);background:var(--surface)}
.d-actions-menu>summary::-webkit-details-marker{display:none}
.d-actions-menu>summary:hover,.d-actions-menu[open]>summary{color:var(--text);background:var(--surface-2)}
.d-actions-list{position:absolute;right:0;top:calc(100% + 8px);z-index:25;display:grid;gap:4px;width:236px;max-width:calc(100vw - 40px);padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--surface);box-shadow:0 8px 28px #0002}
.d-actions-list>.button{width:100%;text-align:left;justify-content:flex-start;min-height:38px;font-size:14px;padding:8px 10px;white-space:normal}
.d-actions-list>.d-split-mode{display:flex;flex-wrap:wrap;gap:4px;border:0;border-top:1px solid var(--line);padding-top:8px;margin-top:4px}
.d-actions-list>.d-split-mode .button{flex:1;min-height:36px;border-radius:999px;font-size:13px}
.d-menu-setting{min-width:0;border-top:1px solid var(--line);padding:10px 2px 2px;margin-top:4px}
.d-menu-setting>span{display:block;font-size:13px;line-height:1.6;color:var(--muted);margin-bottom:8px}
.d-menu-setting .d-split-mode{display:flex;flex-wrap:wrap;gap:4px;border:0;max-width:100%}
.d-menu-setting .d-split-mode>span{flex:0 0 100%;font-size:13px}
.d-menu-setting .d-split-mode .button{flex:1 1 auto;min-height:36px;padding:7px 9px;border-radius:999px;font-size:13px}
.d-completed-batches{border-top:1px solid var(--line);margin-top:12px;padding-top:6px;color:var(--muted);font-size:13px}
.d-completed-batches>summary{min-height:38px;line-height:38px;cursor:pointer;font-size:13px}
.d-completed-batches[open]>summary{margin-bottom:8px}
.d-asset-toolbar{gap:14px;margin:0 0 20px;align-items:center}
.d-asset-toolbar>.tabs{margin:0;padding:0;border:0;gap:4px}
.d-asset-toolbar>.toolbar{gap:10px}
.d-asset-toolbar .tabs button{font-size:14px;min-height:38px;padding:8px 12px}
.d-asset-toolbar .tabs small,.d-asset-toolbar>.toolbar>span{font-size:13px}
.d-selection-toggle{display:inline-flex;align-items:center;gap:8px;min-height:38px;font-size:13px;cursor:pointer}
.d-selection-toggle input{width:16px;height:16px;margin:0;accent-color:var(--accent)}

/* The storyboard follows document flow: preview and references beside the editor. */
.d-story-grid{margin-top:20px;padding-top:16px;border-top:1px solid var(--line);font-size:13px}
.d-story-grid-create{margin-top:14px;font-size:13px;color:var(--muted)}.d-story-grid-create>summary{min-height:38px;line-height:38px;cursor:pointer}.d-story-grid-create .d-story-grid{margin-top:0;color:var(--text)}
.d-story-grid-heading,.d-story-grid-controls{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.d-story-grid h3{margin:0;font-size:14px;font-weight:600}.d-story-grid h3 small{margin-left:6px;color:var(--muted);font-size:12px;font-weight:400}
.d-story-grid .button{min-height:38px;font-size:13px;padding:8px 10px}
.d-story-grid-image{display:block;max-width:100%;width:210px;margin:14px 0 10px;padding:0;border:1px solid var(--line);border-radius:6px;overflow:hidden;background:var(--surface);cursor:pointer}
.d-story-grid-image img{display:block;width:100%;height:auto;max-height:260px;object-fit:contain}
.d-story-grid-controls{justify-content:flex-start}.d-story-grid-controls label{display:flex;align-items:center;gap:8px;min-height:38px;cursor:pointer}.d-story-grid-controls input{width:16px;height:16px;margin:0;accent-color:var(--accent)}
.d-story-grid-note{margin:10px 0;color:var(--muted);line-height:1.7}.d-story-grid-model>summary{min-height:38px;line-height:38px;color:var(--muted);cursor:pointer}.d-story-grid-model .d-select-field{max-width:100%;margin-bottom:10px}.d-story-grid-full{display:block;max-width:100%;max-height:70vh;width:auto;height:auto;margin:0 auto 14px;object-fit:contain}
#page:has(.d-stage-storyboard){height:auto;min-height:0;overflow:visible}
.d-stage-storyboard{display:block;height:auto;min-height:0;font-size:14px}
.d-stage-storyboard .d-board{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.35fr) minmax(180px,.68fr);grid-template-areas:'preview prompt refs';gap:24px;align-items:start;height:auto;min-height:0}
.d-stage-storyboard .d-preview-column{grid-area:preview;display:block;height:auto;min-height:0;padding:0;overflow:visible}
.d-stage-storyboard .d-preview-head{position:relative;min-height:38px;margin-bottom:12px;gap:10px;flex-wrap:wrap}
.d-stage-storyboard .d-preview-head strong{font-size:16px;font-weight:600;line-height:1.5}
.d-stage-storyboard .d-code,.d-stage-storyboard .d-job-status,.d-stage-storyboard .d-status{font-size:13px}
.d-stage-storyboard .d-preview-head>span[data-d-job-kind]{margin-left:auto;min-width:0}
.d-stage-storyboard .d-preview-screen{width:100%;height:auto;min-height:0;max-height:none;aspect-ratio:var(--d-preview-ratio,16/9);border:1px solid #000;border-radius:8px;box-shadow:none;background:#000}
.d-stage-storyboard .d-preview-screen.d-preview-portrait{width:min(100%,270px);margin-inline:auto}
.d-video-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;background:#000;color:#9b9b9b;font-size:14px;font-weight:400;letter-spacing:0}
.d-video-placeholder small{max-width:90%;text-align:center;color:#777;font-size:12px;line-height:1.6}
.d-group-thumb>div{background:#000;border:1px solid #000}
.d-group-thumb .d-video-thumb,.d-group-thumb .d-video-poster{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;background:#000}
.d-group-thumb .d-video-placeholder{font-size:12px}
.d-group-thumb .d-status{max-width:calc(100% - 12px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.d-stage-storyboard .d-preview-screen>video,.d-stage-storyboard .d-preview-screen>.d-real-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.d-stage-storyboard .d-preview-overlay{font-size:13px}
.d-stage-storyboard .d-preview-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}
.d-stage-storyboard .d-preview-controls .button{min-width:38px;min-height:38px;padding:8px 10px;font-size:13px}
.d-stage-storyboard .d-preview-caption{font-size:14px;line-height:1.8;margin:12px 0 0;padding-bottom:18px}
.d-stage-storyboard .d-shot-outline{grid-area:shots;min-width:0;margin-top:0}
.d-stage-storyboard .d-section-top{min-height:38px;margin-bottom:12px;gap:12px;align-items:center}
.d-stage-storyboard .d-section-top h2,.d-stage-storyboard .d-prompt-title h2{margin:0;font-size:18px;line-height:1.5;font-weight:600}
.d-stage-storyboard .d-section-top>span{margin-right:auto;font-size:13px;color:var(--muted)}
.d-stage-storyboard .d-section-top .button,.d-stage-storyboard .d-prompt-title .button{display:grid;place-items:center;width:38px;height:38px;min-width:38px;min-height:38px;padding:0;background:var(--surface);color:var(--muted)}
.d-shot-outline-list{list-style:none;padding:0;margin:0}
.d-shot-outline-list>li{padding:12px 0;border-top:1px solid var(--line)}
.d-shot-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:13px;color:var(--muted);margin-bottom:7px}
.d-shot-meta>strong{font-size:13px;color:var(--text);font-weight:600}
.d-shot-outline-list p{font-size:14px;line-height:1.8;margin:0;overflow-wrap:anywhere}
.d-shot-outline-list .d-shot-dialogue{margin-top:5px;color:var(--muted)}
.d-asset-state{display:inline-block;max-width:100%;padding:2px 6px;margin:4px 0 0 6px;border:1px solid var(--line);border-radius:4px;font-size:12px;font-weight:400;line-height:1.5;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:middle}
.d-reference-tile .d-asset-state{display:block;margin:4px 0 0;font-size:11px}
.d-native-details{min-width:0;margin-top:10px;border-top:1px solid var(--line);font-size:13px}
.d-native-details>summary,.d-native-raw>summary{display:list-item;min-height:44px;padding:11px 0;line-height:22px;cursor:pointer;color:var(--muted);overflow-wrap:anywhere}
.d-native-fields{margin:0;min-width:0}.d-native-fields>div{padding:9px 0;border-top:1px solid var(--line)}
.d-native-fields dt{font-size:12px;color:var(--muted);margin-bottom:5px}.d-native-fields dd{margin:0;font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.d-native-raw pre{margin:0;max-height:360px;overflow:auto;font-family:inherit;font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.d-stage-storyboard .d-reference-column{grid-area:refs;display:flex;flex-wrap:wrap;gap:0 20px;border-left:0;border-top:1px solid var(--line);padding:20px 0 0;margin-top:0;height:auto;max-height:none;overflow:visible}
.d-stage-storyboard .d-reference-column>.d-section-top{flex:0 0 100%;margin-bottom:12px}
.d-stage-storyboard .d-reference-column .badge{font-size:13px}
.d-stage-storyboard .d-reference-column .d-ref-section{display:block;flex:0 1 auto;max-width:100%;margin:0 0 14px}
.d-stage-storyboard .d-ref-section h3{font-size:13px;font-weight:400;margin:0 0 8px;line-height:1.6;justify-content:flex-start;gap:8px}
.d-stage-storyboard .d-ref-section h3 small{font-size:13px;font-family:inherit}
.d-stage-storyboard .d-reference-column .d-reference-grid{display:flex;flex-wrap:wrap;gap:10px;max-width:100%}
.d-stage-storyboard .d-reference-tile{flex:0 0 80px;width:80px;min-height:100px;padding:0;align-self:start}
.d-stage-storyboard .d-reference-tile>div{height:auto;max-height:none;aspect-ratio:1;width:100%;border-radius:6px}
.d-stage-storyboard .d-reference-tile strong{font-size:13px;line-height:1.5;margin-top:5px;white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.d-stage-storyboard .d-reference-tile i{height:20px;width:20px;right:4px;top:4px;border-radius:4px}
.d-stage-storyboard .d-reference-column>.button{font-size:13px;min-height:38px;padding:8px 0}
.d-reference-notes{flex:0 0 100%;margin-top:0;font-size:13px;color:var(--muted)}
.d-reference-notes>summary{cursor:pointer;min-height:38px;line-height:38px}
.d-reference-notes .d-ref-note{font-size:13px;border:0;margin:4px 0 0;padding:0}
.d-reference-notes .textarea{font-size:14px;line-height:1.8;min-height:100px;margin-top:8px}
.d-stage-storyboard .d-prompt-column{grid-area:prompt;display:block;height:auto;min-height:0;padding:0;overflow:visible;border:0;background:transparent}
.d-stage-storyboard .d-prompt-title{min-height:38px;margin:0 0 12px;gap:12px;flex-wrap:nowrap}
.d-stage-storyboard .d-prompt-title>.toolbar{gap:6px;flex-wrap:nowrap}
.d-prompt-reference-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:9px}
.d-prompt-reference-tools>.button{min-height:36px;padding:7px 10px;font-size:13px}
.d-prompt-reference-tools>span{font-size:12px;line-height:1.6;color:var(--muted)}
.d-mention-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:7px;margin-top:8px;border:1px solid var(--line);border-radius:7px;background:var(--surface);max-height:250px;overflow:auto}
.d-mention-picker[hidden],.d-mention-choice[hidden]{display:none}
.d-mention-choice{display:flex;align-items:center;gap:9px;min-width:0;min-height:48px;border:0;border-radius:5px;padding:7px;text-align:left;background:transparent;color:var(--text);cursor:pointer}
.d-mention-choice:hover,.d-mention-choice:focus-visible{background:var(--surface-2);outline:1px solid var(--accent)}
.d-mention-choice img{width:34px;height:34px;object-fit:contain;background:var(--surface-2);border-radius:4px;flex:none}
.d-mention-choice>span{min-width:0;overflow-wrap:anywhere;font-size:13px;line-height:1.5}
.d-mention-choice small{display:block;color:var(--muted);font-size:11px}
.d-mention-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.d-mention-chips:empty{display:none}
.d-prompt-refs{display:flex;align-items:stretch;gap:8px;overflow-x:auto;padding:0 0 12px;margin:0 0 12px;border-bottom:1px solid var(--line);scrollbar-width:thin}
.d-prompt-refs-label{flex:none;align-self:center;font-size:12px;color:var(--muted);white-space:nowrap}
.d-prompt-ref{flex:0 0 96px;margin:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface)}
.d-prompt-ref img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:var(--surface-2)}
.d-prompt-ref figcaption{display:flex;flex-direction:column;gap:1px;padding:5px 6px;font-size:10px;line-height:1.35;color:var(--muted);overflow:hidden}
.d-prompt-ref figcaption b{font-size:10px;font-weight:600;color:var(--text)}
.d-prompt-ref figcaption span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d-prompt-refs-empty{font-size:12px;color:var(--muted);align-self:center}
.d-prompt-negative{margin-top:10px;font-size:12px;line-height:1.6;color:var(--muted)}
.d-prompt-negative>summary{cursor:pointer;min-height:24px}
.d-prompt-negative p{margin:7px 0 0;overflow-wrap:anywhere}
.d-prompt-negative-note{opacity:.8}
.d-reference-index{position:absolute;top:5px;left:5px;min-width:20px;height:20px;display:grid;place-items:center;border-radius:4px;background:#171719e6;color:#fff;font-size:11px;font-variant-numeric:tabular-nums}
.d-past-task{margin:0 0 16px;padding:10px 0;border-bottom:1px solid var(--line);font-size:12px;color:var(--muted)}.d-past-task>summary{cursor:pointer;min-height:24px}.d-past-task>p{margin:10px 0;overflow-wrap:anywhere}.d-past-task>.button{margin:0 0 4px}
.d-mention-chips>.button{min-height:30px;padding:5px 8px;font-size:12px;color:var(--muted)}
.d-dialogue-notice{padding:12px 14px;margin-top:14px;border:1px solid color-mix(in srgb,var(--warning,#ad7c32) 35%,var(--line));border-radius:7px;background:color-mix(in srgb,var(--warning,#ad7c32) 5%,var(--surface));font-size:13px;line-height:1.7}
.d-dialogue-notice>div{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.d-dialogue-notice strong{font-size:13px;font-weight:600}
.d-dialogue-notice .button{min-height:34px;padding:6px 9px;font-size:12px}
.d-dialogue-notice ul{list-style:none;padding:0;margin:8px 0 0}
.d-dialogue-notice li{display:flex;align-items:baseline;gap:9px;padding-top:5px;overflow-wrap:anywhere}
.d-dialogue-notice li>.button{padding:0;border:0;min-height:28px;color:var(--accent);background:none;flex:none}
.d-shot-outline-list>li:focus{outline:2px solid var(--accent);outline-offset:5px;border-radius:3px}
.d-script-editor:focus-visible{outline:2px solid var(--accent);outline-offset:6px}
.d-stage-storyboard .d-reference-card{width:104px;min-width:0;flex:0 0 104px;padding:5px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.d-stage-storyboard .d-reference-card .d-reference-tile{display:block;width:100%;min-height:0}
.d-reference-card-tools{display:flex;gap:4px;margin-top:6px}
.d-reference-card-tools>.button{flex:1;display:grid;place-items:center;min-width:0;min-height:32px;padding:5px;font-size:13px;border-radius:999px;}
.d-asset-tile>.button{margin:0 12px 12px;min-height:38px;font-size:13px}
.d-stage-storyboard .d-full-prompt{display:block;box-sizing:border-box;width:100%;height:320px;min-height:260px;padding:18px;font-size:16px;line-height:1.85;resize:vertical;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text)}
.d-stage-storyboard .d-generation-console{height:auto;min-height:0;margin:16px 0 0;padding:14px 0 0;border-top:1px solid var(--line)}
.d-stage-storyboard .d-generation-console:before{content:none}
.d-stage-storyboard .d-generation-console .d-console-options{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(0,.8fr) minmax(0,1fr);gap:12px;align-items:start}
.d-stage-storyboard .d-console-options .d-select-field{display:flex;flex-direction:column;align-items:stretch;gap:7px}
.d-stage-storyboard .d-select-field>span{font-size:13px;line-height:1.5}
.d-stage-storyboard .d-console-options .select,.d-stage-storyboard .d-optimization-control .select{width:100%;max-width:none;min-width:0;min-height:40px;height:auto;padding:8px 10px;font-size:14px}
.d-stage-storyboard .d-optimization-control{margin-top:18px;display:grid;gap:10px}
.d-stage-storyboard .d-optimization-control>.d-select-field:first-child{justify-content:flex-start;gap:10px;min-height:36px}
.d-stage-storyboard .d-optimization-control input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--accent)}
.d-stage-storyboard .d-optimization-control .ws-meta{margin:0;font-size:13px;line-height:1.7;color:var(--muted)}
.d-stage-storyboard .d-optimization-control>.d-select-field:has(select){display:flex;flex-direction:column;align-items:stretch;gap:7px}
.d-stage-storyboard .d-generate-row{margin-top:20px;gap:12px;flex-wrap:wrap;align-items:center}
.d-stage-storyboard .d-generate-row>span{max-width:none;flex:1;font-size:13px;line-height:1.7;color:var(--muted)}
.d-stage-storyboard .d-generate-row>.button{min-height:42px;font-size:14px;padding:10px 18px;box-shadow:none;border-radius:999px;}
.d-stage-storyboard .d-timeline{margin-top:28px;padding:20px 0 0;height:auto;min-height:0;overflow:visible;border-top:1px solid var(--line)}
.d-stage-storyboard .d-timeline-heading{min-height:38px;margin-bottom:14px;gap:14px;flex-direction:row;align-items:center;flex-wrap:wrap}
.d-stage-storyboard .d-timeline-heading strong{font-size:14px}
.d-stage-storyboard .d-timeline-heading strong>span{font-family:inherit;font-size:13px;color:var(--muted);margin-left:10px}
.d-stage-storyboard .d-transport{gap:8px}
.d-stage-storyboard .d-transport .button{min-width:38px;min-height:38px;font-size:14px;padding:7px 10px}
.d-stage-storyboard .d-transport>span{font-size:13px}
.d-stage-storyboard .d-sequence-scale{display:block;min-width:100%}
.d-stage-storyboard .d-group-strip{height:auto;padding:0 0 12px;align-items:start}
.d-stage-storyboard .d-group-thumb>div{height:68px;margin-bottom:8px}
.d-stage-storyboard .d-group-thumb strong,.d-stage-storyboard .d-group-thumb>small{font-size:13px;line-height:1.6}
.d-stage-storyboard .d-group-thumb .d-status{font-size:12px}
.d-stage-storyboard .d-time-ruler{height:28px;margin:8px 0 0}
.d-stage-storyboard .d-time-ruler>.d-boundary{font-size:13px}
.d-stage-storyboard .d-time-track{height:54px}
.d-stage-storyboard .d-time-block{padding:8px 10px;font-size:13px}
.d-stage-storyboard .d-board-bottom{height:auto;margin-top:18px;gap:12px;align-items:center;flex-wrap:wrap;font-size:13px}
.d-stage-storyboard .d-board-bottom .button{min-height:40px;padding:9px 14px;font-size:14px}
@media(max-width:1099px){
  .d-stage-storyboard .d-board{grid-template-columns:minmax(0,1fr);grid-template-areas:'preview' 'prompt' 'refs';gap:28px}
  .d-stage-storyboard .d-full-prompt{height:320px}
}
@media(max-width:760px){
  .d-episode-workspace{grid-template-columns:minmax(0,1fr);gap:14px}
  .d-story-grid .button,.d-story-grid-controls label{min-height:44px}.d-story-grid-create>summary,.d-story-grid-model>summary{min-height:44px;line-height:44px}
  .d-episode-rail{display:block;border:0;border-bottom:1px solid var(--line);padding:0 0 10px;overflow:hidden}
  .d-rail-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 4px;min-height:44px}
  .d-rail-head .button{width:44px;height:44px;min-height:44px}
  .d-rail-items{flex-direction:row;gap:6px;padding-bottom:2px;overflow-x:auto;overflow-y:hidden}
  .d-rail-episode{flex:0 0 130px;padding:7px 8px;border-left:0;border-bottom:2px solid transparent;min-height:76px}
  .d-rail-episode strong,.d-rail-episode>span,.d-rail-episode small{font-size:13px;line-height:1.5}
  .d-rail-episode>span{margin:2px 0}
  .d-worknav,.d-stage-content .d-worknav{gap:8px;flex-wrap:wrap;padding-bottom:8px}
  .d-stage-content .d-worknav{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px}
  .workspace-studio .d-stage-content .d-worknav .d-project-name{display:block;grid-row:1;grid-column:1;min-width:0;max-width:none;font-size:13px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .d-stage-content .d-worknav>.d-sync-status{grid-row:1;grid-column:2;justify-self:end;margin-left:0}
  .d-stage-content .d-worknav>.d-stepnav{grid-row:2;grid-column:1/-1}
  .d-stage-content .d-worknav>[data-action="director:resolveConflict"]{grid-row:3;grid-column:1/-1;justify-self:stretch;min-height:44px}
  .d-stepnav{display:flex;flex:1 0 100%;width:100%;margin:0;gap:2px;overflow-x:auto;justify-content:flex-start;padding:0;scrollbar-width:none}
  .d-stepnav button{flex:1 0 auto;justify-content:center;min-height:44px;padding:8px 10px;font-size:14px;border-radius:999px;}
  .d-sync-status{font-size:13px}
  .d-stage-content>.d-header{margin:14px 0 18px;gap:12px;flex-direction:row;flex-wrap:wrap;align-items:center}
  .d-stage-content>.d-header .page-title{font-size:22px}
  .d-stage-content>.d-header .page-subtitle{font-size:13px}
  .d-stage-content>.d-header>.toolbar{gap:8px;margin-left:auto}
  .d-actions-menu>summary{width:44px;height:44px;border-radius:50%;border:1px solid transparent;}
  .d-actions-list>.button,.d-actions-list>.d-split-mode .button{min-height:44px}
  .d-menu-setting .d-split-mode .button{min-height:44px;border-radius:999px;}
  .d-completed-batches>summary{min-height:44px;line-height:44px}
  .d-project-foot button{min-height:44px}
  .d-project-foot button[data-action="director:deleteProject"]{width:44px;min-width:44px}
  .d-asset-toolbar{gap:12px}
  .d-asset-toolbar>.tabs{width:100%;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:2px}
  .d-asset-toolbar .tabs button{flex:0 0 auto;min-height:44px}
  .d-selection-toggle{min-height:44px}
  .d-stage-storyboard .d-board{gap:22px}
  .d-stage-storyboard .d-preview-screen{aspect-ratio:var(--d-preview-ratio,16/9);min-height:0}
  .d-stage-storyboard .d-preview-screen.d-preview-portrait{width:min(100%,220px)}
  .d-stage-storyboard .d-preview-head{gap:8px}
  .d-stage-storyboard .d-preview-head strong{white-space:normal;overflow-wrap:anywhere}
  .d-stage-storyboard .d-preview-controls .button{min-width:44px;min-height:44px}
  .d-stage-storyboard .d-section-top .button,.d-stage-storyboard .d-prompt-title .button,.d-stage-storyboard .d-transport .button{width:44px;height:44px;min-width:44px;min-height:44px}
  .d-stage-storyboard .d-reference-column{padding-top:16px;margin-top:0}
  .d-stage-storyboard .d-reference-tile{flex-basis:76px;width:76px}
  .d-stage-storyboard .d-reference-card{width:96px;flex-basis:96px}
  .d-reference-card-tools>.button,.d-prompt-reference-tools>.button,.d-mention-chips>.button,.d-dialogue-notice .button,.d-asset-tile>.button{min-height:44px}
  .d-mention-picker{grid-template-columns:minmax(0,1fr)}
  .d-reference-notes>summary{min-height:44px;line-height:44px}
  .d-stage-storyboard .d-full-prompt{height:300px;min-height:260px;padding:12px}
  .d-stage-storyboard .d-generation-console .d-console-options{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
  .d-stage-storyboard .d-console-options>.d-select-field:first-child{grid-column:1/-1}
  .d-stage-storyboard .d-console-options .select,.d-stage-storyboard .d-optimization-control .select{min-height:44px}
  .d-stage-storyboard .d-optimization-control>.d-select-field:first-child{min-height:44px}
  .d-stage-storyboard .d-generate-row{align-items:center}
  .d-stage-storyboard .d-generate-row>.button{min-height:44px;padding:10px 14px;border-radius:999px;}
  .d-stage-storyboard .d-board-bottom{align-items:flex-start;flex-direction:column}
  .d-stage-storyboard .d-board-bottom .button{min-height:44px}
}

/* Director composition: footage, editorial detail, and production controls. */
.d-header .page-title{font-size:28px;font-weight:650;line-height:1.35}
.d-header .page-subtitle{font-size:14px;line-height:1.7}
.d-stage-content>.d-header{margin:22px 0 26px}
.d-stage-content>.d-header .page-title{font-size:26px}
.d-worknav{padding-bottom:14px}
.d-stepnav{gap:6px}
.d-stepnav button{border-radius:999px;min-height:40px;padding:9px 13px}
.d-stepnav button.active{border:1px solid transparent;background:var(--soft);box-shadow:inset 0 1px 0 color-mix(in srgb,var(--surface) 65%,transparent)}
.d-rail-episode{border-radius:16px;padding:12px 9px}
.d-rail-episode strong{font-weight:600;font-size:14px}
.d-project-grid{gap:24px}
.d-project-card{border-radius:16px;box-shadow:0 5px 18px color-mix(in srgb,var(--text) 4%,transparent)}
.d-project-cover{background:var(--surface-2)}
.d-cover-label,.d-cover-corner{font-size:12px;border-radius:7px;padding:6px 10px}
.d-project-body{padding:22px}
.d-project-body h2{font-size:20px;line-height:1.5;margin-bottom:12px}
.d-project-body h2 button{text-align:left}
.d-project-body p{font-size:14px;line-height:1.8}
.d-project-stats{font-size:13px;gap:8px 14px;padding:12px 0 18px}
.d-project-foot{font-size:13px;gap:8px;align-items:center;padding-top:14px}
.d-project-foot button:last-child{border:1px solid color-mix(in srgb,var(--accent) 24%,var(--line));border-radius:999px;background:var(--soft);font-weight:600}
.d-library-toolbar{font-size:14px;margin:26px 0 22px;gap:18px}
.d-assets-layout{grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}
.d-asset-grid{gap:20px}
.d-asset-tile{border-radius:14px;box-shadow:0 4px 14px color-mix(in srgb,var(--text) 3%,transparent)}
.d-asset-tile.active{border-color:color-mix(in srgb,var(--accent) 65%,var(--line));box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 9%,transparent)}
.d-asset-card>div:last-child{padding:18px}
.d-asset-card small{font-size:12px;line-height:1.6}
.d-asset-card strong{font-size:17px;line-height:1.5}
.d-asset-card p{font-size:14px;line-height:1.75;margin-top:9px;min-height:49px}
.d-asset-image .d-status{font-size:12px;border:1px solid var(--line);border-radius:6px}
.d-asset-tile>.button{margin:0 18px 18px;min-height:40px;font-size:14px}
.d-asset-inspector{border:1px solid var(--line);border-radius:14px;padding:20px;gap:18px;background:var(--surface);box-shadow:0 5px 18px color-mix(in srgb,var(--text) 3%,transparent)}
.d-asset-inspector .d-section-top{margin-bottom:0}
.d-asset-inspector .d-section-top h2{font-size:18px;line-height:1.5}
.d-asset-inspector .field,.d-asset-inspector .d-select-field>span{font-size:13px;line-height:1.6}
.d-asset-inspector .input,.d-asset-inspector .textarea,.d-asset-inspector .select{font-size:14px;line-height:1.7}
.d-asset-inspector .d-select-field{display:flex;flex-direction:column;gap:7px;align-items:stretch}
.d-asset-inspector .select{width:100%;max-width:none;min-width:0;min-height:40px}
.d-stage-storyboard .d-board{grid-template-rows:auto;gap:24px}
.d-stage-storyboard .d-preview-head{margin-bottom:14px}
.d-stage-storyboard .d-preview-head strong{font-size:18px;line-height:1.5}
.d-stage-storyboard .d-preview-head .d-code{padding:6px 9px;border-radius:7px;background:var(--soft);font-size:13px}
.d-stage-storyboard .d-preview-screen{border-radius:12px}
.d-stage-storyboard .d-preview-screen.d-preview-portrait{width:min(100%,288px)}
.d-stage-storyboard .d-shot-outline{padding:18px 20px 8px;border:1px solid var(--line);border-radius:20px;background:color-mix(in srgb,var(--surface) 78%,var(--surface-2))}
.d-stage-storyboard .d-section-top h2,.d-stage-storyboard .d-prompt-title h2{font-size:19px;font-weight:650}
.d-shot-outline-list>li{padding:16px 0}
.d-shot-meta{gap:10px;margin-bottom:9px;font-size:13px}
.d-shot-meta>span:first-child{display:grid;place-items:center;width:28px;height:28px;border-radius:7px;background:var(--soft);color:var(--accent);font-variant-numeric:tabular-nums}
.d-shot-meta>strong{font-size:14px}
.d-shot-outline-list p{font-size:15px;line-height:1.85}
.d-shot-outline-list .d-shot-dialogue{margin-top:8px;padding-left:12px;border-left:2px solid color-mix(in srgb,var(--accent) 25%,var(--line));font-size:14px}
.d-stage-storyboard .d-reference-column{padding-top:4px;border-top:0;gap:0 18px}
.d-stage-storyboard .d-ref-section h3{font-size:13px;font-weight:500;margin-bottom:10px}
.d-stage-storyboard .d-reference-card{width:124px;flex-basis:124px;padding:7px;border-radius:11px;background:var(--surface);box-shadow:0 3px 10px color-mix(in srgb,var(--text) 3%,transparent)}
.d-stage-storyboard .d-reference-tile>div{border-radius:7px}
.d-stage-storyboard .d-reference-tile strong{font-size:14px;margin-top:8px;padding:0 2px}
.d-reference-card-tools{gap:6px;margin-top:9px}
.d-reference-card-tools>.button{flex:0 0 36px;width:36px;min-width:36px;height:36px;min-height:36px;border-radius:50%}
.d-stage-storyboard .d-full-prompt{height:300px;min-height:240px;padding:20px 22px;font-size:16px;line-height:1.9;border-radius:16px;box-shadow:0 3px 12px color-mix(in srgb,var(--text) 3%,transparent)}
.d-stage-storyboard .d-full-prompt:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 10%,transparent)}
.d-prompt-reference-tools{gap:12px;margin-top:12px}
.d-prompt-reference-tools>span{font-size:13px}
.d-stage-storyboard .d-generation-console{padding:18px;margin-top:20px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,color-mix(in srgb,var(--soft) 48%,var(--surface)),var(--surface))}
.d-stage-storyboard .d-generation-console .d-console-options{grid-template-columns:minmax(0,1.65fr) minmax(0,.75fr) minmax(0,.85fr);gap:12px}
.d-stage-storyboard .d-optimization-control{margin-top:16px;gap:9px}
.d-stage-storyboard .d-generate-row{margin-top:16px;padding-top:16px;border-top:0}
.d-stage-storyboard .d-generate-row>.button{min-height:44px;padding:10px 20px;border-radius:999px}
.d-story-grid{padding:18px;margin-top:18px;border:1px solid var(--line);border-radius:20px;background:color-mix(in srgb,var(--surface) 62%,var(--surface-2))}
.d-story-grid h3{font-size:15px}
.d-story-grid-image{width:240px;border-radius:8px;margin-top:16px}
.d-stage-storyboard .d-timeline,.d-export-layout .d-timeline{padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface);margin-top:26px}
.d-stage-storyboard .d-group-thumb>div,.d-export-layout .d-group-thumb>div{border-radius:8px;height:80px}
.d-stage-storyboard .d-group-thumb strong,.d-export-layout .d-group-thumb strong{font-size:14px;font-weight:600;line-height:1.7}
.d-stage-storyboard .d-group-thumb>small,.d-export-layout .d-group-thumb>small{font-size:13px;line-height:1.7}
.d-stage-storyboard .d-board-bottom{padding-top:4px;font-size:14px}
.d-export-layout{grid-template-columns:minmax(0,1fr) 300px;gap:28px;align-items:start}
.d-final-screen{border-radius:12px;background:#000;min-height:0}
.d-final-screen:has(video){aspect-ratio:auto;min-height:0}
.d-final-screen>video{position:relative;inset:auto;width:100%;height:auto;max-height:660px;background:#000;object-fit:contain}
.d-final-screen .d-media-empty{aspect-ratio:16/9;background:#000;font-size:14px;color:#9b9b9b}
.d-export-console{padding:22px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.d-export-console>h2{font-size:20px;font-weight:650;margin:0 0 18px}
.d-export-facts>div{font-size:14px;line-height:1.6;padding:14px 0}
.d-export-facts strong{font-weight:600;font-variant-numeric:tabular-nums}
.d-film-selection,.d-warning{font-size:14px;line-height:1.8}
@media(max-width:1180px){
  .d-assets-layout{grid-template-columns:minmax(0,1fr) 280px;gap:20px}
}
@media(max-width:1100px){
  .d-stage-storyboard .d-board{grid-template-rows:auto;gap:24px}
}
@media(max-width:760px){
  .d-header .page-title,.d-stage-content>.d-header .page-title{font-size:24px}
  .d-stage-content>.d-header{margin:18px 0 22px}
  .d-stepnav button{min-height:44px;padding:9px 10px;border-radius:999px;}
  .d-rail-episode{border-radius:16px}
  .d-project-grid{gap:20px}.d-project-body{padding:20px}.d-project-body h2{font-size:19px}
  .d-assets-layout,.d-export-layout{grid-template-columns:minmax(0,1fr);gap:24px}
  .d-asset-grid{gap:12px}.d-stage-content .d-asset-card>div:last-child{padding:14px}
  .d-asset-card strong{font-size:16px}.d-asset-card p{font-size:13px}
  .d-asset-tile>.button{margin:0 12px 14px;min-height:44px;font-size:13px}
  .d-asset-inspector{padding:18px}.d-asset-inspector .input,.d-asset-inspector .textarea,.d-asset-inspector .select{font-size:16px}
  .d-stage-storyboard .d-preview-screen.d-preview-portrait{width:min(100%,240px)}
  .d-stage-storyboard .d-shot-outline{padding:16px 16px 4px}
  .d-stage-storyboard .d-reference-column{padding-top:0}
  .d-stage-storyboard .d-reference-column{column-gap:12px}
  .d-stage-storyboard .d-reference-card{width:110px;flex-basis:110px}
  .d-reference-card-tools>.button{flex-basis:44px;width:44px;min-width:44px;height:44px;min-height:44px;border-radius:50%}
  .d-stage-storyboard .d-full-prompt{height:300px;min-height:240px;padding:16px}
  .d-stage-storyboard .d-generation-console{padding:16px}
  .d-stage-storyboard .d-generation-console .d-console-options{grid-template-columns:repeat(2,minmax(0,1fr))}
  .d-stage-storyboard .d-generate-row{gap:12px}.d-stage-storyboard .d-generate-row>.button{padding:10px 14px;border-radius:999px;}
  .d-story-grid{padding:16px}.d-story-grid-image{width:240px}
  .d-stage-storyboard .d-timeline,.d-export-layout .d-timeline{padding:16px;margin-top:24px}
  .d-export-layout .d-timeline-heading{gap:12px;flex-wrap:wrap}
  .d-export-layout .d-transport .button{min-width:44px;min-height:44px}
  .d-export-console{padding:20px}
  .d-header:has(.d-export-actions)>div:first-child{flex-basis:100%}.d-header:has(.d-export-actions)>.toolbar{width:100%}
}

/* Quiet production hierarchy: source, available media, then the next action. */
.d-overview-layout{grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:36px}
.d-metrics{gap:0;padding:24px 0;margin:18px 0}
.d-metrics strong{font-family:inherit;font-variant-numeric:tabular-nums;font-size:36px;font-weight:600;line-height:1.15}
.d-metrics>div{padding:0 18px;min-width:0}.d-metrics span{font-size:13px}
.d-production-summary{display:flex;align-items:center;gap:24px;padding:0 0 26px;border-bottom:1px solid var(--line)}
.d-production-summary>div{display:flex;align-items:baseline;gap:16px;flex-shrink:0;font-size:13px;color:var(--muted)}
.d-production-summary strong{font-size:22px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums}
.d-production-summary strong small{font-size:13px;color:var(--muted);font-weight:400}
.d-production-summary progress{display:block;flex:1;width:100%;height:5px;min-width:30px;appearance:none;border:0;border-radius:999px;overflow:hidden;background:var(--surface-2);color:var(--text)}
.d-production-summary progress::-webkit-progress-bar{background:var(--surface-2);border-radius:999px}
.d-production-summary progress::-webkit-progress-value{background:var(--text);border-radius:999px}
.d-production-summary progress::-moz-progress-bar{background:var(--text);border-radius:999px}
.d-production-summary>.muted{font-size:13px}
.d-current-heading{margin:28px 0 6px}.d-current-heading>span{font-size:12px;color:var(--muted)}
.d-current-heading .d-current-label{font-size:21px;font-weight:600;line-height:1.55;margin:6px 0 0;overflow-wrap:anywhere}
.d-stage-list>button{gap:12px;padding:21px 0;transition:background .15s}
.d-stage-number{flex:0 0 34px;width:auto;font-family:inherit;font-size:14px;font-variant-numeric:tabular-nums;opacity:1;color:var(--muted)}
.d-stage-copy{min-width:0;flex:1}.d-stage-list strong{font-size:16px;font-weight:600;margin-bottom:5px}.d-stage-list small{font-size:13px;line-height:1.7}
.d-stage-status{display:flex;align-items:center;gap:14px;line-height:1.6;font-size:13px;text-align:right;max-width:42%;flex-shrink:0;color:var(--muted)}
.d-stage-status>span{font-size:19px;color:var(--text)}
.d-overview-layout .d-settings{padding:24px 0 0;gap:20px;border-top:1px solid var(--line)}
.d-settings h2{font-size:18px;font-weight:600}.d-settings .d-select-field{gap:12px;flex-wrap:wrap}.d-settings .d-select-field>span{font-size:13px}.d-settings .select{font-size:14px;max-width:100%}
.d-project-body h2 button{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;width:100%;overflow-wrap:anywhere}
.d-project-cover:focus-visible,.d-project-body h2 button:focus-visible,.d-stage-list>button:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
.d-project-grid>.qj-loading{grid-column:1/-1}.d-project-grid>.d-empty{padding:44px 24px;min-height:280px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0}
.d-empty>p{font-size:14px;line-height:1.85;max-width:460px;overflow-wrap:anywhere}.d-load-error .d-empty-orbit{background:var(--surface-2);color:var(--muted)}
.d-empty>.toolbar{justify-content:center;flex-wrap:wrap}
.d-candidate-bar{padding:15px 0;gap:14px;border-top:1px solid var(--line);background:transparent}
.d-candidate-copy{display:grid;gap:5px;flex:1;min-width:200px}.d-candidate-copy strong{font-size:14px;font-weight:600;line-height:1.65}.d-candidate-copy small{font-size:12px;color:var(--muted);line-height:1.75}
.d-candidate-bar[data-status=UNKNOWN] .d-candidate-copy strong{color:var(--warning)}
.d-video-placeholder>small{max-width:280px;padding:0 18px;font-size:12px;line-height:1.85;color:#a8a8a8;text-align:center}
.d-preview-head>strong{flex:1;min-width:60px}.d-preview-head>[data-d-job-target]{margin-left:auto;max-width:100%}
.d-preview-head .error{font-size:12px;line-height:1.75;overflow-wrap:anywhere;margin:5px 0 0}
.d-script-paper>.d-section-top{gap:12px;flex-wrap:wrap}.d-script-paper>.d-section-top .toolbar{gap:8px;flex-wrap:wrap}.d-script-paper .d-script-editor{font-size:16px;line-height:2;max-width:76ch;margin-inline:auto;display:block}
.d-asset-toolbar{gap:14px}.d-asset-toolbar>.toolbar{gap:10px;flex-wrap:wrap}.d-asset-toolbar>.toolbar>span{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.d-batch-status>strong{font-size:14px}.d-batch-status>span{font-size:13px;font-variant-numeric:tabular-nums}.d-batch-status .toolbar{margin-left:auto;gap:8px}
@media(max-width:1000px){.d-overview-layout{grid-template-columns:minmax(0,1fr);gap:30px}.d-overview-layout .d-settings{max-width:650px}.d-settings .d-select-field .select{width:65%}}
@media(max-width:760px){
  .d-stepnav{gap:4px}.d-stepnav button{padding-inline:8px}
  .d-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 0}.d-metrics>div{padding:0 18px}.d-metrics>div:nth-child(odd){padding-left:0}.d-metrics>div:nth-child(even){border-right:0}.d-metrics strong{font-size:32px}
  .d-production-summary{gap:16px;flex-wrap:wrap}.d-production-summary progress{flex-basis:100%}.d-current-heading .d-current-label{font-size:20px}
  .d-stage-list>button{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:10px}.d-stage-number{font-size:12px}.d-stage-status{max-width:none;font-size:12px;gap:8px}.d-stage-list small{font-size:12px}
  .d-stage-copy small{display:block;max-width:24ch}.d-project-grid>.d-empty{padding:36px 18px}.d-candidate-copy{min-width:0;flex-basis:100%}.d-candidate-bar>.toolbar{margin-left:0}
  .d-script-paper .d-script-editor{font-size:16px;line-height:1.95}.d-batch-status .toolbar{margin-left:0;width:100%;flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){.d-stage-list>button{transition:none}}

/* Director hierarchy: one stage, one episode heading and a single primary action. */
.d-stage-content{--d-edge:color-mix(in srgb,var(--text) 14%,var(--line))}
.d-stage-content .d-worknav{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;padding:0 0 16px;border-bottom:1px solid var(--line)}
.d-stage-content .d-stepnav{display:flex;width:auto;min-width:0;margin:0;padding:0;gap:5px;border:0;border-radius:0;background:transparent;box-shadow:none;justify-content:flex-start}
.d-stage-content .d-stepnav button{flex:none;min-height:44px;padding:10px 18px;gap:0;font-size:14px;border:0;background:transparent;color:var(--muted);box-shadow:none}
.d-stage-content .d-stepnav button.active,.d-stage-content .d-stepnav button.active:hover:enabled{background:var(--text);color:var(--bg);box-shadow:none}
.d-stage-content .d-sync-status{margin:0;font-size:12px}
.d-stage-content>.d-header{padding:6px 0 0;margin:0 0 28px}
.d-stage-content>.d-header .page-title{font-size:25px;line-height:1.5;font-weight:600;letter-spacing:-.03em}
.d-stage-content .button{min-height:44px}
.d-stage-content :is(button,summary,a.button,input,select,textarea):focus-visible{outline:2px solid var(--text);outline-offset:3px}
.d-stage-content .d-state-orbit{animation:none}
.d-episode-workspace>.d-episode-rail .d-rail-episode.active{background:var(--soft);border-color:transparent;box-shadow:inset 3px 0 var(--text)}
.d-episode-workspace>.d-episode-rail .d-rail-head{min-height:44px;margin-bottom:12px}
.d-episode-workspace>.d-episode-rail .d-rail-head strong{font-size:14px}
.d-episode-workspace>.d-episode-rail .d-rail-head .button{width:44px;height:44px;min-height:44px;box-shadow:none}
.d-stage-storyboard .d-storyboard-actions .d-actions-menu>summary{display:flex;align-items:center;justify-content:center;gap:7px;min-width:44px;width:auto;padding:0 14px;min-height:44px;border:1px solid var(--line);border-radius:999px;background:var(--surface);box-shadow:none;color:var(--text);font-size:13px}
.d-stage-content .d-actions-list{max-height:min(660px,70dvh);overflow-y:auto;border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 40px #0002;padding:9px;background:var(--surface)}
.d-stage-content .d-actions-list>.button{width:100%;justify-content:flex-start;text-align:left;min-height:44px;box-shadow:none;background:transparent;border:0;border-radius:8px}
.d-stage-content .d-actions-list>.button:hover:enabled{background:var(--soft)}
.d-menu-label{padding:13px 12px 5px;font-size:11px;font-weight:500;color:var(--muted)}
.d-stage-content .d-menu-setting{padding:13px 12px 8px}
.d-stage-content .d-menu-setting .d-split-mode .button{min-height:44px}
.d-stage-storyboard .d-preview-column{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.d-stage-storyboard .d-preview-head{gap:10px;min-height:38px;margin-bottom:14px;flex-wrap:wrap}
.d-stage-storyboard .d-preview-head strong{font-size:16px;font-weight:550}
.d-stage-storyboard .d-preview-head .d-job-status[data-status=idle]{display:none}
.d-stage-content .d-code,.d-stage-storyboard .d-preview-head .d-code{display:inline-flex;align-items:center;min-width:0;min-height:0;padding:4px 0;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--muted);font-size:12px;font-weight:500;letter-spacing:.04em}
.d-stage-storyboard .d-preview-screen{border:1px solid #242424;border-radius:12px;box-shadow:0 5px 16px #00000012;background:#000}
.d-stage-storyboard .d-preview-screen.d-preview-portrait{margin-inline:auto}
.d-stage-content .d-preview-controls{gap:8px;margin-top:14px}
.d-stage-storyboard .d-transport .button{min-width:44px;min-height:44px}
.d-stage-content .d-asset-tile,.d-stage-content .d-asset-card{border:0;border-radius:0;background:transparent;box-shadow:none}
.d-stage-content .d-asset-tile{padding:0}
.d-stage-content .d-asset-image{border:1px solid var(--line);border-radius:12px;overflow:hidden;box-shadow:none}
.d-stage-content .d-asset-tile.active .d-asset-image{border-color:var(--text);box-shadow:inset 0 0 0 1px var(--text)}
.d-stage-content .d-asset-card>div:last-child{padding:18px 0 12px}
.d-stage-content .d-asset-card strong{font-size:18px;line-height:1.5;font-weight:600}
.d-stage-content .d-asset-card p{margin:8px 0 0;font-size:14px;line-height:1.85}
.d-stage-content .d-asset-tile>.button{margin:0;align-self:flex-start}
.d-stage-content .d-asset-inspector{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;padding:22px 0 0}
.d-stage-storyboard .d-shot-outline{border:0;border-radius:0;background:transparent;box-shadow:none;padding:0}
.d-stage-storyboard .d-section-top h2,.d-stage-storyboard .d-prompt-title h2{font-size:16px;font-weight:600}
.d-stage-storyboard .d-shot-outline-list>li{padding:18px 0;border-top:1px solid var(--line);border-bottom:0}
.d-stage-storyboard .d-shot-outline-list>li:before{content:none}
.d-stage-storyboard .d-shot-meta>span:first-child{width:auto;height:auto;padding:0;border:0;border-radius:0;font-size:12px;background:transparent;box-shadow:none;color:var(--muted)}
.d-stage-storyboard .d-full-prompt{height:280px;min-height:240px;padding:18px 20px;border-color:var(--line);border-radius:14px;background:var(--surface);box-shadow:inset 0 1px 3px #00000007}
.d-stage-storyboard .d-generation-console{border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;padding:20px 0 0;margin-top:20px}
.d-stage-storyboard .d-generation-console .select{min-height:44px;border-color:var(--line);box-shadow:none;background:var(--surface)}
.d-stage-storyboard .d-generation-console .d-generate-row{padding:0;margin-top:18px;border:0;justify-content:flex-end}
.d-stage-storyboard .d-generate-row>.button{min-height:44px;box-shadow:none}
.d-stage-storyboard .d-reference-card{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.d-stage-storyboard .d-reference-column>.d-section-top{padding:0;border:0;margin-bottom:10px}
.d-stage-storyboard .d-reference-column>.d-reference-empty{flex:0 0 100%;margin:0 0 10px;padding:0;border:0;background:transparent;box-sizing:border-box;font-size:13px;line-height:1.8;color:var(--muted)}
.d-mention-picker .d-mention-empty{grid-column:1/-1;margin:0;padding:10px 12px;font-size:13px;line-height:1.8;color:var(--muted)}
.d-stage-storyboard .d-reference-notes{border-top:1px solid var(--line);padding-top:3px}
.d-stage-storyboard .d-ref-section h3{padding:0;border:0;color:var(--muted)}
.d-stage-storyboard .d-reference-card .d-reference-tile>div{border-radius:10px;border:1px solid var(--line);box-shadow:none}
.d-stage-storyboard .d-reference-card .d-reference-tile.selected>div{border-color:var(--text);box-shadow:0 0 0 2px var(--surface),0 0 0 3px var(--text)}
.d-stage-storyboard .d-reference-card-tools>.button{width:44px;min-width:44px;height:44px;min-height:44px;flex-basis:44px}
.d-stage-storyboard .d-timeline,.d-export-layout .d-timeline{border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;background:transparent;padding:22px 0 0;margin-top:30px}
.d-stage-storyboard .d-group-thumb>div,.d-export-layout .d-group-thumb>div{border:1px solid #242424;border-radius:8px;box-shadow:none}
.d-timeline .d-sequence-scale:has(>.d-group-strip>.d-group-cell:only-child){width:min(100%,240px);min-width:0}
.d-sequence-scale .d-group-cell:only-child .d-group-thumb{display:block;padding:0;border:0;text-align:left}
.d-sequence-scale .d-group-cell:only-child .d-group-thumb>div{width:100%;height:auto;aspect-ratio:16/9;margin:0 0 9px}
.d-sequence-scale .d-group-cell:only-child .d-group-thumb>strong,.d-sequence-scale .d-group-cell:only-child .d-group-thumb>small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.d-timeline .d-group-check{box-sizing:border-box;top:0;left:0;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.d-timeline .d-group-check input{appearance:auto;box-shadow:none}
.d-timeline .d-group-check input:focus-visible{outline:2px solid var(--text);outline-offset:3px}
.d-timeline .d-group-cell:has(input:checked) .d-group-thumb>div{box-shadow:none}
.d-episode-workspace .d-rail-episode{display:flex;align-items:center;min-height:44px;padding:10px 12px}
@media(max-width:760px){.d-episode-workspace .d-rail-episode{flex:0 0 auto;min-width:80px}}
.d-stage-content .d-time-track{border:1px solid var(--line);border-radius:8px;background:var(--surface-2);box-shadow:none;overflow:visible}
.d-stage-content .d-time-block{background:transparent}
.d-stage-content .d-time-block.active{background:var(--soft);box-shadow:inset 0 2px var(--text)}
.d-export-layout{grid-template-columns:minmax(0,1fr) 270px;gap:34px}
.d-stage-content .d-final-screen{border-radius:12px;border:1px solid #242424;box-shadow:0 5px 16px #00000012}
.d-stage-content .d-export-console{border:0;border-radius:0;box-shadow:none;background:transparent;padding:0}
.d-export-console>h2{font-size:16px;line-height:1.5;margin-bottom:14px}
.d-stage-content .d-export-facts>div{display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding:19px 0;font-size:13px;border-bottom-color:var(--line)}
.d-stage-content .d-export-facts strong{font-size:24px;font-weight:600;line-height:1.35;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--text)}
.d-export-facts span{color:var(--muted)}
.d-export-console .d-film-selection{margin-top:16px;font-size:13px;color:var(--muted)}
@media(max-width:760px){
  .d-stage-content .d-worknav{gap:8px;padding:0 0 12px}
  .d-stage-content .d-worknav>.d-stepnav{grid-column:1/-1;grid-row:1;padding:0;gap:0;justify-content:space-between}
  .d-stage-content .d-stepnav button{flex:1;min-height:44px;padding:9px 6px;font-size:13px}
  .d-stage-content .d-worknav>.d-sync-status{grid-row:2;grid-column:2;font-size:11px;justify-self:end}
  .d-stage-content>.d-header{margin-bottom:22px;gap:12px;flex-wrap:nowrap}
  .d-stage-content>.d-header>div:first-child{min-width:0}
  .d-stage-content>.d-header .page-title{font-size:21px;line-height:1.5}
  .d-stage-storyboard .d-storyboard-actions{flex:none}
  .d-stage-storyboard .d-actions-list{width:min(300px,calc(100vw - 48px));max-height:min(480px,50dvh)}
  .d-episode-workspace>.d-episode-rail .d-rail-episode.active{box-shadow:inset 0 -2px var(--text)}
  .d-episode-workspace>.d-episode-rail .d-rail-head{min-height:44px;margin-bottom:8px}
  .d-stage-storyboard .d-full-prompt{height:260px;padding:16px}
  .d-stage-storyboard .d-preview-head strong{font-size:15px}
  .d-stage-content .d-asset-grid{gap:24px 14px}
  .d-stage-content .d-asset-card>div:last-child{padding:14px 0 12px}
  .d-stage-content .d-asset-card strong{font-size:16px}
  .d-stage-content .d-asset-card p{font-size:13px}
  .d-stage-content .d-asset-tile>.button{font-size:12px;padding-inline:10px}
  .d-stage-content .d-asset-inspector{padding-top:20px}
  .d-stage-storyboard .d-generation-console{padding:16px 0 0}
  .d-stage-storyboard .d-preview-controls .button,.d-stage-storyboard .d-transport .button{min-width:44px;min-height:44px}
  .d-export-layout{grid-template-columns:minmax(0,1fr);gap:28px}
  .d-stage-content .d-export-facts>div{flex-direction:row;align-items:baseline;justify-content:space-between}
}

/* The three editing panes share one row and keep their natural reading order. */
.d-stage-storyboard :is(.d-pane-title,.d-prompt-title,.d-reference-column>.d-section-top){display:flex;align-items:center;min-height:44px;margin:0 0 14px;gap:12px}
.d-stage-storyboard .d-pane-title h2{margin:0;font-size:16px;font-weight:600;line-height:1.5}
.d-stage-storyboard .d-preview-column{display:flex;flex-direction:column}
.d-stage-storyboard .d-preview-column>.d-pane-title{order:-2}
.d-stage-storyboard .d-preview-screen{order:-1;box-sizing:border-box}
.d-stage-storyboard .d-preview-head{min-height:0;margin:12px 0 0}
.d-stage-storyboard .d-preview-controls .button{min-height:44px;min-width:44px}
.d-stage-storyboard .d-prompt-title{padding:0;border:0}
.d-stage-storyboard .d-full-prompt{height:260px;min-height:230px;border-radius:12px;box-shadow:none}
.d-stage-storyboard .d-reference-column{display:block;box-sizing:border-box;padding:0 0 0 16px;border:0;border-left:1px solid var(--line);max-height:430px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-gutter:stable}
.d-stage-storyboard .d-reference-column>.d-section-top{position:sticky;top:0;z-index:1;background:var(--bg);justify-content:space-between;flex-wrap:wrap}
.d-stage-storyboard .d-reference-column>.d-section-top>span{font-size:11px;color:var(--muted);white-space:nowrap}
.d-stage-storyboard .d-reference-column .d-reference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 8px;padding:3px;margin-bottom:10px}
.d-stage-storyboard .d-reference-grid:empty{display:none}
.d-stage-storyboard .d-reference-card{position:relative;width:auto;min-width:0}
.d-stage-storyboard .d-reference-card:has(.d-actions-menu[open]){z-index:3}
.d-stage-storyboard .d-reference-tile{position:relative;display:block;width:100%;border-radius:10px}
.d-stage-storyboard .d-reference-tile strong{position:absolute;inset:auto 1px 1px;display:block;margin:0;padding:5px 6px;border-radius:0 0 9px 9px;background:#171719e8;color:#fff;font-size:12px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d-stage-storyboard .d-reference-tile i{inset:4px auto auto 4px;width:20px;height:20px}
.d-stage-storyboard .d-reference-index{top:4px;left:4px;z-index:1}
.d-stage-storyboard .d-reference-tile.selected i{display:none}
.d-stage-storyboard .d-reference-card-tools{position:absolute;top:1px;left:1px;right:1px;display:block;margin:0;pointer-events:none}
.d-stage-storyboard .d-reference-card-tools .d-actions-menu>summary{box-sizing:border-box;width:44px;height:44px;min-height:44px;margin-left:auto;border:0;border-radius:0 9px 0 9px;background:transparent;color:#fff;text-shadow:0 1px 3px #000;pointer-events:auto}
.d-stage-storyboard .d-reference-card-tools .d-actions-menu>summary svg{padding:3px;border-radius:50%;background:#171719b8}
.d-stage-storyboard .d-reference-card-tools .d-actions-list{box-sizing:border-box;top:40px;right:-1px;width:190px;padding:6px;border-radius:10px;pointer-events:auto}
.d-stage-storyboard .d-reference-card:nth-child(3n+1) .d-actions-list{left:-1px;right:auto}
.d-stage-storyboard .d-reference-card:nth-child(3n+2) .d-actions-list{left:50%;right:auto;transform:translateX(-50%)}
.d-stage-storyboard .d-reference-card-tools .d-actions-list>.button{min-height:44px;font-size:12px}
@media(min-width:651px) and (hover:hover) and (pointer:fine){
  .d-stage-storyboard .d-reference-card-tools .d-actions-menu>summary{opacity:0}
  .d-stage-storyboard .d-reference-card:hover .d-actions-menu>summary,.d-stage-storyboard .d-reference-card:focus-within .d-actions-menu>summary,.d-stage-storyboard .d-reference-card .d-actions-menu[open]>summary{opacity:1}
}
.d-stage-storyboard .d-generation-bar{display:flex;align-items:flex-end;gap:18px;flex-wrap:wrap;margin-top:24px;padding:18px 0 0}
.d-stage-storyboard .d-generation-bar .d-console-options{flex:1 1 460px;display:grid;grid-template-columns:minmax(170px,1.6fr) repeat(2,minmax(110px,1fr));gap:14px}
.d-stage-storyboard .d-generation-bar .d-console-options>.d-select-field:first-child{grid-column:auto}
.d-stage-storyboard .d-generation-bar .d-optimization-control{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:0;max-width:100%}
.d-stage-storyboard .d-generation-bar .d-optimization-control>.d-select-field:first-child{min-height:44px;gap:8px;flex-direction:row;align-items:center;cursor:pointer}
.d-stage-storyboard .d-generation-bar .d-optimization-control>.d-select-field:has(select){flex:1 1 160px;max-width:240px}
.d-stage-storyboard .d-generation-bar .d-optimization-control .ws-meta{flex-basis:100%;font-size:12px}
.d-stage-storyboard .d-generation-bar .d-generate-row{flex:0 0 auto;padding:0;margin:0;min-height:44px}
.d-stage-storyboard .d-generation-bar .d-generate-row>.button{width:auto;min-width:160px;justify-content:center;border-radius:12px}
@media(min-width:1000px){.d-stage-storyboard .d-board{grid-template-areas:'preview prompt refs';grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(240px,.82fr);gap:20px}}
@media(max-width:1099px) and (min-width:1000px){.d-stage-storyboard .d-reference-column{padding-left:12px}}
@media(max-width:999px){
  .d-stage-storyboard .d-reference-column{padding:20px 0 0;border-left:0;border-top:1px solid var(--line);max-height:none;overflow:visible;scrollbar-gutter:auto}
  .d-stage-storyboard .d-reference-column>.d-section-top{position:static}
  .d-stage-storyboard .d-reference-column .d-reference-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:650px){
  .d-stage-storyboard .d-generation-bar{gap:14px}
  .d-stage-storyboard .d-generation-bar .d-console-options{flex-basis:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
  .d-stage-storyboard .d-generation-bar .d-console-options>.d-select-field:first-child{grid-column:1/-1}
  .d-stage-storyboard .d-generation-bar .d-optimization-control{flex:1 1 100%}
  .d-stage-storyboard .d-generation-bar .d-generate-row,.d-stage-storyboard .d-generation-bar .d-generate-row>.button{width:100%}
}

/* Each editor owns the remaining viewport; long episode lists never move the page. */
.page-content:has(>.d-episode-workspace){max-width:none;padding-bottom:12px}
.d-episode-workspace{height:var(--d-workspace-height,calc(100dvh - 132px));min-height:180px;grid-template-columns:132px minmax(0,1fr);gap:18px;overflow:hidden}
.d-episode-workspace>.d-episode-rail{height:100%;min-height:0;padding-top:0;overflow:hidden}
.d-episode-workspace .d-rail-head{flex:0 0 auto;gap:2px;flex-wrap:wrap;margin-bottom:8px}
.d-episode-workspace .d-rail-head>strong{flex:1;font-size:13px}
.d-episode-workspace .d-rail-head{justify-content:space-between}
.d-episode-workspace .d-rail-head>strong{display:none}
.d-episode-workspace .d-rail-head>.button{padding:0;width:44px;min-width:44px;height:44px;min-height:44px}
.d-episode-workspace .d-rail-items{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.d-episode-workspace>.d-stage-content{height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable;padding:0 8px 12px 0}
.d-episode-workspace .d-stage-content>.d-header{margin:0 0 18px;padding-top:4px}
.d-episode-workspace .d-worknav{margin-bottom:12px}
.d-episode-workspace.d-rail-collapsed{grid-template-columns:44px minmax(0,1fr);gap:12px}
.d-rail-collapsed>.d-episode-rail{padding-right:0;border-right:0}
.d-rail-collapsed .d-rail-head>strong,.d-rail-collapsed .d-rail-head>[data-action="director:addEpisode"],.d-rail-collapsed .d-rail-items{display:none}
.d-episode-workspace>.d-stage-script{display:flex;flex-direction:column;overflow:hidden}
.d-stage-script>.d-worknav,.d-stage-script>.d-header,.d-stage-script>[data-d-batches],.d-stage-script>[data-d-workflow-status]{flex:0 0 auto}
.d-stage-script .d-script-upload-workspace{display:flex;flex:1;min-height:0;gap:8px;flex-direction:column;width:100%;max-width:none;margin:0}
.d-stage-script .d-script-paper{display:flex;flex:1;flex-direction:column;min-height:0;width:100%;max-width:none;margin:0;padding:0 16px;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}
.d-stage-script .d-script-paper>.d-section-top{flex:0 0 auto;padding:6px 0;margin:0;gap:8px}
.d-stage-script .d-script-paper>.d-section-top>.toolbar{flex-wrap:nowrap}
.d-stage-script .d-script-paper .d-section-top .select{width:160px;min-width:0;flex:0 1 160px}
.d-stage-script .d-script-paper .d-script-editor{display:block;flex:1;width:100%;max-width:none;min-height:100px;height:100%;margin:0;padding:14px 2px;resize:none;overflow:auto;overscroll-behavior:contain;font-size:16px;line-height:1.9}
.d-stage-script .d-script-footer{flex:0 0 auto;padding:8px 0;margin:0;font-size:12px}
.d-stage-script .d-project-notes{flex:0 0 auto;margin:0;max-height:30%;overflow:auto}
.d-stage-script .d-project-notes>summary{min-height:36px;padding:8px 0;font-size:12px}
.d-stage-script .d-manual-script{display:flex;flex:1;min-height:130px;margin:8px 0 0}
.d-stage-script .d-upload-zone{min-height:140px;padding:14px}
.d-stage-script .d-source-note{padding:8px 0;margin-top:0}
.d-workflow-result{padding:14px 16px;border:1px solid var(--line);border-radius:12px;margin:0 0 14px;background:var(--surface);font-size:13px}
.d-workflow-result-head{display:flex;align-items:center;gap:9px;flex-wrap:wrap;min-height:24px}
.d-workflow-result-head strong{font-size:14px;font-weight:600}
.d-workflow-clock{margin-left:auto;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.d-workflow-result p{font-size:13px;line-height:1.7;color:var(--muted);margin:6px 0 0}
.d-film-source-note{margin:12px 0;color:var(--muted);font-size:13px;line-height:1.8}
.d-workflow-result>.button{margin-top:10px}
.d-workflow-spinner{flex:0 0 14px;width:14px;height:14px;border:2px solid var(--line);border-top-color:var(--text);border-radius:50%;animation:d-workflow-turn 1s linear infinite}
.d-workflow-skeleton{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.d-workflow-skeleton span{height:54px;border-radius:8px;background:var(--surface-2);border:1px solid var(--line)}
.d-candidate-copy>strong{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.d-rewrite-preview pre,.d-rewrite-scope-note+.d-candidate-compare pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.8;max-height:45dvh;overflow:auto}
.d-stage-storyboard .d-prompt-title{justify-content:space-between;gap:8px}
.d-stage-storyboard .d-prompt-title>.button{display:inline-flex;width:auto;min-width:44px;min-height:44px;height:auto;padding:8px 10px;font-size:12px;color:var(--text)}
.d-detail-shots>.d-section-top,.d-detail-shots .d-section-top .toolbar{flex-wrap:wrap}
@keyframes d-workflow-turn{to{transform:rotate(360deg)}}
.d-episode-workspace .d-worknav{min-height:46px;padding:0 0 6px;margin-bottom:10px;gap:8px}
.d-episode-workspace .d-stepnav button{min-height:40px;padding:7px 14px}
.d-episode-workspace .d-header{min-height:40px;margin:0 0 10px;padding:0;gap:10px;align-items:center}
.d-episode-workspace .d-header .page-title{font-size:20px;line-height:1.4;margin:0}
.d-episode-workspace .d-header .page-subtitle{font-size:12px;line-height:1.5;margin:2px 0 0}
.d-episode-workspace .d-candidate-bar{margin:0 0 10px;padding:8px 0;gap:8px}
.d-episode-workspace .d-candidate-copy>small{display:none}
.d-stage-script .d-script-paper>.d-section-top{min-height:42px;padding:2px 0;justify-content:flex-end}
.d-stage-script .d-script-paper>.d-section-top>h2{display:none}
.d-stage-script .d-script-paper>.d-section-top .select{height:36px;min-height:36px;padding-block:4px;font-size:13px}
.d-workflow-wait-note{margin:0 0 10px;padding:7px 0;font-size:12px;line-height:1.6;color:var(--muted)}
.d-workflow-wait-note>strong{margin-right:10px;color:var(--text);font-weight:550}
.d-workflow-result{padding:10px 12px;margin-bottom:10px}
.d-workflow-result>p{margin:0}
.d-stage-assets:has(.d-workflow-result.is-running) .d-empty{display:none}
@media(max-width:760px){.d-episode-workspace .d-stepnav button{min-height:44px;padding:7px 10px}.d-stage-script .d-script-paper>.d-section-top .select{min-height:44px}.d-episode-workspace .d-header .page-title{font-size:17px}.d-episode-workspace .d-candidate-bar{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.d-workflow-spinner{animation:none;border-top-width:4px}}
@media(max-width:760px){
  :is(.d-stage-assets,.d-stage-export,.d-stage-overview) .d-header{flex-wrap:wrap}
  :is(.d-stage-assets,.d-stage-export,.d-stage-overview) .d-header>div:first-child{flex:1 1 100%;min-width:0}
  :is(.d-stage-assets,.d-stage-export,.d-stage-overview) .d-header>.toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;gap:6px}
  :is(.d-stage-assets,.d-stage-export,.d-stage-overview) .d-header>.toolbar>.button{max-width:100%;white-space:normal;min-height:44px}
}
@media(max-width:760px){
  .d-episode-workspace{grid-template-columns:98px minmax(0,1fr);gap:10px}
  .d-episode-workspace>.d-episode-rail{display:flex;border:0;border-right:1px solid var(--line);padding:0 6px 0 0}
  .d-episode-workspace .d-rail-head{margin-bottom:4px;flex-wrap:wrap}
  .d-episode-workspace .d-rail-head>strong{order:2;flex:1 1 100%;padding:4px 8px}
  .d-episode-workspace .d-rail-items{flex-direction:column;overflow-x:hidden;overflow-y:auto;padding:0;gap:3px}
  .d-episode-workspace .d-rail-episode{flex:0 0 auto;min-width:0;padding:10px 6px;font-size:12px}
  .d-episode-workspace>.d-episode-rail .d-rail-episode.active{box-shadow:inset 2px 0 var(--text)}
  .d-episode-workspace.d-rail-collapsed{grid-template-columns:44px minmax(0,1fr);gap:8px}
  .d-episode-workspace>.d-stage-content{padding-right:0;scrollbar-gutter:auto}
  .d-stage-script .d-script-paper{padding-inline:10px;border-radius:9px}
  .d-stage-script .d-script-paper>.d-section-top h2{display:none}
  .d-stage-script .d-script-paper>.d-section-top .toolbar{width:100%;gap:4px}
  .d-stage-script .d-script-paper .d-section-top .select{max-width:120px;font-size:12px}
  .d-stage-script .d-script-paper .d-script-editor{font-size:15px;line-height:1.85}
}

/* 主体提取候选：直接出现在“主体”页，确认或替换后才写入本集。 */
.d-subjects-candidate{padding:14px 16px;border:1px solid var(--line);border-radius:12px;margin:0 0 16px;background:var(--surface);font-size:13px}
.d-subjects-candidate[data-status="READY"]{border-color:color-mix(in srgb,var(--accent) 35%,var(--line));background:color-mix(in srgb,var(--accent) 4%,var(--surface))}
.d-subjects-candidate .d-workflow-result-head strong{font-size:15px}
.d-subjects-candidate>p{margin:6px 0 0;color:var(--muted);line-height:1.7}
.d-subjects-candidate .toolbar{margin-top:10px;gap:8px;flex-wrap:wrap}
.d-subject-chips{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 0}
.d-subject-chips .badge{font-size:12px;padding:4px 8px}
.d-subject-more{font-size:12px;color:var(--muted);align-self:center}.d-step-dot{display:inline-block;width:6px;height:6px;margin-left:6px;border-radius:50%;background:var(--accent);vertical-align:middle}
.d-stage-content .d-asset-tile{display:flex;flex-direction:column;gap:10px}
.d-asset-head{display:flex;align-items:center;gap:8px;min-width:0}
.d-asset-head .d-asset-check{position:static;top:auto;left:auto;padding:3px 5px;border:1px solid var(--line);border-radius:6px;background:transparent}
.d-asset-heading{display:flex;align-items:baseline;gap:8px;min-width:0;border:0;background:transparent;padding:2px 0;margin:0;color:inherit;text-align:left;cursor:pointer;font:inherit}
.d-asset-heading strong{font-size:15px;font-weight:600;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.d-asset-heading small{flex:0 0 auto;color:var(--muted);font-size:12px;line-height:1.4}
.d-asset-heading:hover strong{text-decoration:underline;text-underline-offset:3px}
.d-stage-content .d-asset-card>.d-asset-image,.d-stage-content .d-asset-card>div:last-child{padding:0;margin:0}
.d-stage-content .d-asset-card{display:block;width:100%}

.d-work-tools{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.d-work-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.d-work-actions .d-storyboard-actions{display:flex;align-items:center;gap:8px}
.d-selected-count{font-size:12px;color:var(--muted);margin:0 2px}
@media(max-width:760px){.d-work-tools{width:100%;justify-content:flex-end}}
@media(max-width:650px){.d-work-actions{width:100%;justify-content:flex-start}}
@media(max-width:650px){.d-subjects-candidate{padding:12px}.d-subjects-candidate .toolbar>.button{flex:1 1 auto}.d-stage-script .d-script-paper>.d-section-top>.toolbar{flex-wrap:wrap}.d-stage-script .d-script-paper .d-section-top .select{max-width:100%;flex:1 1 120px}}


/* ── 超级导演 · 项目库（2026-10-24）────────────────────────────── */
.d-lib-hero{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,420px);gap:26px;align-items:center;padding:26px 28px;margin:4px 0 22px;border:1px solid var(--line);border-radius:2px;background:linear-gradient(150deg,color-mix(in srgb,var(--accent) 6%,var(--surface)),var(--surface) 58%);overflow:hidden}
.d-lib-hero::after{content:"";position:absolute;right:-60px;top:-70px;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--accent) 14%,transparent),transparent 70%);pointer-events:none}
.d-lib-kicker{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--muted)}
.d-lib-hero h1{margin:12px 0 10px;font-size:clamp(24px,2.3vw,32px);line-height:1.34;letter-spacing:-.03em;font-weight:600}
.d-lib-hero h1 em{font-style:normal;color:var(--accent)}
.d-lib-hero p{margin:0;max-width:56ch;color:var(--muted);font-size:13px;line-height:1.9}
.d-lib-hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.d-lib-hero-actions .button{min-height:40px;font-size:13px}
.d-lib-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:2px;overflow:hidden}
.d-lib-steps li{background:var(--surface);padding:14px 14px 13px;display:flex;flex-direction:column;gap:4px;min-height:78px}
.d-lib-steps li span{font-family:ui-monospace,Consolas,monospace;font-size:10.5px;color:var(--accent);letter-spacing:.08em}
.d-lib-steps li strong{font-size:12.5px;font-weight:600}
.d-lib-steps li small{font-size:11px;color:var(--muted);line-height:1.5}
.d-project-grid .d-project-card{transition:transform .18s ease,border-color .18s ease}
.d-project-grid .d-project-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 38%,var(--line))}
.d-project-grid .d-project-body h2 button:hover{color:var(--accent)}
.d-lib-empty{border:1px dashed var(--line);background:color-mix(in srgb,var(--surface) 66%,transparent);margin-top:6px}
.d-lib-empty-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:4px}
.d-lib-empty-actions .button{min-height:40px}
.d-library-toolbar{display:flex;align-items:center;gap:14px;justify-content:space-between;margin:0 0 14px}
.d-library-toolbar .input{max-width:280px}
@media(max-width:960px){.d-lib-hero{grid-template-columns:minmax(0,1fr);gap:18px;padding:22px 20px}.d-lib-steps{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.d-lib-hero{padding:18px 16px}.d-lib-hero-actions .button{width:100%}.d-lib-steps{grid-template-columns:1fr 1fr}.d-library-toolbar{flex-direction:column;align-items:stretch}.d-library-toolbar .input{max-width:none}}
@media(prefers-reduced-motion:reduce){.d-project-grid .d-project-card{transition:none}}
/* ---------- Agent 对话右栏：经典导演工作区多一栏（Agent Beta） ---------- */
.d-episode-workspace.is-agent{grid-template-columns:132px minmax(0,1fr) var(--d-agent-dock-width,380px);gap:16px}
.d-episode-workspace.is-agent.d-rail-collapsed{grid-template-columns:44px minmax(0,1fr) var(--d-agent-dock-width,380px);gap:12px}
/* 和左栏、中间面板同一套构件：1px 发丝线 + 18px 圆角 + 面板底色，不另造一条分隔线。 */
.d-episode-workspace>.d-agent-dock{height:100%;min-height:0;min-width:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid color-mix(in srgb,var(--line) 82%,transparent);border-radius:18px;background:var(--surface);padding:14px 14px 12px}
.d-agent-dock>.da-shell,.d-agent-dock .da-body--rail{height:100%;min-height:0}
.d-agent-toggle{display:inline-flex;align-items:center;gap:6px}
.d-agent-toggle[aria-pressed="true"]{border-color:color-mix(in srgb,var(--accent) 46%,var(--line));color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}



/* 剧本正文：给它留出版心（原来左右只有 2px，文字贴着卡片边） */
.d-stage-script .d-script-paper { padding: 0 26px; }
.d-stage-script .d-script-paper .d-script-editor {
  padding: 26px 2px 24px;
  font-size: 17px;
  line-height: 2.05;
  letter-spacing: .012em;
  max-width: 42em;
  margin-inline: auto;
  color: var(--text);
}
.d-stage-script .d-script-paper .d-script-editor::placeholder { color: var(--muted); opacity: .7; }
.d-stage-script .d-script-footer {
  width: 100%;
  max-width: 42em;
  margin-inline: auto;
  padding: 6px 2px 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .01em;
}
/* 工作区里不再有 Agent 开关按钮 */
.d-agent-toggle { display: none; }

/* 青底按钮用墨色字（品牌自己的头像卡就是墨字压青底）；白字压在 #58B6C4 上只有 2.2:1，读不清 */
#page .d-stage-content .button.primary,
#page .d-stage-content .button[aria-pressed="true"].secondary,
#page .d-agent-dock .da-button-primary,
#page .d-agent-dock .da-button[data-action="send-chat"],
#page .d-agent-dock .da-suggest .da-button:hover { color: #071A1D; }
#page .d-stage-content .button.primary svg,
#page .d-agent-dock .da-button-primary svg { color: inherit; }
/* 五阶段导航：图标 + 文字，选中态是一枚实心药丸 */
.d-stage-content .d-stepnav button{display:inline-flex;align-items:center;gap:7px}
.d-stage-content .d-stepnav button svg{width:14px;height:14px;flex:none;opacity:.72}
.d-stage-content .d-stepnav button.active svg{opacity:1}
.d-stage-content>.d-header .page-title{font-size:23px;letter-spacing:-.02em}
@media(max-width:1280px){.d-episode-workspace.is-agent{grid-template-columns:110px minmax(0,1fr) 320px}}
@media(max-width:1100px){
  .d-episode-workspace.is-agent,.d-episode-workspace.is-agent.d-rail-collapsed{grid-template-columns:110px minmax(0,1fr)}
  .d-episode-workspace>.d-agent-dock{grid-column:1/-1;height:auto;max-height:62dvh;border-left:0;border-top:1px solid var(--line);padding:12px 0 0}
}
@media(max-width:650px){
  .d-episode-workspace.is-agent,.d-episode-workspace.is-agent.d-rail-collapsed{grid-template-columns:minmax(0,1fr)}
  .d-episode-workspace>.d-agent-dock{max-height:70dvh}
}



/* 分镜检查（用户手动触发，逐组核对） */
.d-check-list{display:flex;flex-direction:column;gap:6px;max-height:320px;overflow:auto;padding:4px 2px}
.d-check-item{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;cursor:pointer}
.d-check-item input{margin-top:3px}
.d-check-item span{display:flex;flex-direction:column;gap:2px;min-width:0}
.d-check-item small{color:var(--muted)}
.d-check-all{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:13px;color:var(--muted)}
.d-check-results{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;max-height:360px;overflow:auto}
.d-check-row-result{display:flex;flex-direction:column;gap:4px;padding:8px 10px;border-radius:8px;background:var(--surface-2, rgba(255,255,255,.03))}
.d-check-row-result.is-changed{border-left:3px solid var(--accent)}
.d-check-row-result.is-error{border-left:3px solid var(--danger, #d9534f)}
.d-check-row-result details ul{margin:4px 0 0 16px;padding:0;font-size:12px;color:var(--muted)}

.d-fixed-row{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.d-fixed-input{width:64px;min-width:64px;padding:4px 6px}
.d-fixed-row > span:not(.d-fixed-row){font-size:12px;color:var(--muted)}
.d-fixed-note{flex-basis:100%;font-size:12px;color:var(--muted);margin-top:2px}

.d-asset-history{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;margin:8px 0 4px}.d-history-thumb{flex:0 0 88px;width:88px;height:56px;padding:0;border:2px solid transparent;border-radius:9px;overflow:hidden;background:var(--surface);cursor:pointer;opacity:.68;transition:opacity .15s ease,border-color .15s ease,transform .15s ease}.d-history-thumb img{width:100%;height:100%;object-fit:cover;display:block}.d-history-thumb:hover{opacity:1;transform:translateY(-1px)}.d-history-thumb.active{opacity:1;border-color:var(--accent)}.d-asset-tile[data-flash] .d-asset-image img{animation:d-switch-in .24s ease-out}@keyframes d-switch-in{from{opacity:.35;transform:scale(1.012)}to{opacity:1;transform:none}}

/* Standalone dw/st/ex layout & mobile touch-target baseline */
.d-sr-select{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0,0,0,0) !important;white-space:nowrap !important;border:0 !important;opacity:0 !important;pointer-events:none !important}
.d-model-picker-wrap{position:relative;display:block;min-width:0;max-width:100%}
.dw{display:flex;flex-direction:column;min-width:0;max-width:100%}
.dw-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;min-width:0}
.dw-stages{display:flex;align-items:center;gap:4px;min-width:0;max-width:100%;overflow-x:auto;scrollbar-width:none}
.dw-body{display:grid;grid-template-columns:220px minmax(0,1fr);min-width:0;max-width:100%;flex:1;min-height:0}
.dw.is-agent .dw-body{grid-template-columns:220px minmax(0,1fr) minmax(320px,var(--d-agent-dock-width,388px))}
.dw.d-rail-collapsed .dw-body{grid-template-columns:minmax(0,1fr)}
.dw.d-rail-collapsed.is-agent .dw-body{grid-template-columns:minmax(0,1fr) minmax(320px,var(--d-agent-dock-width,388px))}
.dw.d-rail-collapsed .dw-eps{display:none}
.dw-main,.dw-eps,.st-card,.st-card-body,.st-col,.st-tl,.st-tl-strip,.ex-stage,.ex-grid,.ex-main,.ex-side{min-width:0;max-width:100%;box-sizing:border-box}
.st-card-body{display:grid;grid-template-columns:minmax(0,1.28fr) minmax(0,1fr);gap:16px}
.st-tl-strip{display:flex;gap:10px;overflow-x:auto}
.st-asset img,.d-reference-tile img{display:block;max-width:100%;height:auto}
@media(max-width:959px){
  .dw-body,.dw.is-agent .dw-body,.dw.d-rail-collapsed .dw-body,.dw.d-rail-collapsed.is-agent .dw-body{grid-template-columns:minmax(0,1fr)}
  .st-card-body,.ex-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:650px){
  .d-episode-workspace.dw{height:auto;overflow-x:hidden}
  .dw-head,.dw-head-id,.dw-head-act,.st-card-head,.st-card-foot,.st-tl-bar{flex-wrap:wrap;max-width:100%}
  #page .d-stage-content .button,#page .d-stage-content .dw-model-trigger{min-height:44px}
}
.d-check-field{cursor:pointer}.d-check-field input[type="checkbox"]{width:16px;height:16px;accent-color:var(--accent);flex:none}
.d-script-inspector .d-select-field{margin-top:8px}.d-script-inspector .dw-pick{max-width:190px}
.d-selfcheck-sec{padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2,rgba(255,255,255,.02));margin-bottom:12px}.d-selfcheck-sec h3{margin:0 0 8px;font-size:14px}.d-selfcheck-sec .toolbar{margin-top:10px}.d-selfcheck-sec ul{margin:6px 0 0 18px;padding:0;font-size:12px;color:var(--muted)}
