/* ============================================================
   长征·警魂 —— 视觉系统
   深墨 / 宣纸 / 血红 / 星金
   ============================================================ */

:root {
  --ink: #0B0A08;
  --ink-2: #12100C;
  --paper: #E8DCC8;
  --paper-80: rgba(232, 220, 200, 0.80);
  --paper-62: rgba(232, 220, 200, 0.62);
  --paper-45: rgba(232, 220, 200, 0.45);
  --paper-30: rgba(232, 220, 200, 0.30);
  --paper-15: rgba(232, 220, 200, 0.15);
  --paper-08: rgba(232, 220, 200, 0.08);
  --red: #B31217;
  --red-bright: #E23B2E;
  --gold: #C9A227;
  --gold-soft: #E0B84E;
  --cyan: #3E5C63;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(22px, 6vw, 96px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--red); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #070605; }
::-webkit-scrollbar-thumb { background: #2a241b; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

button { font: inherit; color: inherit; }

/* ---------- 全局质感层 ---------- */

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  pointer-events: none;
  mix-blend-mode: screen;
}

.grain {
  position: fixed;
  inset: -60%;
  width: 220%;
  height: 220%;
  z-index: 70;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 9s steps(8) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  12%  { transform: translate(-3%, -2%); }
  25%  { transform: translate(2%, 3%); }
  37%  { transform: translate(-2%, 1%); }
  50%  { transform: translate(3%, -3%); }
  62%  { transform: translate(-1%, 2%); }
  75%  { transform: translate(2%, 1%); }
  87%  { transform: translate(-3%, -1%); }
  100% { transform: translate(0, 0); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 42%, rgba(0, 0, 0, 0.42) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, transparent 12%, transparent 88%, rgba(0, 0, 0, 0.42) 100%);
}

.progress-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 75;
  background: rgba(232, 220, 200, 0.06);
  pointer-events: none;
}

.progress-line i {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--red), var(--gold-soft));
  box-shadow: 0 0 14px rgba(201, 162, 39, 0.65);
  transition: width 0.12s linear;
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 65;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: calc(22px + env(safe-area-inset-top)) var(--pad) 34px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--paper-62);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 6, 5, 0.92) 0%, rgba(7, 6, 5, 0.45) 55%, transparent 100%);
  text-transform: uppercase;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.hud-star {
  color: var(--red-bright);
  font-size: 11px;
  text-shadow: 0 0 12px rgba(226, 59, 46, 0.9);
  animation: starPulse 3.4s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

.hud-now {
  text-align: center;
  color: var(--paper-45);
  transition: opacity 0.4s ease;
}

.hud-now .hud-sep { margin: 0 8px; color: var(--paper-15); }

.hud-progress {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 999px;
  background: rgba(11, 10, 8, 0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--gold-soft);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(201, 162, 39, 0.06);
  transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
}

.hud-progress:hover,
.hud-progress:focus-visible {
  border-color: var(--gold);
  background: rgba(22, 18, 13, 0.82);
  color: var(--paper);
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.28), 0 6px 24px rgba(0, 0, 0, 0.4);
}

.hud-map-icon {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.hud-map-text {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.hud-pct-wrap {
  display: inline-flex;
  align-items: baseline;
  color: var(--paper-62);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.hud-pct-sign { margin-left: 1px; color: var(--paper-30); }

/* ---------- 右侧章节导航 ---------- */

.rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
}

.rail::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--paper-15) 12%, var(--paper-15) 88%, transparent);
}

.rail-item {
  position: relative;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid var(--paper-30);
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  transition: all 0.45s var(--ease);
}

.rail-item::after {
  content: attr(data-label);
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--paper-45);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s var(--ease);
}

.rail-item:hover::after,
.rail-item.active::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.rail-item:hover { border-color: var(--gold); }

.rail-item.active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(201, 162, 39, 0.75);
  transform: scale(1.25);
}

.rail-item.active::after { color: var(--gold-soft); }

/* ---------- 迷你路线图 ---------- */

.minimap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 55;
  width: 56px;
  height: 56px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
  background: rgba(11, 10, 8, 0.58);
  border: 1px solid var(--paper-15);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease),
    width 0.55s var(--ease),
    height 0.55s var(--ease),
    border-radius 0.55s var(--ease),
    border-color 0.4s var(--ease),
    background 0.4s var(--ease);
}

body.scrolled .minimap {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

body.at-end .minimap {
  opacity: 0;
  pointer-events: none;
}

.minimap:hover,
.minimap:focus-visible {
  width: 120px;
  height: 154px;
  padding: 9px 9px 6px;
  border-radius: 2px;
  border-color: rgba(201, 162, 39, 0.6);
  background: rgba(18, 16, 12, 0.72);
}

.minimap svg { width: 100%; flex: 0 1 auto; display: block; }

.minimap:hover svg,
.minimap:focus-visible svg { flex: 1; }

.minimap-label {
  display: none;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--paper-45);
}

.minimap:hover .minimap-label,
.minimap:focus-visible .minimap-label { display: block; }

/* ---------- 背景音乐开关 ---------- */

.sound-toggle {
  position: fixed;
  right: 22px;
  top: calc(76px + env(safe-area-inset-top));
  z-index: 56;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 18px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 999px;
  background: rgba(11, 10, 8, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--paper-62);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: border-color 0.35s ease, background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
  border-color: var(--gold);
  background: rgba(22, 18, 13, 0.82);
  color: var(--paper);
  box-shadow: 0 0 24px rgba(201, 162, 39, 0.22), 0 6px 24px rgba(0, 0, 0, 0.4);
}

.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}

.sound-bars i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 1px;
  background: var(--gold);
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

.sound-toggle.on {
  border-color: rgba(201, 162, 39, 0.9);
  color: var(--gold-soft);
}

.sound-toggle.on .sound-bars i {
  opacity: 1;
  animation: soundEq 1.15s ease-in-out infinite;
}

.sound-toggle.on .sound-bars i:nth-child(2) { animation-delay: 0.18s; }
.sound-toggle.on .sound-bars i:nth-child(3) { animation-delay: 0.36s; }
.sound-toggle.on .sound-bars i:nth-child(4) { animation-delay: 0.1s; }

@keyframes soundEq {
  0%, 100% { height: 3px; }
  50% { height: 13px; }
}

@media (max-width: 720px) {
  .sound-toggle {
    right: 14px;
    top: calc(56px + env(safe-area-inset-top));
    padding: 9px 14px;
    gap: 8px;
    font-size: 9px;
  }
  .sound-bars { height: 11px; }
  .sound-toggle.on .sound-bars i { animation-name: soundEqMobile; }
  @keyframes soundEqMobile {
    0%, 100% { height: 2px; }
    50% { height: 11px; }
  }
}

/* ---------- 全屏路线图 ---------- */

.map-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(6, 5, 4, 0.9);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.map-overlay.open { opacity: 1; visibility: visible; }

.map-panel {
  width: min(94vw, 1080px);
  height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3vw, 42px);
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(179, 18, 23, 0.10), transparent 55%),
    linear-gradient(160deg, rgba(24, 20, 15, 0.92), rgba(9, 8, 6, 0.96));
  border: 1px solid var(--paper-15);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.7s var(--ease);
}

.map-overlay.open .map-panel { transform: none; }

.map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--paper-08);
}

.map-kicker {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--gold);
}

.map-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.map-close {
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--paper-30);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--paper-62);
  cursor: pointer;
  transition: all 0.3s ease;
}

.map-close:hover { border-color: var(--red-bright); color: var(--paper); }

.map-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 10px 0;
}

.map-stage svg { width: 100%; height: 100%; display: block; }

.map-foot {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--paper-08);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--paper-45);
}

.map-foot .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 1px;
}

.dot-red { background: var(--red-bright); box-shadow: 0 0 8px var(--red-bright); }
.dot-gold { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.map-tip { margin-left: auto; color: var(--paper-30); }

/* SVG 路线节点 */

.map-node { cursor: pointer; }

.map-node .node-dot {
  transition: fill 0.35s ease, r 0.35s var(--ease);
}

.map-node .node-ring {
  opacity: 0.35;
  transition: opacity 0.35s ease, r 0.35s var(--ease);
}

.map-node:hover .node-dot,
.map-node.active .node-dot { fill: var(--gold-soft); }

.map-node:hover .node-ring,
.map-node.active .node-ring { opacity: 1; }

.map-node text {
  transition: fill 0.35s ease;
  font-family: var(--sans);
}

.map-node:hover text,
.map-node.active text { fill: var(--gold-soft); }

.route-star { transition: transform 0.08s linear; }

#minimap-svg .map-node { pointer-events: none; }

/* ---------- 开屏 ---------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--ink);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.boot.done { opacity: 0; visibility: hidden; }

.boot-star {
  color: var(--gold);
  font-size: 30px;
  text-shadow: 0 0 30px rgba(201, 162, 39, 0.8);
  animation: starPulse 2.2s ease-in-out infinite;
}

.boot-text {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.44em;
  color: var(--paper-45);
  padding-left: 0.44em;
}

/* ---------- 封面 ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -4%;
  z-index: 0;
  background:
    radial-gradient(100% 80% at 68% 24%, rgba(201, 162, 39, 0.16), transparent 58%),
    radial-gradient(80% 70% at 30% 70%, rgba(179, 18, 23, 0.14), transparent 60%),
    linear-gradient(160deg, #17130e 0%, #0b0a08 55%, #050403 100%);
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.06) brightness(0.66);
  animation: heroZoom 22s var(--ease) forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.1); }
  to   { transform: scale(1); }
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(8, 7, 6, 0.88) 0%, rgba(8, 7, 6, 0.52) 44%, rgba(8, 7, 6, 0.08) 76%, rgba(8, 7, 6, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 7, 6, 0.68) 0%, transparent 26%, transparent 62%, rgba(8, 7, 6, 0.96) 100%);
}

.hero-content {
  position: relative;
  z-index: 40;
  max-width: 900px;
  padding-bottom: 4vh;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 30px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold-soft);
  animation: heroIn 1.4s 0.25s var(--ease) both;
}

.hero-kicker::before {
  content: "";
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-title {
  margin: 0;
  font-size: clamp(64px, 12vw, 168px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 6px 60px rgba(0, 0, 0, 0.55);
  animation: heroIn 1.5s 0.4s var(--ease) both;
}

.hero-title em {
  font-style: normal;
  color: var(--red-bright);
  text-shadow: 0 0 40px rgba(226, 59, 46, 0.55);
}

.hero-sub {
  margin: 30px 0 0;
  font-size: clamp(16px, 2.1vw, 26px);
  letter-spacing: 0.34em;
  color: var(--paper-80);
  animation: heroIn 1.5s 0.62s var(--ease) both;
}

.hero-meta {
  margin: 18px 0 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--paper-45);
  animation: heroIn 1.5s 0.8s var(--ease) both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: none; }
}

.hero-corner {
  position: absolute;
  z-index: 40;
  right: var(--pad);
  top: 18vh;
  writing-mode: vertical-rl;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--paper-30);
}

.scroll-hint {
  position: absolute;
  z-index: 40;
  left: var(--pad);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--paper-45);
  animation: heroIn 1.4s 1.1s var(--ease) both;
}

.scroll-line {
  position: relative;
  display: block;
  width: 54px;
  height: 1px;
  background: var(--paper-15);
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-100%);
  animation: scrollSweep 2.6s ease-in-out infinite;
}

@keyframes scrollSweep {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* ---------- 章节 ---------- */

.chapter {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--pad) clamp(84px, 12vh, 150px);
  overflow: hidden;
}

.chapter-bg {
  position: absolute;
  inset: -8%;
  z-index: 0;
  overflow: hidden;
  background: var(--ink);
}

.chapter-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.06) brightness(0.66);
  transform: translate3d(0, calc((var(--p, 0.5) - 0.5) * 7vh), 0) scale(calc(1.14 - var(--p, 0.5) * 0.14));
  will-change: transform;
}

.chapter-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(8, 7, 6, 0.9) 0%, rgba(8, 7, 6, 0.5) 42%, transparent 74%),
    linear-gradient(180deg, rgba(8, 7, 6, 0.7) 0%, transparent 24%, transparent 54%, rgba(8, 7, 6, 0.94) 100%);
}

.chapter-ghost {
  position: absolute;
  right: -0.03em;
  bottom: -0.18em;
  z-index: 1;
  font-size: 46vh;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 220, 200, 0.05);
  user-select: none;
  pointer-events: none;
}

.chapter-aside {
  position: absolute;
  z-index: 40;
  right: calc(var(--pad) + 58px);
  top: 17vh;
  writing-mode: vertical-rl;
  display: flex;
  gap: 22px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--paper-30);
}

.chapter-content {
  position: relative;
  z-index: 40;
  width: min(760px, 100%);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--gold-soft);
}

.kicker::before {
  content: "";
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.chapter-title {
  margin: 0 0 24px;
  font-size: clamp(40px, 6.4vw, 86px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.chapter-title .t-red { color: var(--red-bright); }

.chapter-lead {
  max-width: 620px;
  margin: 0;
  font-size: clamp(14px, 1.45vw, 17px);
  line-height: 2.05;
  color: var(--paper-80);
  text-align: justify;
  text-justify: inter-ideograph;
}

.fact {
  position: relative;
  max-width: 620px;
  margin: 30px 0 0;
  padding: 15px 20px 15px 22px;
  border-left: 2px solid var(--red);
  background: linear-gradient(90deg, rgba(20, 16, 12, 0.62), rgba(20, 16, 12, 0.18));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--paper-62);
}

.fact::before {
  content: "史实";
  display: inline-block;
  margin-right: 10px;
  padding: 1px 6px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.16em;
  color: var(--gold-soft);
  vertical-align: 2px;
}

.chapter-foot {
  display: flex;
  gap: 26px;
  margin-top: 30px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--paper-30);
}

.chapter-foot b {
  font-weight: 400;
  color: var(--paper-62);
}

/* 入场揭示 */

.reveal {
  opacity: 0;
  transform: translateY(34px);
  filter: blur(10px);
  transition:
    opacity 1.25s var(--ease),
    transform 1.25s var(--ease),
    filter 1.25s var(--ease);
  transition-delay: calc(var(--i, 0) * 110ms);
}

.in .reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ---------- 数字长卷 ---------- */

.numbers {
  position: relative;
  padding: 15vh var(--pad);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(179, 18, 23, 0.13), transparent 62%),
    linear-gradient(180deg, var(--ink) 0%, #0d0b08 50%, var(--ink) 100%);
}

.numbers::before {
  content: "数";
  position: absolute;
  right: -0.02em;
  top: 8vh;
  font-size: 52vh;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 220, 200, 0.04);
  z-index: 1;
  pointer-events: none;
}

.numbers-head { position: relative; z-index: 40; max-width: 760px; margin-bottom: 72px; }

.section-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.34em;
  color: var(--gold-soft);
}

.section-kicker::before {
  content: "";
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-title {
  margin: 0 0 22px;
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.section-lead {
  margin: 0;
  max-width: 560px;
  font-size: 14px;
  line-height: 2;
  color: var(--paper-62);
}

.numbers-grid {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--paper-08);
  border: 1px solid var(--paper-08);
}

.num-card {
  position: relative;
  min-height: 200px;
  padding: 38px 30px 30px;
  background: var(--ink);
  overflow: hidden;
  transition: background 0.6s var(--ease);
}

.num-card::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.35), transparent);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.num-card:hover { background: rgba(201, 162, 39, 0.035); }
.num-card:hover::after { opacity: 1; }

.num-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: clamp(44px, 4.6vw, 76px);
  line-height: 1;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  transition: text-shadow 0.6s ease;
}

.num-card:hover .num-value { text-shadow: 0 0 30px rgba(201, 162, 39, 0.45); }

.num-unit {
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--paper-45);
  font-family: var(--sans);
}

.num-prefix {
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--paper-45);
  font-family: var(--sans);
  margin-right: 2px;
}

.num-label {
  margin: 18px 0 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--paper-62);
}

.num-note {
  margin: 8px 0 0;
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.7;
  color: var(--paper-30);
}

.numbers-note {
  position: relative;
  z-index: 40;
  margin: 26px 0 0;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--paper-30);
}

/* ---------- 尾章 ---------- */

.epilogue {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 10vh var(--pad);
  overflow: hidden;
  text-align: center;
}

.epilogue-bg {
  position: absolute;
  inset: -6%;
  z-index: 0;
  background:
    radial-gradient(80% 70% at 50% 42%, rgba(201, 162, 39, 0.14), transparent 60%),
    linear-gradient(160deg, #14100b 0%, #0b0a08 60%, #050403 100%);
  overflow: hidden;
}

.epilogue-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.35) brightness(0.2) contrast(1.1) blur(2.5px);
  transform: scale(1.1);
}

.epilogue-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(60% 55% at 50% 46%, rgba(8, 7, 6, 0.45) 0%, rgba(8, 7, 6, 0.86) 65%, rgba(8, 7, 6, 0.97) 100%);
}

.epilogue-inner { position: relative; z-index: 40; max-width: 900px; }

.epilogue-title {
  margin: 0 0 20px;
  font-size: clamp(34px, 5.2vw, 68px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.epilogue-lead {
  margin: 0 auto;
  max-width: 600px;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--paper-62);
}

.star-button {
  position: relative;
  width: 138px;
  height: 138px;
  margin: 34px auto 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.star-core {
  position: relative;
  z-index: 2;
  font-size: 58px;
  line-height: 1;
  color: rgba(201, 162, 39, 0.28);
  text-shadow: 0 0 0 rgba(201, 162, 39, 0);
  transition: color 1.4s var(--ease), text-shadow 1.4s var(--ease), transform 1.4s var(--ease);
}

.star-button:hover .star-core { color: rgba(201, 162, 39, 0.55); }

.star-ring {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: 50%;
  animation: ringPulse 3.6s ease-out infinite;
}

.star-ring-2 { animation-delay: 1.8s; }

@keyframes ringPulse {
  0% { transform: scale(0.82); opacity: 0.5; }
  70% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

.star-button.lit .star-core {
  color: var(--gold-soft);
  text-shadow: 0 0 34px rgba(224, 184, 78, 0.95), 0 0 90px rgba(201, 162, 39, 0.55);
  transform: scale(1.08);
}

.star-tip {
  margin: 2px 0 0;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--paper-30);
  transition: opacity 0.8s ease;
}

.star-button.lit ~ .star-tip { opacity: 0; }

.oath {
  margin: 0 auto;
  max-width: 560px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition:
    max-height 1.2s var(--ease),
    margin 1.2s var(--ease),
    opacity 1s var(--ease),
    transform 1s var(--ease);
}

.oath.show {
  max-height: 380px;
  margin-top: 24px;
  opacity: 1;
  transform: none;
}

.oath-line {
  margin: 0;
  padding: 8px 0;
  font-size: clamp(19px, 2.3vw, 27px);
  letter-spacing: 0.42em;
  color: var(--paper-80);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}

.oath.show .oath-line { opacity: 1; transform: none; }
.oath.show .oath-line:nth-child(1) { transition-delay: 0.15s; }
.oath.show .oath-line:nth-child(2) { transition-delay: 0.45s; }
.oath.show .oath-line:nth-child(3) { transition-delay: 0.75s; }
.oath.show .oath-line:nth-child(4) { transition-delay: 1.05s; }

.oath-sign {
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--paper-30);
  opacity: 0;
  transition: opacity 1.4s ease 1.5s;
}

.oath.show .oath-sign { opacity: 1; }

.epilogue-fact {
  margin: 28px 0 0;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--paper-30);
}

/* ---------- 页脚 ---------- */

.site-footer {
  position: relative;
  z-index: 50;
  padding: 10vh var(--pad) 7vh;
  background: #070605;
  border-top: 1px solid var(--paper-08);
}

.footer-inner { max-width: 1080px; margin: 0 auto; }

.footer-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--paper-08);
}

.footer-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.footer-title span {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--paper-30);
  font-weight: 400;
}

.footer-meta {
  text-align: right;
  font-family: var(--sans);
  font-size: 9px;
  line-height: 2;
  letter-spacing: 0.18em;
  color: var(--paper-30);
}

.footer-team {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.8fr;
  gap: 1px;
  margin: 34px 0;
  background: var(--paper-08);
  border: 1px solid var(--paper-08);
}

.team-item { padding: 22px 24px; background: #070605; }

.team-item dt {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--paper-30);
}

.team-item dd {
  margin: 10px 0 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--paper-62);
}

.footer-links { border-top: 1px solid var(--paper-08); }

.footer-links details { border-bottom: 1px solid var(--paper-08); }

.footer-links summary {
  padding: 18px 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--paper-62);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links summary::-webkit-details-marker { display: none; }

.footer-links summary::after {
  content: "+";
  font-size: 14px;
  color: var(--gold);
  transition: transform 0.4s var(--ease);
}

.footer-links details[open] summary::after { transform: rotate(45deg); }

.footer-detail-body {
  padding: 0 0 22px;
  max-width: 760px;
}

.footer-detail-body p {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 2;
  color: var(--paper-45);
}

.footer-sources {
  margin: 0;
  padding: 0 0 22px 18px;
  font-size: 11px;
  line-height: 2;
  color: var(--paper-45);
}

.footer-note {
  margin: 34px 0 0;
  max-width: 760px;
  font-family: var(--sans);
  font-size: 9px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--paper-30);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1180px) {
  .chapter-aside { display: none; }
}

@media (max-width: 900px) {
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .rail { display: none; }
}

@media (max-width: 720px) {
  :root { --pad: 22px; }

  .hud {
    grid-template-columns: auto 1fr auto;
    padding: calc(16px + env(safe-area-inset-top)) 18px 26px;
    font-size: 8px;
    letter-spacing: 0.14em;
    gap: 8px;
  }

  .hud-brand span:last-child { display: none; }
  .hud-now { text-align: center; font-size: 8px; }
  .hud-now .hud-sep { margin: 0 5px; }
  .hud-progress { padding: 7px 10px; gap: 6px; font-size: 8px; }
  .hud-map-icon { width: 12px; height: 12px; }
  .hud-map-text { font-size: 9px; letter-spacing: 0.1em; }
  .hud-pct-wrap { font-size: 8px; }

  .minimap { display: none; }

  .hero { padding: 0 22px; align-items: flex-end; padding-bottom: 12vh; }
  .hero-title { font-size: clamp(40px, 13.5vw, 64px); letter-spacing: 0.02em; }
  .hero-sub { font-size: 14px; letter-spacing: 0.24em; margin-top: 20px; }
  .hero-meta { font-size: 8px; letter-spacing: 0.18em; }
  .hero-kicker { font-size: 9px; margin-bottom: 20px; letter-spacing: 0.28em; }
  .hero-corner { display: none; }
  .scroll-hint { left: 22px; bottom: 22px; font-size: 8px; }

  .chapter {
    align-items: flex-end;
    padding: 0 22px calc(74px + env(safe-area-inset-bottom));
  }

  .chapter-shade {
    background:
      linear-gradient(180deg, rgba(8, 7, 6, 0.55) 0%, transparent 22%, transparent 40%, rgba(8, 7, 6, 0.92) 82%, var(--ink) 100%);
  }

  .chapter-aside { display: none; }
  .chapter-ghost { font-size: 33vh; bottom: -0.1em; opacity: 0.7; }
  .chapter-title { font-size: clamp(34px, 10.4vw, 52px); line-height: 1.16; margin-bottom: 18px; }
  .chapter-lead { font-size: 13.5px; line-height: 1.95; }
  .fact { margin-top: 22px; padding: 13px 14px 13px 16px; font-size: 11px; line-height: 1.8; }
  .kicker { font-size: 9px; letter-spacing: 0.24em; margin-bottom: 16px; }
  .chapter-foot { gap: 16px; font-size: 8px; margin-top: 22px; }

  .numbers { padding: 11vh 22px; }
  .numbers-head { margin-bottom: 44px; }
  .section-title { font-size: clamp(30px, 8.6vw, 44px); }
  .section-lead { font-size: 12.5px; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .num-card { min-height: 158px; padding: 26px 18px 22px; }
  .num-value { font-size: clamp(38px, 11vw, 54px); }
  .num-unit { font-size: 11px; }
  .num-label { font-size: 11px; margin-top: 12px; }
  .num-note { font-size: 8px; }

  .epilogue { padding: 8vh 22px; }
  .epilogue-title { font-size: clamp(28px, 8.4vw, 42px); margin-bottom: 16px; }
  .epilogue-lead { font-size: 12px; line-height: 1.9; }
  .star-button { width: 112px; height: 112px; margin-top: 26px; }
  .star-core { font-size: 42px; }
  .oath-line { font-size: 17px; letter-spacing: 0.28em; padding: 7px 0; }
  .oath-sign { font-size: 9px; line-height: 1.9; }
  .epilogue-fact { margin-top: 22px; font-size: 8px; }

  .footer-top { flex-direction: column; align-items: flex-start; gap: 18px; }
  .footer-meta { text-align: left; }
  .footer-team { grid-template-columns: repeat(2, 1fr); }
  .site-footer { padding: 8vh 22px 6vh; }

  .map-panel { width: 100vw; height: 100vh; height: 100svh; padding: 18px; border: 0; }
  .map-foot { gap: 14px; flex-wrap: wrap; font-size: 8px; }
  .map-tip { display: none; }
}

@media (max-width: 380px) {
  .numbers-grid { grid-template-columns: 1fr; }
}

/* ---------- 可访问性 ---------- */

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .grain { animation: none; }
}


/* 矮屏适配：保证一屏内完整呈现章节 */
@media (max-height: 740px) {
  .chapter { padding-bottom: 54px; }
  .chapter-title { font-size: clamp(32px, 4.8vw, 62px); margin-bottom: 14px; }
  .chapter-lead { font-size: 12.5px; line-height: 1.85; }
  .fact { margin-top: 16px; padding: 10px 14px; font-size: 11px; line-height: 1.75; }
  .chapter-foot { margin-top: 14px; }
  .chapter-ghost { font-size: 34vh; }
  .epilogue { padding: 5vh var(--pad); }
  .epilogue-title { font-size: clamp(28px, 4.4vw, 52px); }
  .epilogue-lead { font-size: 12px; }
  .star-button { width: 96px; height: 96px; margin-top: 16px; }
  .star-core { font-size: 38px; }
  .oath-line { padding: 6px 0; }
  .epilogue-fact { margin-top: 18px; }
}
