: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: 1px solid rgba(255, 255, 255, .85); border-radius: 14px; background: #fff; box-shadow: 0 7px 18px rgba(127, 91, 66, .12); }
.brand-mark img { width: 47px; height: 47px; object-fit: cover; mix-blend-mode: normal; filter: none; }
.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 { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.result-header { display: grid; grid-template-columns: minmax(145px, 1fr) minmax(205px, 260px) minmax(230px, 1fr); align-items: center; gap: clamp(12px, 2.1vw, 28px); }
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-body.editing-mode { overflow: auto; scrollbar-width: thin; scrollbar-color: #dbc9bb transparent; }
.panel-body.editing-mode #promptPanel.active { display: block; height: auto; overflow: visible; }
.panel-body.editing-mode #referencePanel.active { display: block; height: auto; overflow: visible; margin: 4px 2px 7px; padding: 14px 0 7px; border-top: 1px solid var(--line); }
.panel-body.editing-mode #referencePanel.reference-collapsed { display: none; }
.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-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-heading-actions { display: flex; align-items: center; gap: 5px; }
.field-sync { margin: 0 0 6px; padding: 3px 7px; border: 1px solid #cfeee8; border-radius: 999px; background: #f5fcfa; color: var(--aqua-deep); font-size: 9px; }
.field-sync:hover { border-color: var(--aqua); }
.prompt-collapse-toggle { margin: 0 0 6px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); font-size: 9px; }
.prompt-collapse-toggle:hover { border-color: var(--aqua); color: var(--aqua-deep); }
.prompt-field-collapsed { display: none; }
.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; }
.reference-upload-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 9px 11px; border: 1px solid #f0dfd1; border-radius: 10px; background: #fffaf5; }
.reference-upload-actions > div { display: grid; min-width: 0; gap: 3px; }
.reference-upload-actions b { color: var(--ink-soft); font-size: 10px; }
.reference-upload-actions span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.reference-upload-actions .secondary-button { flex: 0 0 auto; white-space: nowrap; }
.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-remove { position: absolute; z-index: 4; top: 5px; right: 5px; display: grid; place-items: center; width: 21px; height: 21px; padding: 0; border: 1px solid rgba(255, 255, 255, .9); border-radius: 50%; background: rgba(74, 52, 43, .72); color: #fff; font-size: 16px; line-height: 1; box-shadow: 0 2px 7px rgba(44, 29, 23, .22); }
.upload-remove:hover { border-color: #fff; background: #b96f62; color: #fff; }
.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; }
.reference-toggle { display: block; margin: 14px 0 3px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink-soft); font-size: 10px; }
.reference-toggle:hover { border-color: var(--aqua); color: var(--aqua-deep); }
.size-presets { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.resolution-choice { display: grid; gap: 5px; margin-bottom: 12px; color: var(--ink-soft); font-size: 11px; }
.resolution-choice select { height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); padding: 0 8px; color: var(--ink-soft); }
.size-choice-label { margin-bottom: 7px; color: var(--ink-soft); font-size: 11px; }
.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 { width: min(290px, 100%); min-width: 220px; min-height: 48px; justify-self: center; padding: 10px 18px; border-radius: 13px; }
.result-generate-button span { font-size: 14px; }
.result-generate-button small { font-size: 10px; }

.result-header h2 { font-size: 20px; }
.result-heading { min-width: 0; }
.result-actions { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-self: stretch; gap: 7px; min-width: 0; }
.result-utility-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.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 { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 27px; margin: 0; padding: 5px 9px; border-radius: 999px; background: var(--peach-pale); color: #a57a62; font-size: 10px; text-align: center; }
.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; display: block; 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, .guide-drawer { position: fixed; inset: 0; z-index: 10; display: flex; justify-content: flex-end; }
.history-drawer.hidden, .guide-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(560px, 92vw); 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-header-actions { display: flex; align-items: center; gap: 7px; }
.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; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; 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); }
.artwork-card { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; min-width: 0; padding: 8px; text-align: left; transition: .2s ease; }
.artwork-card:hover, .artwork-card:focus-visible { border-color: var(--aqua); background: #f7fcfa; box-shadow: var(--soft-shadow); outline: 0; }
.artwork-card img { width: 74px; height: 92px; border-radius: 8px; object-fit: cover; background: var(--paper-deep); }
.artwork-card-copy { display: grid; min-width: 0; gap: 5px; }
.artwork-card-copy b { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.artwork-card-copy small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.artwork-card-more { align-self: start; color: var(--muted); font-size: 18px; line-height: 1; }
.history-empty { padding: 44px 16px; border: 1px dashed #dbc8b8; border-radius: 14px; color: var(--muted); font-size: 12px; text-align: center; }
.artwork-browser { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 28px; }
.artwork-browser.hidden { display: none; }
.artwork-backdrop { position: absolute; inset: 0; background: rgba(54, 37, 30, .42); backdrop-filter: blur(8px); }
.artwork-dialog { position: relative; width: min(960px, 94vw); height: min(850px, 92vh); display: flex; flex-direction: column; padding: 22px; border: 1px solid rgba(255, 255, 255, .52); border-radius: 23px; background: var(--paper); box-shadow: 0 28px 100px rgba(42, 26, 20, .28); animation: modal-in .2s ease-out; }
.artwork-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.artwork-header h2 { margin-top: 5px; }
.artwork-header small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.artwork-header-actions { display: flex; align-items: center; gap: 7px; }
.artwork-stage { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; position: relative; overflow: hidden; margin-top: 15px; border: 1px solid var(--line); border-radius: 16px; background: radial-gradient(circle at 50% 30%, #fffdfa, #f1e7dd); touch-action: none; }
.artwork-stage::after { content: ""; position: absolute; inset: 15px; pointer-events: none; border: 1px solid rgba(255, 255, 255, .65); border-radius: 12px; }
.artwork-stage img { z-index: 1; display: block; max-width: none; max-height: none; user-select: none; cursor: grab; transform-origin: center center; box-shadow: 0 15px 36px rgba(75, 52, 43, .18); }
.artwork-stage img.dragging { cursor: grabbing; }
.artwork-stage canvas { z-index: 2; display: block; width: auto; height: auto; max-width: none; max-height: none; cursor: grab; transform-origin: center center; box-shadow: 0 15px 36px rgba(75, 52, 43, .18); }
.artwork-stage canvas.editing-tool { cursor: crosshair; }
.artwork-stage canvas.dragging { cursor: grabbing; }
.artwork-empty { color: var(--muted); font-size: 12px; }
.artwork-view-tools, .artwork-edit-tools { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding-top: 11px; }
.artwork-view-tools button, .artwork-view-tools span, .artwork-edit-tools button { min-width: 31px; height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink-soft); font-size: 10px; }
.artwork-view-tools button:hover, .artwork-edit-tools button:hover { border-color: var(--aqua); color: var(--aqua-deep); }
.artwork-edit-tools button.active { border-color: var(--aqua); background: var(--aqua-pale); color: var(--aqua-deep); }
.artwork-view-tools span { display: grid; place-items: center; min-width: 47px; border-color: transparent; background: transparent; color: var(--muted); }
.artwork-edit-tools span { flex: 1 1 180px; color: var(--muted); font-size: 10px; text-align: center; }
.artwork-edit-tools #artworkEditZoomValue { flex: 0 0 auto; min-width: 47px; }
.artwork-brush-panel { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 9px; padding: 9px 11px; border: 1px solid #dcefeb; border-radius: 11px; background: #f5fcfa; }
.artwork-brush-panel label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 10px; }
.artwork-brush-panel input[type="range"] { width: 160px; accent-color: var(--aqua-deep); }
.artwork-brush-panel output { min-width: 30px; color: var(--aqua-deep); font-size: 10px; }
.artwork-brush-panel span { color: var(--muted); font-size: 9px; }
.artwork-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.artwork-edit-button { flex: 0 0 auto; min-width: 160px; min-height: 44px; }
.danger-button:hover { border-color: #d99b8e; color: #b16c60; }
.artwork-context-menu { position: fixed; z-index: 45; display: grid; min-width: 150px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); box-shadow: 0 14px 36px rgba(75, 52, 43, .2); }
.artwork-context-menu.hidden { display: none; }
.artwork-context-menu button { padding: 9px 11px; border-radius: 7px; background: transparent; color: var(--ink-soft); font-size: 11px; text-align: left; }
.artwork-context-menu button:hover { background: var(--aqua-pale); color: var(--aqua-deep); }
.assistant-pet { position: fixed; right: 22px; bottom: 22px; z-index: 18; display: flex; align-items: center; gap: 7px; min-height: 53px; padding: 5px 12px 5px 5px; border: 1px solid rgba(207, 239, 233, .95); border-radius: 999px; background: rgba(247, 253, 251, .96); color: var(--aqua-deep); box-shadow: 0 14px 30px rgba(69, 135, 132, .2); backdrop-filter: blur(8px); font-size: 10px; font-weight: 800; transition: transform .2s ease, box-shadow .2s ease; }
.assistant-pet:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(69, 135, 132, .26); }
.assistant-pet img { width: 46px; height: 46px; object-fit: contain; }
.batch-plan-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; }
.batch-plan-modal.hidden { display: none; }
.batch-plan-dialog { position: relative; width: min(930px, 96vw); max-height: min(820px, calc(100vh - 28px)); overflow: auto; padding: 22px; border: 1px solid rgba(231, 213, 196, .9); border-radius: 24px; background: var(--paper); box-shadow: 0 28px 90px rgba(88, 56, 38, .24); animation: modal-in .2s ease-out; }
.batch-plan-header { display: grid; grid-template-columns: 68px minmax(0, 1fr) auto; align-items: center; gap: 13px; }
.batch-plan-mascot { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: radial-gradient(circle at 50% 45%, #fff, #e8f8f3); }
.batch-plan-mascot img { width: 67px; height: 67px; object-fit: contain; }
.batch-plan-header h2 { margin-top: 4px; font-size: 24px; }
.batch-plan-header p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.batch-plan-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .92fr); gap: 16px; margin-top: 18px; }
.batch-plan-form, .batch-plan-status-card { padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.62); }
.batch-plan-form textarea { width: 100%; resize: vertical; }
.batch-plan-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) 90px; gap: 8px; margin-top: 12px; }
.batch-plan-grid .select-field:last-child { grid-column: 1 / -1; }
.batch-plan-grid select, .batch-plan-grid input { height: 34px; width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--white); padding: 0 8px; color: var(--ink-soft); font-size: 11px; }
.batch-edit-prompt { margin-top: 12px; }
.batch-edit-prompt textarea { margin-top: 5px; }
.batch-ethnicity-wrap { margin-top: 12px; }
.batch-ethnicity-wrap .field-label small { color: var(--muted); font-size: 9px; font-weight: 400; }
.batch-ethnicity-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.batch-ethnicity-options label { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink-soft); font-size: 10px; }
.batch-ethnicity-options input { accent-color: var(--aqua-deep); }
.batch-plan-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.batch-plan-status-card { display: flex; flex-direction: column; min-height: 350px; background: linear-gradient(145deg, #f7fdfa, #fffaf4); }
.batch-plan-status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.batch-plan-status-head b, .batch-plan-status-head span { display: block; }
.batch-plan-status-head b { color: var(--ink); font-size: 13px; }
.batch-plan-status-head span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.batch-plan-status-head strong { color: var(--aqua-deep); font-size: 19px; }
.batch-plan-progress-track { height: 8px; overflow: hidden; margin-top: 12px; border-radius: 99px; background: #dcefeb; }
.batch-plan-progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--aqua), #9de2d0); transition: width .25s ease; }
.batch-plan-current { margin-top: 10px; color: var(--muted); font-size: 10px; }
.batch-plan-items { display: grid; gap: 7px; max-height: 285px; margin-top: 12px; overflow: auto; }
.batch-plan-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.batch-plan-item.running { border-color: #bde9df; background: #f3fcf9; }
.batch-plan-item.success { border-color: #caeae0; }
.batch-plan-item.error { border-color: #f0cfc5; }
.batch-plan-item-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.batch-plan-item-main > div { min-width: 0; }
.batch-plan-item-index { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; border-radius: 50%; background: var(--peach-pale); color: #9b694e; font-size: 10px; font-weight: 800; }
.batch-plan-item-main b, .batch-plan-item-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-plan-item-main b { color: var(--ink-soft); font-size: 10px; }
.batch-plan-item-main small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.batch-plan-item-state { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.batch-plan-thumb { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 7px; object-fit: cover; background: var(--paper-deep); }
.batch-plan-empty { padding: 24px 10px; border: 1px dashed #dbc8b8; border-radius: 11px; color: var(--muted); font-size: 10px; text-align: center; }
.batch-plan-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.guide-drawer { display: grid; place-items: center; padding: 24px; }
.guide-drawer .drawer-backdrop { background: rgba(76, 49, 36, .16); backdrop-filter: blur(4px); }
.guide-panel { position: absolute; width: min(1080px, calc(100vw - 48px)); height: min(860px, calc(100vh - 48px)); max-height: calc(100vh - 48px); overflow: auto; padding: 28px 32px 30px; border: 1px solid rgba(231, 213, 196, .9); border-radius: 28px; background: var(--paper); box-shadow: 0 32px 110px rgba(88, 56, 38, .28); animation: modal-in .2s ease-out; scrollbar-width: thin; scrollbar-color: #dbc9bb transparent; }
.guide-window-header { position: sticky; top: -28px; z-index: 5; display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin: -28px -32px 18px; padding: 25px 32px 18px; border-bottom: 1px solid rgba(231, 213, 196, .7); background: linear-gradient(180deg, rgba(255, 250, 245, .99) 76%, rgba(255, 250, 245, .92)); cursor: grab; user-select: none; touch-action: none; }
.guide-window-header.dragging { cursor: grabbing; }
.guide-window-header .eyebrow { display: block; }
.guide-window-header h2 { margin: 7px 0 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.guide-subtitle { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.guide-close-button { position: absolute; top: 23px; right: 28px; z-index: 6; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--muted); font-size: 30px; line-height: 1; box-shadow: 0 5px 14px rgba(88, 56, 38, .08); }
.guide-close-button:hover { border-color: var(--aqua); background: var(--aqua-pale); color: var(--aqua-deep); }
.guide-drag-hint { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.guide-lead { margin: -4px 0 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.onboarding-progress { display: grid; gap: 8px; margin-bottom: 16px; color: var(--muted); font-size: 11px; }
.onboarding-progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: #eadfd3; }
.onboarding-progress-track i { display: block; width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--aqua), #a5e6d6); transition: width .2s ease; }
.onboarding-active-card { padding: 22px; border: 1px solid #cfeee8; border-radius: 20px; background: linear-gradient(135deg, #f6fdfa, #fffaf4); box-shadow: var(--soft-shadow); }
.guide-active-layout { display: grid; grid-template-columns: minmax(270px, .72fr) minmax(0, 1.28fr); align-items: stretch; gap: 26px; }
.guide-active-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 8px 5px; }
.guide-active-copy .eyebrow { font-size: 11px; }
.guide-screenshot-frame { height: 330px; overflow: hidden; border: 1px solid rgba(231, 213, 196, .95); border-radius: 15px; background: #f7f4ef; box-shadow: inset 0 0 0 8px rgba(255,255,255,.42); }
.guide-screenshot { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.guide-screenshot-caption { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; text-align: center; }
.guide-sheep-wrap { display: grid; place-items: center; min-height: 92px; margin-top: 9px; border-radius: 15px; background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.96), rgba(225,246,242,.5)); }
.guide-sheep { display: block; width: 100px; height: 100px; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(113, 83, 59, .12)); }
.onboarding-active-card h3 { margin: 10px 0 10px; font-size: clamp(22px, 2.6vw, 29px); letter-spacing: -.035em; }
.onboarding-active-card p { min-height: 0; margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.85; }
.guide-primary-button, .guide-next-button { padding: 11px 16px; border-radius: 11px; background: var(--aqua); color: #285d5e; font-size: 12px; font-weight: 800; box-shadow: 0 8px 17px rgba(86, 190, 187, .18); }
.guide-primary-button { align-self: flex-start; margin-top: 18px; }
.guide-primary-button:hover, .guide-next-button:hover { transform: translateY(-1px); }
.onboarding-step-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 17px; }
.onboarding-step { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: 62px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); text-align: left; }
.onboarding-step:last-child { grid-column: 1 / -1; }
.onboarding-step:hover, .onboarding-step.active { border-color: var(--aqua); background: #f5fcfa; }
.onboarding-step-index { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--peach-pale); color: #a16d53; font-size: 11px; font-weight: 800; }
.onboarding-step.done .onboarding-step-index { background: var(--aqua-pale); color: var(--aqua-deep); }
.onboarding-step-copy { display: grid; gap: 3px; min-width: 0; }
.onboarding-step-copy b { color: var(--ink-soft); font-size: 12px; }
.onboarding-step-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.onboarding-step-status { color: var(--muted); font-size: 10px; white-space: nowrap; }
.onboarding-step.done .onboarding-step-status { color: var(--aqua-deep); }
.onboarding-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.onboarding-footer .secondary-button:disabled { cursor: default; opacity: .45; }
.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-mode-actions { display: grid; grid-template-columns: auto auto minmax(150px, 190px); align-items: end; gap: 8px; margin-bottom: 12px; }
.auto-setup-panel { display: grid; gap: 9px; padding: 14px; border: 1px solid #c8eee8; border-radius: 14px; background: #f7fdfa; }
.auto-setup-progress { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.auto-setup-progress b, .auto-setup-progress span { display: block; }
.auto-setup-progress b { font-size: 12px; color: var(--ink); }
.auto-setup-progress span { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.auto-setup-progress strong { color: var(--aqua-deep); font-size: 16px; }
.auto-progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #dcefeb; }
.auto-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--aqua); transition: width .25s ease; }
.auto-candidate-list { display: grid; gap: 6px; max-height: 120px; overflow: auto; }
.auto-candidate { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.7); color: var(--ink-soft); font-size: 10px; }
.environment-repair-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #f0d2b4; border-radius: 11px; background: #fff8ee; }
.environment-repair-actions b, .environment-repair-actions small { display: block; }
.environment-repair-actions b { color: #9b694e; font-size: 11px; }
.environment-repair-actions small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.auto-candidate b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-candidate small { flex: 0 0 auto; color: var(--aqua-deep); }
.manual-environment-panel { margin-top: 4px; padding: 12px; border: 1px dashed #dbc8b8; border-radius: 13px; background: #fffaf5; }
.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; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.guide-local-link.secondary { background: transparent; color: var(--aqua-deep); border: 1px solid #b9dfe0; }
.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-ready-label { color: var(--aqua-deep); font-size: 10px; font-weight: 700; }
.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; }
.guide-local-link { display: inline-block; margin-top: 7px; padding: 8px 10px; border-radius: 9px; color: var(--aqua-deep); font-size: 10px; font-weight: 800; text-decoration: none; }
.guide-local-link.download { background: var(--aqua); color: #285d5e; box-shadow: 0 6px 14px rgba(86, 190, 187, .16); }
.guide-local-link:hover { text-decoration: underline; }
.guide-version-note { align-self: center; color: var(--muted); font-size: 10px; white-space: nowrap; }

@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; }
  .result-header { grid-template-columns: minmax(130px, 1fr) minmax(210px, 280px); gap: 14px; }
  .result-generate-button { grid-column: 2; grid-row: 1; }
  .result-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .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; }
  .result-header { grid-template-columns: 1fr; align-items: stretch; gap: 9px; }
  .result-generate-button { grid-column: auto; grid-row: auto; width: 100%; min-width: 0; }
  .result-actions { grid-column: auto; justify-content: flex-start; }
  .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-mode-actions { grid-template-columns: 1fr 1fr; }
  .environment-mode-actions .environment-profile { grid-column: span 2; }
  .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; }
  .guide-panel { width: min(1080px, calc(100vw - 20px)); height: min(760px, calc(100vh - 20px)); max-height: calc(100vh - 20px); padding: 19px; border-radius: 20px; }
  .guide-window-header { top: -19px; margin: -19px -19px 16px; padding: 19px 19px 15px; }
  .guide-window-header h2 { padding-right: 48px; font-size: 25px; }
  .guide-close-button { top: 17px; right: 17px; }
  .guide-active-layout { grid-template-columns: 1fr; gap: 17px; }
  .guide-active-copy { padding: 0; }
  .guide-screenshot-frame, .guide-screenshot { height: 220px; }
  .guide-visual-stage { display: grid; grid-template-columns: minmax(0, 1fr) 88px; align-items: center; column-gap: 10px; }
  .guide-screenshot-caption { grid-column: 1; }
  .guide-sheep-wrap { grid-column: 2; grid-row: 1 / span 2; min-height: 88px; margin-top: 0; }
  .guide-sheep { width: 82px; height: 82px; }
  .onboarding-step-list { grid-template-columns: 1fr; }
  .onboarding-step:last-child { grid-column: auto; }
  .assistant-pet { right: 12px; bottom: 12px; }
  .batch-plan-dialog { padding: 17px; }
  .batch-plan-body { grid-template-columns: 1fr; }
}

.qwen-test-scope{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:18px auto 26px;padding:20px 24px;max-width:1180px;border:1px solid #cfe9df;border-radius:18px;background:linear-gradient(110deg,#effaf5,#fffaf0);box-shadow:0 12px 30px rgba(48,91,79,.06)}
.qwen-test-scope strong{display:block;color:#245b51;font-size:17px;letter-spacing:.02em}
.qwen-test-scope p{margin:7px 0 0;color:#61736d;font-size:14px;line-height:1.65}
.qwen-package-download{flex:0 0 auto;display:flex;flex-direction:column;gap:4px;padding:12px 17px;border-radius:12px;background:#53b9aa;color:#fff;text-decoration:none;font-weight:700;box-shadow:0 6px 16px rgba(49,151,139,.15)}
.qwen-package-download span{font-size:11px;font-weight:500;opacity:.88}
@media(max-width:720px){.qwen-test-scope{align-items:stretch;flex-direction:column;gap:14px;margin:14px 12px;padding:16px}.qwen-package-download{align-items:center;text-align:center}}