/* Utopia 网页版样式。延续占位页的纸感变量（--paper/--ink/--accent）与 TopWriter 网页版的
   Swiss/mono 克制：衬线标题 + 无衬线正文、留白大于行距、主题色细线分层。
   互动界面与成书阅读页视觉同源——都是「一份正在生长的手稿」，不是聊天软件（IA §3.8）。 */

:root {
  --paper: #f9f7f6;
  --ink: #1f1e1e;
  --card: #ffffff;
  --line: #e7e3df;
  --accent: #243084;
  --accent-hover: #1a2358;
  --on-accent: #f9f7f6;
  --muted: #6b6660;
  --danger: #b42318;
  --ok: #3f6f4f;
  --ring: rgba(36, 48, 132, .25);
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Songti SC", "Noto Serif SC", Georgia, serif;
  --mono: ui-monospace, Menlo, "SF Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ring); }

button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--accent); }

/* ── 基础控件 ─────────────────────────────── */
input, textarea {
  font: inherit; width: 100%;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
textarea { resize: none; line-height: 1.6; }

.primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 18px;
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 6px; font-weight: 500;
  text-decoration: none;
  transition: background .15s;
}
.primary:hover { background: var(--accent-hover); }
.primary:disabled { background: var(--muted); opacity: .6; cursor: not-allowed; }

.link {
  background: none; border: 0; padding: 4px 0;
  color: var(--muted); font-size: 13px;
  text-decoration: underline; text-underline-offset: 4px;
}
.link:hover:not(:disabled) { color: var(--ink); }
.link:disabled { opacity: .45; cursor: default; text-decoration: none; }
.link.quiet { flex: none; }

.bar-btn {
  background: none; border: 0; padding: 4px 6px;
  font-size: 13px; color: var(--muted); position: relative;
  border-radius: 4px; text-decoration: none;
}
.bar-btn:hover { color: var(--ink); }
.icon-btn {
  background: none; border: 0; padding: 6px 8px;
  font-size: 16px; color: var(--muted); text-decoration: none;
  border-radius: 6px; line-height: 1;
}
.icon-btn:hover { background: var(--paper); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.err { color: var(--danger); font-size: 13px; margin: 4px 0; }
.err:empty { display: none; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0; }
.loading { color: var(--muted); font-size: 14px; }
.noscript { padding: 40px; text-align: center; }

/* 状态徽标 */
.badge {
  display: inline-block; padding: 1px 9px;
  font: 11px/1.8 var(--mono); letter-spacing: .04em;
  border-radius: 999px; white-space: nowrap;
}
.st-genre { background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.st-wait  { background: #f3ecdd; color: #8a5a12; }
.st-live  { background: #e8eef8; color: var(--accent); }
.st-done  { background: #e8f0ea; color: var(--ok); }
.st-err   { background: #f6e8e6; color: var(--danger); }
.st-off   { background: var(--paper); border: 1px solid var(--line); color: var(--muted); }

/* ── 页面骨架 ─────────────────────────────── */
.page-shell { max-width: 720px; margin: 0 auto; padding: 40px 20px 64px; }
.page-shell.narrow { max-width: 520px; }
.page-loading { padding: 18vh 20px; text-align: center; }
.shell-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.shell-head h1 { font: 700 22px/1.3 var(--serif); margin: 0; margin-right: auto; }
.page-card {
  max-width: 420px; margin: 12vh auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 28px 26px;
}
.page-card h1 { font: 700 20px/1.3 var(--serif); margin: 0 0 8px; }

/* 演示数据角标 */
.mock-badge {
  position: fixed; top: 60px; right: 12px; z-index: 90; /* 顶栏之下，不盖顶栏动作 */
  display: flex; align-items: center; gap: 8px;
  background: #f3ecdd; border: 1px dashed #c9a25e;
  border-radius: 999px; padding: 3px 12px;
  font: 12px var(--mono); color: #8a5a12;
  opacity: .92;
}
.mock-badge button { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; }

/* ── 登录 ─────────────────────────────────── */
.auth { max-width: 380px; margin: 12vh auto; padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.auth h1 { font: italic 700 34px/1.2 var(--serif); margin: 0; letter-spacing: .02em; }
.auth .sub { font: 11px/1.6 var(--mono); letter-spacing: .08em; color: var(--muted); margin: 0; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 12.5px; color: var(--muted); }
.auth .link { align-self: flex-start; text-align: left; }

/* ── 书架 ─────────────────────────────────── */
.story-list { display: flex; flex-direction: column; gap: 10px; }
.story-card {
  display: flex; align-items: stretch; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
.story-main {
  flex: 1; min-width: 0; text-align: left;
  display: flex; flex-direction: column; gap: 3px;
  background: none; border: 0; padding: 14px 16px;
}
.story-card:hover { border-color: var(--muted); }
.story-card .link { align-self: center; margin-right: 12px; }
.story-title { font: 600 15px/1.5 var(--sans); display: flex; align-items: center; gap: 8px; }
.story-badges { display: flex; gap: 6px; }
.story-meta { font: 12px/1.6 var(--mono); color: var(--muted); }
.story-time { font: 11px/1.6 var(--mono); color: var(--muted); opacity: .8; }
.empty-shelf {
  text-align: center; padding: 60px 20px;
  border: 1px dashed var(--line); border-radius: 12px;
}
.empty-shelf p { color: var(--muted); margin: 0 0 16px; }
.shelf-newline { margin: 18px 0 0; text-align: right; }
/* 已归档分区（找回入口）：折叠开关 + 归档卡淡一格 */
.archived-block { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 10px; }
.archived-block > .link { text-decoration: none; }
.archived-block .story-card { opacity: .78; }
.archived-block .story-card:hover { opacity: 1; }
.archived-block .empty-hint { color: var(--muted); font-size: 13px; margin: 10px 4px; }

/* ── 新建向导 ─────────────────────────────── */
.steps {
  display: flex; gap: 20px; list-style: none;
  padding: 0; margin: 0 0 22px;
  font: 12px var(--mono); color: var(--muted);
}
.steps li { display: flex; align-items: center; gap: 6px; }
.steps .step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--line); font-size: 11px;
}
.steps li.on { color: var(--ink); }
.steps li.on .step-no { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.steps li.done .step-no { border-color: var(--ok); color: var(--ok); }
.wizard-sub { margin: 0 0 14px; }
.tpl-list, .role-list { display: flex; flex-direction: column; gap: 10px; }
.tpl-card, .role-card {
  text-align: left; display: flex; flex-direction: column; gap: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px;
}
.tpl-card:hover, .role-card:hover { border-color: var(--muted); }
.role-card.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.role-detail {
  margin-top: 14px; padding: 12px 16px;
  background: var(--paper); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
}
.role-detail h3 { margin: 0 0 4px; font: 600 14px/1.6 var(--sans); }
.preference-box { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.wizard-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.wizard-actions .primary { margin-left: auto; }
.confirm-generating { padding: 40px 0; text-align: center; }
.confirm-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 24px;
}
.confirm-card h2 { font: 700 19px/1.4 var(--serif); margin: 0 0 14px; }
.confirm-card section { margin-bottom: 16px; }
.confirm-card p { margin: 4px 0; }
.act-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.act-list li { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; border-left: 2px solid var(--line); }
.act-list li.on { border-left-color: var(--accent); }
.act-list strong { font-size: 13.5px; }
.side-h {
  font: 500 11px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 6px;
}

/* ── 互动主界面布局（IA §3.7） ─────────────── */
.play { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.topbar { flex: none; border-bottom: 1px solid var(--line); background: var(--card); }
.topbar-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 16px;
}
.topbar-back { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.topbar-back:hover { color: var(--ink); }
.topbar-title {
  flex: 1; min-width: 0; margin: 0;
  font: 600 15px/1.3 var(--serif);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-act { font: 11px/1.6 var(--mono); color: var(--muted); margin-left: 10px; font-weight: 400; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.bar-btn .dot {
  position: absolute; top: 2px; right: 0;
  width: 6px; height: 6px; border-radius: 50%; background: var(--danger);
}
.play-main { flex: 1; min-height: 0; display: flex; }
.stream-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stream { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
/* 阅读栏：68ch 左右的书页宽度，行高 2.0，像读小说而不是聊天 */
.stream-inner { max-width: 42em; margin: 0 auto; padding: 30px 24px 18px; }
.history-more { text-align: center; font: 11px var(--mono); color: var(--muted); margin: 0 0 18px; }

/* 回合流：叙事块（IA §3.2） */
/* 连续叙事：相邻回合只留段落间距，不再像一条条消息卡片 */
.turn + .turn { margin-top: 4px; }
.turn-auto { opacity: 0.98; }
.act-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 30px 0 18px;
  font: 600 13px/1.4 var(--serif); color: var(--muted);
}
.act-divider::before, .act-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* 玩家输入（默认隐藏，设置里可开）：极淡斜体小注，是正文的一部分，不是对话 */
.turn-action {
  margin: 0 0 12px; padding: 0;
  font: 12px/1.8 var(--serif); font-style: italic; color: var(--muted);
}
.prose p { margin: 0 0 14px; line-height: 2.0; font-size: 16px; }
.prose p:last-child { margin-bottom: 0; }
/* 钩子是叙事的一部分：淡色斜体，前面不加符号 */
.turn-hook { margin: 6px 0 0; font-size: 13.5px; line-height: 1.85; font-style: italic; color: var(--muted); }
.footnote { margin-top: 8px; }
.footnote-toggle {
  background: none; border: 0; padding: 2px 0;
  font: 12px var(--mono); color: var(--muted);
}
.footnote-toggle:hover { color: var(--ink); }
.footnote-body {
  margin: 6px 0 0; padding: 8px 14px;
  background: var(--paper); border-radius: 8px;
  list-style: none; display: flex; flex-direction: column; gap: 3px;
}
.footnote-body li { font-size: 12.5px; color: var(--muted); }
.turn-pending { opacity: .6; }
.thinking { color: var(--muted); font-size: 13px; }
.thinking::after { content: "…"; animation: thinking 1.4s steps(4) infinite; }
@keyframes thinking { 0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75% { content: "···"; } }
.turn-failed {
  display: block; width: 100%; text-align: left;
  background: none; border: 1px dashed var(--danger); border-radius: 8px;
  padding: 8px 14px; color: var(--danger); font-size: 13.5px;
}
.turn-failed .hint { display: block; color: var(--muted); }

/* 冻结三选一卡片：连续平凡回合后锁定输入，处理完恢复 */
.freeze-card {
  flex: none; max-width: 720px; margin: 0 auto; width: 100%;
  border: 1px solid var(--danger); border-radius: 10px;
  background: var(--card); padding: 14px 16px;
}
.freeze-title { margin: 0 0 4px; font-weight: 600; color: var(--danger); font-size: 14px; }
.freeze-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }

/* 输入区（IA §3.3）：吸主列底部 */
.composer { flex: none; border-top: 1px solid var(--line); background: var(--card); padding: 8px 16px; }
.composer-inner { max-width: 720px; margin: 0 auto; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: thin; }
.chip {
  flex: none; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 14px; font-size: 13px; color: var(--ink);
}
.chip:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.chip:disabled { opacity: .5; cursor: default; }
.composer-row { display: flex; align-items: flex-end; gap: 10px; }
.composer-row textarea { flex: 1; min-height: 38px; max-height: 140px; }
.composer-side { display: flex; align-items: center; gap: 10px; padding-bottom: 2px; }
.char-count { font: 11px var(--mono); color: var(--muted); }
.char-count.over { color: var(--danger); }
.composer .err { margin: 4px 0 0; }

/* 状态面板：桌面常驻（IA §3.4） */
.panel { flex: none; width: 320px; border-left: 1px solid var(--line); background: var(--card); overflow-y: auto; }
.panel-inner { padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 14px; }
.panel-headline { margin: 0; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.panel-summary p { margin: 4px 0; }
.panel-proto { font-size: 14px; }
.panel-full section { margin-bottom: 16px; }
.panel-full p { margin: 3px 0; }
.stat-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.stat-list li { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.stat-list li span:last-child { color: var(--ink); }
.npc-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13.5px; }
.npc-name { font-weight: 600; }
.event-card {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--paper); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 8px 12px; margin: 6px 0;
}
.event-name { font-size: 13.5px; font-weight: 600; }
.event-done { font-size: 13px; color: var(--ok); margin: 4px 0; }
.foreshadow-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.foreshadow-list li { font-size: 13px; }
.panel-note { font-size: 11.5px; opacity: .85; }

/* 框架/成书弹层内容 */
.framework-view section, .drawer-body section { margin-bottom: 16px; }
.framework-view p, .drawer-body p { margin: 4px 0; }
/* markdown 全文的纯文本轻排版（DocText）与 NPC 一句话名单 */
.doc-text p { margin: 4px 0; line-height: 1.7; font-size: 13.5px; }
.npc-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.npc-list li { font-size: 13.5px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.book-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.book-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: none; border: 0; border-radius: 8px; padding: 9px 10px;
  text-align: left; font-size: 14px;
}
.book-row:hover { background: var(--paper); }
.book-empty { padding: 12px 0; }

/* ── 抽屉/半屏层 ──────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(31, 30, 30, .32);
}
.drawer {
  position: fixed; z-index: 61;
  background: var(--card); border-left: 1px solid var(--line);
  right: 0; top: 0; bottom: 0; width: min(420px, 92vw);
  display: flex; flex-direction: column;
  animation: drawer-in .18s ease-out;
}
@keyframes drawer-in { from { transform: translateX(24px); opacity: 0; } }
.drawer-head {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font: 700 16px/1.3 var(--serif); margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 24px; }
@media (max-width: 767px) {
  .drawer {
    border-left: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
    left: 0; right: 0; top: auto; height: min(62dvh, 520px); width: auto;
    padding-bottom: env(safe-area-inset-bottom);
    animation: sheet-in .18s ease-out;
  }
  @keyframes sheet-in { from { transform: translateY(32px); opacity: 0; } }
}

/* ── 阅读页 ───────────────────────────────── */
.read { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.read-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px 1fr; }
.read-side {
  border-right: 1px solid var(--line); background: var(--card);
  padding: 16px 12px; overflow-y: auto;
}
.chapter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.chapter-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  background: none; border: 0; border-radius: 6px; padding: 7px 9px;
  text-align: left; font-size: 13px; color: var(--muted);
}
.chapter-row:hover { background: var(--paper); color: var(--ink); }
.chapter-row.on { background: var(--paper); color: var(--ink); font-weight: 500; }
.chapter-row.drafting { opacity: .55; }
.chapter-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-note { padding: 12px 9px 0; }
.read-body { overflow-y: auto; }
.chapter-text { max-width: 680px; margin: 0 auto; padding: 40px 24px 80px; }
.chapter-text p { margin: 0 0 15px; line-height: 2.0; font-size: 15.5px; }
.empty-read { text-align: center; padding: 16vh 24px; }
.empty-read p { margin: 0 0 8px; }
.empty-read .primary { margin-top: 14px; }

/* ── 设置页 ───────────────────────────────── */
.settings-section { margin-bottom: 30px; display: flex; flex-direction: column; gap: 10px; }
.settings-actions { display: flex; align-items: center; gap: 14px; }

/* ── 响应式（IA §3.7 两档半） ─────────────── */
@media (min-width: 1024px) {
  /* 桌面：状态面板常驻；顶栏动作收窄 */
  .page-shell { padding-top: 48px; }
}
@media (max-width: 1023px) {
  .panel { display: none; } /* 状态改走顶栏按钮 + 抽屉 */
}
@media (max-width: 767px) {
  .page-shell { padding: 24px 16px 48px; }
  .auth { margin-top: 8vh; }
  .topbar-inner { height: 48px; padding: 0 10px; gap: 6px; }
  .topbar-act { display: none; }
  .stream-inner { padding: 18px 16px 12px; }
  .composer { padding: 6px 12px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .composer-row textarea { font-size: 16px; } /* iOS 聚焦不整页放大 */
  .read-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .read-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 200px; padding: 10px 12px; }
  .side-note { display: none; }
  .chapter-list { flex-direction: row; overflow-x: auto; gap: 6px; }
  .chapter-row { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
}
/* 触屏：主按钮与输入放大到 44px（与 TopWriter web 同纪律） */
@media (hover: none) and (pointer: coarse) {
  input, textarea { font-size: 16px; min-height: 44px; }
  .primary { min-height: 44px; }
  .chip { min-height: 36px; }
}

/* ── 角色头像小点与对话行 ─────────────────────────
   身份印记而非插图：15px 去饱和圆点按名字稳定取色，悬停 title 出全名。
   对话行 = 台词文字 + 行尾小点；缩进挂在叙事流左缘，不与 narration 抢行。 */
.avatar-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  line-height: 1;
  vertical-align: -2px;
  flex: none;
  user-select: none;
}
.present-item { margin-right: 10px; white-space: nowrap; }
.present-item .avatar-dot { margin-right: 4px; }
/* NPC 台词不再用引用块：名字 + 动作 + 「台词」成一段，读起来是小说 */
.npc-line {
  display: block;
  margin: 0 0 14px;
  line-height: 2.0;
  font-size: 16px;
}
.npc-line .avatar-dot { margin-right: 6px; vertical-align: -2px; }
.npc-line-name { font-weight: 600; margin-right: 2px; }
.npc-line-say { color: var(--ink); }


/* 侧栏「怎么继续」提示条：钩子是玩家的下一步抓手 */
.panel-next {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-soft, rgba(0, 0, 0, 0.02));
}
.panel-next-title {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted, #888);
}
.panel-next .panel-hook-quote { color: var(--ink, inherit); }
.panel-next .hint { margin: 2px 0; }
/* 完整态收起入口：顶部与底部各一个（长列表滚到底也能收回） */
.panel-collapse { display: block; margin: 0 0 8px; }
.panel-full .panel-collapse:last-child { margin: 12px 0 0; }

/* 文风样本编辑器（框架抽屉）：亲笔范文是去 AI 味最有效的手段 */
.voice-sample { margin-top: 18px; }
.voice-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  line-height: 1.7;
  resize: vertical;
  background: transparent;
  color: inherit;
}
.voice-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

/* 选题材大类筛选：题材变多后先筛大类再看卡片 */
.tpl-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tpl-filters .chip.on { border-color: var(--accent); color: var(--accent); background: transparent; }
.tpl-card .badge.st-genre { margin-left: 8px; vertical-align: 1px; }

/* 「接着往下看」：世界自行推进一拍（无决策点时的续演入口） */
.continue-row { margin: 0 0 8px; }
.continue-chip { color: var(--accent); border-style: dashed; }

/* 设置页勾选项 */
.check-row { display: flex; gap: 10px; align-items: flex-start; line-height: 1.7; font-size: 14px; }
.check-row input { margin-top: 4px; }
