/* ============================================================
   AIGG Creator Studio v2 — 设计系统(移植自 /tmp/aigg-studio-design)
   浅色纸面 · 白卡圆角 · 软阴影 · 红色主 CTA · 五步签名色
   类名与设计稿一致, view agent 可直接复用
   ============================================================ */

:root {
  /* 纸面 + 墨色 */
  --bg: #f7f6f3;
  --bg-2: #f1efe9;
  --paper: #f7f6f3;           /* 别名: 设计令牌 --paper */
  --card: #ffffff;
  --ink: #16150f;
  --ink-2: #5d5b52;
  --ink-3: #908d82;
  --line: #ebe9e2;
  --line-2: #e0ddd3;

  /* 品牌红(发布 CTA)+ 常用蓝 */
  --red: #f0303c;
  --red-ink: #c8121f;
  --red-soft: #fdebec;
  --blue: #2f6bd6;

  /* 五步签名色 */
  --c-wizard: #f0303c;  --c-wizard-soft: #fdecec;
  --c-chat:   #2f6bd6;  --c-chat-soft:   #e9f0fc;
  --c-canvas: #7c4dcb;  --c-canvas-soft: #f0eafa;
  --c-assets: #1e9e6a;  --c-assets-soft: #e6f6ee;
  --c-test:   #e0820f;  --c-test-soft:   #fcf0dd;

  /* 当前模式 accent — boot.js 切视图时写到 body 上 */
  --accent: var(--c-wizard);
  --accent-soft: var(--c-wizard-soft);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;

  --shadow-sm: 0 1px 2px rgba(22,21,15,.04), 0 1px 3px rgba(22,21,15,.05);
  --shadow: 0 2px 8px rgba(22,21,15,.05), 0 8px 28px rgba(22,21,15,.06);
  --shadow-lg: 0 8px 24px rgba(22,21,15,.08), 0 24px 60px rgba(22,21,15,.1);
  --shadow-pop: 0 10px 40px rgba(22,21,15,.16);

  /* 字体: 全部来自已 vendored 的 studio-fonts.css(零 CDN) */
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --latin: "Nunito", "Inter", "Noto Sans SC", system-ui, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--accent-soft); }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #d9d6cd; border-radius: 8px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: #c7c3b8; }

/* ---------- 共享原语 ---------- */
.eyebrow {
  font-family: var(--latin); font-size: 11px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; display: inline-block; }
.eyebrow.muted { color: var(--ink-3); }
.eyebrow.muted::before { background: var(--line-2); }

.h-display { font-weight: 900; letter-spacing: -.02em; line-height: 1.05; }
.accent-word { color: var(--red); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--line-2);
  transition: transform .12s ease, box-shadow .15s ease, background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.05); border-color: var(--accent); }
.btn-red { background: var(--red); color: #fff; border-color: var(--red); }
.btn-red:hover { filter: brightness(1.05); border-color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-2); border-color: transparent; transform: none; }
.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15.5px; }
.btn-icon { width: 40px; padding: 0; justify-content: center; }
.btn-icon.btn-sm { width: 32px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  background: var(--bg-2); color: var(--ink-2); border: 1px solid transparent;
}
.chip.accent { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 78%, #000 22%); }
.chip.dot::before { content:""; width:7px; height:7px; border-radius:50%; background: currentColor; opacity:.8; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.ai-tint { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 60%, #fff), #fff); }

.ai-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--latin); font-size: 10.5px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: 4px 9px; border-radius: 999px;
}
.spark { width: 13px; height: 13px; display:inline-block; }

@keyframes orbPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes dotFlash { 0%,80%,100% { opacity:.25 } 40% { opacity:1 } }
@keyframes fadeUp { from { opacity:0; transform: translateY(10px);} to {opacity:1; transform:none;} }
@keyframes scaleIn { from { opacity:0; transform: scale(.96);} to {opacity:1; transform:none;} }
@keyframes slideRail { from { transform: translateX(100%);} to { transform:none; } }
@keyframes sheetUp { from { transform: translateY(100%);} to { transform:none; } }
@keyframes shimmer { 0%{background-position: -200% 0} 100%{background-position:200% 0} }

.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 25%, #fff 50%, var(--bg-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px;
}

/* ============================================================
   壳层布局: 顶栏 · 五步导航 · 工作区 · 副驾
   ============================================================ */

.app { display: grid; grid-template-rows: auto auto auto 1fr; height: 100vh; height: 100dvh; background: var(--bg); }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; height: 60px;
  background: var(--card); border-bottom: 1px solid var(--line); z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand-logo {
  font-family: var(--latin); font-weight: 700; font-size: 19px; letter-spacing: -.01em;
  background: #f3ede3; color: var(--ink);
  padding: 5px 12px 6px; border-radius: 12px; line-height: 1; position: relative;
}
.brand-logo sup { color: var(--red); font-size: 13px; top:-.4em; position: relative; }
.brand-sub { display: flex; flex-direction: column; line-height: 1.15; }
.brand-sub b { font-size: 13px; font-weight: 800; letter-spacing: -.01em; }
.brand-sub span { font-family: var(--latin); font-size: 9px; font-weight: 600; letter-spacing: .16em; color: var(--ink-3); text-transform: uppercase; }

.topbar .divider { width: 1px; height: 26px; background: var(--line); }

.draft-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.draft-title input {
  border: none; background: transparent; font-size: 15px; font-weight: 700; color: var(--ink);
  width: 13ch; max-width: 22vw; padding: 5px 8px; border-radius: 8px; outline: none;
}
.draft-title input:hover { background: var(--bg-2); }
.draft-title input:focus { background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--accent); }
.save-dot { display:flex; align-items:center; gap:6px; font-size:11.5px; color: var(--ink-3); font-weight:600; white-space:nowrap; }
.save-dot i { width:7px; height:7px; border-radius:50%; background:#9bd84b; }
.save-dot.saving i { background: var(--accent); animation: dotFlash 1s infinite; }

.topbar-spacer { flex: 1; }
.topbar-tools { display: flex; align-items: center; gap: 7px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }

.tool-btn {
  display:inline-flex; align-items:center; gap:7px; height:36px; padding:0 12px; border-radius:10px;
  font-size:13px; font-weight:600; color: var(--ink-2); background: transparent;
  transition: background .14s, color .14s;
}
.tool-btn:hover { background: var(--bg-2); color: var(--ink); }
.tool-btn .ic { color: var(--ink-3); }
.tool-btn:hover .ic { color: var(--accent); }

.avatar {
  width:36px; height:36px; border-radius:50%; background: linear-gradient(135deg,#f3ede3,#e6ddcd);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; color: var(--ink);
  border:1.5px solid var(--line-2);
}

/* 自治度旋钮(只出主意/先问我/直接改) */
.autonomy-wrap { position: relative; }
.autonomy-pop {
  position: absolute; right: 0; top: 44px; z-index: 90; width: 230px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 8px; animation: scaleIn .14s ease;
}
.autonomy-pop[hidden] { display: none; }
.auto-opt {
  display:flex; gap:10px; align-items:flex-start; width:100%; text-align:left;
  padding:10px 11px; border-radius:10px; transition: background .13s;
}
.auto-opt:hover { background: var(--bg-2); }
.auto-opt.on { background: var(--accent-soft); }
.auto-opt b { font-size:13px; font-weight:800; display:block; }
.auto-opt span { font-size:11.5px; color: var(--ink-3); display:block; margin-top:2px; line-height:1.4; }
.auto-opt .ao-dot { flex:none; width:18px; height:18px; border-radius:50%; border:2px solid var(--line-2); margin-top:2px; }
.auto-opt.on .ao-dot { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3.5px #fff; }

/* ---------- 五步导航条 ---------- */
.modebar {
  display:flex; align-items:center; gap:14px;
  padding: 10px 20px; background: var(--card);
  border-bottom: 1px solid var(--line); z-index: 30;
}
.modes { display:flex; gap:6px; flex:1; min-width:0; overflow-x:auto; scrollbar-width:none; }
.modes::-webkit-scrollbar { display:none; }
.mode-tab {
  display:flex; align-items:center; gap:9px; height:42px; padding:0 16px; border-radius:12px;
  font-size:14px; font-weight:700; color: var(--ink-2); white-space:nowrap;
  border:1.5px solid transparent; transition: all .15s; position:relative;
}
.mode-tab .ic { color: var(--ink-3); transition: color .15s; }
.mode-tab .mt-num { font-family:var(--latin); font-size:11px; font-weight:700; color: var(--ink-3); opacity:.8; }
.mode-tab:hover { background: var(--bg-2); }
.mode-tab.on { background: var(--mc-soft); color: var(--mc-ink); border-color: transparent; }
.mode-tab.on .ic { color: var(--mc); }
.mode-tab.on .mt-num { color: var(--mc); opacity:1; }
.mode-tab.on::after {
  content:""; position:absolute; left:16px; right:16px; bottom:-11px; height:3px; border-radius:3px 3px 0 0;
  background: var(--mc);
}
/* 渐进解锁: 未发布过任何游戏时, 后面的步骤上锁(只能按顺序下一步) */
.mode-tab.locked { opacity:.45; cursor:not-allowed; }
.mode-tab.locked:hover { background: transparent; }
.mode-tab .mt-lock { display:none; }
.mode-tab.locked .mt-lock { display:inline-flex; color: var(--ink-3); }

.modebar-right { display:flex; align-items:center; gap:14px; }
.completeness { display:flex; align-items:center; gap:10px; position:relative; cursor:default; }
.completeness .label { font-size:12px; font-weight:600; color: var(--ink-2); }
.completeness .pct { font-size:13px; font-weight:800; color: var(--accent); font-family: var(--latin); }

/* 完成度环: 创意/规则/试玩/认证/发布 五段, conic-gradient 由 boot.js 写入 */
.ring { width:34px; height:34px; border-radius:50%; position:relative;
  background: conic-gradient(var(--bg-2) 0 100%); transition: background .3s; }
.ring::after { content:""; position:absolute; inset:5px; border-radius:50%; background: var(--card); }
.ring-tip {
  display:none; position:absolute; top:44px; right:0; z-index:95; width:240px;
  background: var(--ink); color:#fff; border-radius:13px; padding:12px 14px;
  box-shadow: var(--shadow-pop); font-size:12px; line-height:1.55; animation: scaleIn .13s ease;
}
.completeness:hover .ring-tip { display:block; }
.ring-tip b { display:block; font-size:12.5px; margin-bottom:6px; }
.ring-tip .rt-row { display:flex; gap:7px; align-items:center; padding:2px 0; color:rgba(255,255,255,.85); }
.ring-tip .rt-row.ok { color:#7fe0a0; }
.ring-tip .rt-dot { width:7px; height:7px; border-radius:50%; background: currentColor; flex:none; }

.copilot-toggle {
  display:flex; align-items:center; gap:8px; height:40px; padding:0 14px 0 12px; border-radius:999px;
  font-size:13px; font-weight:700; color:#fff; white-space: nowrap;
  background: linear-gradient(120deg, var(--accent), color-mix(in srgb,var(--accent) 60%, #7c4dcb));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 32%, transparent);
  transition: transform .12s, box-shadow .15s;
}
.copilot-toggle:hover { transform: translateY(-1px); }
.copilot-toggle.off { background: var(--card); color: var(--ink-2); border:1.5px solid var(--line-2); box-shadow:none; }
.copilot-toggle.off .sparkle-orb { color: var(--accent); }

/* ---------- 离线横幅 ---------- */
.offline-banner {
  display:flex; align-items:center; justify-content:center; gap:9px;
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  background: #fcf0dd; color: #8a5a06; border-bottom: 1px solid #f3ddb4;
}
.offline-banner[hidden] { display:none; }
.offline-banner .ob-retry { font-size:12px; font-weight:700; color:#8a5a06; text-decoration:underline; }
/* 离线时 AI 按钮统一降级: view 给 AI 按钮加 .needs-ai 即可 */
body.offline .needs-ai { opacity:.45; pointer-events:none; }

/* ---------- 工作区 ---------- */
.work {
  display: grid;
  grid-template-columns: 1fr var(--rail, 360px);
  min-height: 0;
  transition: grid-template-columns .26s cubic-bezier(.4,0,.2,1);
}
.work.rail-closed { grid-template-columns: 1fr 0px; }
.stage { min-width:0; overflow-y:auto; position:relative; }
.stage > section[hidden] { display:none; }
.stage-inner { max-width: 980px; margin: 0 auto; padding: 32px 36px 80px; }
.stage-inner.wide { max-width: 1240px; }
.stage-inner.flush { max-width:none; padding: 0; }

.progress { height:7px; background: var(--bg-2); border-radius:999px; overflow:hidden; }
.progress-fill { height:100%; border-radius:999px; transition: width .5s cubic-bezier(.4,0,.2,1); background: var(--accent); }

.segmented { display:inline-flex; background: var(--bg-2); border-radius:11px; padding:3px; gap:2px; }
.seg { height:32px; padding:0 14px; border-radius:8px; font-size:13px; font-weight:700; color: var(--ink-2); transition: all .14s; }
.seg.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }

.stat-v { font-size:30px; font-weight:900; letter-spacing:-.02em; line-height:1; }
.stat-suf { font-size:15px; font-weight:700; margin-left:2px; color: var(--ink-3); }
.stat-l { font-size:12.5px; font-weight:600; color: var(--ink-3); margin-top:6px; }

.typing { display:inline-flex; gap:4px; align-items:center; }
.typing i { width:6px; height:6px; border-radius:50%; background: var(--accent); animation: dotFlash 1.2s infinite; }
.typing i:nth-child(2){ animation-delay:.2s } .typing i:nth-child(3){ animation-delay:.4s }

.toast-host { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); display:flex; flex-direction:column; gap:10px; z-index:200; align-items:center; }
.toast {
  display:flex; align-items:center; gap:9px; padding:11px 18px; border-radius:999px;
  background: var(--ink); color:#fff; font-size:13.5px; font-weight:600; box-shadow: var(--shadow-pop);
  max-width: 84vw; animation: fadeUp .18s ease;
}
.toast .ic { color:#9bd84b; }
.toast.ai { background: linear-gradient(120deg,#2a1d3a,#3a2550); }
.toast.ai svg { color: #c9a6ff; }

.sparkle-orb { display:inline-flex; animation: orbPulse 2.4s ease-in-out infinite; }

.row { display:flex; align-items:center; gap:12px; }
.col { display:flex; flex-direction:column; }
.wrap { flex-wrap:wrap; }
.muted { color: var(--ink-3); }
.grow { flex:1; }

.sec-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.sec-head h2 { font-size:26px; font-weight:900; letter-spacing:-.02em; margin:8px 0 0; }
.sec-head p { font-size:14px; color: var(--ink-2); margin:6px 0 0; max-width:52ch; line-height:1.55; }
.mode-h1 { font-size: clamp(24px, 2.6vw, 29px); font-weight:900; letter-spacing:-.025em; line-height:1.18; margin:10px 0 0; text-wrap:balance; }

.ph {
  background-color: var(--bg-2);
  background-image: repeating-linear-gradient(45deg, transparent, transparent 9px, rgba(0,0,0,.035) 9px, rgba(0,0,0,.035) 18px);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  display:flex; align-items:center; justify-content:center; flex-direction:column; gap:6px;
  color: var(--ink-3);
}
.ph .ph-label { font-family: var(--mono); font-size:11.5px; letter-spacing:.02em; }

/* ============================================================
   AI 副驾 (右侧 rail)
   ============================================================ */
.copilot { display: flex; flex-direction: column; background: var(--card); border-left: 1px solid var(--line); min-width: 0; overflow: hidden; }
.copilot-head {
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-soft), transparent 140%);
}
.copilot-orb {
  width: 34px; height: 34px; border-radius: 11px;
  display:flex; align-items:center; justify-content:center; color:#fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7c4dcb));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 36%, transparent);
}
.copilot-orb svg { animation: orbPulse 2.6s ease-in-out infinite; }

.copilot-body { flex:1; overflow-y:auto; padding: 16px 14px; display:flex; flex-direction:column; gap:12px; }

.cp-msg { display:flex; gap:9px; align-items:flex-start; }
.cp-msg.me { flex-direction: row-reverse; }
.cp-ava {
  flex:none; width:24px; height:24px; border-radius:8px; margin-top:2px;
  display:flex; align-items:center; justify-content:center; color:#fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb,var(--accent) 55%, #7c4dcb));
}
.cp-bubble {
  font-size:13.5px; line-height:1.6; padding:10px 13px; max-width: 84%;
  background: var(--bg-2); color: var(--ink); border-radius: 14px 14px 14px 4px;
}
.cp-msg.me .cp-bubble { background: var(--accent); color:#fff; border-radius: 14px 14px 4px 14px; }

.cp-suggests { display:flex; flex-direction:column; gap:8px; margin-top:2px; }
.cp-suggest {
  display:flex; align-items:center; gap:10px; text-align:left;
  padding: 11px 13px; border-radius: 13px;
  background: var(--card); border:1.5px solid var(--line);
  font-size:13px; font-weight:600; color: var(--ink); transition: all .14s;
}
.cp-suggest .ic { color: var(--accent); flex:none; }
.cp-suggest span { flex:1; }
.cp-suggest .cp-go { color: var(--ink-3); opacity:0; transform: translateX(-4px); transition: all .15s; }
.cp-suggest:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateX(2px); }
.cp-suggest:hover .cp-go { opacity:1; transform:none; }

.cp-log { margin-top:6px; border-top:1px dashed var(--line-2); padding-top:14px; }
.cp-log-head { font-family:var(--latin); font-size:10.5px; font-weight:600; letter-spacing:.14em; text-transform:uppercase; color: var(--ink-3); margin-bottom:10px; }
.cp-log-item { display:flex; gap:10px; align-items:flex-start; padding:6px 0; }
.cp-log-dot { flex:none; width:7px; height:7px; border-radius:50%; background: var(--accent); margin-top:5px; }
.cp-log-item b { display:block; font-size:12px; font-weight:700; }
.cp-log-item span { display:block; font-size:11.5px; color: var(--ink-3); line-height:1.4; margin-top:1px; }

.copilot-input { display:flex; align-items:center; gap:8px; padding:12px 14px; border-top:1px solid var(--line); background: var(--card); }
.copilot-input input {
  flex:1; height:42px; border:1.5px solid var(--line-2); border-radius:999px; padding:0 16px;
  font-size:13.5px; background: var(--bg); outline:none; transition: border-color .14s, background .14s;
}
.copilot-input input:focus { border-color: var(--accent); background:#fff; }
.cp-send {
  flex:none; width:42px; height:42px; border-radius:50%; color:#fff; background: var(--accent);
  display:flex; align-items:center; justify-content:center; transition: transform .12s, filter .14s;
}
.cp-send:hover:not(:disabled) { transform: scale(1.05); filter:brightness(1.05); }
.cp-send:disabled { opacity:.4; }

.copilot-fab {
  position: fixed; right: 16px; bottom: 18px; z-index: 120;
  width: 56px; height: 56px; border-radius: 50%; color:#fff;
  background: linear-gradient(135deg, var(--accent), #7c4dcb);
  box-shadow: 0 8px 24px rgba(124,77,203,.4);
  display:flex; align-items:center; justify-content:center;
}
.sheet-scrim { position:fixed; inset:0; background: rgba(20,18,12,.4); z-index:150; display:flex; align-items:flex-end; }
.mobile-sheet { width:100%; height:82vh; background: var(--card); border-radius: 22px 22px 0 0; overflow:hidden; display:flex; animation: sheetUp .22s ease; }
.mobile-sheet .copilot { width:100%; border-left:none; animation:none; }

/* ============================================================
   预览抽屉 #preview-dock — iframe 跑 runtime + 检查点时间线
   ============================================================ */
.pdock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 130;
  background: var(--card); border-top: 1.5px solid var(--line);
  box-shadow: 0 -10px 40px rgba(22,21,15,.14);
  border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  height: min(64vh, 560px);
  animation: sheetUp .24s cubic-bezier(.4,0,.2,1);
}
.pdock[hidden] { display:none; }
.pdock-head { display:flex; align-items:center; gap:10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.pdock-head b { font-size:14px; font-weight:800; }
.pdock-head .pd-sid { font-family: var(--mono); font-size:11px; color: var(--ink-3); }
.pdock-body { flex:1; min-height:0; display:flex; flex-direction:column; }
.pdock-iframe { flex:1; width:100%; border:none; background:#111; }
.pdock-empty { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:var(--ink-3); font-size:13px; }

/* 检查点时间线横条(线性历史, 恢复=新版本) */
.tl-strip { display:flex; align-items:center; gap:0; padding: 9px 16px; border-top: 1px solid var(--line); overflow-x:auto; scrollbar-width:none; }
.tl-strip::-webkit-scrollbar { display:none; }
.tl-node {
  flex:none; display:flex; align-items:center; gap:7px;
  font-size:11.5px; font-weight:600; color: var(--ink-2);
  padding: 5px 10px; border-radius: 999px; transition: background .13s;
  white-space: nowrap;
}
.tl-node:hover { background: var(--bg-2); }
.tl-node .tl-dot { width:9px; height:9px; border-radius:50%; background: var(--line-2); flex:none; transition: background .15s; }
.tl-node.ai .tl-dot { background: var(--c-canvas); }
.tl-node.user .tl-dot { background: var(--c-chat); }
.tl-node.head { color: var(--ink); font-weight:800; }
.tl-node.head .tl-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-node .tl-time { font-family: var(--latin); font-size:10px; color: var(--ink-3); }
.tl-link { flex:none; width:18px; height:2px; background: var(--line-2); }
.tl-empty { font-size:12px; color: var(--ink-3); padding: 4px 6px; }

/* ============================================================
   语义 diff 卡 + 冲突卡(契约⑤⑭, 全 view 共享)
   ============================================================ */
.diff-card {
  background: linear-gradient(180deg, var(--accent-soft), #fff 90%);
  border: 1.5px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 16px; padding: 14px; animation: fadeUp .18s ease;
}
.diff-card.reverted { opacity:.6; }
.diff-row { display:flex; align-items:baseline; gap:9px; font-size:13px; padding:7px 10px; background:#fff; border:1px solid var(--line); border-radius:10px; margin-bottom:7px; line-height:1.5; }
.diff-row .d-arrow { color: var(--ink-3); font-family: var(--latin); }
.diff-row .d-before { color: var(--ink-3); text-decoration: line-through; }
.diff-row .d-after { font-weight:700; }
.diff-why { font-size:12px; color: var(--ink-2); margin: 2px 0 10px; line-height:1.5; }
.diff-actions { display:flex; gap:8px; }
.conflict-card { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: linear-gradient(180deg, var(--red-soft), #fff 90%); }
.conflict-card .cc-head { display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:800; color: var(--red-ink); margin-bottom:8px; }

/* ============================================================
   View 1 · 小白向导
   ============================================================ */
.wiz-top { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:26px; }
.wiz-h1 { font-size:36px; font-weight:900; letter-spacing:-.03em; margin:10px 0 0; line-height:1.05; }
.wiz-help { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--ink-2); background:var(--accent-soft); padding:9px 14px; border-radius:999px; white-space:nowrap; }
.wiz-help svg { color: var(--accent); }

.stepper { display:flex; gap:0; margin-bottom:26px; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:8px; box-shadow:var(--shadow-sm); }
.step { flex:1; display:flex; align-items:center; gap:11px; padding:12px 14px; border-radius:12px; position:relative; transition: background .15s; min-width:0; }
.step:not(:disabled):hover { background:var(--bg-2); }
.step-dot {
  flex:none; width:34px; height:34px; border-radius:11px; display:flex; align-items:center; justify-content:center;
  font-family:var(--latin); font-weight:700; font-size:14px; background:var(--bg-2); color:var(--ink-3); transition: all .2s;
}
.step.on .step-dot { background: var(--accent); color:#fff; box-shadow:0 4px 12px color-mix(in srgb,var(--accent) 36%, transparent); }
.step.done .step-dot { background: color-mix(in srgb,var(--accent) 16%, #fff); color: var(--accent); }
.step-meta { display:flex; flex-direction:column; min-width:0; }
.step-meta b { font-size:14px; font-weight:800; color:var(--ink-3); transition:color .2s; }
.step-meta i { font-size:11.5px; font-style:normal; color:var(--ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.step.on .step-meta b, .step.done .step-meta b { color: var(--ink); }
.step-line { display:none; }

.wiz-panel { min-height: 380px; }

.wiz-nav { display:flex; align-items:center; justify-content:space-between; margin-top:30px; padding-top:22px; border-top:1px solid var(--line); }
.wiz-nav-mid { display:flex; gap:8px; }
.nav-pip { width:8px; height:8px; border-radius:50%; background:var(--line-2); transition: all .2s; }
.nav-pip.on { width:26px; border-radius:999px; background:var(--accent); }
.nav-pip.done { background: color-mix(in srgb,var(--accent) 45%, var(--line-2)); }

.hw-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:16px; }
.hw-card { text-align:left; padding:18px; border-radius:16px; background:var(--card); border:1.5px solid var(--line); transition: all .16s; display:flex; flex-direction:column; gap:5px; }
.hw-card:hover { border-color:var(--accent); transform:translateY(-2px); box-shadow:var(--shadow); }
.hw-card.on { border-color:var(--accent); background: var(--accent-soft); box-shadow: 0 4px 16px color-mix(in srgb,var(--accent) 18%, transparent); }
.hw-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.hw-emoji { font-size:26px; line-height:1; }
.hw-check { width:24px; height:24px; border-radius:8px; border:1.5px solid var(--line-2); display:flex; align-items:center; justify-content:center; color:#fff; transition: all .15s; }
.hw-check.on { background:var(--accent); border-color:var(--accent); }
.hw-card b { font-size:16px; font-weight:800; }
.hw-en { font-family:var(--latin); font-size:11px; font-weight:600; letter-spacing:.05em; color:var(--ink-3); text-transform:uppercase; }
.hw-card p { font-size:12.5px; color:var(--ink-2); margin:4px 0 8px; line-height:1.5; }
.hw-caps { display:flex; flex-wrap:wrap; gap:5px; margin-top:auto; }
.cap { font-size:10.5px; font-weight:600; color:var(--ink-2); background:var(--bg-2); padding:3px 8px; border-radius:6px; }
.hw-card.on .cap { background:#fff; }

.pat-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
.pat-card { position:relative; text-align:left; padding:20px; border-radius:16px; background:var(--card); border:1.5px solid var(--line); transition: all .16s; display:flex; flex-direction:column; gap:12px; }
.pat-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); border-color: var(--pc); }
.pat-card.on { border-color:var(--pc); box-shadow:0 4px 18px color-mix(in srgb,var(--pc) 22%, transparent); background: color-mix(in srgb,var(--pc) 6%, #fff); }
.pat-emoji { font-size:30px; width:54px; height:54px; border-radius:14px; display:flex; align-items:center; justify-content:center; background: color-mix(in srgb,var(--pc) 12%, #fff); }
.pat-meta b { font-size:17px; font-weight:800; display:block; }
.pat-en { font-family:var(--latin); font-size:11px; font-weight:600; letter-spacing:.05em; color:var(--ink-3); text-transform:uppercase; }
.pat-meta p { font-size:12.5px; color:var(--ink-2); margin:6px 0 0; line-height:1.5; }
.pat-tasks { display:flex; flex-wrap:wrap; gap:6px; margin-top:auto; }
.pat-task { font-size:11px; font-weight:600; color:var(--ink-2); background:var(--bg-2); padding:4px 9px; border-radius:7px; }
.pat-radio { position:absolute; top:18px; right:18px; width:22px; height:22px; border-radius:50%; border:2px solid var(--line-2); transition: all .15s; }
.pat-radio.on { border-color:var(--pc); background:var(--pc); box-shadow: inset 0 0 0 4px #fff; }

.theme-grid { display:grid; gap:22px; max-width:760px; }
.field { display:flex; flex-direction:column; gap:9px; }
.field label { font-size:13px; font-weight:700; color:var(--ink); display:flex; align-items:center; justify-content:space-between; gap:10px; }
.mini-ai { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; font-size:11.5px; font-weight:700; color:var(--accent); background:var(--accent-soft); padding:5px 10px; border-radius:999px; transition: filter .14s; }
.mini-ai:hover { filter:brightness(.96); }
.t-input { border:1.5px solid var(--line-2); border-radius:13px; padding:13px 15px; font-size:14.5px; background:var(--card); outline:none; transition: border-color .14s; resize:vertical; line-height:1.55; }
.t-input:focus { border-color:var(--accent); }
.t-input.big { font-size:18px; font-weight:700; }
.theme-meta { display:grid; grid-template-columns: 1fr 1fr; gap:22px; }
.theme-meta .field:last-child { grid-column: 1 / -1; }
.seg-row { display:flex; flex-wrap:wrap; gap:8px; }
.pill-opt { height:36px; padding:0 16px; border-radius:999px; font-size:13px; font-weight:600; background:var(--bg-2); color:var(--ink-2); border:1.5px solid transparent; transition: all .14s; }
.pill-opt:hover { background:var(--accent-soft); }
.pill-opt.on { background:var(--accent); color:#fff; }
.t-range { -webkit-appearance:none; appearance:none; height:7px; border-radius:999px; background:var(--bg-2); outline:none; }
.t-range::-webkit-slider-thumb { -webkit-appearance:none; width:24px; height:24px; border-radius:50%; background:#fff; border:3px solid var(--accent); cursor:pointer; box-shadow:var(--shadow-sm); }

.gen-box { display:flex; flex-direction:column; align-items:center; text-align:center; gap:16px; padding:46px 24px; background:var(--card); border:1.5px solid var(--line); border-radius:20px; }
.gen-orb { width:84px; height:84px; border-radius:26px; display:flex; align-items:center; justify-content:center; color:#fff; background:linear-gradient(135deg, var(--accent), #7c4dcb); box-shadow:0 10px 30px color-mix(in srgb,var(--accent) 36%, transparent); }
.gen-orb.spin { animation: orbPulse 1.4s ease-in-out infinite; }
.gen-box h3 { font-size:21px; font-weight:800; margin:0; }
.gen-box > p { font-size:14px; color:var(--ink-2); max-width:46ch; margin:0; line-height:1.6; }
/* 步骤清单: 强制横排不换行 — 宽度塌缩时 .gl-txt 出省略号, 绝不竖排/互叠 */
.gen-lines { display:flex; flex-direction:column; flex-wrap:nowrap; gap:11px; align-items:stretch; margin-top:6px; width:max-content; max-width:100%; }
.gen-line { display:flex; flex-flow:row nowrap; align-items:center; gap:10px; min-width:0; max-width:100%; font-size:14px; font-weight:600; color:var(--ink); text-align:left; white-space:nowrap; }
.gen-line .gl-txt { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.gen-line svg { color:var(--c-assets); }
.gen-line.active { color:var(--ink-2); }
.gen-result-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.round-preview { display:grid; grid-template-columns: repeat(3,1fr); gap:14px; }
.rp-card { display:flex; gap:12px; padding:16px; background:var(--card); border:1.5px solid var(--line); border-radius:15px; }
.rp-num { flex:none; width:30px; height:30px; border-radius:10px; background:var(--accent-soft); color:var(--accent); font-family:var(--latin); font-weight:800; display:flex; align-items:center; justify-content:center; font-size:15px; }
.rp-body b { font-size:15px; font-weight:800; display:block; }
.rp-region { font-size:12px; color:var(--ink-3); display:block; margin:3px 0 9px; }
.rp-tasks { display:flex; flex-direction:column; gap:6px; }
.rp-task { font-size:12px; color:var(--ink-2); background:var(--bg-2); padding:6px 9px; border-radius:8px; line-height:1.3; }
.gen-extra { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
.ge-item { display:flex; gap:11px; align-items:flex-start; padding:15px; background:var(--accent-soft); border-radius:14px; }
.ge-item svg { color:var(--accent); margin-top:1px; }
.ge-item b { font-size:13.5px; display:block; }
.ge-item span { font-size:12.5px; color:var(--ink-2); display:block; margin-top:2px; line-height:1.5; }

.pub-grid { display:grid; grid-template-columns: 1fr 1fr; gap:24px; }
.pub-card-preview { background:var(--card); border:1.5px solid var(--line); border-radius:18px; overflow:hidden; box-shadow:var(--shadow-sm); }
.ppv-cover { height:200px; border:none; border-radius:0; }
.ppv-body { padding:20px; }
.ppv-body b { font-size:20px; font-weight:900; }
.ppv-body p { font-size:13.5px; color:var(--ink-2); line-height:1.6; margin:8px 0 14px; }
.ppv-tags { display:flex; flex-wrap:wrap; gap:7px; }
.pub-checks { display:flex; flex-direction:column; gap:18px; }
.pub-score { display:flex; align-items:center; gap:16px; }
.pub-ring { flex:none; width:80px; height:80px; border-radius:50%; display:flex; align-items:center; justify-content:center; background: conic-gradient(var(--accent) calc(var(--p)*1%), var(--bg-2) 0); }
.pub-ring span { width:62px; height:62px; border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:900; color:var(--accent); }
.pub-ring i { font-size:13px; font-style:normal; }
.pub-score b { font-size:16px; font-weight:800; }
.pub-score p { font-size:13px; color:var(--ink-2); margin:3px 0 0; }
.check-list { display:flex; flex-direction:column; gap:2px; }
.check-item { display:flex; align-items:center; gap:11px; padding:11px 4px; font-size:14px; font-weight:600; border-bottom:1px solid var(--line); }
.check-item:last-child { border-bottom:none; }
.ci-mark { width:22px; height:22px; border-radius:7px; display:flex; align-items:center; justify-content:center; color:#fff; }
.check-item.ok .ci-mark { background:#3aa86b; }
.check-item.no .ci-mark { background:var(--red); }
.check-item.no { color:var(--ink-3); }

/* ============================================================
   View 2 · AI 对话
   ============================================================ */
.chat-stage { display:flex; flex-direction:column; height:100%; max-width:860px; padding-bottom:0; }
.chat-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.chat-h1 { font-size:26px; font-weight:900; letter-spacing:-.025em; line-height:1.2; margin:10px 0 0; }
.chat-draftpill { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--ink-2); background:var(--card); border:1.5px solid var(--line); padding:8px 14px; border-radius:999px; white-space:nowrap; }
.chat-draftpill b { color:var(--ink); }
.cdp-dot { width:8px; height:8px; border-radius:50%; background:var(--c-chat); box-shadow:0 0 0 3px var(--c-chat-soft); }

.chat-body { flex:1; overflow-y:auto; padding:22px 4px; display:flex; flex-direction:column; gap:20px; }
.chat-msg { display:flex; gap:12px; align-items:flex-start; }
.chat-msg.me { flex-direction:row-reverse; }
.chat-ava { flex:none; width:34px; height:34px; border-radius:11px; display:flex; align-items:center; justify-content:center; color:#fff; background:linear-gradient(135deg, var(--c-chat), #6a4bd0); box-shadow:0 4px 12px rgba(47,107,214,.3); }
.chat-col { display:flex; flex-direction:column; gap:12px; max-width:78%; }
.chat-msg.me .chat-col { align-items:flex-end; }
.chat-bubble { font-size:14.5px; line-height:1.7; padding:13px 17px; border-radius:16px 16px 16px 5px; background:var(--card); border:1px solid var(--line); color:var(--ink); }
.chat-msg.me .chat-bubble { background:var(--accent); color:#fff; border-color:var(--accent); border-radius:16px 16px 5px 16px; }
.caret { display:inline-block; width:2px; height:1em; background:var(--accent); margin-left:2px; vertical-align:-2px; animation:dotFlash .8s steps(1) infinite; }

.patch-card { background:linear-gradient(180deg, var(--accent-soft), #fff 90%); border:1.5px solid color-mix(in srgb,var(--accent) 28%, var(--line)); border-radius:16px; padding:16px; width:100%; }
.patch-card.applied { opacity:.7; }
.patch-head { display:flex; align-items:center; gap:10px; margin-bottom:13px; }
.patch-tag { display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#fff; background:var(--accent); padding:4px 9px; border-radius:999px; font-family:var(--latin); }
.patch-head b { font-size:14.5px; font-weight:800; }
.patch-changes { display:flex; flex-direction:column; gap:7px; margin-bottom:14px; }
.patch-change { display:flex; align-items:center; gap:10px; font-size:13px; padding:8px 11px; background:#fff; border:1px solid var(--line); border-radius:10px; }
.pc-op { flex:none; width:20px; height:20px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; }
.pc-op.add { background:#e6f6ee; color:#1e9e6a; }
.pc-op.set { background:var(--c-test-soft); color:var(--c-test); }
.pc-path { font-family:var(--mono); font-size:11.5px; color:var(--ink-3); flex:none; }
.pc-label { font-weight:600; color:var(--ink); }
.patch-actions { display:flex; align-items:center; gap:8px; }
.patch-done { display:inline-flex; align-items:center; gap:7px; font-size:13.5px; font-weight:700; color:#1e9e6a; }
.patch-done svg { color:#1e9e6a; }

.chat-questions { display:flex; flex-wrap:wrap; gap:8px; }
.cq { display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:600; color:var(--accent); background:#fff; border:1.5px solid color-mix(in srgb,var(--accent) 30%, var(--line)); padding:8px 14px; border-radius:999px; transition: all .14s; }
.cq:hover { background:var(--accent-soft); transform:translateY(-1px); }
.cq svg { color:var(--ink-3); }

.chat-starters { margin-top:8px; }
.cs-label { font-size:13px; font-weight:600; color:var(--ink-3); }
.cs-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.cs-chip { display:flex; align-items:center; gap:9px; text-align:left; font-size:13.5px; font-weight:600; color:var(--ink); background:var(--card); border:1.5px solid var(--line); padding:14px 16px; border-radius:14px; transition: all .15s; }
.cs-chip svg { color:var(--accent); flex:none; }
.cs-chip:hover { border-color:var(--accent); background:var(--accent-soft); transform:translateY(-2px); box-shadow:var(--shadow); }

.chat-input { display:flex; align-items:flex-end; gap:9px; padding:14px 0 6px; background:var(--bg); }
.chat-input textarea { flex:1; resize:none; max-height:140px; border:1.5px solid var(--line-2); border-radius:18px; padding:14px 16px; font-size:14.5px; line-height:1.5; background:var(--card); outline:none; transition:border-color .14s; }
.chat-input textarea:focus { border-color:var(--accent); }
.ci-attach { flex:none; width:46px; height:46px; border-radius:14px; background:var(--card); border:1.5px solid var(--line-2); color:var(--ink-2); display:flex; align-items:center; justify-content:center; transition:all .14s; }
.ci-attach:hover { border-color:var(--accent); color:var(--accent); }
.ci-send { flex:none; width:46px; height:46px; border-radius:14px; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; transition:all .12s; }
.ci-send:hover:not(:disabled) { filter:brightness(1.06); transform:translateY(-1px); }
.ci-send:disabled { opacity:.4; }
.chat-foot { display:flex; align-items:center; gap:6px; justify-content:center; font-size:11.5px; color:var(--ink-3); padding:4px 0 14px; }
.chat-foot svg { color:var(--ink-3); }

/* ============================================================
   View 3 · 可视化画布
   ============================================================ */
.canvas-root { display:flex; flex-direction:column; height:100%; }
.canvas-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 24px; border-bottom:1px solid var(--line); background:var(--card); }
.canvas-title { font-size:18px; font-weight:800; margin-top:6px; }
.zoomer { display:flex; align-items:center; gap:2px; background:var(--bg-2); border-radius:10px; padding:3px; }
.zoomer button { width:30px; height:28px; border-radius:7px; font-size:17px; font-weight:700; color:var(--ink-2); }
.zoomer button:hover { background:#fff; }
.zoomer span { font-size:12px; font-weight:700; width:42px; text-align:center; color:var(--ink-2); }

.canvas-grid { flex:1; display:grid; grid-template-columns:230px 1fr; min-height:0; position:relative; }

.toolbox { border-right:1px solid var(--line); background:var(--card); padding:16px 14px; overflow-y:auto; display:flex; flex-direction:column; }
.tb-head { font-family:var(--latin); font-size:10.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-3); margin-bottom:12px; }
.tb-list { display:flex; flex-direction:column; gap:7px; }
.tb-item { display:flex; align-items:center; gap:10px; padding:9px 11px; border-radius:11px; background:var(--bg); border:1.5px solid var(--line); cursor:grab; transition:all .14s; }
.tb-item:hover { border-color:var(--accent); background:var(--accent-soft); transform:translateX(2px); }
.tb-emoji { font-size:18px; width:30px; height:30px; display:flex; align-items:center; justify-content:center; background:#fff; border-radius:9px; flex:none; }
.tb-item b { font-size:13px; font-weight:700; display:block; }
.tb-item span { font-size:11px; color:var(--ink-3); }
.tb-item > div { flex:1; min-width:0; }
.tb-plus { color:var(--ink-3); opacity:0; transition:opacity .14s; }
.tb-item:hover .tb-plus { opacity:1; color:var(--accent); }
.tb-tip { margin-top:14px; font-size:11.5px; color:var(--ink-3); line-height:1.5; display:flex; gap:7px; align-items:flex-start; padding:11px; background:var(--accent-soft); border-radius:11px; }
.tb-tip svg { color:var(--accent); flex:none; margin-top:1px; }

.flow-scroll { overflow:auto; padding:36px 30px; background:
  radial-gradient(circle, rgba(0,0,0,.045) 1.3px, transparent 1.3px) 0 0 / 22px 22px; }
.flow { display:flex; align-items:center; gap:6px; transform-origin:left center; transition:transform .2s; width:max-content; min-height:100%; }
.flow-start, .flow-end { flex:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; width:78px; height:78px; border-radius:50%; background:var(--card); border:1.5px solid var(--line); font-size:12.5px; font-weight:700; color:var(--ink-2); text-align:center; box-shadow:var(--shadow-sm); }
.flow-end { width:92px; height:92px; }
.flow-end i { font-size:10.5px; font-weight:600; color:var(--ink-3); font-style:normal; }
.fs-dot { width:11px; height:11px; border-radius:50%; background:var(--c-canvas); }
.fe-dot { width:34px; height:34px; border-radius:12px; background:var(--c-canvas-soft); color:var(--c-canvas); display:flex; align-items:center; justify-content:center; }
.flow-arrow { color:var(--line-2); flex:none; }

.round-node { flex:none; width:248px; background:var(--card); border:1.5px solid var(--line); border-radius:18px; box-shadow:var(--shadow-sm); transition:all .15s; cursor:pointer; overflow:hidden; }
.round-node:hover { box-shadow:var(--shadow); }
.round-node.sel { border-color:var(--c-canvas); box-shadow:0 6px 22px color-mix(in srgb,var(--c-canvas) 22%, transparent); }
.rn-head { display:flex; align-items:center; gap:8px; padding:13px 14px; background:color-mix(in srgb,var(--c-canvas) 6%, #fff); border-bottom:1px solid var(--line); }
.rn-num { flex:none; font-family:var(--latin); font-weight:800; font-size:12px; color:#fff; background:var(--c-canvas); padding:3px 8px; border-radius:7px; }
.rn-name { flex:1; min-width:0; border:none; background:transparent; font-size:14.5px; font-weight:800; padding:4px 6px; border-radius:7px; outline:none; }
.rn-name:hover, .rn-name:focus { background:#fff; box-shadow:inset 0 0 0 1.5px var(--c-canvas); }
.rn-region { font-size:11px; color:var(--ink-3); flex:none; }
.rn-tasks { padding:11px; display:flex; flex-direction:column; gap:7px; }
.task-node { display:flex; align-items:center; gap:9px; padding:9px 10px; border-radius:11px; background:var(--bg); border:1.5px solid transparent; transition:all .14s; }
.task-node:hover { background:var(--bg-2); }
.task-node.sel { border-color:var(--c-canvas); background:var(--c-canvas-soft); }
.tn-emoji { font-size:16px; width:28px; height:28px; display:flex; align-items:center; justify-content:center; background:#fff; border-radius:8px; flex:none; }
.tn-body { min-width:0; }
.tn-body b { font-size:12.5px; font-weight:700; display:block; line-height:1.3; }
.tn-body span { font-size:10.5px; color:var(--ink-3); }
.add-task { display:flex; align-items:center; justify-content:center; gap:6px; padding:8px; border-radius:10px; border:1.5px dashed var(--line-2); font-size:12px; font-weight:600; color:var(--ink-3); transition:all .14s; }
.add-task:hover { border-color:var(--c-canvas); color:var(--c-canvas); background:var(--c-canvas-soft); }
.rn-event { display:flex; align-items:center; gap:7px; padding:10px 14px; font-size:11.5px; color:var(--c-test); background:var(--c-test-soft); border-top:1px solid var(--line); line-height:1.4; }
.rn-event svg { flex:none; }

.inspector { position:absolute; top:14px; right:14px; bottom:14px; width:330px; background:var(--card); border:1.5px solid var(--line); border-radius:18px; box-shadow:var(--shadow-lg); display:flex; flex-direction:column; z-index:10; }
.insp-head { display:flex; align-items:center; justify-content:space-between; padding:15px 16px; border-bottom:1px solid var(--line); }
.insp-head b { font-size:15px; font-weight:800; }
.insp-body { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:16px; }
.type-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.type-opt { display:flex; align-items:center; gap:7px; padding:8px 10px; border-radius:10px; background:var(--bg); border:1.5px solid var(--line); font-size:12px; font-weight:600; color:var(--ink-2); transition:all .13s; }
.type-opt span { font-size:14px; }
.type-opt:hover { border-color:var(--c-canvas); }
.type-opt.on { border-color:var(--c-canvas); background:var(--c-canvas-soft); color:var(--c-canvas); font-weight:700; }
.insp-hw { display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--ink-2); padding:10px 12px; background:var(--bg-2); border-radius:10px; }
.insp-hw svg { color:var(--ink-3); }
.insp-del { color:var(--red); border-color:color-mix(in srgb,var(--red) 30%, var(--line)); align-self:flex-start; }
.insp-del:hover { background:var(--red-soft); border-color:var(--red); }
.insp-tip { font-size:12px; color:var(--ink-3); display:flex; gap:7px; padding:11px; background:var(--accent-soft); border-radius:11px; line-height:1.5; }
.insp-tip svg { color:var(--accent); flex:none; }

.issue-toast { position:absolute; left:50%; bottom:24px; transform:translateX(-50%); width:min(460px,86%); background:var(--ink); color:#fff; border-radius:16px; padding:14px 16px; box-shadow:var(--shadow-pop); z-index:20; }
.it-head { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:800; margin-bottom:10px; }
.it-head svg { color:#c9a6ff; }
.it-head button { margin-left:auto; color:rgba(255,255,255,.6); }
.it-item { display:flex; align-items:center; gap:9px; font-size:12.5px; padding:5px 0; color:rgba(255,255,255,.85); line-height:1.4; }
.it-item.ok svg { color:#7fe0a0; } .it-item.warn svg { color:#f5c451; }

/* ============================================================
   View 4 · 素材音效
   ============================================================ */
.assets-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.asset-card { background:var(--card); border:1.5px solid var(--line); border-radius:18px; padding:20px; box-shadow:var(--shadow-sm); }
.asset-card.span2 { grid-column:1 / -1; }
.ac-head { display:flex; align-items:center; gap:11px; margin-bottom:16px; }
.ac-ic { width:34px; height:34px; border-radius:11px; display:flex; align-items:center; justify-content:center; flex:none; }
.ac-head b { font-size:16px; font-weight:800; }
.ac-sub { font-size:12px; color:var(--ink-3); }
.ac-head .mini-ai { margin-left:auto; }

.cover-preview { height:220px; border-radius:14px; margin-bottom:14px; flex-direction:column; gap:8px; }
.cover-loading { display:flex; flex-direction:column; align-items:center; gap:12px; }
.cover-meta { display:flex; flex-direction:column; gap:12px; margin-bottom:14px; }
.cm-row { display:flex; gap:12px; align-items:flex-start; }
.cm-row > span { font-size:12.5px; font-weight:700; color:var(--ink-2); width:72px; flex:none; padding-top:5px; }
.cm-tags { display:flex; flex-wrap:wrap; gap:6px; }
.palette { display:flex; gap:8px; padding-top:2px; }
.swatch { width:34px; height:34px; border-radius:10px; border:1.5px solid rgba(0,0,0,.08); }
.cover-actions { display:flex; gap:8px; }

.theme-list { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.theme-opt { position:relative; display:flex; flex-direction:column; gap:8px; align-items:flex-start; padding:16px; border-radius:14px; background:var(--bg); border:1.5px solid var(--line); transition:all .15s; }
.theme-opt:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.theme-opt.on { border-color:var(--c-canvas); background:var(--c-canvas-soft); }
.to-emoji { font-size:30px; }
.theme-opt b { font-size:14px; font-weight:800; }
.to-palette { display:flex; gap:5px; }
.to-palette span { width:22px; height:22px; border-radius:7px; }
.to-check { position:absolute; top:12px; right:12px; width:22px; height:22px; border-radius:50%; background:var(--c-canvas); color:#fff; display:flex; align-items:center; justify-content:center; }

.bgm-list { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.bgm-item { display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:13px; background:var(--bg); border:1.5px solid var(--line); cursor:pointer; transition:all .14s; }
.bgm-item:hover { border-color:var(--c-chat); }
.bgm-item.on { border-color:var(--c-chat); background:var(--c-chat-soft); }
.bgm-play { flex:none; width:38px; height:38px; border-radius:50%; background:var(--c-chat); color:#fff; display:flex; align-items:center; justify-content:center; transition:transform .12s; }
.bgm-play:hover { transform:scale(1.07); }
.pause-ic { width:11px; height:13px; border-left:3.5px solid #fff; border-right:3.5px solid #fff; }
.wave { display:flex; align-items:center; gap:2.5px; height:34px; width:84px; flex:none; }
.wave span { flex:1; background:color-mix(in srgb,var(--c-chat) 45%, var(--line-2)); border-radius:2px; min-height:3px; transition:height .2s; }
.wave.playing span { background:var(--c-chat); animation:waveBeat .9s ease-in-out infinite alternate; }
@keyframes waveBeat { from { transform:scaleY(.4); } to { transform:scaleY(1); } }
.bgm-meta { flex:1; min-width:0; }
.bgm-meta b { font-size:13.5px; font-weight:700; display:block; }
.bgm-meta span { font-size:11.5px; color:var(--ink-3); }
.bgm-radio { flex:none; width:20px; height:20px; border-radius:50%; border:2px solid var(--line-2); transition:all .14s; }
.bgm-radio.on { border-color:var(--c-chat); background:var(--c-chat); box-shadow:inset 0 0 0 4px #fff; }

.sfx-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.sfx-opt { text-align:left; padding:14px; border-radius:13px; background:var(--bg); border:1.5px solid var(--line); transition:all .14s; }
.sfx-opt:hover { border-color:var(--c-test); transform:translateY(-2px); }
.sfx-opt.on { border-color:var(--c-test); background:var(--c-test-soft); }
.sfx-opt b { font-size:14px; font-weight:800; display:block; margin-bottom:3px; }
.sfx-opt span { font-size:11.5px; color:var(--ink-2); }

.layer-list { display:flex; flex-direction:column; gap:8px; }
.layer-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:11px; background:var(--bg); border:1px solid var(--line); }
.layer-trigger { font-family:var(--mono); font-size:11.5px; font-weight:500; color:var(--c-wizard); background:var(--c-wizard-soft); padding:4px 9px; border-radius:7px; }
.layer-clip { font-size:13px; font-weight:600; flex:1; }
.layer-del { color:var(--ink-3); width:24px; height:24px; border-radius:7px; display:flex; align-items:center; justify-content:center; }
.layer-del:hover { background:var(--red-soft); color:var(--red); }

/* ============================================================
   View 5 · AI 测玩
   ============================================================ */
.test-setup { display:flex; flex-direction:column; gap:26px; max-width:820px; }
.ts-block { display:flex; flex-direction:column; gap:12px; }
.ts-label { font-size:14px; font-weight:800; }
.ts-modes { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.ts-mode { text-align:left; padding:18px; border-radius:15px; background:var(--card); border:1.5px solid var(--line); transition:all .15s; }
.ts-mode:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.ts-mode.on { border-color:var(--c-test); background:var(--c-test-soft); }
.ts-mode b { font-size:15px; font-weight:800; display:block; margin-bottom:5px; }
.ts-mode span { font-size:12px; color:var(--ink-2); line-height:1.5; }
.ts-personas { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.ts-persona { position:relative; display:flex; align-items:center; gap:11px; padding:13px; border-radius:13px; background:var(--card); border:1.5px solid var(--line); text-align:left; transition:all .14s; }
.ts-persona:hover { border-color:var(--c-test); }
.ts-persona.on { border-color:var(--c-test); background:var(--c-test-soft); }
.tp-emoji { font-size:24px; flex:none; }
.ts-persona b { font-size:13.5px; font-weight:700; display:block; }
.ts-persona span { font-size:11px; color:var(--ink-3); }
.ts-persona > div { flex:1; min-width:0; }
.tp-check { flex:none; width:20px; height:20px; border-radius:6px; border:1.5px solid var(--line-2); display:flex; align-items:center; justify-content:center; color:#fff; }
.tp-check.on { background:var(--c-test); border-color:var(--c-test); }
.test-go { align-self:flex-start; }

.test-run-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:start; }

.watch-panel { background:#1c1a14; border-radius:18px; overflow:hidden; box-shadow:var(--shadow); }
.watch-head { display:flex; align-items:center; gap:9px; padding:14px 16px; color:#fff; font-size:13px; font-weight:700; border-bottom:1px solid rgba(255,255,255,.08); }
.watch-head .btn { background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.16); color:#fff; }
.watch-dot { width:9px; height:9px; border-radius:50%; background:#666; }
.watch-dot.live { background:#f0303c; box-shadow:0 0 0 3px rgba(240,48,60,.3); animation:dotFlash 1s infinite; }
.watch-log { height:440px; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:11px; font-size:13px; }
.wlog { display:flex; gap:9px; align-items:flex-start; color:rgba(255,255,255,.8); line-height:1.5; }
.wl-tag { flex:none; display:inline-flex; align-items:center; gap:4px; font-size:10px; font-weight:700; padding:3px 7px; border-radius:6px; margin-top:1px; }
.wl-tag.host { background:rgba(201,166,255,.18); color:#c9a6ff; }
.wl-tag.p { background:rgba(127,224,160,.16); color:#7fe0a0; }
.wl-tag.warn { background:rgba(245,196,81,.18); color:#f5c451; }
.wl-tag.sys { background:rgba(255,255,255,.1); color:rgba(255,255,255,.6); }
.wl-text { flex:1; }
.watch-log .typing i { background:#c9a6ff; }

.analysis-panel { background:var(--card); border:1.5px solid var(--line); border-radius:18px; padding:20px; box-shadow:var(--shadow-sm); }
.analysis-wait { display:flex; flex-direction:column; align-items:center; gap:14px; padding:60px 20px; text-align:center; }
.analysis-wait p { font-size:13.5px; color:var(--ink-2); max-width:30ch; line-height:1.6; }
.metric-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.metric-head b { font-size:16px; font-weight:800; }
.metrics { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:22px; }
.metric-card { padding:14px 16px; border-radius:13px; background:var(--bg); border:1.5px solid var(--line); }
.metric-card.better { background:#e6f6ee; border-color:#bfe6d0; }
.mc-label { font-size:12px; font-weight:600; color:var(--ink-3); }
.mc-val { display:flex; align-items:center; gap:8px; font-size:26px; font-weight:900; letter-spacing:-.02em; margin-top:5px; }
.mc-val s { color:var(--ink-3); font-size:18px; text-decoration:line-through; }
.mc-val svg { color:var(--ink-3); }
.mc-val b { color:#1e9e6a; }
.metric-card.better .mc-val b { color:#147049; }
.mc-delta { font-size:11.5px; font-weight:700; color:#1e9e6a; margin-top:4px; display:block; }

.sugg-head { font-size:14px; font-weight:800; margin-bottom:12px; }
.sugg-list { display:flex; flex-direction:column; gap:10px; }
.sugg-item { display:flex; gap:12px; align-items:flex-start; padding:14px; border-radius:13px; background:var(--bg); border:1.5px solid var(--line); transition:opacity .2s; }
.sugg-item.done { opacity:.6; }
.sev { flex:none; width:24px; height:24px; border-radius:7px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; color:#fff; }
.sev.high { background:var(--red); } .sev.mid { background:var(--c-test); } .sev.low { background:var(--ink-3); }
.sugg-body { flex:1; min-width:0; }
.sugg-where { font-size:11.5px; font-weight:700; color:var(--ink-3); }
.sugg-text { font-size:13px; color:var(--ink); margin:3px 0 7px; line-height:1.5; }
.sugg-fix { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--c-test); background:var(--c-test-soft); padding:6px 10px; border-radius:8px; }
.sugg-fix svg { flex:none; }
.sugg-applied { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:700; color:#1e9e6a; flex:none; }

/* 占位 view 骨架(view agent 覆写前的样子) */
.view-stub { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; min-height:50vh; text-align:center; padding:40px 20px; }
.view-stub h2 { font-size:22px; font-weight:900; margin:0; }
.view-stub p { font-size:13.5px; color:var(--ink-2); max-width:44ch; line-height:1.6; margin:0; }

/* ============================================================
   中屏适配 — ugc-studio iframe 内嵌 ~1220px / 小笔记本
   ============================================================ */
@media (max-width: 1280px) {
  /* 顶栏: 工具与自治度收成纯图标(title 提示仍在); ▶运行/保存/发布 保留文字 */
  .topbar { gap: 10px; }
  .tool-btn .tb-label { display:none; }
  .tool-btn { width:36px; padding:0; gap:0; justify-content:center; }
  #autonomy-btn .btn-label { display:none; }
  #autonomy-btn { width:32px; padding:0; gap:0; justify-content:center; }
  .draft-title input { max-width:16vw; }
  /* 五步导航: 标签缩短为 01-05 + 图标; 完成度环保留 */
  .mode-tab .mt-label { display:none; }
  .mode-tab { padding:0 13px; gap:7px; }
  .completeness .label { display:none; }
  /* 右缘治理: 「AI 副驾」按钮绝不被裁切 */
  .topbar-tools, .topbar-actions, .modebar-right, .copilot-toggle { flex:none; }
  .modebar-right { margin-left:auto; }
  .modebar { gap:10px; }
}

@media (max-width: 1024px) {
  /* 副驾改浮层抽屉: 不再并排挤压舞台; 开关复用 #copilot-toggle 的 rail-closed 逻辑 */
  .work { grid-template-columns: 1fr !important; }
  .work .copilot {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 160;
    width: min(380px, 94vw);
    border-left: 1.5px solid var(--line);
    box-shadow: -18px 0 50px rgba(22,21,15,.18);
    animation: slideRail .22s ease;
  }
  .work.rail-closed .copilot { display:none; }
}

/* ============================================================
   移动端(≥360px 可用)
   ============================================================ */
@media (max-width: 860px) {
  body { overflow:auto; }
  .topbar { padding:0 12px; height:56px; gap:8px; }
  .brand-sub, .topbar-tools, .draft-title .save-dot { display:none; }
  .topbar .divider { display:none; }
  .draft-title input { max-width:38vw; width:auto; }
  .work { grid-template-columns: 1fr !important; }
  .work .copilot { display:none; }
  .stage-inner { padding: 20px 16px 120px; }
  .modebar { padding:8px 12px; }
  .modebar-right .completeness .label { display:none; }
  .mode-tab { height:38px; padding:0 13px; font-size:13px; }
  .copilot-toggle span.ct-label { display:none; }
  .pdock { height: 76vh; }

  .wiz-h1{ font-size:26px; }
  .wiz-top{ flex-direction:column; align-items:flex-start; gap:12px; }
  .wiz-help{ display:none; }
  .stepper{ overflow-x:auto; }
  .step-meta i{ display:none; }
  .step{ flex:none; }
  .hw-grid,.pat-grid,.round-preview{ grid-template-columns:1fr; }
  .theme-meta,.gen-extra,.pub-grid{ grid-template-columns:1fr; }
  .chat-h1{ font-size:23px; }
  .chat-head{ flex-direction:column; align-items:flex-start; gap:10px; }
  .chat-draftpill{ display:none; }
  .cs-grid{ grid-template-columns:1fr; }
  .chat-col{ max-width:86%; }
  .canvas-grid{ grid-template-columns:1fr; }
  .toolbox{ display:none; }
  .inspector{ position:fixed; inset:auto 0 0 0; top:auto; width:100%; height:70vh; border-radius:18px 18px 0 0; }
  .canvas-bar{ flex-wrap:wrap; gap:10px; }
  .assets-grid{ grid-template-columns:1fr; }
  .bgm-list,.sfx-grid,.theme-list{ grid-template-columns:1fr; }
  .ts-modes,.ts-personas{ grid-template-columns:1fr; }
  .test-run-grid{ grid-template-columns:1fr; }
  .watch-log{ height:300px; }
}

@media (max-width: 420px) {
  /* 360px 档: 顶栏动作收紧 */
  .topbar-actions .btn { padding: 0 10px; }
  .topbar-actions .btn .btn-label { display:none; }
  .avatar { display:none; }
  .mode-tab .mt-num { display:none; }
  .stage-inner { padding: 16px 12px 110px; }
}

/* ============================================================
   copilot.js 追加样式(copilot agent 专属段)
   双模式 tab / 自治度迷你三档 / 思考步骤清单 / 计划卡 /
   diff 撤销行 / 冲突逐条决定行 / AI 改动历史可点
   ============================================================ */
.cp-tabs { display:flex; align-items:center; padding: 10px 14px 0; }
.cp-mode-seg { width:100%; }
.cp-mode-seg .seg { flex:1; height:30px; }
.cp-auto-row { display:flex; align-items:center; gap:9px; padding: 8px 14px 10px; border-bottom:1px solid var(--line); }
.cp-auto-seg { flex:none; }
.cp-auto-seg .seg { height:24px; padding:0 9px; font-size:11px; }
.cp-auto-hint { font-size:10.5px; color:var(--ink-3); line-height:1.35; flex:1; min-width:0; }

/* 消息流容器: 卡片与气泡纵向排 */
#cp-msgs { display:flex; flex-direction:column; gap:12px; }
#cp-msgs .diff-card { animation: fadeUp .18s ease; }

/* 思考中: 打字点 + 动态步骤清单(替代 spinner) */
.cp-dots { display:inline-flex; gap:4px; padding:2px 0; }
.cp-dots i { width:6px; height:6px; border-radius:50%; background:var(--ink-3); animation: cpBlink 1.1s infinite; }
.cp-dots i:nth-child(2) { animation-delay:.18s; }
.cp-dots i:nth-child(3) { animation-delay:.36s; }
@keyframes cpBlink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }
.cp-steps { display:flex; flex-direction:column; gap:7px; }
.cp-step { display:flex; align-items:center; gap:9px; font-size:12.5px; color:var(--ink-3); transition: color .2s; }
.cp-step .st-dot {
  flex:none; width:16px; height:16px; border-radius:50%;
  border:2px solid var(--line-2); color:#fff;
  display:flex; align-items:center; justify-content:center; transition: all .2s;
}
.cp-step .st-dot svg { opacity:0; transition: opacity .15s; }
.cp-step.on { color:var(--ink); font-weight:700; }
.cp-step.on .st-dot { border-color: var(--accent); animation: orbPulse 1.2s ease-in-out infinite; }
.cp-step.done { color:var(--ink-2); }
.cp-step.done .st-dot { background:var(--accent); border-color:var(--accent); }
.cp-step.done .st-dot svg { opacity:1; }

/* 计划卡: 编号清单, 每条可勾选; 执行时逐条 ✓ */
.plan-head { display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:800; margin-bottom:8px; }
.plan-head .ic { color: var(--accent); }
.plan-list { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.plan-item {
  display:flex; align-items:center; gap:9px; font-size:13px; line-height:1.45;
  background:#fff; border:1px solid var(--line); border-radius:10px; padding:8px 10px;
  cursor:pointer; transition: opacity .15s, border-color .15s;
}
.plan-item input { accent-color: var(--accent); margin:0; flex:none; }
.plan-item .pi-num {
  flex:none; width:18px; height:18px; border-radius:6px; font-style:normal;
  background:var(--accent-soft); color:var(--accent);
  font-family:var(--latin); font-size:11px; font-weight:800;
  display:flex; align-items:center; justify-content:center;
}
.plan-item span { flex:1; }
.plan-item .pi-tick {
  flex:none; width:17px; height:17px; border-radius:50%; color:#fff;
  display:flex; align-items:center; justify-content:center;
  background:var(--accent); transform:scale(0); transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.plan-item.off { opacity:.45; }
.plan-item.off span { text-decoration: line-through; }
.plan-item.done { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.plan-item.done .pi-tick { transform:scale(1); }
.plan-card.exec .plan-item input { visibility:hidden; }
.plan-card.stale { opacity:.55; }
.plan-note { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--ink-2); line-height:1.5; }
.plan-note .ic { color:var(--accent); flex:none; }

/* diff 行: 主行(路径 before→after 撤销钮) + why 小字; 撤销后划掉 */
.diff-row { display:block; }
.diff-row .d-main { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.diff-row .d-path { font-weight:700; font-size:12.5px; color:var(--ink); }
.diff-row .d-why { font-size:11.5px; color:var(--ink-3); margin-top:3px; line-height:1.45; }
.diff-row .d-undo {
  margin-left:auto; flex:none; font-size:11.5px; font-weight:700;
  color:var(--ink-3); text-decoration:underline; padding:0 2px;
}
.diff-row .d-undo:hover:not(:disabled) { color:var(--red-ink); }
.diff-row .d-undo:disabled { text-decoration:none; cursor:default; }
.diff-row.undone { opacity:.55; }
.diff-row.undone .d-after { text-decoration: line-through; font-weight:400; }
.d-more { font-size:12px; font-weight:700; color:var(--accent); padding:2px 0; text-decoration:underline; }

/* 冲突卡: 逐条决定 保留我的 / 用 AI 的 */
.cc-row {
  background:#fff; border:1px solid var(--line); border-radius:10px;
  padding:9px 11px; margin-bottom:7px;
}
.cc-row .cc-text { font-size:12.5px; line-height:1.55; margin-bottom:7px; }
.cc-row .cc-text b { color:var(--red-ink); }
.cc-row .cc-btns { display:flex; gap:7px; }
.cc-row .cc-btns .btn { height:27px; font-size:12px; padding:0 11px; }
.cc-row.decided { opacity:.75; }

/* AI 改动历史: 可点恢复 */
.cp-log-click { display:flex; width:100%; text-align:left; border-radius:9px; padding:6px 6px; transition: background .13s; }
.cp-log-click:hover { background: var(--bg-2); }
.cp-log-click:hover b { color: var(--accent); }

/* build/ask 失败兜底卡: 人话原因 + 再试一次 / 回到上个能玩的版本 */
.cp-err { border-color: color-mix(in srgb, var(--red) 36%, var(--line)); background: linear-gradient(180deg, var(--red-soft), #fff 88%); }
.cp-err .ce-head { display:flex; align-items:center; gap:8px; font-size:13.5px; font-weight:800; color:var(--red-ink); margin-bottom:6px; }
.cp-err .ce-head .ic { color:var(--red); flex:none; }
.cp-err .ce-msg { font-size:12.5px; color:var(--ink-2); line-height:1.6; margin-bottom:10px; overflow-wrap:anywhere; }
.cp-err .ce-btns { display:flex; gap:8px; flex-wrap:wrap; }
.cp-err .ce-note { font-size:11px; color:var(--ink-3); margin-top:9px; line-height:1.4; }

/* ============================================================
   WIZARD + CHAT 追加样式 — views/wizard.js / views/chat.js 专用
   (wizard-chat agent; 前缀 wz-/gal-/gl-/ch- 不与设计稿类名冲突)
   ============================================================ */

/* —— 01 向导: 一句话生成框 —— */
/* display:flex 会盖掉 UA 的 [hidden]{display:none}, 必须显式补回 */
.wz-gen[hidden], .gen-box[hidden] { display:none; }
.wz-gen { display:flex; flex-direction:column; gap:12px; padding:22px; }
.wz-gen-label { display:flex; align-items:center; gap:7px; font-size:13.5px; font-weight:800; color:var(--ink); }
.wz-gen-label svg { color:var(--accent); }
.wz-gen textarea { min-height:64px; }
.wz-gen-foot { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.wz-hint { font-size:12.5px; color:var(--ink-3); line-height:1.5; max-width:52ch; }

/* —— 生成失败盒 —— */
.wz-fail { border-color: color-mix(in srgb, var(--red) 30%, var(--line)); }
.wz-fail-orb { background: linear-gradient(135deg, var(--red), #b0212b) !important; box-shadow:0 10px 26px color-mix(in srgb, var(--red) 30%, transparent) !important; }
#wz-fail p { color:var(--ink-2); }

/* —— 动态步骤清单的三种状态图标(向导与对话共用) —— */
.gen-line .gl-ico { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; flex:none; }
.gen-line.gl-done { color:var(--ink); }
.gen-line.gl-done svg { color:#1e9e6a; }
.gen-line.gl-run { color:var(--ink); font-weight:700; }
.gen-line.gl-pend { color:var(--ink-3); }
/* 注意: 行本身也带 gl-pend/gl-run 状态类, 圈圈尺寸必须锁死在 .gl-ico 里 —
   否则 .gl-pend 把整行压成 11px 圆圈, 文字竖排互叠(截图 3 的真凶) */
.gl-ico .gl-spin { width:13px; height:13px; border-radius:50%; border:2px solid var(--accent-soft); border-top-color:var(--accent); animation: glSpin .8s linear infinite; }
.gl-ico .gl-pend { width:11px; height:11px; border-radius:50%; border:2px dashed var(--line-2); }
@keyframes glSpin { to { transform: rotate(360deg); } }
.ch-steps { display:flex; flex-direction:column; gap:8px; }
.ch-steps .gen-line { font-size:13px; }

/* —— 243 游戏改造画廊 —— */
.gal-tabs { display:flex; gap:8px; overflow-x:auto; padding-bottom:6px; margin-bottom:16px; scrollbar-width:none; }
.gal-tabs::-webkit-scrollbar { display:none; }
.gal-tabs .pill-opt { flex:none; }
.gal-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:14px; }
.gal-card { position:relative; display:flex; gap:12px; align-items:flex-start; text-align:left; padding:15px; border-radius:16px; background:var(--card); border:1.5px solid var(--line); transition:all .15s; overflow:hidden; }
.gal-card:hover { border-color:var(--accent); transform:translateY(-2px); box-shadow:var(--shadow); }
.gal-emoji { flex:none; font-size:24px; width:46px; height:46px; display:flex; align-items:center; justify-content:center; background:var(--bg-2); border-radius:13px; }
.gal-card:hover .gal-emoji { background:var(--accent-soft); }
.gal-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.gal-body b { font-size:14.5px; font-weight:800; line-height:1.3; }
.gal-desc { font-size:12px; color:var(--ink-2); line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.gal-meta { font-size:11px; color:var(--ink-3); font-weight:600; margin-top:3px; }
.gal-fork { position:absolute; right:12px; bottom:10px; display:inline-flex; align-items:center; gap:4px; font-size:11.5px; font-weight:700; color:var(--accent); opacity:0; transform:translateX(-4px); transition:all .15s; background:var(--card); padding:2px 4px; }
.gal-card:hover .gal-fork { opacity:1; transform:none; }
.gal-empty { grid-column:1/-1; display:flex; flex-direction:column; align-items:center; gap:10px; padding:48px 16px; color:var(--ink-3); font-size:13px; text-align:center; line-height:1.6; }

/* —— 02 对话: 语义 diff 行的人话标签 —— */
.diff-row .d-path { font-weight:700; color:var(--ink); flex:none; }
.diff-row .d-why { font-size:12px; color:var(--ink-3); }
.patch-card .diff-row { flex-wrap:wrap; }

@media (max-width: 1100px) { .gal-grid { grid-template-columns:repeat(2, 1fr); } }
@media (max-width: 760px) {
  .gal-grid { grid-template-columns:1fr; }
  .wz-gen-foot { flex-direction:column; align-items:stretch; }
}

/* ============================================================
   test agent 追加段 — 05 测玩叙事卡 / 步骤清单 / 三选一 /
   发布前检查面板 / 纸屑庆祝 / dock 热更角标 / 版本历史
   ============================================================ */

/* --- 设置页小提示 --- */
.tx-hint { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--c-test); background:var(--c-test-soft); border:1px solid color-mix(in srgb, var(--c-test) 26%, transparent); padding:9px 13px; border-radius:11px; max-width:560px; }
.tx-hint.ok { color:#147049; background:#e6f6ee; border-color:#bfe6d0; }

/* --- 动态步骤清单(替代 spinner) --- */
.run-steps { max-width:640px; padding:18px 20px; display:flex; flex-direction:column; gap:4px; }
.rs-head { display:flex; align-items:center; gap:9px; font-size:14.5px; font-weight:800; padding-bottom:12px; border-bottom:1px solid var(--line); margin-bottom:8px; color:var(--c-test); }
.rs-head .btn { margin-left:auto; }
.rs-item { display:flex; align-items:center; gap:11px; padding:9px 6px; border-radius:10px; font-size:13.5px; }
.rs-item .rs-dot { flex:none; width:11px; height:11px; border-radius:50%; background:var(--line-2); }
.rs-item.doing { background:var(--c-test-soft); }
.rs-item.doing .rs-dot { background:var(--c-test); animation:dotFlash 1s infinite; }
.rs-item.done .rs-dot { background:#1e9e6a; }
.rs-item.fail .rs-dot { background:var(--red); }
.rs-item.wait { color:var(--ink-3); }
.rs-name { font-weight:700; }
.rs-status { margin-left:auto; font-style:normal; font-size:11.5px; color:var(--ink-3); font-family:var(--mono); }
.rs-item.fail .rs-status { color:var(--red); }
.rs-foot { font-size:11.5px; color:var(--ink-3); padding-top:10px; border-top:1px dashed var(--line); margin-top:8px; }

/* --- 测玩总结条 --- */
.tx-results { display:flex; flex-direction:column; gap:18px; }
.tx-sum { display:flex; align-items:center; gap:10px; padding:13px 16px; border-radius:13px; font-size:13.5px; font-weight:700; }
.tx-sum.pass { background:#e6f6ee; color:#147049; border:1.5px solid #bfe6d0; }
.tx-sum.fail { background:var(--red-soft); color:var(--red); border:1.5px solid color-mix(in srgb, var(--red) 28%, transparent); }
.tx-sum span { flex:1; }

/* --- 人格叙事卡(P0) --- */
.ncards { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:14px; }
.ncard { background:var(--card); border:1.5px solid var(--line); border-radius:16px; padding:16px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:10px; }
.ncard.v-red { border-color:color-mix(in srgb, var(--red) 42%, transparent); }
.ncard.v-yellow { border-color:color-mix(in srgb, var(--c-test) 46%, transparent); }
.nc-head { display:flex; align-items:center; gap:11px; }
.nc-ava { flex:none; width:42px; height:42px; border-radius:13px; background:var(--bg-2); display:flex; align-items:center; justify-content:center; font-size:23px; }
.nc-head > div { flex:1; min-width:0; }
.nc-head b { font-size:14px; font-weight:800; display:block; }
.nc-head .muted { font-size:11px; }
.nc-dot { flex:none; width:13px; height:13px; border-radius:50%; }
.nc-dot.green { background:#1e9e6a; box-shadow:0 0 0 4px #e6f6ee; }
.nc-dot.yellow { background:var(--c-test); box-shadow:0 0 0 4px var(--c-test-soft); }
.nc-dot.red { background:var(--red); box-shadow:0 0 0 4px var(--red-soft); animation:dotFlash 1.4s infinite; }
.nc-text { font-size:13.5px; line-height:1.55; margin:0; color:var(--ink); }
.nc-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* 详情: 事件要点时间轴 */
.nc-detail { border-top:1px dashed var(--line); padding-top:10px; display:flex; flex-direction:column; gap:2px; max-height:260px; overflow-y:auto; }
.nd-row { display:flex; align-items:center; gap:8px; font-size:12px; padding:5px 4px; border-radius:8px; }
.nd-row i { flex:none; width:7px; height:7px; border-radius:50%; background:var(--line-2); }
.nd-row.warn { background:var(--red-soft); }
.nd-row.warn i { background:var(--red); }
.nd-row b { font-weight:700; }
.nd-row span { color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nd-row code { margin-left:auto; font-family:var(--mono); font-size:10px; color:var(--ink-3); flex:none; }
.nd-row.muted { color:var(--ink-3); }

/* --- 通用浮层 + 三选一卡 / 冲突卡 --- */
.tx-mask { position:fixed; inset:0; z-index:300; background:rgba(30,26,18,.42); display:flex; align-items:center; justify-content:center; padding:20px; animation:fadeIn .14s ease; }
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
.fork-card { width:min(460px, 94vw); padding:22px; display:flex; flex-direction:column; gap:11px; border-radius:18px; }
.fork-card > b { font-size:16.5px; font-weight:900; }
.fork-card > p { font-size:13px; color:var(--ink-2); margin:0; line-height:1.55; }
.fork-opt { text-align:left; padding:13px 15px; border-radius:13px; border:1.5px solid var(--line); background:var(--bg); font-size:14px; font-weight:800; transition:all .13s; }
.fork-opt span { display:block; font-size:11.5px; font-weight:500; color:var(--ink-3); margin-top:3px; }
.fork-opt:hover { border-color:var(--c-test); background:var(--c-test-soft); transform:translateY(-1px); }
.fk-btns { display:flex; gap:9px; justify-content:flex-end; margin-top:4px; }
.fk-conf { display:flex; align-items:center; gap:9px; font-size:12px; background:var(--bg); border:1px solid var(--line); border-radius:9px; padding:7px 10px; }
.fk-conf code { font-family:var(--mono); font-size:10.5px; color:var(--c-canvas); flex:none; }
.fk-conf span { color:var(--ink-2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* --- 发布前检查面板 --- */
.pubx-panel { width:min(560px, 94vw); max-height:88vh; overflow-y:auto; border-radius:20px; padding:0; }
.pubx-head { display:flex; align-items:center; gap:10px; padding:16px 18px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--card); border-radius:20px 20px 0 0; z-index:1; }
.pubx-head b { display:flex; align-items:center; gap:7px; font-size:15.5px; font-weight:900; }
.pubx-head .muted { flex:1; font-size:11.5px; }
.pubx-rows { display:flex; flex-direction:column; gap:7px; padding:16px 18px 6px; }
.pubx-row { display:flex; align-items:center; gap:12px; padding:10px 13px; border-radius:12px; border:1.5px solid var(--line); background:var(--bg); }
.pubx-row .pubx-dot { flex:none; width:12px; height:12px; border-radius:50%; background:var(--line-2); }
.pubx-row.ok { border-color:#bfe6d0; background:#f3fbf7; }
.pubx-row.ok .pubx-dot { background:#1e9e6a; }
.pubx-row.miss .pubx-dot { background:var(--c-test); }
.pubx-row > div { flex:1; min-width:0; }
.pubx-row b { font-size:13px; font-weight:800; display:block; }
.pubx-row span { font-size:11.5px; color:var(--ink-3); }
.pubx-agr { margin:10px 18px; border:1.5px dashed var(--line); border-radius:13px; padding:12px 14px; display:flex; flex-direction:column; gap:6px; }
.pubx-agr-head { font-size:12px; font-weight:800; color:var(--ink-3); letter-spacing:.04em; }
.pubx-agr-row { display:flex; align-items:center; gap:8px; font-size:12.5px; }
.pubx-agr-row i { flex:none; width:8px; height:8px; border-radius:50%; background:var(--line-2); }
.pubx-agr-row.ok i { background:#1e9e6a; }
.pubx-agr-row.miss i { background:var(--red); }
.pubx-agr-row b { font-family:var(--mono); font-size:10.5px; font-weight:600; color:var(--ink-3); flex:none; }
.pubx-agr-row span { color:var(--ink-2); line-height:1.45; }
.pubx-agr-miss { font-size:12px; color:var(--c-test); background:var(--c-test-soft); border-radius:9px; padding:8px 11px; line-height:1.6; }
.pubx-agr-pass { display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:800; color:#147049; }
.pubx-agr-off { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--ink-2); }
.pubx-foot { display:flex; align-items:center; gap:13px; padding:14px 18px 18px; border-top:1px solid var(--line); margin-top:8px; }
.pubx-warn { flex:1; font-size:12.5px; color:var(--c-test); display:flex; align-items:center; gap:6px; line-height:1.5; }
.pubx-warn.ok { color:#147049; font-weight:800; }

/* --- 发布成功: 纸屑 CSS 动画 --- */
.pubx-done { position:relative; text-align:center; padding:34px 24px 28px; overflow:hidden; }
.pubx-cheer { font-size:46px; }
.pubx-done h2 { font-size:22px; font-weight:900; margin:8px 0 6px; }
.pubx-done p { font-size:13px; color:var(--ink-2); line-height:1.6; max-width:42ch; margin:0 auto 16px; }
.pubx-links { display:flex; gap:10px; justify-content:center; }
.pubx-confetti { position:absolute; inset:0; pointer-events:none; }
.pubx-confetti i { position:absolute; top:-12px; width:8px; height:13px; border-radius:2px; opacity:0; animation:confettiFall 2.6s ease-in infinite; }
.pubx-confetti i:nth-child(6n+1) { background:var(--red); }
.pubx-confetti i:nth-child(6n+2) { background:var(--c-chat); }
.pubx-confetti i:nth-child(6n+3) { background:var(--c-test); }
.pubx-confetti i:nth-child(6n+4) { background:#1e9e6a; }
.pubx-confetti i:nth-child(6n+5) { background:var(--c-canvas); }
.pubx-confetti i:nth-child(6n)   { background:#f5c451; }
.pubx-confetti i:nth-child(1){left:4%; animation-delay:0s} .pubx-confetti i:nth-child(2){left:10%; animation-delay:.5s}
.pubx-confetti i:nth-child(3){left:16%; animation-delay:.2s} .pubx-confetti i:nth-child(4){left:22%; animation-delay:.9s}
.pubx-confetti i:nth-child(5){left:28%; animation-delay:.4s} .pubx-confetti i:nth-child(6){left:34%; animation-delay:1.2s}
.pubx-confetti i:nth-child(7){left:40%; animation-delay:.1s} .pubx-confetti i:nth-child(8){left:46%; animation-delay:.7s}
.pubx-confetti i:nth-child(9){left:52%; animation-delay:.3s} .pubx-confetti i:nth-child(10){left:58%; animation-delay:1s}
.pubx-confetti i:nth-child(11){left:64%; animation-delay:.6s} .pubx-confetti i:nth-child(12){left:70%; animation-delay:1.4s}
.pubx-confetti i:nth-child(13){left:76%; animation-delay:.15s} .pubx-confetti i:nth-child(14){left:82%; animation-delay:.8s}
.pubx-confetti i:nth-child(15){left:88%; animation-delay:.45s} .pubx-confetti i:nth-child(16){left:94%; animation-delay:1.1s}
.pubx-confetti i:nth-child(17){left:7%; animation-delay:1.6s} .pubx-confetti i:nth-child(18){left:61%; animation-delay:1.8s}
@keyframes confettiFall {
  0% { transform:translateY(0) rotate(0deg); opacity:0; }
  8% { opacity:1; }
  100% { transform:translateY(340px) rotate(540deg); opacity:0; }
}

/* --- 版本历史 --- */
.ver-list { margin-top:16px; text-align:left; border-top:1px dashed var(--line); padding-top:12px; display:flex; flex-direction:column; gap:6px; }
.ver-head { font-size:12px; font-weight:800; color:var(--ink-3); margin-bottom:2px; }
.ver-row { display:flex; align-items:center; gap:10px; padding:8px 11px; border-radius:10px; background:var(--bg); border:1px solid var(--line); font-size:12.5px; }
.ver-row b { font-family:var(--mono); font-weight:700; }
.ver-badge { font-size:10px; font-weight:800; padding:2px 7px; border-radius:6px; background:var(--bg-2); color:var(--ink-3); }
.ver-badge.ok { background:#e6f6ee; color:#147049; }

/* --- 预览 dock 热更角标 --- */
.pd-badge { font-size:11px; font-weight:800; color:#147049; background:#e6f6ee; border:1px solid #bfe6d0; padding:3px 9px; border-radius:99px; opacity:0; transform:translateY(-3px); transition:all .2s ease; pointer-events:none; }
.pd-badge.show { opacity:1; transform:translateY(0); }

/* --- 移动端补充 --- */
@media (max-width: 860px) {
  .ncards { grid-template-columns:1fr; }
  .pubx-foot { flex-direction:column; align-items:stretch; }
  .run-steps { max-width:none; }
}

/* ============================================================
   canvas/assets 追加段(canvas-assets agent) —
   03 画布: 新徽章/步进器/节点 AI 输入/选项编辑/撤销 toast/浮动 diff 卡
   04 素材: brief 盒/封面 symbol/SFX 下拉/配乐层空态
   ============================================================ */

/* — 03 画布 — */
.tb-new {
  display:inline-block; font-style:normal; font-size:10px; font-weight:800;
  color:#fff; background:var(--red); padding:1px 6px; border-radius:999px;
  vertical-align:1px; margin-left:3px; letter-spacing:.05em;
}
.rn-emoji { font-size:16px; flex:none; line-height:1; }
.region-cap {
  display:flex; align-items:center; gap:6px; padding:3px 4px 0;
  font-size:10.5px; font-weight:700; letter-spacing:.05em; color:var(--ink-3);
}
.round-node.drop { border-color:var(--c-canvas); background:var(--c-canvas-soft); box-shadow:0 6px 22px color-mix(in srgb,var(--c-canvas) 26%, transparent); }
.round-add-col { flex:none; display:flex; flex-direction:column; gap:8px; }
.round-add {
  display:flex; align-items:center; justify-content:center; gap:7px;
  width:150px; padding:14px 10px; border:1.5px dashed var(--line-2); border-radius:16px;
  color:var(--ink-3); font-size:13px; font-weight:700; background:transparent; transition:all .15s;
}
.round-add:hover { border-color:var(--c-canvas); color:var(--c-canvas); background:var(--c-canvas-soft); }
.round-add.plain { padding:9px 10px; font-size:12px; }
.round-add[disabled] { opacity:.5; pointer-events:none; }

.num-stepper { display:flex; align-items:center; gap:6px; }
.num-stepper button {
  width:32px; height:34px; border-radius:9px; background:var(--bg-2);
  font-size:16px; font-weight:800; color:var(--ink-2); flex:none; transition:background .12s;
}
.num-stepper button:hover { background:var(--line); }
.num-stepper input {
  width:84px; height:34px; text-align:center; border:1.5px solid var(--line-2);
  border-radius:9px; font-size:14px; font-weight:700; outline:none; background:var(--card);
}
.num-stepper input:focus { border-color:var(--c-canvas); }

.opt-list { display:flex; flex-direction:column; gap:7px; }
.opt-row { display:flex; align-items:center; gap:7px; }
.opt-radio {
  flex:none; width:20px; height:20px; border-radius:50%;
  border:2px solid var(--line-2); background:transparent; transition:all .14s;
}
.opt-radio:hover { border-color:var(--c-canvas); }
.opt-radio.on { border-color:var(--c-canvas); background:var(--c-canvas); box-shadow:inset 0 0 0 4px #fff; }
.opt-row input[type=text] {
  flex:1; min-width:0; border:1.5px solid var(--line-2); border-radius:9px;
  padding:7px 10px; font-size:13px; outline:none; background:var(--card);
}
.opt-row input[type=text]:focus { border-color:var(--c-canvas); }
.opt-del { flex:none; width:24px; height:24px; border-radius:7px; color:var(--ink-3); display:flex; align-items:center; justify-content:center; }
.opt-del:hover { background:var(--red-soft); color:var(--red); }

.insp-ai { margin-top:auto; border-top:1.5px dashed var(--line); padding-top:13px; display:flex; flex-direction:column; gap:9px; }
.insp-ai .ia-cap { display:flex; align-items:center; gap:6px; font-size:12.5px; font-weight:800; color:var(--c-canvas); }
.insp-ai .ia-cap svg { color:var(--c-canvas); }
.insp-ai .ia-cap span { font-size:11px; font-weight:600; color:var(--ink-3); margin-left:auto; max-width:55%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ia-row { display:flex; gap:7px; }
.ia-row input {
  flex:1; min-width:0; border:1.5px solid var(--line-2); border-radius:11px;
  padding:9px 12px; font-size:13px; outline:none; background:var(--bg);
}
.ia-row input:focus { border-color:var(--c-canvas); background:#fff; }

.cv-float { position:absolute; left:18px; bottom:18px; width:min(380px, 72%); z-index:30; box-shadow:var(--shadow-pop); }
.dc-head { display:flex; align-items:center; gap:7px; font-size:13.5px; font-weight:800; margin-bottom:9px; }
.dc-head svg { color:var(--accent); }
.dc-head .dc-scope { margin-left:auto; font-size:10.5px; font-weight:600; color:var(--ink-3); max-width:46%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.diff-row > span:first-child { font-weight:700; }

.toast .t-undo { margin-left:6px; font-size:13px; font-weight:800; color:#ffd27d; text-decoration:underline; flex:none; }

.cv-empty { padding:46px 40px; max-width:560px; margin:40px auto; text-align:left; }
.cv-empty h2 { font-size:24px; font-weight:900; margin:10px 0 8px; }
.cv-empty p { font-size:14px; color:var(--ink-2); line-height:1.6; margin:0 0 18px; }

/* — 04 素材 — */
.brief-box {
  display:flex; gap:9px; align-items:flex-start; margin-bottom:16px;
  background:linear-gradient(180deg, var(--accent-soft), #fff 92%);
  border:1.5px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius:14px; padding:13px 15px; font-size:13px; line-height:1.6; color:var(--ink);
  white-space:pre-wrap; animation:fadeUp .18s ease;
}
.brief-box svg { color:var(--accent); flex:none; margin-top:3px; }
.brief-box.small { margin:0 0 14px; font-size:12px; color:var(--ink-2); }
.cover-symbol { font-size:58px; line-height:1; }
.sfx-select { width:100%; cursor:pointer; }
.sfx-cur { margin-top:10px; font-size:12.5px; color:var(--ink-2); }
.layer-empty { font-size:12.5px; color:var(--ink-3); line-height:1.5; padding:10px 4px; }
