@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/fraunces-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/dm-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg-canvas: #F7F5EF;
  --bg-card: #FFFDF9;
  --bg-recessed: #EDEAE0;
  --bg-glass: rgba(247, 245, 239, 0.88);
  --ink-primary: #1B221E;
  --ink-secondary: #4A544E;
  --ink-tertiary: #59635C;
  --ink-error: #A62626;
  --accent-pine: #1B5A42;
  --ink-on-pine: #FFFDF9;
  --accent-terracotta: #A84122;
  --ink-on-terracotta: #FFFDF9;
  --accent-ridge: #24557D;
  --border-subtle: #DDD7CA;
  --border-strong: #B7B0A1;
  --pill-drive-bg: #F7ECD2;
  --pill-drive-fg: #6B4506;
  --pill-cabin-bg: #E1EFE8;
  --pill-cabin-fg: #144733;
  --pill-trail-bg: #E1ECF4;
  --pill-trail-fg: #1B4466;
  --pill-town-bg: #F6E5DE;
  --pill-town-fg: #832F16;
  --shadow-card: 0 0 0 1px rgba(27, 34, 30, 0.05), 0 4px 12px rgba(74, 58, 36, 0.06), 0 14px 28px rgba(74, 58, 36, 0.05);
  --shadow-lift: 0 0 0 1px rgba(27, 34, 30, 0.08), 0 8px 20px rgba(74, 58, 36, 0.10), 0 20px 36px rgba(74, 58, 36, 0.08);
  --radius-card: 20px;
  --radius-media: 16px;
  --radius-control: 12px;
  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, ui-serif, serif;
  --font-sans: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --header-h: 58px;
}

html[data-theme="dark"] {
  --bg-canvas: #141916;
  --bg-card: #1D2420;
  --bg-recessed: #262F2A;
  --bg-glass: rgba(20, 25, 22, 0.86);
  --ink-primary: #F5F2EA;
  --ink-secondary: #C4C9C2;
  --ink-tertiary: #9AA39C;
  --ink-error: #F58A8A;
  --accent-pine: #63CA9F;
  --ink-on-pine: #0E1A14;
  --accent-terracotta: #F09373;
  --ink-on-terracotta: #1A120F;
  --accent-ridge: #82BCEB;
  --border-subtle: rgba(245, 242, 234, 0.12);
  --border-strong: rgba(245, 242, 234, 0.24);
  --pill-drive-bg: #332917;
  --pill-drive-fg: #F5CF86;
  --pill-cabin-bg: #183026;
  --pill-cabin-fg: #8BE0BA;
  --pill-trail-bg: #1A2B38;
  --pill-trail-fg: #98CBF2;
  --pill-town-bg: #35211B;
  --pill-town-fg: #F4A98E;
  --shadow-card: 0 0 0 1px rgba(245, 242, 234, 0.10), inset 0 1px 0 rgba(255, 252, 244, 0.07), 0 12px 28px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 0 0 1px rgba(245, 242, 234, 0.18), inset 0 1px 0 rgba(255, 252, 244, 0.10), 0 16px 34px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 220ms ease, color 220ms ease;
}
:focus-visible { outline: 2.5px solid var(--accent-ridge); outline-offset: 2px; }
button, input, a { font-family: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}
.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 4px 2px;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink-primary);
  text-align: left;
}
.brand-stamp {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent-pine);
  color: var(--ink-on-pine);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-tertiary);
  text-transform: uppercase;
  white-space: nowrap;
}
.header-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 11px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--ink-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.ctrl-btn:hover { border-color: var(--border-strong); }
.ctrl-btn:active { transform: scale(0.97); }

.ridge-stage {
  position: relative;
  width: 100%;
  height: 204px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #8FA7B8 0%, #C9D5DA 42%, #EED8C4 80%, #F7F5EF 100%);
}
html[data-theme="dark"] .ridge-stage {
  background: linear-gradient(180deg, #0B1522 0%, #16253A 48%, #2E3548 84%, #141916 100%);
}
.ridge-fallback-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}
.svg-dark-only { opacity: 0; }
html[data-theme="dark"] .svg-light-only { opacity: 0; }
html[data-theme="dark"] .svg-dark-only { opacity: 1; }
#ridge-canvas, #ridge-gl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}
#ridge-gl-canvas { z-index: 2; }
.ridge-stage.is-fallback #ridge-gl-canvas { display: none; }
.ridge-overlay-meta {
  position: relative;
  z-index: 3;
  max-width: 760px;
  height: 100%;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.ridge-chip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.ridge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-primary);
  white-space: nowrap;
}
.ridge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-pine);
}
.ridge-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-end;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--ink-tertiary);
}
.ridge-notice[hidden] { display: none; }

.main-wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 72px; }
.view-panel { display: none; }
.view-panel.is-active {
  display: block;
  animation: postcardIn 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes postcardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.day-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.pill-drive { background: var(--pill-drive-bg); color: var(--pill-drive-fg); }
.pill-cabin { background: var(--pill-cabin-bg); color: var(--pill-cabin-fg); }
.pill-trail { background: var(--pill-trail-bg); color: var(--pill-trail-fg); }
.pill-town { background: var(--pill-town-bg); color: var(--pill-town-fg); }
.pill-tonight {
  background: var(--pill-town-bg);
  color: var(--pill-town-fg);
  border: 1px dashed var(--accent-terracotta);
}
.mono-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; hyphens: none; margin: 0; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: var(--radius-control);
  border: 0;
  background: var(--accent-pine);
  color: var(--ink-on-pine);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 150ms ease, opacity 150ms ease;
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.65; cursor: progress; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.btn-secondary:hover { background: var(--bg-recessed); }
.btn-secondary:active { transform: scale(0.98); }

.gate-card {
  max-width: 460px;
  margin: 12px auto 0;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.airmail-stripe {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent-terracotta) 0 14px,
    transparent 14px 22px,
    var(--accent-pine) 22px 36px,
    transparent 36px 44px
  );
  opacity: 0.85;
}
.gate-body { padding: 24px 20px 26px; }
.postmark-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.postmark-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px dashed var(--accent-terracotta);
  color: var(--accent-terracotta);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.stamp-svg {
  width: 46px;
  height: 54px;
  border-radius: 6px;
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-recessed);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.gate-title { font-size: 28px; line-height: 1.16; letter-spacing: -0.015em; margin-bottom: 10px; }
.gate-copy { font-size: 17px; line-height: 1.58; color: var(--ink-secondary); margin: 0 0 20px; }
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-label { font-size: 14px; font-weight: 600; color: var(--ink-primary); }
.gate-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-recessed);
  color: var(--ink-primary);
  font-size: 16px;
}
.gate-error { min-height: 22px; margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-error); }
.gate-helper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.install-nudge {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-pine);
  border-radius: var(--radius-media);
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.install-nudge[hidden] { display: none; }
.install-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.install-title { font-family: var(--font-serif); font-size: 18px; font-weight: 600; margin: 0 0 3px; color: var(--ink-primary); }
.install-copy { margin: 0; font-size: 15px; line-height: 1.48; color: var(--ink-secondary); }
.install-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.install-steps {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-recessed);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-secondary);
  display: none;
}
.install-steps.is-open { display: block; }

.journal-header { margin-bottom: 18px; }
.journal-heading { font-size: 28px; line-height: 1.16; letter-spacing: -0.015em; margin: 6px 0 8px; }
.journal-intro { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-secondary); }
.altitude-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin: 16px 0 20px;
  border-radius: 14px;
  background: var(--bg-recessed);
  border: 1px solid var(--border-subtle);
}
.altitude-stops {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-secondary);
}
.alt-active { color: var(--accent-pine); font-weight: 700; }

.timeline-list { position: relative; display: flex; flex-direction: column; gap: 16px; padding-left: 24px; }
.timeline-list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: var(--border-subtle);
}
.timeline-item { position: relative; }
.timeline-dot {
  position: absolute;
  left: -24px;
  top: 22px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-canvas);
  border: 3px solid var(--border-strong);
  z-index: 1;
}
.timeline-item.is-published .timeline-dot {
  background: var(--accent-pine);
  border-color: var(--bg-canvas);
  box-shadow: 0 0 0 2px var(--accent-pine);
}
.timeline-item.is-tonight .timeline-dot {
  background: var(--accent-terracotta);
  border-color: var(--bg-canvas);
  box-shadow: 0 0 0 3px rgba(168, 65, 34, 0.28);
  animation: tonightPulse 2.4s ease-in-out infinite;
}
@keyframes tonightPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(168, 65, 34, 0.24); }
  50% { box-shadow: 0 0 0 6px rgba(168, 65, 34, 0.10); }
}

.day-card {
  width: 100%;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-card);
  color: var(--ink-primary);
  cursor: pointer;
  display: block;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.day-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.day-card.is-tonight { border-style: dashed; border-color: var(--accent-terracotta); cursor: default; }
.day-card.is-tonight:hover { transform: none; box-shadow: var(--shadow-card); }
.day-card.is-upcoming {
  background: var(--bg-recessed);
  border-style: dashed;
  border-color: var(--border-strong);
  box-shadow: none;
  cursor: default;
}
.day-card.is-upcoming:hover { transform: none; box-shadow: none; }

.card-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.card-title { font-size: 22px; line-height: 1.22; letter-spacing: -0.01em; margin-bottom: 8px; }
.card-excerpt { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-secondary); }
.card-thumb-strip { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin: 12px 0; }
.thumb-box {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  aspect-ratio: 16 / 10;
  background: var(--bg-recessed);
}
.thumb-box.is-tall { aspect-ratio: auto; height: 100%; }
.thumb-box img, .thumb-box svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.card-footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-pine);
}

.day-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-frame {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #1B2823;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}
.hero-art, .hero-img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 25, 22, 0.14) 0%,
    rgba(20, 25, 22, 0.08) 38%,
    rgba(20, 25, 22, 0.74) 72%,
    rgba(20, 25, 22, 0.94) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 18px 18px;
}
.hero-title-group { color: #F5F2EA; }
.hero-title { font-size: clamp(26px, 5vw, 38px); line-height: 1.12; letter-spacing: -0.02em; color: #F5F2EA; margin-top: 8px; }

.story-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 22px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}
.story-prose { max-width: 62ch; font-family: var(--font-serif); font-size: 18px; line-height: 1.68; color: var(--ink-primary); }
.story-prose.is-drive { font-family: var(--font-sans); font-size: 17px; line-height: 1.62; }
.story-prose p { margin: 0 0 16px; }
.story-prose p:last-child { margin-bottom: 0; }

.quotes-stack { display: flex; flex-direction: column; gap: 12px; margin: 22px 0; }
.quote-card {
  background: var(--bg-recessed);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-terracotta);
  border-radius: 14px;
  padding: 14px 16px;
}
.quote-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  margin-bottom: 4px;
}
.quote-text { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: 19px; line-height: 1.45; color: var(--ink-primary); }

.section-heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.section-heading { font-size: 22px; line-height: 1.2; }
.essay-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.photo-figure {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-media);
  padding: 10px 10px 14px;
  box-shadow: var(--shadow-card);
}
.photo-trigger {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg-recessed);
  cursor: zoom-in;
  position: relative;
  text-align: left;
}
.photo-trigger img, .photo-trigger svg { display: block; width: 100%; height: auto; }
.photo-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(20, 25, 22, 0.78);
  color: #F5F2EA;
  font-family: var(--font-mono);
  font-size: 11px;
}
.photo-caption { margin: 10px 4px 0; font-size: 15px; line-height: 1.55; color: var(--ink-secondary); }

.reel-theater {
  margin-top: 26px;
  background: #141916;
  color: #F5F2EA;
  border-radius: var(--radius-card);
  border: 1px solid rgba(245, 242, 234, 0.14);
  padding: 14px;
  box-shadow: var(--shadow-lift);
}
.reel-viewport {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0F1412;
  display: grid;
  place-items: center;
}
.reel-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #0F1412; }

.drive-ribbon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}
.route-endpoints {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
}
.route-dash { flex: 1; height: 2px; border-top: 2px dashed var(--accent-terracotta); }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat-tile { background: var(--bg-recessed); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 12px 14px; }
.stat-val { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--ink-primary); line-height: 1.2; }
.stat-lbl { font-size: 14px; color: var(--ink-secondary); margin-top: 3px; }

.day-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.empty-postcard {
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.empty-postcard p { margin: 8px 0 0; font-size: 16px; color: var(--ink-secondary); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(14, 18, 16, 0.94);
  color: #F5F2EA;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px 20px;
}
.lightbox.is-open { display: flex; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lb-btn {
  min-width: 46px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 9999px;
  border: 1px solid rgba(245, 242, 234, 0.25);
  background: rgba(29, 36, 32, 0.9);
  color: #F5F2EA;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.lb-stage { flex: 1; display: grid; place-items: center; padding: 12px 0; overflow: hidden; }
.lb-frame { max-width: min(860px, 100%); max-height: 68vh; width: 100%; display: flex; justify-content: center; align-items: center; }
.lb-frame img, .lb-frame svg {
  max-height: 66vh;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(245, 242, 234, 0.16);
}
.lb-bottom { max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.lb-caption { margin: 0; font-size: 16px; line-height: 1.5; color: #E2E5DF; text-align: center; }
.lb-nav-row { display: flex; justify-content: center; gap: 12px; }

@media (min-width: 640px) {
  .essay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .photo-figure.is-wide { grid-column: span 2; }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .story-sheet { padding: 28px 30px; }
}
@media (min-width: 900px) {
  .ridge-stage { height: 256px; }
  .main-wrap { padding: 28px 24px 88px; }
}
@media (max-width: 420px) {
  .topbar-inner { padding: 6px 10px; gap: 6px; }
  .brand-title { font-size: 14px; }
  .brand-sub { font-size: 10px; }
  .ctrl-btn { padding: 0 9px; font-size: 12px; }
  .main-wrap { padding: 16px 12px 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .view-panel.is-active { animation: none; }
  .timeline-item.is-tonight .timeline-dot { animation: none; }
  .day-card:hover, .btn-primary:active, .btn-secondary:active, .ctrl-btn:active { transform: none; }
}
html[data-motion="calm"] { scroll-behavior: auto; }
html[data-motion="calm"] .view-panel.is-active { animation: none; }
html[data-motion="calm"] .timeline-item.is-tonight .timeline-dot { animation: none; }
html[data-motion="calm"] .day-card:hover,
html[data-motion="calm"] .btn-primary:active,
html[data-motion="calm"] .btn-secondary:active,
html[data-motion="calm"] .ctrl-btn:active { transform: none; }
