/* VOX ATLAS 原型样式 —— 艺术出版物 × 文学档案 */
:root {
  --paper: #F1EEE6;
  --paper-2: #E9E5DA;
  --card: #F7F5EF;
  --ink: #20231F;
  --sub: #535A50;
  --moss: #657D57;
  --rust: #C36A43;
  --rule: #D4D3C8;
  --night: #1E2520;
  --night-ink: #ECE7DA;

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --display: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 var(--serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* 纸张颗粒 */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .13 0 0 0 0 .14 0 0 0 0 .12 0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
#app { position: relative; z-index: 1; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(195, 106, 67, .25); }

.mono { font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
.muted { color: var(--sub); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  height: 64px; padding: 0 var(--gutter);
  background: rgba(241, 238, 230, .86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.brand { font-family: var(--mono); letter-spacing: .32em; font-size: 13px; text-decoration: none; white-space: nowrap; }
.brand small { display: block; letter-spacing: .12em; font-size: 9px; color: var(--sub); margin-top: 2px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--sub); position: relative; padding: 6px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--rust); transition: right .4s var(--ease); }
.nav-links a:hover, .nav-links a.on { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.on::after { right: 0; }
@media (max-width: 640px) {
  .nav { gap: 12px; height: 56px; }
  .nav-links { gap: 16px; font-size: 13px; }
  .brand small { display: none; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1px solid var(--ink); border-radius: 2px;
  background: transparent; cursor: pointer; text-decoration: none; font-size: 15px; letter-spacing: .04em;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn .arr { transition: transform .4s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #343932; }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 13px; }
.btn.light { border-color: var(--night-ink); color: var(--night-ink); }
.btn.light.primary { background: var(--night-ink); color: var(--night); }
.btn:focus-visible, a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rust); outline-offset: 3px;
}
.btn[disabled] { opacity: .4; pointer-events: none; }

/* ---------- 进入动效 ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--rd, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: calc(100svh - 64px);
  display: grid; grid-template-columns: 7fr 5fr; gap: 0 32px;
  padding: clamp(24px, 4vw, 56px) var(--gutter) 0; max-width: var(--max); margin: 0 auto;
}
.hero-left { display: flex; flex-direction: column; justify-content: center; padding-bottom: 96px; position: relative; z-index: 2; }
.hero-over { display: flex; gap: 16px; align-items: center; color: var(--sub); }
.hero-over::after { content: ""; flex: 0 0 72px; height: 1px; background: var(--rule); }
.hero-title {
  font-family: var(--display); font-weight: 300; margin: 18px 0 0;
  font-size: clamp(76px, 12.5vw, 210px); line-height: .8; letter-spacing: -.02em;
}
.hero-title .row { display: block; overflow: hidden; padding-bottom: .04em; white-space: nowrap; }
@media (max-width: 960px) { .hero-title { font-size: clamp(72px, 24vw, 180px); } }
.hero-title .ch { display: inline-block; transform: translateY(105%); animation: hero-in 1.3s var(--ease) forwards; animation-delay: calc(120ms + var(--i) * 70ms); }
.hero-title .row:nth-child(2) { padding-left: .55em; }
.hero-title em { font-style: italic; color: var(--rust); }
@keyframes hero-in { to { transform: none; } }
.hero-sub {
  font-size: clamp(24px, 2.9vw, 42px); line-height: 1.45; font-weight: 400; margin: clamp(24px, 3vw, 40px) 0 0; letter-spacing: .04em;
}
.hero-sub span { display: block; opacity: 0; transform: translateY(14px); animation: fade-up 1s var(--ease) forwards; }
.hero-sub span:nth-child(1) { animation-delay: .7s; }
.hero-sub span:nth-child(2) { animation-delay: .85s; }
.hero-lede { color: var(--sub); max-width: 34em; margin: 20px 0 32px; opacity: 0; animation: fade-up 1s var(--ease) 1s forwards; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; opacity: 0; animation: fade-up 1s var(--ease) 1.1s forwards; }
.hero-note { margin-top: 18px; color: var(--sub); font-size: 13px; opacity: 0; animation: fade-up 1s var(--ease) 1.2s forwards; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-right { position: relative; display: flex; flex-direction: column; justify-content: center; padding-bottom: 96px; }
.hero-orbit { position: relative; aspect-ratio: 1; width: 100%; max-width: 620px; margin-left: auto; }
.hero-orbit svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hero-vert {
  position: absolute; right: -8px; top: 4%; writing-mode: vertical-rl; letter-spacing: .5em;
  font-size: 14px; color: var(--sub); opacity: 0; animation: fade-up 1.2s var(--ease) 1.4s forwards;
}
.hero-quote { min-height: 112px; margin-top: 12px; position: relative; }
.hero-quote blockquote { margin: 0; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.6; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.hero-quote blockquote.out { opacity: 0; transform: translateY(-8px); }
.hero-quote cite { display: block; margin-top: 8px; font-style: normal; color: var(--sub); }
.hero-stats { display: flex; gap: 32px; margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 14px; }
.hero-stats b { font-family: var(--display); font-weight: 400; font-size: 34px; display: block; line-height: 1; }

.ticker {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px; overflow: hidden;
  border-top: 1px solid var(--rule); display: flex; align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; gap: 56px; white-space: nowrap; animation: tick 90s linear infinite; padding-left: 56px; }
.ticker-track span { color: var(--sub); font-size: 15px; }
.ticker-track span b { color: var(--ink); font-weight: 500; margin-right: 10px; }
@keyframes tick { to { transform: translateX(-50%); } }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-bottom: 72px; }
  .hero-left { padding-bottom: 8px; }
  .hero-right { padding-bottom: 32px; }
  .hero-orbit { max-width: 520px; margin: 8px auto 0; }
  .hero-vert { display: none; }
}

/* ---------- 章节通用 ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section-head { display: grid; grid-template-columns: 5fr 7fr; gap: 32px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-no { font-family: var(--display); font-style: italic; font-size: clamp(56px, 7vw, 104px); line-height: .9; color: var(--rust); font-weight: 300; }
.section-title { font-size: clamp(30px, 3.6vw, 54px); line-height: 1.25; font-weight: 400; margin: 12px 0 0; letter-spacing: .02em; }
.section-lede { color: var(--sub); max-width: 38em; margin: 0; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- 示例展览 ---------- */
.book {
  display: grid; grid-template-columns: 280px 1fr; gap: clamp(24px, 4vw, 56px); align-items: start;
}
.book-card { border-top: 1px solid var(--ink); padding-top: 18px; position: sticky; top: 88px; }
.book-card h3 { font-size: 34px; margin: 6px 0 2px; font-weight: 500; letter-spacing: .06em; }
.book-meta { color: var(--sub); font-size: 14px; }
.voices { list-style: none; margin: 22px 0 0; padding: 0; max-height: 52vh; overflow: auto; scrollbar-width: thin; }
.voices li button {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
  padding: 10px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; cursor: pointer; text-align: left;
}
.voices .bar { grid-column: 1 / -1; height: 2px; background: var(--rule); position: relative; overflow: hidden; }
.voices .bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--moss); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); }
.voices.in .bar i { transform: scaleX(1); }
.voices li button.on .bar i { background: var(--rust); }
.voices li button.on .nm { color: var(--rust); }
.voices .nm { font-size: 16px; }
.voices .ct { font-family: var(--mono); font-size: 12px; color: var(--sub); }

.stage-wrap { min-width: 0; }
.tpl-tabs { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--ink); width: fit-content; max-width: 100%; }
.tpl-tabs button {
  border: 0; background: none; padding: 10px 14px; cursor: pointer; font-size: 13px; white-space: nowrap;
  border-right: 1px solid var(--rule); transition: background .25s, color .25s;
}
.tpl-tabs button:last-child { border-right: 0; }
.tpl-tabs button small { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--sub); margin-right: 6px; }
.tpl-tabs button.on { background: var(--ink); color: var(--paper); }
.tpl-tabs button.on small { color: #A9AFA3; }
.stage {
  position: relative; margin-top: 16px; background: var(--card); border: 1px solid var(--rule);
  aspect-ratio: 4 / 5; max-height: 82vh; width: 100%; overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(32, 35, 31, .35);
}
.stage svg { width: 100%; height: 100%; display: block; }
.stage-cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.stage-cap p { margin: 0; color: var(--sub); font-size: 14px; max-width: 36em; }
.stage-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.icon-btn { width: 40px; height: 40px; border: 1px solid var(--rule); background: var(--paper); border-radius: 50%; cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { border-color: var(--ink); }
.stage .replay { position: absolute; right: 12px; top: 12px; z-index: 2; }

@media (max-width: 860px) {
  .book { grid-template-columns: 1fr; }
  .book-card { position: static; }
  .voices { display: flex; gap: 8px; overflow-x: auto; max-height: none; padding-bottom: 6px; scrollbar-width: none; }
  .voices::-webkit-scrollbar { display: none; }
  .voices li { flex: 0 0 auto; }
  .voices li button { grid-template-columns: auto auto; border: 1px solid var(--rule); padding: 6px 12px; border-radius: 999px; }
  .voices .bar { display: none; }
  .voices li button.on { border-color: var(--rust); }
  .tpl-tabs { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .tpl-tabs button { border-bottom: 1px solid var(--rule); padding: 10px 6px; font-size: 12px; }
  .tpl-tabs button:nth-child(3n) { border-right: 0; }
  .tpl-tabs button small { display: block; margin: 0 0 2px; }
  .stage { aspect-ratio: 3 / 4; }
}

/* ---------- 流程 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.step { padding: 28px 28px 8px 0; border-right: 1px solid var(--rule); }
.step + .step { padding-left: 28px; }
.step:last-child { border-right: 0; }
.step .n { font-family: var(--display); font-style: italic; font-size: 64px; line-height: 1; color: var(--moss); font-weight: 300; }
.step h4 { font-size: 22px; font-weight: 500; margin: 16px 0 8px; }
.step p { margin: 0; color: var(--sub); font-size: 15px; }
.step .tag { margin-top: 14px; display: inline-block; color: var(--rust); }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(3) { padding-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 24px 0 8px; border-right: 0; border-top: 1px solid var(--rule); }
  .step:first-child { border-top: 0; }
}

/* ---------- 模板索引 ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tpl-card { text-decoration: none; display: block; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; }
.tpl-card .thumb { aspect-ratio: 3 / 4; background: var(--card); border: 1px solid var(--rule); overflow: hidden; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.tpl-card:hover .thumb { transform: translateY(-6px); box-shadow: 0 24px 40px -28px rgba(32, 35, 31, .45); }
.tpl-card .thumb svg { width: 100%; height: 100%; display: block; }
.tpl-card .lbl { margin-top: 10px; font-size: 15px; }
.tpl-card .lbl small { display: block; color: var(--sub); }
.tpl-modes { display: flex; justify-content: space-between; margin-bottom: 14px; color: var(--sub); }
@media (max-width: 1100px) { .tpl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* ---------- 结尾 CTA / 页脚 ---------- */
.finale { background: var(--night); color: var(--night-ink); overflow: hidden; }
.finale .section-title { font-size: clamp(34px, 5vw, 76px); max-width: 14em; }
.finale .muted { color: #A3AA9B; }
.finale-lines { position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.finale-lines svg { width: 100%; height: 100%; }
.footer { padding: 40px 0 56px; color: var(--sub); font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- 应用页面通用 ---------- */
.page { max-width: var(--max); margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--gutter) 96px; min-height: calc(100svh - 64px); }
.crumbs { display: flex; gap: 10px; align-items: center; color: var(--sub); font-size: 14px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs .cur { color: var(--ink); }
.page-title { font-size: clamp(30px, 4vw, 56px); font-weight: 400; margin: 18px 0 8px; line-height: 1.2; }
.progress { display: flex; gap: 0; margin: 24px 0 36px; border-top: 1px solid var(--rule); }
.progress span { flex: 1; padding-top: 10px; color: var(--sub); font-size: 13px; position: relative; }
.progress span::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: transparent; }
.progress span.done::before { background: var(--moss); }
.progress span.on { color: var(--ink); }
.progress span.on::before { background: var(--rust); }
.progress b { font-family: var(--mono); font-weight: 400; margin-right: 6px; }
@media (max-width: 560px) { .progress span em { display: none; } }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--rule); background: var(--card); border-radius: 2px; padding: 10px 12px; min-height: 44px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); outline: none; }
.textarea { min-height: 300px; resize: vertical; line-height: 1.7; font-family: var(--serif); }

.import-grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; }
.seg { display: inline-flex; border: 1px solid var(--ink); margin-bottom: 18px; }
.seg button { border: 0; background: none; padding: 10px 18px; cursor: pointer; min-height: 44px; }
.seg button.on { background: var(--ink); color: var(--paper); }
.drop {
  border: 1px dashed var(--sub); min-height: 300px; display: grid; place-items: center; text-align: center; padding: 32px;
  cursor: pointer; transition: background .3s, border-color .3s; background: var(--card);
}
.drop.over { background: #EAE6DA; border-color: var(--rust); }
.drop .big { font-size: 26px; display: block; margin-bottom: 6px; }
.aside-note { border-top: 1px solid var(--ink); padding-top: 16px; color: var(--sub); font-size: 14px; }
.aside-note h4 { color: var(--ink); font-weight: 500; font-size: 16px; margin: 0 0 8px; }
.aside-note ul { padding-left: 18px; margin: 8px 0 0; }
.status-line { margin-top: 14px; min-height: 24px; color: var(--sub); font-size: 14px; }
.status-line.err { color: var(--rust); }
@media (max-width: 900px) { .import-grid { grid-template-columns: 1fr; gap: 24px; } }

/* 编辑 */
.edit-bar {
  position: sticky; top: 64px; z-index: 20; background: rgba(241, 238, 230, .94); backdrop-filter: blur(8px);
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--rule); margin-bottom: 24px;
}
.edit-bar .stats { display: flex; gap: 22px; flex-wrap: wrap; margin-right: auto; font-size: 14px; color: var(--sub); }
.edit-bar .stats b { color: var(--ink); font-family: var(--display); font-size: 24px; font-weight: 400; margin-right: 4px; }
.edit-grid { display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: start; }
.cast-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 8px; }
.cast-head h3, .lines-head h3 { margin: 0; font-weight: 500; font-size: 20px; }
.cast-row { display: grid; grid-template-columns: 26px 1fr 72px 28px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.cast-row .alias { grid-column: 2 / -1; }
.cast-row .input, .cast-row .select { min-height: 36px; padding: 6px 8px; font-size: 14px; }
.cast-row .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.cast-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); }
.cast-row .x { border: 0; background: none; cursor: pointer; color: var(--sub); font-size: 18px; }
.lines-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 4px; }
.lines-head .filters { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.lines-head .select, .lines-head .input { min-height: 36px; padding: 6px 10px; width: auto; font-size: 14px; }
.line-item { display: grid; grid-template-columns: 1fr 150px; gap: 8px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.line-item .q { font-size: 16px; line-height: 1.65; }
.line-item .q.thought { color: var(--sub); font-style: italic; }
.line-item .meta { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--sub); }
.line-item .select { min-height: 36px; padding: 6px 8px; font-size: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 1px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; }
.pill.hi { color: var(--moss); } .pill.mid { color: #9A7A2C; } .pill.lo { color: var(--rust); } .pill.none { color: var(--sub); } .pill.man { color: var(--ink); }
.ctx-btn { border: 0; background: none; cursor: pointer; color: var(--rust); text-decoration: underline; text-underline-offset: 3px; font-size: 12px; padding: 0; }
.ctx { grid-column: 1 / -1; background: var(--card); border-left: 2px solid var(--rule); padding: 10px 14px; font-size: 14px; color: var(--sub); }
.ctx mark { background: rgba(195, 106, 67, .18); color: var(--ink); }
.more { width: 100%; margin-top: 16px; }
@media (max-width: 960px) {
  .edit-grid { grid-template-columns: 1fr; }
  .edit-bar { position: static; }
  .line-item { grid-template-columns: 1fr; }
}

/* ---------- 动效页面（沉浸式） ---------- */
.viewer { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: calc(100svh - 64px); }
.viewer > *, .book > *, .studio > *, .edit-grid > *, .import-grid > * { min-width: 0; }
.viewer-side { border-right: 1px solid var(--rule); padding: 28px var(--gutter) 28px; display: flex; flex-direction: column; gap: 22px; }
.viewer-side h2 { font-size: 26px; font-weight: 500; margin: 6px 0 0; }
.viewer-side .voices { max-height: 34vh; margin-top: 4px; }
.viewer-main { position: relative; display: flex; flex-direction: column; padding: 24px var(--gutter) 24px; min-width: 0; }
.viewer-stage { flex: 1; min-height: 60vh; position: relative; background: var(--card); border: 1px solid var(--rule); overflow: hidden; }
.viewer-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.viewer-desc { margin: 12px 0 0; color: var(--sub); font-size: 14px; }
.tpl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tpl-list button { border: 1px solid var(--rule); background: none; padding: 8px 10px; text-align: left; cursor: pointer; font-size: 13px; min-height: 44px; }
.tpl-list button small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--sub); }
.tpl-list button.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.tpl-list button.on small { color: #A9AFA3; }
@media (max-width: 960px) {
  .viewer { grid-template-columns: 1fr; }
  .viewer-side { border-right: 0; border-bottom: 1px solid var(--rule); padding: 18px var(--gutter); gap: 14px; order: 2; }
  .viewer-main { order: 1; padding-top: 16px; }
  .viewer-stage { min-height: 0; aspect-ratio: 3 / 4; flex: none; }
  .viewer-side .voices { max-height: none; }
  .tpl-list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 海报工作台 ---------- */
.studio { display: grid; grid-template-columns: 320px 1fr; gap: 36px; align-items: start; }
.studio-panel { display: flex; flex-direction: column; gap: 4px; }
.studio-panel h3 { font-weight: 500; font-size: 15px; margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--rule); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--rule); background: none; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; min-height: 36px; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.swatch.on { outline: 2px solid var(--ink); outline-offset: 2px; }
.swatch i { position: absolute; inset: 50% 0 0 0; }
.poster-preview { background: #E2DED2; border: 1px solid var(--rule); padding: clamp(16px, 4vw, 48px); display: grid; place-items: center; min-height: 70vh; position: sticky; top: 88px; }
.poster-preview .sheet { box-shadow: 0 40px 70px -40px rgba(32, 35, 31, .55); max-width: 100%; }
.poster-preview .sheet svg { display: block; width: 100%; height: 100%; }
.export-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 960px) {
  .studio { grid-template-columns: 1fr; }
  .poster-preview { position: static; min-height: 0; order: -1; }

}

/* ---------- SVG 模板动效 ---------- */
.vox-svg text { font-kerning: normal; }
.vox-svg.is-anim .a-rise { animation: vx-rise 1s var(--ease) var(--d) both; }
.vox-svg.is-anim .a-fade { animation: vx-fade .9s var(--ease) var(--d) both; }
.vox-svg.is-anim .a-slide { animation: vx-slide 1.2s var(--ease) var(--d) both; }
.vox-svg.is-anim .a-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: vx-draw var(--dur, 1200ms) var(--ease) var(--d) forwards; }
.vox-svg.is-anim .a-pop { transform-box: fill-box; transform-origin: center; animation: vx-pop .7s cubic-bezier(.34, 1.56, .64, 1) var(--d) both; }
.vox-svg.is-anim .a-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: vx-grow 1.1s var(--ease) var(--d) both; }
.vox-svg.is-anim .a-wipe { transform-box: fill-box; transform-origin: 0 50%; animation: vx-wipe 1s var(--ease) var(--d) both; }
@keyframes vx-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: var(--o, 1); transform: none; } }
@keyframes vx-fade { from { opacity: 0; } to { opacity: var(--o, 1); } }
@keyframes vx-slide { from { opacity: 0; transform: translateX(-36px); } to { opacity: var(--o, 1); transform: none; } }
@keyframes vx-draw { to { stroke-dashoffset: 0; } }
@keyframes vx-pop { from { opacity: 0; transform: scale(0); } to { opacity: var(--o, 1); transform: scale(1); } }
@keyframes vx-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes vx-wipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.vox-svg.is-anim .amb-spin { animation: amb-spin 160s linear infinite; }
.vox-svg.is-anim .amb-drift { animation: amb-drift 9s ease-in-out 2.4s infinite alternate; }
.vox-svg.is-anim .amb-float { animation: amb-float 7s ease-in-out 3s infinite alternate; }
@keyframes amb-spin { to { transform: rotate(360deg); } }
@keyframes amb-drift { from { transform: translateX(0); } to { transform: translateX(14px); } }
@keyframes amb-float { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* 减少动态效果：取消位移、描线与缩放，直接显示最终状态 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .vox-svg.is-anim .amb-spin, .vox-svg.is-anim .amb-drift, .vox-svg.is-anim .amb-float, .ticker-track { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
