/* 1. CSS Design Tokens */
:root {
  --bg: #F4F2EE;
  --bg-elevated: #F9F8F5;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #FFFFFF;
  --surface-soft: rgba(255, 255, 255, 0.52);
  --surface-group: rgba(255, 255, 255, 0.70);
  --text: #111111;
  --text-secondary: #57534E;
  --text-muted: #8A8580;
  --hairline: rgba(17, 17, 17, 0.075);
  --hairline-strong: rgba(17, 17, 17, 0.12);

  --accent: #111111;
  --route: #FC4C02;
  --amber: #C98A17;
  --blue: #3C7FA7;
  --green: #4C9563;
  --red: #C94A3F;

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --radius-pill: 999px;
  --shadow-card: 0 16px 46px rgba(17, 17, 17, 0.055);
  --shadow-float: 0 22px 70px rgba(17, 17, 17, 0.075);
  --nav-height: 60px;
  --container: 1120px;
  --content: 920px;
  --font-sans: "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* 2. Base / Layout */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at 50% -120px, rgba(252, 76, 2, 0.10), transparent 360px),
    linear-gradient(180deg, #FBFAF7 0, var(--bg) 410px, #F1EFEA 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 max(18px, calc((100vw - var(--container)) / 2));
  background: rgba(244, 242, 238, 0.72);
  border-bottom: 0.5px solid var(--hairline);
  backdrop-filter: blur(24px) saturate(1.35);
  -webkit-backdrop-filter: blur(24px) saturate(1.35);
}

.brand {
  min-width: 0;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 760;
}

.brand-mark {
  width: 36px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 0.5px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.50);
}

.nav-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 720;
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  background: rgba(17, 17, 17, 0.075);
}

.hero,
.section,
.site-footer {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  padding: 104px 0 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: stretch;
}

.section {
  padding: 34px 0;
}

.section-header {
  max-width: var(--content);
  margin: 0 auto 14px;
}

.section-header-row {
  max-width: var(--content);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--route);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.1;
  font-weight: 840;
  letter-spacing: -0.01em;
}

.section-header p:not(.section-kicker) {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.section-hint {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.56);
  border: 0.5px solid var(--hairline);
  font-size: 12px;
  font-weight: 700;
}

/* 3. Components */
.hero-copy {
  min-width: 0;
  padding: 30px;
  border: 0.5px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.62));
  box-shadow: var(--shadow-float);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--route);
  font-size: 12px;
  font-weight: 860;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(48px, 6.6vw, 76px);
  line-height: 0.98;
  font-weight: 870;
  letter-spacing: -0.018em;
}

.hero-lead {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.72;
}

.hero-motto {
  max-width: 560px;
  margin: 12px 0 26px;
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 0.5px solid var(--hairline);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
}

.stat-card {
  min-width: 0;
  padding: 15px 14px 14px;
  border-right: 0.5px solid var(--hairline);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card b {
  display: block;
  color: var(--text);
  font-size: 21px;
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.stat-card span {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.route-dossier {
  min-height: 100%;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: #111;
  color: #fff;
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden;
}

.route-dossier::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(252, 76, 2, 0.26), transparent 42%),
    radial-gradient(circle at 85% 18%, rgba(255,255,255,0.14), transparent 110px);
  pointer-events: none;
}

.route-dossier > * {
  position: relative;
  z-index: 1;
}

.dossier-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 36px;
}

.dossier-head span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dossier-head strong {
  max-width: 170px;
  color: #fff;
  font-size: 24px;
  line-height: 1.08;
  text-align: right;
}

.dossier-direction {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.dossier-direction span {
  font-size: 22px;
  font-weight: 850;
}

.dossier-direction i {
  position: relative;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.dossier-direction i::before,
.dossier-direction i::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--route);
  box-shadow: 0 0 0 5px rgba(252, 76, 2, 0.16);
}

.dossier-direction i::before { left: 0; }
.dossier-direction i::after { right: 0; }

.dossier-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 20px;
}

.dossier-metrics div {
  min-height: 72px;
  padding: 13px;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.075);
}

.dossier-metrics span {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.dossier-metrics b {
  display: block;
  margin-top: 5px;
  color: #fff;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.route-dossier p {
  margin: 0;
  color: rgba(255,255,255,0.68);
  font-size: 13px;
  line-height: 1.72;
}

.map-card,
.chart-card,
.tips-grid,
.equipment-board,
.packing-board,
.itinerary-panel {
  max-width: var(--content);
  margin: 0 auto;
}

.map-card,
.chart-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 0.5px solid var(--hairline);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

.map-canvas {
  width: 100%;
  height: 470px;
  background: #EDEAE4;
}

.map-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: calc(100% - 28px);
  padding: 7px;
  border-radius: 16px;
  background: rgba(255,255,255,0.76);
  border: 0.5px solid var(--hairline);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: none;
}

.map-legend span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  background: rgba(255,255,255,0.58);
  font-size: 11px;
  font-weight: 720;
}

.map-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-route { background: var(--route); }
.legend-rest { background: var(--green); }
.legend-option { background: var(--blue); }
.legend-pass { background: var(--red); }

.map-empty {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
}

.map-empty-card {
  max-width: 380px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(255,255,255,0.76);
  border: 0.5px solid var(--hairline);
}

.map-empty-card b {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 17px;
}

.map-empty-card span {
  color: var(--text-secondary);
  font-size: 13px;
}

.map-marker {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--route);
  box-shadow: 0 3px 10px rgba(17,17,17,0.22);
  font-size: 10px;
  font-weight: 850;
}

.map-marker.is-option {
  background: var(--blue);
}

.map-marker.is-rest {
  background: var(--green);
}

.pass-marker {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 2px 8px rgba(17,17,17,0.18);
}

.map-popup {
  min-width: 190px;
  padding: 2px 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.map-popup b {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.chart-card {
  padding: 14px 14px 8px;
}

.chart-stage {
  width: 100%;
  height: 400px;
}

.toolbar,
.itinerary-panel {
  max-width: var(--content);
}

.toolbar {
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.filter-tabs,
.view-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-tabs {
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.60);
  border: 0.5px solid var(--hairline);
}

.filter-tabs button,
.view-actions button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.filter-tabs button {
  padding: 0 13px;
  color: var(--text-secondary);
  background: transparent;
  font-size: 12px;
  font-weight: 760;
}

.filter-tabs button.is-active {
  color: #fff;
  background: var(--accent);
}

.view-actions button {
  padding: 0 12px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.50);
  border: 0.5px solid var(--hairline);
  font-size: 12px;
  font-weight: 760;
}

.view-actions button:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.day-list {
  max-width: var(--content);
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 0.5px solid var(--hairline);
  background: var(--surface-group);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.day-card {
  position: relative;
  background: transparent;
}

.day-card + .day-card {
  border-top: 0.5px solid var(--hairline);
}

.day-card::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(17,17,17,0.08);
}

.day-card:first-child::before {
  top: 28px;
}

.day-card:last-child::before {
  bottom: calc(100% - 28px);
}

.day-card.is-hard .route-dot { background: var(--red); }
.day-card.is-rest .route-dot { background: var(--green); }
.day-card.is-option .route-dot { background: var(--blue); }

.day-summary {
  width: 100%;
  min-height: 154px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 22px 20px 22px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.day-summary:hover {
  background: rgba(255,255,255,0.32);
}

.route-node {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}

.route-dot {
  position: relative;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--route);
  box-shadow: 0 0 0 5px rgba(252,76,2,0.12), 0 0 0 1px rgba(255,255,255,0.9);
}

.day-main {
  min-width: 0;
}

.day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 7px;
}

.day-code {
  color: var(--route);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-link {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.day-title {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.18;
  font-weight: 830;
  letter-spacing: -0.005em;
}

.day-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.day-metric {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255,255,255,0.48);
}

.day-metric span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 730;
}

.day-metric b {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.day-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.chip {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: rgba(17,17,17,0.055);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 760;
}

.chip-hard { color: var(--red); background: rgba(201,74,63,0.11); }
.chip-high { color: var(--blue); background: rgba(60,127,167,0.11); }
.chip-long { color: var(--amber); background: rgba(201,138,23,0.12); }
.chip-split { color: var(--green); background: rgba(76,149,99,0.11); }
.chip-rest { color: var(--green); background: rgba(76,149,99,0.11); }
.chip-option { color: var(--blue); background: rgba(60,127,167,0.11); }

.day-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms ease;
}

.day-card.is-open .day-detail {
  grid-template-rows: 1fr;
}

.day-detail-inner {
  overflow: hidden;
}

.detail-groups {
  margin: -2px 22px 20px 90px;
  display: grid;
  gap: 8px;
}

.detail-block {
  padding: 12px 13px;
  border-radius: 15px;
  background: rgba(255,255,255,0.50);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.detail-block strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 830;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.equipment-board {
  column-count: 2;
  column-gap: 10px;
  max-width: var(--content);
  margin: 0 auto;
}

.equipment-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 10px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--hairline);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(17,17,17,0.035);
  break-inside: avoid;
}

.equipment-card::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 22px;
  bottom: 22px;
  width: 1px;
  background: rgba(17,17,17,0.08);
}

.equipment-card:nth-child(2n) .route-dot { background: var(--blue); }
.equipment-card:nth-child(3n) .route-dot { background: var(--green); }
.equipment-card:nth-child(4n) .route-dot { background: var(--amber); }

.equipment-summary {
  width: 100%;
  min-height: 116px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  padding: 19px 18px 17px 17px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease;
}

.equipment-summary:hover {
  background: rgba(255,255,255,0.32);
}

.equipment-summary .route-node {
  padding-top: 7px;
}

.equipment-main {
  min-width: 0;
}

.equipment-link {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  background: rgba(17,17,17,0.045);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.equipment-count {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-top: 10px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  background: rgba(17,17,17,0.055);
  font-size: 11px;
  font-weight: 760;
}

.equipment-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms ease;
}

.equipment-card.is-open .equipment-detail {
  grid-template-rows: 1fr;
}

.equipment-detail-inner {
  overflow: hidden;
}

.equipment-list {
  list-style: none;
  margin: 0 16px 16px 63px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,0.50);
  border: 0.5px solid var(--hairline);
}

.equipment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
}

.equipment-item + .equipment-item {
  border-top: 0.5px solid var(--hairline);
}

.equipment-name,
.equipment-quantity {
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
}

.equipment-name {
  color: var(--text-secondary);
}

.equipment-quantity {
  max-width: 112px;
  color: var(--text);
  font-weight: 780;
  text-align: right;
}

.packing-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.packing-card {
  min-width: 0;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 0.5px solid var(--hairline);
  box-shadow: 0 10px 28px rgba(17,17,17,0.035);
}

.packing-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.packing-capacity {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.packing-card > h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.18;
}

.packing-role {
  margin: 6px 0 0;
  color: var(--route);
  font-size: 13px;
  font-weight: 790;
}

.packing-note {
  margin: 8px 0 14px;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.65;
}

.packing-groups {
  display: grid;
  gap: 8px;
}

.packing-group {
  min-width: 0;
  padding: 12px;
  border-radius: 15px;
  background: rgba(255,255,255,0.50);
  border: 0.5px solid var(--hairline);
}

.packing-group h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}

.packing-group ul {
  margin: 0;
  padding-left: 17px;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.72;
}

.packing-group li + li {
  margin-top: 2px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tip-card {
  min-height: 158px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 0.5px solid var(--hairline);
  box-shadow: 0 10px 28px rgba(17,17,17,0.035);
}

.tip-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 10px;
  color: var(--route);
  background: rgba(252,76,2,0.10);
  font-size: 13px;
  font-weight: 850;
}

.tip-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.28;
}

.tip-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.72;
}

.site-footer {
  padding: 28px 0 42px;
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
}

.top-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(17,17,17,0.92);
  color: #fff;
  box-shadow: 0 16px 36px rgba(17,17,17,0.22);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.top-button:hover {
  transform: translateY(-2px);
}

/* 4. Responsive */
@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .route-dossier {
    min-height: auto;
  }

  .equipment-board {
    column-count: 1;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-card {
    border-bottom: 0.5px solid var(--hairline);
  }

  .tips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .packing-board {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  :root {
    --nav-height: 56px;
  }

  html {
    scroll-padding-top: 74px;
  }

  body {
    overflow-x: hidden;
  }

  .site-nav {
    padding: 0 12px;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar,
  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .brand {
    flex: 0 0 auto;
    max-width: 172px;
    font-size: 12px;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links {
    flex: 0 0 auto;
  }

  .nav-links a {
    min-height: 32px;
    padding: 0 11px;
  }

  .hero,
  .section,
  .site-footer {
    width: min(100% - 28px, var(--container));
  }

  .hero {
    display: block;
    padding: 80px 0 24px;
  }

  .hero-copy {
    padding: 22px;
    border-radius: 24px;
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 48px);
    line-height: 1.04;
  }

  .hero-lead {
    margin-top: 16px;
    font-size: 15px;
  }

  .hero-motto {
    margin-bottom: 20px;
    font-size: 13px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    padding: 13px;
  }

  .stat-card b {
    font-size: 19px;
  }

  .route-dossier {
    margin-top: 14px;
    padding: 20px;
    border-radius: 24px;
  }

  .dossier-head {
    margin-bottom: 24px;
  }

  .dossier-head strong {
    font-size: 21px;
  }

  .dossier-direction span {
    font-size: 18px;
  }

  .dossier-metrics div {
    min-height: 66px;
  }

  .section {
    padding: 30px 0;
  }

  .section-header,
  .section-header-row {
    display: block;
    margin-bottom: 12px;
  }

  .section-header h2 {
    font-size: 30px;
  }

  .section-hint {
    margin-top: 10px;
  }

  .map-card,
  .chart-card,
  .day-list {
    border-radius: 24px;
  }

  .equipment-card {
    border-radius: 24px;
  }

  .packing-card {
    border-radius: 24px;
    padding: 16px;
  }

  .map-canvas {
    height: 350px;
  }

  .map-legend {
    left: 10px;
    bottom: 10px;
  }

  .chart-card {
    padding: 8px 6px 4px;
  }

  .chart-stage {
    height: 326px;
  }

  .toolbar {
    display: block;
    margin-bottom: 10px;
  }

  .filter-tabs {
    margin: 0 -14px;
    padding: 4px 14px 6px;
    overflow-x: auto;
    border-radius: 0;
    border: 0;
    background: transparent;
    scrollbar-width: none;
  }

  .filter-tabs button {
    flex: 0 0 auto;
    min-height: 36px;
    background: rgba(255,255,255,0.58);
  }

  .filter-tabs button.is-active {
    background: var(--accent);
  }

  .view-actions {
    margin-top: 8px;
  }

  .day-card::before {
    left: 18px;
  }

  .equipment-card::before {
    left: 18px;
    top: 20px;
    bottom: 20px;
  }

  .day-summary,
  .equipment-summary {
    min-height: 158px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    padding: 20px 16px 18px 14px;
  }

  .equipment-summary {
    min-height: 112px;
  }

  .day-title {
    font-size: 20px;
  }

  .day-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .day-metric:nth-child(3) {
    grid-column: 1 / -1;
  }

  .detail-groups {
    margin: -2px 14px 18px 56px;
  }

  .equipment-list {
    margin: 0 14px 14px 56px;
  }

  .tips-grid {
    grid-template-columns: 1fr;
  }

  .top-button {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
