/* ============================================================
   西乡 · 山河与茶
   Static local-history page — paper, ink, wheat, clay
   ============================================================ */

:root {
  --paper: #FAF4E6;
  --paper-2: #F2E9D4;
  --card: #FFFDF6;
  --ink: #232B1D;
  --ink-soft: #46503C;
  --muted: #74786A;
  --green: #4C6B3A;
  --green-deep: #26341F;
  --wheat: #C9973B;
  --clay: #B06A45;
  --line: rgba(35, 43, 29, 0.14);
  --line-soft: rgba(35, 43, 29, 0.08);
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --wrap: 1180px;
  --gutter: clamp(18px, 5vw, 56px);
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin: 0;
}

p { margin: 0 0 1em; }

em { font-style: normal; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 3px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

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

/* ---------- shared type ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--clay);
  margin: 0 0 16px;
  font-weight: 600;
}
.eyebrow--light { color: var(--wheat); }

.lede {
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.85;
  color: var(--ink-soft);
  max-width: 44em;
}
.lede--light { color: rgba(239, 231, 211, 0.8); }

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 2px;
  border: 1px solid currentColor;
  letter-spacing: 0.08em;
  vertical-align: 1px;
  white-space: nowrap;
}
.tag--fact { color: #3E5C30; background: rgba(76, 107, 58, 0.08); }
.tag--doubt { color: #9A5636; background: rgba(176, 106, 69, 0.08); }
.tag--area { color: #8C6418; background: rgba(201, 151, 59, 0.1); }
.tag--demo { color: #6D7165; background: rgba(116, 120, 106, 0.08); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
}
.btn i { font-style: normal; font-size: 16px; line-height: 1; }
.btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--solid:hover { background: var(--green-deep); border-color: var(--green-deep); transform: translateY(-1px); }
.btn--ghost { color: var(--ink); border-color: rgba(35, 43, 29, 0.32); }
.btn--ghost:hover { background: rgba(35, 43, 29, 0.05); }

/* ============================================================
   NAV
   ============================================================ */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: transparent;
  z-index: 220;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--wheat);
  transition: width 0.1s linear;
}

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 210;
  background: rgba(250, 244, 230, 0.86);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.site-nav.is-scrolled {
  background: rgba(250, 244, 230, 0.96);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 8px 24px -20px rgba(35, 43, 29, 0.6);
}

.nav-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-seal {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--clay);
  color: var(--clay);
  font-family: var(--serif);
  font-size: 17px;
  border-radius: 2px;
  flex: none;
}
.brand-text { display: flex; align-items: baseline; gap: 8px; }
.brand-text b { font-family: var(--serif); font-size: 17px; letter-spacing: 0.12em; }
.brand-text i {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.nav-links { display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); }
.nav-links a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.06em;
  padding: 8px 0;
  opacity: 0.66;
  transition: opacity 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--wheat);
  transform: translate(-50%, 4px) scale(0);
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover { opacity: 1; }
.nav-links a.is-active { opacity: 1; }
.nav-links a.is-active::after { transform: translate(-50%, 0) scale(1); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 21.5px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(36px, 7vh, 76px));
  padding-bottom: clamp(34px, 5vh, 56px);
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 78% 18%, rgba(201, 151, 59, 0.12), transparent 60%),
    radial-gradient(90% 70% at 10% 90%, rgba(76, 107, 58, 0.07), transparent 60%),
    var(--paper);
}
.hero-ridges {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(160px, 22vh, 260px);
  z-index: 0;
  pointer-events: none;
}
.hero-ridges path { fill: rgba(76, 107, 58, 0.05); }
.hero-ridges path:nth-child(2) { fill: rgba(76, 107, 58, 0.05); }
.hero-ridges path:nth-child(3) { fill: rgba(201, 151, 59, 0.06); }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(76px, 11vw, 148px);
  line-height: 0.98;
  letter-spacing: 0.06em;
  margin: 0 0 6px -0.04em;
}
.hero-seal {
  flex: none;
  width: clamp(38px, 4.4vw, 54px);
  height: clamp(38px, 4.4vw, 54px);
  display: grid;
  place-items: center;
  border: 2px solid var(--clay);
  color: var(--clay);
  font-size: clamp(19px, 2.2vw, 26px);
  line-height: 1;
  border-radius: 3px;
  transform: translateY(0.1em);
}

.hero-kicker {
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 24px);
  color: var(--green);
  letter-spacing: 0.04em;
  margin: 14px 0 18px;
}
.hero-lede {
  max-width: 33em;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.9;
  margin-bottom: 0;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-meta {
  margin: 24px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 40em;
}

.hero-figure {
  margin: 0;
  justify-self: center;
  width: min(100%, 460px);
}
.medallion {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 9px;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(255, 253, 246, 0.9), rgba(242, 233, 212, 0.6));
  box-shadow:
    0 30px 60px -34px rgba(35, 43, 29, 0.55),
    0 0 0 1px rgba(35, 43, 29, 0.1);
}
.medallion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: saturate(0.92) contrast(1.02);
}
.medallion-edge {
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(250, 244, 230, 0.55);
  border-radius: 50%;
  pointer-events: none;
}
.medallion-mark {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(30, 42, 32, 0.72);
  color: #F3E9CF;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(2px);
}
.hero-figure figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(36px, 6vh, 64px) 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 22px clamp(10px, 2vw, 26px);
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat dt {
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 2px;
}
.stat dd {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat dd small {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  margin-left: 5px;
  letter-spacing: 0;
}

/* ============================================================
   TERRAIN
   ============================================================ */
.terrain-section {
  background: var(--green-deep);
  color: #EFE7D3;
  padding-top: clamp(62px, 9vw, 108px);
  padding-bottom: clamp(46px, 6vw, 70px);
}
.terrain-head { margin-bottom: clamp(26px, 4vw, 44px); }
.terrain-head h2 {
  font-size: clamp(32px, 4.8vw, 52px);
  margin: 0 0 18px;
  color: #F4ECD9;
}
.terrain-head .lede { max-width: 46em; }

.terrain-stage {
  position: relative;
  height: clamp(420px, 66vh, 680px);
  background: #16221A;
  overflow: hidden;
  isolation: isolate;
}
#terrainCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  outline: none;
}
#terrainCanvas:active { cursor: grabbing; }
#terrainCanvas:focus-visible { outline: 2px solid var(--wheat); outline-offset: -2px; }

.terrain-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.terrain-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  font-size: 11.5px;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: #F5EDD9;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75), 0 0 12px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s;
  will-change: transform;
}
.terrain-label.is-on { opacity: 0.92; }
.terrain-label b {
  font-weight: 600;
  font-size: 12px;
}
.terrain-label i {
  display: block;
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  opacity: 0.62;
  text-align: center;
}
.terrain-label::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  margin: 3px auto 0;
  border-radius: 50%;
  background: var(--wheat);
  box-shadow: 0 0 0 2px rgba(22, 34, 26, 0.55);
}
.terrain-label.is-seat { font-size: 13px; }
.terrain-label.is-seat b { font-size: 13.5px; }
.terrain-label.is-water {
  color: #C3DCD8;
  font-size: 10.5px;
  letter-spacing: 0.12em;
}
.terrain-label.is-water b { font-weight: 500; font-size: 11px; }
.terrain-label.is-water::after {
  width: 3px;
  height: 3px;
  background: #8FB5B1;
}

.terrain-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(239, 231, 211, 0.7);
  background: #16221A;
  z-index: 3;
  transition: opacity 0.4s;
}
.terrain-loading span {
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(239, 231, 211, 0.25);
  border-top-color: var(--wheat);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.terrain-loading.is-done { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.terrain-fallback {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #16221A;
}
.terrain-fallback img { width: 100%; height: 100%; object-fit: cover; opacity: 0.78; }
.terrain-fallback p {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(90%, 520px);
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
  color: #F3E9CF;
  background: rgba(22, 34, 26, 0.82);
  padding: 10px 14px;
  border-radius: 3px;
}

.terrain-hud {
  position: absolute;
  top: clamp(14px, 2.4vw, 28px);
  left: clamp(14px, 2.4vw, 32px);
  z-index: 2;
  pointer-events: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.hud-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #F5EDD9;
}
.hud-sub {
  margin: 2px 0 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(239, 231, 211, 0.55);
}
.legend { width: 156px; }
.legend-bar {
  display: block;
  height: 6px;
  border-radius: 1px;
  background: linear-gradient(90deg, #7E9464, #9DAB74, #C2BE86, #C9A363, #B67A4E, #8E5B41);
  box-shadow: 0 0 0 1px rgba(250, 244, 230, 0.18);
}
.legend-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 9.5px;
  color: rgba(239, 231, 211, 0.6);
  font-variant-numeric: tabular-nums;
}
.legend-ends i { font-style: normal; }

.terrain-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: clamp(14px, 2.4vw, 28px) clamp(14px, 2.4vw, 32px);
  pointer-events: none;
  background: linear-gradient(to top, rgba(16, 26, 19, 0.72), rgba(16, 26, 19, 0));
}
.preset-row, .toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
}
.chip {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(250, 244, 230, 0.28);
  background: rgba(250, 244, 230, 0.07);
  color: #EFE7D3;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { background: rgba(250, 244, 230, 0.16); }
.chip.is-active,
.chip[aria-pressed="true"] {
  background: var(--wheat);
  border-color: var(--wheat);
  color: #1B261D;
}
.chip:focus-visible { outline: 2px solid var(--wheat); outline-offset: 3px; }

.terrain-hint {
  position: absolute;
  top: clamp(14px, 2.4vw, 28px);
  right: clamp(14px, 2.4vw, 32px);
  z-index: 2;
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(239, 231, 211, 0.5);
  pointer-events: none;
}

.terrain-note {
  margin: clamp(18px, 2.4vw, 26px) 0 0;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(239, 231, 211, 0.6);
  max-width: 72em;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(64px, 9vw, 118px) 0; }
.section--tint { background: var(--paper-2); }
.section--deep { background: #1E2A20; color: #EFE7D3; }

.section-head { max-width: 780px; margin-bottom: clamp(34px, 5vw, 60px); }
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 50px);
  margin: 0 0 18px;
}
.section-head .lede { margin-bottom: 0; }

/* ---------- geography ---------- */
.geo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.geo-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: clamp(20px, 2.6vw, 32px);
  position: relative;
}
.geo-card h3 { font-size: 22px; margin: 0 0 10px; }
.geo-card p { font-size: 15.5px; line-height: 1.8; color: var(--ink-soft); }
.geo-index {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--wheat);
  margin: 0 0 10px;
}
.geo-tag { font-size: 11.5px; color: var(--muted); margin: 0; }

.profile-card {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: clamp(20px, 3vw, 38px);
}
.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.profile-head h3 { font-size: 22px; margin-bottom: 8px; }
.profile-head p { font-size: 14.5px; color: var(--muted); max-width: 46em; margin: 0; }
.profile-badge {
  flex: none;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-align: right;
  line-height: 1.6;
  margin: 0;
}
.profile-badge span { display: block; color: var(--wheat); }

.profile-svg { width: 100%; height: auto; margin: 8px 0 4px; display: block; }
.pf-grid { stroke: rgba(35, 43, 29, 0.1); stroke-width: 1; stroke-dasharray: 2 5; }
.pf-tick { fill: #9A9A88; font-size: 11px; font-family: var(--sans); }
.pf-line { fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linejoin: round; }
.pf-marker { stroke: var(--wheat); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.8; }
.pf-dot { fill: var(--wheat); stroke: var(--card); stroke-width: 2; }
.pf-dot--peak { fill: var(--clay); }
.pf-label { fill: var(--ink); font-size: 12.5px; font-family: var(--sans); font-weight: 600; }
.pf-label--peak { fill: #8F4F30; }
.pf-axis { fill: var(--muted); font-size: 11.5px; font-family: var(--sans); letter-spacing: 0.08em; }
.profile-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  margin-top: 6px;
}
.profile-notes p { margin: 0; font-size: 11.5px; color: var(--muted); }

.elev-band { margin-top: clamp(32px, 4vw, 52px); }
.elev-band h3 { font-size: 20px; margin-bottom: 16px; }
.band-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); max-width: 60em; }

.photo-band { margin: clamp(40px, 6vw, 68px) 0 0; }
.shot-btn {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: #E9E1CC;
  cursor: zoom-in;
  overflow: hidden;
}
.shot-btn img {
  width: 100%;
  filter: sepia(0.12) contrast(1.03);
  transition: transform 0.6s var(--ease);
}
.shot-btn:hover img { transform: scale(1.015); }
.shot-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: #F5EDD9;
  background: rgba(22, 34, 26, 0.66);
  border-radius: 2px;
  backdrop-filter: blur(4px);
}
.photo-band figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px 28px;
  flex-wrap: wrap;
  padding-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.photo-cap { max-width: 52em; }
.photo-credit { white-space: nowrap; letter-spacing: 0.04em; }

/* ---------- names ---------- */
.name-chain {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.name-node {
  flex: none;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 96px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 2px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
}
.name-node b {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--wheat);
  letter-spacing: 0.02em;
}
.name-node.is-key { border-color: rgba(76, 107, 58, 0.5); background: rgba(76, 107, 58, 0.07); }
.name-node.is-key b { color: var(--green); }
.name-arrow { flex: none; align-self: center; color: var(--wheat); font-size: 13px; }

.history-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: clamp(30px, 5vw, 64px);
  margin-top: clamp(30px, 4vw, 48px);
}
.timeline { border-left: 1px solid var(--line); padding-left: clamp(20px, 3vw, 34px); }
.tl-item {
  position: relative;
  padding-bottom: clamp(22px, 3vw, 34px);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(clamp(20px, 3vw, 34px) * -1 - 4px);
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 1px solid var(--wheat);
}
.tl-year {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  color: var(--wheat);
  margin: 0 0 6px;
  letter-spacing: 0.04em;
}
.tl-body h3 { font-size: 18.5px; margin-bottom: 4px; }
.tl-body p { font-size: 15px; line-height: 1.8; color: var(--ink-soft); margin: 0; }

.history-aside {
  background: var(--card);
  border: 1px solid var(--line-soft);
  padding: clamp(20px, 2.8vw, 30px);
  align-self: start;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.history-aside h3 { font-size: 20px; margin-bottom: 16px; }
.aside-item { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.aside-item:first-of-type { border-top: 0; padding-top: 0; }
.aside-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--clay);
  margin-bottom: 6px;
}
.aside-item p { font-size: 14px; line-height: 1.75; color: var(--ink-soft); }
.aside-item .geo-tag { font-size: 10.5px; }
.aside-note {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
}
.aside-note p { margin: 0; }

/* ---------- tea ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: clamp(18px, 2.2vw, 26px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.stat-card--big {
  grid-column: span 2;
  grid-row: span 2;
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(201, 151, 59, 0.13), transparent 55%),
    var(--card);
  justify-content: space-between;
}
.stat-label {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 6px;
}
.stat-value {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  margin: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.stat-value small {
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--muted);
  margin-left: 5px;
  letter-spacing: 0;
}
.stat-card--big .stat-value { font-size: clamp(50px, 6vw, 74px); }
.stat-delta { font-size: 11.5px; color: var(--green); margin: 4px 0 0; }
.stat-note { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 8px 0 0; }

.tea-panel {
  margin-top: clamp(28px, 4vw, 44px);
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
}
.tablist {
  display: flex;
  gap: 2px;
  padding: 0 clamp(10px, 2vw, 24px);
  border-bottom: 1px solid var(--line-soft);
  overflow-x: auto;
}
.tablist button {
  flex: none;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tablist button:hover { color: var(--ink); }
.tablist button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--wheat);
  font-weight: 600;
}
.tab-panels { padding: clamp(20px, 3vw, 34px); }
.tab-panels [role="tabpanel"] { max-width: 70ch; outline: none; }
.tab-panels [role="tabpanel"] p {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.tab-panels [role="tabpanel"] p:last-child { margin-bottom: 0; }

.chart-card {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: clamp(20px, 3vw, 32px);
}
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.chart-head h3 { font-size: 19px; margin-bottom: 2px; }
.chart-head p { font-size: 11.5px; color: var(--muted); margin: 0; }
.chart-total {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.chart-total small { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-left: 2px; }

.bars { display: grid; gap: 10px; }
.bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 58px;
  align-items: center;
  gap: 14px;
}
.bar-name { font-size: 13px; color: var(--ink-soft); letter-spacing: 0.04em; }
.bar-track {
  height: 24px;
  background: rgba(35, 43, 29, 0.055);
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 2px;
  transform-origin: left center;
}
.bar-fill--1 { background: #6E8A55; }
.bar-fill--2 { background: var(--wheat); }
.bar-fill--3 { background: #8C5F45; }
.bar-fill--mountain { background: var(--green); }
.bar-fill--hill { background: var(--wheat); }
.bar-fill--plain { background: #E0CFA6; }
.bar-val {
  font-family: var(--serif);
  font-size: 17px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.chart-note { margin: 20px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--muted); }

/* ---------- red ---------- */
.red-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}
.red-copy h2 {
  font-size: clamp(29px, 4.2vw, 46px);
  color: #F4ECD9;
  margin: 0 0 20px;
}
.red-copy .lede { max-width: 38em; }
.red-body { font-size: 15.5px; line-height: 1.9; color: rgba(239, 231, 211, 0.72); max-width: 36em; margin-top: 14px; }
.route {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 18px;
}
.route-node {
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  border: 1px solid rgba(201, 151, 59, 0.45);
  color: #EFE0C4;
  border-radius: 2px;
}
.route-line { width: 26px; height: 1px; background: rgba(201, 151, 59, 0.45); }
.red-note { font-size: 11.5px; color: rgba(239, 231, 211, 0.5); margin: 0; }

.red-figure { border-left: 1px solid rgba(201, 151, 59, 0.22); padding-left: clamp(20px, 3vw, 36px); }
.red-year {
  font-family: var(--serif);
  font-size: clamp(72px, 10vw, 132px);
  line-height: 0.85;
  margin: 0;
  color: rgba(201, 151, 59, 0.14);
  letter-spacing: 0.02em;
}
.red-month {
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--wheat);
  margin: 10px 0 22px;
}
.red-dates p {
  display: flex;
  gap: 12px;
  font-size: 12.5px;
  color: rgba(239, 231, 211, 0.7);
  margin: 0 0 10px;
}
.red-dates b {
  flex: none;
  min-width: 54px;
  font-weight: 600;
  color: #EFE0C4;
  font-variant-numeric: tabular-nums;
}

/* ---------- places ---------- */
.place-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.place-card {
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.place-card:hover {
  border-color: rgba(76, 107, 58, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -30px rgba(35, 43, 29, 0.55);
}
.place-tag {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--clay);
  margin: 0 0 10px;
}
.place-card h3 { font-size: 24px; margin-bottom: 8px; }
.place-card p { font-size: 14.5px; line-height: 1.8; color: var(--ink-soft); }
.place-meta {
  margin: auto 0 0;
  padding-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.taste-strip {
  margin-top: clamp(36px, 5vw, 56px);
  background: var(--green-deep);
  color: #EFE7D3;
  padding: clamp(24px, 3.4vw, 38px);
  border-radius: 3px;
}
.taste-strip h3 { font-size: 21px; color: #F4ECD9; margin-bottom: 18px; }
.taste-strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 32px;
}
.taste-strip li { display: flex; flex-direction: column; gap: 2px; }
.taste-strip b { font-family: var(--serif); font-size: 16.5px; font-weight: 600; color: #F2E7CC; }
.taste-strip span { font-size: 12.5px; color: rgba(239, 231, 211, 0.62); line-height: 1.7; }

.travel-card {
  margin-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.travel-card h3 { font-size: 20px; margin-bottom: 16px; }
.travel-card dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 40px;
  margin: 0;
}
.travel-card dt {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--clay);
  margin-bottom: 2px;
}
.travel-card dd { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.7; }

/* ---------- sources ---------- */
.sources-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: clamp(30px, 4vw, 56px);
}
.source-block + .source-block { margin-top: 34px; }
.source-block h3 { font-size: 19px; margin-bottom: 12px; }
.source-list, .credit-list, .legend-list { list-style: none; margin: 0; padding: 0; }
.source-list li { padding: 13px 0; border-top: 1px solid var(--line-soft); }
.source-list li:first-child { border-top: 0; padding-top: 0; }
.source-list a { font-size: 14.5px; font-weight: 600; display: inline-block; }
.source-list span { display: block; font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 2px; }

.legend-list li { font-size: 13px; color: var(--ink-soft); padding: 8px 0; border-top: 1px solid var(--line-soft); display: flex; gap: 9px; align-items: baseline; }
.legend-list li:first-child { border-top: 0; }
.legend-list .tag { flex: none; }

.credit-list li { font-size: 12.5px; line-height: 1.7; padding: 10px 0; border-top: 1px solid var(--line-soft); color: var(--muted); }
.credit-list li:first-child { border-top: 0; }
.credit-list b { display: block; color: var(--ink-soft); font-size: 13px; font-weight: 600; }

.todo-card {
  margin-top: 34px;
  background: var(--card);
  border-left: 3px solid var(--clay);
  padding: 20px 22px;
}
.todo-card h3 { font-size: 18px; margin-bottom: 8px; }
.todo-card p { font-size: 13px; line-height: 1.8; color: var(--ink-soft); margin-bottom: 8px; }
.todo-card p:last-child { margin-bottom: 0; }

.update-line {
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- footer ---------- */
.site-footer {
  background: #1B261D;
  color: #EFE7D3;
  padding: clamp(36px, 5vw, 56px) 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px 40px;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.brand-seal--sm { width: 34px; height: 34px; font-size: 17px; border-color: var(--wheat); color: var(--wheat); }
.footer-brand p { margin: 0; display: flex; flex-direction: column; line-height: 1.5; }
.footer-brand b { font-family: var(--serif); font-size: 16px; letter-spacing: 0.1em; }
.footer-brand span { font-size: 10.5px; letter-spacing: 0.12em; color: rgba(239, 231, 211, 0.5); }
.footer-note { font-size: 12px; line-height: 1.7; color: rgba(239, 231, 211, 0.55); margin: 0; max-width: 40em; }
.footer-copy { font-size: 11px; color: rgba(239, 231, 211, 0.45); margin: 0; white-space: nowrap; }

/* ---------- to top ---------- */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 180;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(35, 43, 29, 0.2);
  background: rgba(250, 244, 230, 0.92);
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px -16px rgba(35, 43, 29, 0.6);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}
.to-top.show { opacity: 1; transform: none; }

/* ---------- lightbox ---------- */
.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(94vw, 1100px);
  max-height: 92vh;
  color: #EFE7D3;
}
.lightbox::backdrop { background: rgba(18, 24, 18, 0.86); backdrop-filter: blur(4px); }
.lb-inner {
  position: relative;
  background: #16221A;
  padding: 12px;
  border: 1px solid rgba(239, 231, 211, 0.15);
}
.lb-inner img {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}
.lb-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(239, 231, 211, 0.4);
  background: #1B261D;
  color: #EFE7D3;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lb-meta { padding: 14px 6px 4px; font-size: 12px; line-height: 1.7; color: rgba(239, 231, 211, 0.7); }
.lb-meta p { margin: 0 0 3px; }
.lb-meta a { color: var(--wheat); }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 0.8fr; gap: 32px; }
  .hero-title { font-size: clamp(72px, 10vw, 112px); }
  .history-grid { grid-template-columns: 1.35fr 0.95fr; gap: 34px; }
  .place-grid { grid-template-columns: repeat(2, 1fr); }
  .sources-grid { grid-template-columns: 1fr; }
  .source-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .source-side .source-block + .source-block { margin-top: 0; }
  .todo-card { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 22px;
    background: rgba(250, 244, 230, 0.98);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
    max-height: calc(100svh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-open .nav-links { visibility: visible; opacity: 1; transform: none; }
  .nav-links a {
    padding: 15px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line-soft);
    opacity: 0.85;
  }
  .nav-links a::after { display: none; }
  .nav-links a.is-active { color: var(--clay); }

  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-figure { order: 2; width: min(72vw, 360px); margin-top: 6px; }
  .hero-title { font-size: clamp(76px, 17vw, 128px); }
  .hero-copy { order: 1; }

  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 18px 14px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stat:nth-child(1), .stat:nth-child(2) { padding-top: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { padding-bottom: 4px; }

  .terrain-hint { display: none; }
  .terrain-stage { height: clamp(380px, 58vh, 520px); }
  .terrain-controls { flex-direction: column; align-items: stretch; }
  .preset-row, .toggle-row { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .preset-row::-webkit-scrollbar, .toggle-row::-webkit-scrollbar { display: none; }

  .geo-grid { grid-template-columns: 1fr; }
  .history-grid { grid-template-columns: 1fr; }
  .history-aside { position: static; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .stat-card--big { grid-column: span 2; grid-row: auto; }
  .red-grid { grid-template-columns: 1fr; gap: 30px; }
  .red-figure { border-left: 0; border-top: 1px solid rgba(201, 151, 59, 0.22); padding-left: 0; padding-top: 22px; display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
  .red-year { font-size: 80px; }
  .red-month { margin: 0 0 10px; }
  .red-dates { flex: 1 1 220px; }
  .footer-inner { grid-template-columns: 1fr; gap: 16px; }
  .footer-copy { white-space: normal; }
}

@media (max-width: 640px) {
  body { font-size: 16px; line-height: 1.8; }
  .brand-text i { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 28px); }
  .hero-kicker { font-size: 18px; line-height: 1.7; }
  .hero-lede { font-size: 15.5px; }
  .hero-actions .btn { flex: 1 1 160px; }
  .stat dd { font-size: 25px; }
  .stat dt { font-size: 10.5px; letter-spacing: 0.06em; }

  .terrain-stage { height: 62vh; min-height: 360px; }
  .hud-sub { display: none; }
  .legend { width: 128px; }
  .chip { padding: 0 12px; font-size: 12px; }

  .profile-head { gap: 8px; }
  .profile-badge { display: none; }
  .pf-label { font-size: 10px; }
  .pf-tick { font-size: 9px; }
  .pf-axis { font-size: 9px; }
  .profile-notes { display: block; }
  .profile-notes p + p { margin-top: 4px; }

  .bento { grid-template-columns: 1fr; }
  .stat-card--big { grid-column: auto; }
  .stat-card { padding: 18px; }

  .photo-band figcaption { flex-direction: column; gap: 4px; }
  .photo-credit { white-space: normal; }

  .name-chain { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .history-aside { padding: 18px; }
  .tl-year { font-size: 23px; }

  .bar-row { grid-template-columns: 68px 1fr 50px; gap: 10px; }
  .bar-name { font-size: 12px; }
  .bar-val { font-size: 14px; }
  .chart-total { font-size: 24px; }

  .place-grid { grid-template-columns: 1fr; }
  .place-card { min-height: 0; }
  .place-card p { margin-bottom: 0; }

  .taste-strip ul { grid-template-columns: 1fr; gap: 12px; }
  .travel-card dl { grid-template-columns: 1fr; gap: 12px; }
  .source-side { grid-template-columns: 1fr; }
  .source-side .source-block + .source-block { margin-top: 28px; }
  .todo-card { padding: 16px 18px; }

  .route-line { width: 14px; }
  .route-node { font-size: 11px; padding: 7px 10px; }
  .red-year { font-size: 66px; }

  .lb-close { top: 6px; right: 6px; border-color: rgba(239, 231, 211, 0.25); }
  .to-top { right: 12px; bottom: 12px; width: 44px; height: 44px; }
}

@media (max-width: 380px) {
  .hero-seal { display: none; }
  .hero-title { letter-spacing: 0.03em; }
  .stat dd { font-size: 22px; }
  .chip { padding: 0 10px; font-size: 11.5px; }
  .profile-card { padding: 16px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
