/* Layout: one day across California, dawn at the Golden Gate to night in the Mojave.
   Full-bleed painted scenes alternate with atlas-style reading bands; the fog is the transition material. */
:root {
  /* reading surfaces: coastal fog paper + Pacific ink */
  --paper: #e7ebe9;
  --paper-2: #dce2df;
  --ink: #13212c;
  --ink-2: #3b4a56;
  --ink-3: #56636d;
  --rule: rgba(19, 33, 44, .16);
  --rule-2: rgba(19, 33, 44, .08);
  --accent: #b9372a;          /* International Orange, the bridge */
  --poppy: #e07a22;           /* California poppy */
  --card: rgba(255, 255, 255, .5);
  /* elevation ramp (one warm family, light -> dark on paper) */
  --e-neg: #4a5fb5;
  --e0: #b6a37c;
  --e1: #bf8f52;
  --e2: #b46f39;
  --e3: #9b4a2a;
  --e4: #782d23;
  --e5: #48191e;
  /* the fixed night world, identical in both themes */
  --night: #090f18;
  --night-2: #0f1724;
  --navy: #0b1828;
  --star: #e8edf5;
  --star-2: #aab6c7;
  --star-3: #75849a;
  --night-rule: rgba(232, 237, 245, .14);
  --night-gold: #f0b65a;
  --night-dim: #3a4a5f;
  --gate: #a8321f;            /* deep International Orange band */
  /* type */
  --font-display: "Fraunces", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-cn: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --step--1: clamp(.78rem, .76rem + .1vw, .85rem);
  --step-0: clamp(1rem, .97rem + .15vw, 1.08rem);
  --step-1: clamp(1.12rem, 1.04rem + .4vw, 1.36rem);
  --step-2: clamp(1.4rem, 1.2rem + .9vw, 1.95rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.9vw, 3rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.2vw, 4.6rem);
  --gut: clamp(16px, 4.5vw, 64px);
  --wrap: 1280px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e151d; --paper-2: #131c26; --ink: #e3e8e6; --ink-2: #aab5bd; --ink-3: #87939d;
    --rule: rgba(227, 232, 230, .15); --rule-2: rgba(227, 232, 230, .07);
    --accent: #f0654a; --poppy: #f29a45; --card: rgba(255, 255, 255, .04);
    --e-neg: #8193ef; --e0: #574e3c; --e1: #7a6440; --e2: #a8793d; --e3: #d68c47; --e4: #f2ad6c; --e5: #ffe2bf;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e151d; --paper-2: #131c26; --ink: #e3e8e6; --ink-2: #aab5bd; --ink-3: #87939d;
  --rule: rgba(227, 232, 230, .15); --rule-2: rgba(227, 232, 230, .07);
  --accent: #f0654a; --poppy: #f29a45; --card: rgba(255, 255, 255, .04);
  --e-neg: #8193ef; --e0: #574e3c; --e1: #7a6440; --e2: #a8793d; --e3: #d68c47; --e4: #f2ad6c; --e5: #ffe2bf;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--poppy); outline-offset: 3px; border-radius: 2px; }
.mono { font-family: var(--font-mono); }
.en { font-family: var(--font-display); font-style: italic; font-weight: 300; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; z-index: 100; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 4px; text-decoration: none; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }
.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}

/* ---------- progress + nav ---------- */
.progress { position: fixed; z-index: 70; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--poppy), var(--accent)); transform-origin: 0 50%; transform: scaleX(0); }
.nav {
  position: fixed; z-index: 60; top: 0; left: 0; right: 0; padding-top: env(safe-area-inset-top, 0px);
  color: #fff; transition: background-color .45s, color .45s, box-shadow .45s, transform .45s;
}
.nav-inner {
  max-width: var(--wrap); margin-inline: auto; height: 64px; display: flex; align-items: center; gap: 28px;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}
.nav.is-solid { background: color-mix(in srgb, var(--paper) 84%, transparent); color: var(--ink); box-shadow: 0 1px 0 var(--rule); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.nav.is-solid.on-dark { background: rgba(9, 15, 24, .72); color: var(--star); box-shadow: 0 1px 0 var(--night-rule); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.poppy { width: 26px; height: 26px; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .poppy { transform: rotate(90deg); }
.brand-cn { font-family: var(--font-cn); font-weight: 700; font-size: 1.12rem; letter-spacing: .08em; }
.brand-en { font-size: 1.05rem; opacity: .75; }
.nav-links { margin-left: auto; display: flex; gap: clamp(12px, 1.8vw, 28px); }
.nav-links a { position: relative; font-size: .92rem; text-decoration: none; opacity: .78; padding-block: 6px; transition: opacity .25s; }
.nav-links a:hover, .nav-links a.is-active { opacity: 1; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--poppy); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s; }
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-menu { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; position: relative; }
.nav-menu span:not(.sr-only) { position: absolute; left: 11px; right: 11px; height: 1.6px; background: currentColor; transition: transform .3s; }
.nav-menu span:nth-child(1) { top: 18px; } .nav-menu span:nth-child(2) { top: 25px; }
.nav-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-menu[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; height: 200vh; height: 200svh; background: #1d2552; }
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 540px; overflow: hidden; color: #fff; }
.hero-stage { position: absolute; inset: 0; background: linear-gradient(180deg, #19214c 0%, #4a4479 26%, #a3789c 40%, #f2b08c 47%, #c9a9b8 50%, #8f86ad 72%, #69628f 100%); }
.hero-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-word {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, 0); white-space: nowrap; pointer-events: none;
  font-family: var(--font-display); font-weight: 260; font-size: 19vw; line-height: .78; letter-spacing: -.025em;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 0;
  color: rgba(255, 238, 226, .86); text-shadow: 0 0 60px rgba(255, 190, 150, .25);
}
.hero-wisps { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.hero-wisps i { position: absolute; left: -70vw; width: 70vw; height: 20vh; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 236, 228, .55), rgba(255, 236, 228, 0)); filter: blur(8px); animation: wisp 70s linear infinite; }
.hero-wisps i:nth-child(1) { top: 50%; animation-duration: 84s; animation-delay: -20s; }
.hero-wisps i:nth-child(2) { top: 58%; height: 26vh; animation-duration: 66s; animation-delay: -48s; opacity: .8; }
.hero-wisps i:nth-child(3) { top: 44%; height: 12vh; animation-duration: 96s; animation-delay: -70s; opacity: .55; }
.hero-wisps i:nth-child(4) { top: 66%; width: 90vw; height: 30vh; animation-duration: 58s; animation-delay: -5s; opacity: .7; }
@keyframes wisp { to { transform: translateX(240vw); } }
.hero-veil { position: absolute; inset: 0; background: var(--paper); opacity: 0; pointer-events: none; }
.hero-copy {
  position: absolute; z-index: 3; bottom: clamp(56px, 11vh, 120px); max-width: 680px;
  left: max(var(--gut), env(safe-area-inset-left, 0px)); right: max(var(--gut), env(safe-area-inset-right, 0px));
}
.eyebrow { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .24em; text-transform: uppercase; margin: 0 0 14px; opacity: .85; }
.hero-copy h1 {
  margin: 0; font-family: var(--font-cn); font-weight: 800; font-size: clamp(3.2rem, 2rem + 6.4vw, 8rem);
  line-height: 1; letter-spacing: .06em; text-shadow: 0 4px 40px rgba(40, 26, 70, .35);
}
.hero-lede { margin: 20px 0 0; max-width: 30em; font-size: var(--step-1); line-height: 1.7; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 20px rgba(40, 26, 70, .45); }
.hero-meta {
  position: absolute; z-index: 3; top: calc(84px + env(safe-area-inset-top, 0px)); right: max(var(--gut), env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: .72rem; letter-spacing: .12em; color: rgba(255, 255, 255, .78);
}
.hero-cue {
  position: absolute; z-index: 3; right: max(var(--gut), env(safe-area-inset-right, 0px)); bottom: clamp(56px, 11vh, 120px);
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-decoration: none; font-size: .78rem; letter-spacing: .3em; writing-mode: vertical-rl; color: rgba(255, 255, 255, .85);
}
.hero-cue i { width: 1px; height: 64px; background: linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, 0)); animation: cue 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- reading bands ---------- */
.band { position: relative; background: var(--paper); color: var(--ink); padding-block: clamp(80px, 11vw, 168px); }
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 72px); max-width: 920px; }
.kicker { margin: 0; display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .2em; color: var(--ink-3); }
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--poppy); flex: none; }
.kicker .mono { letter-spacing: .08em; opacity: .8; }
h2 { margin: 0; font-family: var(--font-cn); font-weight: 700; font-size: var(--step-4); line-height: 1.12; letter-spacing: .02em; }
.sec-lede { margin: 6px 0 0; max-width: 36em; font-size: var(--step-1); line-height: 1.8; color: var(--ink-2); }
.fig-note { margin: 14px 0 0; font-size: .7rem; letter-spacing: .06em; color: var(--ink-3); line-height: 1.6; }
.night .fig-note { color: var(--star-3); }

/* intro */
.intro { padding-top: clamp(96px, 13vw, 190px); }
.intro-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: clamp(40px, 6vw, 80px); }
.intro-grid > .kicker { grid-column: 1 / span 3; align-self: start; padding-top: .7em; flex-wrap: wrap; }
.intro-body { grid-column: 4 / span 9; display: grid; gap: 1.1em; min-width: 0; }
.intro-lead { margin: 0; font-family: var(--font-cn); font-weight: 500; font-size: clamp(1.32rem, 1rem + 1.45vw, 2.35rem); line-height: 1.68; letter-spacing: .01em; }
.intro-lead .w { opacity: .2; transition: opacity .3s linear; }
.intro-lead .w.on { opacity: 1; }
.intro-facts { grid-column: 4 / span 9; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; border-top: 1px solid var(--rule); }
.intro-facts div { padding: 14px 0 16px; border-bottom: 1px solid var(--rule-2); min-width: 0; }
.intro-facts dt { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; color: var(--ink-3); }
.intro-facts dd { margin: 2px 0 0; font-weight: 500; line-height: 1.5; }
.intro-facts .en { display: block; font-size: .92rem; color: var(--ink-2); }

/* stats */
.stats { padding-top: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
.stat { background: var(--paper); padding: 26px 22px 30px 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.stat:not(:nth-child(4n + 1)) { padding-left: 22px; }
.stat-label { font-size: .95rem; font-weight: 500; color: var(--ink-2); }
.stat-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .18em; font-weight: 600; font-size: clamp(2.3rem, 1.5rem + 2.6vw, 3.7rem); line-height: 1.08; letter-spacing: -.02em; color: var(--ink); }
.stat-value b { font-weight: 600; }
.stat-value small { font-size: .38em; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.stat-note { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .04em; color: var(--ink-3); line-height: 1.5; }

/* atlas */
.atlas-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.atlas-fig { margin: 0; min-width: 0; }
.atlas-map { position: relative; aspect-ratio: 1000 / 1148; width: 100%; max-width: 760px; margin-inline: auto; touch-action: pan-y; }
.atlas-map canvas, .atlas-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.atlas-map svg { overflow: visible; pointer-events: none; }
.atlas-map svg text { font-family: var(--font-mono); }
.pins { position: absolute; inset: 0; }
.pin { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); display: grid; place-items: center; -webkit-tap-highlight-color: transparent; transition: opacity .3s; }
.pin .mk { width: 11px; height: 11px; background: currentColor; transition: transform .25s, background-color .25s; }
.pin::after { content: ""; position: absolute; width: 23px; height: 23px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; transform: scale(.4); transition: opacity .3s, transform .3s; }
.pin:hover .mk, .pin:focus-visible .mk { transform: scale(1.35); }
.pin.is-active { color: var(--accent); z-index: 3; }
.pin.is-active::after { opacity: 1; transform: scale(1); animation: ping 2.2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
.pin.is-dim { opacity: .14; pointer-events: none; }
.pin .lbl { position: absolute; left: 50%; bottom: 25px; transform: translateX(-50%); white-space: nowrap; font-size: .76rem; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 3px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); opacity: 0; pointer-events: none; transition: opacity .2s; }
.pin.show-lbl .lbl, .pin.is-active .lbl, .pin:hover .lbl, .pin:focus-visible .lbl { opacity: 1; }
.mk { display: inline-block; flex: none; box-shadow: 0 0 0 2px var(--paper); }
.mk-city { border-radius: 50%; }
.mk-park { clip-path: polygon(50% 0, 100% 100%, 0 100%); box-shadow: none; }
.mk-mark { transform: rotate(45deg) scale(.86); }
.pin .mk-mark { transform: rotate(45deg) scale(.86); }
.pin:hover .mk-mark, .pin:focus-visible .mk-mark { transform: rotate(45deg) scale(1.2); }
.readout { position: absolute; z-index: 4; pointer-events: none; font-size: .7rem; line-height: 1.45; padding: 6px 9px; border-radius: 4px; background: var(--ink); color: var(--paper); white-space: nowrap; transform: translate(14px, -50%); }
.readout b { font-family: var(--font-body); font-size: .9rem; font-weight: 600; }
.atlas-side { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); display: grid; gap: 28px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink-2); font: 500 .88rem/1 var(--font-body); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.chip .mk { width: 9px; height: 9px; background: currentColor; box-shadow: none; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.place-card { border-top: 2px solid var(--ink); padding-top: 18px; min-height: 300px; }
.place-meta { margin: 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .72rem; letter-spacing: .1em; color: var(--ink-3); }
.place-card h3 { margin: 10px 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-family: var(--font-cn); font-weight: 700; font-size: var(--step-3); line-height: 1.15; }
.place-card h3 .en { font-size: .5em; color: var(--ink-2); }
.place-card > p { margin: 0; color: var(--ink-2); }
.place-facts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.place-facts li { padding: 10px 0 10px 22px; border-top: 1px solid var(--rule-2); position: relative; font-size: .95rem; line-height: 1.6; }
.place-facts li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 8px; height: 1.5px; background: var(--accent); }
.place-card.swap { animation: swap .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } }
.legend { display: grid; gap: 10px; }
.legend-title { margin: 0; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; color: var(--ink-3); }
.ramp { height: 10px; border-radius: 2px; background: linear-gradient(90deg, var(--e0), var(--e1) 14.7%, var(--e2) 29.4%, var(--e3) 52.9%, var(--e4) 76.5%, var(--e5)); }
.ramp-ticks { position: relative; height: 1.4em; font-size: .66rem; color: var(--ink-3); }
.ramp-ticks span { position: absolute; top: 0; }
.ramp-ticks span:not(:first-child):not(.unit) { transform: translateX(-50%); }
.ramp-ticks .unit { right: 0; }
.legend-neg { margin: 0; display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-2); }
.legend-neg i { width: 10px; height: 10px; border-radius: 50%; background: var(--e-neg); flex: none; }
.toggle { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.route-key { width: 26px; height: 3px; border-radius: 2px; background: var(--accent); }

/* ---------- journey ---------- */
.journey { position: relative; background: var(--night); }
.journey-head { padding-bottom: clamp(56px, 7vw, 104px); }
.journey-head .sec-head { margin-bottom: 0; }
.journey-pin { position: relative; }
.journey-sticky { position: relative; }
.journey-track { position: relative; }
.scene { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #1a2230; isolation: isolate; }
.journey.is-pinned .journey-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.journey.is-pinned .journey-track { display: flex; height: 100%; width: max-content; will-change: transform; }
.journey.is-pinned .scene { flex: 0 0 auto; width: var(--pw, 100vw); height: 100%; min-height: 0; }
.scene-art { position: absolute; inset: 0; z-index: 0; }
.scene-art .layer { position: absolute; top: 0; bottom: 0; left: -12%; width: 124%; will-change: transform; }
.scene-art .layer svg { width: 100%; height: 100%; max-width: none; overflow: visible; }
.scene::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 62%; pointer-events: none; background: linear-gradient(to top, rgba(6, 8, 18, .72), rgba(6, 8, 18, .32) 45%, rgba(6, 8, 18, 0)); }
.scene[data-scene="tahoe"]::after, .scene[data-scene="yosemite"]::after { background: linear-gradient(to top, rgba(8, 18, 28, .78), rgba(8, 18, 28, .36) 45%, rgba(8, 18, 28, 0)); }
.scene-copy {
  position: absolute; z-index: 2; bottom: clamp(64px, 11vh, 128px); color: #fff;
  left: max(var(--gut), env(safe-area-inset-left, 0px)); width: min(520px, calc(100% - 2 * var(--gut)));
}
.scene-meta { margin: 0; font-size: .7rem; letter-spacing: .16em; color: rgba(255, 255, 255, .78); }
.scene-copy h3 { margin: 10px 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.scene-copy h3 .cn { font-family: var(--font-cn); font-weight: 700; font-size: var(--step-4); line-height: 1.05; letter-spacing: .04em; text-shadow: 0 2px 30px rgba(0, 0, 0, .25); }
.scene-copy h3 .en { font-size: var(--step-2); opacity: .9; }
.scene-copy > p { margin: 0; font-size: 1rem; line-height: 1.85; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }
.scene-facts { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .28); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.scene-facts div { min-width: 0; }
.scene-facts dt { font-weight: 600; font-size: clamp(1rem, .9rem + .5vw, 1.32rem); line-height: 1.2; white-space: nowrap; }
.scene-facts dd { margin: 4px 0 0; font-size: .76rem; line-height: 1.45; color: rgba(255, 255, 255, .78); }
.journey-ticks { display: none; }
.journey.is-pinned .journey-ticks {
  position: absolute; z-index: 5; display: flex; gap: 4px; list-style: none; margin: 0; padding: 0;
  right: max(var(--gut), env(safe-area-inset-right, 0px)); bottom: clamp(24px, 4.5vh, 44px);
}
.journey-ticks button { position: relative; min-height: 36px; padding: 14px 4px 8px; border: 0; background: none; color: rgba(255, 255, 255, .62); font: 500 .74rem/1 var(--font-body); letter-spacing: .06em; cursor: pointer; transition: color .3s; }
.journey-ticks button::before { content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 2px; background: rgba(255, 255, 255, .26); }
.journey-ticks button::after { content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 2px; background: #fff; transform: scaleX(var(--f, 0)); transform-origin: 0 50%; }
.journey-ticks button.is-on { color: #fff; }
.journey-ticks button { width: 72px; text-align: left; }
.scene .anim { animation-play-state: paused; }
.journey.is-live .scene .anim { animation-play-state: running; }
.flow { animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -60; } }
.twinkle { animation: twinkle 3.2s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .25; } }
.drift { animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(6%); } }
.breathe { animation: breathe 7s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }

/* ---------- night sections ---------- */
.night { position: relative; background: var(--night); color: var(--star); padding-block: clamp(84px, 11vw, 168px); }
.night .kicker { color: var(--star-3); }
.night .sec-lede { color: var(--star-2); }
.relief-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.ridge-fig, .profile-fig { margin: 0; min-width: 0; }
.ridge-wrap { position: relative; aspect-ratio: 1000 / 1148; width: 100%; max-width: 760px; }
.ridge-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ridge-labels span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; line-height: 1.3; padding: 2px 7px; border-radius: 3px; background: rgba(9, 15, 24, .8); color: var(--star); opacity: 0; transition: opacity 1s; }
.ridge-labels span.dim { color: var(--star-3); }
.ridge-labels.is-on span { opacity: 1; }
.ridge-labels span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: var(--night-gold); vertical-align: 1px; }
.ridge-labels span.dim::before { display: none; }
.night .readout { background: var(--star); color: var(--night); }
.relief-side { display: grid; gap: clamp(40px, 5vw, 64px); min-width: 0; }
.fig-title { display: block; font-family: var(--font-cn); font-weight: 700; font-size: var(--step-2); line-height: 1.3; }
.fig-sub { display: block; margin-top: 4px; font-size: .92rem; color: var(--star-2); }
.profile-wrap { position: relative; margin-top: 18px; }
.profile-wrap svg, .gdp-wrap svg { width: 100%; height: auto; overflow: visible; }
.profile-wrap text, .gdp-wrap text { font-family: var(--font-mono); }
.tip { position: absolute; z-index: 4; pointer-events: none; padding: 7px 10px; border-radius: 4px; font-size: .7rem; line-height: 1.5; white-space: nowrap; background: var(--star); color: var(--night); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.tip b { display: block; font-family: var(--font-body); font-size: .95rem; font-weight: 600; }
.data-table { margin-top: 14px; font-size: .85rem; }
.data-table summary { cursor: pointer; color: var(--star-2); font-size: .82rem; width: fit-content; }
.data-table table { margin-top: 10px; width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--night-rule); font-weight: 400; }
.data-table th { color: var(--star-3); font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; }
.data-table td:not(:first-child), .data-table th:not(:first-child) { text-align: right; }
.trees-title { margin: 0 0 14px; font-family: var(--font-cn); font-weight: 700; font-size: var(--step-2); }
.trees-scale { position: relative; aspect-ratio: 5 / 3; width: 100%; border-bottom: 1px solid var(--night-rule); }
.trees-scale svg { width: 100%; height: 100%; overflow: visible; }
.tree-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.tree-list li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); column-gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--night-rule); }
.tree-list b { grid-row: span 2; font-family: var(--font-cn); font-weight: 700; color: var(--night-gold); font-size: 1.05rem; }
.tree-list span { font-weight: 500; }
.tree-list em { font-style: normal; font-size: .84rem; color: var(--star-2); }

/* ---------- history ---------- */
.timeline { position: relative; --yw: clamp(5.4rem, 4rem + 6vw, 10.5rem); display: grid; gap: clamp(48px, 6vw, 88px); }
.tl-line { position: absolute; top: 0; bottom: 0; left: calc(var(--yw) + 22px); width: 1px; background: var(--rule); }
.tl-line span { position: absolute; left: -.5px; top: 0; width: 2px; height: 100%; background: linear-gradient(var(--poppy), var(--accent)); transform-origin: top; transform: scaleY(var(--tl, 0)); }
.era-title { margin: 0 0 8px; padding-left: calc(var(--yw) + 46px); font-family: var(--font-cn); font-weight: 700; font-size: var(--step-3); line-height: 1.2; }
.era-title .mono { display: block; margin-bottom: 10px; font-size: .72rem; font-weight: 400; letter-spacing: .12em; color: var(--ink-3); font-family: var(--font-mono); }
.nw { white-space: nowrap; }
.era ol { list-style: none; margin: 0; padding: 0; }
.ev { position: relative; display: grid; grid-template-columns: var(--yw) minmax(0, 1fr); column-gap: 46px; padding-block: 20px; }
.ev::before { content: ""; position: absolute; left: calc(var(--yw) + 17px); top: 31px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink-3); transition: box-shadow .5s, background-color .5s; }
.ev.is-lit::before { background: var(--accent); box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }
.ev-year { text-align: right; font-family: var(--font-display); font-weight: 340; font-size: clamp(1.7rem, 1.2rem + 1.9vw, 3rem); line-height: 1; letter-spacing: -.01em; font-variation-settings: "opsz" 100, "SOFT" 60; padding-top: 4px; white-space: nowrap; }
.ev:first-child .ev-year { font-family: var(--font-cn); font-size: clamp(1rem, .9rem + .7vw, 1.5rem); font-weight: 600; padding-top: 10px; }
.ev h4 { margin: 0 0 6px; font-family: var(--font-cn); font-weight: 700; font-size: var(--step-1); line-height: 1.4; }
.ev p { margin: 0; max-width: 40em; color: var(--ink-2); }
.ev .tag { display: inline-block; margin-top: 10px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .08em; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ev.is-next .ev-year { color: var(--accent); }

/* ---------- economy ---------- */
.economy { background: var(--navy); }
.econ-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.gdp-fig { margin: 0; min-width: 0; position: sticky; top: calc(96px + env(safe-area-inset-top, 0px)); }
.gdp-wrap { position: relative; margin-top: 22px; }
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--night-rule); border-block: 1px solid var(--night-rule); }
.pillar { background: var(--navy); padding: 26px 24px 30px 0; min-width: 0; }
.pillar:nth-child(even) { padding-left: 24px; padding-right: 0; }
.pillar-tag { margin: 0; font-size: .7rem; letter-spacing: .14em; color: var(--star-3); }
.pillar h3 { margin: 10px 0 8px; font-family: var(--font-cn); font-weight: 700; font-size: var(--step-1); line-height: 1.35; display: grid; gap: 2px; }
.pillar h3 .big { font-family: var(--font-body); font-weight: 600; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem); line-height: 1; color: var(--night-gold); letter-spacing: -.02em; }
.pillar p { margin: 0; font-size: .95rem; color: var(--star-2); }

/* ---------- culture ---------- */
.culture { padding-bottom: clamp(72px, 9vw, 140px); }
.gold-band { background: var(--gate); color: #fff; padding-block: clamp(56px, 7vw, 104px); margin-block: 0 clamp(56px, 7vw, 104px); position: relative; overflow: hidden; }
.gold-band::before { content: "金山"; position: absolute; right: -.08em; bottom: -.32em; font-family: var(--font-cn); font-weight: 900; font-size: clamp(9rem, 28vw, 26rem); line-height: 1; color: rgba(255, 255, 255, .07); pointer-events: none; }
.gold-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); }
.gold-band .kicker { color: rgba(255, 255, 255, .78); }
.gold-band .kicker::before { background: #ffd9a8; }
.gold-intro h3 { margin: 16px 0 14px; font-family: var(--font-cn); font-weight: 800; font-size: var(--step-3); line-height: 1.2; }
.gold-intro p { margin: 0; font-size: var(--step-1); line-height: 1.85; color: rgba(255, 255, 255, .92); }
.gold-list { list-style: none; margin: 0; padding: 0; display: grid; }
.gold-list li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .24); }
.gold-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .24); }
.gold-list .mono { font-size: .8rem; letter-spacing: .06em; color: #ffd9a8; padding-top: 3px; }
.gold-list p { margin: 0; color: rgba(255, 255, 255, .92); }
.culture-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.c-card { border-top: 1px solid var(--ink); padding-top: 22px; min-width: 0; }
.c-icon { width: 44px; height: 44px; color: var(--ink); }
.c-card h3 { margin: 16px 0 8px; font-family: var(--font-cn); font-weight: 700; font-size: var(--step-1); }
.c-card p { margin: 0; font-size: .95rem; color: var(--ink-2); }

/* ---------- travel ---------- */
.trip { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: clamp(16px, 4vw, 56px); }
.trip-road { position: relative; }
.shield { position: sticky; top: calc(96px + env(safe-area-inset-top, 0px)); z-index: 2; width: 64px; height: 70px; margin-inline: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)); }
.road-svg { position: absolute; left: 0; right: 0; top: 0; bottom: 0; width: 100%; height: 100%; }
#roadPath { stroke: var(--ink); stroke-opacity: .14; stroke-width: 14; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.road-svg .lane { fill: none; stroke: var(--paper); stroke-width: 1.4; stroke-dasharray: 10 12; vector-effect: non-scaling-stroke; }
.road-svg .done { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.car { position: absolute; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 18px var(--accent); }
.stops { list-style: none; margin: 0; padding: 0; display: grid; }
.stops li { display: grid; grid-template-columns: 7em minmax(0, 1fr); column-gap: 24px; padding: 20px 0; border-top: 1px solid var(--rule); }
.stops li:last-child { border-bottom: 1px solid var(--rule); }
.stop-km { grid-row: span 2; font-size: .74rem; letter-spacing: .06em; color: var(--ink-3); padding-top: 7px; }
.stops h3 { margin: 0; font-family: var(--font-cn); font-weight: 700; font-size: var(--step-2); line-height: 1.3; }
.stops p { margin: 4px 0 0; color: var(--ink-2); max-width: 40em; }
.seasons { margin-top: clamp(64px, 8vw, 120px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-block: 1px solid var(--rule); }
.season { padding: 26px 24px 30px; min-width: 0; position: relative; }
.season + .season { border-left: 1px solid var(--rule); }
.season:first-child { padding-left: 0; }
.season-tag { margin: 0; font-size: .72rem; letter-spacing: .14em; color: var(--ink-3); }
.season h3 { margin: 6px 0 10px; font-family: var(--font-cn); font-weight: 800; font-size: var(--step-4); line-height: 1; }
.season:nth-child(1) h3 { color: var(--poppy); }
.season:nth-child(2) h3 { color: #2f7f86; }
.season:nth-child(3) h3 { color: var(--accent); }
.season:nth-child(4) h3 { color: #5c6fb0; }
.season p { margin: 0; font-size: .95rem; color: var(--ink-2); }
.tips { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.tips li { min-width: 0; }
.tips h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.tips h3::before { content: ""; width: 14px; height: 2px; background: var(--accent); }
.tips p { margin: 0; font-size: .92rem; color: var(--ink-2); }

/* ---------- finale + footer ---------- */
.finale { position: relative; min-height: 100vh; min-height: 100svh; background: #04060c; color: var(--star); overflow: hidden; display: grid; align-items: start; }
#starCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.finale-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; pointer-events: none; }
.finale-ground svg { width: 100%; height: 100%; max-width: none; }
.finale-copy { position: relative; z-index: 2; padding-block: clamp(110px, 16vh, 200px) clamp(220px, 42vh, 460px); text-align: center; display: grid; justify-items: center; gap: 0; }
.finale-copy h2 { margin: 18px 0 10px; font-family: var(--font-display); font-style: italic; font-weight: 280; font-size: clamp(4.6rem, 15vw, 14rem); line-height: .92; letter-spacing: -.03em; font-variation-settings: "opsz" 144, "SOFT" 100; background: linear-gradient(180deg, #fff 30%, #f3c98d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.finale-copy p:not(.scene-meta) { margin: 0; max-width: 34em; font-size: var(--step-1); line-height: 1.85; color: var(--star-2); }
.btn-top { margin-top: 30px; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 1px solid rgba(232, 237, 245, .35); text-decoration: none; font-size: .92rem; color: var(--star); transition: background-color .3s, border-color .3s; }
.btn-top::before { content: "↑"; font-family: var(--font-mono); }
.btn-top:hover { background: rgba(232, 237, 245, .08); border-color: rgba(232, 237, 245, .7); }
.footer { background: #04060c; color: var(--star-3); padding-block: 36px calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--night-rule); font-size: .82rem; line-height: 1.75; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: 32px; }
.footer p { margin: 0; }
.footer-brand { display: grid; gap: 2px; }
.footer-brand span:first-child { font-family: var(--font-cn); font-weight: 700; font-size: 1.1rem; color: var(--star); letter-spacing: .06em; }

/* ---------- reveal ---------- */
.js [data-reveal] { transition: transform 1s cubic-bezier(.2, .75, .2, 1), opacity 1s cubic-bezier(.2, .75, .2, 1); }
.js [data-reveal].pre { transform: translateY(28px); opacity: .22; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: .85rem; }
  .brand-en { display: none; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:not(:nth-child(4n + 1)) { padding-left: 0; }
  .stat:nth-child(even) { padding-left: 22px; }
  .culture-grid, .tips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .season:nth-child(3) { border-left: 0; padding-left: 0; }
  .season:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-menu { display: block; }
  .nav-links {
    position: absolute; top: calc(64px + env(safe-area-inset-top, 0px)); left: 0; right: 0; margin: 0; flex-direction: column; gap: 0;
    padding: 8px max(var(--gut), env(safe-area-inset-right, 0px)) 16px max(var(--gut), env(safe-area-inset-left, 0px));
    background: var(--paper); color: var(--ink); box-shadow: 0 12px 30px rgba(0, 0, 0, .12), 0 1px 0 var(--rule);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility 0s .25s;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity .25s, transform .25s; }
  .nav-links a { font-size: 1rem; padding-block: 12px; border-bottom: 1px solid var(--rule-2); opacity: 1; }
  .nav-links a::after { display: none; }
  .intro-grid > .kicker, .intro-body, .intro-facts { grid-column: 1 / -1; }
  .intro-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-grid, .relief-grid, .econ-grid, .gold-grid { grid-template-columns: minmax(0, 1fr); }
  .atlas-side, .gdp-fig { position: static; }
  .place-card { min-height: 0; }
  .hero-cue { display: none; }
  .hero-meta { top: auto; bottom: 18px; right: auto; left: max(var(--gut), env(safe-area-inset-left, 0px)); align-items: flex-start; flex-direction: row; gap: 14px; }
  .hero-copy { bottom: 64px; }
  .journey-ticks button { width: 18px; padding-inline: 0; font-size: 0; color: transparent; }
  .journey-ticks button::before, .journey-ticks button::after { left: 2px; right: 2px; }
  .trip { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .shield { width: 44px; height: 48px; }
  .stops li { grid-template-columns: minmax(0, 1fr); }
  .stop-km { grid-row: auto; padding-top: 0; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat { padding-right: 12px; }
  .stat:nth-child(even) { padding-left: 14px; }
  .stat-value { font-size: 2rem; }
  .pillars, .culture-grid, .tips, .seasons { grid-template-columns: minmax(0, 1fr); }
  .pillar, .pillar:nth-child(even) { padding-inline: 0; }
  .season, .season:first-child, .season:nth-child(3) { padding-inline: 0; border-left: 0; }
  .season + .season { border-left: 0; border-top: 1px solid var(--rule); }
  .gold-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .scene-copy > p { font-size: .92rem; line-height: 1.75; }
  .scene-facts { gap: 10px; }
  .scene-facts dd { font-size: .7rem; }
  .ev { column-gap: 30px; }
  .era-title { padding-left: calc(var(--yw) + 30px); }
  .timeline { --yw: 4.6rem; }
  .tl-line { left: calc(var(--yw) + 14px); }
  .ev::before { left: calc(var(--yw) + 9px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero { height: 100vh; height: 100svh; }
  .js [data-reveal].pre { transform: none; opacity: 1; }
}
