/* ============================================================
 * 「重走长征路」视觉系统 —— 行军档案 × 油印传单
 * ============================================================ */

:root {
  --paper: #EFE6D0;
  --paper-deep: #E3D5B6;
  --paper-card: #F6EEDC;
  --ink: #2E2A24;
  --ink-soft: #6B6455;
  --red: #BE3A24;
  --red-deep: #8F2B1D;
  --blue-gray: #5F7074;
  --gold: #C9A227;
  --gold-light: #E5C04F;
  --silver: #9A9A93;
  --bronze: #A9713D;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(46, 42, 36, 0.12);
}

/* ============ 基础与 L2 字体缩放防护 ============ */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

/* hidden 属性必须优先于 display:flex 等类样式 */
[hidden] { display: none !important; }

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}

html,
body {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  -moz-text-size-adjust: 100% !important;
  -ms-text-size-adjust: 100% !important;
}

body {
  font-family: 'Songti SC', 'STSong', 'SimSun', serif;
  color: var(--ink);
  min-height: 100dvh;
  height: 100%;
  line-height: 1.65;
  background-color: var(--paper);
  /* 粗纸颗粒纹理(SVG 噪点,零外部资源) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.16 0 0 0 0 0.11 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  overflow-x: hidden;
}

button {
  font-family: 'system-ui', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

img { max-width: 100%; }

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

.view {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ 通用按钮 ============ */
.btn {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  text-align: center;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--red);
  color: #F6EEDC;
  border: 1px solid var(--red-deep);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15), var(--shadow);
}
.btn-primary:disabled { background: #C9B79A; border-color: #B5A183; box-shadow: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost:active { background: rgba(46, 42, 36, 0.06); }

.btn-lg { padding: 16px 20px; font-size: 19px; letter-spacing: 4px; }

/* ============ 顶栏 ============ */
.map-topbar,
.node-topbar,
.board-topbar,
.cert-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(239, 230, 208, 0.92);
  border-bottom: 1.5px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-btn {
  font-size: 14px;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper-card);
  color: var(--ink);
  white-space: nowrap;
}
.topbar-btn:active { background: var(--paper-deep); }

.topbar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
}
.topbar-li { font-family: 'system-ui', 'PingFang SC', sans-serif; font-weight: 700; font-size: 15px; color: var(--red-deep); }
.topbar-prog { font-size: 12px; color: var(--ink-soft); }

.node-title,
.board-title,
.cert-title {
  flex: 1;
  text-align: center;
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-spacer,
.cert-spacer { width: 56px; flex-shrink: 0; }

/* ============ ① 封面 ============ */
.home-sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 22px 26px;
  position: relative;
}
/* 传单边框 */
.home-sheet::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  pointer-events: none;
  opacity: 0.55;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-card);
  border: 1px solid rgba(46, 42, 36, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 26px;
}
.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--red);
  background: var(--paper-deep);
  object-fit: cover;
  flex-shrink: 0;
}
.user-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-rank {
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  color: var(--red-deep);
  font-size: 14px;
  white-space: nowrap;
}

.home-title-wrap { text-align: center; margin-bottom: 22px; }
.home-star {
  color: var(--red);
  font-size: 34px;
  text-shadow: 0 0 12px rgba(190, 58, 36, 0.35);
  animation: starGlow 2.4s ease-in-out infinite;
}
@keyframes starGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.82; transform: scale(1.06); }
}
.home-title {
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--ink);
  margin: 6px 0 4px;
  /* 油印错版:红/蓝双色微偏移 */
  text-shadow:
    1.6px 0 0 rgba(190, 58, 36, 0.38),
    -1.2px 0 0 rgba(95, 112, 116, 0.32);
}
.home-subtitle {
  font-size: 14px;
  letter-spacing: 10px;
  color: var(--ink-soft);
  text-indent: 10px;
}
.home-years {
  margin-top: 8px;
  font-family: 'system-ui', sans-serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--red-deep);
}
.home-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.home-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-bottom: 22px;
}
.link-btn {
  font-size: 14px;
  color: var(--ink);
  padding: 8px 4px;
  border-bottom: 1px dashed rgba(46, 42, 36, 0.4);
  text-align: center;
  letter-spacing: 1px;
}
.link-btn:active { color: var(--red-deep); border-bottom-color: var(--red); }

.home-stats {
  display: flex;
  justify-content: space-around;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  padding: 12px 0;
  margin-bottom: 18px;
}
.stat { display: flex; flex-direction: column; align-items: center; }
.stat b {
  font-family: 'system-ui', sans-serif;
  font-size: 22px;
  color: var(--red-deep);
  letter-spacing: 1px;
}
.stat span { font-size: 12px; color: var(--ink-soft); letter-spacing: 2px; }

.home-footer {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}

/* ============ ② 竖卷地图 ============ */
.map-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0;
}
#map-svg {
  display: block;
  width: 100%;
  height: auto;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.35), transparent 60%),
    var(--paper-deep);
}

/* 节点样式(JS 渲染) */
.map-node { cursor: pointer; }
.map-node text {
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 20px;
  font-weight: 700;
  fill: var(--ink);
  text-anchor: middle;
}
.map-node .node-li {
  font-family: 'system-ui', sans-serif;
  font-size: 13px;
  fill: var(--ink-soft);
}
.map-node .star-shape { transition: transform 0.15s ease; transform-origin: center; }
.map-node:active .star-shape { transform: scale(1.15); }

.node-star-fill { fill: var(--red); stroke: var(--red-deep); stroke-width: 1.5; }
.node-star-now { fill: var(--red); stroke: var(--red-deep); stroke-width: 2; }
.node-star-lock { fill: #D8CCAF; stroke: #A79A7D; stroke-width: 1.5; }

.pulse-ring {
  fill: none;
  stroke: var(--red);
  stroke-width: 2.5;
  animation: pulseRing 1.6s ease-out infinite;
  transform-origin: center;
}
@keyframes pulseRing {
  0% { transform: scale(0.55); opacity: 0.95; }
  100% { transform: scale(1.9); opacity: 0; }
}

.stamp-done {
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 15px;
  fill: var(--red-deep);
  text-anchor: middle;
}

/* ============ ③ 节点页 ============ */
.node-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.node-card {
  background: var(--paper-card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  position: relative;
}
.node-card::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(46, 42, 36, 0.28);
  border-radius: 6px;
  pointer-events: none;
}
.node-card-lead {
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink);
  margin-bottom: 8px;
}
.node-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.node-card-story { font-size: 15px; line-height: 1.8; text-align: justify; }
.node-card-fact {
  margin-top: 10px;
  padding: 8px 12px;
  border-left: 4px solid var(--red);
  background: rgba(190, 58, 36, 0.06);
  font-family: 'system-ui', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--red-deep);
  letter-spacing: 1px;
}
.node-card-quote {
  margin-top: 10px;
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 14.5px;
  color: var(--ink-soft);
  text-align: right;
}

.node-play {
  background: var(--paper-card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  min-height: 220px;
}

/* ---- 答题 ---- */
.quiz-step {
  font-family: 'system-ui', sans-serif;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.quiz-q {
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 14px;
}
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  text-align: left;
  padding: 12px 14px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: #FBF5E6;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  transition: background 0.12s ease;
}
.quiz-opt:active { background: var(--paper-deep); }
.quiz-opt .opt-key {
  display: inline-block;
  min-width: 22px;
  font-weight: 700;
  color: var(--red-deep);
}
.quiz-opt.correct { background: #E4EBD9; border-color: #5E7A3C; }
.quiz-opt.wrong { background: #F3DDD6; border-color: var(--red); }
.quiz-why {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(95, 112, 116, 0.1);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.6;
}
.quiz-next { margin-top: 12px; }

/* ---- 通用玩法容器 ---- */
.play-rule {
  font-size: 13px;
  color: var(--ink-soft);
  background: rgba(46, 42, 36, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.play-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'system-ui', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--red-deep);
  margin-bottom: 10px;
}
.play-hud .hud-lives { color: var(--red); letter-spacing: 2px; }
.play-stage {
  position: relative;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
  touch-action: manipulation;
}

/* ---- 四渡赤水 ---- */
.chishui-river {
  position: relative;
  height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.chishui-band {
  width: 100%;
  height: 64px;
  background: repeating-linear-gradient(0deg, rgba(95, 112, 116, 0.55) 0 8px, rgba(95, 112, 116, 0.25) 8px 16px);
  position: relative;
}
.chishui-band::after {
  content: '赤水河';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  letter-spacing: 8px;
  font-size: 15px;
}
.chishui-soldier {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  transition: left 0.4s ease;
  z-index: 2;
}
.chishui-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.chishui-step { text-align: center; font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

/* ---- 强渡大渡河 ---- */
.daduhe-stage {
  height: 190px;
  background: linear-gradient(180deg, #CFE0DE 0%, rgba(95, 112, 116, 0.4) 45%, rgba(95, 112, 116, 0.65) 100%);
}
.daduhe-boat {
  position: absolute;
  left: 6%;
  bottom: 34px;
  font-size: 34px;
  transform: translateY(-8%);
  transition: left 0.18s linear;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}
.daduhe-shore {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 46px;
  background: linear-gradient(90deg, transparent, #C9B788);
  border-left: 2px dashed var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  letter-spacing: 6px;
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 13px;
  color: var(--ink);
}
.daduhe-wave {
  position: absolute;
  width: 100%;
  height: 26px;
  bottom: 8px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 14px, transparent 14px 28px);
  animation: waveMove 1.4s linear infinite;
  border-radius: 50%;
}
@keyframes waveMove { from { background-position-x: 0; } to { background-position-x: 28px; } }
.daduhe-tapbtn { margin-top: 14px; }

/* ---- 飞夺泸定桥 ---- */
.luding-stage { height: 200px; background: linear-gradient(180deg, #D8CDB4 0%, #C4B48E 100%); }
.luding-chain {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 16px, transparent 16px 22px);
  border-radius: 3px;
}
.luding-chain.top { top: 78px; }
.luding-chain.bottom { top: 128px; }
.luding-plank {
  position: absolute;
  top: 80px;
  width: 22px;
  height: 46px;
  background: #B98A4E;
  border: 1.5px solid #7A5A2E;
  border-radius: 3px;
  opacity: 0.28;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.luding-plank.laid { opacity: 1; background: #D9A862; }
.luding-plank.target { opacity: 0.85; outline: 3px dashed var(--red); outline-offset: 2px; }
.luding-cursor {
  position: absolute;
  top: 66px;
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 1;
  margin-left: -9px;
  z-index: 3;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.luding-gap { height: 40px; }

/* ---- 爬雪山 ---- */
.xueshan-stage {
  height: 300px;
  background: linear-gradient(180deg, #E8E4DA 0%, #CBD6D8 55%, #AEBFC2 100%);
  position: relative;
}
.xueshan-player {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 30px;
  z-index: 3;
  transition: left 0.12s linear;
}
.xueshan-rock {
  position: absolute;
  top: -26px;
  font-size: 26px;
  z-index: 2;
  will-change: top;
}
.xueshan-hit { animation: hitFlash 0.5s ease; }
@keyframes hitFlash {
  0%, 100% { filter: none; }
  30% { filter: sepia(1) saturate(8) hue-rotate(-40deg); }
}
.xueshan-pad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

/* ============ ④ 排行榜 ============ */
.board-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px;
}
.board-hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.board-myrank {
  background: var(--paper-card);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}
.board-myrank .mr-rank {
  font-family: 'system-ui', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--red-deep);
  min-width: 44px;
  text-align: center;
}
.board-myrank .mr-info { flex: 1; min-width: 0; }
.board-myrank .mr-name { font-weight: 700; font-size: 15px; }
.board-myrank .mr-date { font-size: 12.5px; color: var(--ink-soft); }
.board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper-card);
  border: 1px solid rgba(46, 42, 36, 0.22);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.board-row.me { border-color: var(--red); background: #F7EDDD; }
.rank-badge {
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'system-ui', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--paper-card);
  flex-shrink: 0;
}
.rank-badge.r1 { background: radial-gradient(circle at 32% 28%, var(--gold-light), var(--gold)); box-shadow: 0 0 8px rgba(201, 162, 39, 0.5); }
.rank-badge.r2 { background: radial-gradient(circle at 32% 28%, #C9C9C2, var(--silver)); }
.rank-badge.r3 { background: radial-gradient(circle at 32% 28%, #C08557, var(--bronze)); }
.rank-badge.rn { background: var(--blue-gray); }
.board-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(46, 42, 36, 0.3);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--paper-deep);
}
.board-info { flex: 1; min-width: 0; }
.board-name {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-date { font-size: 12.5px; color: var(--ink-soft); }
.board-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--ink-soft);
  letter-spacing: 2px;
  font-size: 14px;
}
.board-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

/* ============ ⑤ 证书 ============ */
.cert-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cert-img-wrap {
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-deep);
  padding: 8px;
  box-shadow: var(--shadow);
}
#cert-img { display: block; width: 100%; border-radius: 4px; }
.cert-tip {
  text-align: center;
  font-size: 13.5px;
  color: var(--red-deep);
  letter-spacing: 1px;
}
.cert-actions { display: flex; flex-direction: column; gap: 10px; }

/* ============ 浮层 ============ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(46, 42, 36, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 22px;
}
.overlay-card {
  background: var(--paper-card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
  padding: 22px 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  text-align: center;
  animation: popIn 0.25s ease;
  max-height: 80vh;
  overflow-y: auto;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.result-stamp {
  display: inline-block;
  border: 2.5px solid var(--red);
  color: var(--red);
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 19px;
  letter-spacing: 3px;
  padding: 3px 14px;
  border-radius: 6px;
  transform: rotate(-6deg);
  margin-bottom: 12px;
  opacity: 0;
  animation: stampIn 0.3s 0.1s ease forwards;
}
@keyframes stampIn {
  from { opacity: 0; transform: rotate(-6deg) scale(1.8); }
  to { opacity: 1; transform: rotate(-6deg) scale(1); }
}
.result-title {
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.result-stars { font-size: 26px; letter-spacing: 6px; color: var(--gold); margin-bottom: 6px; }
.result-msg { font-size: 14px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 16px; }
.result-actions { display: flex; flex-direction: column; gap: 10px; }

.overlay-card-rules { text-align: left; }
.rules-title {
  text-align: center;
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.rules-body { font-size: 14px; line-height: 1.9; color: var(--ink); }
.rules-body ol { padding-left: 20px; }
.rules-body li { margin-bottom: 8px; }

/* ============ 前置状态页 ============ */
.boot-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  gap: 14px;
}
.boot-icon { font-size: 52px; }
.boot-title {
  font-family: 'STKaiti', 'KaiTi', '楷体', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
}
.boot-text { font-size: 14px; color: var(--ink-soft); line-height: 1.8; }
.boot-deny {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  gap: 14px;
}
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--paper-deep);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Toast ============ */
#toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  background: rgba(46, 42, 36, 0.92);
  color: var(--paper-card);
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 20px;
  z-index: 80;
  max-width: 80vw;
  letter-spacing: 1px;
  animation: fadeIn 0.2s ease;
}

/* ============ 响应式与无障碍 ============ */
@media (min-width: 480px) {
  #app { border-left: 1px solid rgba(46, 42, 36, 0.15); border-right: 1px solid rgba(46, 42, 36, 0.15); }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-ring,
  .home-star,
  .daduhe-wave { animation: none; }
  .view, .overlay-card { animation: none; }
}

button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
