:root {
  --paper: #fbf6ef;
  --paper-deep: #f4ebdf;
  --card: rgba(255, 253, 249, .94);
  --white: #fffefa;
  --ink: #4b342b;
  --ink-soft: #765d50;
  --muted: #ad9688;
  --line: #eadfd3;
  --aqua: #77d5d1;
  --aqua-deep: #3d9ea1;
  --aqua-pale: #e1f6f2;
  --peach: #e8b896;
  --peach-pale: #fff0e5;
  --shadow: 0 22px 60px rgba(127, 91, 66, .10);
  --soft-shadow: 0 9px 24px rgba(127, 91, 66, .10);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { overflow-x: hidden; overflow-y: auto; background: radial-gradient(circle at 86% 8%, #fffdf8 0, var(--paper) 42%, #f8efe5 100%); }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .58; }
textarea, input, select { color: var(--ink); }
textarea::placeholder, input::placeholder { color: #c6b3a6; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 70px; flex: 0 0 70px; display: flex; align-items: center; gap: 30px; padding: 0 clamp(20px, 5vw, 76px); border-bottom: 1px solid rgba(215, 193, 175, .42); background: rgba(255, 253, 249, .72); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 180px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 14px; background: var(--aqua-pale); box-shadow: 0 7px 18px rgba(84, 181, 181, .18); }
.brand-mark img { width: 47px; height: 47px; object-fit: cover; mix-blend-mode: multiply; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 18px; letter-spacing: .06em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.top-nav { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 9px 14px; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; transition: .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--ink); background: var(--peach-pale); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ready-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #d5b6a3; box-shadow: 0 0 0 4px rgba(213, 182, 163, .15); }
.status-dot.online { background: #63c7ba; box-shadow: 0 0 0 4px rgba(99, 199, 186, .16); }
.service-button { padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink-soft); font-size: 12px; transition: .2s ease; }
.service-button:hover { border-color: var(--aqua); color: var(--aqua-deep); box-shadow: var(--soft-shadow); }

.page-main { width: min(1280px, calc(100% - 40px)); flex: 0 0 auto; min-height: 0; margin: 0 auto; padding: 18px 0 34px; display: grid; grid-template-rows: minmax(220px, 30vh) minmax(820px, 1fr); gap: 20px; }
.hero-card { min-height: 0; display: flex; overflow: hidden; position: relative; border: 1px solid rgba(231, 213, 196, .7); border-radius: 27px; background: linear-gradient(105deg, #fff2e8 0%, #fffdf7 46%, #e8f7f1 100%); box-shadow: var(--shadow); }
.hero-copy { width: 51%; padding: clamp(20px, 3vh, 32px) clamp(24px, 4vw, 54px); position: relative; z-index: 1; }
.eyebrow { display: block; color: #cb9476; font-size: 11px; font-weight: 700; letter-spacing: .15em; }
.hero-copy h1 { margin: 8px 0 8px; color: var(--ink); font-size: clamp(27px, 3.2vw, 42px); line-height: 1.14; letter-spacing: -.04em; }
.hero-copy h1 em { color: var(--aqua-deep); font-style: normal; }
.hero-copy p { max-width: 420px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.hero-cta { margin-top: 15px; padding: 11px 20px; border-radius: 14px; background: var(--aqua); color: #285c5d; font-weight: 700; box-shadow: 0 10px 20px rgba(85, 190, 187, .22); transition: .2s ease; }
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 25px rgba(85, 190, 187, .28); }
.hero-cta span { padding-left: 8px; font-size: 18px; }
.hero-art { width: 49%; min-width: 0; display: flex; align-items: center; justify-content: flex-end; overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: right center; mix-blend-mode: multiply; opacity: .98; }

.workspace-card { min-height: 820px; display: grid; grid-template-columns: minmax(420px, .91fr) minmax(480px, 1.09fr); overflow: hidden; border: 1px solid rgba(231, 213, 196, .78); border-radius: 25px; background: var(--card); box-shadow: var(--soft-shadow); }
.composer-panel, .result-panel { min-width: 0; min-height: 0; padding: 18px 20px; }
.composer-panel { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.result-panel { display: flex; flex-direction: column; background: rgba(255, 252, 247, .52); }
.composer-head, .result-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
h2 { margin: 4px 0 0; font-size: 20px; letter-spacing: -.025em; }
.profile-switch { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: #fffaf5; }
.profile-option { display: grid; grid-template-columns: 16px 1fr; grid-template-rows: 1fr 1fr; column-gap: 4px; min-width: 83px; padding: 6px 8px; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; font-size: 11px; transition: .2s ease; }
.profile-option b { font-size: 11px; font-weight: 700; line-height: 1.1; }
.profile-option.active { background: var(--white); color: var(--ink); box-shadow: 0 4px 12px rgba(134, 100, 75, .10); }
.profile-spark { grid-row: span 2; align-self: center; color: var(--peach); font-size: 15px; }
.profile-spark.community { color: var(--aqua-deep); }
.profile-state { grid-column: 2; color: #b9a599; font-size: 9px; font-style: normal; }
.profile-state.online { color: var(--aqua-deep); }
.profile-note { min-height: 17px; margin: 6px 0 10px; color: var(--muted); font-size: 11px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 11px; background: #f5ede5; }
.segmented button { padding: 8px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; }
.segmented button.active { background: var(--white); color: var(--ink); box-shadow: 0 3px 9px rgba(126, 92, 67, .09); font-weight: 700; }
.panel-tabs { display: flex; gap: 20px; height: 39px; flex: 0 0 39px; margin-top: 8px; border-bottom: 1px solid var(--line); }
.panel-tab { position: relative; padding: 0 2px; background: transparent; color: var(--muted); font-size: 12px; }
.panel-tab.active { color: var(--ink); font-weight: 700; }
.panel-tab.active::after { content: ""; position: absolute; right: 2px; bottom: -1px; left: 2px; height: 2px; border-radius: 2px; background: var(--aqua-deep); }
.panel-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.panel-content { height: 100%; display: none; overflow: auto; padding: 13px 2px 7px; scrollbar-width: thin; scrollbar-color: #dbc9bb transparent; }
.panel-content.active { display: block; }
.field-label { display: block; margin: 0 0 6px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.field-label.subtle { margin-top: 10px; color: var(--muted); font-weight: 500; }
textarea { width: 100%; resize: vertical; border: 1px solid var(--line); outline: 0; border-radius: 12px; padding: 10px 12px; background: rgba(255, 255, 255, .78); font-size: 12px; line-height: 1.65; transition: .2s ease; }
textarea:focus, input:focus, select:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(119, 213, 209, .16); }
.person-options { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(190px, 1.2fr); gap: 8px; margin-top: 10px; }
.select-field { display: grid; gap: 5px; }
.select-field > span { color: var(--muted); font-size: 10px; }
.select-field select { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 9px; outline: 0; padding: 0 8px; background: var(--white); color: var(--ink-soft); font-size: 11px; }
.beauty-toggle { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border: 1px solid #dcefeb; border-radius: 9px; background: #f5fcfa; cursor: pointer; }
.beauty-toggle input { flex: 0 0 auto; accent-color: var(--aqua-deep); }
.beauty-toggle span { display: grid; gap: 2px; min-width: 0; }
.beauty-toggle b { color: #4b817e; font-size: 10px; }
.beauty-toggle small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.prompt-actions { display: flex; align-items: center; gap: 9px; min-height: 38px; margin: 3px 0 5px; }
.secondary-button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--peach-pale); color: #9b694e; font-size: 11px; font-weight: 700; }
.secondary-button:hover { border-color: var(--peach); }
.inline-status { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.expanded-input { min-height: 190px; background: #f7fcfa; }
.negative-input { min-height: 100px; }
.panel-intro { display: grid; gap: 4px; margin-bottom: 12px; }
.panel-intro strong { font-size: 14px; }
.panel-intro span { color: var(--muted); font-size: 11px; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.multi-reference { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.multi-reference .upload-box { height: 104px; padding: 5px; }
.multi-reference .upload-mark { width: 22px; height: 22px; margin-bottom: 3px; font-size: 15px; }
.multi-reference .upload-box b { font-size: 9px; }
.multi-reference .upload-box small { margin-top: 2px; font-size: 8px; }
.multi-reference .upload-box.primary { border-color: var(--aqua); background: #f4fcfa; }
.upload-box { height: 145px; display: flex; position: relative; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; border: 1px dashed #dbc8b8; border-radius: 14px; background: #fffaf5; color: var(--ink-soft); text-align: center; cursor: pointer; transition: .2s ease; }
.upload-box:hover, .upload-box.has-image { border-color: var(--aqua); background: #f4fcfa; }
.upload-box input { display: none; }
.upload-mark { display: grid; place-items: center; width: 27px; height: 27px; margin-bottom: 6px; border-radius: 50%; background: var(--aqua-pale); color: var(--aqua-deep); font-size: 19px; }
.upload-box b { font-size: 11px; }
.upload-box small { max-width: 120px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.upload-box img { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload-box.has-image img { display: block; }
.upload-box.has-image::after { content: "已选择"; position: absolute; right: 7px; bottom: 7px; padding: 3px 6px; border-radius: 999px; background: rgba(255, 255, 255, .88); color: var(--aqua-deep); font-size: 9px; }
.check-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 13px; color: var(--ink-soft); font-size: 11px; }
.check-row input { accent-color: var(--aqua-deep); }
.check-row small { width: 100%; padding-left: 23px; color: var(--muted); font-size: 9px; }
.reference-tip { margin-top: 18px; padding: 11px 12px; border-radius: 10px; background: var(--aqua-pale); color: #5f8e8e; font-size: 11px; line-height: 1.5; }
.canvas-selection-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 9px 11px; border: 1px solid #dcefeb; border-radius: 10px; background: #f5fcfa; }
.canvas-selection-row > div { display: grid; gap: 3px; min-width: 0; }
.canvas-selection-row b { color: #4b817e; font-size: 10px; }
.canvas-selection-row span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.size-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.size-presets button { padding: 8px 4px; border: 1px solid var(--line); border-radius: 9px; background: #fffaf5; color: var(--ink-soft); font-size: 10px; }
.size-presets button small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.size-presets button.active { border-color: var(--aqua); background: var(--aqua-pale); color: #317f80; }
.parameter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.parameter-grid label { display: grid; gap: 4px; }
.parameter-grid label span { color: var(--muted); font-size: 10px; }
.parameter-grid input, .parameter-grid select { width: 100%; min-width: 0; height: 30px; border: 1px solid var(--line); border-radius: 8px; outline: 0; padding: 0 7px; background: var(--white); font-size: 10px; }
.parameter-grid .wide { grid-column: span 4; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.parameter-grid input[type="range"] { accent-color: var(--aqua-deep); }
.parameter-grid output { min-width: 30px; color: var(--aqua-deep); font-size: 10px; text-align: right; }
.composer-footer { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding-top: 9px; }
.generate-button { flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 12px; background: var(--aqua); color: #285d5e; box-shadow: 0 9px 18px rgba(86, 190, 187, .19); text-align: left; transition: .2s ease; }
.generate-button:hover { transform: translateY(-1px); box-shadow: 0 12px 23px rgba(86, 190, 187, .26); }
.generate-button span { font-size: 13px; font-weight: 800; }
.generate-button small { font-size: 10px; opacity: .8; }
.error-box { max-width: 52%; padding: 7px 9px; border-radius: 8px; background: #fff0ed; color: #b16c60; font-size: 10px; line-height: 1.35; }
.result-generate-button { min-width: 160px; min-height: 48px; padding: 10px 15px; border-radius: 13px; }
.result-generate-button span { font-size: 14px; }
.result-generate-button small { font-size: 10px; }

.result-header h2 { font-size: 20px; }
.result-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.result-actions .run-status { margin-top: 0; }
.viewer-action { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink-soft); font-size: 10px; transition: .2s ease; }
.viewer-action:hover { border-color: var(--aqua); color: var(--aqua-deep); }
.run-status { margin-top: 10px; padding: 5px 9px; border-radius: 999px; background: var(--peach-pale); color: #a57a62; font-size: 10px; }
.run-status.running { background: #fff6d9; color: #a4854e; }
.run-status.success { background: var(--aqua-pale); color: #4f9997; }
.run-status.error { background: #fff0ed; color: #b16c60; }
.viewer { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; position: relative; overflow: hidden; margin-top: 10px; border: 1px solid #eadfd6; border-radius: 17px; background: radial-gradient(circle at 50% 30%, #fffdfa, #f8efe6); touch-action: none; }
.viewer::after { content: ""; position: absolute; inset: 16px; pointer-events: none; border: 1px solid rgba(234, 223, 214, .65); border-radius: 12px; }
.viewer-empty { display: grid; z-index: 1; place-items: center; gap: 7px; color: var(--muted); text-align: center; }
.viewer-empty b { color: var(--ink-soft); font-size: 14px; }
.viewer-empty span { font-size: 10px; }
.empty-orbit { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 5px; border-radius: 50%; background: var(--aqua-pale); color: #64c9c6; font-size: 22px; box-shadow: 0 0 0 10px rgba(225, 246, 242, .58); }
.result-image { z-index: 2; max-width: none; max-height: none; user-select: none; cursor: grab; transform-origin: center center; box-shadow: 0 14px 35px rgba(75, 52, 43, .16); }
.result-image.dragging { cursor: grabbing; }
.viewer-tools { display: flex; align-items: center; justify-content: center; gap: 5px; padding-top: 9px; }
.viewer-tools button, .viewer-tools span { min-width: 29px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink-soft); font-size: 10px; }
.viewer-tools button { padding: 0 9px; }
.viewer-tools button:hover { border-color: var(--aqua); color: var(--aqua-deep); }
.viewer-tools span { min-width: 44px; border-color: transparent; background: transparent; color: var(--muted); }
.result-info { min-height: 22px; padding-top: 7px; color: var(--muted); font-size: 10px; text-align: center; }
.folder-note { min-height: 16px; color: var(--muted); font-size: 9px; text-align: center; }
.viewer:fullscreen { margin: 0; border: 0; border-radius: 0; background: #201a17; }
.viewer:fullscreen::after { border-color: rgba(255, 255, 255, .14); }
.footer-note { flex: 0 0 28px; display: flex; justify-content: center; gap: 10px; color: #bda99b; font-size: 10px; }
.footer-note span:first-child { color: var(--aqua-deep); font-weight: 700; }

.history-drawer { position: fixed; inset: 0; z-index: 10; display: flex; justify-content: flex-end; }
.history-drawer.hidden { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(76, 49, 36, .17); backdrop-filter: blur(3px); }
.drawer-panel { position: relative; width: min(390px, 90vw); height: 100%; padding: 27px; background: var(--paper); box-shadow: -15px 0 45px rgba(88, 56, 38, .12); animation: slide-in .22s ease-out; }
@keyframes slide-in { from { transform: translateX(30px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
.drawer-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.drawer-close { width: 31px; height: 31px; border-radius: 50%; background: var(--white); color: var(--muted); font-size: 23px; line-height: 1; }
.history-list { display: grid; gap: 9px; max-height: calc(100vh - 130px); overflow: auto; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.history-item b { display: block; color: var(--ink-soft); font-size: 11px; }
.history-item small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.history-item strong { color: var(--muted); font-size: 10px; white-space: nowrap; }
.history-item strong.success { color: var(--aqua-deep); }
.history-empty { padding: 44px 16px; border: 1px dashed #dbc8b8; border-radius: 14px; color: var(--muted); font-size: 12px; text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.environment-modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; }
.environment-modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(76, 49, 36, .22); backdrop-filter: blur(6px); }
.environment-dialog { position: relative; width: min(760px, 100%); max-height: min(780px, calc(100vh - 40px)); overflow: auto; padding: 28px; border: 1px solid rgba(231, 213, 196, .9); border-radius: 24px; background: var(--paper); box-shadow: 0 28px 80px rgba(88, 56, 38, .2); animation: modal-in .2s ease-out; }
@keyframes modal-in { from { transform: translateY(10px) scale(.98); opacity: .5; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal-header h2 { margin-top: 6px; font-size: 24px; }
.modal-header p { max-width: 540px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.environment-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 22px 0 18px; }
.setup-step { display: grid; gap: 4px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.setup-step > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--aqua-pale); color: var(--aqua-deep); font-size: 11px; font-weight: 800; }
.setup-step b { font-size: 11px; }
.setup-step small { min-height: 27px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.environment-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto 130px; align-items: end; gap: 8px; }
.environment-path, .environment-profile { display: grid; gap: 5px; min-width: 0; }
.environment-path > span, .environment-profile > span { color: var(--muted); font-size: 10px; }
.environment-path input, .environment-profile select { width: 100%; height: 34px; min-width: 0; border: 1px solid var(--line); border-radius: 9px; outline: 0; padding: 0 9px; background: var(--white); font-size: 11px; }
.environment-path small { color: var(--muted); font-size: 9px; }
.path-button { height: 34px; white-space: nowrap; }
.environment-actions { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 10px; }
.environment-status-card { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 13px 15px; border: 1px solid #efddcc; border-radius: 14px; background: #fff7ef; }
.environment-status-card.ready { border-color: #c8eee8; background: var(--aqua-pale); }
.environment-status-card.needs-models { border-color: #f0dbb7; background: #fff8df; }
.environment-status-icon { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 35px; border-radius: 50%; background: rgba(255,255,255,.75); color: var(--aqua-deep); font-size: 18px; }
.environment-status-card b { font-size: 13px; }
.environment-status-card p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.model-check-list { display: grid; gap: 7px; max-height: 250px; margin-top: 12px; overflow: auto; }
.model-check-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid #f0d8c9; border-radius: 11px; background: #fffaf5; }
.model-check-item.found { border-color: #d4eee8; background: #f7fdfa; }
.model-check-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.model-check-main > div { min-width: 0; }
.model-check-mark { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: #f8ddd0; color: #b6755b; font-size: 11px; font-weight: 800; }
.model-check-item.found .model-check-mark { background: var(--aqua-pale); color: var(--aqua-deep); }
.model-check-main b, .model-check-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-check-main b { font-size: 11px; }
.model-check-main small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.model-check-detail { display: grid; justify-items: end; gap: 4px; flex: 0 0 auto; text-align: right; }
.model-check-detail span { max-width: 230px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.model-check-detail a { color: var(--aqua-deep); font-size: 10px; text-decoration: none; }
.model-check-detail a:hover { text-decoration: underline; }
.model-check-empty { padding: 19px; border: 1px dashed #dbc8b8; border-radius: 12px; color: var(--muted); font-size: 11px; text-align: center; }
.guide-note { display: flex; gap: 8px; margin-top: 12px; padding: 11px 12px; border-radius: 11px; background: #f5ede5; color: var(--ink-soft); font-size: 10px; line-height: 1.55; }
.guide-note b { flex: 0 0 auto; color: #9b694e; }
.public-guide { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 15px; border-radius: 12px; background: var(--aqua-pale); }
.guide-illustration { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #fff; color: var(--aqua-deep); font-size: 20px; }
.public-guide b { font-size: 12px; }
.public-guide p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

@media (max-width: 980px) {
  .app-shell { min-height: 100vh; height: auto; }
  .topbar { padding: 0 18px; }
  .page-main { width: min(760px, calc(100% - 24px)); min-height: 0; grid-template-rows: 260px auto; padding-bottom: 20px; }
  .workspace-card { grid-template-columns: 1fr; overflow: visible; }
  .composer-panel { border-right: 0; border-bottom: 1px solid var(--line); min-height: 540px; }
  .result-panel { min-height: 520px; }
  .footer-note { padding-bottom: 18px; }
}

@media (max-width: 620px) {
  .topbar { height: auto; min-height: 66px; flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .brand { min-width: auto; }
  .top-nav { order: 3; width: 100%; }
  .top-actions { margin-left: auto; }
  .ready-badge { display: none; }
  .hero-card { min-height: 250px; }
  .hero-copy { width: 63%; padding: 22px 20px; }
  .hero-art { width: 50%; margin-left: -13%; opacity: .77; }
  .hero-copy h1 { font-size: 28px; }
  .workspace-card { border-radius: 18px; }
  .composer-panel, .result-panel { padding: 15px; }
  .composer-head { display: grid; gap: 10px; }
  .profile-switch { width: 100%; }
  .profile-option { flex: 1; }
  .person-options { grid-template-columns: 1fr; }
  .upload-grid { grid-template-columns: 1fr; }
  .multi-reference { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .size-presets { grid-template-columns: repeat(2, 1fr); }
  .parameter-grid { grid-template-columns: repeat(2, 1fr); }
  .parameter-grid .wide { grid-column: span 2; }
  .composer-panel { min-height: 660px; }
  .environment-modal { padding: 10px; }
  .environment-dialog { padding: 19px; border-radius: 18px; }
  .environment-flow { grid-template-columns: repeat(2, 1fr); }
  .environment-toolbar { grid-template-columns: 1fr auto; }
  .environment-profile { grid-column: span 2; }
  .model-check-item { align-items: flex-start; flex-direction: column; gap: 7px; }
  .model-check-detail { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; }
}
