/* ==========================================================================
   九秩山河 · 纸雕长征卷 — 一镜到底指尖滚动漫游 H5（v3 立体穿梭版）
   ========================================================================== */

:root {
  --paper: #f6e3c9;
  --paper-table: #eedab8;
  --paper-card: #f9ebd6;
  --paper-deep: #e7caa3;
  --vermilion: #b52d23;
  --vermilion-deep: #7f1c15;
  --gold: #b8873f;
  --gold-light: #e5c07b;
  --gold-line: rgba(184, 135, 63, 0.48);
  --ink: #2b211a;
  --ink-soft: #645245;
  --ink-faint: #8c7767;

  --font-kai: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "FangSong", "STSong", serif;
  --font-fangsong: "FangSong", "STFangsong", "Songti SC", "STSong", "SimSun", serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 2px;
}

/* 仿宣纸纹理层 */
.xuan-texture {
  background-color: var(--paper-card);
  background-image:
    radial-gradient(circle at 86% 8%, rgba(184, 135, 63, 0.14), transparent 46%),
    radial-gradient(circle at 12% 92%, rgba(181, 45, 35, 0.06), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
}

/* ==========================================================================
   首屏加载展卷仪式层
   ========================================================================== */
.scroll-loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--paper);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.45s ease;
}

.scroll-loader.is-done {
  opacity: 0;
  visibility: hidden;
}

.loader-axis {
  width: 220px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--vermilion), var(--gold), transparent);
  transform: scaleX(1);
}

@media (prefers-reduced-motion: no-preference) {
  .loader-axis {
    transform: scaleX(0);
    animation: axisStretch 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  }
}

@keyframes axisStretch {
  0% { transform: scaleX(0); opacity: 0.4; }
  100% { transform: scaleX(1); opacity: 1; }
}

.loader-caption {
  margin: 0;
  font-family: var(--font-kai);
  font-size: 14px;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  color: var(--vermilion-deep);
}

/* ==========================================================================
   电脑端：温润宣纸轻型数字展览台
   ========================================================================== */
.desktop-frame-info {
  display: none;
}

.h5-stage {
  position: relative;
  width: 100vw;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}

@media (min-width: 780px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 54px;
    padding: 24px 40px;
    background-color: var(--paper-table);
    background-image:
      radial-gradient(circle at 18% 18%, rgba(184, 135, 63, 0.16), transparent 48%),
      radial-gradient(circle at 86% 82%, rgba(181, 45, 35, 0.08), transparent 46%),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  }

  .desktop-frame-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 364px;
    padding-left: 20px;
    border-left: 1.5px solid var(--gold);
    color: var(--ink);
  }

  .desktop-brand {
    display: flex;
    align-items: flex-start;
    gap: 14px;
  }

  .desktop-hex-seal {
    flex-shrink: 0;
    width: 44px;
    height: 48px;
    filter: drop-shadow(0 4px 10px rgba(181, 45, 35, 0.24));
  }

  .desktop-kicker {
    margin: 0 0 5px;
    font-size: 11.5px;
    color: var(--gold);
    letter-spacing: 0.04em;
    font-weight: 600;
    white-space: nowrap;
  }

  .desktop-title {
    margin: 0 0 4px;
    font-family: var(--font-kai);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--vermilion-deep);
    white-space: nowrap;
  }

  .desktop-sub {
    margin: 0;
    font-family: var(--font-fangsong);
    font-size: 12.5px;
    color: var(--ink-soft);
    white-space: nowrap;
  }

  .desktop-hint {
    margin: 0;
    font-size: 12.6px;
    line-height: 1.72;
    color: var(--ink-soft);
    padding: 11px 13px;
    border-radius: 8px;
    background: rgba(253, 247, 236, 0.65);
    border: 1px solid rgba(184, 135, 63, 0.34);
  }

  .desktop-hint strong {
    color: var(--vermilion-deep);
  }

  .desktop-quick-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .dq-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 8px 13px;
    border-radius: 8px;
    font-family: var(--font-kai);
    font-size: 14.5px;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    background: rgba(253, 247, 236, 0.45);
    border: 1px solid rgba(184, 135, 63, 0.22);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  }

  .dq-num {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    font-size: 12px;
    color: var(--gold);
    border: 1px solid rgba(184, 135, 63, 0.45);
    background: rgba(253, 247, 236, 0.93);
  }

  .dq-btn:hover {
    color: var(--vermilion-deep);
    background: rgba(253, 247, 236, 0.88);
  }

  .dq-btn.is-active {
    color: var(--vermilion-deep);
    background: rgba(253, 247, 236, 0.96);
    border-color: var(--vermilion);
    box-shadow: 0 4px 14px rgba(181, 45, 35, 0.1);
  }

  .dq-btn.is-active .dq-num {
    color: #fdf7ec;
    background: var(--vermilion);
    border-color: var(--gold-light);
  }

  .desktop-status {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(253, 247, 236, 0.78);
    border: 1px solid var(--gold-line);
    font-size: 13px;
  }

  .desktop-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .desktop-pct {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--gold);
  }

  .btn-reset-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 7px 12px;
    border-radius: 7px;
    font-family: var(--font-fangsong);
    font-size: 12.5px;
    color: var(--vermilion-deep);
    background: rgba(181, 45, 35, 0.06);
    border: 1px dashed rgba(181, 45, 35, 0.42);
    transition: background-color 0.2s, border-color 0.2s;
  }

  .btn-reset-mini:hover {
    background: rgba(181, 45, 35, 0.12);
    border-style: solid;
  }

  .desktop-status-label {
    color: var(--ink-soft);
  }

  .desktop-status strong {
    font-family: var(--font-kai);
    font-size: 15px;
    color: var(--vermilion);
  }

  .h5-stage {
    width: min(420px, calc((100dvh - 44px) * 9 / 16));
    height: min(calc(100dvh - 44px), 840px);
    border-radius: 26px;
    box-shadow:
      0 26px 64px rgba(68, 44, 24, 0.24),
      0 0 0 1px rgba(184, 135, 63, 0.55),
      0 0 0 8px rgba(253, 247, 236, 0.52);
  }
}

/* ==========================================================================
   顶部 HUD 控制栏
   ========================================================================== */
.top-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 6px;
  pointer-events: none;
}

.hud-badge,
.hud-actions {
  pointer-events: auto;
}

.hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(253, 247, 236, 0.93);
  border: 1px solid var(--gold-line);
  font-family: var(--font-fangsong);
  font-size: 11.5px;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.hud-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vermilion);
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hud-sparks {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(253, 247, 236, 0.94);
  border: 1px solid var(--gold-line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--vermilion);
}

.hud-reset-btn,
.hud-audio-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(253, 247, 236, 0.94);
  border: 1px solid var(--gold-line);
  color: var(--ink-soft);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.hud-reset-btn[hidden] {
  display: none;
}

.hud-reset-btn:hover {
  color: var(--vermilion);
  border-color: var(--vermilion);
}

.hud-audio-btn .icon-bgm-on {
  display: none;
}

.hud-audio-btn.is-playing {
  color: var(--vermilion);
  border-color: var(--vermilion);
}

.hud-audio-btn.is-playing .icon-bgm-off {
  display: none;
}

.hud-audio-btn.is-playing .icon-bgm-on {
  display: block;
}

/* ==========================================================================
   右侧星火进度轴
   ========================================================================== */
.side-rail {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-radius: var(--radius-pill);
  background: rgba(253, 247, 236, 0.86);
  border: 1px solid rgba(184, 135, 63, 0.34);
}

.rail-dot {
  position: relative;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0;
}

.rail-node {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(100, 82, 69, 0.32);
  border: 1px solid rgba(184, 135, 63, 0.5);
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.3s ease;
}

.rail-dot.is-lit .rail-node {
  width: 13px;
  height: 13px;
  border-radius: 0;
  border: none;
  background: linear-gradient(135deg, #f8da8c 0%, #c88d32 100%);
  clip-path: polygon(50% 0%, 63% 36%, 100% 38%, 70% 60%, 80% 96%, 50% 74%, 20% 96%, 30% 60%, 0% 38%, 37% 36%);
  filter: drop-shadow(0 0 4px rgba(184, 135, 63, 0.8));
}

.rail-dot.is-active .rail-node {
  transform: scale(1.32);
  background: var(--vermilion);
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(181, 45, 35, 0.16);
}

.rail-dot.is-lit.is-active .rail-node {
  background: linear-gradient(135deg, #ffe59e 0%, #b52d23 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .rail-dot.just-lit::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(231, 198, 134, 0.9), 0 0 14px 4px rgba(181, 45, 35, 0.55);
    animation: starHaloBurst 0.9s ease-out forwards;
  }

  .side-rail.all-lit-celebrate .rail-dot.is-lit .rail-node {
    animation: starTwinkle 0.65s ease-in-out calc(var(--star-i, 0) * 0.14s) 2;
  }
}

@keyframes starHaloBurst {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.8); opacity: 0; }
}

@keyframes starTwinkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.48); }
}

.rail-tip {
  position: absolute;
  right: 24px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(43, 33, 26, 0.82);
  color: #fdf7ec;
  font-family: var(--font-kai);
  font-size: 10.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.rail-dot:hover .rail-tip,
.rail-dot:focus-visible .rail-tip,
.rail-dot.is-active .rail-tip {
  opacity: 1;
  transform: translateX(0);
}

.rail-complete-tag {
  writing-mode: vertical-rl;
  padding: 5px 2px;
  margin-top: 2px;
  border-radius: 4px;
  background: var(--vermilion);
  color: #fdf7ec;
  font-family: var(--font-kai);
  font-size: 10px;
  letter-spacing: 0.16em;
  border: 1px solid var(--gold-light);
  box-shadow: 0 4px 12px rgba(181, 45, 35, 0.28);
}

/* ==========================================================================
   主舞台：点击画面任意空白处平滑穿梭 + 高清原图底板 + 单纹理 60fps 雪碧画布
   ========================================================================== */
.journey-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  cursor: pointer;
}

.canvas-parallax-wrap {
  position: absolute;
  inset: -12px;
  z-index: 1;
  will-change: transform;
}

.scene-still {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  opacity: 0;
  transform: scale(1.085);
  transition: opacity 0.9s ease, transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.scene-still.is-shown {
  z-index: 2;
  opacity: 1;
  transform: scale(1);
}

#transitionCanvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0);
  will-change: contents, opacity;
  transition: opacity 0.24s ease;
}

#transitionCanvas.is-playing {
  opacity: 1;
  transition: none;
}

.paper-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(247, 229, 204, 0.62) 0%,
      rgba(247, 229, 204, 0.16) 17%,
      rgba(247, 229, 204, 0) 29%,
      rgba(247, 229, 204, 0) 73%,
      rgba(247, 229, 204, 0.34) 85%,
      rgba(247, 229, 204, 0.9) 100%
    );
}

.gold-border-frame {
  position: absolute;
  inset: 9px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(184, 135, 63, 0.36);
  border-radius: 14px;
}

.gold-border-frame::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(184, 135, 63, 0.16);
  border-radius: 10px;
}

/* ==========================================================================
   中景漂浮烫金微粒视差层 & 轻触水波金纹
   ========================================================================== */
.spark-dust-layer,
.tap-ripple-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.tap-ripple-layer {
  z-index: 18;
}

.tap-ripple {
  position: absolute;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  border-radius: 50%;
  border: 1.5px solid rgba(229, 192, 123, 0.92);
  background: radial-gradient(circle, rgba(253, 247, 236, 0.45), transparent 70%);
  animation: tapRippleExpand 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes tapRippleExpand {
  0% { transform: scale(0.5); opacity: 0.95; }
  100% { transform: scale(3.2); opacity: 0; }
}

.dust {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8de 0%, rgba(229, 192, 123, 0.7) 55%, transparent 100%);
  opacity: 0.55;
}

.d1 { left: 18%; top: 38%; width: 5px; height: 5px; }
.d2 { left: 78%; top: 44%; width: 3.5px; height: 3.5px; }
.d3 { left: 32%; top: 61%; width: 4px; height: 4px; }
.d4 { left: 72%; top: 66%; width: 5px; height: 5px; }
.d5 { left: 46%; top: 34%; width: 3px; height: 3px; }
.d6 { left: 60%; top: 71%; width: 4px; height: 4px; }

@media (prefers-reduced-motion: no-preference) {
  .dust {
    animation: dustDrift 7.5s ease-in-out infinite alternate;
  }
  .d2 { animation-delay: -1.4s; animation-duration: 8.6s; }
  .d3 { animation-delay: -2.8s; animation-duration: 6.8s; }
  .d4 { animation-delay: -4.1s; animation-duration: 9.2s; }
  .d5 { animation-delay: -0.9s; animation-duration: 7.9s; }
  .d6 { animation-delay: -3.5s; animation-duration: 8.4s; }
}

@keyframes dustDrift {
  0% { transform: translate3d(0, 0, 0) scale(0.85); opacity: 0.28; }
  50% { opacity: 0.72; }
  100% { transform: translate3d(8px, -18px, 0) scale(1.15); opacity: 0.32; }
}

/* ==========================================================================
   场景浮层（穿梭期间柔滑隐去，抵达景点时从容浮现）
   ========================================================================== */
.scene-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 12px, 0);
  transition: opacity 0.42s ease, transform 0.48s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.42s;
}

.scene-overlay.is-active {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.48s ease, transform 0.54s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

.scene-overlay.is-active button,
.scene-overlay.is-active a,
.scene-overlay.is-active input {
  pointer-events: auto;
}

.overlay-finale.is-active {
  pointer-events: auto;
  cursor: default;
}

/* ==========================================================================
   Overlay 0：故宫文物竖排题签封面
   ========================================================================== */
.cover-plaque-area {
  position: relative;
  z-index: 10;
  padding-top: calc(48px + env(safe-area-inset-top, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cover-plaque-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 228px;
}

.hex-seal-badge {
  position: absolute;
  left: 16px;
  top: 4px;
  width: 34px;
  height: 38px;
  filter: drop-shadow(0 3px 8px rgba(181, 45, 35, 0.28));
}

.vertical-plaque {
  display: inline-flex;
  align-items: stretch;
  gap: 7px;
  padding: 8px 10px;
  background: rgba(253, 247, 236, 0.68);
  border-top: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  box-shadow: 0 6px 20px rgba(43, 33, 26, 0.08);
}

.plaque-rule {
  width: 4px;
  border-left: 1px solid var(--gold);
  border-right: 0.75px solid rgba(184, 135, 63, 0.45);
}

.cover-title-vertical {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-kai);
  font-size: clamp(27px, 7.2vw, 33px);
  font-weight: 700;
  line-height: 1.06;
  color: var(--vermilion-deep);
  text-shadow: 0 1px 6px rgba(253, 247, 236, 0.9);
}

.char-reveal {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .char-reveal {
    animation: charFadeIn 0.52s ease calc(0.1s + var(--ci, 0) * 0.08s) backwards;
  }
}

@keyframes charFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.year-seal-box {
  position: absolute;
  right: 10px;
  bottom: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1.4px solid var(--vermilion);
  border-radius: 3px;
  background: rgba(253, 247, 236, 0.74);
  color: var(--vermilion);
  font-family: var(--font-fangsong);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.year-seal-sep {
  width: 12px;
  height: 1px;
  background: var(--vermilion);
  opacity: 0.7;
}

.book-banner-wrap {
  position: relative;
  width: 186px;
  height: 30px;
  display: grid;
  place-items: center;
}

.book-banner-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover-subtitle-banner {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-kai);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  color: var(--ink);
}

.cover-bottom {
  position: relative;
  z-index: 10;
  padding: 0 22px calc(66px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}

.cover-lead {
  margin: 0;
  font-family: var(--font-fangsong);
  font-size: 13.5px;
  line-height: 1.75;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.cover-scroll-gesture {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-fangsong);
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

@media (prefers-reduced-motion: no-preference) {
  .cover-scroll-gesture svg {
    animation: cueFloat 2s ease-in-out infinite;
  }
}

.cover-review-meta {
  margin: 0;
  font-size: 9.8px;
  letter-spacing: 0.04em;
  color: #9e783e;
  white-space: nowrap;
}

/* 主按钮（朱红烫金） */
.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 184px;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #c6372a 0%, #941e16 100%);
  color: #fdf6e9;
  font-family: var(--font-kai);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding-left: calc(24px + 0.07em);
  text-decoration: none;
  border: 1px solid rgba(229, 192, 123, 0.72);
  box-shadow: 0 8px 22px rgba(148, 30, 22, 0.28);
  transition: transform 0.18s ease, box-shadow 0.2s ease;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 240, 205, 0.28) 50%, transparent 70%);
  transform: translateX(-110%);
}

@media (prefers-reduced-motion: no-preference) {
  .btn-shine {
    animation: btnShimmer 3.8s ease-in-out infinite;
  }
}

@keyframes btnShimmer {
  0%, 55% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: rgba(253, 247, 236, 0.9);
  border: 1px solid var(--gold-line);
  color: var(--ink);
  font-family: var(--font-kai);
  font-size: 14px;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   章节页三层字排体系 + 右侧动态朱砂印章
   ========================================================================== */
.station-top-bar {
  position: relative;
  z-index: 10;
  padding: calc(50px + env(safe-area-inset-top, 0px)) 36px 0 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.tier-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tier-num {
  font-family: var(--font-kai);
  font-size: clamp(46px, 12.5vw, 56px);
  font-weight: 700;
  line-height: 0.96;
  color: var(--vermilion);
  text-shadow: 0 2px 10px rgba(253, 247, 236, 0.9);
}

.tier-titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

.tier-name {
  margin: 0;
  font-family: var(--font-kai);
  font-size: clamp(23px, 6.4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.12;
  color: var(--ink);
  text-shadow: 0 1px 8px rgba(253, 247, 236, 0.9);
}

.tier-loc-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-fangsong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.tier-gold-sep {
  width: 1px;
  height: 11px;
  background: var(--gold);
}

.tier-verse {
  margin: 2px 0 0;
  font-family: var(--font-fangsong);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.station-seal-stamp {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  margin-top: 4px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-kai);
  font-size: 22px;
  font-weight: 700;
  color: rgba(181, 45, 35, 0.42);
  border: 1.5px dashed rgba(181, 45, 35, 0.42);
  background: rgba(253, 247, 236, 0.58);
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.seal-ink-ripple {
  position: absolute;
  inset: -6px;
  border-radius: 10px;
  background: radial-gradient(circle, rgba(181, 45, 35, 0.46) 0%, rgba(181, 45, 35, 0.14) 55%, transparent 72%);
  opacity: 0;
  pointer-events: none;
}

.overlay-station.is-lit .station-seal-stamp.seal-yin,
.dialog-seal-badge.is-stamped.seal-yin,
.seal-slot.is-lit.seal-yin .seal-box {
  color: #fdf7ec;
  background: radial-gradient(circle at 38% 35%, #c9372b 0%, #9f2018 100%);
  border: 1.5px solid #e5c07b;
  box-shadow: 0 4px 14px rgba(181, 45, 35, 0.32), inset 0 0 0 2px rgba(253, 247, 236, 0.32);
  transform: rotate(-5deg);
}

.overlay-station.is-lit .station-seal-stamp.seal-yang,
.dialog-seal-badge.is-stamped.seal-yang,
.seal-slot.is-lit.seal-yang .seal-box {
  color: #b52d23;
  background: rgba(253, 247, 236, 0.92);
  border: 2px solid #b52d23;
  box-shadow: 0 4px 12px rgba(181, 45, 35, 0.2), inset 0 0 0 2px rgba(181, 45, 35, 0.22);
  transform: rotate(4deg);
}

@media (prefers-reduced-motion: no-preference) {
  .just-stamped {
    animation: sealImpact 0.48s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .just-stamped .seal-ink-ripple {
    animation: inkSpread 0.72s ease-out forwards;
  }
}

@keyframes sealImpact {
  0% { transform: scale(1.45) rotate(-12deg); opacity: 0.5; }
  65% { transform: scale(0.94) rotate(-4deg); opacity: 1; }
  100% { transform: scale(1) rotate(-5deg); opacity: 1; }
}

@keyframes inkSpread {
  0% { transform: scale(0.45); opacity: 0.95; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* 中段金色星火坐标点 */
.spark-beacon {
  position: absolute;
  left: var(--bx, 50%);
  top: var(--by, 52%);
  transform: translate(-50%, -50%);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px;
  transition: transform 0.25s ease-out;
}

.beacon-core {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e6 0%, #f1c166 55%, #b52d23 100%);
  border: 2px solid #fff6e5;
  box-shadow: 0 0 16px rgba(241, 193, 102, 0.9), 0 0 6px rgba(181, 45, 35, 0.65);
}

.beacon-ring {
  position: absolute;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 244, 214, 0.95);
}

@media (prefers-reduced-motion: no-preference) {
  .beacon-ring {
    animation: beaconPulse 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  }
}

@keyframes beaconPulse {
  0% { transform: scale(1); opacity: 0.95; }
  100% { transform: scale(2.8); opacity: 0; }
}

.beacon-label {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(43, 33, 26, 0.84);
  border: 1px solid rgba(229, 192, 123, 0.58);
  color: #fdf6ea;
  font-family: var(--font-fangsong);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.overlay-station.is-lit .beacon-core {
  background: radial-gradient(circle, #fffdf4 0%, #c88d32 70%, #8f5c16 100%);
  box-shadow: 0 0 10px rgba(200, 141, 50, 0.65);
}

.overlay-station.is-lit .beacon-label {
  background: rgba(127, 28, 21, 0.86);
}

/* 长按寻史彩蛋签 */
.easter-trigger {
  position: absolute;
  left: var(--ex, 22%);
  top: var(--ey, 60%);
  transform: translate(-50%, -50%);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(253, 247, 236, 0.9);
  border: 1px dashed rgba(184, 135, 63, 0.75);
  font-family: var(--font-fangsong);
  font-size: 10.5px;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.easter-trigger.is-holding {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(229, 192, 123, 0.9);
  border-style: solid;
}

.easter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* 章节底部操作区（位于固定漫游进度条之上，清爽无遮挡） */
.station-footer {
  position: relative;
  z-index: 10;
  padding: 0 24px calc(68px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.btn-station {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 21px;
  border-radius: var(--radius-pill);
  background: rgba(253, 247, 236, 0.92);
  border: 1px solid rgba(181, 45, 35, 0.45);
  color: var(--vermilion-deep);
  font-family: var(--font-kai);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: 0 6px 20px rgba(43, 33, 26, 0.12);
  transition: transform 0.18s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-station:active {
  transform: scale(0.97);
}

.btn-station-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 135, 63, 0.22);
}

.overlay-station.is-lit .btn-station {
  background: linear-gradient(135deg, #c13328 0%, #921e16 100%);
  color: #fdf7ec;
  border-color: rgba(229, 192, 123, 0.68);
}

.overlay-station.is-lit .btn-station-dot {
  background: #fde09b;
}

.swipe-cue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-fangsong);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 2px 10px;
}

@media (prefers-reduced-motion: no-preference) {
  .swipe-cue svg {
    animation: cueFloat 2.1s ease-in-out infinite;
  }
}

@keyframes cueFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ==========================================================================
   底部固定极简漫游进度条（同步复刻抖音沉浸探索底部进度条美学）
   ========================================================================== */
.journey-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 26;
  padding: 8px 12px 9px;
  border-radius: 12px;
  background: rgba(253, 247, 236, 0.94);
  border: 1px solid rgba(184, 135, 63, 0.42);
  box-shadow: 0 6px 20px rgba(43, 33, 26, 0.08);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.journey-bar.is-hidden {
  opacity: 0;
  transform: translateY(14px);
}

.journey-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.jb-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.jb-seal {
  flex-shrink: 0;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(181, 45, 35, 0.55);
  background: rgba(181, 45, 35, 0.08);
  color: var(--vermilion);
  font-family: var(--font-kai);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
}

.jb-title {
  font-family: var(--font-kai);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jb-status {
  flex-shrink: 0;
  font-family: var(--font-fangsong);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.jb-track {
  position: relative;
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: rgba(100, 82, 69, 0.16);
  overflow: hidden;
}

.jb-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--vermilion) 100%);
  will-change: width;
}

.jb-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: rgba(253, 247, 236, 0.85);
}

/* ==========================================================================
   Overlay 6：终屏（集章墙 + 实体明信片定制）
   ========================================================================== */
.overlay-finale {
  z-index: 24;
  background-color: rgba(244, 222, 192, 0.96);
  background-image:
    radial-gradient(circle at 82% 10%, rgba(181, 45, 35, 0.08), transparent 45%),
    radial-gradient(circle at 16% 86%, rgba(184, 135, 63, 0.14), transparent 50%);
}

.overlay-finale.is-interactive {
  pointer-events: auto;
}

.finale-scroll-inner {
  position: relative;
  z-index: 10;
  height: 100%;
  overflow-y: auto;
  padding: calc(52px + env(safe-area-inset-top, 0px)) 36px calc(22px + env(safe-area-inset-bottom, 0px)) 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  scrollbar-width: none;
}

.finale-scroll-inner::-webkit-scrollbar {
  display: none;
}

.finale-head {
  text-align: center;
}

.finale-kicker {
  margin: 0 0 3px;
  font-family: var(--font-kai);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--vermilion);
}

.finale-title {
  margin: 0;
  font-family: var(--font-kai);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.finale-relay-line {
  margin: 4px 0 0;
  font-family: var(--font-fangsong);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.finale-relay-line strong {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--vermilion);
}

.seal-tray {
  padding: 11px 13px;
  border-radius: var(--radius-md);
  background: rgba(253, 247, 236, 0.88);
  border: 1px solid var(--gold-line);
  box-shadow: 0 4px 14px rgba(43, 33, 26, 0.06);
}

.seal-tray-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-fangsong);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 9px;
}

.seal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.seal-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 3px 2px;
}

.seal-box {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-family: var(--font-kai);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-faint);
  border: 1.5px dashed rgba(140, 119, 103, 0.45);
  background: rgba(246, 227, 201, 0.35);
}

.seal-name {
  font-family: var(--font-fangsong);
  font-size: 11px;
  color: var(--ink-soft);
}

.postcard-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 13px;
  border-radius: var(--radius-md);
  background: rgba(253, 247, 236, 0.9);
  border: 1px solid var(--gold-line);
  box-shadow: 0 6px 20px rgba(43, 33, 26, 0.07);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-kai);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.scene-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.scene-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
}

.scene-thumb img {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.scene-thumb span {
  font-family: var(--font-fangsong);
  font-size: 10.5px;
  color: var(--ink-soft);
}

.scene-thumb.is-selected {
  border-color: var(--vermilion);
  background: rgba(181, 45, 35, 0.08);
}

.scene-thumb.is-selected span {
  color: var(--vermilion-deep);
  font-weight: 600;
}

.brush-input-wrap {
  position: relative;
}

.text-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(184, 135, 63, 0.48);
  background: #fffcf7;
  font-family: var(--font-kai);
  font-size: 14px;
  color: var(--ink);
}

.text-input:focus {
  outline: none;
  border-color: var(--vermilion);
}

.brush-guide-line {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--vermilion), var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
  pointer-events: none;
}

.text-input:focus + .brush-guide-line {
  transform: scaleX(1);
}

.quote-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quote-chip {
  text-align: left;
  padding: 7px 10px;
  border-radius: 7px;
  font-family: var(--font-fangsong);
  font-size: 12.2px;
  line-height: 1.45;
  color: var(--ink-soft);
  background: #fffcf7;
  border: 1px solid rgba(184, 135, 63, 0.34);
  transition: background-color 0.18s, border-color 0.18s, color 0.18s;
}

.quote-chip.is-selected {
  color: var(--vermilion-deep);
  background: rgba(181, 45, 35, 0.08);
  border-color: var(--vermilion);
  font-weight: 600;
}

.btn-generate {
  width: 100%;
}

.finale-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-rewind-finale,
.btn-reset-finale {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-fangsong);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  background: rgba(246, 227, 201, 0.48);
  border: 1px dashed rgba(184, 135, 63, 0.62);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-rewind-finale:hover,
.btn-reset-finale:hover,
.btn-reset-finale:active {
  color: var(--vermilion-deep);
  background: rgba(181, 45, 35, 0.08);
  border-color: var(--vermilion);
  border-style: solid;
}

.finale-credit {
  text-align: center;
  padding: 2px 0;
}

.finale-credit p {
  margin: 2px 0;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #9e783e;
}

/* 轻提示浮条 */
.toast-banner {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(43, 33, 26, 0.88);
  color: #fdf7ec;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border: 1px solid rgba(229, 192, 123, 0.55);
}

/* ==========================================================================
   原生 <dialog>：宣纸卷轴史话 / 手札彩蛋 / 明信片预览
   ========================================================================== */
dialog.paper-dialog {
  padding: 0;
  border: none;
  background: transparent;
  width: min(92vw, 386px);
  max-height: 88dvh;
  margin: auto;
  overflow: visible;
}

dialog.paper-dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(34, 24, 18, 0.28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.scroll-roller {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 14px;
  z-index: 2;
}

.roller-bar {
  flex: 1;
  height: 11px;
  background: linear-gradient(180deg, #8b5637 0%, #5c331d 55%, #3d2011 100%);
  border-top: 1px solid rgba(229, 192, 123, 0.5);
  border-bottom: 1px solid rgba(229, 192, 123, 0.3);
  box-shadow: 0 3px 10px rgba(34, 20, 12, 0.35);
}

.roller-cap {
  width: 16px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, #f0d394 0%, #b8873f 60%, #7d5822 100%);
  border: 1px solid rgba(255, 243, 212, 0.65);
}

@media (prefers-reduced-motion: no-preference) {
  dialog.scroll-dialog[open] .dialog-sheet {
    animation: scrollUnroll 0.44s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  }
}

@keyframes scrollUnroll {
  0% { clip-path: inset(100% 0 0 0); opacity: 0.7; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}

.dialog-sheet {
  position: relative;
  overflow-y: auto;
  max-height: 80dvh;
  margin: -2px 10px;
  padding: 16px 18px 18px;
  border-left: 1.5px solid rgba(184, 135, 63, 0.58);
  border-right: 1.5px solid rgba(184, 135, 63, 0.58);
  box-shadow: 0 18px 46px rgba(34, 22, 14, 0.3);
  color: var(--ink);
  scrollbar-width: none;
}

.dialog-sheet::-webkit-scrollbar,
.dialog-story-scroll::-webkit-scrollbar {
  display: none;
}

.postcard-sheet {
  margin: 0;
  border-radius: 16px;
  border: 1.5px solid rgba(184, 135, 63, 0.58);
}

.dialog-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dialog-era {
  font-family: var(--font-fangsong);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--vermilion);
  font-weight: 600;
}

.dialog-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: rgba(43, 33, 26, 0.07);
}

.dialog-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-title {
  margin: 0;
  font-family: var(--font-kai);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--vermilion-deep);
}

.dialog-place {
  margin: 2px 0 0;
  font-family: var(--font-fangsong);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.dialog-seal-badge {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-kai);
  font-size: 21px;
  font-weight: 700;
  color: rgba(181, 45, 35, 0.45);
  border: 1.5px dashed rgba(181, 45, 35, 0.45);
  background: rgba(253, 247, 236, 0.5);
}

.dialog-divider {
  height: 1px;
  margin: 10px 0 12px;
  background: linear-gradient(90deg, var(--gold), rgba(184, 135, 63, 0.15));
}

.dialog-story-scroll {
  padding: 10px 12px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(184, 135, 63, 0.12) 0px,
      rgba(184, 135, 63, 0.12) 1px,
      transparent 1px,
      transparent 28px
    ),
    rgba(255, 250, 240, 0.52);
  border: 1px solid rgba(184, 135, 63, 0.34);
  overflow-x: auto;
}

.dialog-story {
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  max-height: 158px;
  min-width: 100%;
  font-family: var(--font-fangsong);
  font-size: 13.5px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.hist-key {
  color: var(--vermilion);
  font-weight: 700;
}

.dialog-quote-box {
  margin: 10px 0;
  padding: 8px 11px;
  border-left: 2.5px solid var(--vermilion);
  background: rgba(181, 45, 35, 0.06);
}

.dialog-quote-box p {
  margin: 0;
  font-family: var(--font-kai);
  font-size: 13px;
  line-height: 1.55;
  color: var(--vermilion-deep);
}

.quiz-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gold-line);
}

.quiz-kicker {
  margin: 0 0 5px;
  font-family: var(--font-fangsong);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.quiz-question {
  margin: 0 0 8px;
  font-family: var(--font-kai);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quiz-opt {
  text-align: left;
  padding: 8px 12px;
  border-radius: 3px;
  font-family: var(--font-fangsong);
  font-size: 13.5px;
  background: rgba(255, 250, 240, 0.78);
  border: 1.2px solid rgba(43, 33, 26, 0.36);
  box-shadow: inset 0 0 0 1px rgba(184, 135, 63, 0.25);
  color: var(--ink);
  transition: background-color 0.18s, border-color 0.18s, color 0.18s;
}

.quiz-opt.is-correct {
  background: rgba(181, 45, 35, 0.12);
  border-color: var(--vermilion);
  color: var(--vermilion-deep);
  font-weight: 700;
}

.quiz-opt.is-wrong {
  background: rgba(100, 82, 69, 0.1);
  border-color: rgba(100, 82, 69, 0.45);
  color: var(--ink-soft);
}

.quiz-feedback {
  margin: 7px 0 0;
  min-height: 1.4em;
  font-size: 12.2px;
  line-height: 1.5;
  color: var(--vermilion-deep);
}

.dialog-footer-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-footer-actions .btn-primary {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.easter-letter-card {
  padding: 18px 20px;
  border-radius: 6px;
  border: 1.5px solid var(--gold);
  box-shadow: 0 20px 50px rgba(30, 18, 10, 0.35), inset 0 0 0 4px rgba(184, 135, 63, 0.16);
  color: var(--ink);
}

.easter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.easter-badge {
  font-family: var(--font-fangsong);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--vermilion);
  padding: 2px 8px;
  border: 1px solid rgba(181, 45, 35, 0.45);
  border-radius: 3px;
}

.easter-title {
  margin: 0 0 10px;
  font-family: var(--font-kai);
  font-size: 21px;
  color: var(--vermilion-deep);
  letter-spacing: 0.1em;
}

.easter-excerpt {
  margin: 0;
  font-family: var(--font-kai);
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink);
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(255, 250, 240, 0.56);
}

.easter-source {
  margin: 10px 0 14px;
  text-align: right;
  font-family: var(--font-fangsong);
  font-size: 12px;
  color: var(--ink-soft);
}

.easter-dismiss-form {
  display: flex;
  justify-content: center;
}

.postcard-modal-title {
  margin: 0;
  font-family: var(--font-kai);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--vermilion-deep);
}

.postcard-preview-wrap {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(43, 33, 26, 0.16);
}

.postcard-preview-wrap img {
  width: auto;
  max-width: 100%;
  max-height: 55dvh;
  display: block;
  margin: 0 auto;
}

.postcard-save-tip {
  margin: 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-kai);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .tip-arrow {
    animation: tipArrowFloat 1.5s ease-in-out infinite;
  }
}

@keyframes tipArrowFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}


/* ==========================================================================
   60fps 飞行沉浸退让 + 诗意微字幕胶囊 + [hidden] 兜底
   ========================================================================== */
[hidden] {
  display: none !important;
}

.top-hud,
.side-rail {
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.h5-stage.is-flying .top-hud {
  opacity: 0.48;
}

.h5-stage.is-flying .side-rail {
  opacity: 0.38;
  transform: translateY(-50%) translateX(3px);
}

.flight-caption {
  position: absolute;
  top: 19%;
  left: 50%;
  transform: translate3d(-50%, 6px, 0);
  z-index: 16;
  padding: 6px 18px;
  padding-left: calc(18px + 0.11em);
  border-radius: 999px;
  background: rgba(43, 33, 26, 0.78);
  border: 1px solid rgba(229, 192, 123, 0.56);
  box-shadow: 0 6px 18px rgba(30, 18, 10, 0.2);
  font-family: var(--font-kai);
  font-size: 13.5px;
  letter-spacing: 0.22em;
  color: #fdf7ec;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.flight-caption.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}
