/* =========================================================
   长征路上 — immersive seven-stop story
   ========================================================= */

.story-page {
  --route-accent: #b33236;
  background: var(--ink);
  padding-bottom: 0;
}

.story-page .site-header {
  display: none;
}

/* ---------- top bar ---------- */

.story-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 95;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: linear-gradient(180deg, rgba(7, 7, 6, 0.9) 0%, rgba(7, 7, 6, 0.54) 58%, rgba(7, 7, 6, 0) 100%);
  pointer-events: none;
}

.story-top > * {
  pointer-events: auto;
}

.story-back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(236, 228, 212, 0.24);
  border-radius: 50%;
  color: var(--paper-2);
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.story-back svg {
  width: 18px;
  height: 18px;
  margin-left: -2px;
}

.story-back:hover {
  border-color: var(--gold);
  color: var(--gold-2);
  background: rgba(236, 228, 212, 0.04);
}

.story-top__center {
  position: absolute;
  left: 50%;
  top: 17px;
  transform: translateX(-50%);
  max-width: 54vw;
  text-align: center;
  pointer-events: none;
}

.story-top__title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  color: var(--paper);
}

.story-top__meta {
  margin-top: 1px;
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--paper-2);
}

.story-menu-btn:hover {
  color: var(--gold-2);
}

.story-menu-btn__lines {
  position: relative;
  display: block;
  width: 18px;
  height: 9px;
}

.story-menu-btn__lines::before,
.story-menu-btn__lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: currentColor;
}

.story-menu-btn__lines::before {
  top: 0;
}

.story-menu-btn__lines::after {
  bottom: 0;
}

.story-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 96;
  height: 2px;
  background: rgba(236, 228, 212, 0.1);
}

.story-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 82%, var(--gold-2) 100%);
  transition: width 0.15s linear;
}

/* ---------- side rail ---------- */

.story-rail {
  position: fixed;
  left: 26px;
  top: 50%;
  z-index: 70;
  display: flex;
  flex-direction: column;
  transform: translateY(-50%);
}

.story-rail::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: rgba(236, 228, 212, 0.14);
}

.story-rail button {
  position: relative;
  display: flex;
  align-items: center;
  width: 22px;
  height: 24px;
  padding: 0;
}

.story-rail button::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #625a4e;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s ease, box-shadow 0.3s ease;
}

.story-rail button::after {
  content: attr(data-label);
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  padding: 3px 7px;
  background: rgba(7, 7, 6, 0.88);
  border: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--paper-2);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.story-rail button:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.story-rail button.is-active::before {
  width: 7px;
  height: 7px;
  background: var(--gold-2);
  box-shadow: 0 0 0 4px rgba(199, 167, 107, 0.13);
}

/* ---------- chapter shell ---------- */

.story-main {
  position: relative;
  z-index: 1;
}

.chapter {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 128px 0 146px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid rgba(236, 228, 212, 0.08);
}

.chapter__bg {
  position: absolute;
  inset: -7%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  filter: saturate(0.72) brightness(0.82);
  transform: translate3d(0, 0, 0) scale(1.06);
  will-change: transform;
}

.chapter__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 7, 6, 0.97) 0%, rgba(7, 7, 6, 0.8) 40%, rgba(7, 7, 6, 0.42) 72%, rgba(7, 7, 6, 0.72) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(7, 7, 6, 0) 28%, rgba(7, 7, 6, 0) 72%, rgba(7, 7, 6, 0.78) 100%);
}

.chapter::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("../images/grain.png");
  opacity: 0.28;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.chapter__inner {
  position: relative;
  z-index: 3;
  width: min(1080px, calc(100% - 100px));
  margin: 0 auto;
}

.chapter[data-tone="river"] {
  --accent: #b33236;
}

.chapter[data-tone="red"] {
  --accent: #d04444;
}

.chapter[data-tone="ember"] {
  --accent: #b25a36;
}

.chapter[data-tone="amber"] {
  --accent: #c69a58;
}

.chapter[data-tone="snow"] {
  --accent: #90a7b2;
}

.chapter[data-tone="grass"] {
  --accent: #9ba06a;
}

.chapter[data-tone="cold"] {
  --accent: #7f8d94;
}

.chapter[data-tone="dawn"] {
  --accent: #cc9c61;
}

.chapter[data-tone="echo"] {
  --accent: #b33236;
}

/* ---------- chapter header ---------- */

.chapter__head {
  max-width: 820px;
  margin-bottom: 44px;
}

.chapter__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 24px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1.6;
  color: var(--muted);
}

.chapter__no {
  color: var(--accent);
  font-family: "Bodoni 72", Didot, "Times New Roman", var(--serif);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.chapter__no::after {
  content: "";
  display: inline-block;
  width: 30px;
  height: 1px;
  margin-left: 12px;
  vertical-align: middle;
  background: var(--accent);
  opacity: 0.55;
}

.chapter__date {
  color: var(--muted-2);
}

.chapter__title {
  font-family: var(--serif);
  font-size: clamp(54px, 8.2vw, 112px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.chapter__watermark {
  position: absolute;
  right: -0.05em;
  bottom: -0.24em;
  z-index: -1;
  font-family: "Bodoni 72", Didot, "Times New Roman", var(--serif);
  font-size: clamp(160px, 25vw, 360px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 228, 212, 0.08);
  pointer-events: none;
  user-select: none;
}

/* ---------- chapter body ---------- */

.chapter__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) 306px;
  gap: 82px;
  align-items: start;
}

.chapter__main {
  max-width: 690px;
}

.chapter__lead {
  position: relative;
  margin-bottom: 32px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.55vw, 34px);
  font-weight: 500;
  line-height: 1.72;
  letter-spacing: 0.01em;
  color: var(--paper);
}

.chapter__copy {
  max-width: 650px;
}

.chapter__copy p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2.18;
  color: #c7bba8;
}

.chapter__copy p + p {
  margin-top: 18px;
}

.chapter__copy p:first-child::first-letter {
  color: var(--paper);
}

.chapter__quote {
  margin-top: 40px;
  padding: 4px 0 4px 22px;
  border-left: 1px solid var(--accent);
}

.chapter__quote p {
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.85;
  color: var(--gold-2);
}

.chapter__quote cite {
  display: block;
  margin-top: 12px;
  font-size: 10px;
  font-style: normal;
  line-height: 1.8;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

/* ---------- typewriter ---------- */

.typewriter {
  position: relative;
}

.typewriter .tw-ghost {
  visibility: hidden;
}

.typewriter .tw-text {
  position: absolute;
  inset: 0;
}

.typewriter.is-typing .tw-text::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 4px;
  vertical-align: -0.13em;
  background: var(--gold);
  animation: caret-blink 0.85s steps(1, end) infinite;
}

@keyframes caret-blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

/* ---------- aside / numbers ---------- */

.chapter__aside {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.story-stat {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.story-stat:first-child {
  padding-top: 0;
}

.story-stat strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: "Bodoni 72", Didot, "Times New Roman", var(--serif);
  font-size: clamp(46px, 5vw, 65px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.story-stat strong small {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.story-stat > span {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.story-stat--text strong {
  font-family: var(--serif);
  font-size: clamp(24px, 2.7vw, 34px);
  letter-spacing: 0.06em;
}

.story-stat--text strong small {
  font-size: 11px;
}

.chapter__note {
  margin-top: 20px;
  font-size: 10px;
  line-height: 1.9;
  color: var(--muted-2);
}

/* ---------- chart ---------- */

.chart {
  margin-top: 26px;
  padding: 17px 16px 12px;
  border: 1px solid var(--line);
  background: rgba(7, 7, 6, 0.52);
}

.chart__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chart__title {
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.7;
  color: var(--paper-2);
}

.chart__unit {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.chart__plot {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 142px;
  margin-top: 24px;
  padding-top: 16px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(to top, transparent 0, transparent 34px, rgba(236, 228, 212, 0.07) 35px);
}

.chart__bar {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.chart__fill {
  position: relative;
  width: 100%;
  max-width: 27px;
  height: 0;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(168, 39, 44, 0.28) 100%);
  transition: height 1.25s var(--ease);
}

.chart.is-drawn .chart__fill {
  height: var(--h);
}

.chart__fill::before {
  content: attr(data-value);
  position: absolute;
  left: 50%;
  top: -20px;
  transform: translateX(-50%);
  font-family: "Bodoni 72", Didot, "Times New Roman", var(--serif);
  font-size: 11px;
  line-height: 1;
  color: var(--paper-2);
  white-space: nowrap;
}

.chart__labels {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.chart__label {
  flex: 1;
  text-align: center;
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  white-space: nowrap;
}

.chart__note {
  margin-top: 12px;
  font-size: 9px;
  line-height: 1.7;
  color: var(--muted-2);
}

/* ---------- intro ---------- */

.chapter--intro {
  min-height: 100vh;
  padding-top: 112px;
}

.chapter--intro .chapter__bg {
  opacity: 0.48;
  background-position: center 55%;
}

.chapter--intro .chapter__shade {
  background:
    linear-gradient(90deg, rgba(7, 7, 6, 0.94) 0%, rgba(7, 7, 6, 0.72) 48%, rgba(7, 7, 6, 0.4) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(7, 7, 6, 0) 30%, rgba(7, 7, 6, 0) 74%, rgba(7, 7, 6, 0.7) 100%);
}

.intro__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.chapter__kicker {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1.7;
  color: var(--gold);
}

.chapter__kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.intro__age {
  margin-top: -20px;
  font-family: "Bodoni 72", Didot, "Times New Roman", var(--serif);
  font-size: clamp(116px, 17vw, 250px);
  line-height: 0.72;
  letter-spacing: -0.08em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 228, 212, 0.17);
  user-select: none;
  pointer-events: none;
}

.intro__age span {
  margin-left: 0.02em;
  font-family: var(--serif);
  font-size: 0.1em;
  letter-spacing: 0;
  color: var(--gold);
  -webkit-text-stroke: 0;
  vertical-align: 0.75em;
}

.intro__title {
  margin: 20px 0 38px;
  font-family: var(--serif);
  font-size: clamp(70px, 11.5vw, 150px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) 306px;
  gap: 82px;
  align-items: start;
}

.intro__main {
  max-width: 690px;
}

.intro__start {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 38px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(199, 167, 107, 0.5);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-2);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.intro__start span {
  display: inline-block;
  animation: arrow-bob 2.2s var(--ease) infinite;
}

.intro__start:hover {
  color: var(--paper);
  border-color: var(--paper);
}

@keyframes arrow-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.route-badge {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.route-badge__label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.route-badge strong {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.route-badge small {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.intro__aside .story-stat {
  border-bottom: 0;
  padding-bottom: 0;
}

/* ---------- finale ---------- */

.chapter--finale {
  padding-top: 130px;
}

.chapter--finale .chapter__bg {
  opacity: 0.6;
  filter: saturate(0.82) brightness(0.9);
}

.chapter--finale .chapter__shade {
  background:
    linear-gradient(90deg, rgba(7, 7, 6, 0.94) 0%, rgba(7, 7, 6, 0.68) 50%, rgba(7, 7, 6, 0.42) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(7, 7, 6, 0) 30%, rgba(7, 7, 6, 0.4) 100%);
}

.finale__title {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(68px, 11vw, 146px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.finale__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 0.8fr;
  gap: 84px;
  align-items: start;
  margin-top: 30px;
}

.finale__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 54px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.finale__stat strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: "Bodoni 72", Didot, "Times New Roman", var(--serif);
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 400;
  line-height: 1;
  color: var(--paper);
}

.finale__stat strong small {
  font-family: var(--serif);
  font-size: 11px;
  color: var(--gold);
}

.finale__stat span {
  display: block;
  margin-top: 9px;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.finale__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
}

.finale__aside {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.finale__aside p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.95;
  color: var(--gold-2);
}

.finale__aside cite {
  display: block;
  margin-top: 16px;
  font-size: 9px;
  line-height: 1.8;
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.finale__route {
  margin-top: 32px;
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- bottom bar ---------- */

.story-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 26px 24px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(7, 7, 6, 0.98) 24%, rgba(7, 7, 6, 0.78) 66%, rgba(7, 7, 6, 0) 100%);
  pointer-events: none;
}

.story-bar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  width: min(760px, 100%);
  margin: 0 auto;
  pointer-events: auto;
}

.story-bar__exit {
  justify-self: start;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: 1px solid rgba(236, 228, 212, 0.18);
  padding-bottom: 3px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.story-bar__exit:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.story-bar__status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 90px;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}

.story-bar__status strong {
  font-weight: 500;
  color: var(--paper-2);
}

.story-bar__next {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-width: 132px;
  min-height: 48px;
  padding: 12px 22px;
  background: var(--gold);
  border: 1px solid var(--gold);
  color: #17110a;
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.story-bar__next:hover {
  background: var(--gold-2);
  border-color: var(--gold-2);
  transform: translateY(-2px);
}

.story-bar__next.is-end {
  background: var(--red);
  border-color: var(--red);
  color: #fff4e2;
}

.story-bar__next.is-end:hover {
  background: var(--red-2);
  border-color: var(--red-2);
}

.story-bar__arrow {
  font-size: 15px;
}

/* ---------- chapter menu ---------- */

.chapter-menu {
  position: fixed;
  inset: 0;
  z-index: 420;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #070706;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.chapter-menu.is-open {
  opacity: 1;
}

.chapter-menu__inner {
  width: min(1080px, calc(100% - 100px));
  min-height: 100%;
  margin: 0 auto;
  padding: 108px 0 50px;
}

.chapter-menu__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.chapter-menu__title {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 54px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.03em;
}

.chapter-menu__close {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.chapter-menu__close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--paper);
}

.chapter-menu__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.chapter-menu__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.chapter-menu__close:hover {
  border-color: var(--gold);
  transform: rotate(90deg);
}

.chapter-menu__hint {
  max-width: 600px;
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.chapter-menu__routes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 34px;
}

.route-switch {
  display: block;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  background: rgba(236, 228, 212, 0.015);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease);
}

.route-switch:hover {
  border-color: rgba(199, 167, 107, 0.5);
  transform: translateY(-2px);
}

.route-switch.is-active {
  border-color: var(--gold);
  background: rgba(199, 167, 107, 0.07);
}

.route-switch__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.route-switch strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.route-switch__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--switch-color, var(--gold));
}

.route-switch small {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.route-switch em {
  display: block;
  margin-top: 9px;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.chapter-menu__label {
  margin-top: 40px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}

.chapter-menu__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 44px;
}

.chapter-menu__item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  width: 100%;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: color 0.25s ease, padding-left 0.3s var(--ease);
}

.chapter-menu__item:hover,
.chapter-menu__item.is-current {
  color: var(--gold-2);
  padding-left: 8px;
}

.chapter-menu__item span:first-child {
  flex: 0 0 auto;
  width: 26px;
  font-family: "Bodoni 72", Didot, "Times New Roman", var(--serif);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}

.chapter-menu__item span:nth-child(2) {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.chapter-menu__item small {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

.chapter-menu__foot {
  max-width: 720px;
  margin-top: 38px;
  font-size: 9px;
  line-height: 1.9;
  color: var(--muted-2);
}

/* ---------- responsive ---------- */

@media (max-width: 1279px) {
  .story-rail {
    display: none;
  }
}

@media (max-width: 980px) {
  .chapter__inner {
    width: calc(100% - 64px);
  }

  .chapter__grid,
  .intro__grid {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 48px;
  }

  .chapter__title {
    font-size: clamp(52px, 9.5vw, 86px);
  }

  .intro__title {
    font-size: clamp(64px, 12vw, 108px);
  }

  .finale__grid {
    gap: 44px;
  }
}

@media (max-width: 760px) {
  .story-top {
    height: 66px;
    padding: 0 16px;
  }

  .story-back {
    width: 36px;
    height: 36px;
  }

  .story-top__center {
    top: 12px;
    max-width: 58vw;
  }

  .story-top__title {
    font-size: 15px;
    letter-spacing: 0.2em;
  }

  .story-top__meta {
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .story-menu-btn {
    gap: 8px;
    font-size: 10px;
  }

  .chapter {
    min-height: 0;
    padding: 96px 0 128px;
    align-items: flex-start;
  }

  .chapter__bg {
    inset: -5%;
    opacity: 0.38;
    background-position: center 42%;
  }

  .chapter__shade {
    background:
      linear-gradient(180deg, rgba(7, 7, 6, 0.86) 0%, rgba(7, 7, 6, 0.7) 45%, rgba(7, 7, 6, 0.92) 100%),
      linear-gradient(0deg, var(--ink) 0%, rgba(7, 7, 6, 0) 35%);
  }

  .chapter__inner {
    width: calc(100% - 40px);
  }

  .chapter__head {
    margin-bottom: 30px;
  }

  .chapter__meta {
    margin-bottom: 17px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .chapter__title {
    font-size: clamp(50px, 16vw, 74px);
  }

  .chapter__watermark {
    font-size: 42vw;
    right: -0.1em;
    bottom: -0.2em;
  }

  .chapter__grid,
  .intro__grid,
  .finale__grid {
    display: block;
  }

  .chapter__main,
  .intro__main {
    max-width: none;
  }

  .chapter__lead {
    margin-bottom: 24px;
    font-size: clamp(22px, 6.4vw, 29px);
    line-height: 1.72;
  }

  .chapter__copy p {
    font-size: 15px;
    line-height: 2.15;
  }

  .chapter__quote {
    margin-top: 32px;
    padding-left: 16px;
  }

  .chapter__quote p {
    font-size: 19px;
    line-height: 1.85;
  }

  .chapter__aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    margin-top: 38px;
    padding-top: 20px;
  }

  .story-stat {
    padding: 14px 0;
  }

  .story-stat strong {
    font-size: 42px;
  }

  .story-stat > span {
    font-size: 10px;
  }

  .chart {
    grid-column: 1 / -1;
    margin-top: 14px;
  }

  .chapter__note {
    grid-column: 1 / -1;
    margin-top: 16px;
  }

  .intro__top {
    display: block;
  }

  .intro__age {
    position: absolute;
    right: 20px;
    top: 72px;
    margin: 0;
    font-size: 32vw;
    z-index: -1;
  }

  .intro__title {
    margin: 16px 0 28px;
    font-size: clamp(48px, 15vw, 72px);
  }

  .chapter--intro {
    padding-top: 92px;
  }

  .chapter--intro .chapter__bg {
    background-position: 58% 52%;
  }

  .chapter--intro .chapter__shade {
    background:
      linear-gradient(180deg, rgba(7, 7, 6, 0.8) 0%, rgba(7, 7, 6, 0.58) 45%, rgba(7, 7, 6, 0.94) 100%),
      linear-gradient(0deg, var(--ink) 0%, rgba(7, 7, 6, 0) 30%);
  }

  .intro__start {
    margin-top: 30px;
  }

  .intro__aside {
    margin-top: 38px;
  }

  .route-badge {
    padding: 16px 0;
  }

  .route-badge strong {
    font-size: 22px;
  }

  .chapter--finale {
    padding-top: 100px;
  }

  .finale__title {
    font-size: clamp(58px, 17vw, 88px);
  }

  .finale__stats {
    margin-top: 34px;
    gap: 12px;
  }

  .finale__stat strong {
    font-size: 36px;
  }

  .finale__stat span {
    font-size: 9px;
  }

  .finale__actions {
    margin-top: 34px;
  }

  .finale__actions .btn {
    flex: 1 1 100%;
  }

  .finale__aside {
    margin-top: 36px;
  }

  .story-bar {
    padding: 20px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .story-bar__inner {
    gap: 8px;
  }

  .story-bar__exit {
    font-size: 9px;
  }

  .story-bar__status {
    font-size: 8px;
    min-width: 68px;
  }

  .story-bar__next {
    min-width: 108px;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 11px;
    gap: 8px;
  }

  .chapter-menu__inner {
    width: calc(100% - 40px);
    padding: 86px 0 36px;
  }

  .chapter-menu__title {
    font-size: 32px;
  }

  .chapter-menu__routes {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 26px;
  }

  .route-switch {
    padding: 14px 16px;
  }

  .chapter-menu__list {
    grid-template-columns: 1fr;
  }

  .chapter-menu__item {
    padding: 13px 0;
  }

  .chapter-menu__item span:nth-child(2) {
    font-size: 19px;
  }
}

@media (max-width: 380px) {
  .story-top__meta {
    max-width: 145px;
  }

  .story-menu-btn span:first-child {
    display: none;
  }

  .story-bar__status {
    min-width: 56px;
  }

  .story-bar__next {
    min-width: 100px;
  }
}

/* Safari / old Chromium fallback for viewport units */
@supports (height: 100svh) {
  .chapter,
  .chapter--intro {
    min-height: 100svh;
  }
}
