.storyboard-actions{align-items:end}
.storyboard-actions .script-topic-picker,.storyboard-actions .script-duration-picker{min-width:150px}
.storyboard-actions select{min-width:120px}
.storyboard-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px 0}
.storyboard-toolbar>div:first-child{display:flex;align-items:baseline;gap:14px;min-width:0}
.storyboard-toolbar strong{font:600 17px var(--display);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.storyboard-toolbar span{font:10px var(--mono);color:var(--muted)}
.storyboard-toolbar-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.storyboard-toolbar-actions button{white-space:nowrap}
.storyboard-mode-switch{display:flex;align-items:center;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:#f1eee8}
.storyboard-mode-switch button{border:0;border-right:1px solid var(--line);background:transparent;color:var(--muted);padding:7px 10px;font:10px var(--mono);cursor:pointer}
.storyboard-mode-switch button:last-child{border-right:0}
.storyboard-mode-switch button.active{background:var(--ink);color:#fff}
.storyboard-import-button{white-space:nowrap}
.storyboard-actions #generateStoryboard[hidden]{display:none!important}
.storyboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.storyboard-card{overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:0 8px 24px rgba(41,36,29,.06)}
.storyboard-card-image{min-height:180px;background:#eef3f5;display:grid;place-items:center;overflow:hidden}
.storyboard-card-image img{display:block;width:auto;max-width:100%;height:auto;max-height:min(900px,75vh);object-fit:contain;background:#eef3f5}
.storyboard-placeholder{display:grid;place-items:center;gap:8px;color:#8f8a7f;font:11px var(--mono)}
.storyboard-placeholder span{font-size:30px;line-height:1}
.storyboard-card-body{padding:15px 16px 17px}
.storyboard-card-heading{display:flex;align-items:center;gap:9px;margin-bottom:12px}
.storyboard-card-heading strong{font:600 16px var(--display)}
.storyboard-card-heading>span{color:var(--muted);font:10px var(--mono)}
.storyboard-card-actions{display:flex;align-items:center;gap:9px;margin-left:auto}
.storyboard-card-actions button{padding:4px 0;white-space:nowrap}
.storyboard-local-import{position:relative;overflow:hidden;cursor:pointer;white-space:nowrap}
.storyboard-local-import input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.storyboard-history-button{color:var(--muted)}
.storyboard-card dl{display:grid;gap:9px;margin:0}
.storyboard-card dl>div{display:grid;grid-template-columns:62px 1fr;gap:10px;align-items:start}
.storyboard-card dt{color:var(--muted);font:10px var(--mono);line-height:1.6}
.storyboard-card dd{margin:0;color:var(--ink);font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.storyboard-empty{min-height:220px;display:grid;place-items:center;align-content:center;gap:9px;border:1px dashed var(--line);color:var(--muted)}
.storyboard-empty span{font-size:30px;color:var(--coral)}
.storyboard-empty strong{font:600 16px var(--display)}
.storyboard-simple-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:12px}
.storyboard-simple-card{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:9px;background:var(--surface);box-shadow:0 5px 16px rgba(41,36,29,.06)}
.storyboard-simple-image{min-height:92px;background:#eef3f5;display:grid;place-items:center;overflow:hidden}
.storyboard-simple-image img{display:block;width:auto;max-width:100%;height:auto;max-height:420px;object-fit:contain;background:#eef3f5}
.storyboard-simple-placeholder{padding:8px;color:#9b968b;font:9px var(--mono);text-align:center}
.storyboard-simple-shot{margin:10px 10px 3px;color:var(--muted);font:9px var(--mono)}
.storyboard-simple-card h3{height:34px;overflow:hidden;margin:0 10px 11px;color:var(--ink);font:600 12px var(--display);line-height:1.4}
.storyboard-revision-modal{position:fixed;z-index:40;inset:0;display:none;place-items:center;padding:24px;background:rgba(41,36,29,.48)}
.storyboard-revision-modal.open{display:grid}
.storyboard-revision-card{width:min(920px,100%);max-height:min(860px,calc(100vh - 48px));overflow:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 24px 70px rgba(41,36,29,.28)}
.storyboard-revision-card .skill-chat-header{position:sticky;top:0;z-index:2;background:var(--surface);border-bottom:1px solid var(--line)}
.storyboard-revision-body{display:grid;grid-template-columns:minmax(280px,1fr) minmax(260px,.8fr);gap:20px;padding:20px}
.storyboard-revision-preview{min-height:220px;overflow:hidden;border-radius:8px;background:#eef3f5;display:grid;place-items:center}
.storyboard-revision-preview img{display:block;width:auto;max-width:100%;height:auto;max-height:min(720px,65vh);object-fit:contain;background:#eef3f5}
.storyboard-revision-empty{color:var(--muted);font:11px var(--mono)}
.storyboard-revision-label{display:grid;gap:8px;color:var(--muted);font:10px var(--mono)}
.storyboard-revision-label textarea{width:100%;min-height:110px;resize:vertical;border:1px solid var(--line);border-radius:7px;background:#fcfaf6;color:var(--ink);padding:10px;font:12px var(--sans);line-height:1.6}
.storyboard-revision-body .primary-button{margin-top:12px}
.storyboard-history-block{border-top:1px solid var(--line);padding:16px 20px 20px}
.storyboard-history-heading{display:flex;align-items:baseline;gap:10px;margin-bottom:12px}
.storyboard-history-heading strong{font:600 15px var(--display)}
.storyboard-history-heading span{color:var(--muted);font:10px var(--mono)}
.storyboard-history-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.storyboard-history-item{min-width:0;color:var(--muted);font:9px var(--mono)}
.storyboard-history-item>div{aspect-ratio:16/9;overflow:hidden;border-radius:5px;background:#e9e4da;margin-bottom:6px}
.storyboard-history-item img{width:100%;height:100%;object-fit:contain;background:#17232a;display:block}
.storyboard-history-item span,.storyboard-history-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.storyboard-history-item small{margin-top:3px;color:var(--ink);font:10px var(--sans)}
.storyboard-history-empty{display:grid;place-items:center;height:100%;min-height:54px;color:#9b968b;font:9px var(--mono)}
@media (max-width:900px){.storyboard-grid{grid-template-columns:1fr}.storyboard-actions{align-items:stretch;flex-wrap:wrap}.storyboard-actions .script-topic-picker,.storyboard-actions .script-duration-picker{flex:1}}
@media (max-width:1200px){.storyboard-simple-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:760px){.storyboard-simple-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.storyboard-revision-body{grid-template-columns:1fr}.storyboard-history-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:620px){.storyboard-toolbar{align-items:flex-start;flex-direction:column}.storyboard-toolbar>div:first-child{display:grid;gap:6px}.storyboard-toolbar-actions{width:100%;justify-content:space-between;flex-wrap:wrap}.storyboard-card-body{padding:13px}.storyboard-card-actions{gap:6px}.storyboard-revision-modal{padding:10px}.storyboard-revision-card{max-height:calc(100vh - 20px)}.storyboard-history-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

.export-modal{position:fixed;z-index:50;inset:0;display:none;place-items:center;padding:24px;background:rgba(41,36,29,.48)}
.export-modal.open{display:grid}
.export-card{width:min(1180px,100%);height:min(850px,calc(100vh - 48px));overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:0 24px 70px rgba(41,36,29,.28);display:flex;flex-direction:column}
.export-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 22px 17px;border-bottom:1px solid var(--line);flex-shrink:0}
.export-header h3{font:600 22px var(--display);margin:0 0 5px}
.export-header p:not(.eyebrow){margin:0;color:var(--muted);font-size:11px}
.export-layout{display:grid;grid-template-columns:300px minmax(0,1fr);min-height:0;flex:1}
.export-controls{padding:20px;display:flex;flex-direction:column;gap:15px;border-right:1px solid var(--line);background:#f7f3ec;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable}
.export-controls label{display:flex;flex-direction:column;gap:7px;font:500 10px var(--mono);color:var(--muted)}
.export-controls [hidden]{display:none!important}
.export-controls select{border:1px solid var(--line);border-radius:6px;background:#fcfaf6;padding:10px;color:var(--ink);font-size:12px}
.export-controls select:disabled{color:#9e988e;background:#eeeae3}
.export-controls input[type=range]{width:100%;accent-color:var(--coral)}
.export-range-value{display:flex;justify-content:space-between;align-items:center;color:var(--ink);font:500 11px var(--sans)}
.export-range-value output{font-family:var(--mono)}
.export-topic-readout{display:grid;gap:5px;margin-top:auto;padding-top:15px;border-top:1px solid var(--line)}
.export-topic-readout span{font:10px var(--mono);color:var(--muted)}
.export-topic-readout strong{font:600 13px var(--display);line-height:1.45}
.export-submit{width:100%;margin-top:1px;position:sticky;bottom:0;z-index:2;box-shadow:0 -10px 18px #f7f3ec;padding-top:11px;padding-bottom:11px}
.export-preview-panel{min-width:0;min-height:0;display:flex;flex-direction:column;padding:20px;background:#eae5dc;overflow:hidden}
.export-preview-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px;flex-shrink:0}
.export-preview-heading h4{font:600 17px var(--display);margin:0}
.export-preview-heading>span{font:10px var(--mono);color:var(--muted)}
.export-preview{min-height:0;flex:1;overflow:auto;padding:28px;background:#fff;box-shadow:0 8px 25px rgba(41,36,29,.1)}
.export-preview[data-orientation=landscape]{padding-inline:18px}
.export-document{color:#252522;font-family:Arial,"Microsoft YaHei",sans-serif;line-height:1.5}
.export-document-title{border-bottom:2px solid #252522;padding-bottom:10px;margin-bottom:14px}
.export-document-title p{margin:0 0 4px;color:#8b8175;font-size:.75em;letter-spacing:.08em}
.export-document-title h2{font-size:1.8em;line-height:1.2;margin:0 0 5px}
.export-document-title span{color:#777;font-size:.78em}
.export-script-document{min-width:760px}
.export-script-document table{width:100%;border-collapse:collapse;table-layout:fixed}
.export-script-document th,.export-script-document td{border:1px solid #cfc8bc;padding:6px;vertical-align:top;overflow-wrap:anywhere}
.export-script-document th{background:#1e2c3a;color:#fff;font-weight:600}
.export-script-document th:nth-child(1){width:5%}.export-script-document th:nth-child(2){width:6%}.export-script-document th:nth-child(3){width:10%}.export-script-document th:nth-child(4){width:7%}.export-script-document th:nth-child(5){width:18%}.export-script-document th:nth-child(6){width:12%}.export-script-document th:nth-child(7){width:19%}.export-script-document th:nth-child(8){width:11%}.export-script-document th:nth-child(9){width:12%}
.export-script-document img{max-width:100%;height:auto}
.export-topic-document{min-width:560px}
.export-topic-document table{width:100%;border-collapse:collapse;table-layout:fixed}
.export-topic-document th,.export-topic-document td{border:1px solid #cfc8bc;padding:10px;vertical-align:top;overflow-wrap:anywhere}
.export-topic-document th{width:22%;background:#1e2c3a;color:#fff;text-align:left;font-weight:600}
.export-topic-document td{white-space:pre-line}
.export-storyboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.export-storyboard-shot{break-inside:avoid;border:1px solid #cfc8bc;padding:9px}
.export-storyboard-image{min-height:90px;background:#f0ece4;display:grid;place-items:center;margin-bottom:8px}
.export-storyboard-image img{max-width:100%;height:auto}
.export-storyboard-copy strong{font-size:.82em;color:#8b8175}
.export-storyboard-copy h3{font-size:1.15em;line-height:1.3;margin:4px 0 7px}
.export-storyboard-copy p{margin:4px 0;font-size:.86em;line-height:1.45}
.export-storyboard-copy b{font-weight:600}
.export-empty{padding:50px;text-align:center;color:#888}
.export-no-image{color:#aaa}
@media (max-width:900px){.export-card{height:min(900px,calc(100vh - 24px))}.export-layout{grid-template-columns:250px minmax(0,1fr)}.export-preview{padding:18px}.export-storyboard-grid{grid-template-columns:1fr}}
@media (max-width:620px){.export-modal{padding:10px}.export-card{height:calc(100vh - 20px)}.export-layout{display:flex;flex-direction:column;overflow:auto}.export-controls{border-right:0;border-bottom:1px solid var(--line);flex:0 0 auto}.export-topic-readout{margin-top:0}.export-preview-panel{min-height:460px}.export-preview{padding:14px}.export-storyboard-grid{grid-template-columns:1fr}}
