/* =========================================================
   《试为朱元璋》— 水墨古典视觉规范
   颜色：60 宣纸暖白 + 30 深褐 + 10 暗朱红
   ========================================================= */

:root {
  --ink-paper: #f5f0e8;
  --ink-paper-strong: #efe6d4;
  --ink-ink: #3a3225;
  --ink-ink-light: #5a4e3a;
  --ink-muted: #7a6e5c;
  --ink-gold: #a88a4a;
  --ink-zhu: #8b1a1a;
  --ink-zhu-bright: #c23b22;
  --ink-green: #3a7d1a;
  --ink-sand: #d9c8a0;
  --ink-shadow: rgba(58, 50, 37, 0.18);
  --ink-surface: rgba(245, 240, 232, 0.88);
  --ink-surface-strong: rgba(245, 240, 232, 0.95);
  --ink-border: rgba(58, 50, 37, 0.22);
  --ink-border-strong: rgba(58, 50, 37, 0.45);

  --font-title: "Ma Shan Zheng", "ZCOOL XiaoWei", "STKaiti", "楷体", serif;
  --font-body: "Noto Serif SC", "SimSun", "宋体", serif;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--ink-paper);
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background-image: url("https://raw.githubusercontent.com/AnselKocen/picture_for_cc/main/Gemini_Generated_Image_1gybue1gybue1gyb.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.ink-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(58,50,37,0.05) 0%, rgba(58,50,37,0) 50%),
    radial-gradient(ellipse at 80% 85%, rgba(139,26,26,0.06) 0%, rgba(58,50,37,0) 55%),
    linear-gradient(180deg, rgba(245,240,232,0.30) 0%, rgba(245,240,232,0.45) 100%);
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
}

/* =========================================================
   共用 — 卷轴容器
   ========================================================= */
.scroll {
  width: min(760px, 94vw);
  background: var(--ink-surface);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-lg);
  padding: 40px 56px 36px;
  box-shadow:
    0 2px 0 rgba(245,240,232,0.5) inset,
    0 18px 40px rgba(40,32,22,0.18),
    0 2px 8px rgba(40,32,22,0.08);
  position: relative;
  backdrop-filter: blur(4px) saturate(1.08);
  -webkit-backdrop-filter: blur(4px) saturate(1.08);
}
.scroll::before, .scroll::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 14px;
  background: linear-gradient(180deg, #d9c8a0 0%, #a88a4a 65%, #6b5228 100%);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.scroll::before { top: -7px; }
.scroll::after  { bottom: -7px; }

.scroll.tight { padding: 32px 44px 28px; }
.scroll.wide  { width: min(900px, 94vw); }

/* =========================================================
   标题页
   ========================================================= */
.title-screen { text-align: center; }
.title-screen .era-line {
  font-family: var(--font-title);
  color: var(--ink-muted);
  letter-spacing: 0.4em;
  font-size: 14px;
  margin-bottom: 12px;
}
.title-screen h1 {
  font-family: var(--font-title);
  color: var(--ink-ink);
  font-size: clamp(44px, 7vw, 68px);
  letter-spacing: 0.16em;
  margin: 0 0 14px;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(245,240,232,0.6), 0 2px 6px rgba(58,50,37,0.15);
}
.title-screen .zhu-seal {
  display: inline-block;
  color: var(--ink-paper);
  background: var(--ink-zhu);
  font-family: var(--font-title);
  padding: 6px 14px;
  margin: 8px 0 20px;
  letter-spacing: 0.22em;
  font-size: 15px;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(139,26,26,0.28), 0 0 0 1px rgba(245,240,232,0.25) inset;
}
.title-screen .subtitle {
  font-family: var(--font-title);
  color: var(--ink-ink-light);
  font-size: 18px;
  letter-spacing: 0.12em;
  margin: 6px 0 28px;
}
.title-screen .title-quote {
  font-family: var(--font-title);
  font-size: 22px;
  color: var(--ink-ink);
  line-height: 1.7;
  padding: 20px 24px;
  border-left: 3px solid var(--ink-zhu);
  border-right: 1px solid var(--ink-border);
  background: rgba(239,230,212,0.55);
  margin: 0 0 30px;
  text-align: left;
  position: relative;
}
.title-screen .title-quote::before {
  content: "「";
  position: absolute;
  top: 4px; left: 8px;
  font-size: 32px;
  color: var(--ink-zhu);
  opacity: 0.5;
}
.title-screen .actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.title-screen .footnote {
  margin-top: 26px;
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* =========================================================
   按钮
   ========================================================= */
.ink-btn {
  font-family: var(--font-title);
  font-size: 17px;
  letter-spacing: 0.18em;
  color: var(--ink-paper);
  background: var(--ink-zhu);
  padding: 12px 28px;
  border: 1px solid rgba(58,50,37,0.5);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 240ms ease, background 220ms ease;
  box-shadow: 0 2px 0 rgba(90,10,10,0.6), 0 8px 18px rgba(139,26,26,0.25);
  position: relative;
}
.ink-btn:hover {
  background: #a02020;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(90,10,10,0.65), 0 12px 26px rgba(139,26,26,0.32);
}
.ink-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(90,10,10,0.5), 0 4px 10px rgba(139,26,26,0.2);
}
.ink-btn.ghost {
  color: var(--ink-ink);
  background: transparent;
  border: 1px solid var(--ink-border-strong);
  box-shadow: none;
}
.ink-btn.ghost:hover {
  background: rgba(239,230,212,0.7);
  color: var(--ink-zhu);
  border-color: var(--ink-zhu);
  box-shadow: 0 4px 10px rgba(58,50,37,0.12);
}
.ink-btn.small {
  font-size: 14px;
  padding: 8px 18px;
  letter-spacing: 0.14em;
}

/* =========================================================
   章节过渡
   ========================================================= */
.chapter-transition {
  text-align: center;
  padding: 72px 56px 56px;
}
.chapter-transition .chapter-ordinal {
  font-family: var(--font-title);
  color: var(--ink-muted);
  letter-spacing: 0.6em;
  font-size: 14px;
  margin-bottom: 18px;
}
.chapter-transition h2 {
  font-family: var(--font-title);
  color: var(--ink-ink);
  font-size: clamp(38px, 6vw, 56px);
  letter-spacing: 0.22em;
  margin: 0 0 12px;
  position: relative;
  display: inline-block;
}
.chapter-transition h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  background: var(--ink-zhu);
  margin: 14px auto 0;
}
.chapter-transition .chapter-sub {
  font-family: var(--font-title);
  color: var(--ink-ink-light);
  font-size: 18px;
  margin: 22px 0 10px;
  letter-spacing: 0.08em;
  line-height: 1.7;
}
.chapter-transition .chapter-years {
  color: var(--ink-muted);
  font-size: 14px;
  letter-spacing: 0.2em;
  margin-bottom: 34px;
}
.chapter-transition .enter-cta {
  margin-top: 10px;
}

/* =========================================================
   叙事场景
   ========================================================= */
.scene-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  border-bottom: 1px dashed var(--ink-border);
  padding-bottom: 10px;
}
.scene-label .chap-name {
  font-family: var(--font-title);
  letter-spacing: 0.32em;
  color: var(--ink-ink-light);
  font-size: 14px;
}
.scene-label .chap-progress {
  font-family: var(--font-body);
}

.narrative-body {
  font-size: 17px;
  line-height: 2.0;
  color: var(--ink-ink);
  letter-spacing: 0.02em;
  white-space: pre-wrap;
  min-height: 180px;
  text-indent: 2em;
}
.narrative-body .reveal {
  opacity: 0;
  animation: fadeUp 560ms cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}
.narrative-body p { margin: 0 0 14px; }

.scene-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
  opacity: 0;
  animation: fadeIn 420ms ease 200ms forwards;
}

/* =========================================================
   对话场景 — 聊天气泡
   ========================================================= */
.dialogue-scene { padding: 32px 40px 32px; }
.dialogue-row {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  align-items: flex-start;
  opacity: 0;
  animation: fadeUp 520ms cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}
.dialogue-row.player { flex-direction: row-reverse; }
.dialogue-avatar {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d9c8a0, #8b7040);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  color: var(--ink-paper);
  font-size: 14px;
  letter-spacing: 0.08em;
  border: 1px solid rgba(58,50,37,0.35);
  box-shadow: 0 2px 6px rgba(58,50,37,0.15);
  line-height: 1;
  text-align: center;
}
.dialogue-row.player .dialogue-avatar {
  background: linear-gradient(135deg, #8b1a1a, #5a0e0e);
}
.dialogue-bubble {
  max-width: 76%;
  background: rgba(245,240,232,0.95);
  border: 1px solid var(--ink-border);
  padding: 12px 16px 14px;
  border-radius: 12px;
  position: relative;
}
.dialogue-row.player .dialogue-bubble {
  background: rgba(139,26,26,0.08);
  border-color: rgba(139,26,26,0.25);
}
.dialogue-speaker {
  display: block;
  font-family: var(--font-title);
  font-size: 13px;
  color: var(--ink-zhu);
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}
.dialogue-row.player .dialogue-speaker {
  text-align: right;
  color: var(--ink-ink);
}
.dialogue-text {
  font-size: 15.5px;
  color: var(--ink-ink);
  line-height: 1.85;
  white-space: pre-wrap;
}

.response-stack {
  display: grid;
  gap: 12px;
  margin: 22px 0 6px;
  opacity: 0;
  animation: fadeUp 420ms ease 120ms forwards;
}
.response-btn {
  font-family: var(--font-body);
  text-align: left;
  padding: 14px 18px;
  border: 1px solid var(--ink-border);
  background: rgba(245,240,232,0.80);
  color: var(--ink-ink);
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.7;
  font-size: 15px;
  transition: all 240ms ease;
  position: relative;
}
.response-btn::before {
  content: "— ";
  color: var(--ink-zhu);
  font-family: var(--font-title);
}
.response-btn:hover {
  border-color: var(--ink-zhu);
  background: rgba(239,230,212,0.95);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(58,50,37,0.12);
}

/* =========================================================
   决策场景
   ========================================================= */
.decision-scene { padding: 40px 52px 36px; }
.decision-label {
  font-family: var(--font-title);
  letter-spacing: 0.5em;
  color: var(--ink-zhu);
  font-size: 14px;
  margin-bottom: 14px;
  text-align: center;
}
.decision-label::before, .decision-label::after {
  content: "◆";
  color: var(--ink-gold);
  margin: 0 12px;
  font-size: 10px;
  vertical-align: middle;
}
.decision-context {
  font-size: 16.5px;
  line-height: 2.0;
  color: var(--ink-ink);
  letter-spacing: 0.02em;
  padding: 20px 24px;
  background: rgba(239,230,212,0.58);
  border-left: 3px solid var(--ink-zhu);
  border-radius: 2px;
  margin: 10px 0 24px;
  white-space: pre-wrap;
}
.decision-prompt {
  font-family: var(--font-title);
  color: var(--ink-ink-light);
  font-size: 16px;
  letter-spacing: 0.12em;
  margin: 10px 0 14px;
  text-align: center;
}
.choice-stack {
  display: grid;
  gap: 14px;
}
.choice-btn {
  font-family: var(--font-body);
  text-align: left;
  padding: 16px 22px;
  border: 1px solid var(--ink-border);
  background: rgba(245,240,232,0.82);
  color: var(--ink-ink);
  border-radius: 6px;
  cursor: pointer;
  font-size: 15.5px;
  line-height: 1.85;
  transition: all 240ms ease;
  position: relative;
  padding-left: 54px;
}
.choice-btn::before {
  content: attr(data-mark);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--ink-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 15px;
  color: var(--ink-zhu);
  background: rgba(245,240,232,0.7);
  transition: all 240ms ease;
}
.choice-btn:hover {
  border-color: var(--ink-zhu);
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(139,26,26,0.15);
  background: rgba(239,230,212,0.95);
}
.choice-btn:hover::before {
  background: var(--ink-zhu);
  color: var(--ink-paper);
  border-color: var(--ink-zhu);
}

/* =========================================================
   反馈场景
   ========================================================= */
.feedback-scene { padding: 40px 48px 36px; }
.feedback-title {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--ink-zhu);
  letter-spacing: 0.16em;
  text-align: center;
  margin: 0 0 10px;
}
.feedback-title.same  { color: var(--ink-green); }
.feedback-title.diff  { color: var(--ink-zhu); }
.feedback-divider {
  width: 48px;
  height: 1px;
  background: var(--ink-border-strong);
  margin: 0 auto 22px;
}
.feedback-body {
  font-size: 16.5px;
  line-height: 2.05;
  color: var(--ink-ink);
  letter-spacing: 0.02em;
  white-space: pre-wrap;
  min-height: 120px;
  opacity: 0;
  animation: fadeUp 560ms ease forwards;
}
.feedback-choice-echo {
  font-family: var(--font-title);
  color: var(--ink-muted);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-align: center;
  margin-bottom: 18px;
}

/* =========================================================
   章末感悟
   ========================================================= */
.ending-scene { padding: 56px 52px 44px; text-align: center; }
.ending-scene .ending-title {
  font-family: var(--font-title);
  color: var(--ink-ink-light);
  letter-spacing: 0.32em;
  font-size: 15px;
  margin-bottom: 24px;
}
.ending-scene .ending-title::before,
.ending-scene .ending-title::after {
  content: "—";
  color: var(--ink-gold);
  margin: 0 14px;
  letter-spacing: 0;
}
.ending-scene .ending-poem {
  font-family: var(--font-title);
  color: var(--ink-ink);
  font-size: 22px;
  line-height: 2.1;
  letter-spacing: 0.1em;
  margin: 0 auto 28px;
  max-width: 560px;
}
.ending-scene .ending-poem .line {
  opacity: 0;
  display: block;
  animation: fadeUp 640ms cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}
.ending-scene .ending-annotation {
  color: var(--ink-muted);
  font-size: 13.5px;
  line-height: 1.85;
  margin: 0 auto 22px;
  max-width: 560px;
  opacity: 0;
  padding: 10px 14px;
  border-top: 1px dashed var(--ink-border);
  border-bottom: 1px dashed var(--ink-border);
}
.ending-scene .ending-wisdom {
  color: var(--ink-ink);
  font-size: 16px;
  line-height: 2.0;
  margin: 0 auto;
  max-width: 560px;
  opacity: 0;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  text-align: justify;
  text-indent: 2em;
}
.ending-scene .scene-foot { justify-content: center; }

/* =========================================================
   结局评分
   ========================================================= */
.ending-score {
  width: min(900px, 95vw);
  padding: 44px 56px 40px;
}
.ending-score h2 {
  font-family: var(--font-title);
  font-size: 36px;
  letter-spacing: 0.2em;
  margin: 0 0 8px;
  color: var(--ink-ink);
  text-align: center;
}
.ending-score .score-sub {
  color: var(--ink-muted);
  letter-spacing: 0.3em;
  font-size: 13px;
  text-align: center;
  margin-bottom: 26px;
}
.score-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.score-circle {
  width: 160px; height: 160px;
  border-radius: 50%;
  border: 2px solid var(--ink-zhu);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(245,240,232,0.95), rgba(239,230,212,0.8));
  box-shadow: 0 10px 32px rgba(139,26,26,0.18), 0 0 0 8px rgba(245,240,232,0.6);
  position: relative;
}
.score-circle::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed var(--ink-zhu);
  opacity: 0.45;
}
.score-number {
  font-family: var(--font-title);
  font-size: 54px;
  color: var(--ink-zhu);
  line-height: 1;
}
.score-unit {
  color: var(--ink-muted);
  font-size: 12px;
  margin-top: 6px;
  letter-spacing: 0.3em;
}
.score-tag {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--ink-ink);
  letter-spacing: 0.18em;
  max-width: 320px;
  line-height: 1.8;
}
.score-tag small {
  display: block;
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.2em;
  margin-top: 6px;
}

.score-body {
  font-size: 15.5px;
  line-height: 2.0;
  color: var(--ink-ink);
  padding: 18px 22px;
  background: rgba(239,230,212,0.55);
  border-left: 3px solid var(--ink-zhu);
  margin-bottom: 28px;
  border-radius: 2px;
  text-align: justify;
}

.timeline-head {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--ink-ink);
  letter-spacing: 0.2em;
  margin: 20px 0 12px;
  text-align: center;
}
.timeline-head::before, .timeline-head::after {
  content: "◆";
  color: var(--ink-gold);
  font-size: 9px;
  margin: 0 14px;
  vertical-align: middle;
}
.timeline-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: rgba(245,240,232,0.6);
  margin-bottom: 26px;
  border: 1px solid var(--ink-border);
}
.timeline-table th, .timeline-table td {
  border: 1px solid var(--ink-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}
.timeline-table th {
  background: rgba(216,196,162,0.32);
  font-family: var(--font-title);
  color: var(--ink-ink);
  letter-spacing: 0.12em;
  font-weight: 600;
  font-size: 13px;
}
.timeline-table .col-chapter { width: 22%; font-family: var(--font-title); color: var(--ink-ink-light); }
.timeline-table .cell-match  { color: var(--ink-green); }
.timeline-table .cell-diff   { color: var(--ink-zhu); }
.timeline-table .cell-mark   {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.08em;
  font-family: var(--font-title);
}
.timeline-table .cell-mark.hit  { background: rgba(58,125,26,0.15); color: var(--ink-green); }
.timeline-table .cell-mark.miss { background: rgba(139,26,26,0.12); color: var(--ink-zhu); }

.ach-head { margin-top: 20px; }
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.ach-badge {
  border: 1px solid var(--ink-border);
  background: rgba(245,240,232,0.9);
  border-radius: 6px;
  padding: 14px 14px 12px;
  position: relative;
  transition: all 280ms ease;
  min-height: 110px;
}
.ach-badge.unlocked {
  border-color: var(--ink-zhu);
  background: linear-gradient(135deg, rgba(239,230,212,0.95), rgba(216,196,162,0.5));
  box-shadow: 0 4px 14px rgba(139,26,26,0.15);
}
.ach-badge.locked {
  opacity: 0.52;
  filter: grayscale(0.25);
}
.ach-name {
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--ink-ink);
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}
.ach-badge.unlocked .ach-name { color: var(--ink-zhu); }
.ach-desc {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.75;
}
.ach-lock {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.18em;
  font-family: var(--font-title);
}
.ach-badge.unlocked .ach-lock { color: var(--ink-zhu); }

.closing-quote {
  font-family: var(--font-title);
  font-size: 20px;
  color: var(--ink-ink);
  letter-spacing: 0.12em;
  padding: 22px 22px;
  background: rgba(245,240,232,0.68);
  border-top: 1px solid var(--ink-border);
  border-bottom: 1px solid var(--ink-border);
  margin-bottom: 26px;
  text-align: center;
  line-height: 1.9;
}

.ending-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================
   toast
   ========================================================= */
.toast-layer {
  position: fixed;
  top: 26px;
  right: 26px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 320px;
}
.ink-toast {
  pointer-events: auto;
  background: linear-gradient(135deg, #f5f0e8 0%, #efe6d4 100%);
  border: 1px solid var(--ink-zhu);
  color: var(--ink-ink);
  padding: 14px 18px 14px 46px;
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(139,26,26,0.22), 0 2px 8px rgba(58,50,37,0.12);
  font-family: var(--font-body);
  font-size: 14px;
  min-width: 200px;
  position: relative;
  transform: translateX(120%);
  animation: slideIn 360ms cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}
.ink-toast.leaving {
  animation: slideOut 320ms cubic-bezier(0.4, 0, 0.8, 0.1) forwards;
}
.ink-toast::before {
  content: "印";
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  background: var(--ink-zhu);
  color: var(--ink-paper);
  font-family: var(--font-title);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}
.ink-toast .t-title {
  font-family: var(--font-title);
  font-size: 15px;
  color: var(--ink-zhu);
  letter-spacing: 0.14em;
  margin-bottom: 2px;
}
.ink-toast .t-sub {
  font-size: 13px;
  color: var(--ink-ink-light);
  line-height: 1.6;
}

/* =========================================================
   顶部工具条（分享 / 重来）
   ========================================================= */
.top-bar {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 30;
  display: flex;
  gap: 8px;
}
.icon-btn {
  font-family: var(--font-title);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink-ink);
  background: rgba(245,240,232,0.92);
  border: 1px solid var(--ink-border);
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 220ms ease;
  backdrop-filter: blur(6px);
}
.icon-btn:hover {
  border-color: var(--ink-zhu);
  color: var(--ink-zhu);
  background: rgba(245,240,232,1);
  box-shadow: 0 4px 12px rgba(58,50,37,0.15);
}

/* =========================================================
   分享片段（供 runtime_share 复用）
   ========================================================= */
[data-share-fragment] {
  /* 占位选择器，保留给分享海报 */
}

/* =========================================================
   动画
   ========================================================= */
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideOut {
  to { transform: translateX(120%); opacity: 0; }
}
@keyframes slowFadeIn {
  from { opacity: 0; transform: scale(0.985); }
  to   { opacity: 1; transform: scale(1); }
}
.scroll.enter { animation: slowFadeIn 600ms cubic-bezier(0.2, 0.6, 0.2, 1) forwards; }
.leaving      { animation: fadeIn 300ms reverse forwards; opacity: 0; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 680px) {
  #app { padding: 20px 12px 36px; }
  .scroll { padding: 28px 22px 26px; }
  .scroll.tight, .dialogue-scene, .decision-scene, .feedback-scene, .ending-scene { padding: 28px 22px 26px; }
  .title-screen h1 { font-size: 44px; }
  .title-screen .title-quote { font-size: 18px; padding: 16px 18px; }
  .narrative-body { font-size: 16px; line-height: 1.9; }
  .ending-score { padding: 28px 22px 26px; }
  .score-hero { gap: 22px; }
  .score-circle { width: 130px; height: 130px; }
  .score-number { font-size: 42px; }
  .score-tag { font-size: 20px; text-align: center; }
  .timeline-table { font-size: 12.5px; }
  .timeline-table th, .timeline-table td { padding: 8px; }
  .top-bar { top: 10px; right: 10px; }
  .dialogue-bubble { max-width: 86%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
