:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: #18211f;
  background: #eef1ef;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  letter-spacing: 0;
  line-height: 1.45;
  --ink: #18211f;
  --muted: #6f7975;
  --line: #dce2df;
  --line-strong: #cdd5d1;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --canvas: #eef1ef;
  --teal: #16786f;
  --teal-dark: #0f5e58;
  --teal-soft: #e2f1ee;
  --coral: #df6a4d;
  --amber: #a96a17;
  --red: #b84b48;
  --shadow: 0 8px 24px rgba(35, 54, 48, 0.08);
}

* { box-sizing: border-box; }
html, body, #root { width: 100%; min-width: 1180px; min-height: 100%; margin: 0; }
body { min-height: 100vh; overflow: hidden; background: var(--canvas); }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #32958c; outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
img { display: block; max-width: 100%; }

.app-shell { display: grid; grid-template-columns: 226px minmax(0, 1fr); min-height: 100vh; }
.sidebar { height: 100vh; display: flex; flex-direction: column; color: #dde5e2; background: #172320; border-right: 1px solid #25322f; }
.brand-row { height: 76px; display: flex; align-items: center; gap: 11px; padding: 0 18px; border-bottom: 1px solid #2a3734; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: var(--coral); font-weight: 800; font-size: 13px; }
.brand-row > div:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.brand-row strong { font-size: 14px; color: #fff; white-space: nowrap; }
.brand-row span { font-size: 12px; color: #80908b; text-transform: uppercase; }
.main-nav { flex: 1; overflow-y: auto; padding: 16px 10px; scrollbar-width: thin; }
.nav-group + .nav-group { margin-top: 20px; }
.nav-label { display: block; padding: 0 10px 7px; color: #74847f; font-size: 12px; font-weight: 700; }
.nav-item { width: 100%; height: 38px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 7px; padding: 0 10px; border: 0; border-radius: 5px; color: #aebbb7; background: transparent; cursor: pointer; text-align: left; font-size: 13px; }
.nav-item:hover { color: #fff; background: #202f2b; }
.nav-item.active { color: #fff; background: #2b3b37; box-shadow: inset 3px 0 var(--coral); }
.nav-item small { min-width: 24px; padding: 2px 5px; border-radius: 4px; color: #aebbb7; background: #33443f; text-align: center; font-size: 12px; }
.nav-item.active small { color: #fff; background: #47605a; }
.sidebar-foot { flex: 0 0 auto; padding: 13px 14px 15px; border-top: 1px solid #2a3734; }
.storage-summary { width: 100%; display: block; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.storage-summary:hover .storage-meter b { color: #fff; }
.storage-summary:focus-visible { border-radius: 4px; outline-color: #69b5a8; }
.storage-summary > small { display: block; margin-top: -8px; color: #71827c; font-size: 10px; }
.storage-meter { display: flex; align-items: center; justify-content: space-between; color: #8fa09b; font-size: 12px; }
.storage-meter span { display: flex; align-items: center; gap: 5px; }
.storage-meter b { color: #dbe5e1; font-size: 12px; }
.meter { height: 4px; margin: 8px 0 14px; overflow: hidden; border-radius: 2px; background: #2f3c39; }
.meter i { display: block; height: 100%; background: #d27a47; }
.storage-summary .meter { width: 100%; display: block; }
.storage-summary.storage-ok .meter i { background: #4ea98c; }
.storage-summary.storage-warning .meter i { background: #d39143; }
.storage-summary.storage-critical .meter i { background: #d36357; }
.origin-status { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; }
.origin-status div { display: flex; flex-direction: column; gap: 1px; }
.origin-status strong { font-size: 13px; color: #dce5e2; }
.origin-status small { font-size: 12px; color: #71827c; }
.live-dot, .idle-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #36b688; box-shadow: 0 0 0 3px rgba(54, 182, 136, 0.13); }
.idle-dot { background: #9ca7a4; box-shadow: none; }

.main-area { min-width: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 76px; flex: 0 0 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.94); }
.topbar-title span { color: var(--muted); font-size: 12px; }
.topbar-title h1 { margin: 4px 0 0; font-size: 20px; line-height: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.project-switch, .model-status { height: 48px; display: flex; align-items: center; gap: 9px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); cursor: pointer; }
.project-switch:hover, .model-status:hover { border-color: #b8c5c0; background: var(--surface-soft); }
.project-thumb { width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 4px; color: #7b8884; background: #e8edeb; }
.project-thumb img { display: none; width: 100%; height: 100%; object-fit: cover; }
.project-thumb.has-image img { display: block; }
.project-thumb.has-image svg { display: none; }
.danger-button { border-color: #e3c6c2; color: #a04e47; background: #fff9f8; }
.danger-button:hover { border-color: #ca8e87; color: #8f3e37; background: #fff2f0; }
.project-switch > span:nth-child(2), .model-status > span:nth-child(2) { min-width: 112px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.project-switch small, .model-status small { color: var(--muted); font-size: 12px; }
.project-switch b, .model-status b { font-size: 13px; }
.model-status { border: 0; background: transparent; }
.model-status > span:nth-child(2) { min-width: 90px; }
.top-separator { width: 1px; height: 30px; background: var(--line); }
.workspace { flex: 1; min-height: 0; overflow: auto; }

.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; cursor: pointer; }
.icon-button:hover, .icon-button.active { border-color: var(--line); background: var(--surface-soft); }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; color: var(--teal); background: transparent; cursor: pointer; font-size: 13px; font-weight: 650; }
.text-button:hover { color: var(--teal-dark); }
.text-button.danger-text { color: #a94f47; }
.text-button.danger-text:hover { color: #803832; }
.primary-button, .secondary-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; border-radius: 5px; cursor: pointer; font-size: 13px; font-weight: 700; }
.primary-button { border: 1px solid var(--teal); color: #fff; background: var(--teal); }
.primary-button:hover { background: var(--teal-dark); }
.secondary-button { border: 1px solid var(--line-strong); color: #37413e; background: var(--surface); }
.secondary-button:hover { border-color: #abb9b4; background: var(--surface-soft); }
.wide { width: 100%; }
.inline-actions, .row-actions, .toolbar-controls { display: flex; align-items: center; gap: 7px; }
.section-title { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title-copy { display: flex; align-items: center; gap: 8px; min-width: 0; }
.section-title-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 5px; }
.section-title-copy > div { display: flex; flex-direction: column; gap: 2px; }
.section-title strong { font-size: 14px; }
.section-title span { color: var(--muted); font-size: 11px; }
.divider { height: 1px; margin: 15px 0 10px; background: var(--line); }

.studio-layout { height: calc(100vh - 76px); min-height: 680px; display: grid; grid-template-columns: 390px minmax(650px, 1fr); }
.control-pane { min-height: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.control-scroll { min-height: 0; flex: 1; padding: 16px 18px 22px; overflow-y: auto; scrollbar-width: thin; }
.product-identity { display: grid; grid-template-columns: 48px 1fr 28px; align-items: center; gap: 10px; margin: 10px 0 9px; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.product-identity img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.product-identity-empty { width: 48px; height: 48px; display: grid; place-items: center; border: 1px dashed #b9c5c1; border-radius: 4px; color: #74817d; background: #fff; }
.product-identity div { display: flex; flex-direction: column; gap: 2px; }
.product-identity span, .product-identity small { color: var(--muted); font-size: 12px; }
.product-identity strong { font-size: 13px; }
.product-identity button { border: 0; background: transparent; cursor: pointer; }
.reference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.reference-slot-shell { position: relative; min-width: 0; }
.reference-slot { position: relative; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; overflow: hidden; padding: 0; border: 1px dashed #b9c5c1; border-radius: 4px; color: #75817d; background: #f8faf9; cursor: pointer; }
.reference-slot-shell .reference-slot { width: 100%; }
.reference-slot:disabled { cursor: wait; opacity: .72; }
.reference-slot-shell.is-busy .reference-slot svg { animation: rotate .9s linear infinite; }
.reference-slot-shell.has-error .reference-slot { border-color: #ca8179; color: #994b44; background: #fff6f5; }
.reference-slot-shell.has-error .reference-slot small { max-width: calc(100% - 8px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-remove { position: absolute; top: 4px; right: 4px; z-index: 3; width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 3px; color: #fff; background: rgba(22,31,28,.72); cursor: pointer; }
.reference-slot.has-image { align-items: stretch; justify-content: flex-end; border-style: solid; color: #fff; background: #333; }
.reference-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.86; }
.reference-slot.has-image::after { content: ""; position: absolute; inset: 45% 0 0; background: rgba(16, 27, 24, 0.65); }
.reference-slot span, .reference-slot small { position: relative; z-index: 1; }
.reference-slot span { font-size: 12px; font-weight: 700; }
.reference-slot small { font-size: 11px; opacity: 0.8; }
.field-label { display: block; margin: 12px 0 6px; color: #5f6966; font-size: 12px; font-weight: 700; }
.segmented { height: 34px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 3px; border-radius: 5px; background: #edf1ef; }
.segmented button { border: 0; border-radius: 3px; color: #68736f; background: transparent; cursor: pointer; font-size: 12px; }
.segmented button.active { color: var(--ink); background: #fff; box-shadow: 0 1px 5px rgba(34, 52, 46, 0.12); font-weight: 700; }
.asset-preset-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--line); }
.asset-preset-strip > div { display: flex; flex-direction: column; gap: 3px; padding: 7px 8px; background: #f7f9f8; }
.asset-preset-strip small { color: var(--muted); font-size: 10px; }
.asset-preset-strip strong { font-size: 12px; }
.asset-preset-strip p { grid-column: 1 / 3; display: flex; align-items: center; gap: 5px; margin: 0; padding: 7px 8px; color: #557069; background: #edf6f3; font-size: 11px; }
.prompt-layers { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.prompt-layers label { display: grid; grid-template-columns: 88px 1fr; align-items: stretch; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.prompt-layers label > span { display: flex; align-items: center; gap: 4px; padding: 7px; color: #5d6965; background: #f5f8f6; font-size: 11px; font-weight: 800; }
.prompt-layers label > span svg { color: var(--teal); }
.prompt-layers textarea { width: 100%; height: 49px; resize: none; padding: 7px 8px; border: 0; border-left: 1px solid var(--line); color: #46514d; background: #fff; outline: 0; font-size: 11px; line-height: 1.45; }
.prompt-layers textarea[readonly] { color: #526861; background: #f3f8f6; }
.prompt-box { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.prompt-box:focus-within { border-color: #65a69e; box-shadow: 0 0 0 2px rgba(22, 120, 111, 0.08); }
.prompt-box textarea { width: 100%; height: 88px; display: block; resize: none; padding: 10px; border: 0; outline: 0; color: #303936; background: transparent; font-size: 12px; line-height: 1.6; }
.prompt-box.compact textarea { height: 92px; }
.prompt-meta { height: 28px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; border-top: 1px solid #edf0ef; color: #7c8783; background: #f8faf9; font-size: 11px; }
.prompt-meta span { display: flex; align-items: center; gap: 4px; color: var(--teal); }
.variable-layer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.variable-layer-head span { display: inline-flex; align-items: center; gap: 4px; color: #52615c; font-size: 11px; font-weight: 800; }
.variable-layer-head b { color: var(--teal); font-size: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0; }
.chip-row button { height: 25px; display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; color: #69736f; background: #fff; cursor: pointer; font-size: 11px; }
.variable-chips button small { padding: 2px 4px; border-radius: 2px; color: var(--teal); background: var(--teal-soft); font-size: 9px; font-weight: 800; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.two-fields.vertical { grid-template-columns: 1fr; }
.two-fields label { display: flex; flex-direction: column; gap: 5px; color: #65706c; font-size: 12px; font-weight: 700; }
select { width: 100%; height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: #313b38; background: #fff; outline: 0; font-size: 12px; }
.model-route-hint { min-height: 45px; display: grid; grid-template-columns: 17px 1fr auto; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 8px; border-left: 3px solid #507895; color: #315d79; background: #f0f5f8; }
.model-route-hint.manual { border-left-color: var(--teal); color: var(--teal); background: #edf6f3; }
.model-route-hint > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.model-route-hint strong { color: #3f5650; font-size: 11px; }
.model-route-hint small { overflow: hidden; color: #6b7974; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.model-route-hint .text-button { white-space: nowrap; }
.generate-footer { height: 74px; flex: 0 0 74px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 12px 18px; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -6px 18px rgba(31, 49, 43, 0.04); }
.count-stepper { height: 34px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 5px; }
.count-stepper button { width: 28px; height: 100%; display: grid; place-items: center; padding: 0; border: 0; background: #f7f9f8; cursor: pointer; }
.count-stepper b { min-width: 23px; text-align: center; font-size: 13px; }
.count-stepper span { padding-right: 7px; color: var(--muted); font-size: 11px; }
.cost { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cost small { color: var(--muted); font-size: 11px; }
.cost strong { font-size: 12px; }
.generate-button { min-width: 112px; height: 40px; }
.rotate { animation: rotate 1s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.result-pane { min-width: 0; padding: 15px 18px 24px; overflow-y: auto; background: var(--canvas); }
.result-toolbar { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.result-toolbar > div:first-child { display: flex; align-items: baseline; gap: 9px; }
.result-toolbar strong { font-size: 13px; }
.result-toolbar span { color: var(--muted); font-size: 12px; }
.toolbar-controls > button:not(.icon-button) { height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; cursor: pointer; font-size: 12px; }
.generation-progress { min-height: 55px; display: grid; grid-template-columns: 210px 1fr 42px; align-items: center; gap: 15px; margin: 7px 0 12px; padding: 0 13px; border: 1px solid #a9ccc6; border-radius: 5px; background: #f3faf8; }
.generation-progress > div:first-child { display: grid; grid-template-columns: 15px 1fr; gap: 2px 7px; }
.generation-progress b { font-size: 12px; }
.generation-progress small { grid-column: 2; color: #6c7a75; font-size: 11px; }
.generation-progress > span { color: var(--teal); font-size: 12px; text-align: right; }
.generation-error { min-height: 58px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 9px; margin: 7px 0 12px; padding: 9px 12px; border: 1px solid #d8aaa3; border-radius: 5px; color: #9b4138; background: #fff7f6; }
.generation-error > span { display: flex; flex-direction: column; gap: 3px; }
.generation-error strong { font-size: 12px; }
.generation-error small { color: #876863; font-size: 10px; }
.progress-line, .row-progress i { height: 4px; overflow: hidden; border-radius: 2px; background: #d9e6e2; }
.progress-line i, .row-progress b { display: block; height: 100%; background: var(--teal); }
.spinner { width: 12px; height: 12px; display: inline-block; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: rotate 0.9s linear infinite; }
.spinner.dark { border-color: #b8d5d0; border-top-color: var(--teal); }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); gap: 12px; }
.studio-result-empty { grid-column: 1 / -1; min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px dashed #b9c6c2; border-radius: 6px; color: #71807b; background: #f7f9f8; }
.studio-result-empty > svg { color: var(--teal); }
.studio-result-empty > span { display: flex; flex-direction: column; gap: 4px; }
.studio-result-empty strong { color: #33413c; font-size: 13px; }
.studio-result-empty small { font-size: 11px; }
.asset-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.asset-card.selected { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(22, 120, 111, 0.1); }
.asset-image { position: relative; width: 100%; aspect-ratio: 1 / 1; display: block; overflow: hidden; padding: 0; border: 0; background: #dfe3e1; cursor: pointer; }
.asset-image > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s; }
.asset-card:hover .asset-image > img { transform: scale(1.025); }
.asset-index { position: absolute; top: 8px; left: 8px; min-width: 24px; padding: 3px 5px; border-radius: 3px; color: #fff; background: rgba(18, 28, 25, 0.67); font-size: 11px; }
.select-check { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.88); border-radius: 4px; color: #fff; background: rgba(19, 34, 30, 0.32); }
.asset-card.selected .select-check { border-color: var(--teal); background: var(--teal); }
.asset-hover-actions { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 3px; opacity: 0; transform: translateY(4px); transition: 0.15s; }
.asset-hover-actions .icon-button { color: #fff; background: rgba(20, 29, 26, 0.78); }
.asset-card:hover .asset-hover-actions { opacity: 1; transform: none; }
.asset-info { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.asset-info > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.asset-info strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.asset-info span { color: var(--muted); font-size: 11px; }
.result-decision-bar { height: 32px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); background: #f8faf9; }
.result-decision-bar button { display: grid; place-items: center; border: 0; border-right: 1px solid var(--line); color: #6c7974; background: transparent; cursor: pointer; }
.result-decision-bar button:last-child { border-right: 0; }
.result-decision-bar button:hover, .result-decision-bar button.active { color: var(--teal); background: #e7f3ef; }
.result-decision-bar button[data-result-decision="rejected"].active { color: #a14a41; background: #f8e9e7; }
.asset-card.review-busy { outline: 1px solid #9abfb7; }
.result-decision-bar button:disabled { cursor: wait; opacity: .55; }
.review-error { display: flex; align-items: center; gap: 5px; padding: 7px 8px; border: 1px solid #e1b8b2; border-radius: 4px; color: #98483f; background: #fff5f3; font-size: 10px; line-height: 1.4; }
.result-review-error { margin: 7px 0 12px; font-size: 11px; }
.quality-score { display: flex; align-items: center; gap: 3px; color: var(--teal) !important; font-weight: 700; }

.detail-studio-page { min-height: calc(100vh - 76px); display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.detail-flow, .detail-toolbar, .detail-panel { border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.detail-flow { min-height: 72px; display: grid; grid-template-columns: 360px 1fr; align-items: center; gap: 20px; padding: 11px 15px; }
.detail-flow > div { display: flex; flex-direction: column; gap: 4px; }
.detail-flow > div span { color: var(--coral); font-size: 12px; font-weight: 800; }
.detail-flow > div strong { font-size: 13px; }
.detail-flow ol { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; }
.detail-flow li { display: flex; align-items: center; gap: 6px; color: #65716d; font-size: 12px; font-weight: 700; }
.detail-flow li b { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: #76817d; font-size: 10px; }
.detail-flow li.active { color: var(--teal); }
.detail-flow li.active b { border-color: var(--teal); color: #fff; background: var(--teal); }
.detail-toolbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 12px; }
.detail-toolbar > div:first-child { display: flex; align-items: center; gap: 10px; }
.detail-toolbar > div:first-child > span { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.detail-toolbar .segmented { width: 390px; }
.detail-mode-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.detail-mode-switch button { min-width: 128px; height: 43px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; color: #61706a; background: #fff; cursor: pointer; text-align: left; }
.detail-mode-switch button.active { border-color: #85b6ae; color: var(--teal); background: #eaf5f2; }
.detail-mode-switch strong { font-size: 11px; }
.detail-mode-switch small { color: var(--muted); font-size: 10px; }
.detail-workbench { display: grid; grid-template-columns: 290px minmax(430px, 1fr) 330px; gap: 12px; align-items: stretch; }
.detail-panel { min-width: 0; padding: 14px; }
.detail-source-panel, .detail-plan-panel, .detail-output-panel { display: flex; flex-direction: column; }
.detail-template-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9f8; }
.detail-template-head > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.detail-template-head small { color: var(--muted); font-size: 10px; }
.detail-template-head strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.detail-template-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 7px; }
.detail-template-preview > div { position: relative; height: 105px; overflow: hidden; border-radius: 4px; background: #ddd; }
.detail-template-preview img { width: 100%; height: 100%; object-fit: cover; }
.detail-template-preview span { position: absolute; right: 4px; bottom: 4px; left: 4px; padding: 3px; border-radius: 2px; color: #fff; background: rgba(18, 29, 25, .68); text-align: center; font-size: 10px; }
.detail-style-lock, .detail-selling-points { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.detail-style-lock > span, .detail-selling-points > span { color: #56635e; font-size: 11px; font-weight: 800; }
.detail-style-lock textarea, .detail-selling-points textarea { width: 100%; height: 105px; resize: none; padding: 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: #4b5652; outline: 0; font-size: 11px; line-height: 1.5; }
.detail-free-plan { min-height: 120px; display: grid; grid-template-columns: 36px 1fr; gap: 9px; align-items: start; margin-top: 9px; padding: 14px; color: var(--teal); background: #eef6f4; }
.detail-free-plan > span { display: flex; flex-direction: column; gap: 5px; }
.detail-free-plan strong { color: #405650; font-size: 12px; }
.detail-free-plan small { color: #6d7b76; font-size: 11px; line-height: 1.5; }
.detail-product-source { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; margin-top: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9f8; }
.detail-product-source img { width: 52px; height: 52px; object-fit: cover; border-radius: 3px; }
.detail-product-source > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.detail-product-source small { color: var(--muted); font-size: 10px; }
.detail-product-source strong { font-size: 12px; }
.detail-product-source b { display: flex; align-items: center; gap: 3px; color: var(--teal); font-size: 10px; }
.product-visual-profile, .campaign-style-lock { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9f8; }
.product-visual-profile > div:first-child, .campaign-style-lock > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.product-visual-profile > div:first-child span, .campaign-style-lock > div:first-child span { display: inline-flex; align-items: center; gap: 4px; color: #4f625c; font-size: 11px; font-weight: 800; }
.product-visual-profile > div:first-child b, .campaign-style-lock > div:first-child b { color: var(--teal); font-size: 10px; }
.product-visual-profile dl { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 7px; margin: 7px 0 0; }
.product-visual-profile dl > div { min-width: 0; display: grid; grid-template-columns: 42px 1fr; gap: 4px; }
.product-visual-profile dt { color: var(--muted); font-size: 10px; }
.product-visual-profile dd { overflow: hidden; margin: 0; color: #4c5854; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.campaign-style-lock { border-color: #b8d4ce; background: #f1f8f6; }
.campaign-style-lock > div:first-child span, .campaign-style-lock > div:first-child b { color: var(--teal); }
.campaign-style-lock > div:first-child b { display: inline-flex; align-items: center; gap: 3px; }
.campaign-style-lock p { margin: 5px 0 7px; color: #61716c; font-size: 11px; line-height: 1.45; }
.campaign-style-lock > div:last-child { display: flex; flex-wrap: wrap; gap: 4px; }
.campaign-style-lock > div:last-child span { min-height: 23px; display: inline-flex; align-items: center; gap: 3px; padding: 0 5px; border: 1px solid #d5e5e1; border-radius: 3px; color: #526660; background: #fff; font-size: 10px; }
.campaign-style-lock i { width: 10px; height: 10px; border: 1px solid #c9d0cd; border-radius: 2px; }
.detail-template-library { margin-top: 9px; }
.detail-template-library > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; color: #56635e; font-size: 11px; font-weight: 800; }
.detail-template-library > div:first-child b { color: var(--teal); font-size: 10px; }
.detail-template-library > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.detail-template-library button { min-width: 0; min-height: 42px; display: grid; grid-template-columns: 17px 1fr; align-items: center; gap: 5px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 4px; color: #66736e; background: #fff; cursor: pointer; text-align: left; }
.detail-template-library button.active { border-color: #85b6ae; color: var(--teal); background: #eaf5f2; }
.detail-template-library button > span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.detail-template-library strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.detail-template-library small { color: var(--muted); font-size: 10px; }
.detail-selling-points textarea { height: 78px; }
.detail-selling-points small { color: var(--muted); font-size: 10px; }
.detail-source-panel > .secondary-button { margin-top: auto; }
.detail-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.detail-routing-note { min-height: 44px; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 8px; color: var(--teal); background: #eef6f4; }
.detail-routing-note > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.detail-routing-note strong { color: #415751; font-size: 11px; }
.detail-routing-note small { overflow: hidden; color: #6d7b76; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.detail-routing-note > b { font-size: 11px; }
.detail-module-list { margin-top: 6px; border-top: 1px solid var(--line); }
.detail-module-list article { min-height: 126px; display: grid; grid-template-columns: 28px minmax(0, 1fr) 30px; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.detail-module-list article > b { grid-column: 1; grid-row: 1; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 4px; color: var(--teal); background: var(--teal-soft); font-size: 11px; }
.detail-module-name { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.detail-module-list article > .icon-button { grid-column: 3; grid-row: 1; }
.detail-module-list strong { font-size: 11px; }
.detail-module-list small { color: var(--muted); font-size: 10px; }
.detail-module-contract { grid-column: 2 / 4; grid-row: 2; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.detail-module-contract > span { min-width: 0; display: grid; grid-template-columns: 52px 1fr; align-items: baseline; gap: 4px; }
.detail-module-contract small { color: #7a8581; font-size: 10px; }
.detail-module-contract strong { overflow: hidden; color: #4c5955; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.detail-module-list textarea { grid-column: 2 / 4; grid-row: 3; width: 100%; height: 36px; resize: none; padding: 7px; border: 1px solid var(--line); border-radius: 3px; color: #4a5551; background: #f8faf9; outline: 0; font-size: 11px; line-height: 1.4; }
.detail-plan-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 9px; }
.detail-plan-footer > span { display: flex; align-items: center; gap: 4px; color: var(--teal); font-size: 11px; }
.detail-plan-footer .secondary-button { min-height: 31px; font-size: 11px; }
.detail-output-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 8px; }
.detail-output-grid article { overflow: hidden; border: 1px solid var(--line); border-radius: 4px; }
.detail-output-grid article > div { position: relative; height: 84px; overflow: hidden; }
.detail-output-grid img { width: 100%; height: 100%; object-fit: cover; }
.detail-output-grid article > div span { position: absolute; top: 5px; left: 5px; padding: 3px 4px; border-radius: 2px; color: #fff; background: rgba(14, 24, 20, .68); font-size: 10px; }
.detail-output-grid strong, .detail-output-grid small { display: block; margin: 5px 6px 0; font-size: 11px; }
.detail-output-grid small { margin-top: 2px; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.detail-consistency-check { margin-top: 8px; padding: 8px; border: 1px solid #b8d4ce; border-radius: 4px; background: #f1f8f6; }
.detail-consistency-check > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.detail-consistency-check > div span { display: inline-flex; align-items: center; gap: 4px; color: #405b54; font-size: 11px; font-weight: 800; }
.detail-consistency-check > div b { color: var(--teal); font-size: 10px; }
.detail-consistency-check ul { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; margin: 7px 0 0; padding: 0; list-style: none; }
.detail-consistency-check li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 3px; color: #62706b; font-size: 10px; }
.detail-consistency-check li svg { color: var(--teal); }
.detail-consistency-check li strong { color: #42534e; font-size: 10px; }
.detail-generation-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--line); }
.detail-generation-summary > div { display: flex; flex-direction: column; gap: 3px; padding: 7px; background: #f7f9f8; }
.detail-generation-summary small { color: var(--muted); font-size: 10px; }
.detail-generation-summary strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.detail-scope-note { display: grid; grid-template-columns: 18px 1fr; gap: 6px; margin-top: 8px; padding: 8px; color: #526a64; background: #eef6f4; }
.detail-scope-note > span { display: flex; flex-direction: column; gap: 2px; }
.detail-scope-note strong { font-size: 11px; }
.detail-scope-note small { color: #71807b; font-size: 10px; line-height: 1.4; }
.detail-generate-button { min-height: 40px; margin-top: auto; }

.deconstruct-layout { min-height: 690px; display: grid; grid-template-columns: minmax(520px, 1.15fr) minmax(470px, 0.85fr); gap: 14px; padding: 16px; }
.source-column, .analysis-column, .video-source-pane, .video-control-pane, .table-panel, .provider-list, .budget-panel { border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.source-column, .analysis-column, .video-source-pane, .video-control-pane { padding: 16px; }
.compare-images { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.compare-images > div { position: relative; height: 370px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #ddd; }
.compare-images img { width: 100%; height: 100%; object-fit: cover; }
.compare-images > div > span { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 4px 7px; border-radius: 3px; color: #fff; background: rgba(20, 30, 27, 0.7); font-size: 12px; font-weight: 700; }
.compare-images > div > button { position: absolute; right: 9px; bottom: 9px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border: 0; border-radius: 4px; color: #fff; background: rgba(20, 30, 27, 0.74); font-size: 12px; cursor: pointer; }
.policy-note { display: flex; gap: 8px; margin: 12px 0; padding: 10px; color: #4e665f; background: #eff7f5; border-left: 3px solid var(--teal); }
.policy-note div { display: flex; flex-direction: column; gap: 3px; }
.policy-note strong { font-size: 12px; }
.policy-note span { color: #71807b; font-size: 12px; line-height: 1.4; }
.analysis-ready { display: inline-flex; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 3px; color: var(--teal) !important; background: var(--teal-soft); font-size: 11px !important; }
.analysis-list { margin: 10px 0 12px; border-top: 1px solid var(--line); }
.analysis-list label { display: grid; grid-template-columns: 48px 1fr; gap: 7px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.analysis-list label > span { padding-top: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.analysis-list textarea { width: 100%; resize: none; padding: 6px 8px; border: 1px solid transparent; border-radius: 4px; color: #34403c; background: #f7f9f8; outline: 0; font-size: 12px; line-height: 1.4; }
.analysis-list textarea:focus { border-color: #8ebbb5; background: #fff; }
.rebuild-summary { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1px; margin: 10px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--line); }
.rebuild-summary > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 9px; background: var(--surface-soft); }
.rebuild-summary small { color: var(--muted); font-size: 11px; }
.rebuild-summary strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.replicate-page { min-height: calc(100vh - 76px); display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.replicate-flow, .replicate-panel, .replicate-lineage { border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.replicate-flow { min-height: 74px; display: flex; align-items: center; gap: 20px; padding: 12px 15px; }
.flow-copy { width: 285px; flex: 0 0 285px; display: flex; flex-direction: column; gap: 4px; }
.flow-copy span { color: var(--coral); font-size: 12px; font-weight: 800; }
.flow-copy strong { font-size: 13px; line-height: 1.35; }
.flow-track { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.flow-track > span { min-width: 0; display: flex; align-items: center; gap: 6px; color: #56615d; font-size: 12px; font-weight: 700; white-space: nowrap; }
.flow-track > span b { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: #78837f; font-size: 11px; }
.flow-track > span.active { color: var(--teal); }
.flow-track > span.active b { border-color: var(--teal); color: #fff; background: var(--teal); }
.flow-track > span.done { color: #527068; }
.flow-track > span.done b { border-color: #90b9b1; color: var(--teal); background: #edf7f4; }
.flow-track > svg { flex: 0 0 auto; color: #a5afab; }

.replicate-workbench { display: grid; grid-template-columns: 286px minmax(430px, 1fr) 342px; gap: 12px; align-items: stretch; }
.replicate-panel { min-width: 0; padding: 14px; }
.competitor-preview { position: relative; aspect-ratio: 1 / 1; margin-top: 10px; overflow: hidden; border-radius: 5px; background: #dfe4e2; }
.competitor-preview img { width: 100%; height: 100%; object-fit: cover; }
.competitor-preview > span { position: absolute; top: 9px; left: 9px; padding: 4px 7px; border-radius: 3px; color: #fff; background: rgba(18, 29, 25, 0.72); font-size: 11px; font-weight: 700; }
.competitor-preview > button { position: absolute; right: 9px; bottom: 9px; display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border: 1px solid rgba(255,255,255,.55); border-radius: 4px; color: #fff; background: rgba(18, 29, 25, 0.76); cursor: pointer; font-size: 11px; }
.competitor-preview.empty { border: 1px dashed #b8c8c3; background: #f5f8f7; }
.competitor-empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px 20px 58px; color: #7a8984; text-align: center; }
.competitor-empty > svg { color: #75a79f; }
.competitor-empty > span { display: flex; flex-direction: column; gap: 4px; }
.competitor-empty strong { color: #4f5f5a; font-size: 13px; }
.competitor-empty small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.competitor-preview.empty > button { border-color: #344b44; color: #fff; background: #344b44; }
.source-facts { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 9px; }
.source-facts span { min-width: 0; max-width: 100%; display: inline-flex; align-items: center; gap: 4px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.source-facts span svg { flex: 0 0 auto; }
.analyze-button { margin-top: 10px; }

.recipe-step { display: flex; flex-direction: column; }
.recipe-step-head { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.recipe-step-head > .section-title { flex: 1; }
.mode-switch { height: 29px; display: flex; align-items: center; padding: 3px; border-radius: 4px; background: #edf1ef; }
.mode-switch button { height: 23px; padding: 0 9px; border: 0; border-radius: 3px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; }
.mode-switch button.active { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(34, 52, 46, 0.12); font-weight: 700; }
.visual-recipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.visual-recipe-grid label { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.visual-recipe-grid label > span { color: #5d6864; font-size: 12px; font-weight: 800; }
.visual-recipe-grid textarea { width: 100%; min-height: 72px; resize: vertical; padding: 8px 9px; border: 1px solid var(--line); border-radius: 4px; color: #37413e; background: #f8faf9; outline: 0; font-size: 13px; line-height: 1.5; }
.visual-recipe-grid textarea:focus { border-color: #73aba4; background: #fff; box-shadow: 0 0 0 2px rgba(22,120,111,.07); }
.simple-recipe { min-height: 126px; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; margin-top: 12px; padding: 18px; border: 1px solid #cfe2de; border-radius: 5px; background: #f3f9f7; }
.recipe-summary-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 5px; color: var(--teal); background: #dcefeb; }
.simple-recipe strong { font-size: 12px; }
.simple-recipe p { margin: 7px 0 0; color: #5f6c67; font-size: 12px; line-height: 1.65; }
.recipe-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.recipe-tags span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; color: #5f6b67; background: #fff; font-size: 11px; }
.replica-analysis-state { min-height: 202px; display: flex; align-items: center; justify-content: center; gap: 11px; margin-top: 12px; padding: 20px; border: 1px dashed #c5d2ce; border-radius: 5px; color: #74817d; background: #f7f9f8; text-align: center; }
.replica-analysis-state > svg { flex: 0 0 auto; color: #7ca9a1; }
.replica-analysis-state > span { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.replica-analysis-state strong { color: #4b5d58; font-size: 13px; }
.replica-analysis-state small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.replica-analysis-state.loading { border-style: solid; border-color: #c8dfda; color: var(--teal); background: #f0f7f5; text-align: left; }
.replica-analysis-state.loading .spinner { flex: 0 0 auto; }
.negative-constraints { display: grid; grid-template-columns: 50px 1fr; gap: 7px; align-items: start; margin-top: 10px; padding: 9px; border-left: 3px solid #c96a56; color: #77574f; background: #fbf3f1; }
.negative-constraints span { padding-top: 1px; font-size: 12px; font-weight: 800; }
.negative-constraints p { margin: 0; font-size: 11px; line-height: 1.45; }
.negative-constraints.editable textarea { width: 100%; min-height: 64px; max-height: 160px; resize: vertical; padding: 7px 8px; border: 1px solid #e3c8c1; border-radius: 4px; color: #6f514a; background: rgba(255,255,255,.72); outline: 0; font-size: 13px; line-height: 1.5; }
.negative-constraints.editable textarea:focus { border-color: #ca8b7c; background: #fff; box-shadow: 0 0 0 2px rgba(201,106,86,.08); }
.recipe-actions { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 12px; }
.recipe-actions .secondary-button { min-height: 32px; padding: 0 9px; font-size: 12px; }
.prompt-preview-button { margin-left: auto; white-space: nowrap; }

.own-product-card { display: grid; grid-template-columns: 66px 1fr 32px; align-items: center; gap: 9px; margin-top: 10px; padding: 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.own-product-card img { width: 66px; height: 66px; object-fit: cover; border-radius: 4px; }
.own-product-card > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.own-product-card span, .own-product-card small { color: var(--muted); font-size: 11px; }
.own-product-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.identity-locks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 8px 0 10px; }
.identity-locks span { display: inline-flex; align-items: center; justify-content: center; gap: 3px; height: 26px; border-radius: 4px; color: #4b6a63; background: #eaf4f1; font-size: 11px; font-weight: 700; }
.generation-route { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.generation-route label { min-width: 0; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.generation-route select { min-width: 0; font-size: 12px; }
.image-model-control { margin-top: 9px; }
.replica-output { position: relative; width: 100%; height: auto; aspect-ratio: 1 / 1; margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #dce3e0; }
.replica-output img { width: 100%; height: 100%; object-fit: contain; }
.replica-output.generating img { opacity: .52; }
.replica-output.empty { background: #f2f5f4; }
.replica-output-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 16px 16px 64px; color: #7b8984; text-align: center; }
.replica-output-empty > svg { color: #94aaa4; }
.replica-output-empty span { font-size: 11px; }
.output-status { position: absolute; right: 8px; bottom: 8px; left: 8px; min-height: 42px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 7px; padding: 7px 9px; border-radius: 4px; color: #fff; background: rgba(20, 32, 28, .78); backdrop-filter: blur(5px); }
.output-status > span:first-child { display: flex; align-items: center; gap: 4px; grid-row: 1 / span 2; color: #d4f2ea; font-size: 11px; }
.output-status strong { font-size: 12px; }
.output-status small { color: #cbd6d2; font-size: 11px; }
.replica-result-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.replica-result-strip button { position: relative; min-width: 0; height: auto; aspect-ratio: 1 / 1; overflow: hidden; padding: 0; border: 2px solid transparent; border-radius: 4px; background: #dfe5e2; cursor: pointer; }
.replica-result-strip button.active { border-color: var(--teal); }
.replica-result-strip img { width: 100%; height: 100%; object-fit: cover; }
.replica-result-strip span { position: absolute; right: 3px; bottom: 3px; min-width: 19px; padding: 2px 4px; border-radius: 2px; color: #fff; background: rgba(19,31,27,.72); font-size: 9px; font-weight: 800; }
.output-meta { display: flex; justify-content: space-between; margin: 8px 0; color: var(--muted); font-size: 11px; }
.replica-inline-error { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 7px; margin-top: 9px; padding: 8px 9px; border-left: 3px solid #c96a56; color: #9b5545; background: #fbf2f0; }
.replica-inline-error > svg { align-self: start; margin-top: 1px; }
.replica-inline-error > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.replica-inline-error strong { color: #784d43; font-size: 11px; }
.replica-inline-error small { color: #88665e; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.replica-inline-error .text-button { white-space: nowrap; }
.result-feedback { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 8px 0; padding: 5px 6px; border: 1px solid var(--line); border-radius: 4px; background: #f8faf9; }
.result-feedback > span { display: flex; align-items: center; gap: 3px; color: #66726e; font-size: 12px; white-space: nowrap; }
.result-feedback > div { display: flex; gap: 3px; }
.result-feedback button { height: 29px; display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; border: 1px solid transparent; border-radius: 3px; color: #66716d; background: transparent; cursor: pointer; font-size: 12px; }
.result-feedback button:hover { border-color: var(--line); background: #fff; }
.result-feedback button.active { border-color: #9bc6bf; color: var(--teal); background: #e8f4f1; }
.create-replica-button { min-height: 40px; }

.replicate-lineage { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 14px; }
.replicate-lineage > div { display: flex; align-items: center; gap: 9px; color: var(--teal); }
.replicate-lineage > div > span { display: flex; flex-direction: column; gap: 3px; }
.replicate-lineage strong { color: var(--ink); font-size: 12px; }
.replicate-lineage small { color: var(--muted); font-size: 11px; }
.lineage-id { padding: 5px 7px; border-radius: 4px; color: #6d7974; background: #f0f3f2; font-family: Consolas, monospace; font-size: 11px; }

.prompt-modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 30px; background: rgba(16, 27, 23, .46); }
.prompt-modal { width: min(650px, 100%); max-height: calc(100vh - 60px); overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 22px 70px rgba(13, 25, 21, .28); }
.prompt-modal-head { min-height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.prompt-modal-head > div { display: flex; flex-direction: column; gap: 4px; }
.prompt-modal-head span { color: var(--muted); font-size: 11px; }
.prompt-modal-head strong { font-size: 15px; }
.prompt-layer { display: grid; grid-template-columns: 125px 1fr; gap: 14px; margin: 0 17px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.prompt-layer span { color: var(--teal); font-size: 12px; font-weight: 800; }
.prompt-layer p { margin: 0; overflow-wrap: anywhere; color: #4b5652; font-size: 12px; line-height: 1.65; }
.prompt-modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 17px; background: #f7f9f8; }
.feedback-modal { width: min(720px, 100%); overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 22px 70px rgba(13, 25, 21, .28); }
.feedback-body { display: grid; grid-template-columns: 230px 1fr; gap: 16px; padding: 16px; }
.feedback-result-preview { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 5px; background: #dfe4e2; }
.feedback-result-preview img { width: 100%; height: 100%; object-fit: cover; }
.feedback-result-preview > span { position: absolute; top: 9px; left: 9px; padding: 4px 7px; border-radius: 3px; color: #fff; background: rgba(18, 29, 25, .72); font-size: 11px; }
.feedback-form { min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.feedback-form > label { color: #53605b; font-size: 12px; font-weight: 800; }
.feedback-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.feedback-reasons button { height: 28px; display: inline-flex; align-items: center; gap: 3px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; color: #65716d; background: #fff; cursor: pointer; font-size: 11px; }
.feedback-reasons button.active { border-color: #8dbeb6; color: var(--teal); background: #eaf5f2; }
.feedback-form textarea { width: 100%; height: 72px; resize: none; padding: 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: #46514d; outline: 0; font-size: 12px; line-height: 1.5; }
.feedback-form textarea:focus { border-color: #73aba4; box-shadow: 0 0 0 2px rgba(22,120,111,.07); }
.memory-effect { display: grid; grid-template-columns: 20px 1fr; gap: 7px; align-items: start; margin-top: auto; padding: 9px; color: var(--teal); background: #eef6f4; }
.memory-effect > span { display: flex; flex-direction: column; gap: 3px; }
.memory-effect strong { color: #45635c; font-size: 11px; }
.memory-effect small { color: #6d7b76; font-size: 11px; line-height: 1.45; }

.mask-feedback-modal { width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.mask-feedback-body { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(560px, 1.5fr) minmax(300px, .8fr); gap: 0; overflow: hidden; }
.mask-feedback-body > .feedback-form { padding: 16px; overflow-y: auto; border-left: 1px solid var(--line); }
.mask-editor-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 12px; background: #edf1ef; }
.mask-toolbar { min-height: 46px; display: grid; grid-template-columns: auto auto minmax(170px, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.mask-tool-group, .mask-history-group { display: flex; align-items: center; gap: 4px; }
.mask-tool-group { padding: 3px; border-radius: 4px; background: #eef2f0; }
.mask-tool-group button { height: 30px; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border: 0; border-radius: 3px; color: #67736f; background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; }
.mask-tool-group button.active { color: #fff; background: var(--teal); }
.mask-history-group .icon-button { width: 30px; height: 30px; border-color: var(--line); }
.mask-brush-control { min-width: 0; display: grid; grid-template-columns: 76px minmax(90px, 1fr); align-items: center; gap: 8px; color: #5b6863; font-size: 10px; font-weight: 750; }
.mask-brush-control b { color: var(--teal); font-size: 10px; }
.mask-brush-control input { width: 100%; accent-color: var(--teal); }
.mask-coverage { min-width: 78px; padding: 5px 7px; border-radius: 3px; color: var(--teal); background: #e5f3ef; font-size: 10px; font-weight: 800; text-align: center; }
.mask-coverage.warning { color: #9c522d; background: #faeee7; }
.mask-stage-wrap { min-height: 300px; flex: 1; display: grid; place-items: center; margin-top: 10px; overflow: auto; border: 1px solid #cbd4d0; border-radius: 5px; background: #d9dfdc; }
.mask-canvas-stage { position: relative; width: 100%; max-height: 100%; overflow: hidden; background: #cfd6d3; }
.mask-canvas-stage img, .mask-canvas-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mask-canvas-stage img { object-fit: contain; }
.mask-canvas-stage canvas { z-index: 2; cursor: crosshair; touch-action: none; }
.mask-editor-state { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #50605a; font-size: 12px; }
.mask-editor-state.error { flex-direction: column; color: #994b44; }
.mask-contract { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 3px 0; }
.mask-contract > span { display: inline-flex; align-items: center; gap: 5px; color: var(--teal); font-size: 10px; }
.mask-contract small { color: var(--muted); font-size: 10px; }
.mask-feedback-modal .prompt-modal-actions { flex: 0 0 auto; border-top: 1px solid var(--line); }

.storage-modal { width: min(900px, calc(100vw - 40px)); max-height: calc(100vh - 40px); overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 22px 70px rgba(13, 25, 21, .28); }
.storage-modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-height: calc(100vh - 190px); overflow-y: auto; }
.storage-modal-body > section { min-height: 180px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 16px; border-bottom: 1px solid var(--line); }
.storage-modal-body > section:nth-child(odd) { border-right: 1px solid var(--line); }
.storage-section-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.storage-section-head > span { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); }
.storage-section-head strong { color: #34413d; font-size: 12px; }
.storage-section-head > b { padding: 4px 6px; border-radius: 3px; color: #5f6d68; background: #eef2f0; font-size: 10px; }
.storage-section-head .storage-level-ok { color: var(--teal); background: #e6f3ef; }
.storage-section-head .storage-level-warning { color: #9b6520; background: #fbf1df; }
.storage-section-head .storage-level-critical { color: #a84d45; background: #f9e9e7; }
.storage-modal-body > section > strong { margin-top: 5px; font-size: 14px; }
.storage-modal-body p, .storage-modal-body small { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.storage-modal-body section > button, .storage-cleanup > div:last-child { margin-top: auto; }
.storage-cleanup > div:last-child { display: flex; gap: 6px; }
.storage-capacity-bar { width: 100%; height: 7px; overflow: hidden; border-radius: 4px; background: #e4e9e7; }
.storage-capacity-bar i { display: block; height: 100%; background: var(--teal); }
.storage-message { grid-column: 1 / -1; min-height: 42px; display: flex; align-items: center; gap: 7px; padding: 9px 16px; color: #52625c; background: #f1f6f4; font-size: 11px; }

@media (max-width: 900px) {
  .prompt-modal-backdrop { padding: 0; }
  .mask-feedback-modal { width: 100vw; height: 100vh; max-height: 100vh; border: 0; border-radius: 0; }
  .mask-feedback-body { grid-template-columns: 1fr; overflow-y: auto; }
  .mask-feedback-body > .feedback-form { border-top: 1px solid var(--line); border-left: 0; }
  .mask-editor-pane { min-height: 620px; }
  .mask-toolbar { position: sticky; top: 0; z-index: 4; grid-template-columns: auto auto 1fr; }
  .mask-coverage { grid-column: 1 / -1; }
  .storage-modal { width: 100vw; height: 100vh; max-height: 100vh; border: 0; border-radius: 0; }
  .storage-modal-body { grid-template-columns: 1fr; max-height: calc(100vh - 142px); }
  .storage-modal-body > section:nth-child(odd) { border-right: 0; }
}

.memory-page { min-height: calc(100vh - 76px); display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.memory-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.memory-summary > div { min-height: 84px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.memory-summary span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.memory-summary span svg { color: var(--teal); }
.memory-summary strong { font-size: 20px; }
.memory-summary small { color: #84908c; font-size: 11px; }
.memory-principle, .memory-storage { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.memory-principle > div, .memory-storage > span { min-width: 0; display: flex; align-items: center; gap: 9px; }
.memory-principle > div > span, .memory-storage > span { flex-direction: column; align-items: flex-start; gap: 3px; }
.memory-principle svg, .memory-storage > svg { flex: 0 0 auto; color: var(--teal); }
.memory-principle strong, .memory-storage strong { font-size: 12px; }
.memory-principle small, .memory-storage small { color: var(--muted); font-size: 11px; }
.memory-columns { display: grid; grid-template-columns: 300px minmax(420px, 1fr) 340px; gap: 12px; align-items: stretch; }
.memory-panel { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.memory-product { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 9px; margin-top: 10px; padding: 7px; border: 1px solid var(--line); border-radius: 5px; background: #f7f9f8; }
.memory-product img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.memory-product > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.memory-product small { color: var(--muted); font-size: 11px; }
.memory-product strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.memory-product b { display: inline-flex; align-items: center; gap: 3px; color: var(--teal); font-size: 11px; }
.reference-coverage { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px; margin: 11px 0; }
.reference-coverage span, .reference-coverage b { color: var(--muted); font-size: 11px; }
.reference-coverage > div { height: 5px; overflow: hidden; border-radius: 3px; background: #dce6e2; }
.reference-coverage i { display: block; height: 100%; background: var(--teal); }
.immutable-fields > span { color: #596661; font-size: 11px; font-weight: 800; }
.immutable-fields > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.immutable-fields b { display: inline-flex; align-items: center; gap: 3px; padding: 5px 6px; border-radius: 4px; color: #4d6d65; background: #e9f4f1; font-size: 10px; }
.memory-reference-list { margin: 10px 0; border-top: 1px solid var(--line); }
.memory-reference-list article { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); }
.memory-reference-list span { display: flex; align-items: center; gap: 5px; color: #596560; font-size: 11px; }
.memory-reference-list b { color: var(--teal); font-size: 10px; }
.memory-reference-list article.missing b { color: var(--coral); }
.memory-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.memory-case-list { display: flex; flex-direction: column; margin-top: 8px; }
.memory-case-list article { min-height: 88px; display: grid; grid-template-columns: 70px 1fr 30px; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.memory-case-list article:first-child { border-top: 0; }
.memory-case-list article > img { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; }
.case-copy { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.case-copy > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.case-copy > span strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.case-copy > span b { flex: 0 0 auto; padding: 4px 6px; border-radius: 3px; font-size: 10px; }
.decision-selected { color: #247b5f; background: #e6f4ef; }
.decision-rework { color: #8a6819; background: #f6f0d8; }
.decision-rejected { color: #a14b45; background: #fae9e7; }
.case-copy > div { display: flex; flex-wrap: wrap; gap: 4px; }
.case-copy > div small { padding: 3px 5px; border-radius: 3px; color: #66716d; background: #f0f3f2; font-size: 10px; }
.case-copy p { margin: 0; color: var(--muted); font-size: 10px; }
.routing-rule-list { display: flex; flex-direction: column; margin-top: 9px; }
.routing-rule-list article { display: grid; grid-template-columns: 30px minmax(120px, 1fr) 62px; align-items: center; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line); }
.routing-rule-list article:first-child { border-top: 0; }
.rule-rank { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; color: var(--teal); background: var(--teal-soft); font-size: 11px; font-weight: 800; }
.routing-rule-list article > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.routing-rule-list span, .routing-rule-list small { color: var(--muted); font-size: 10px; }
.routing-rule-list article > div:nth-child(2) strong { font-size: 12px; }
.rule-score { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rule-score strong { color: var(--teal); font-size: 12px; }
.routing-rule-list p { grid-column: 2 / 4; display: flex; align-items: center; gap: 4px; margin: -4px 0 0; color: #71807b; font-size: 10px; }
.correction-rule-list article { grid-template-columns: 30px minmax(120px, 1fr); }
.correction-rule-list p { grid-column: 2; }
.routing-guard { display: grid; grid-template-columns: 20px 1fr; gap: 7px; margin: 10px 0; padding: 9px; color: #526a64; background: #eef6f4; }
.routing-guard > span { display: flex; flex-direction: column; gap: 3px; }
.routing-guard strong { font-size: 11px; }
.routing-guard small { color: #71807b; font-size: 10px; line-height: 1.4; }
.memory-storage { box-shadow: var(--shadow); }
.memory-storage > span { flex: 1; }

.video-layout { min-height: 690px; display: grid; grid-template-columns: minmax(650px, 1.4fr) 390px; gap: 14px; padding: 16px; }
.video-preview { position: relative; height: 420px; margin: 12px 0 15px; overflow: hidden; border-radius: 5px; background: #16201d; }
.video-preview > img { width: 100%; height: 100%; object-fit: cover; opacity: 0.82; }
.video-preview::after { content: ""; position: absolute; inset: 0; background: rgba(15, 24, 21, 0.17); }
.play-button { position: absolute; top: 50%; left: 50%; z-index: 2; width: 50px; height: 50px; display: grid; place-items: center; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.8); border-radius: 50%; color: #fff; background: rgba(15, 27, 23, 0.58); cursor: pointer; }
.video-time { position: absolute; right: 15px; bottom: 13px; left: 15px; z-index: 2; display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; gap: 8px; color: #fff; font-size: 11px; }
.video-time i { height: 3px; background: rgba(255,255,255,.36); }
.video-time b { width: 38%; height: 100%; display: block; background: #fff; }
.timeline-head { display: flex; align-items: center; justify-content: space-between; }
.timeline-head > div { display: flex; align-items: baseline; gap: 8px; }
.timeline-head strong { font-size: 13px; }
.timeline-head span { color: var(--muted); font-size: 11px; }
.storyboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 9px; }
.storyboard article { overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.storyboard article > div { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.storyboard img { width: 100%; height: 100%; object-fit: cover; }
.storyboard article > div span { position: absolute; right: 5px; bottom: 5px; padding: 2px 4px; color: #fff; background: rgba(10,20,17,.65); font-size: 10px; }
.storyboard article strong, .storyboard article small { display: block; margin: 6px 7px 0; font-size: 11px; }
.storyboard article small { margin-top: 2px; margin-bottom: 7px; color: var(--muted); }
.mini-product { display: grid; grid-template-columns: 54px 1fr 20px; align-items: center; gap: 9px; padding: 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.mini-product img { width: 54px; height: 54px; object-fit: cover; border-radius: 4px; }
.mini-product div { display: flex; flex-direction: column; gap: 3px; }
.mini-product strong { font-size: 12px; }
.mini-product span { color: var(--muted); font-size: 11px; }
.mini-product > svg { color: var(--teal); }
.constraint-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.constraint-list span { display: inline-flex; align-items: center; gap: 3px; padding: 5px 7px; border-radius: 4px; color: #507068; background: #eef6f4; font-size: 11px; }
.video-cost { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 14px 0; border: 1px solid var(--line); border-radius: 5px; background: var(--line); overflow: hidden; }
.video-cost div { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: var(--surface-soft); }
.video-cost small { color: var(--muted); font-size: 11px; }
.video-cost strong { font-size: 12px; }

.video-production-page, .mutation-page { min-height: calc(100vh - 76px); display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.video-production-flow, .video-type-bar, .video-stage, .mutation-framework, .mutation-stage { border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.video-production-flow { min-height: 76px; display: grid; grid-template-columns: 280px 1fr; align-items: center; gap: 20px; padding: 11px 15px; }
.video-production-flow > div, .mutation-framework > div { display: flex; flex-direction: column; gap: 4px; }
.video-production-flow > div span, .mutation-framework > div span { color: var(--coral); font-size: 12px; font-weight: 800; }
.video-production-flow > div strong, .mutation-framework > div strong { font-size: 13px; }
.video-production-flow ol, .mutation-framework ol { min-width: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 0; padding: 0; list-style: none; }
.video-production-flow li { position: relative; min-width: 0; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; }
.video-production-flow li:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -23px; width: 16px; height: 1px; background: #acb6b2; }
.video-production-flow li:not(:last-child)::before { content: ""; position: absolute; top: calc(50% - 3px); right: -23px; width: 6px; height: 6px; border-top: 1px solid #8d9994; border-right: 1px solid #8d9994; transform: rotate(45deg); }
.video-production-flow li > b { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: #75817c; font-size: 11px; }
.video-production-flow li.done > b { border-color: #79afa7; color: var(--teal); background: #edf7f5; }
.video-production-flow li.active > b { border-color: var(--teal); color: #fff; background: var(--teal); }
.video-production-flow li > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.video-production-flow li strong { font-size: 12px; }
.video-production-flow li small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.video-type-bar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 12px; }
.video-type-bar > div { display: flex; align-items: center; gap: 10px; }
.video-type-bar > div > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.video-type-switch { display: flex; gap: 5px; }
.video-type-switch button { min-width: 205px; height: 44px; display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 4px; color: #65716d; background: #fff; cursor: pointer; text-align: left; }
.video-type-switch button.active { border-color: #86b9b1; color: var(--teal); background: #eaf5f2; }
.video-type-switch button > span { display: flex; flex-direction: column; gap: 2px; }
.video-type-switch strong { font-size: 11px; }
.video-type-switch small { color: var(--muted); font-size: 10px; }
.video-v1-badge { padding: 5px 7px; border-radius: 4px; color: #6d7773; background: #f0f3f2; font-size: 11px; white-space: nowrap; }
.video-production-grid { display: grid; grid-template-columns: 286px minmax(440px, 1fr) 320px; gap: 12px; align-items: stretch; }
.video-stage { min-width: 0; padding: 14px; }
.video-source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.video-source-grid > button { position: relative; height: 76px; display: flex; align-items: center; justify-content: center; gap: 5px; overflow: hidden; padding: 7px; border: 1px dashed #b8c5c0; border-radius: 4px; color: #72807b; background: #f8faf9; cursor: pointer; }
.video-source-grid > button.has-source { justify-content: flex-end; align-items: flex-start; border-style: solid; color: #fff; background: #25312d; }
.video-source-grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.video-source-grid button.has-source::after { content: ""; position: absolute; inset: 38% 0 0; background: rgba(15, 25, 21, .7); }
.video-source-grid button > span { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.video-source-grid button > span strong { font-size: 11px; }
.video-source-grid button > span small { opacity: .78; font-size: 10px; }
.video-source-grid button > b { position: absolute; top: 5px; right: 5px; z-index: 2; display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px; border-radius: 3px; color: #fff; background: rgba(14, 25, 21, .66); font-size: 10px; }
.video-unified-prompt { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.video-unified-prompt > span { display: flex; align-items: center; gap: 4px; color: #596661; font-size: 11px; font-weight: 800; }
.video-unified-prompt textarea { width: 100%; height: 76px; resize: none; padding: 7px; border: 1px solid var(--line-strong); border-radius: 4px; color: #4a5651; outline: 0; font-size: 11px; line-height: 1.5; }
.video-story-origin { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 7px; margin-top: 8px; padding: 8px; border-left: 3px solid var(--teal); color: var(--teal); background: #edf6f3; }
.video-story-origin.template { border-left-color: #527a96; color: #527a96; background: #eef4f8; }
.video-story-origin > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.video-story-origin strong { color: #435a54; font-size: 11px; }
.video-story-origin small { color: #6e7c77; font-size: 10px; line-height: 1.35; }
.video-story-origin .text-button { font-size: 11px; }
.reference-video-card { position: relative; aspect-ratio: 16 / 10; margin-top: 10px; overflow: hidden; border-radius: 5px; background: #18231f; }
.reference-video-card > img, .video-output-preview > img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.reference-video-card::after, .video-output-preview::after { content: ""; position: absolute; inset: 0; background: rgba(15, 24, 21, .15); }
.play-button.small { width: 42px; height: 42px; }
.reference-video-card > span { position: absolute; right: 8px; bottom: 8px; z-index: 2; padding: 4px 6px; border-radius: 3px; color: #fff; background: rgba(15, 25, 21, .72); font-size: 11px; }
.stage-process { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 9px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--line); }
.stage-process span { display: flex; flex-direction: column; gap: 3px; padding: 7px; color: #67726e; background: #f7f9f8; font-size: 11px; }
.stage-process b { color: var(--teal); font-size: 11px; }
.shot-script-list { margin-bottom: 10px; border-top: 1px solid var(--line); }
.shot-script-list article { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 7px; min-height: 46px; border-bottom: 1px solid var(--line); }
.shot-script-list article > b { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 4px; color: #61726d; background: #eef2f0; font-size: 11px; }
.shot-script-list article > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shot-script-list strong { font-size: 12px; }
.shot-script-list small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.storyboard-stage { display: flex; flex-direction: column; }
.storyboard-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.video-product-lock { min-height: 54px; display: grid; grid-template-columns: 42px minmax(110px, 1fr) auto; align-items: center; gap: 8px; margin-top: 8px; padding: 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.video-product-lock img { width: 42px; height: 42px; object-fit: cover; border-radius: 4px; }
.video-product-lock > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.video-product-lock small { color: var(--muted); font-size: 11px; }
.video-product-lock strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.video-product-lock > div { display: flex; gap: 4px; }
.video-product-lock > div b { display: inline-flex; align-items: center; gap: 3px; padding: 4px 5px; border-radius: 3px; color: #537069; background: #e5f0ed; font-size: 10px; }
.video-product-lock.missing { border-color: #e1aaa3; background: #fbf1ef; }
.missing-product-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 4px; color: #b6554c; background: #f6dedb; }
.editable-storyboard { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.editable-storyboard article { min-width: 0; display: grid; grid-template-columns: 42% 58%; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.shot-frame { position: relative; min-height: 142px; overflow: hidden; background: #dce2df; }
.shot-frame > img { width: 100%; height: 100%; object-fit: cover; }
.shot-frame > span { position: absolute; top: 6px; left: 6px; padding: 3px 5px; border-radius: 3px; color: #fff; background: rgba(14, 24, 20, .7); font-size: 10px; }
.shot-frame > button { position: absolute; right: 5px; bottom: 5px; width: 27px; height: 27px; color: #fff; background: rgba(14, 24, 20, .72); }
.shot-editor { min-width: 0; display: flex; flex-direction: column; padding: 7px; }
.shot-editor > span { display: flex; flex-direction: column; gap: 2px; }
.shot-editor b { font-size: 11px; }
.shot-editor small { color: var(--muted); font-size: 10px; }
.shot-editor textarea { width: 100%; flex: 1; min-height: 72px; margin: 5px 0; resize: none; padding: 5px; border: 1px solid var(--line); border-radius: 3px; color: #4b5652; background: #f8faf9; outline: 0; font-size: 10px; line-height: 1.45; }
.shot-editor textarea:focus { border-color: #73aba4; background: #fff; }
.shot-editor > div { display: flex; gap: 4px; }
.shot-editor > div span { display: inline-flex; align-items: center; gap: 2px; color: #6b7772; font-size: 10px; }
.storyboard-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.storyboard-footer > span { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); font-size: 11px; }
.storyboard-footer > span.error { color: #b14d45; }
.storyboard-footer .secondary-button { min-height: 31px; font-size: 11px; }
.video-output-preview { position: relative; height: 205px; margin-top: 10px; overflow: hidden; border-radius: 5px; background: #16211d; }
.video-output-preview > div { position: absolute; right: 8px; bottom: 8px; left: 8px; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 7px 8px; border-radius: 4px; color: #fff; background: rgba(14, 25, 21, .76); }
.video-output-preview > div span { font-size: 11px; }
.video-output-preview > div strong { font-size: 12px; }
.video-output-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.video-output-settings label { min-width: 0; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.video-output-settings select { min-width: 0; font-size: 11px; }
.video-output-settings label:last-child { grid-column: 1 / -1; }
.video-constraint-box textarea { height: 70px; font-size: 11px; }
.video-scope-note { display: grid; grid-template-columns: 18px 1fr; gap: 7px; align-items: start; margin-top: 8px; padding: 8px; color: #526a64; background: #eef6f4; }
.video-scope-note > span { display: flex; flex-direction: column; gap: 2px; }
.video-scope-note strong { font-size: 11px; }
.video-scope-note small { color: #71807b; font-size: 10px; }
.video-phase-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.video-phase-tags b { min-height: 22px; display: inline-flex; align-items: center; padding: 0 5px; border: 1px solid #d3e4e0; border-radius: 3px; color: #6c7b76; background: #fff; font-size: 10px; font-weight: 700; }
.video-phase-tags b:first-child { border-color: #91bdb5; color: var(--teal); background: #e7f3f0; }
.video-output-cost { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 8px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: var(--line); }
.video-output-cost div { display: flex; flex-direction: column; gap: 3px; padding: 8px; background: #f7f9f8; }
.video-output-cost small { color: var(--muted); font-size: 10px; }
.video-output-cost strong { font-size: 12px; }
.video-create-button { min-height: 40px; }
.video-required-error { display: flex; align-items: center; gap: 5px; margin: 8px 0; padding: 7px; color: #a94b44; background: #fae9e7; font-size: 11px; }

.model-shoe-page { min-height: calc(100vh - 76px); display: flex; flex-direction: column; gap: 12px; padding: 14px; }
.model-shoe-flow, .model-shoe-toolbar, .model-shoe-input, .model-shoe-results { border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.model-shoe-flow { min-height: 72px; display: grid; grid-template-columns: minmax(360px, 1fr) 1fr; align-items: center; gap: 24px; padding: 11px 15px; }
.model-shoe-flow > div { display: flex; flex-direction: column; gap: 4px; }
.model-shoe-flow > div span { color: var(--coral); font-size: 12px; font-weight: 800; }
.model-shoe-flow > div strong { font-size: 13px; }
.model-shoe-flow ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.model-shoe-flow li { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.model-shoe-flow li b { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 10px; }
.model-shoe-flow li.done b { border-color: #83b8af; color: var(--teal); background: #edf7f5; }
.model-shoe-flow li.active b { border-color: var(--teal); color: #fff; background: var(--teal); }
.model-shoe-toolbar { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; }
.model-shoe-toolbar > div { display: flex; align-items: center; gap: 10px; }
.model-shoe-toolbar > div > span { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.model-shoe-toolbar .segmented { width: 430px; }
.model-shoe-toolbar > span { display: flex; align-items: center; gap: 5px; color: #58736c; font-size: 11px; }
.model-profile-library { min-width: 0; overflow: hidden; border: 1px solid #bfd5d0; border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.model-profile-header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f7faf9; }
.model-profile-title { min-width: 220px; display: flex; align-items: center; gap: 9px; color: var(--teal); }
.model-profile-title > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.model-profile-title strong { color: #293b36; font-size: 14px; }
.model-profile-title small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.model-profile-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; }
.model-profile-actions .primary-button, .model-profile-actions .secondary-button { min-height: 34px; padding: 0 10px; font-size: 11px; }
.model-profile-actions .icon-button.danger { border-color: #e2c3bf; color: #a24d45; background: #fff8f7; }
.local-storage-badge { height: 27px; display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 3px; color: #526d66; background: #e8f1ef; font-size: 10px; font-weight: 800; }
.model-profile-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 9px 14px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.model-profile-tabs button { min-width: 116px; min-height: 42px; display: flex; align-items: flex-start; flex-direction: column; justify-content: center; gap: 1px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; color: #52605c; background: #fff; cursor: pointer; text-align: left; }
.model-profile-tabs button b { font-size: 12px; }
.model-profile-tabs button span { color: var(--muted); font-size: 10px; }
.model-profile-tabs button.active { border-color: #6da79d; color: var(--teal); background: #edf7f5; box-shadow: inset 3px 0 0 var(--teal); }
.model-profile-body { display: grid; grid-template-columns: minmax(280px, .95fr) minmax(270px, 1fr) minmax(280px, 1fr); gap: 12px; padding: 12px 14px; }
.model-profile-references { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.model-profile-references figure { min-width: 0; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 5px; background: #f2f5f4; }
.model-profile-references figure > img, .model-profile-references figure > div { width: 100%; aspect-ratio: 3 / 4; display: grid; place-items: center; object-fit: cover; color: var(--muted); background: #e9eeec; }
.model-profile-references figcaption { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 6px; background: #fff; }
.model-profile-references figcaption strong { font-size: 10px; }
.model-profile-references figcaption span { color: var(--teal); font-size: 9px; font-weight: 800; }
.model-profile-contract, .model-profile-provenance { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: #fbfcfc; }
.model-profile-identity { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.model-profile-identity > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.model-profile-identity small { color: var(--muted); font-size: 10px; }
.model-profile-identity strong { overflow-wrap: anywhere; font-size: 13px; }
.model-profile-identity > b { flex: 0 0 auto; padding: 4px 6px; border-radius: 3px; color: var(--teal); background: #e7f2f0; font-size: 10px; }
.model-profile-contract > dl { display: flex; flex-direction: column; gap: 7px; margin: 9px 0; }
.model-profile-contract > dl div { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 7px; }
.model-profile-contract dt, .model-profile-provenance dt { color: var(--muted); font-size: 10px; font-weight: 800; }
.model-profile-contract dd { margin: 0; color: #475651; font-size: 11px; line-height: 1.45; }
.model-profile-forbidden > span, .model-profile-provenance > div > span { display: flex; align-items: center; gap: 4px; color: #894b46; font-size: 10px; font-weight: 800; }
.model-profile-forbidden > div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.model-profile-forbidden b { padding: 3px 5px; border-radius: 3px; color: #914d47; background: #f8eae8; font-size: 9px; }
.model-profile-provenance { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 9px; }
.model-profile-provenance > div:first-child > span { color: var(--teal); }
.model-profile-provenance p { max-height: 76px; overflow: auto; margin: 6px 0 0; color: #53615d; font-size: 10px; line-height: 1.5; }
.model-profile-provenance dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 6px 0 0; }
.model-profile-provenance dl div { min-width: 0; padding: 5px; border-radius: 3px; background: #edf3f1; }
.model-profile-provenance dd { overflow: hidden; margin: 2px 0 0; color: #334a43; font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.model-profile-approved { min-height: 54px; display: grid; grid-template-columns: 180px minmax(90px, auto) minmax(320px, 1fr); align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); background: #fafbfb; }
.model-profile-approved > span { display: flex; flex-direction: column; gap: 2px; }
.model-profile-approved > span strong { display: flex; align-items: center; gap: 4px; font-size: 11px; }
.model-profile-approved > span small { color: var(--muted); font-size: 9px; }
.model-profile-approved > div { display: flex; gap: 4px; overflow-x: auto; }
.model-profile-approved img { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 3px; object-fit: cover; }
.model-profile-approved > p { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin: 0; color: #66756f; font-size: 10px; line-height: 1.4; text-align: right; }
.model-profile-state, .model-profile-empty { min-height: 78px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; color: var(--teal); }
.model-profile-state > span, .model-profile-empty > div > span { display: flex; flex-direction: column; gap: 3px; }
.model-profile-state strong, .model-profile-empty strong { color: #33443f; font-size: 13px; }
.model-profile-state small, .model-profile-empty small { color: var(--muted); font-size: 11px; }
.model-profile-state.error { color: #a24d45; background: #fff9f8; }
.model-profile-state.error .secondary-button { margin-left: auto; }
.model-profile-empty { justify-content: space-between; }
.model-profile-empty > div { display: flex; align-items: center; gap: 9px; color: var(--teal); }
.model-profile-error { display: flex; align-items: center; gap: 5px; padding: 7px 14px; border-top: 1px solid #ead0cd; color: #984b44; background: #fff4f2; font-size: 10px; }
.model-shoe-workbench { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 12px; align-items: start; }
.model-shoe-input { min-width: 0; padding: 14px; }
.model-shoe-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 7px; }
.model-shoe-section-head > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.model-shoe-section-head strong { font-size: 12px; }
.model-shoe-section-head small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.model-shoe-section-head > b { color: var(--teal); font-size: 11px; }
.model-shoe-angle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.model-shoe-angle-grid button { position: relative; height: 58px; overflow: hidden; padding: 0; border: 1px dashed var(--line-strong); border-radius: 4px; color: var(--muted); background: #f8faf9; cursor: pointer; }
.model-shoe-angle-grid button.has-image { border-style: solid; }
.model-shoe-angle-grid img { width: 100%; height: 100%; object-fit: cover; }
.model-shoe-angle-grid button > span { position: absolute; right: 3px; bottom: 3px; left: 3px; z-index: 2; padding: 2px; color: #fff; background: rgba(15, 25, 21, .68); font-size: 9px; text-align: center; }
.model-shoe-angle-grid button > b { position: absolute; top: 3px; right: 3px; z-index: 2; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); }
.model-shoe-angle-grid button.add-angle { display: flex; align-items: center; justify-content: center; }
.model-shoe-angle-grid button.add-angle span { position: static; color: var(--muted); background: transparent; }
.model-shoe-locks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.model-shoe-locks span { display: inline-flex; align-items: center; gap: 3px; padding: 4px 5px; border-radius: 3px; color: #55716a; background: #eaf3f1; font-size: 10px; }
.model-source-title { margin-top: 14px; }
.model-source-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.model-source-switch button { height: 34px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); background: #fff; cursor: pointer; font-size: 11px; font-weight: 700; }
.model-source-switch button.active { border-color: #77afa5; color: var(--teal); background: #edf7f5; }
.model-source-preview { min-height: 58px; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 7px; padding: 5px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.model-source-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.model-source-preview > span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.model-source-preview small { color: var(--muted); font-size: 10px; }
.model-source-preview strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.model-source-preview b { color: var(--teal); font-size: 10px; font-weight: 700; }
.model-shoe-prompt { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; color: #596661; font-size: 11px; font-weight: 800; }
.model-shoe-prompt textarea { height: 62px; resize: none; padding: 7px; border: 1px solid var(--line-strong); border-radius: 4px; outline: 0; font-size: 11px; line-height: 1.45; }
.model-shoe-scenes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.model-shoe-scenes button { min-height: 25px; display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border: 1px solid #cfe0dc; border-radius: 3px; color: var(--teal); background: #edf6f4; font-size: 10px; }
.model-shoe-constraints { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.model-shoe-constraints > div { padding: 7px; border-left: 3px solid var(--teal); background: #f3f8f7; }
.model-shoe-constraints > div:last-child { border-left-color: #bd6f65; background: #faf3f2; }
.model-shoe-constraints span { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; }
.model-shoe-constraints p { margin: 4px 0 0; color: #63706c; font-size: 10px; line-height: 1.4; }
.model-shoe-settings { display: grid; grid-template-columns: 1.5fr .8fr .7fr; gap: 6px; margin-top: 10px; }
.model-shoe-settings label { min-width: 0; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; }
.model-shoe-settings select { min-width: 0; font-size: 10px; }
.model-shoe-generate { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 11px -14px -14px; padding: 8px 14px; border-top: 1px solid var(--line); background: #fafbfa; }
.model-shoe-generate > span { display: flex; flex-direction: column; gap: 2px; }
.model-shoe-generate small { color: var(--muted); font-size: 10px; }
.model-shoe-generate strong { font-size: 11px; }
.model-shoe-generate .primary-button { min-height: 38px; }
.model-shoe-results { min-width: 0; overflow: hidden; }
.model-shoe-result-note { min-height: 54px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 7px; margin: 10px 14px 0; padding: 8px 10px; color: var(--teal); background: #edf6f4; }
.model-shoe-result-note > span { display: flex; flex-direction: column; gap: 2px; }
.model-shoe-result-note strong { color: #3f554f; font-size: 11px; }
.model-shoe-result-note small { color: #71807b; font-size: 10px; }
.model-shoe-result-note > b { font-size: 10px; }
.model-shoe-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px 14px 14px; }
.model-shoe-result-grid article { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.model-shoe-result-grid article > div { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e9edeb; }
.model-shoe-result-grid article > div img { width: 100%; height: 100%; object-fit: cover; }
.model-shoe-result-grid article > div span, .model-shoe-result-grid article > div b { position: absolute; top: 7px; padding: 3px 5px; border-radius: 3px; color: #fff; background: rgba(15, 25, 21, .72); font-size: 10px; }
.model-shoe-result-grid article > div span { left: 7px; }
.model-shoe-result-grid article > div b { right: 7px; }
.model-shoe-result-grid article > section { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 9px; }
.model-shoe-result-grid article > section > span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.model-shoe-result-grid article > section strong { font-size: 11px; }
.model-shoe-result-grid article > section small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.model-shoe-result-grid article footer { min-height: 28px; display: flex; align-items: center; gap: 8px; padding: 5px 9px; border-top: 1px solid var(--line); color: #648078; background: #f7f9f8; font-size: 9px; }
.model-shoe-result-grid article footer span { display: inline-flex; align-items: center; gap: 2px; }
.model-shoe-lineage { margin: 0 14px 14px; }

.mutation-framework { min-height: 86px; display: grid; grid-template-columns: 310px 1fr; align-items: center; gap: 22px; padding: 12px 15px; }
.mutation-framework ol { gap: 12px; }
.mutation-framework li { position: relative; min-width: 0; display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 9px; }
.mutation-framework li:not(:last-child)::after { content: ""; position: absolute; right: -9px; width: 12px; height: 1px; background: #98a49f; }
.mutation-framework li > b { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #173d58; font-size: 20px; }
.mutation-framework li:nth-child(2) > b { background: var(--teal); }
.mutation-framework li:nth-child(3) > b { background: var(--coral); }
.mutation-framework li > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mutation-framework li strong { font-size: 12px; }
.mutation-framework li small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mutation-builder { display: grid; grid-template-columns: 286px minmax(430px, 1fr) 334px; gap: 12px; align-items: stretch; }
.mutation-stage { min-width: 0; padding: 14px; }
.mother-recipe-preview { position: relative; aspect-ratio: 1.45 / 1; margin-top: 10px; overflow: hidden; border-radius: 5px; background: #dce2df; }
.mother-recipe-preview img { width: 100%; height: 100%; object-fit: cover; }
.mother-recipe-preview span { position: absolute; top: 8px; left: 8px; padding: 4px 6px; border-radius: 3px; color: #fff; background: rgba(16, 27, 23, .7); font-size: 11px; }
.mother-recipe-card { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9f8; }
.mother-recipe-card > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mother-recipe-card small { color: var(--muted); font-size: 11px; }
.mother-recipe-card strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.recipe-source-list { display: flex; flex-direction: column; margin-top: 8px; border-top: 1px solid var(--line); }
.recipe-source-list span { min-height: 36px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); color: #56645f; font-size: 11px; }
.recipe-source-list svg { color: var(--teal); }
.surpass-stage { display: flex; flex-direction: column; }
.mutation-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.variable-matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.variable-matrix article { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: #f8faf9; }
.variable-matrix article > div:first-child { display: flex; align-items: center; gap: 6px; color: var(--teal); }
.variable-matrix article > div:first-child > span { display: flex; flex-direction: column; gap: 2px; }
.variable-matrix strong { color: var(--ink); font-size: 11px; }
.variable-matrix small { color: var(--muted); font-size: 10px; }
.variable-values { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.variable-values button { min-height: 23px; display: inline-flex; align-items: center; gap: 2px; padding: 0 6px; border: 1px solid var(--line); border-radius: 3px; color: #65716d; background: #fff; cursor: pointer; font-size: 10px; }
.variable-values button.active { border-color: #a9cdc7; color: var(--teal); background: #edf7f5; }
.combination-preview { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; padding: 8px 10px; border-left: 3px solid var(--teal); background: #eef6f4; }
.combination-preview > div { display: flex; flex-direction: column; gap: 3px; }
.combination-preview span { color: var(--muted); font-size: 10px; }
.combination-preview strong { font-size: 12px; }
.combination-preview > b { color: var(--teal); font-size: 13px; white-space: nowrap; }
.sample-prompts { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 5px 8px; margin-top: 8px; }
.sample-prompts > span { grid-row: 1 / span 2; color: var(--muted); font-size: 11px; font-weight: 700; }
.sample-prompts p { margin: 0; color: #57635f; font-size: 11px; }
.sample-prompts p b { display: inline-block; width: 26px; color: var(--teal); }
.sample-prompts button { grid-column: 3; grid-row: 1 / span 2; }
.production-formula { display: grid; grid-template-columns: 1fr auto 1fr auto 1.3fr; align-items: center; gap: 6px; margin-top: 10px; }
.production-formula > div { min-height: 64px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9f8; }
.production-formula > div.accent { border-color: #9dc8c1; background: #eaf5f2; }
.production-formula span { color: var(--muted); font-size: 10px; }
.production-formula strong { font-size: 15px; }
.production-formula > b { color: #84908b; font-size: 12px; }
.batch-economics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.batch-economics > div { display: flex; flex-direction: column; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; }
.batch-economics span, .batch-economics small { color: var(--muted); font-size: 10px; }
.batch-economics strong { font-size: 13px; }
.route-summary { margin-top: 9px; padding: 9px; border-left: 3px solid #507895; background: #f0f5f8; }
.route-summary.manual { border-left-color: var(--teal); background: #eef6f4; }
.route-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.route-summary-head > span { display: flex; align-items: center; gap: 5px; color: #315d79; font-size: 11px; }
.route-summary-head > span b { font-weight: 800; }
.route-summary-head > span small { padding: 2px 4px; border-radius: 3px; color: #315d79; background: #dbeaf1; font-size: 9px; }
.route-summary.manual .route-summary-head > span, .route-summary.manual .route-summary-head > span small { color: var(--teal); }
.route-summary.manual .route-summary-head > span small { background: #dceee9; }
.route-summary p { margin: 6px 0 0; color: #61717a; font-size: 10px; line-height: 1.45; }
.route-summary.unavailable { border-left-color: #b95b51; background: #fbf0ee; }
.route-summary.unavailable .route-summary-head > span, .route-summary.unavailable .route-summary-head > span small { color: #a94b44; }
.batch-manual-model { display: flex; flex-direction: column; gap: 4px; margin-top: 7px; color: #65716d; font-size: 10px; font-weight: 700; }
.batch-manual-model select { height: 31px; }
.batch-limit { display: flex; flex-direction: column; gap: 4px; margin-top: 9px; color: var(--muted); font-size: 11px; font-weight: 700; }
.batch-launch { min-height: 40px; margin-top: 9px; }
.mutation-table { flex: 0 0 auto; }
.mutation-table th:first-child { width: 25%; }

.page-stack, .models-layout { display: flex; flex-direction: column; gap: 13px; padding: 16px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stats-row > div { min-height: 90px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.stats-row span { color: var(--muted); font-size: 12px; }
.stats-row strong { font-size: 20px; }
.stats-row small { color: #84908c; font-size: 11px; }
.table-panel { overflow: hidden; }
.table-panel > .section-title, .provider-list > .section-title { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.batch-config { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr auto; gap: 1px; padding: 10px 14px; background: #f3f6f4; }
.batch-config > div { display: flex; flex-direction: column; gap: 3px; padding: 0 10px; border-right: 1px solid var(--line); }
.batch-config > div:first-child { padding-left: 0; }
.batch-config small { color: var(--muted); font-size: 11px; }
.batch-config strong { font-size: 12px; }
.batch-config button { display: flex; align-items: center; gap: 4px; border: 0; color: var(--teal); background: transparent; cursor: pointer; font-size: 12px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { height: 36px; padding: 0 12px; color: #78837f; background: #fafbfa; text-align: left; font-size: 11px; font-weight: 700; }
td { height: 58px; padding: 6px 12px; border-top: 1px solid var(--line); color: #46504d; font-size: 12px; }
tbody tr:hover { background: #fafcfb; }
.table-product { display: flex; align-items: center; gap: 8px; }
.table-product img { width: 38px; height: 38px; object-fit: cover; border-radius: 4px; }
.table-product span, .task-name, .recipe-name > span { display: flex; flex-direction: column; gap: 2px; }
.table-product strong, .task-name strong, .recipe-name strong { color: var(--ink); font-size: 12px; }
.table-product small, .task-name small, .recipe-name small { color: var(--muted); font-size: 11px; }
.file-count { display: inline-flex; align-items: center; gap: 4px; }
.row-progress { width: 100%; display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 6px; }
.row-progress i { display: block; }
.status-pill { min-width: 54px; height: 23px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.status-已完成 { color: #247b5f; background: #e6f4ef; }
.status-生成中 { color: #286978; background: #e3f1f4; }
.status-排队中 { color: #7d681e; background: #f6f0d8; }
.status-需处理 { color: #a14b45; background: #fae9e7; }
.status-pill .spinner { width: 10px; height: 10px; border-color: rgba(40,105,120,.25); border-top-color: #286978; }

.task-filterbar, .recipe-head { display: flex; align-items: center; gap: 8px; }
.search-field { height: 36px; min-width: 290px; flex: 1; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.search-field.compact { width: 190px; min-width: 190px; flex: none; }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; }
.filter-tabs { height: 36px; display: flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.filter-tabs.small { height: 31px; }
.filter-tabs button { height: 28px; padding: 0 10px; border: 0; border-radius: 3px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.filter-tabs button.active { color: var(--teal); background: var(--teal-soft); font-weight: 700; }
.tasks-table table th:nth-child(1) { width: 34%; }
.tasks-table table th:last-child { width: 120px; }

.project-output-head { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.project-output-head > div { display: flex; align-items: center; gap: 10px; }
.project-output-head > div:first-child > svg { color: var(--teal); }
.project-output-head > div:first-child > span { display: flex; flex-direction: column; gap: 2px; }
.project-output-head small { color: var(--muted); font-size: 10px; }
.project-output-head strong { font-size: 15px; }
.project-output-head b { color: #67736f; font-size: 11px; font-weight: 500; }
.project-output-head > div:last-child > span { min-width: 60px; display: flex; flex-direction: column; gap: 2px; padding-left: 10px; border-left: 1px solid var(--line); }
.project-output-head > div:last-child > span strong { font-size: 14px; }
.output-view-bar { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.output-view-bar > span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.output-view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.output-view-switch button { min-width: 155px; min-height: 44px; display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; color: #64716c; background: #fff; cursor: pointer; text-align: left; }
.output-view-switch button.active { border-color: #82b5ac; color: var(--teal); background: #eaf5f2; }
.output-view-switch button > span { display: flex; flex-direction: column; gap: 1px; }
.output-view-switch strong { font-size: 11px; }
.output-view-switch small { color: var(--muted); font-size: 10px; }
.output-filterbar { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.output-filterbar > span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.project-output-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 10px; }
.project-output-grid.video-assets { grid-template-columns: repeat(2, minmax(280px, 420px)); }
.project-output-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.project-output-card .asset-image { cursor: default; }
.video-output-card .asset-image { aspect-ratio: 16 / 9; }
.output-play { position: absolute; inset: 50% auto auto 50%; z-index: 2; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(18, 31, 26, .72); transform: translate(-50%, -50%); }
.output-type, .output-decision { position: absolute; top: 7px; z-index: 2; padding: 3px 5px; border-radius: 3px; color: #fff; background: rgba(19, 31, 27, .74); font-size: 10px; }
.output-type { left: 7px; }
.output-decision { right: 7px; }
.decision-已入选 { background: rgba(18, 116, 91, .88); }
.decision-需重做 { background: rgba(173, 98, 31, .9); }
.decision-已淘汰 { background: rgba(158, 68, 60, .88); }
.project-output-copy { min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 7px; }
.project-output-copy > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.project-output-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-output-copy small { color: var(--muted); font-size: 10px; }
.project-output-source { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 5px 7px; border-top: 1px solid var(--line); color: #63716c; background: #f8faf9; }
.project-output-source span { min-width: 0; display: inline-flex; align-items: center; gap: 3px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.project-output-source span:last-child { color: var(--teal); }
.output-lineage { margin-top: 0; }

.recipe-name { display: flex; align-items: center; gap: 8px; }
.recipe-name > i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 5px; color: var(--teal); background: var(--teal-soft); }
.plain-tag { display: inline-block; padding: 4px 6px; border-radius: 3px; background: #f0f3f2; }

.model-selection-boundary { min-height: 64px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid #b7d3cd; border-radius: 6px; color: var(--teal); background: #f2f8f6; box-shadow: var(--shadow); }
.model-selection-boundary > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.model-selection-boundary strong { color: #334b44; font-size: 13px; }
.model-selection-boundary small { color: #6a7974; font-size: 11px; }
.model-selection-boundary > b { padding: 5px 7px; border-radius: 4px; color: var(--teal); background: #dceee9; font-size: 11px; }
.model-priority-map { min-height: 84px; display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.model-priority-title { display: flex; align-items: center; gap: 8px; }
.model-priority-title > svg { color: var(--teal); }
.model-priority-title > span { display: flex; flex-direction: column; gap: 2px; }
.model-priority-title strong { font-size: 12px; }
.model-priority-title small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.model-priority-map ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.model-priority-map li { position: relative; min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 7px; }
.model-priority-map li:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -14px; width: 8px; height: 8px; border-top: 1px solid #93a09b; border-right: 1px solid #93a09b; transform: translateY(-50%) rotate(45deg); }
.model-priority-map li > b { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: #6a7772; font-size: 9px; }
.model-priority-map li.active > b { border-color: var(--teal); color: #fff; background: var(--teal); }
.model-priority-map li > span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.model-priority-map li small { color: var(--muted); font-size: 9px; }
.model-priority-map li strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.model-priority-map li em { overflow: hidden; color: var(--teal); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.model-priority-guards { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.model-priority-guards span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 3px; color: #7a514b; background: #f8eeec; font-size: 9px; font-weight: 800; white-space: nowrap; }
.model-key-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, .9fr); overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.model-key-summary { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 36px; align-items: center; gap: 11px; padding: 15px 16px; }
.model-key-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: #24332f; }
.model-key-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.model-key-copy > small { color: #65716d; font-size: 12px; font-weight: 800; }
.model-key-copy > strong { overflow: hidden; color: var(--ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.model-key-copy > span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.model-key-status { height: 27px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.model-key-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.model-key-status.status-ready { color: #21765d; background: #e6f3ee; }
.model-key-status.status-loading { color: #446f78; background: #e9f2f4; }
.model-key-status.status-empty { color: #756825; background: #f5f0d9; }
.model-key-status.status-error { color: #a34e48; background: #fae9e7; }
.model-key-editor { display: grid; grid-template-columns: minmax(210px, 1fr) auto; align-content: center; gap: 9px 10px; padding: 13px 16px; border-left: 1px solid var(--line); background: #fafcfb; }
.model-key-editor > label { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.model-key-editor > label span { color: #43514c; font-size: 12px; font-weight: 800; }
.model-key-editor > label small { color: #65716d; font-size: 12px; }
.model-key-input-wrap { min-width: 0; height: 40px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 34px; align-items: center; gap: 6px; padding: 0 4px 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; }
.model-key-input-wrap:focus-within { border-color: #67a99d; box-shadow: 0 0 0 3px rgba(45, 132, 114, .1); }
.model-key-input-wrap > svg { color: #71807b; }
.model-key-input-wrap input { min-width: 0; height: 36px; border: 0; outline: 0; color: var(--ink); background: transparent; font: 500 13px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; }
.model-key-input-wrap input::placeholder { color: #687570; }
.model-key-input-wrap input:disabled { cursor: not-allowed; }
.model-key-actions { display: flex; align-items: center; gap: 7px; }
.model-key-actions button { min-height: 40px; white-space: nowrap; }
.danger-outline { border-color: #dfb4b0 !important; color: #a34e48 !important; background: #fff !important; }
.model-key-security { grid-column: 1 / -1; min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 8px 16px; border-top: 1px solid var(--line); color: #42655c; background: #f1f7f5; }
.model-key-security > span, .model-key-error > span { display: flex; flex-direction: column; gap: 2px; }
.model-key-security strong, .model-key-error strong { font-size: 12px; }
.model-key-security small, .model-key-error small { color: #6c7b76; font-size: 11px; line-height: 1.4; }
.model-key-error { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; padding: 10px 16px; border-top: 1px solid #efd1ce; color: #994740; background: #fff4f3; }
.model-key-error small { color: #956b67; }
.model-key-error > button { margin-left: auto; white-space: nowrap; }
.model-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.provider-list { overflow: hidden; }
.provider-row { min-height: 72px; display: grid; grid-template-columns: 42px minmax(220px, 1.6fr) minmax(130px, 1fr) 100px 42px 38px; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.provider-row.provider-planned { opacity: .62; }
.provider-list > .section-title + .provider-row { border-top: 0; }
.provider-logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: #273531; font-size: 12px; font-weight: 800; }
.provider-openai { background: #202b28; }
.provider-seedream, .provider-seedance { background: #3f63b8; }
.provider-wanxiang { background: #9a5d35; }
.provider-google { background: #307f72; }
.provider-copy, .provider-health > span:last-child, .provider-spend { display: flex; flex-direction: column; gap: 2px; }
.provider-copy span, .provider-copy small, .provider-health small, .provider-spend small { color: var(--muted); font-size: 11px; }
.provider-copy strong, .provider-health strong, .provider-spend strong { font-size: 12px; }
.provider-health { display: flex; align-items: center; gap: 7px; }
.switch { position: relative; width: 34px; height: 19px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: #cfd7d4; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 15px; height: 15px; top: 2px; left: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.16); transition: .2s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::before { transform: translateX(15px); }
.budget-panel { display: grid; grid-template-columns: 1fr 180px 160px 100px; align-items: end; gap: 14px; padding: 14px; }
.budget-panel > div:first-child { display: flex; align-items: center; gap: 10px; }
.budget-panel > div:first-child > span { display: flex; flex-direction: column; gap: 3px; }
.budget-panel strong { font-size: 12px; }
.budget-panel small { color: var(--muted); font-size: 11px; }
.budget-panel label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 11px; }
.money-input { height: 34px; display: flex; align-items: center; gap: 4px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); }
.money-input input { width: 100%; border: 0; outline: 0; font-size: 12px; }
.model-default-panel { padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.model-default-head { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.model-default-head > svg { color: var(--teal); }
.model-default-head > span { display: flex; flex-direction: column; gap: 2px; }
.model-default-head strong { font-size: 12px; }
.model-default-head small { color: var(--muted); font-size: 10px; }
.model-mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 12px; }
.model-mode-switch button { height: 36px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); background: #fff; cursor: pointer; font-size: 11px; font-weight: 800; }
.model-mode-switch button.active:first-child { border-color: #65a99c; color: #167b68; background: #eaf6f3; }
.model-mode-switch button.active:last-child { border-color: #d18a63; color: #a65327; background: #fbf1eb; }
.model-default-field { display: flex; flex-direction: column; gap: 5px; margin-top: 11px; color: #5e6b67; font-size: 10px; font-weight: 800; }
.model-default-field select { width: 100%; }
.model-default-group { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 7px; margin-top: 11px; }
.model-default-group.stacked { grid-template-columns: 1fr; gap: 5px; }
.model-default-group > span { color: #5e6b67; font-size: 10px; font-weight: 800; }
.binary-control, .option-control { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.option-control { grid-template-columns: repeat(4, 1fr); }
.option-control.three { grid-template-columns: repeat(3, 1fr); }
.binary-control button, .option-control button, .aspect-control button { min-width: 0; height: 30px; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); background: #fff; cursor: pointer; font-size: 10px; }
.binary-control button.active, .option-control button.active, .aspect-control button.active { border-color: #ca7b50; color: #9c4c23; background: #f8eee8; font-weight: 800; }
.option-control.disabled { opacity: .46; }
.aspect-control { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.aspect-control button:last-child { grid-column: 1 / -1; }
.model-default-note { display: flex; align-items: flex-start; gap: 5px; margin: 12px 0 9px; padding: 7px; color: #61716c; background: #f2f6f4; font-size: 9px; line-height: 1.4; }
.empty-project-state { min-height: 90px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; min-width: 230px; height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 14px; border-radius: 5px; color: #fff; background: #263b35; box-shadow: 0 10px 30px rgba(20, 34, 29, 0.25); font-size: 12px; }

@media (max-width: 1360px) {
  .app-shell { grid-template-columns: 206px minmax(0, 1fr); }
  .model-priority-map { grid-template-columns: 160px minmax(0, 1fr); }
  .model-priority-guards { display: none; }
  .studio-layout { grid-template-columns: 368px minmax(610px, 1fr); }
  .result-grid { gap: 9px; }
  .detail-flow { grid-template-columns: 300px 1fr; }
  .detail-workbench { grid-template-columns: 250px minmax(390px, 1fr) 300px; gap: 10px; }
  .detail-mode-switch button { min-width: 112px; }
  .detail-template-preview > div { height: 88px; }
  .detail-module-list article { grid-template-columns: 28px minmax(0, 1fr) 28px; }
  .detail-module-contract > span { grid-template-columns: 48px 1fr; }
  .replicate-workbench { grid-template-columns: 250px minmax(390px, 1fr) 314px; gap: 10px; }
  .replica-output { height: auto; }
  .replica-analysis-state { min-height: 166px; padding: 14px; }
  .replica-result-strip button { height: auto; }
  .negative-constraints.editable textarea { min-height: 52px; }
  .memory-columns { grid-template-columns: 260px minmax(370px, 1fr) 300px; gap: 10px; }
  .memory-case-list article { grid-template-columns: 60px 1fr 28px; }
  .memory-case-list article > img { width: 60px; height: 60px; }
  .video-production-grid { grid-template-columns: 250px minmax(390px, 1fr) 292px; gap: 10px; }
  .video-type-switch button { min-width: 185px; }
  .video-source-grid > button { height: 66px; }
  .video-unified-prompt textarea { height: 58px; }
  .reference-video-stage .shot-script-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; }
  .reference-video-stage .shot-script-list article { min-height: 38px; }
  .video-output-preview { height: 165px; }
  .video-constraint-box textarea { height: 52px; }
  .mutation-builder { grid-template-columns: 250px minmax(390px, 1fr) 306px; gap: 10px; }
  .video-production-flow { grid-template-columns: 238px 1fr; }
  .mutation-framework { grid-template-columns: 260px 1fr; }
  .video-product-lock > div { display: none; }
  .editable-storyboard article { grid-template-columns: 40% 60%; }
  .production-formula { gap: 3px; }
  .production-formula > div { padding: 6px; }
  .flow-copy { width: 238px; flex-basis: 238px; }
  .flow-track { gap: 3px; }
  .flow-track > span { gap: 4px; font-size: 12px; }
  .source-facts { align-items: flex-start; flex-direction: column; }
  .recipe-actions { flex-wrap: wrap; }
  .prompt-preview-button { margin-left: 0; }
  .video-layout { grid-template-columns: minmax(600px, 1fr) 360px; }
  .model-profile-header { align-items: flex-start; }
  .model-profile-actions { max-width: 560px; }
  .model-profile-body { grid-template-columns: minmax(245px, .9fr) minmax(245px, 1fr) minmax(255px, 1fr); gap: 8px; }
  .model-profile-approved { grid-template-columns: 170px minmax(70px, auto) minmax(280px, 1fr); }
}

@media (max-width: 900px) {
  .model-key-panel { grid-template-columns: 1fr; }
  .model-key-editor { border-top: 1px solid var(--line); border-left: 0; }
  .model-settings-grid { grid-template-columns: 1fr; }
  .provider-row { grid-template-columns: 38px minmax(150px, 1fr) minmax(120px, .8fr) 36px; }
  .provider-spend, .provider-row > .icon-button { display: none; }
  .budget-panel { grid-template-columns: 1fr 1fr; }
}
