/* Matrix UI — adapted from 序策新版 UI v1.0. Presentation only. */
:root{--ink:#202633;--ink-2:#344158;--muted:#66758b;--paper:#f7f8fa;--panel:#fff;--line:#e9ebef;--line-dark:#dce2eb;--lime:#edf1ff;--lime-dark:#315ee8;--blue:#315ee8;--coral:#ac5045;--shadow:none;--sidebar:226px}
html,body{background:var(--paper);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;font-size:14px;line-height:1.65}
body [hidden]{display:none!important}
button,input,select,textarea{font-variant-numeric:tabular-nums}
button{transition:background-color .15s,color .15s;}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid #687fd3;outline-offset:3px}
.sidebar{background:#fff;color:var(--ink);border-right:1px solid var(--line);padding:24px 14px 16px;gap:12px}
.brand{height:52px;gap:10px;padding:0 6px;flex-shrink:0}
.brand strong{font-size:21px;letter-spacing:0;white-space:nowrap}.brand small{font-size:10px;letter-spacing:1.2px;color:var(--muted)}
.brand-mark{flex:none;background:#222b3b;border-radius:8px;transform:none;padding:8px;gap:3px}.brand-mark span{background:white;opacity:1!important}
.workspace-switch{margin:4px 0 0;padding:12px;border:1px solid var(--line);border-radius:10px;color:var(--ink)}
.workspace-switch>span,.workspace-switch small{color:var(--muted);font-size:12px}
.workspace-switch>div{background:var(--paper);margin:8px 0;border-radius:8px}
.workspace-switch button{font-size:13px;white-space:nowrap;padding:8px 6px;min-height:40px;color:var(--muted)}
.workspace-switch button[aria-pressed=true]{background:var(--lime);color:var(--blue)}
.workspace-switch button:focus-visible{outline-color:var(--blue)}
.nav-list{margin-top:6px}.sidebar .nav-system{margin-top:12px}.nav-item{height:44px;min-height:44px;border-radius:8px;color:var(--muted);gap:10px}.nav-item:hover{background:#f3f5f9;color:var(--ink)}
.nav-item.active{background:var(--lime);color:var(--blue);box-shadow:none;font-weight:600}.nav-item>span:nth-child(2){white-space:nowrap;font-size:14px}
.nav-icon{display:grid;place-items:center;flex:none}.nav-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.nav-new{display:none}.nav-label{font-size:12px;letter-spacing:0;color:var(--muted);padding:6px 12px}
.service-mini{border-color:var(--line);color:var(--muted);font-size:12px}.service-mini-head{color:var(--ink)}.service-mini-head button{color:var(--blue);font-size:12px;min-height:32px}.service-mini small{font-size:12px}
.service-mini>div:has(.status-dot.ok),.service-mini>div:has(.status-dot.ok) small{color:#297b61}.status-dot.ok,.online-dot{background:#297b61;box-shadow:none}
.profile{border-top:1px solid var(--line);padding-top:16px}.profile strong{font-size:13px}.profile small{font-size:12px;color:var(--muted)}.avatar{background:#edf1ff;color:var(--blue);flex:none}
.main-area{min-width:0}.topbar{height:80px;padding:0 32px;background:var(--paper);backdrop-filter:none}.topbar h1{font-size:24px;font-weight:650}.topbar p{font-size:11px;letter-spacing:1.5px;color:var(--muted)}
.view{padding:24px 32px 36px;max-width:1450px;margin:auto;animation:none}.view.studio-reserved-view{padding:0}.view .page-intro{gap:16px;flex-wrap:wrap}.page-intro h2{font-size:28px;font-weight:650}.page-intro p{font-size:13px;line-height:1.7}.page-intro small{font-size:11px;color:var(--muted)}
#projectListPane,#projectEditorPane{width:calc(100% - 64px);max-width:1386px}.project-overview{border-radius:12px}.project-overview small{font-size:12px;letter-spacing:.6px}.project-overview strong{font-size:30px;font-weight:600}.project-overview div>span{font-size:12px}
.primary-button,.primary-button.compact,.launch-button,.hero-copy .primary-button{min-height:44px;height:auto;padding:10px 16px;background:var(--blue);color:#fff;border:1px solid var(--blue);border-radius:8px;box-shadow:none;font-size:14px;font-weight:600;white-space:nowrap}
.primary-button:hover,.hero-copy .primary-button:hover{background:#274dc5;transform:none}.primary-button span,.hero-copy .primary-button span{color:inherit}
.ghost-button,.icon-button,.ca-workspace .secondary-button{min-height:44px;height:auto;border:1px solid var(--line-dark);border-radius:8px;background:#fff;color:var(--ink-2);font-size:13px;white-space:nowrap;box-shadow:none}.icon-button{width:44px;flex:none}.ghost-button:hover{background:#f6f8fc;border-color:#bbc8df}
.hero-panel{min-height:0;display:block;background:#fff;color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:none}.hero-panel::before,.hero-visual{display:none}.hero-copy{padding:24px 28px}.hero-copy .overline{color:var(--muted);font-size:11px;letter-spacing:1.5px}.hero-copy h2{font-size:25px;letter-spacing:0;margin:8px 0;line-height:1.5}.hero-copy h2 br{display:none}.hero-copy p{color:var(--muted);font-size:14px;max-width:850px}.hero-actions{margin-top:18px;flex-wrap:wrap}.hero-copy .ghost-button{color:var(--ink-2);border-color:var(--line-dark);background:#fff}
.panel,.stat-card,.project-card,.buyer-card,.ca-card,.provider-card,.side-setting-card,.volc-family-card,.statistics-summary-card{border-color:var(--line);border-radius:12px;background:#fff;box-shadow:none}
.project-card:hover{transform:none;box-shadow:none;border-color:#bdc9df}.project-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.project-card-body{padding:18px}.project-card-title h3{font-size:16px}.project-card-title span,.project-card-body>p{font-size:12px}.project-card-title{gap:8px;flex-wrap:wrap}.project-card-title h3{max-width:100%}
.stat-card{padding:20px;min-width:0}.stat-icon.lime{background:#edf1ff;color:var(--blue)}.stat-card small,.stat-card p{font-size:12px}.stat-card strong{font-size:30px;font-weight:600}
.panel-heading h3,.section-title h3{font-size:18px}.section-title small,.panel-heading small{font-size:11px;color:var(--muted)}
.field,.form-grid>*{min-width:0}.field>span{font-size:13px;font-weight:600;color:var(--ink-2)}
.field input,.field select,.field textarea,.ca-card input,.ca-card select,.ca-card textarea,.ai-model-fields select{font-size:14px;background:#fff;border-color:var(--line-dark);border-radius:8px;color:var(--ink);min-width:0;line-height:1.65}
.field input,.field select{height:44px}.field textarea{min-height:90px;padding:10px 12px}.field input:focus,.field select:focus,.field textarea:focus{border-color:#687fd3;box-shadow:0 0 0 3px #edf1ff}
.field small,.photo-category-hint,.volc-settings-note,.volc-family-card p,.volc-model-row small{font-size:12px;color:var(--muted)}
.project-context-bar{background:#fff;border-color:var(--line);padding:12px;border-radius:10px}.project-context-bar strong{font-size:14px}.project-context-bar small{font-size:12px;color:var(--muted)}.project-context-bar>span{background:var(--lime);color:var(--blue)}
.project-context-bar>button:first-child,.project-context-bar>button:last-child{height:44px;min-width:44px;font-size:13px}
.buyer-layout{grid-template-columns:minmax(0,1fr) 230px}.buyer-layout>*{min-width:0}.buyer-stepper{gap:8px;padding:16px;border-radius:10px}.buyer-stepper button{min-width:0;min-height:44px}.buyer-stepper button span{font-size:12px}.buyer-stepper button small{font-size:12px;color:var(--muted)}.buyer-stepper button b{flex:none;color:var(--muted)}.buyer-stepper button.active b{background:var(--lime);border-color:#cad5f6;color:var(--blue)}
.photo-model-count-note,.photo-locked-brief{background:#f5f7fc;border-color:#dce2eb}.photo-model-count-note strong,.photo-locked-brief strong{color:var(--ink);font-size:13px}.photo-model-count-note span,.photo-locked-brief p{color:var(--muted);font-size:12px}.photo-locked-brief>span{background:#edf1ff;color:var(--blue)}
.photo-source-empty,.photo-board-card,.photo-source-card{background:#f7f8fa}.photo-source-empty small,.photo-board-card small,.photo-board-upload-button small{font-size:12px}.photo-board-card strong,.photo-board-upload-button strong{font-size:14px}.photo-board-card small:not(.stale){color:var(--muted)}
.generation-action-button,.photo-final-button{background:var(--blue);color:white;box-shadow:none;border-color:var(--blue);border-radius:8px}.generation-action-button:hover{transform:none;box-shadow:none}.generation-action-button small{color:#e3eaff}.generation-action-button>span{background:#ffffff20;color:white}
.volc-family-card{padding:20px}.volc-model-row{border-color:var(--line);border-radius:8px}.volc-model-row.selected{background:#edf1ff;border-color:#c4d0f8}.volc-model-row em{background:#edf1ff;color:var(--blue);font-size:12px}
.ca-card{padding:22px}.ca-card label{color:var(--ink-2)}.ca-progress{background:#edf0f5}.ca-progress>i,.ca-progress>div,.ca-progress>span{background:#687fd3}.ca-run,.ca-details pre{background:#f7f8fa;border-color:var(--line)}
.project-module-grid{gap:16px}.project-module-card{border-color:var(--line);border-radius:12px;box-shadow:none}.project-module-card:hover{border-color:#bdc9df;transform:none}.project-module-card.selected{background:#f7f9ff;border-color:#c4d0f8}
.action-confirm-card,.project-dialog-card{border-radius:14px;box-shadow:0 16px 60px #172c4a25}
.top-actions,.project-actions,.project-manage-actions{gap:8px;flex-wrap:wrap}.project-actions button,.project-manage-actions button{min-height:44px;font-size:12px;white-space:nowrap}
.main-area:has(.topbar:not([hidden]))>.view:not(#view-settings):not(#view-studio)>.page-intro>div>h2,.main-area>.view:not(#view-settings):not(#view-studio)>.page-intro>div>small{display:none}
.quick-card{background:#f7f8fa}.quick-card:hover{background:#fff;box-shadow:none;transform:none}.quick-card strong{font-size:14px}.quick-card small,.model-row small{font-size:12px;color:var(--muted)}.quick-art{display:none}.model-row strong{font-size:13px}.model-row em,.preset-top em{background:#edf1ff;color:var(--blue);font-size:12px;white-space:nowrap}
.project-module-card h3{font-size:17px}.project-module-card p{font-size:13px}.project-module-card small{font-size:11px;color:var(--muted)}.project-module-card em,.project-module-card>b{font-size:12px}.project-module-card{padding:20px;min-height:185px}
.ca-workspace{color:var(--ink);padding:0!important}.ca-heading{padding:12px 0;margin-bottom:20px}.ca-heading h2{font-size:24px}.ca-heading p,.ca-hint,.ca-eyebrow,.ca-model-hint{color:var(--muted)}
.ca-source,.ca-role-picker,.ca-role-upload,.ca-empty,.ca-add,.ca-voice{background:#f7f8fa;border-color:var(--line-dark);border-radius:10px}.ca-role-trigger,.ca-role-option{border-color:var(--line-dark);border-radius:8px}.ca-role-option.is-selected{background:#edf1ff;border-color:#c4d0f8}.ca-role-empty-icon{background:#edf1ff;color:var(--blue)}.ca-role-title small,.ca-role-picker p,.ca-source small{color:var(--muted)}
.ca-card textarea:focus,.ca-card input:focus,.ca-card select:focus{outline:2px solid #687fd3}.ca-card-title{flex-wrap:wrap}.ca-card-title span{color:var(--muted)}.pq-panel,.pq-item,.ca-history-item{background:#fff;border-color:var(--line);border-radius:10px}.pq-stage-track{background:#edf0f5}.pq-stage-track>i{background:#687fd3}
.generation-action-compact{background:#edf1ff!important;border-color:#c4d0f8!important;color:#315ee8!important}.generation-action-compact::before{color:#315ee8}.generation-action-compact:hover:not(:disabled){background:#e2e9ff!important;border-color:#a9bcef!important}
@media(max-width:1250px){.view{padding:24px}.topbar{padding:0 24px}.buyer-layout{grid-template-columns:minmax(0,1fr)}.buyer-side{position:static}.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#projectListPane,#projectEditorPane{width:calc(100% - 48px)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* One board card owns upload, preview and replacement. */
.photo-board-tools{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}.photo-board-card.is-empty{grid-template-columns:minmax(0,1fr);min-height:130px;padding:20px}.photo-board-card.is-empty>div{align-items:flex-start}.photo-board-card .photo-board-tools button{min-height:40px;padding:8px 12px;font-size:13px}.photo-board-row{align-items:stretch}.photo-board-actions .photo-build-button{height:100%;min-height:130px;margin:0}.photo-source-empty{grid-template-columns:40px minmax(0,1fr);min-height:72px;padding:12px 16px}.photo-board-card .danger-button{border-color:transparent;color:#ac5045;background:transparent}

/* Shared production forms: aligned controls and one upload entry per source. */
.photo-model-controls{grid-template-columns:minmax(240px,.55fr) minmax(0,1.45fr);align-items:end;gap:16px}.photo-model-count-note{min-height:44px;margin:0;padding:0 0 0 16px;border:0;border-left:2px solid #dce2eb;border-radius:0;background:transparent;justify-content:center}.photo-model-count-note>strong{display:none}.photo-model-count-note>span{font-size:13px;line-height:1.65}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.field>span{min-height:22px;line-height:22px}.field>span small{display:inline;font-size:12px;line-height:inherit}.field>input,.field>select{flex:none}
.form-grid:has(>.model-managed-note){align-items:end}.model-managed-note{min-height:44px;padding:0 0 0 16px;border:0;border-left:2px solid #dce2eb;border-radius:0;background:transparent;display:flex;flex-direction:column;justify-content:center;color:var(--muted)}.model-managed-note>b{display:none}.model-managed-note>span{font-size:13px;line-height:1.65}
.buyer-section-head{align-items:flex-start;gap:12px;flex-wrap:wrap}.buyer-section-head>div:not(.seed-head-actions){flex:1 1 240px;min-width:0}.buyer-section-head .seed-head-actions{flex:0 1 auto;flex-wrap:wrap;justify-content:flex-end;gap:8px}.seed-head-actions button{flex-shrink:0;white-space:nowrap}.buyer-section-head>div>small{display:none}.buyer-section-head h3{font-size:17px;margin:0 0 6px}body .buyer-section-head p{font-size:13px;line-height:1.65}.buyer-section-head>span{margin-top:2px;flex:none}
.design-asset-empty:not(:has(button)),.seed-asset-empty:not(:has(button)){grid-template-columns:40px minmax(0,1fr);min-height:72px;padding:12px 16px;background:#f7f8fa}.design-asset-empty small,.seed-asset-empty small{font-size:12px;line-height:1.65}.seed-output-settings{grid-template-columns:minmax(0,1fr) minmax(110px,.55fr) minmax(0,1fr);gap:12px}.seed-output-settings>label{min-width:0}.seed-output-settings input,.seed-output-settings select{height:44px;font-size:14px;max-width:100%;min-width:0}
.pv-scene-control{align-items:center;gap:16px;flex-wrap:wrap;background:#f7f8fa}.pv-scene-control>label{flex:1 1 280px;min-width:0}.pv-scene-actions{flex-wrap:wrap}.pv-scene-control small{font-size:12px}.pv-scene-control strong{font-size:13px}.pv-scene-actions button{min-height:44px;height:auto}
.ca-options,.sv-fields-grid{align-items:start;gap:16px}.ca-options>label,.sv-fields-grid>label{min-width:0;line-height:22px}.ca-options input,.ca-options select,.sv-fields-grid input,.sv-fields-grid select{min-height:44px}.ca-card-title{align-items:baseline;flex-wrap:wrap}.ca-card-title>span{font-size:12px}.ca-actions,.sv-actions{flex-wrap:wrap;gap:8px}.buyer-reference-info,.seed-asset-info,.design-module-body{min-width:0}.generation-action-button{min-height:72px}.photo-board-actions .photo-build-button{min-height:100px}.photo-board-card.is-empty{min-height:100px}
@media(max-width:1250px){.photo-model-controls{grid-template-columns:minmax(0,1fr)}.photo-model-count-note{min-height:0;border-left:0;padding:0;margin-top:-8px}.buyer-section-head .seed-head-actions{justify-content:flex-start}.seed-output-settings{grid-template-columns:repeat(2,minmax(0,1fr))}.seed-output-settings>.generation-action-button{grid-column:1/-1}}

/* One shared action bar: context on the left, real button on the right. */
.production-action-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;padding:18px 20px;margin:14px 0;border:1px solid var(--line);border-radius:10px;background:#f7f8fa;grid-column:1/-1;min-width:0}.production-action-copy{min-width:0}.production-action-copy strong{display:block;font-size:14px;color:var(--ink)}.production-action-copy small{display:block;font-size:12px;line-height:1.65;color:var(--muted);margin-top:4px}.production-action-row>.production-start-button{width:auto;min-width:120px;min-height:44px;height:auto;justify-self:end;margin:0;white-space:nowrap}
.photo-board-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:20px;padding:16px;background:#f7f8fa;border:1px solid var(--line);border-radius:10px}.photo-board-row>.photo-board-card{grid-column:1;grid-row:1;border:0;padding:0;background:transparent;min-height:0}.photo-board-row>.photo-board-actions{grid-column:2;grid-row:1;align-self:center;display:block}.photo-board-actions>.board-generation-action{display:block;margin:0;padding:0;border:0;background:transparent}.board-generation-action>.production-action-copy{display:none}.photo-board-card.is-empty{padding:0;min-height:0}.photo-board-card>button{max-width:150px}.photo-board-card .photo-board-tools{margin-top:4px}
.ca-submit-row .pq-submit,.sv-workspace .pq-submit,.pq-submit{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:20px;max-width:none;padding:16px 0;margin:0;min-width:0}.ca-submit-row .pq-submit button,.pq-submit>.primary-button,.ca-submit-row .pq-submit-next{width:auto;min-width:120px;min-height:44px;order:2;flex:0 0 auto}.pq-submit>small{position:static;order:1;text-align:left;color:var(--muted);font-size:12px;line-height:1.65;flex:1;min-width:0}.seed-output-settings>.production-action-row{grid-column:1/-1}
@media(max-width:900px){.production-action-row{gap:12px;padding:14px}.photo-board-row{gap:12px}.photo-board-card{grid-template-columns:100px minmax(0,1fr)}.photo-board-card.is-empty{grid-template-columns:minmax(0,1fr)}}

/* Large right-hand action tiles; neutral text-entry focus. */
body input:not([type=checkbox]):not([type=radio]):focus,body textarea:focus,body input:not([type=checkbox]):not([type=radio]):focus-visible,body textarea:focus-visible{outline:none!important;box-shadow:none!important;border-color:var(--line-dark)!important}
.production-action-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;padding:0;background:transparent;border:0;gap:16px}.production-action-row>.production-action-copy{padding:20px;display:flex;flex-direction:column;justify-content:center;border:1px solid var(--line);border-radius:10px;background:#f7f8fa}
.production-action-row>.production-start-button{width:100%;height:100%;min-height:128px;min-width:0;padding:22px;display:grid;grid-template-columns:40px minmax(0,1fr) 20px;gap:14px;text-align:left;border-radius:10px;white-space:normal;align-items:center}.production-start-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:#ffffff20;font-size:22px}.production-start-content{min-width:0}.production-start-content strong{display:block;font-size:16px;line-height:1.5}.production-start-content small{display:block;margin-top:5px;font-size:12px;line-height:1.65;color:#edf1ff}.production-start-arrow{font-size:20px;text-align:right}
.photo-board-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;padding:0;background:transparent;border:0;gap:16px}.photo-board-row>.photo-board-card{padding:14px;border:1px solid var(--line);border-radius:10px;background:#f7f8fa;min-width:0;grid-template-columns:minmax(90px,.85fr) minmax(0,1fr)}.photo-board-row>.photo-board-card.is-empty{grid-template-columns:minmax(0,1fr)}.photo-board-row>.photo-board-actions{align-self:stretch;min-width:0}.photo-board-actions>.board-generation-action{height:100%}.board-generation-action>.production-action-copy{display:none}.photo-board-card>button{max-width:none}.photo-board-card .photo-board-tools{gap:4px}.photo-board-card .photo-board-tools button{padding:7px 9px}
.ca-submit-row .pq-submit,.sv-workspace .pq-submit,.pq-submit{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:16px}.ca-submit-row .pq-submit button,.pq-submit>.primary-button{width:100%;min-height:128px;font-size:16px;white-space:normal;min-width:0}.pq-submit>small{display:flex;align-items:center;padding:20px;background:#f7f8fa;border:1px solid var(--line);border-radius:10px}
.unified-presets{grid-template-columns:minmax(0,1fr)}.unified-presets .volc-model-list{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:1250px){.unified-presets .volc-model-list{grid-template-columns:minmax(0,1fr)}}
