/* =========================================================
   印对 · 产品原型 v2（方向 C：黑白两套配色，结构参照 Lovart）
   间距只用 4/8/12/16/24/32/48/64/96
   ========================================================= */

body[data-theme="dark"] {
  --bg: #121212; --side: #171717; --surface: #1C1C1C; --surface-2: #262626; --surface-3: #303030;
  --text: #F5F5F5; --text-2: #BDBDBD; --text-3: #8F8F8F;
  --line: #282828; --line-strong: #3A3A3A;
  --primary: #FFFFFF; --primary-ink: #111111; --primary-hover: #E4E4E4;
  --send-off: #E6E6E6; --send-off-ink: #7A7A7A;
  --input-line: #333333; --shadow-input: 0 2px 8px rgba(0, 0, 0, .25);
  --canvas: #161616; --dot: #2C2C2C;
  --sel: #4C8DFF; --sel-soft: rgba(76, 141, 255, .18);
  --ok: #4CC38A; --ok-soft: rgba(76, 195, 138, .15);
  --warn: #E8B04A; --warn-soft: rgba(232, 176, 74, .15);
  --err: #F06A6A;
  --shadow-pop: 0 8px 16px rgba(0, 0, 0, .5);
  --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}
body[data-theme="light"] {
  --bg: #FFFFFF; --side: #F7F7F7; --surface: #FFFFFF; --surface-2: #F1F1F1; --surface-3: #E6E6E6;
  --text: #111111; --text-2: #555555; --text-3: #6F6F6F;
  --line: #ECECEC; --line-strong: #D9D9D9;
  --primary: #111111; --primary-ink: #FFFFFF; --primary-hover: #333333;
  --send-off: #F0F0F0; --send-off-ink: #B5B5B5;
  --input-line: #EBEBEB; --shadow-input: 0 4px 16px rgba(0, 0, 0, .05);
  --canvas: #F3F3F3; --dot: #D6D6D6;
  --sel: #2B6BF3; --sel-soft: rgba(43, 107, 243, .12);
  --ok: #1E8E5A; --ok-soft: #E3F4EA;
  --warn: #9A6200; --warn-soft: #FBF0D9;
  --err: #D23B3B;
  --shadow-pop: 0 2px 4px rgba(0, 0, 0, .04), 0 8px 16px rgba(0, 0, 0, .10);
  --scrim: rgba(0, 0, 0, .35);
  color-scheme: light;
}
:root {
  --font-ui: "Geist", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-display: "Noto Serif SC", "Source Han Serif SC", serif;
  --r-1: 10px; --r-2: 16px; --r-3: 22px;
  --ease: cubic-bezier(.2, 0, 0, 1);
  /* 折叠 / 抽屉：起步快、最后一段慢慢落稳（实测 Lovart 侧栏，和 iOS 抽屉同一条）。收起 470ms，展开 580ms */
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.6 var(--font-ui); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-s { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--r-1); background: none; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color 120ms var(--ease), border-color 120ms, color 120ms, transform 80ms; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-quiet { color: var(--text-2); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--text-2); flex: none; transition: background-color 120ms, color 120ms; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: none; color: var(--text-2); font-size: 13px; white-space: nowrap; transition: background-color 120ms, color 120ms, border-color 120ms; }
.pill:hover { background: var(--surface-2); color: var(--text); }
.pill[aria-pressed="true"] { background: var(--surface-2); border-color: var(--text-3); color: var(--text); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-sel { background: var(--sel-soft); color: var(--sel); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 6px; font: 500 12px/18px var(--font-ui); color: var(--text-3); }

/* ---------- 外壳与左侧导航（参照 Lovart） ---------- */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
body[data-side="closed"] .shell { grid-template-columns: 61px minmax(0, 1fr); }
body[data-full="true"] .shell { grid-template-columns: minmax(0, 1fr); }
body[data-full="true"] .side { display: none; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 12px; background: var(--side); border-right: 1px solid var(--line); overflow: hidden; }
.side-top { position: relative; display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 0 0 4px; }
.logo { display: inline-flex; align-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.logo-mark { width: 28px; height: 28px; flex: none; }
.side-new { display: flex; align-items: center; gap: 10px; height: 36px; margin: 16px 0; padding: 0 7px; overflow: hidden; white-space: nowrap; border: 1px solid var(--input-line); border-radius: var(--r-1); background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); font-size: 14px; font-weight: 500; transition: background-color 120ms; }
.side-new:hover { background: var(--surface-2); }
.side-new .ic, .side-nav .ic { width: 20px; height: 20px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px; overflow: hidden; white-space: nowrap; border-radius: var(--r-1); color: var(--text); text-decoration: none; font-size: 14px; transition: background-color 120ms; }
.side-nav a:hover { background: var(--surface-2); }
.side-nav a[aria-current="page"] { background: var(--surface-3); }
.side-recent { margin-top: 24px; min-height: 0; overflow: auto; }
.side-h { padding: 0 8px; margin-bottom: 8px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.side-recent a { display: block; height: 36px; margin-bottom: 2px; padding: 0 8px; border-radius: var(--r-1); line-height: 36px; font-size: 14px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-recent a:hover { background: var(--surface-2); }
.side-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; }
.side-user { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px; border: 0; border-radius: var(--r-1); background: none; font-size: 14px; min-width: 36px; max-width: 100%; overflow: hidden; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sel); color: #FFFFFF; font-size: 12px; font-weight: 600; flex: none; }
/* 桌面端折叠：侧栏像帘子一样收拢，图标位置不动；文字收起时立刻淡出，展开时等帘子拉开大半再淡入。
   曲线和时长按 Lovart 录屏逐帧实测：--ease-drawer，收起 470ms，展开 580ms。
   折叠按钮贴着侧栏右缘，收起时跟着滑到 logo 上并隐去，鼠标移到 logo 上再显出来。
   动效只在用户点击后启用（body.side-anim），刷新页面时不播放。 */
@media (min-width: 901px) {
  .side-toggle { position: absolute; top: 2px; right: 0; transition: opacity 120ms var(--ease), right 470ms var(--ease-drawer), background-color 120ms, color 120ms; }
  body.side-anim .shell { transition: grid-template-columns 580ms var(--ease-drawer); }
  body.side-anim[data-side="closed"] .shell { transition-duration: 470ms; }
  body.side-anim .side-label, body.side-anim .side-recent { transition: opacity 150ms var(--ease) 140ms, visibility 0s; }
  body[data-side="closed"] .side-label, body[data-side="closed"] .side-recent { opacity: 0; visibility: hidden; }
  body.side-anim[data-side="closed"] .side-label, body.side-anim[data-side="closed"] .side-recent { transition: opacity 90ms var(--ease), visibility 0s 90ms; }
  body[data-side="closed"] .side-toggle { right: 2px; opacity: 0; background: var(--surface-2); color: var(--text); }
  body[data-side="closed"] .side-toggle:hover, body[data-side="closed"] .side-toggle:focus-visible { opacity: 1; }
  body[data-side="closed"] .side-bottom { flex-direction: column-reverse; align-items: flex-start; }
  body[data-side="closed"] #theme-toggle { margin-left: 2px; }
  body.side-anim[data-side="closed"] #theme-toggle { animation: fade 160ms var(--ease) 140ms both; }
}
.main { min-width: 0; }

/* ---------- 输入框（首页与对话共用，参照 Lovart） ---------- */
.composer { position: relative; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-3); padding: 14px 12px 10px 16px; text-align: left; transition: border-color 160ms var(--ease); }
.composer:focus-within { border-color: var(--text-3); }
.composer textarea { display: block; width: 100%; min-height: 48px; max-height: 200px; border: 0; padding: 0 4px 0 0; resize: none; background: transparent; font-size: 15px; line-height: 1.6; outline: none; }
.composer .ph { position: absolute; left: 16px; top: 14px; right: 48px; display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 15px; line-height: 1.6; pointer-events: none; white-space: nowrap; overflow: hidden; }
.composer.has-text .ph { display: none; }
.composer-bar { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.composer-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.composer-chips:not(:empty) { margin-bottom: 8px; }
.att { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface-2); font-size: 13px; }
.att img { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }
.ref { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--sel-soft); color: var(--sel); font-size: 13px; font-weight: 500; }
.m-user .ref { padding-right: 10px; }
.ref button, .att button { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: none; color: inherit; padding: 0; }
.ref button:hover, .att button:hover { background: var(--surface-3); }
.spec { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; animation: pop-in 160ms var(--ease) both; }
.send { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--primary); color: var(--primary-ink); flex: none; transition: background-color 120ms, transform 80ms; }
.send:hover:not(:disabled) { background: var(--primary-hover); }
.send:active:not(:disabled) { transform: scale(.94); }
.send:disabled { background: var(--send-off); color: var(--send-off-ink); cursor: not-allowed; }  /* 空态是浅色圆、淡箭头（取自 Lovart），深色下也看得见 */
.send .ic { width: 18px; height: 18px; stroke-width: 2; }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------- 弹出菜单、弹窗、抽屉、提示 ---------- */
.pop { position: fixed; z-index: 60; min-width: 200px; padding: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-pop); animation: pop-in 120ms var(--ease) both; }
.pop-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font-size: 14px; text-align: left; white-space: nowrap; }
.pop-item:hover { background: var(--surface-2); }
.pop-item .muted { margin-left: auto; font-size: 12px; }
.pop-sep { height: 1px; margin: 4px 0; background: var(--line); }
.pop-wide { width: 360px; padding: 12px; }
.scrim { position: fixed; inset: 0; z-index: 70; background: var(--scrim); display: grid; place-items: center; padding: 24px; animation: fade 160ms var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: 86vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 24px; animation: pop-in 200ms var(--ease) both; }
.modal-wide { width: min(760px, 100%); }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-h h2 { font-size: 18px; font-weight: 600; }
.modal-h p { margin-top: 4px; font-size: 13px; color: var(--text-3); }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.drawer-scrim { place-items: stretch end; padding: 0; }
.drawer { width: min(520px, 100vw); height: 100vh; overflow: auto; background: var(--surface); border-left: 1px solid var(--line); padding: 24px; animation: slide-in 240ms var(--ease) both; }
@keyframes slide-in { from { transform: translateX(16px); opacity: 0; } }
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-pop); animation: pop-in 200ms var(--ease) both; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 13px; color: var(--text-2); }
.input { height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-1); background: var(--bg); font-size: 14px; outline: none; transition: border-color 120ms; }
.input:focus { border-color: var(--text-3); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-1); background: var(--surface-2); }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.switch { position: relative; width: 36px; height: 20px; border: 0; padding: 0; border-radius: 999px; background: var(--surface-3); flex: none; transition: background-color 160ms var(--ease); }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; transition: transform 160ms var(--ease); }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--primary); }

/* ---------- 通用页面 ---------- */
.page { max-width: 1760px; margin: 0 auto; padding: 32px clamp(32px, 4vw, 56px) 96px; }  /* 同首页：不封顶，折叠侧栏时内容跟着变宽 */
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-h h1 { font-size: 22px; font-weight: 600; }
.page-h p { margin-top: 4px; color: var(--text-3); font-size: 14px; }
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-3); min-width: 240px; }
.search input { border: 0; background: none; outline: none; flex: 1; font-size: 14px; color: var(--text); }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs button { height: 40px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-3); font-size: 15px; font-weight: 500; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-h h3 { font-size: 15px; font-weight: 600; }
.card-h p { font-size: 13px; color: var(--text-3); }
.empty { display: grid; place-items: center; gap: 8px; padding: 64px 16px; text-align: center; color: var(--text-3); }

.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { position: sticky; top: 0; z-index: 1; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line); color: var(--text-3); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.card .table th { background: var(--surface); }
.table td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-in { width: 100%; min-width: 0; height: 30px; padding: 0 8px; margin: -4px -8px; border: 1px solid transparent; border-radius: 6px; background: none; outline: none; font-size: 14px; }
.cell-in:hover { border-color: var(--line-strong); }
.cell-in:focus { border-color: var(--sel); background: var(--bg); }
.cell-in.num { text-align: right; width: 88px; }
.is-low { background: var(--warn-soft); border-radius: 6px; }
td .sub { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.al { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin: 0 2px 2px 0; padding: 0 4px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 600; }

/* ---------- 首页（结构参照 Lovart 2.0） ---------- */
.home { max-width: 1760px; margin: 0 auto; padding: 0 clamp(32px, 4vw, 56px) 96px; }  /* 和 Lovart 一样不封顶（大屏才封），折叠侧栏时卡片跟着变大 */
.home-hero { padding-top: 160px; max-width: 840px; margin: 0 auto; text-align: center; }
.home-title { font: 400 20px/1 var(--font-ui); margin-bottom: 40px; }
.home .composer, .ws.is-chat .agent-foot .composer { padding: 12px 8px 8px; border-color: var(--input-line); border-radius: 24px; box-shadow: var(--shadow-input); }
.home .composer:focus-within, .ws.is-chat .agent-foot .composer:focus-within { border-color: var(--line-strong); }
.home .composer textarea, .ws.is-chat .agent-foot .composer textarea { min-height: 48px; padding: 0 8px; font-size: 14px; }
.home .composer .ph, .ws.is-chat .agent-foot .composer .ph { top: 12px; left: 16px; font-size: 14px; }
.home .composer-chips, .ws.is-chat .agent-foot .composer-chips { padding: 0 8px; }
.home .composer-bar, .ws.is-chat .agent-foot .composer-bar { margin-top: 12px; }
/* 首页输入框比 Lovart 稍大：840 宽、约 134 高，四周留白更松（用户要求） */
.home .composer { padding: 16px 12px 12px; }
.home .composer textarea { min-height: 60px; }
.home .composer .ph { top: 16px; left: 20px; }
.home-cats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.home-cats .pill { height: 32px; padding: 0 14px; border-color: var(--input-line); font-size: 13px; color: var(--text); }
.sec { margin-top: 80px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sec-h h2 { font-size: 15px; font-weight: 500; }
.quick { display: grid; grid-auto-flow: column; grid-auto-columns: max(160px, calc((100% - 80px) / 6)); gap: 16px; overflow-x: auto; scrollbar-width: none; }
.quick-card { display: block; padding: 0; border: 0; background: none; text-align: left; }
.quick-card .qimg { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.quick-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 240ms var(--ease); }
.quick-card:hover img { transform: scale(1.03); }
.quick-card p { margin-top: 8px; font-size: 14px; }
.explore-tabs { display: flex; gap: 24px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.explore-tabs button { padding: 0; border: 0; background: none; color: var(--text-3); font-size: 15px; font-weight: 500; }
.explore-tabs button[aria-selected="true"] { color: var(--text); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters .pill { border-color: transparent; height: 32px; padding: 0 14px; font-size: 14px; }
.filters .pill[aria-pressed="true"] { background: var(--surface-2); border-color: transparent; }
.masonry { column-count: 4; column-gap: 16px; }
.mz { position: relative; break-inside: avoid; margin-bottom: 16px; border-radius: 12px; overflow: hidden; background: var(--surface-2); animation: pop-in 320ms var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.mz img { width: 100%; height: auto; }
.mz-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mz-pair span { position: absolute; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #FFFFFF; font-size: 12px; }
.mz-over { position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 32px 12px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); color: #FFFFFF; opacity: 0; transition: opacity 160ms var(--ease); }
.mz:hover .mz-over, .mz:focus-within .mz-over { opacity: 1; }
.mz-over h3 { font-size: 14px; font-weight: 600; }
.mz-over p { font-size: 12px; opacity: .8; }
.mz-over .btn { background: #FFFFFF; color: #111111; }
.mz-badge { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: #FFFFFF; color: #111111; font-size: 12px; font-weight: 600; }
@media (hover: none) { .mz-over { opacity: 1; } }

/* ---------- 项目列表 ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px 16px; }
.pcard { position: relative; display: block; text-decoration: none; }
.pcard-img { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 240ms var(--ease); }
.pcard:hover .pcard-img img { transform: scale(1.03); }
.pcard-b { padding: 12px 4px 0; }
.pcard-b h3 { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.pcard-b p { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.pcard .more { position: absolute; top: 8px; right: 8px; background: var(--surface); opacity: 0; }
.pcard:hover .more, .pcard .more:focus-visible { opacity: 1; }
.pnew { display: grid; place-items: center; align-content: center; gap: 8px; aspect-ratio: 4 / 3; width: 100%; border: 1px dashed var(--line-strong); border-radius: 12px; background: none; color: var(--text-2); font-size: 14px; }
.pnew:hover { background: var(--surface); color: var(--text); }

/* ---------- 品牌 ---------- */
.brand-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.blist { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 32px; }
.bitem { display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: var(--r-1); background: none; text-align: left; }
.bitem:hover, .bitem[aria-current="true"] { background: var(--surface-2); }
.bitem b { display: block; font-size: 14px; font-weight: 500; }
.bitem small { font-size: 12px; color: var(--text-3); }
.blogo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: #FFFFFF; font: 700 12px/1 var(--font-display); letter-spacing: .02em; flex: none; }
.blogo-lg { width: 64px; height: 64px; border-radius: 14px; font-size: 18px; }
.bhead { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.bhead h1 { font-size: 22px; font-weight: 600; }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 12px 16px; font-size: 14px; }
.dl dt { color: var(--text-3); }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.sw { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-3); }
.sw i { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line); }
.uses { display: flex; flex-direction: column; }
.uses a { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.uses a:last-child { border-bottom: 0; }
.uses img { width: 40px; height: 40px; object-fit: cover; object-position: top; border-radius: 8px; background: var(--surface-2); }
.note { display: flex; gap: 8px; padding: 12px; border-radius: var(--r-1); background: var(--surface-2); color: var(--text-2); font-size: 13px; }

/* ---------- 风格 ---------- */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 16px; }
/* 桌面端列数按屏幕宽度定，不按容器宽度：侧栏收放时卡片只变大小、不换列（换列会在动画中途跳位） */
@media (min-width: 901px) { .pgrid, .sgrid { --cols: 2; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); } }
@media (min-width: 1050px) { .pgrid, .sgrid { --cols: 3; } }
@media (min-width: 1320px) { .pgrid, .sgrid { --cols: 4; } }
@media (min-width: 1570px) { .pgrid, .sgrid { --cols: 5; } }
@media (min-width: 1830px) { .pgrid, .sgrid { --cols: 6; } }
.scard { padding: 0; border: 0; background: none; text-align: left; }
.scard .simg { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.scard img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 240ms var(--ease); }
.scard:hover img { transform: scale(1.03); }
.scard h3 { margin-top: 12px; font-size: 15px; font-weight: 500; }
.scard p { font-size: 13px; color: var(--text-3); }
.mem { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mem:last-child { border-bottom: 0; }
.mem b { font-size: 14px; font-weight: 500; }
.mem p { font-size: 13px; color: var(--text-3); }

/* ---------- 订单 ---------- */
.order { display: grid; grid-template-columns: var(--ot, 18%) minmax(0, 1fr); gap: 20px; padding: 16px; }
.order h3 { font-size: 15px; font-weight: 600; }
.track { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.track span { display: inline-flex; align-items: center; gap: 6px; }
.track span.on { color: var(--text); }
.track span.on .dot { color: var(--ok); }
.track i { width: 32px; height: 1px; background: var(--line-strong); }

/* 订单：每单一张卡片，缩略图按比例跟着卡片变大，文字不被拉长；列数按屏幕宽度定，侧栏收放时不换列 */
.ogrid { display: grid; gap: 16px; grid-template-columns: repeat(var(--oc, 1), minmax(0, 1fr)); }
.ogrid > .card + .card { margin-top: 0; }
@media (min-width: 1200px) { .ogrid { --oc: 2; } .order { --ot: 30%; } }
@media (min-width: 1830px) { .ogrid { --oc: 3; } }
.othumb { display: block; aspect-ratio: 210 / 297; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.othumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.obody { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ohead { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.order .track { flex-wrap: nowrap; gap: 6px; margin-top: 12px; font-size: 12px; }
.order .track i { flex: 1; min-width: 4px; width: auto; }
.ofoot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 16px; }
.oprice { font-size: 18px; }
.track span { white-space: nowrap; }
@media (max-width: 600px) {
  .order .track { flex-wrap: wrap; gap: 4px 10px; }
  .order .track i { display: none; }
  .bhead { flex-wrap: wrap; }
  .bhead .btn-primary { width: 100%; justify-content: center; }
}

/* 素材页：图像类素材（Logo、颜色、字体样张、照片、项目）按比例排，列数按屏幕宽度定，侧栏收放时跟着变大；文字信息保持紧凑两栏 */
.asec .card-h { margin-bottom: 12px; }
.agrid { display: grid; gap: 12px; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.agrid-logo { --n: 4; } .agrid-color { --n: 6; } .agrid-font { --n: 2; } .agrid-photo { --n: 5; } .agrid-proj { --n: 6; }
@media (max-width: 1319px) { .agrid-logo { --n: 3; } .agrid-color { --n: 5; } .agrid-photo { --n: 4; } .agrid-proj { --n: 5; } }
@media (max-width: 1049px) { .agrid-photo { --n: 3; } .agrid-proj { --n: 4; } }
@media (min-width: 1830px) { .agrid-logo { --n: 5; } .agrid-color { --n: 8; } .agrid-photo { --n: 6; } .agrid-proj { --n: 8; } }
@media (max-width: 600px) { .agrid-logo { --n: 2; } .agrid-color { --n: 4; } .agrid-font { --n: 1; } .agrid-photo { --n: 2; } .agrid-proj { --n: 3; } }
.atile { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; }
.aimg { display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.aimg img { width: 100%; height: 100%; padding: 14%; object-fit: contain; }
.checker { background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; }
.aimg-photo img, .aimg-proj img { padding: 0; object-fit: cover; }
.aimg-proj { position: relative; aspect-ratio: 3 / 4; color: var(--text-3); }
.aimg-proj img { position: absolute; inset: 0; }
.aimg-proj img { object-position: top; }
.atile figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 30px; font-size: 12px; }
.asel { height: 28px; max-width: 100%; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 12px; }
.atile-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .16); opacity: 0; transition: opacity 120ms, background-color 120ms; }
.atile:hover .atile-x, .atile-x:focus-visible { opacity: 1; }
.aadd { padding: 0; border: 0; background: none; color: var(--text-3); font-size: 12px; text-align: center; cursor: pointer; }
.aadd .aimg, .aswatch-add { border-style: dashed; background: none; }
.aadd:hover .aimg, .aadd:hover .aswatch-add { border-color: var(--line-strong); color: var(--text); }
.aswatch { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 2; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.atile input[type="color"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ahex { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.afont { display: grid; place-items: center; aspect-ratio: 5 / 2; container-type: inline-size; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.afont span { padding: 0 6cqi; font-size: 8cqi; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.afont-pick { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.dl2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; font-size: 14px; }
.dl2 dt { margin-bottom: 4px; font-size: 12px; color: var(--text-3); }
.dl2 dd { min-height: 20px; overflow-wrap: anywhere; }
@media (max-width: 600px) { .dl2 { grid-template-columns: 1fr; } }
.asub { margin: 20px 0 12px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.mtable { table-layout: fixed; }
.aproj { color: var(--text); text-decoration: none; }
.aproj-name { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.aproj .tag { align-self: flex-start; }
.blogo-img { background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.blogo-img img { width: 100%; height: 100%; padding: 12%; object-fit: contain; }
.bhead .btn-primary { gap: 6px; }
.pick-h { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pick { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; color: var(--text-3); font-size: 12px; text-align: left; }
.pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.pick:hover img { border-color: var(--text-3); }

/* ---------- 工作台（结构参照 Lovart 项目页） ---------- */
.ws { display: grid; grid-template-rows: 52px minmax(0, 1fr); height: 100vh; background: var(--canvas); }
.ws-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.ws-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ws-name { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.ws-name:hover { background: var(--surface-2); }
.ws-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.steps { display: flex; align-items: center; gap: 4px; }
.steps i { width: 12px; height: 1px; background: var(--line-strong); }
.step { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 6px; border: 0; border-radius: 999px; background: none; color: var(--text-3); font-size: 13px; font-weight: 500; }
.step b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 11px; font-weight: 600; }
.step.done { color: var(--text-2); }
.step.done b { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.step.cur { background: var(--surface-2); color: var(--text); }
.step.cur b { border-color: transparent; background: var(--primary); color: var(--primary-ink); }
.step:disabled { cursor: default; }
.step:not(:disabled):hover { color: var(--text); }
.chk-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 500; }
.chk-chip.ok { background: var(--ok-soft); color: var(--ok); }
.chk-item { padding: 12px; border-radius: 10px; }
.chk-item + .chk-item { border-top: 1px solid var(--line); border-radius: 0; }
.chk-item p { font-size: 13px; }
.chk-item .row { margin-top: 8px; }

.ws-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: 0; }
.ws-body.agent-off { grid-template-columns: minmax(0, 1fr) 0; }
.ws-body.agent-off .agent { display: none; }

.cv { position: relative; min-width: 0; overflow: hidden; background-color: var(--canvas); background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 20px 20px; }
.cv-scroll { position: absolute; inset: 0; overflow: auto; }
.cv-scroll.hand { cursor: grab; }
.cv-scroll.hand.dragging { cursor: grabbing; }
.cv-scroll.comment .menu-page { cursor: crosshair; }
.cv-board { display: flex; align-items: flex-start; gap: 64px; width: max-content; padding: 96px 120px 120px; transform-origin: 0 0; }
.artboard { position: relative; flex: none; }
.ab-label { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; font-size: 12px; color: var(--text-3); }
.ab-foot { display: flex; justify-content: center; margin-top: 16px; }
.cv-float { position: absolute; z-index: 5; display: flex; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); }
.cv-view { top: 12px; left: 12px; padding: 3px; }
.cv-view .seg { background: none; padding: 0; }
.cv-tools { left: 12px; top: 50%; transform: translateY(-50%); flex-direction: column; }
.cv-tools .icon-btn { width: 36px; height: 36px; }
.cv-hint { position: absolute; left: 50%; bottom: 16px; z-index: 4; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; white-space: nowrap; pointer-events: none; }
.cv-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; }
.ghost-page { width: 360px; aspect-ratio: 210 / 297; border-radius: 4px; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.cv-empty p { margin-top: 16px; text-align: center; color: var(--text-3); font-size: 13px; }

.el-bar { position: absolute; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-pop); animation: pop-in 120ms var(--ease) both; }
.el-bar button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-size: 13px; font-weight: 500; white-space: nowrap; }
.el-bar button:hover:not(:disabled) { background: var(--surface-2); }
.el-bar button:disabled { opacity: .35; cursor: not-allowed; }
.el-bar .lbl { padding: 0 8px; font-size: 12px; color: var(--text-3); white-space: nowrap; border-right: 1px solid var(--line); margin-right: 4px; }
.bubble { position: absolute; z-index: 7; width: 260px; padding: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-pop); animation: pop-in 120ms var(--ease) both; }
.bubble textarea { display: block; width: 100%; height: 64px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); resize: none; outline: none; font-size: 13px; }
.bubble .row { justify-content: flex-end; margin-top: 8px; }
.pin { position: absolute; z-index: 3; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50% 50% 50% 4px; background: var(--sel); color: #FFFFFF; font: 600 12px/1 var(--font-ui); transform: translate(-2px, -22px); box-shadow: 0 0 0 2px #FFFFFF; animation: pop-in 160ms var(--ease) both; pointer-events: none; }
.pin.done { background: var(--ok); }

/* 内容视图 */
.content-view { position: absolute; inset: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); background: var(--bg); }
.content-src { display: flex; flex-direction: column; gap: 12px; padding: 64px 16px 16px; border-right: 1px solid var(--line); overflow: auto; }
.content-src img { border-radius: 8px; border: 1px solid var(--line); }
.content-main { display: flex; flex-direction: column; min-height: 0; padding: 64px 24px 0; }
.content-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.content-head h2 { font-size: 16px; font-weight: 600; }
.content-head p { font-size: 13px; color: var(--text-3); }
.content-scroll { flex: 1; overflow: auto; padding-bottom: 32px; }

/* 对话栏 */
.agent { display: flex; flex-direction: column; min-height: 0; background: var(--bg); border-left: 1px solid var(--line); }
.agent-h { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.agent-h h2 { font-size: 14px; font-weight: 500; margin-right: auto; }
.msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.m-user { align-self: flex-end; max-width: 88%; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--surface-2); font-size: 14px; animation: pop-in 160ms var(--ease) both; }
.m-user .ref { margin: 0 4px 4px 0; }
.m-user .att { margin-bottom: 8px; background: var(--surface-3); }
.m-ai { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: 14px; animation: pop-in 200ms var(--ease) both; }
.m-ai > .ai-av { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); color: var(--text); }
.m-ai p + p, .m-ai p + .acard, .m-ai .acard + p { margin-top: 8px; }
.m-ai p + .prose, .m-ai .prose + p, .m-ai .prose + .acard, .m-ai .acard + .prose { margin-top: 8px; }
.prose li { position: relative; padding-left: 14px; }
.prose li + li { margin-top: 4px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.acard { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.acard h4 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.acard .dl { grid-template-columns: 64px 1fr; gap: 6px 12px; font-size: 13px; }
.acard .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.q { margin-top: 12px; }
.q > p { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.q .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.q .pill { height: 28px; font-size: 13px; }
.q .pill[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.prog li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--text-3); }
.prog li.done { color: var(--text); }
.prog li.done .st { color: var(--ok); }
.prog .st { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; }
.chg li { position: relative; padding-left: 14px; font-size: 13px; color: var(--text-2); }
.chg li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.thumbs { display: flex; gap: 8px; }
.thumbs button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px; border: 0; border-radius: 8px; background: none; font-size: 12px; color: var(--text-2); }
.thumbs button:hover { background: var(--surface-2); }
.thumbs button[aria-pressed="true"] { color: var(--text); }
.thumbs button[aria-pressed="true"] .vmini { outline: 2px solid var(--sel); outline-offset: 2px; }
.agent-foot { padding: 12px; flex: none; }
.agent-foot .composer { border-radius: 18px; padding: 12px 10px 8px 14px; }
.agent-foot .composer textarea { min-height: 24px; font-size: 14px; }
.agent-foot .composer .ph { top: 12px; left: 14px; font-size: 14px; }
.reopen { position: absolute; right: 16px; top: 12px; z-index: 6; }

/* ---------- 最终确认页 ---------- */
.cf { display: grid; grid-template-columns: minmax(0, 1fr) 440px; min-height: 0; }
.cf-prev { position: relative; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: 72px 24px 48px; background-color: var(--canvas); background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 20px 20px; }
.cf-bar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; }
.cf-bar .cv-float { position: static; align-items: center; }
.bleed { position: relative; padding: 10px; }
.bleed.on { background: repeating-linear-gradient(45deg, rgba(240, 106, 106, .22) 0 6px, transparent 6px 12px); }
.bleed.on::before { content: ""; position: absolute; inset: 10px; outline: 1px dashed var(--err); pointer-events: none; z-index: 2; }
.bleed.on::after { content: ""; position: absolute; inset: -12px; pointer-events: none; --m: var(--text-2);
  background:
    linear-gradient(var(--m), var(--m)) left 0 top 22px / 10px 1px no-repeat, linear-gradient(var(--m), var(--m)) left 22px top 0 / 1px 10px no-repeat,
    linear-gradient(var(--m), var(--m)) right 0 top 22px / 10px 1px no-repeat, linear-gradient(var(--m), var(--m)) right 22px top 0 / 1px 10px no-repeat,
    linear-gradient(var(--m), var(--m)) left 0 bottom 22px / 10px 1px no-repeat, linear-gradient(var(--m), var(--m)) left 22px bottom 0 / 1px 10px no-repeat,
    linear-gradient(var(--m), var(--m)) right 0 bottom 22px / 10px 1px no-repeat, linear-gradient(var(--m), var(--m)) right 22px bottom 0 / 1px 10px no-repeat; }
.legend { display: flex; gap: 16px; margin-top: 16px; font-size: 12px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 10px; }
.photo-prev { width: 520px; max-width: 100%; border-radius: 12px; }
.cf-panel { display: flex; flex-direction: column; min-height: 0; background: var(--bg); border-left: 1px solid var(--line); }
.cf-panel-h { padding: 20px 20px 12px; }
.cf-panel-h h2 { font-size: 18px; font-weight: 600; }
.cf-panel-h p { margin-top: 4px; font-size: 13px; color: var(--text-3); }
.cf-list { flex: 1; overflow: auto; padding: 0 20px 20px; }
.cf-sec { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; overflow: hidden; }
.cf-sec > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left; }
.cf-sec > button b { font-size: 14px; font-weight: 600; }
.cf-sec > button small { display: block; font-size: 12px; color: var(--text-3); font-weight: 400; }
.cf-sec > button .chev { margin-left: auto; transition: transform 160ms var(--ease); color: var(--text-3); }
.cf-sec.open > button .chev { transform: rotate(180deg); }
.cf-body { display: none; padding: 0 16px 16px; }
.cf-sec.open .cf-body { display: block; }
.st-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none; }
.st-ic.ok { background: var(--ok-soft); color: var(--ok); }
.st-ic.todo { border: 1.5px solid var(--line-strong); }
.diff td.changed { color: var(--warn); font-weight: 600; }
.big-line { font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.cf-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }

/* ---------- 印刷页 ---------- */
.pr-wrap { max-width: 1120px; margin: 0 auto; padding: 32px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.pr-wrap h2 { font-size: 16px; font-weight: 600; margin: 32px 0 12px; }
.pr-wrap h2:first-child { margin-top: 0; }
.choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.choice button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: none; text-align: left; transition: border-color 120ms, background-color 120ms; }
.choice button:hover { background: var(--surface); }
.choice button[aria-pressed="true"] { border-color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--text); }
.choice b { font-size: 14px; font-weight: 600; }
.choice small { font-size: 12px; color: var(--text-3); }
.files { display: flex; flex-direction: column; }
.file { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.file:last-child { border-bottom: 0; }
.file .ficon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); flex: none; }
.file b { font-size: 14px; font-weight: 500; }
.file p { font-size: 13px; color: var(--text-3); }
.sum { position: sticky; top: 32px; }
.sum-row { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 14px; color: var(--text-2); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 14px; }
.sum-total b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.success { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; text-align: center; }
.big-ok { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.big-ok .ic { width: 28px; height: 28px; stroke-width: 2; }
.success h2 { font-size: 20px; font-weight: 600; margin: 0; }

/* ---------- 分享出去的确认页（手机优先） ---------- */
.rv { min-height: 100vh; display: flex; justify-content: center; background: var(--canvas); }
.rv-col { width: 100%; max-width: 440px; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); border-inline: 1px solid var(--line); }
.rv-h { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.rv-h b { display: block; font-size: 15px; font-weight: 600; }
.rv-h small { font-size: 12px; color: var(--text-3); }
.rv-prev { position: relative; padding: 16px; background-color: var(--canvas); background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 20px 20px; }
.rv-fit { position: relative; margin: 0 auto; width: 440px; transform-origin: 0 0; }
.rv-tip { margin-top: 12px; text-align: center; font-size: 12px; color: var(--text-3); }
.rv-sec { padding: 16px; border-bottom: 1px solid var(--line); }
.rv-sec h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.rv-bar { position: sticky; bottom: 0; margin-top: auto; display: grid; grid-template-columns: 1fr 2fr; gap: 8px; padding: 12px 16px 16px; background: var(--bg); border-top: 1px solid var(--line); }
.rv-bar .btn { height: 48px; }

/* ---------- 稿子本身（用户的设计，不跟随界面配色） ---------- */
.menu-page {
  --mp-paper: #FBF6EA; --mp-red: #8E1F1A; --mp-gold: #B08A3E; --mp-ink: #2A211C; --mp-sub: #7A6A5E; --mp-head-ink: #F7EBD3;
  position: relative; width: 440px; aspect-ratio: 210 / 297; display: flex; flex-direction: column;
  background: var(--mp-paper); color: var(--mp-ink); font-family: "Noto Serif SC", Georgia, serif; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 16px rgba(0, 0, 0, .18);
  transition: background-color 240ms var(--ease), color 240ms;
}
.mp-head { display: flex; align-items: center; gap: 14px; padding: 20px 24px 16px; background: var(--mp-red); color: var(--mp-head-ink); border-bottom: 3px double var(--mp-gold); }
.mp-seal { display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid #E9CF95; color: #E9CF95; font-size: 13px; font-weight: 700; letter-spacing: .05em; flex: none; }
.mp-name { font-size: 24px; font-weight: 700; letter-spacing: .08em; line-height: 1.2; }
.mp-name-nl { margin-top: 2px; font: italic 11px/1.3 Georgia, serif; color: #E9CF95; letter-spacing: .04em; }
.mp-body { flex: 1; padding: 16px 26px 8px; column-count: 2; column-gap: 22px; }
.mp-sec { break-inside: avoid; margin-bottom: 12px; }
.mp-sec-title { font-size: 13px; font-weight: 700; color: var(--mp-red); margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(176, 138, 62, .5); }
.mp-sec-title em { font: italic 400 10.5px Georgia, serif; color: var(--mp-sub); margin-left: 4px; }
.mp-row { display: grid; grid-template-columns: 16px 1fr auto; gap: 6px; align-items: baseline; padding: 4px 4px; margin: 0 -4px; font-size: 11.5px; line-height: 1.35; }
.mp-row .no { font: 9.5px "Noto Serif SC", serif; color: var(--mp-gold); }
.mp-row .nm em { display: block; font: italic 9.5px/1.35 Georgia, serif; color: var(--mp-sub); }
.mp-row .pr { font: 500 11px "Noto Serif SC", serif; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.chili { display: inline-block; width: 5px; height: 8px; margin-left: 2px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #C0392B; vertical-align: 1px; }
.mp-set { margin: 4px 26px 12px; padding: 10px 14px; border: 1px solid var(--mp-gold); outline: 1px solid var(--mp-gold); outline-offset: 2px; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; }
.mp-set-k { font-size: 12.5px; font-weight: 700; color: var(--mp-red); }
.mp-set-k em { font: italic 400 10px Georgia, serif; color: var(--mp-sub); margin-left: 4px; }
.mp-set-items { grid-column: 1; font-size: 10px; color: var(--mp-sub); margin-top: 2px; }
.mp-set-pr { grid-column: 2; grid-row: 1 / span 2; font: 600 17px "Noto Serif SC", serif; color: var(--mp-red); white-space: nowrap; }
.mp-foot { margin: 0 24px; padding: 8px 0 12px; border-top: 1px solid rgba(176, 138, 62, .4); font-size: 9px; color: var(--mp-sub); text-align: center; }
.mp-back { padding: 40px 36px; gap: 22px; }
.mp-back h3 { font-size: 15px; font-weight: 700; color: var(--mp-red); letter-spacing: .06em; padding-bottom: 6px; margin-bottom: 8px; border-bottom: 1px solid rgba(176, 138, 62, .5); }
.mp-back p { font-size: 11.5px; line-height: 1.7; }
.mp-qr { width: 88px; height: 88px; border: 6px solid #FFFFFF; outline: 1px solid var(--mp-gold); background:
  linear-gradient(90deg, transparent 50%, var(--mp-ink) 0) 0 0 / 8px 8px,
  linear-gradient(transparent 50%, rgba(42, 33, 28, .55) 0) 0 0 / 12px 12px, #FFFFFF; }
.mp-al { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 16px; font-size: 10px; color: var(--mp-sub); }
.menu-page [data-el] { cursor: pointer; border-radius: 2px; outline: 1px solid transparent; outline-offset: 2px; transition: outline-color 80ms; }
.cv-scroll.select .menu-page [data-el]:hover { outline-color: var(--sel); }
.menu-page [data-el].is-sel { outline: 2px solid var(--sel); outline-offset: 2px; }
.menu-page [contenteditable="true"] { cursor: text; background: rgba(255, 255, 255, .75); outline: 2px solid var(--sel); }
.menu-page .pr.is-changed { background: #F7E3A6; box-shadow: 0 0 0 2px #F7E3A6; border-radius: 1px; }
.menu-page.v-airy .mp-head { background: var(--mp-paper); color: var(--mp-red); border-bottom: 1px solid var(--mp-gold); }
.menu-page.v-airy .mp-seal { border-color: var(--mp-red); color: var(--mp-red); }
.menu-page.v-airy .mp-name-nl { color: var(--mp-gold); }
.menu-page.v-airy .mp-body { padding: 24px 34px 8px; column-gap: 30px; }
.menu-page.v-gold { --mp-red: #6E1A15; }
.menu-page.v-gold .mp-head { border-bottom: 5px double var(--mp-gold); }
.menu-page.v-gold .mp-sec-title { color: var(--mp-gold); border-bottom-color: var(--mp-gold); }
.menu-page.v-dark { --mp-paper: #1E1A17; --mp-ink: #F3E9D6; --mp-sub: #BFAE95; --mp-red: #151210; }
.menu-page.v-dark .mp-sec-title, .menu-page.v-dark .mp-set-k, .menu-page.v-dark .mp-set-pr, .menu-page.v-dark .mp-back h3 { color: #D8B46A; }
.menu-page.d-modern { --mp-paper: #FFFFFF; --mp-red: #111111; --mp-gold: #C8372D; --mp-ink: #111111; --mp-sub: #6B6B6B; font-family: "Geist", "Noto Sans SC", sans-serif; }
.menu-page.d-modern .mp-head { background: #FFFFFF; color: #111111; border-bottom: 2px solid #C8372D; }
.menu-page.d-modern .mp-seal { border-color: #111111; color: #111111; }
.menu-page.d-modern .mp-name-nl { color: #6B6B6B; }
.menu-page.d-modern .mp-sec-title { letter-spacing: .08em; }
.menu-page.d-hk { --mp-paper: #F3F0E2; --mp-red: #C8372D; --mp-gold: #2F7D5B; --mp-ink: #1E2A24; --mp-sub: #4F5E56; }
.menu-page.d-hk .mp-head { background: #2F7D5B; border-bottom: 4px solid #C8372D; }
.menu-page.d-hk .mp-set { border-color: #C8372D; outline-color: #C8372D; background: rgba(200, 55, 45, .06); }
.vmini { display: block; width: 48px; aspect-ratio: 210 / 297; border: 1px solid var(--line); border-radius: 2px; }
.vm-classic { background: #FBF6EA linear-gradient(#8E1F1A, #8E1F1A) top / 100% 15% no-repeat; }
.vm-modern { background: #FFFFFF linear-gradient(#C8372D, #C8372D) 0 15% / 100% 2px no-repeat; }
.vm-hk { background: #F3F0E2 linear-gradient(#2F7D5B, #2F7D5B) top / 100% 15% no-repeat; }
.vm-airy { background: #FBF6EA; box-shadow: inset 0 7px 0 #FBF6EA, inset 0 8px 0 #B08A3E; }
.vm-gold { background: #FBF6EA linear-gradient(#6E1A15, #6E1A15) top / 100% 17% no-repeat; }
.vm-dark { background: #1E1A17 linear-gradient(#151210, #151210) top / 100% 15% no-repeat; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .masonry { column-count: 3; }
  .ws-body { grid-template-columns: minmax(0, 1fr) 340px; }
  .step span { display: none; }
  .step { padding: 0 6px; }
}
@media (max-width: 900px) {
  .shell, body[data-side="open"] .shell, body[data-side="closed"] .shell { grid-template-columns: 64px minmax(0, 1fr); }
  .side { align-items: center; }
  .side .side-label, .side .side-recent { display: none; }
  .side-top { flex-direction: column; height: auto; gap: 8px; padding: 0; }
  .side-new, .side-nav a { width: 40px; padding: 0; justify-content: center; }
  .side-bottom { flex-direction: column; }
  .masonry { column-count: 2; }
  .brand-wrap, .pr-wrap, .cf { grid-template-columns: 1fr; }
  .blist { position: static; flex-direction: row; overflow-x: auto; }
  .ws-body, .ws-body.agent-off { grid-template-columns: minmax(0, 1fr); }
  .agent { position: absolute; inset: 0 0 0 auto; width: min(400px, 100%); z-index: 8; box-shadow: var(--shadow-pop); }
  .content-view { grid-template-columns: 1fr; }
  .content-src { display: none; }
}
@media (max-width: 600px) {
  .shell, body[data-side="open"] .shell, body[data-side="closed"] .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; top: auto; height: 60px; flex-direction: row; justify-content: space-around; padding: 8px; border-right: 0; border-top: 1px solid var(--line); }
  .side-top, .side-recent, .side-bottom .side-user { display: none; }
  .side-new { margin: 0; }
  .side-nav { flex-direction: row; gap: 4px; }
  .side-bottom { margin: 0; padding: 0; flex-direction: row; }
  .main { padding-bottom: 64px; }
  body[data-full="true"] .main { padding-bottom: 0; }
  .home, .page { padding-left: 16px; padding-right: 16px; }
  .home-hero { padding-top: 48px; }
  .home-title { margin-bottom: 24px; }
  .masonry { column-count: 2; column-gap: 8px; }
  .mz { margin-bottom: 8px; }
  .ws-top { grid-template-columns: 1fr auto; }
  .steps, .ws-right .btn-ghost, .chk-chip span { display: none; }
  .cv-tools { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}

/* ---------- v2 交互补充 ---------- */
.composer .ph-t { overflow: hidden; text-overflow: ellipsis; }
.c-specs { display: flex; gap: 6px; flex: 1; min-width: 0; overflow: hidden; margin-left: 4px; }
.c-brand[aria-pressed="true"] { color: var(--text); border-color: var(--text-3); }
.m-sys { align-self: center; font-size: 12px; color: var(--text-3); text-align: center; }
.m-sys a { color: var(--text-2); }
.agent-h .ai-av { display: grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: var(--surface-2); }
.reopen { background: var(--surface); box-shadow: var(--shadow-pop); }
.cv-board { margin: 0 auto; padding: 72px 96px 96px; }
.cv.is-content .cv-tools, .cv.is-content .cv-hint { display: none; }
.ab-img { width: 440px; height: auto; box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 16px rgba(0, 0, 0, .18); background: var(--surface); }
.ab-img.land { width: 620px; }
.cv-scroll.select .ab-img[data-el]:hover { outline: 1px solid var(--sel); outline-offset: 2px; cursor: pointer; }
.ab-img.is-sel { outline: 2px solid var(--sel); outline-offset: 2px; }
.cv-scroll.comment .ab-img { cursor: crosshair; }
.artboard .ghost-page { width: 440px; }
.dropzone { display: grid; justify-items: center; gap: 8px; width: min(440px, calc(100% - 48px)); padding: 48px 24px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-2); color: var(--text-3); text-align: center; font-size: 13px; }
.dropzone b { color: var(--text); font-size: 15px; font-weight: 500; }
.dropzone .ic { width: 28px; height: 28px; }
.ct .sec-row td { padding-top: 16px; font-size: 12px; font-weight: 600; color: var(--text-3); background: none; }
.ct td { vertical-align: middle; }
.al-add { border: 0; background: none; color: var(--text-3); cursor: pointer; }
.al-add:hover { background: var(--surface-3); color: var(--text); }
.content-src .note { margin-top: 4px; }
.mp-alg { margin-left: 3px; font: normal 7.5px/1 var(--font-ui); color: var(--mp-gold); letter-spacing: .02em; vertical-align: 1px; }
.menu-page.pr-big .mp-row .pr { font-size: 12.5px; font-weight: 600; }
.mp-back { display: flex; }
.mp-back .mp-foot { margin: auto 0 0; }
.ws-flow { background: var(--bg); }
.pr-scroll { overflow: auto; min-height: 0; }
.pr-wrap .choice button .ic { margin-bottom: 4px; }
.cf-prev .menu-page [data-el] { cursor: default; }
.cf-sec .dl { grid-template-columns: 96px 1fr; }
.cf-body .table { font-size: 13px; }
.rv-fit .menu-page [data-el], .rv-fit .ab-img { cursor: crosshair; }
.rv .success { padding: 64px 24px; }
@media (max-width: 900px) {
  .ws-flow { height: auto; min-height: 100vh; grid-template-rows: 52px auto; }
  .ws-flow .cf-prev { min-height: 70vh; }
  .ws-flow .cf-panel { border-left: 0; border-top: 1px solid var(--line); }
  .ws-flow .cf-list { overflow: visible; }
  .ws-flow .cf-foot { position: sticky; bottom: 0; background: var(--bg); }
}
@media (max-width: 600px) {
  .ws-top { padding: 0 8px; gap: 8px; }
  .ws-left .tag { display: none; }
  .cv-board { padding: 56px 16px 72px; }
  .pr-wrap { padding: 16px; }
  .cf-bar { left: 12px; right: 12px; transform: none; }
  .cf-bar .cv-float { flex-wrap: wrap; justify-content: center; }
}

.ct { table-layout: fixed; min-width: 760px; }
.ct th:nth-child(1) { width: 48px; } .ct th:nth-child(2) { width: 20%; } .ct th:nth-child(3) { width: 32%; }
.ct th:nth-child(4) { width: 96px; } .ct th:nth-child(6) { width: 88px; }
.mz { margin: 0 0 16px; }
.brand-wrap > * { min-width: 0; }
@media (max-width: 900px) {
  .bitem { flex: none; white-space: nowrap; }
  .reopen { top: auto; bottom: 16px; }
}
@media (max-width: 600px) {
  .mz { margin-bottom: 8px; }
  .sec-h .small { display: none; }
  .cv-board { flex-direction: column; gap: 32px; }
}

.ws-name { min-width: 0; }
.ws-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-chip { white-space: nowrap; flex: none; }
@media (max-width: 900px) {
  body[data-full="true"] .shell, body[data-full="true"][data-side] .shell { grid-template-columns: minmax(0, 1fr); }
  .ws-left .tag { display: none; }
  .ws-name span { max-width: 24vw; }
}
@media (max-width: 600px) and (pointer: coarse), (max-width: 600px) {
  .btn, .btn-sm { height: 44px; }
  .icon-btn, .send { width: 44px; height: 44px; }
  .pill, .filters .pill, .seg button { height: 40px; }
  .side-nav a, .side-new { width: 44px; height: 44px; }
  .side { height: 64px; }
  .main { padding-bottom: 72px; }
  .ws-top .btn-sm, .ws-top .chk-chip, .ws-top .avatar { height: 40px; }
  .ws-top .avatar { width: 40px; }
  .ws { grid-template-rows: 56px minmax(0, 1fr); }
}

/* ---------- v2.1：对话在左、画布在右；画布是按真实比例排成一行的页面，不是无限画布 ---------- */
.ws-body { --aw: 400px; grid-template-columns: var(--agent-w, var(--aw)) minmax(0, 1fr); }
.ws-body.agent-off { grid-template-columns: 0 minmax(0, 1fr); }
.agent { border-left: 0; border-right: 1px solid var(--line); }
.cv { display: grid; grid-template-rows: 48px minmax(0, 1fr); background-image: none; }
.cv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.cv-head .cv-tools { position: static; transform: none; flex-direction: row; display: flex; gap: 2px; padding: 0; border: 0; box-shadow: none; background: none; }
.cv.is-content .cv-head .cv-tools { visibility: hidden; }
.cv-stage { position: relative; min-height: 0; overflow: hidden; }
.cv-board { gap: 48px; padding: 40px 48px 56px; }
.content-src { padding-top: 24px; }
.content-main { padding-top: 24px; }
.reopen { left: 16px; right: auto; }
.cf-prev, .rv-prev { background-image: none; }
@media (max-width: 1100px) {
  .ws-body { --aw: 340px; }
}
@media (max-width: 900px) {
  .ws-body, .ws-body.agent-off { grid-template-columns: minmax(0, 1fr); }
  .agent { inset: 0 auto 0 0; border-right: 1px solid var(--line); }
  .reopen { top: auto; bottom: 16px; }
}
@media (max-width: 600px) {
  .cv-head .cv-tools { display: none; }
  .cv-board { padding: 24px 16px 72px; }
}

/* ---------- 接真实接口后的补充 ---------- */
.page-wrap { position: relative; box-shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 8px 16px rgba(0, 0, 0, .18); background: #fff; }
.page-img { display: block; width: 100%; height: 100%; }
.hit { position: absolute; border-radius: 2px; outline: 1px solid transparent; outline-offset: 2px; transition: outline-color 80ms; }
.cv-scroll.select .hit { cursor: pointer; }
.cv-scroll.select .hit:hover { outline-color: var(--sel); }
.hit.is-sel { outline: 2px solid var(--sel); outline-offset: 2px; }
.cv-scroll.comment .page-wrap { cursor: crosshair; }
.page-wrap .pin { z-index: 3; }
.ab-photo { width: 360px; border-radius: 4px; box-shadow: 0 8px 16px rgba(0, 0, 0, .18); }
.cv-board > .dropzone { margin: 64px auto; }
.dropzone .btn { margin-top: 8px; }
.vthumb { width: 64px; aspect-ratio: 210 / 297; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 2px; }
.thumbs button[aria-pressed="true"] .vthumb { outline: 2px solid var(--sel); outline-offset: 2px; }
.via { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.notice { margin-bottom: 4px; border-color: var(--warn); }
.toast-bad { background: var(--err); color: #fff; }
.cf-img { display: block; }
.skill { font-size: 13px; color: var(--text-2); line-height: 1.8; }
.skill b { display: block; margin-top: 12px; color: var(--text); }
.skill li { margin-left: 16px; list-style: disc; }

/* ---------- 分隔线拖动；右边还没东西时只显示对话（发送键状态各处一致） ---------- */
.ws-resizer { position: absolute; top: 0; bottom: 0; left: calc(var(--agent-w, var(--aw)) - 4px); z-index: 7; width: 8px; cursor: col-resize; touch-action: none; }
.ws-resizer::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background-color 120ms 120ms; }
.ws-resizer:hover::after, .ws-resizer:focus-visible::after, body.is-resizing .ws-resizer::after { background: var(--sel); }
.ws-resizer:focus-visible { outline: 0; }
body.is-resizing { cursor: col-resize; user-select: none; }
.ws-body.agent-off .ws-resizer { display: none; }
.ws-canvas-btn { display: none; }

.ws.is-chat .ws-body { grid-template-columns: minmax(0, 1fr); }
.ws.is-chat .cv, .ws.is-chat .ws-resizer, .ws.is-chat .reopen, .ws.is-chat .agent-h { display: none; }
.ws.is-chat .ws-canvas-btn { display: inline-grid; }
.ws.is-chat .agent { position: static; width: auto; border-right: 0; box-shadow: none; }
.ws.is-chat .msgs, .ws.is-chat .agent-foot { padding-inline: max(16px, calc((100% - 720px) / 2)); }
.ws.is-chat .msgs { padding-top: 32px; gap: 24px; }
.ws.is-chat .agent-foot { padding-bottom: 24px; }
@media (max-width: 900px) {
  .ws-resizer { display: none; }
}

/* 内容表：菜品照片 */
.ph-cell { white-space: nowrap; width: 76px; }
.ph-thumb { position: relative; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-1); overflow: hidden; background: var(--surface-2); cursor: pointer; vertical-align: middle; }
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-thumb.is-blur { border-color: var(--warn); }
.ph-warn { position: absolute; left: 0; right: 0; bottom: 0; font-style: normal; font-size: 10px; line-height: 14px; text-align: center; color: #fff; background: rgba(170, 100, 0, .85); }
.ph-star { border: 0; background: none; color: var(--text-3); font-size: 16px; cursor: pointer; vertical-align: middle; padding: 0 2px; }
.ph-star[aria-pressed="true"] { color: #c99a2e; }
.ph-add { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 8px; border: 1px dashed var(--line); border-radius: 8px; background: none; color: var(--text-3); font-size: 12px; cursor: pointer; }
.ph-add:hover { color: var(--text); border-color: var(--text); }
/* 照片对菜核对卡 */
.pm-rows { display: grid; gap: 8px; margin: 8px 0; }
.pm-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; }
.pm-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.pm-row select { min-width: 0; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); padding: 0 8px; }

/* 后台任务卡、设计编译结果 */
.prog li.now { color: var(--fg); }
.prog li.now .st::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); animation: yd-pulse 1s ease-in-out infinite; }
@keyframes yd-pulse { 50% { opacity: .3; } }
.cmp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.cmp-pair figure { margin: 0; }
.cmp-pair img { width: 100%; aspect-ratio: 210 / 297; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; background: var(--bg2); }
.cmp-pair figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 后台一轮的步骤记录、项目记忆面板 */
.mem-pop { width: 320px; padding: 6px 4px; }
.mem-pop h4 { font-size: 13px; font-weight: 600; margin: 2px 8px 8px; }
.mem-pop p { margin: 0 8px 6px; }
.mem-row { display: flex; align-items: center; gap: 4px; padding: 2px 4px; }
.mem-row .cell-in { flex: 1; min-width: 0; }

/* ---------- 墨点：助手在想、在做（SPEC-v4 §7.3，原型 proto-gen/v2/p4/ink-dot.html） ----------
   外层管「盖章」（换步骤时压一下），内层管呼吸，::after 是每次呼气洇开的墨晕。只动缩放和透明度。 */
.ink-av { display: grid; place-items: center; width: 24px; height: 24px; }
.ink-stamp { display: block; width: 10px; height: 10px; }
.ink-stamp.hit { animation: ink-stamp 300ms var(--ease); }
.ink { display: block; position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--text);
  animation: ink-breathe var(--beat, 1.8s) cubic-bezier(.45, 0, .55, 1) var(--ph, 0s) infinite; }
.ink::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--text); opacity: 0;
  animation: ink-bleed var(--beat, 1.8s) cubic-bezier(.2, 0, 0, 1) var(--ph, 0s) infinite; }
.ink.slow { --beat: 2.6s; }
@keyframes ink-breathe { 0%, 100% { transform: scale(.72); } 50% { transform: scale(1); } }
@keyframes ink-bleed { 0%, 49% { opacity: 0; transform: scale(1); } 50% { opacity: .18; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes ink-stamp { 0% { transform: scale(1); } 35% { transform: scale(.55); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.ink-inline { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; }
.ink-inline .ink-stamp, .ink-inline .ink { width: 8px; height: 8px; }
.ink-line { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 24px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; user-select: none; }
.ink-line[data-fold] { cursor: pointer; }
.ink-did .ink-line { width: auto; }
.ink-now { display: inline-grid; grid-template-columns: minmax(0, 1fr); min-width: 0; height: 22px; overflow: hidden; color: var(--text-2); font-size: 13.5px; line-height: 22px; }
.ink-did .ink-now { color: var(--text-3); font-size: 13px; }
.ink-now span { grid-area: 1 / 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: transform 180ms var(--ease), opacity 180ms var(--ease); }
.ink-now span.out { transform: translateY(-6px); opacity: 0; }
.ink-now span.in { transform: translateY(6px); opacity: 0; }
.ink-sec { flex: none; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ink-sec:empty { display: none; }
.ink-chev { flex: none; color: var(--text-3); font-size: 12px; transition: transform 470ms var(--ease-drawer); }
.open > div > .ink-line .ink-chev, .ink-did.open .ink-chev { transform: rotate(90deg); transition-duration: 580ms; }
.ink-stop { flex: none; margin-left: auto; white-space: nowrap; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--text-3); font: 500 13px/1 var(--font-ui); cursor: pointer; }
.ink-stop:hover { color: var(--text); background: var(--surface-2); }
.ink-fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 470ms var(--ease-drawer); }
.open .ink-fold { grid-template-rows: 1fr; transition-duration: 580ms; }
.ink-fold > ul { min-height: 0; overflow: hidden; }
.ink-fold li { padding: 2px 0; opacity: 0; transform: translateY(4px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.open .ink-fold li { opacity: 1; transform: none; }
.ink-fold li:first-child { padding-top: 6px; }
.ink-did { margin-top: 6px; }
.m-ai.arrive > .ai-av { animation: ink-arrive 220ms var(--ease) both; }
@keyframes ink-arrive { from { opacity: 0; transform: scale(.6); } }
@media (prefers-reduced-motion: reduce) {
  .ink, .ink::after, .ink-stamp.hit { animation: none !important; }
  .ink::after { display: none; }
}

/* ---------- 画布缩放和拖动（SPEC-v4 §7.4）：页面一排摆着，整排 translate + scale ---------- */
.cv-scroll { overflow: hidden; touch-action: none; user-select: none; }
.cv-board { position: absolute; left: 0; top: 0; margin: 0; transform-origin: 0 0; }
.cv-scroll.space, .cv-scroll.space .hit, .cv-scroll.space .page-wrap { cursor: grab; }
.cv-scroll.dragging, .cv-scroll.dragging * { cursor: grabbing !important; }
.cv-zbar { position: absolute; left: 12px; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 2px; padding: 3px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); }
.cv-zbar .icon-btn { width: 28px; height: 28px; font-size: 16px; line-height: 1; }
.cv-zv { min-width: 52px; height: 28px; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--text-2); font: 500 13px/1 var(--font-ui);
  font-variant-numeric: tabular-nums; cursor: pointer; }
.cv-zv:hover { background: var(--surface-2); color: var(--text); }
.cv.is-content .cv-zbar { display: none; }

/* ---------- v4 效果图卡片（SPEC-v4 §3） ---------- */
.comp-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.comp { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.comp-img { padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.comp-img img { display: block; width: 100%; aspect-ratio: 210 / 297; object-fit: cover; }
.comp figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.comp figcaption .tag { align-self: flex-start; }
.comp .btn { align-self: flex-start; }
.comps > p { margin-top: 10px; }
.derived { display: flex; gap: 12px; align-items: flex-start; }
.derived h4 { margin-bottom: 4px; }
.derived .btn { margin-top: 8px; }
