[hidden] { display: none !important; }

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-normal-latin.48282a415ec2.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-normal-latin-ext.f120089b9440.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-latin.056e4e2459f5.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-latin-ext.ae1d854fefa1.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --canal-night: #10272C;
  --deep-water: #164B52;
  --silt: #E8D9BC;
  --dredge-brass: #C99A58;
  --signal: #C9573F;
  --chalk: #F7F3E9;
  --accent-ink: #8C3E2C;
  --page: var(--chalk);
  --page-soft: #EEE6D6;
  --ink: #15282A;
  --ink-soft: #45585A;
  --line: #BDB49F;
  --water: var(--canal-night);
  --water-light: #2B6368;
  --bar-height: 3.35rem;
  --content-max: 78rem;
  --reading-width: 42rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
  scroll-padding-top: calc(var(--bar-height) + 1rem);
}
/* Smooth scrolling starts a moment after load: a link that opens mid-page must land at once,
   or the map would load every tile on the way down. */
:root[data-scroll="smooth"] { scroll-behavior: smooth; }

:root[data-theme="night"] {
  color-scheme: dark;
  --page: #10272C;
  --page-soft: #17363B;
  --ink: #F1E9D9;
  --ink-soft: #B7C4BF;
  --line: #476267;
  --water: #0B1C20;
  --water-light: #27636A;
  --accent-ink: #E4896A;
}

* { box-sizing: border-box; }
html { min-width: 20rem; }
body {
  margin: 0;
  min-width: 20rem;
  background: var(--page);
  color: var(--ink);
  font-size: 1.125rem;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-ink); }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; }
::selection { color: var(--chalk); background: var(--deep-water); }

.skip-link {
  position: absolute;
  z-index: 100;
  top: 0.5rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  color: var(--chalk);
  background: var(--canal-night);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--bar-height);
  color: var(--chalk);
  background: var(--canal-night);
  box-shadow: 0 1px 0 rgb(247 243 233 / 15%);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  width: min(100% - 2rem, var(--content-max));
  height: 100%;
  margin-inline: auto;
}
.home-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 2.6rem;
  color: var(--chalk);
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark { width: 2.15rem; height: 1.65rem; color: var(--dredge-brass); }
.home-name { max-width: 9rem; overflow: hidden; font-size: 0.76rem; font-weight: 650; letter-spacing: 0.055em; text-overflow: ellipsis; }
.top-chapters {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 0.9rem;
  min-width: 0;
  overflow: hidden;
}
.top-chapters a {
  color: #D7E0DA;
  font-size: 0.73rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.top-chapters a[aria-current="location"] { color: #F0C889; }
.language-list {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.38rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.language-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  min-height: 2.2rem;
  padding: 0.2rem;
  color: #D7E0DA;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.language-list a[aria-current="page"] { color: #F0C889; box-shadow: inset 0 -2px #F0C889; }
.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid rgb(247 243 233 / 25%);
  border-radius: 50%;
  color: var(--chalk);
  background: transparent;
  cursor: pointer;
}
.icon-button svg { width: 1.15rem; height: 1.15rem; }
.js-only-slot { position: relative; display: inline-grid; flex: 0 0 auto; place-items: center; }
.js-only-slot > [data-js-only] { position: absolute; inset: 0; margin: 0; }
.js-only-slot--theme { width: 2.45rem; height: 2.45rem; }
.reading-progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--dredge-brass);
  transform: scaleX(0);
  transform-origin: left center;
}

.rail {
  position: fixed;
  z-index: 30;
  top: 50%;
  right: max(0.85rem, calc((100vw - var(--content-max)) / 2 - 2rem));
  display: grid;
  gap: 0.44rem;
  transform: translateY(-50%);
}
.rail a {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  color: var(--ink);
  text-decoration: none;
}
.rail-dot {
  display: block;
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
  background: var(--page);
  transition: transform 150ms ease, background-color 150ms ease;
}
.rail a[aria-current="location"] .rail-dot {
  border-color: var(--signal);
  background: var(--signal);
  transform: scale(1.3);
}
.rail-label {
  position: absolute;
  right: calc(100% + 0.65rem);
  width: max-content;
  max-width: 14rem;
  padding: 0.28rem 0.52rem;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--page);
  font-size: 0.74rem;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0.25rem);
  transition: none;
}
.rail a:hover .rail-label,
.rail a:focus .rail-label,
.rail:focus-within a[aria-current="location"] .rail-label {
  opacity: 1;
  transform: translateX(0);
}


main { overflow: clip; }
.rail { right: 0.9rem; }
.eyebrow, .kicker {
  margin: 0 0 0.9rem;
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 470;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { margin-bottom: 1.2rem; font-size: clamp(2.4rem, 4.05vw, 3.7rem); line-height: 1.04; }

/* First screen: the title beside the whole canal, north at the top. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  width: min(100% - 3rem, var(--content-max));
  min-height: calc(100svh - var(--bar-height));
  margin: 0 auto;
  padding-block: 2.2rem 2.6rem;
}
.hero-copy { max-width: 40rem; }
.hero-deck {
  margin-bottom: 1.4rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 1.72rem);
  line-height: 1.32;
  text-wrap: balance;
}
.hero-open { max-width: 36rem; margin-bottom: 1.5rem; }
.hero-how {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.hero-how svg { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; color: var(--signal); }
.whole { position: relative; margin: 0; }
.whole-frame {
  position: relative;
  height: min(calc(100svh - var(--bar-height) - 7.5rem), 52rem);
  aspect-ratio: var(--whole-w) / var(--whole-h);
  margin-inline: 8.6rem 0.4rem;
  box-shadow: 0 0 0 1px rgb(21 40 42 / 22%), 0 1.6rem 3rem -1.4rem rgb(16 39 44 / 55%);
  background: var(--sand);
}
.whole-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.whole-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.whole-line path { fill: none; stroke: var(--signal); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 5 4; }
.whole-tag {
  position: absolute;
  right: calc(100% + 0.9rem);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
  max-width: 8.2rem;
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.2;
  text-align: right;
  transform: translateY(-50%);
}
.whole-tag::after { content: ""; flex: 0 0 auto; width: 0.9rem; height: 1px; margin-right: -0.9rem; background: var(--ink-soft); translate: 0.45rem 0; }
.whole-tag b { display: block; font-weight: 650; }
.whole-tag span { display: block; color: var(--ink-soft); font-size: 0.72rem; }
.whole-tag--sea { color: var(--ink-soft); font-style: italic; }
.whole figcaption, .stage-credit, .figure-credit {
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.45;
}
.whole figcaption { max-width: 23rem; margin: 0.7rem 0 0 auto; text-align: right; }
.whole figcaption a, .stage-credit a, .figure-credit a { color: inherit; }

/* The voyage: a pinned satellite map on one side, the stops on the other. */
.voyage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(21rem, 1fr);
  border-top: 1px solid var(--line);
  background: var(--page);
}
.stage {
  position: sticky;
  top: var(--bar-height);
  z-index: 2;
  height: calc(100svh - var(--bar-height));
  margin: 0;
  overflow: hidden;
  color: #F7F3E9;
  background: var(--sand);
  contain: layout paint;
}
.stage-view { position: absolute; inset: 0; overflow: hidden; }
.map { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.map-tiles { position: absolute; inset: 0; }
.map-tiles img { position: absolute; width: 512px; height: 512px; }
:root[data-theme="night"] .map-tiles img, :root[data-theme="night"] .stage-still img, :root[data-theme="night"] .whole-img { filter: brightness(0.74) saturate(0.92) contrast(1.06); }
.map-overlay { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none; }
.map-overlay path { fill: none; vector-effect: non-scaling-stroke; }
.route-casing { stroke: rgb(16 39 44 / 55%); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.route-ahead { stroke: #FFF6E0; stroke-width: 1.6; stroke-dasharray: 2 6; stroke-linecap: round; }
.route-new { stroke: #F0C889; stroke-width: 2; stroke-dasharray: 7 5; opacity: 0; transition: opacity 400ms ease; }
.stage[data-stop="expansion"] .route-new { opacity: 1; }
.hull-mark { fill: var(--signal); stroke: #FFF6E0; stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 400ms ease; }
.stage[data-stop="ever-given"] .hull-mark { opacity: 1; }
.map-label {
  position: absolute;
  width: max-content;
  max-width: 11rem;
  margin: 0;
  color: #FFFDF6;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow: 0 0 3px #0B1C20, 0 0 6px #0B1C20, 0 1px 10px rgb(11 28 32 / 85%);
  transform: translate(-50%, -50%) scale(var(--inv, 1));
}
.map-label--water { font-family: "Fraunces", Georgia, serif; font-size: 0.98rem; font-style: italic; font-weight: 450; letter-spacing: 0.04em; }
.map-label--land { color: #2A2412; text-shadow: 0 0 3px #F4E7BE, 0 0 7px #F4E7BE; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.74rem; }
.map-label--km {
  padding: 0.05rem 0.34rem;
  border-radius: 0.6rem;
  color: #10272C;
  background: rgb(255 246 224 / 88%);
  font-size: 0.66rem;
  font-weight: 700;
  text-shadow: none;
  transform: translate(0.75rem, -50%) scale(var(--inv, 1));
  transform-origin: 0 50%;
}
.map-label--note { opacity: 0; transition: opacity 400ms ease; color: #FFE9B8; }
.stage[data-stop="expansion"] .map-label--note[data-for="expansion"],
.stage[data-stop="ever-given"] .map-label--note[data-for="ever-given"],
.stage[data-stop="ancient"] .map-label--note[data-for="ancient"] { opacity: 1; }
.km-dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #FFF6E0; box-shadow: 0 0 0 2px rgb(16 39 44 / 60%); transform: scale(var(--inv, 1)); }
.ship { position: absolute; top: 0; left: 0; width: 0; height: 0; }
.ship-ring {
  position: absolute;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border: 2px solid #FFF6E0;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgb(16 39 44 / 70%), inset 0 0 0 1px rgb(16 39 44 / 70%);
  transform: scale(var(--inv, 1));
}
.ship-hull {
  position: absolute;
  width: 4.72px;   /* 59 m at 12.5 m per map pixel */
  height: 32px;    /* 400 m */
  margin: -16px 0 0 -2.36px;
  border-radius: 2.4px 2.4px 1px 1px;
  background: var(--signal);
  box-shadow: 0 0 0 1px #FFF6E0;
  transform: rotate(var(--heading, 180deg));
}
.stage-still { position: absolute; inset: 0; display: grid; place-items: center; padding: 1.2rem; }
.stage-still img { display: block; width: auto; max-width: 100%; height: 100%; object-fit: contain; }
.stage[data-live] .stage-still { display: none; }
.hud {
  position: absolute;
  left: 1.1rem;
  bottom: 1.1rem;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 1rem;
  min-width: 17rem;
  max-width: calc(100% - 2.2rem);
  padding: 0.75rem 1rem 0.8rem;
  color: #F7F3E9;
  background: rgb(16 39 44 / 92%);
  box-shadow: 0 0 0 1px rgb(247 243 233 / 18%);
}
.hud-km { grid-row: span 2; font-family: "Fraunces", Georgia, serif; font-size: 2.3rem; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.hud-km small { margin-right: 0.3rem; color: #F0C889; font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.hud-place { font-size: 0.95rem; font-weight: 600; line-height: 1.25; }
.hud-clock { color: #C9D6D1; font-size: 0.78rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.hud-clock b { color: #F7F3E9; font-weight: 600; }
.hud-track { grid-column: 1 / -1; position: relative; height: 3px; margin-top: 0.65rem; background: rgb(247 243 233 / 22%); }
.hud-track span { position: absolute; inset: 0; background: #F0C889; transform: scaleX(var(--done, 0)); transform-origin: left center; }
.stage:not([data-live]) .hud { display: none; }
.stage-credit { position: absolute; right: 0; bottom: 0; z-index: 3; max-width: 60%; margin: 0; padding: 0.2rem 0.5rem; color: #E9EFEA; background: rgb(16 39 44 / 78%); font-size: 0.64rem; text-align: right; }
.stage-scale { position: absolute; top: 0.9rem; left: 1.1rem; z-index: 3; display: flex; align-items: center; gap: 0.5rem; margin: 0; color: #FFFDF6; font-size: 0.72rem; font-weight: 600; text-shadow: 0 0 3px #0B1C20, 0 0 6px #0B1C20; }
.stage-scale i { display: block; width: var(--scale-px, 80px); height: 5px; border: 1px solid #FFFDF6; border-top: 0; box-shadow: 0 1px 0 rgb(11 28 32 / 70%); }
.stage:not([data-live]) .stage-scale { display: none; }

.stops { position: relative; z-index: 1; min-width: 0; padding: 0 clamp(3.6rem, 5.4vw, 5.4rem) 0 clamp(1.4rem, 3.4vw, 3.4rem); }
.stop {
  min-height: 108svh;
  max-width: 34rem;
  padding-block: 22svh 6svh;
  scroll-margin-top: calc(var(--bar-height) - 8svh);
}
.stop:last-child { min-height: 100svh; padding-bottom: 20svh; }
.stop-mark { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.35rem 0.8rem; margin: 0 0 1rem; color: var(--accent-ink); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.stop-mark b { padding: 0.12rem 0.5rem; color: var(--chalk); background: var(--deep-water); letter-spacing: 0.06em; }
:root[data-theme="night"] .stop-mark b { color: #10272C; background: #F0C889; }
.stop h2 { margin-bottom: 1.2rem; font-size: clamp(1.9rem, 2.7vw, 2.55rem); line-height: 1.08; }
.stop p, .coda p { max-width: var(--reading-width); margin-bottom: 1.05rem; }
.stop h3 { margin: 1.8rem 0 0.6rem; font-size: 1.22rem; line-height: 1.25; }
.citations { margin-left: 0.3rem; white-space: nowrap; }
.citations a {
  display: inline-block;
  min-width: 1.15rem;
  margin-left: 0.14rem;
  padding: 0 0.22rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.66rem;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: 0.22em;
}
.citations a:hover { color: var(--accent-ink); border-color: var(--accent-ink); }

.photo { margin: 1.7rem 0 1.6rem; }
.photo img { display: block; width: 100%; height: auto; object-fit: cover; background: var(--page-soft); box-shadow: 0 0 0 1px var(--line); }
.photo--small img { width: min(100%, 17rem); }
.photo figcaption { margin-top: 0.55rem; color: var(--ink); font-size: 0.86rem; line-height: 1.45; }
.figure-credit { display: block; margin-top: 0.25rem; }

.panel { margin: 1.8rem 0 1.6rem; padding: 1.15rem 1.2rem 1.2rem; border: 1px solid var(--line); background: var(--page-soft); }
.panel h3 { margin: 0 0 0.3rem; font-size: 1.12rem; }
.panel-note { margin: 0.7rem 0 0; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.45; }
.panel svg { display: block; width: 100%; height: auto; overflow: visible; }
.panel svg text { fill: var(--ink); font-family: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 13px; }
.panel svg .t-soft { fill: var(--ink-soft); font-size: 11.5px; }
.panel svg .t-big { font-family: "Fraunces", Georgia, serif; font-size: 17px; }
.x-water-old { fill: var(--water-light); }
.x-water-new { fill: var(--deep-water); }
:root[data-theme="night"] .x-water-new { fill: #1F5560; }
:root[data-theme="night"] .x-water-old { fill: #6FB3B5; }
.x-line { stroke: var(--ink-soft); stroke-width: 1; fill: none; }
.x-hull { fill: var(--signal); }
.x-bar { fill: var(--deep-water); }
:root[data-theme="night"] .x-bar { fill: #6FB3B5; }
.x-bar--low { fill: var(--signal); }
.x-closed { fill: var(--signal); }
.x-open { fill: var(--water-light); }
.sums { display: grid; gap: 0; margin: 0; }
.sums div { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--line); }
.sums div:first-child { border-top: 0; }
.sums dt { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.35; }
.sums dd { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.coda { padding: 6rem 1.5rem 6.5rem; border-top: 1px solid var(--line); background: var(--page-soft); }
.coda-inner { width: min(100%, 58rem); margin: 0 auto; }
.coda h2 { max-width: 20ch; margin-bottom: 1.3rem; font-size: clamp(2.1rem, 3.6vw, 3.1rem); line-height: 1.06; }
.coda .panel { background: var(--page); }
.story-section { padding: 6rem 1.5rem 6.5rem; border-top: 1px solid var(--line); }
.section-inner { width: min(100%, var(--content-max)); margin: 0 auto; }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.06; }
.section-copy { color: var(--ink-soft); }
.method { max-width: var(--reading-width); margin: 0 0 1rem; font-size: 0.95rem; }
.method-credit { max-width: var(--reading-width); margin: 0 0 2.2rem; color: var(--ink-soft); font-size: 0.86rem; }
.method-credit a { color: inherit; }

.source-section { padding-bottom: 5rem; }
.source-section .section-head { margin-bottom: 1.1rem; }
.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 2rem;
  max-width: 70rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: sources;
}
.source-list li {
  position: relative;
  padding: 0.8rem 0 0.8rem 2.4rem;
  border-top: 1px solid var(--line);
  counter-increment: sources;
  font-size: 0.9rem;
}
.source-list li::before {
  position: absolute;
  top: 0.8rem;
  left: 0;
  color: var(--accent-ink);
  content: counter(sources, decimal-leading-zero);
  font-size: 0.7rem;
  font-weight: 700;
}
.source-list a { font-weight: 650; text-decoration: none; }
.source-list p { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.79rem; line-height: 1.45; }

.share-block { padding: 2rem max(1.5rem, calc((100vw - var(--content-max)) / 2)); border-top: 1px solid var(--line); }
.share-inner { display: flex; align-items: center; gap: 1.2rem; width: min(100%, var(--content-max)); margin: auto; }
.share-heading { flex: 0 0 auto; margin: 0; font-size: 0.82rem; font-weight: 700; }
.share-row { display: flex; align-items: center; gap: 0.5rem; }
.js-only-slot--share { width: 2.5rem; height: 2.5rem; }
.share-row a, .share-row button {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}
.share-row a:hover, .share-row button:hover { border-color: var(--deep-water); color: var(--chalk); background: var(--deep-water); }
.share-row svg { width: 1.15rem; height: 1.15rem; }
.share-status { min-height: 1.4rem; margin: 0; color: var(--ink-soft); font-size: 0.77rem; }
@media (pointer: coarse) {
  .js-only-slot--share, .share-row a, .share-row button { width: 2.75rem; height: 2.75rem; }
}

.site-footer {
  padding: 2rem max(1.5rem, calc((100vw - var(--content-max)) / 2)) 2.5rem;
  color: var(--chalk);
  background: var(--canal-night);
}
.footer-inner { display: flex; align-items: start; justify-content: space-between; gap: 2rem; width: min(100%, var(--content-max)); margin: auto; }
.site-footer p { max-width: 34rem; margin: 0; color: #D1DCD7; font-size: 0.81rem; }
.site-footer a { color: #F2CA8E; font-size: 0.81rem; }
.to-top {
  position: fixed;
  z-index: 50;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 0.25rem);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 3rem;
  min-height: 3rem;
  padding: 0.6rem 0.82rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  color: var(--chalk);
  background: var(--canal-night);
  box-shadow: 0 3px 12px rgb(0 0 0 / 20%);
  font-size: 0.82rem;
  cursor: pointer;
}
.to-top svg { width: 1rem; height: 1rem; }


:root { --sand: #E7D6A6; }
:root[lang^="zh"] body { line-height: 1.88; }
:root[lang^="zh"] h1, :root[lang^="zh"] h2, :root[lang^="zh"] h3, :root[lang^="zh"] .hero-deck, :root[lang^="zh"] .hud-km, :root[lang^="zh"] .sums dd {
  font-family: "Fraunces", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", serif;
  letter-spacing: 0;
}
:root[lang^="zh"] .stop-mark, :root[lang^="zh"] .eyebrow { letter-spacing: 0.04em; }

@media (max-width: 72rem) {
  .rail { display: none; }
  .top-chapters { justify-content: flex-start; }
  .top-chapters a:nth-of-type(n+4) { display: none; }
  .whole-frame { margin-left: 7.6rem; }
}

@media (max-width: 58rem) {
  :root { --bar-height: 3.1rem; --stage-h: 40svh; }
  body { font-size: 1.05rem; }
  .topbar-inner { gap: 0.4rem; width: calc(100% - 1rem); }
  .home-name { display: none; }
  .top-chapters { display: none; }
  .language-list { margin-left: auto; gap: 0.2rem; }
  .language-list a { min-width: 2rem; min-height: 2.2rem; }
  .hero { grid-template-columns: minmax(0, 1fr) 7.6rem; align-items: start; gap: 0 1rem; width: calc(100% - 2.25rem); min-height: 0; padding-block: 2.2rem 2.6rem; }
  .hero-copy { display: contents; }
  .hero-copy > .eyebrow, .hero-copy > h1 { grid-column: 1 / -1; }
  .hero-copy > .hero-deck, .hero-copy > .hero-open, .hero-copy > .hero-how { grid-column: 1; }
  h1 { font-size: clamp(2.05rem, 8.6vw, 3rem); }
  .hero-deck { font-size: 1.12rem; }
  .whole { grid-column: 2; grid-row: 3 / span 3; }
  .whole-frame { width: 100%; height: auto; margin: 0.3rem 0 0; }
  .whole-tag { right: auto; left: 0.3rem; max-width: none; color: #FFFDF6; font-size: 0.62rem; text-align: left; text-shadow: 0 0 3px #0B1C20, 0 0 6px #0B1C20; }
  .whole-tag::after, .whole-tag span span { display: none; }
  .whole-tag--sea { color: #FFFDF6; }
  .whole figcaption { margin-top: 0.5rem; font-size: 0.75rem; text-align: left; }
  .whole figcaption .credit-long { display: none; }
  .stops { padding: 0 1.15rem; }
  .voyage { display: block; }
  .stage { top: calc(var(--bar-height) + env(safe-area-inset-top)); height: var(--stage-h); max-height: 40svh; box-shadow: 0 1px 0 var(--line), 0 0.6rem 1rem -0.6rem rgb(16 39 44 / 45%); }
  .hud { left: 0; right: 0; bottom: 0; grid-template-columns: auto 1fr auto; column-gap: 0.7rem; min-width: 0; max-width: none; padding: 0.4rem 0.75rem 0.5rem; }
  .hud-km { grid-row: auto; font-size: 1.35rem; }
  .hud-place { font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hud-clock { font-size: 0.72rem; text-align: right; white-space: nowrap; }
  .hud-clock span { display: none; }
  .hud-track { margin-top: 0.35rem; }
  .stage-credit { top: 0; bottom: auto; max-width: 100%; font-size: 0.75rem; line-height: 1.3; }
  .stage-credit .credit-long { display: none; }
  .stage-scale { top: 2.9rem; left: 0.6rem; font-size: 0.72rem; }
  .map-label { font-size: 0.78rem; }
  .stop { min-height: 0; max-width: none; padding-block: 3.2rem 34svh; scroll-margin-top: calc(var(--stage-h) - 0.5rem); }  /* added to the root's scroll-padding-top: the stop lands just under the pinned map */
  .stop:last-child { min-height: 0; padding-bottom: 30svh; }
  .stop h2 { font-size: 1.85rem; }
  .coda, .story-section { padding: 4.5rem 1.15rem 5rem; }
  .panel { padding: 0.95rem 0.85rem 1rem; }
  .panel svg text { font-size: 19px; }
  .panel svg .t-soft { font-size: 17.5px; }
  .panel svg .t-big { font-size: 23px; }
  .source-list { grid-template-columns: 1fr; }
  .share-inner { flex-wrap: wrap; gap: 0.55rem 1rem; }
  .share-status { flex-basis: 100%; }
}

@media (max-width: 37rem) {
  .share-block { padding-inline: 1rem; }
  .share-heading { flex-basis: 100%; }
  .site-footer { padding-inline: 1.15rem; }
  .footer-inner { flex-direction: column; gap: 0.9rem; }
  .to-top { right: max(0.55rem, env(safe-area-inset-right)); }
  .whole-tag { max-width: 7rem; font-size: 0.74rem; }
}

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

@media print {
  body { color: #111; background: #fff; }
  .stage, .rail, .to-top, .share-block { display: none; }
  .voyage { display: block; }
  .stop { min-height: 0; padding-block: 1.5rem; break-inside: avoid; }
}
/* FM-1018 rail clearance (2 Nov 2026) */
@media (min-width:1191px){.rail{display:none!important}}
