@charset "UTF-8";
:root{--bg:#f3f4ef;--surface:#fff;--text:#26332b;--muted:#849080;--line:#e1e7db;--green:#285c41;--lime:#d9f29a;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--text);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{margin:0;display:grid;grid-template-rows:64px minmax(0,1fr)}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,label:focus-visible{outline:2px solid #6f965b;outline-offset:2px}[hidden]{display:none!important}h2{font-size:14px;margin:0;font-weight:650;white-space:nowrap}p{margin:0;font-size:12px;line-height:1.65;color:#7c8877}input,textarea{min-width:0}button{touch-action:manipulation}small{font-size:11px}
.app-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 20px;background:#fafbf7;border-bottom:1px solid var(--line)}.brand{display:flex;gap:10px;align-items:center;font-size:20px;font-weight:700;white-space:nowrap}.brand-mark{width:36px;height:36px;display:grid;place-items:center;background:var(--green);color:var(--lime);border-radius:11px;font-size:27px}.brand small{display:block;font-weight:400;font-size:10px;letter-spacing:2px;color:#8c9983;margin-top:2px}.header-hint{margin-right:auto;color:#8b9783;font-size:11px}.header-right{display:flex;align-items:center;gap:14px}.version{font-size:11px;color:#95a08f}.connection{background:#fff;border:1px solid #dce4d5;display:flex;align-items:center;gap:7px;border-radius:20px;padding:9px 12px;font-size:11px;white-space:nowrap}.dot{width:6px;height:6px;border-radius:50%;background:#bbb}.dot.ready{background:#62a576}
main{display:grid;grid-template-rows:minmax(0,1fr) clamp(132px,19vh,196px);gap:14px;padding:14px;min-height:0;min-width:0;overflow:hidden}.workspace{display:grid;grid-template-columns:minmax(205px,.9fr) minmax(255px,1.2fr) minmax(280px,1.65fr) minmax(195px,.82fr);gap:14px;min-height:0;min-width:0}.workspace>*{min-width:0;min-height:0}.card,.result-card{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:16px;min-height:0;min-width:0;overflow:hidden}.section-title,.section-title>div{display:flex;align-items:center;gap:8px}.section-title{justify-content:space-between;flex-shrink:0;margin-bottom:12px}.step{width:22px;height:22px;display:grid;place-items:center;background:#eef3e5;border-radius:6px;color:#71865c;font-size:10px;font-weight:650}.muted{font-size:10px;color:var(--muted)}.input-column{display:grid;grid-template-rows:minmax(150px,1.2fr) minmax(148px,.9fr) auto;gap:14px}.upload-card{display:flex;flex-direction:column}.upload-content{display:flex;flex-direction:column;gap:12px;min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}.dropzone{border:1.5px dashed #cedbc4;border-radius:9px;min-height:115px;flex:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:12px;background:#fafcf7;text-align:center;overflow:hidden}.dropzone.dragging{background:#eaf4e2;border-color:#638950}.upload-icon{display:grid;place-items:center;width:34px;height:34px;background:#edf3e6;border-radius:10px;color:#7a935f;font-size:25px;margin:0 auto 10px}.dropzone strong{font-size:12px;font-weight:500;display:block}.dropzone p{font-size:10px;margin-top:8px}.upload-filled{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;height:100%;min-height:0}.upload-filled img{width:100%;min-height:0;flex:1;object-fit:contain}.upload-filled>div{width:100%;flex:none}.upload-filled strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.replace-text{display:block;color:#638248;font-size:10px;margin-top:4px}.reference-section{flex:none}.reference-section summary{font-size:11px;color:#6b8059;cursor:pointer;list-style:none}.reference-section summary:before{content:'＋ '}.reference-section[open] summary:before{content:'− '}.reference-section summary span{font-size:10px;color:#a1aa9a;margin-left:5px}.reference-section p{font-size:10px;margin:7px 0}.references{display:flex;gap:8px;margin:8px 0}.reference-item{position:relative}.reference-item img{width:42px;height:42px;border-radius:6px;object-fit:contain}.reference-item button{position:absolute;top:-6px;right:-6px;background:#fff;border:1px solid #ddd;border-radius:50%;width:18px;height:18px;font-size:12px;padding:0}.reference-add{display:inline-block;padding:6px 9px;border:1px dashed #cfdbc5;border-radius:6px;font-size:10px;color:#6b8059;cursor:pointer}
.brief-card{display:flex;flex-direction:column}.brief-card textarea{flex:1;min-height:42px;resize:none;width:100%;border:1px solid var(--line);border-radius:7px;padding:10px;background:#fcfdf9;color:#4c6043;font-size:12px;line-height:1.8}.brief-card textarea::placeholder{color:#9aa591}.quality-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px;font-size:11px;color:#819173;flex:none}.segmented{display:flex;gap:2px;padding:3px;border-radius:7px;background:#f0f4e9}.segmented button{border:0;border-radius:4px;padding:6px 9px;background:none;font-size:11px;color:#8e9b80}.segmented button.active{background:#fff;box-shadow:0 1px 5px #0001;color:#426431}.field-help{font-size:10px;margin-top:8px;line-height:1.5;color:#94a087}.generation-controls{min-height:0;overflow:hidden}.model-row{display:flex;justify-content:space-between;font-size:10px;color:#829374;margin:0 1px 9px}.button{border:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:8px;padding:9px 12px;font-size:12px;font-weight:500}.secondary{background:#fff;border:1px solid #dce3d5;color:#687c57}.primary{width:100%;height:43px;background:var(--green);color:#fff;font-size:13px;box-shadow:0 3px 8px #204b2412}.primary:hover{background:#204e36}.primary>span:first-child{color:var(--lime);font-size:20px}.primary>span:nth-child(2){margin-right:auto}.primary>span:last-child{font-size:18px}.billing-note{text-align:center;font-size:10px;color:#96a18c;margin-top:8px}.error-banner{max-height:60px;overflow:auto;background:#fff1e9;border:1px solid #ead4c3;border-radius:7px;padding:8px;font-size:11px;line-height:1.5;color:#9a6541;margin-top:8px}
.library-card{display:flex;flex-direction:column}.count{background:#eff5e5;color:#708b59;border-radius:14px;font-size:10px;padding:3px 6px}.selected-tray{display:flex;flex-direction:column;gap:5px;padding:7px;background:#f7faf2;border:1px solid #e7eedf;border-radius:9px;margin-bottom:10px;flex:none}.empty-selection{min-height:29px;font-size:10px;display:grid;place-items:center;color:#9aa88f}.selected-item{position:relative;display:flex;align-items:center;gap:6px;min-width:0;background:#fff;border:1px solid #dce7d2;border-radius:6px;padding:3px 23px 3px 7px;height:33px}.selected-item img{width:38px;height:24px;object-fit:contain}.selected-info{display:flex;gap:6px;align-items:center;min-width:0;flex:1}.selected-item strong{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:500}.selected-item small,.reorder{font-size:9px;color:#7c945f;white-space:nowrap}.reorder{border:0;background:none;padding:2px}.order-label{border-radius:50%;background:#376648;color:#fff;font-size:8px;width:13px;height:13px;display:grid;place-items:center;flex:none}.remove{position:absolute;right:3px;top:5px;border:0;background:none;color:#9eac90;font-size:14px;padding:0 3px}.search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:7px;padding:0 10px;height:33px;background:#f9faf6;flex:none}.search span{font-size:20px;color:#8c9a7c}.search input{width:100%;border:0;background:none;outline:0;font-size:11px}.search input::placeholder{color:#a1aa96}.categories{display:flex;flex-wrap:wrap;gap:3px;margin:9px 0;flex:none}.categories button{padding:5px 7px;background:transparent;border:0;border-radius:5px;font-size:10px;color:#8a967f}.categories .active{background:#ecf4e2;color:#476b32}.material-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(86px,1fr));grid-auto-rows:100px;align-content:start;gap:8px;overflow-y:auto;overflow-x:hidden;padding:1px 4px 1px 1px;overscroll-behavior:contain}.material{position:relative;border:1px solid #e3e9dc;border-radius:8px;padding:6px;min-width:0;background:white;text-align:left}.material:hover{border-color:#a6bb91}.material.selected{border-color:#79a156;background:#f5f9ef}.material-image{height:57px;display:flex;align-items:center;justify-content:center;background:white;border-radius:4px;margin-bottom:5px}.material img{max-width:100%;max-height:100%;object-fit:contain}.material-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:9px;line-height:1.4;color:#7f8a73;word-break:break-all}.material-check{position:absolute;top:5px;right:5px;width:13px;height:13px;display:grid;place-items:center;border:1px solid #e0e6d8;border-radius:3px;background:#fff;font-size:8px;color:transparent}.material.selected .material-check{background:#608344;border-color:#608344;color:white}.library-foot{display:flex;justify-content:space-between;gap:6px;font-size:9px;color:#9fa991;padding-top:9px;flex:none}.library-foot>span:last-child{text-align:right}.grid-message{grid-column:1/-1;text-align:center;padding:30px 6px;color:#9ba78d;font-size:11px}
.result-card{padding:0;display:flex;flex-direction:column}.result-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:16px;flex:none}.result-header>div{display:flex;align-items:center;gap:8px}.live-spark{color:#86a65e;font-size:20px}.preview-label{font-size:10px;padding:4px 6px;background:#f0f6e7;color:#91a17d;border-radius:4px;white-space:nowrap}.preview-stage{position:relative;flex:1;min-height:0;margin:0 12px;background:#f8f9f4;border-radius:8px;overflow:hidden;display:flex;align-items:center;justify-content:center}.preview-stage>img{width:100%;height:100%;object-fit:contain;display:block}.result-meta{padding:13px 16px;display:flex;justify-content:space-between;gap:8px;font-size:10px;color:#98a18d;flex:none}.download-link{color:#5c7f40;font-weight:600;white-space:nowrap}.generating-overlay{position:absolute;inset:0;background:#f7f9f0ed;backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:15px}.generating-overlay h3{font-size:15px;color:#557044;margin:18px 0 8px}.generating-overlay p{font-size:11px}.generating-overlay>span{font-size:10px;margin-top:12px;color:#a0ac93}.spinner{border:3px solid #e2ebd7;border-top-color:#64854a;border-radius:50%;width:33px;height:33px;animation:spin 1.2s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.insights-column{display:grid;grid-template-rows:auto minmax(80px,1fr) minmax(92px,.36fr);gap:14px}.cost-heading{display:flex;align-items:center;justify-content:space-between;gap:5px}.cost-heading>span{font-size:9px;color:#9da98f}.cost-total{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 9px;margin:11px 0}.cost-total strong{color:#2f5c40;font-size:25px;letter-spacing:-.6px}.cost-total>span{font-size:14px;color:#819d58}.cost-breakdown{display:flex;flex-wrap:wrap;gap:3px 9px;font-size:10px;color:#8b9979}.cost-card p{font-size:9px;line-height:1.6;margin:8px 0 3px;overflow-wrap:anywhere;color:#9ba58e}.cost-card>small{font-size:9px;color:#a4ac9a}.analysis-card{display:flex;flex-direction:column;background:#f9fcef}.analysis-heading{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:13px;flex:none}.analysis-heading h2{color:#698a49;font-size:13px}.analysis-heading small{font-size:9px;color:#98a481}.analysis-body{min-height:0;overflow:auto;overscroll-behavior:contain}.analysis-body>strong{display:block;font-size:18px;line-height:1.5;color:#41632e;margin-bottom:12px}.analysis-body p{font-size:11px;color:#96a481;margin-top:10px}.analysis-body summary{font-size:10px;color:#7c955d;cursor:pointer;margin-top:13px}.analysis-body details p{font-size:10px}#analysis-secondary{display:flex;flex-wrap:wrap;gap:5px}#analysis-secondary span{font-size:10px;padding:4px 6px;background:#edf5df;border-radius:4px;color:#82975f}.history-section{display:flex;flex-direction:column}.history-title{display:flex;align-items:center;justify-content:space-between;flex:none;margin-bottom:10px}.history-title h2{font-size:12px;color:#859574}.history-title>span{font-size:10px;color:#a3ae96}.history{min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(55px,1fr));grid-auto-rows:64px;gap:7px;align-content:start;overflow:auto;overscroll-behavior:contain}.history button{padding:3px;background:#fff;border:1px solid #e1e8d8;border-radius:6px;min-width:0}.history img{width:100%;height:100%;object-fit:contain;border-radius:4px}.history-empty{grid-column:1/-1;font-size:10px;color:#a3ae96;padding:10px 0}
.queue-panel{display:flex;flex-direction:column;padding:12px 16px}.queue-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;margin-bottom:10px}.queue-header>div{display:flex;align-items:center;gap:13px}.queue-header h2{font-size:13px}.queue-header span{font-size:11px;color:#8b9b7c}.queue-capacity{font-size:10px!important}.task-list{flex:1;min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));grid-auto-rows:76px;gap:8px;overflow:auto;align-content:start;overscroll-behavior:contain;padding-right:3px}.queue-empty{grid-column:1/-1;display:flex;align-items:center;justify-content:center;color:#a3af95;font-size:12px;border:1px dashed #e0e8d7;border-radius:8px;min-height:65px}.task{display:flex;align-items:center;gap:9px;border:1px solid #e5ebdf;border-radius:8px;padding:8px;background:#fbfcf8;position:relative;cursor:pointer;min-width:0;text-align:left}.task.active{border-color:#7b9e5a;background:#f5f9ee}.task img{width:52px;height:52px;border-radius:5px;object-fit:contain;background:#fff;flex:none}.task-content{min-width:0;flex:1}.task-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;font-weight:500;margin-bottom:5px;color:#5d7050}.task-state{display:block;font-size:10px;color:#93a17e}.task-state.running{color:#648749}.task-state.failed{color:#b57d53}.task-price{font-size:10px;color:#8d9d79;margin-top:4px;display:block}.task-cancel{border:0;background:#f1f4eb;color:#9caa8c;border-radius:4px;padding:3px 6px;font-size:10px;flex:none}.task-failure{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;color:#aa8767;font-size:9px;margin-top:4px}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:12px 20px;background:#30482a;color:white;border-radius:9px;box-shadow:0 3px 15px #0002;font-size:12px;z-index:40;max-width:90vw;text-align:center}dialog{border:1px solid #dce3d3;border-radius:15px;padding:25px;width:min(430px,90vw);max-height:90vh;overflow:auto;box-shadow:0 20px 70px #1e301b30;color:var(--text)}dialog::backdrop{background:#20351d45;backdrop-filter:blur(3px)}.dialog-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.icon-button{background:none;border:0;font-size:25px;color:#92a085}.field-label{display:block;font-size:12px;color:#6f825e;margin:18px 0 8px}#api-key{width:100%;border:1px solid var(--line);border-radius:7px;padding:11px;font-size:13px}.fx-controls{display:flex;gap:8px}.fx-controls input,.fx-controls select{padding:9px;border:1px solid var(--line);border-radius:7px;font-size:12px;min-width:0}.fx-controls input{width:100%}dialog .primary{margin-top:20px}
/* Every pane owns its overflow; the app canvas never scrolls. */
.material-grid,.task-list,.analysis-body,.history,.upload-content,textarea{scrollbar-width:thin;scrollbar-color:#cbd9bd transparent}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-thumb{background:#cbd9bd;border-radius:4px}
@media(min-width:1700px){.workspace{grid-template-columns:minmax(280px,340px) minmax(380px,1.25fr) minmax(480px,2fr) minmax(260px,320px);gap:18px}main{padding:18px;gap:18px}.card{padding:19px}.material-grid{grid-template-columns:repeat(auto-fill,minmax(112px,1fr));grid-auto-rows:121px;gap:10px}.material-image{height:75px}.material-name{font-size:10px}.selected-tray{flex-direction:row;gap:7px}.selected-item{height:58px;flex:1;min-width:0;padding:5px 17px 5px 5px;gap:4px}.selected-item img{width:35px;height:33px}.selected-info{display:block}.selected-item strong{font-size:9px}.selected-item small,.reorder{font-size:8px}.order-label{position:absolute;left:-2px;top:-4px}.selected-item .remove{top:1px;right:1px}.material-grid{padding-right:7px}.analysis-body>strong{font-size:22px}.analysis-body p{font-size:12px}.cost-total strong{font-size:30px}.cost-total>span{font-size:17px}}
@media(max-width:1150px){body{grid-template-rows:56px minmax(0,1fr)}.header-hint{display:none}.app-header{padding:0 13px}.header-right{gap:9px}main{padding:10px;gap:10px;grid-template-rows:minmax(0,1fr) 132px}.workspace{gap:10px;grid-template-columns:minmax(185px,.9fr) minmax(215px,1.1fr) minmax(230px,1.3fr) minmax(170px,.8fr)}.card{padding:12px}.input-column,.insights-column{gap:10px}.input-column{grid-template-rows:minmax(140px,1.1fr) minmax(137px,.9fr) auto}.section-title>.muted,.library-foot>span:last-child{display:none}.segmented button{padding:5px 7px}.material-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:93px}.material-image{height:50px}.categories button{padding:4px 5px;font-size:9px}.cost-heading h2{font-size:12px}.cost-heading>span{font-size:8px}.cost-total{gap:2px 7px;margin:8px 0}.cost-total strong{font-size:23px}.cost-total>span{font-size:12px}.cost-breakdown{font-size:9px}.cost-card p{font-size:8px}.analysis-heading{margin-bottom:9px}.analysis-body>strong{font-size:16px}.analysis-body p{font-size:10px}.result-header{padding:12px}.result-meta{padding:11px}.preview-stage{margin:0 8px}.queue-panel{padding:10px 12px}.task-list{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}.reference-section summary span{display:none}}
@media(max-height:760px){main{grid-template-rows:minmax(0,1fr) 122px;gap:10px;padding:10px}.workspace{gap:10px}.input-column,.insights-column{gap:10px}.input-column{grid-template-rows:minmax(120px,1fr) minmax(118px,.85fr) auto}.card{padding:11px}.section-title{margin-bottom:9px}.dropzone{min-height:85px;padding:8px}.upload-content{gap:8px}.brief-card .field-help{display:none}.quality-row{margin-top:8px}.billing-note{font-size:9px}.insights-column{grid-template-rows:auto minmax(60px,1fr) 80px}.cost-total{margin:7px 0}.cost-total strong{font-size:22px}.cost-total>span{font-size:12px}.cost-card p{font-size:8px;margin-top:5px}.cost-card>small{font-size:8px}.analysis-heading{margin-bottom:7px}.history-title{margin-bottom:7px}.history{grid-auto-rows:48px;grid-template-columns:repeat(auto-fill,minmax(43px,1fr))}.queue-panel{padding:9px 12px}.queue-header{margin-bottom:8px}.selected-tray{gap:3px;padding:5px;margin-bottom:8px}.selected-item{height:27px;padding-top:1px;padding-bottom:1px}.selected-item img{height:20px}.categories{margin:7px 0}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.preview-empty{padding:20px;text-align:center;color:#abb89c}.preview-empty>span{display:block;font-size:50px;font-weight:200;color:#c0cfab;margin-bottom:18px}.preview-empty strong{display:block;font-size:14px;font-weight:500;color:#96a884}.preview-empty p{font-size:11px;color:#b1bca5;margin-top:10px}.queue-actions{display:flex;align-items:center;gap:10px}.queue-actions .button{padding:5px 9px;font-size:10px;height:27px}.select-all{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:10px;color:#8a9b79;cursor:pointer}.select-all input,.task-select{accent-color:#547c3a;cursor:pointer}.task-select{position:absolute;right:5px;top:5px;width:13px;height:13px;margin:0}.task.checked{background:#f2f8e8}.queue-actions .button:disabled{cursor:default;opacity:.45}@media(max-width:1150px){.queue-capacity{display:none}.queue-actions{gap:7px}.queue-header{gap:5px}.queue-header>div{gap:7px}.queue-header span{font-size:10px}}

.reference-heading{display:flex;justify-content:space-between;gap:4px;font-size:11px;color:#6d8359;margin-bottom:7px}.reference-heading small{font-size:9px;color:#a4af97}.references{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0}.reference-slot{height:clamp(42px,6vh,78px);min-width:0;border:1px dashed #d0ddc4;border-radius:7px;background:#fbfdf7;display:flex;align-items:center;justify-content:center;flex-direction:column;position:relative;cursor:pointer;outline-offset:1px}.reference-slot:focus,.reference-slot.dragging{outline:2px solid #80a456;border-color:transparent;background:#f0f7e5}.reference-slot>span{font-size:20px;color:#a7b993}.reference-slot small{font-size:8px;color:#a1b08c;white-space:nowrap}.reference-slot img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px}.reference-slot>button{position:absolute;top:0;right:0;border:0;border-radius:0 6px 0 6px;background:#fffD;color:#78965b;font-size:13px;padding:0 4px;line-height:17px}.reference-foot{display:flex;justify-content:space-between;gap:4px;margin-top:5px;font-size:8px;color:#a3ae94}.reference-foot label{cursor:pointer;color:#6b8a50}.presets-section{flex:none;margin-bottom:10px}.presets-heading{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#859873;margin-bottom:6px}.presets-heading small{font-size:9px;color:#a4b196;margin-left:3px}.presets-heading button{border:0;background:none;padding:2px;color:#678846;font-size:10px}.presets-heading button:disabled{cursor:default;opacity:.4}.preset-list{display:flex;flex-wrap:wrap;gap:5px;max-height:62px;overflow:auto;overscroll-behavior:contain}.preset-empty{font-size:9px;color:#acb79e;padding:3px 0}.preset-chip{display:flex;min-width:0;max-width:100%;border:1px solid #e1e9d5;border-radius:6px;background:#f8fbf1}.preset-chip button{border:0;background:none;color:#728c50;font-size:10px;padding:5px 7px;min-width:0}.preset-apply{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}.preset-chip .preset-edit{border-left:1px solid #e4ebdb;padding:3px 5px;color:#9fae8a}.preset-preview{display:flex;flex-direction:column;gap:7px;margin:15px 0}.preset-preview>div{display:flex;gap:10px;align-items:center;padding:8px;background:#f7faef;border-radius:6px}.preset-preview img{width:45px;height:30px;object-fit:contain}.preset-preview span{font-size:11px;color:#758862}#preset-name{width:100%;padding:10px;border:1px solid #dce5d2;border-radius:7px;font-size:12px}.text-button{border:0;background:none;color:#72914f;font-size:11px;padding:6px 0}.text-button.danger{color:#af8062}.preset-dialog-actions{display:flex;align-items:center;gap:20px;margin-top:14px}.preset-dialog-actions .primary{margin:0;flex:1}.task-delete{position:absolute;right:7px;bottom:7px;background:none;border:0;color:#b5a590;font-size:9px;padding:2px}.task-price{padding-right:23px}.task:hover .task-delete{color:#9e6d53}@media(max-height:760px){.input-column{grid-template-rows:minmax(180px,1.3fr) minmax(118px,.7fr) auto}.reference-heading{font-size:9px;margin-bottom:5px}.reference-heading small{font-size:8px}.reference-foot{font-size:7px}.upload-content{gap:7px}.dropzone{min-height:70px}.presets-section{margin-bottom:7px}.preset-list{max-height:47px}.preset-chip button{font-size:9px;padding:3px 5px}}

.library-heading-actions{display:flex;align-items:center;gap:8px}.library-heading-actions>button{border:1px solid #dce6d0;border-radius:5px;background:#f7fbef;color:#6f8d4e;padding:4px 7px;font-size:10px;white-space:nowrap}.material-select{border:0;background:transparent;width:100%;height:100%;display:block;text-align:left;padding:0;cursor:pointer}.material-edit{position:absolute;top:4px;left:4px;border:0;border-radius:4px;padding:0 5px;height:17px;line-height:14px;background:#ffffffda;color:#a4b195;font-size:14px;opacity:.6}.material:hover .material-edit,.material-edit:focus-visible{opacity:1;background:#eff5e5;color:#668446}.material-dropzone{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:9px;min-height:110px;border:1px dashed #cbdac0;border-radius:9px;padding:12px;background:#fafcf6;cursor:pointer;outline-offset:3px}.material-dropzone img{max-width:100%;max-height:110px;object-fit:contain}.material-dropzone span{font-size:11px;color:#8a9e75}#material-name,#material-category,#category-select{width:100%;border:1px solid #dce5d2;border-radius:7px;padding:10px;background:white;font-size:12px;color:#72875f}.category-material{display:flex;align-items:center;gap:12px;margin-top:10px;font-size:12px;color:#73875f}.category-material img{width:70px;height:45px;object-fit:contain}@media(max-width:1150px){.library-heading-actions .muted{display:none}.library-heading-actions>button{padding:3px 6px;font-size:9px}}

/* Queue-first layout: compact instructions, all results in one task list. */
main{grid-template-rows:minmax(0,1fr) clamp(220px,32vh,380px)}.input-column{grid-template-rows:minmax(190px,1fr) clamp(140px,18vh,220px) auto}.insights-column{grid-template-rows:auto minmax(0,1fr)}@media(max-width:1150px){main{grid-template-rows:minmax(0,1fr) clamp(190px,28vh,280px)}}@media(max-height:760px){main{grid-template-rows:minmax(0,1fr) 164px}.input-column{grid-template-rows:minmax(195px,1fr) 112px auto;gap:10px}.brief-card .section-title{margin-bottom:5px}.brief-card textarea{min-height:24px;padding:6px;font-size:10px;line-height:1.5}.quality-row{margin-top:5px}.segmented button{padding:4px 6px}.reference-foot{line-height:1.3}}

.scene-row{display:flex;align-items:center;gap:6px;margin-bottom:9px;font-size:11px;color:#849873;height:28px}.scene-row select{flex:1;min-width:0;border:1px solid #dce5d2;background:#fafff3;color:#68864b;border-radius:6px;padding:5px 7px;font-size:10px;height:28px}.scene-row>button{border:0;background:none;color:#7d975e;font-size:10px;padding:3px}.scene-row>button:disabled{opacity:.4;cursor:default}#scene-brief{resize:vertical;min-height:70px;max-height:150px;width:100%;padding:10px;border:1px solid #dce5d2;border-radius:7px;font-size:12px;line-height:1.7}.field-label small{font-size:10px;color:#abb79e;margin-left:7px}.scene-dropzone{height:135px;border:1px dashed #cfddc0;background:#fafdf5;border-radius:8px;display:flex;align-items:center;justify-content:center;cursor:pointer;outline-offset:2px}.scene-dropzone img{width:100%;height:100%;object-fit:contain}.scene-dropzone span{font-size:11px;color:#99ac82}.scene-file-label{display:inline-block;cursor:pointer;font-size:10px;color:#78974f;margin-top:7px}@media(max-height:760px){.billing-note{display:none}.scene-row{height:26px;margin-bottom:6px}}
@media(max-height:1000px){.upload-filled{flex-direction:row;gap:8px;align-items:center}.upload-filled img{flex:0 0 44%;width:44%;height:100%;min-width:0}.upload-filled>div{width:56%;min-width:0}.upload-filled strong{font-size:10px}.upload-filled .replace-text{font-size:9px}.upload-content .dropzone{padding:8px}}

/* Compare the selected task with its uploaded source without changing the draft. */
.insights-column{grid-template-rows:auto minmax(90px,1fr) minmax(110px,1.05fr)}
.source-card{display:flex;flex-direction:column;gap:10px}
.source-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none}
.source-heading h2{font-size:12px;color:#6b8059}.source-heading span{font-size:9px;color:#a3af98}
.source-stage{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;overflow:hidden;background:#fafcf6;border-radius:7px}
.source-stage img{display:block;width:100%;height:100%;object-fit:contain;min-height:0}
.source-stage p{font-size:11px;line-height:1.8;color:#a0af8c;text-align:center;padding:12px}
.source-name{font-size:9px;color:#9aa68e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:none}
@media(max-height:760px){.source-card{gap:6px}.source-heading span{display:none}.source-heading h2{font-size:11px}.source-name{font-size:8px}.brief-card textarea{font-size:11px;line-height:1.6;padding:8px}}

/* Give the material library the space reclaimed from the result preview. */
.workspace{grid-template-columns:minmax(205px,.9fr) minmax(275px,1.5fr) minmax(260px,1.35fr) minmax(195px,.82fr)}
.result-card{align-self:stretch;max-height:100%}
.preview-stage{flex:1 1 0;aspect-ratio:auto;width:calc(100% - 20px);margin:0 10px}
.preview-stage>img{position:absolute;inset:0}
.material-grid{grid-template-columns:repeat(auto-fill,minmax(82px,1fr))}
@media(min-width:1700px){.workspace{grid-template-columns:minmax(280px,340px) minmax(380px,1fr) clamp(360px,calc(100dvh - clamp(220px,32vh,380px) - 218px),680px) minmax(260px,320px)}.material-grid{grid-template-columns:repeat(auto-fill,minmax(108px,1fr))}}
@media(max-width:1150px){.workspace{grid-template-columns:185px minmax(215px,1.35fr) minmax(225px,1fr) 170px}.material-grid{grid-template-columns:repeat(auto-fill,minmax(76px,1fr))}.preview-stage{width:calc(100% - 16px);margin:0 8px}}

.insights-column{grid-template-rows:minmax(100px,.8fr) minmax(130px,1.2fr)}

/* Three columns: source/editor, expanded materials, compact result. */
.workspace{grid-template-columns:minmax(205px,280px) minmax(275px,1fr) minmax(260px,400px)}
.return-to-edit{flex:none;border:1px solid #dbe6cd;border-radius:5px;background:#f7fbf0;color:#6e8a4e;font-size:10px;padding:4px 7px;white-space:nowrap}
@media(min-width:1700px){.workspace{grid-template-columns:minmax(280px,340px) minmax(380px,1fr) clamp(360px,calc(100dvh - clamp(220px,32vh,380px) - 218px),680px)}}
@media(max-width:1150px){.workspace{grid-template-columns:205px minmax(215px,1fr) minmax(225px,290px)}}

.custom-select{display:flex;min-width:0;position:relative}
.select-control{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;height:36px;padding:0 11px;background:#f8fbf2;border:1px solid #dce6d2;border-radius:7px;color:#66834c;font-size:12px;text-align:left;outline:none}
.select-control>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.select-control:hover{background:#f1f7e9;border-color:#b7c9a5}.select-control:focus-visible,.select-control[aria-expanded=true]{border-color:#8ba96c;box-shadow:inset 0 0 0 1px #8ba96c}
.select-arrow{width:6px;height:6px;border-right:1.5px solid #8ca377;border-bottom:1.5px solid #8ca377;transform:rotate(45deg) translateY(-2px);flex:none;margin-right:2px}
.select-control[aria-expanded=true] .select-arrow{transform:rotate(225deg) translate(-2px,-1px)}
.select-menu{position:fixed;z-index:1000;display:flex;flex-direction:column;gap:3px;overflow:auto;padding:5px;background:#fffefb;border:1px solid #dce6d3;border-radius:9px;box-shadow:0 8px 28px #29452426;overscroll-behavior:contain}
.select-option{flex:none;display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:33px;border:0;border-radius:5px;background:transparent;padding:7px 10px;color:#6e825e;font-size:12px;text-align:left;outline:none}
.select-option:hover,.select-option:focus{background:#f1f6e9}.select-option[aria-selected=true]{color:#426c2f;background:#eaf3df}.select-check{font-size:12px;color:#6b9549;min-width:13px}
.scene-row{height:34px;min-height:34px;padding:1px 0;gap:7px}.scene-row .custom-select{flex:1}.scene-row .select-control{height:32px;font-size:11px;padding:0 9px}.generation-controls{overflow:visible}.fx-controls .custom-select{flex:0 0 112px}.fx-controls .select-control{height:36px;font-size:11px}.fx-controls input{flex:1;width:0}
@media(max-height:1000px){.upload-content .dropzone{min-height:40px}.upload-content{gap:8px}.upload-icon{display:none}.dropzone strong{font-size:11px}.dropzone p{font-size:9px;margin-top:4px}}
@media(max-height:760px){.scene-row{height:32px;min-height:32px;padding:0;margin-bottom:6px}}

/* Readable labels and controls on both Windows and macOS. */
h2{font-size:15px}.muted,.count,.preview-label{font-size:11px}.header-hint{font-size:12px}.connection{font-size:12px}
.reference-heading{font-size:13px;margin-bottom:6px}.reference-heading small{font-size:11px}.reference-foot{font-size:11px;margin-top:5px}
.reference-slot{height:clamp(54px,6vh,82px);gap:1px}.reference-slot>span{font-size:19px;line-height:20px}.reference-slot small{font-size:12px;line-height:16px;color:#78915f}.reference-shortcut{font-size:11px;line-height:14px;color:#9caf87;font-style:normal}
.brief-card textarea{font-size:13px;line-height:1.7}.main-review-label,.return-to-edit{font-size:12px}.upload-filled strong{font-size:12px}.replace-text{font-size:11px}
.material-name{font-size:12px;line-height:1.45}.material-grid{grid-auto-rows:114px}.material-image{height:57px}.categories button{font-size:12px;padding:5px 7px}.search input{font-size:12px}.library-foot{font-size:11px}.library-heading-actions>button{font-size:12px}
.selected-item strong{font-size:12px}.selected-item small,.reorder{font-size:11px}.selected-item{height:38px}.presets-heading{font-size:12px}.presets-heading small,.presets-heading button,.preset-empty{font-size:11px}.preset-chip button{font-size:12px}.preset-list{max-height:68px}
.task-name{font-size:12px}.task-state{font-size:11px}.task-price{font-size:12px;font-weight:550}.task-delete{font-size:11px}.queue-header h2{font-size:14px}.queue-header span,.select-all{font-size:12px}.queue-actions .button{font-size:12px;height:30px}.queue-capacity{font-size:11px!important}
.scene-row,.scene-row>button{font-size:12px}.scene-row .select-control,.fx-controls .select-control,.select-control,.select-option{font-size:13px}.field-label{font-size:13px}.field-help,dialog p{font-size:12px}.result-meta{font-size:12px}.billing-note{font-size:11px}
@media(min-width:1200px){.selected-tray{flex-direction:row;gap:7px}.selected-item{height:64px;flex:1;min-width:0;padding:5px 17px 5px 5px;gap:5px}.selected-item img{width:30px;height:30px}.selected-info{display:block}.order-label{position:absolute;left:-2px;top:-4px}.selected-item .remove{top:1px;right:1px}}
@media(min-width:1700px){.material-grid{grid-auto-rows:138px}.material-image{height:76px}.material-name{font-size:12px}}
@media(max-height:1000px){.upload-filled strong{font-size:11px}.upload-filled .replace-text{font-size:11px}.reference-heading{font-size:12px}.reference-heading small,.reference-foot{font-size:10px}}
@media(max-width:1150px){.categories button{font-size:11px;padding:4px 5px}.queue-header span,.select-all,.queue-actions .button{font-size:11px}.material-name{font-size:11px}.library-foot{font-size:10px}.selected-item{height:36px}.selected-item strong{font-size:11px}.selected-item small,.reorder{font-size:10px}.preset-chip button{font-size:11px}.library-heading-actions>button{font-size:11px}}
@media(max-height:760px){.reference-slot{height:48px;gap:0}.reference-slot>span{font-size:15px;line-height:17px}.reference-slot small{font-size:12px;line-height:16px}.reference-shortcut{font-size:10px;line-height:12px}.reference-heading{font-size:12px;margin-bottom:4px}.reference-heading small,.reference-foot{font-size:10px}.brief-card textarea{font-size:12px;line-height:1.5;padding:7px}.selected-tray{margin-bottom:7px}.presets-heading{font-size:11px}.preset-list{max-height:46px}}

/* Keep all three material slots stable before and after selection. */
.selected-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:7px;height:80px;min-height:80px;flex:none}
.selected-tray .selected-item{height:64px;min-height:64px;padding:8px 20px 8px 22px;gap:8px;flex:none;user-select:none;outline-offset:2px}
.selected-tray .selected-item[draggable=true]{cursor:grab}
.selected-tray .selected-item[draggable=true]:active{cursor:grabbing}
.selected-tray .selected-item img,.selected-plus{width:36px;height:32px;flex:none;object-fit:contain;pointer-events:none}
.selected-plus{display:grid;place-items:center;font-size:23px;color:#acbb99}
.selected-tray .selected-info{display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:4px;min-width:0;flex:1;pointer-events:none}
.selected-tray .selected-item strong{display:block;flex:none;width:100%;font-size:12px;line-height:16px}
.selected-tray .selected-item small{display:block;overflow:hidden;text-overflow:ellipsis;font-size:11px;line-height:14px}
.selected-tray .order-label{position:absolute;top:5px;left:5px;width:14px;height:14px;font-size:9px}
.selected-tray .selected-item .remove{top:2px;right:2px;width:20px;height:20px;font-size:16px;cursor:pointer}
.selected-tray .is-empty{border-style:dashed;background:#fbfdf7;color:#99a98b}
.selected-tray .is-empty .order-label{background:#e7efdc;color:#839a6b}
.selected-tray .is-dragging{opacity:.45}
.selected-tray .drop-target{border:2px solid #6c9450;background:#eef6e5;padding:7px 19px 7px 21px}
.selected-tray .selected-item:focus-visible{outline:2px solid #85a667}
@media(max-width:1350px){.selected-tray{gap:6px}.selected-tray .selected-item{gap:5px;padding-left:20px;padding-right:15px}.selected-tray .selected-item img,.selected-plus{width:25px;height:28px}.selected-tray .selected-item strong{font-size:11px}.selected-tray .selected-item small{font-size:10px}.selected-tray .drop-target{padding-left:19px;padding-right:14px}}
@media(max-width:1050px){.selected-tray .selected-item{padding:16px 7px 4px;gap:2px;flex-direction:column;justify-content:center}.selected-tray .selected-item img,.selected-plus{width:32px;height:23px}.selected-tray .selected-info{width:100%;flex:none;text-align:center;gap:0}.selected-tray .selected-item small{display:none}.selected-tray .drop-target{padding:15px 6px 3px}}

.brand-logo{width:44px;height:44px;object-fit:contain;border-radius:9px;flex:none}
