/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand palette */
  --c-forest:       #2E7D5A;
  --c-forest-lt:    #3D9E72;
  --c-forest-pale:  #E8F5EE;
  --c-sand:         #F4A044;
  --c-sand-pale:    #FEF3E2;
  --c-sand-dark:    #C4782A;
  --c-crimson:      #E8334A;

  /* Neutrals — warm tinted */
  --c-ink:          #19271E;
  --c-ink-2:        #36503F;
  --c-ink-3:        #627A6A;
  --c-ink-4:        #9BB5A0;
  --c-paper:        #FFFFFF;
  --c-paper-2:      #F6F7F3;
  --c-paper-3:      #ECEDE8;
  --c-divider:      rgba(0,0,0,0.06);

  /* Glass */
  --c-glass:        rgba(255,255,255,0.90);
  --c-glass-strong: rgba(255,255,255,0.96);

  /* Transport */
  --transport-plane:   #4A7FBF;
  --transport-car:     #2E7D5A;
  --transport-walk:    #8B7355;
  --transport-shuttle: #8B5CF6;
  --transport-hike:    #EA7A1E;

  /* Activity */
  --act-sleep:   #8EA9B8;
  --act-wake:    #F59E0B;
  --act-meal:    #EF4444;
  --act-flight:  #4A7FBF;
  --act-drive:   #2E7D5A;
  --act-walk:    #8B7355;
  --act-hike:    #EA7A1E;
  --act-sight:   #8B5CF6;
  --act-tour:    #0EA5E9;
  --act-hotel:   #0EA5E9;
  --act-fuel:    #9CA3AF;
  --act-show:    #EC4899;
  --act-beach:   #06B6D4;
  --act-shop:    #F472B6;
  --act-note:    #9CA3AF;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'DM Mono', 'Menlo', monospace;

  /* Layout */
  --header-h:    60px;
  --panel-left:  44%;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);

  /* Border radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-pill: 999px;

  /* Shadows */
  --s-card:     0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.07);
  --s-raised:   0 4px 16px rgba(0,0,0,0.09), 0 20px 48px rgba(0,0,0,0.10);
  --s-floating: 0 8px 32px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.08);

  /* Motion */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --t1: 120ms;
  --t2: 240ms;
  --t3: 380ms;
  --t4: 500ms;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-paper-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100dvh;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
.t-display   { font-family: var(--font-display); }
.t-mono      { font-family: var(--font-mono); }
.t-label     { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.t-muted     { color: var(--c-ink-3); }

/* ============================================================
   4. APP SHELL & LAYOUT
   ============================================================ */
.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

.layout {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* LEFT — content panel */
.panel--content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* RIGHT — map panel (hidden on mobile) */
.panel--map {
  display: none;
}

/* ============================================================
   5. HEADER
   ============================================================ */
.header {
  position: relative;
  z-index: 100;
  height: var(--header-h);
  background: var(--c-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  flex-shrink: 0;
  transition: box-shadow var(--t2) var(--ease);
}

.header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 0 16px 0 12px;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.header__pin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-forest);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(46,125,90,0.4);
  animation: pinDrop 0.6s var(--spring) both;
}

.header__pin svg { width: 18px; height: 18px; }

@keyframes pinDrop {
  0%  { transform: translateY(-20px) scale(0.7); opacity: 0; }
  100%{ transform: translateY(0) scale(1); opacity: 1; }
}

.header__titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.header__subtitle {
  font-size: 11px;
  color: var(--c-ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--t2) var(--ease), max-height var(--t2) var(--ease);
}

.header.compact .header__subtitle {
  opacity: 0;
  max-height: 0;
}

.header__nav {
  display: none;
  gap: 4px;
}

.header__nav-btn {
  padding: 7px 16px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-ink-3);
  transition: background var(--t1), color var(--t1);
}

.header__nav-btn:hover {
  background: var(--c-forest-pale);
  color: var(--c-forest);
}

.header__nav-btn.active {
  background: var(--c-forest);
  color: #fff;
}

.header__badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-forest);
  background: var(--c-forest-pale);
  border: 1px solid rgba(46,125,90,0.2);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  white-space: nowrap;
}

/* ============================================================
   6. BOTTOM NAV (mobile)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 12px 24px calc(12px + var(--safe-bottom));
  pointer-events: none;
  animation: navSlideUp 0.5s var(--spring) 0.3s both;
}

@keyframes navSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.bottom-nav__pill {
  display: flex;
  gap: 2px;
  background: var(--c-glass-strong);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-radius: var(--r-pill);
  padding: 5px;
  box-shadow: var(--s-floating), inset 0 0 0 1px rgba(255,255,255,0.7);
  pointer-events: all;
}

.bottom-nav__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 20px;
  border-radius: var(--r-pill);
  color: var(--c-ink-3);
  transition: background var(--t1) var(--ease),
              color var(--t1) var(--ease),
              transform var(--t1) var(--spring);
  min-width: 68px;
}

.bottom-nav__btn:active {
  transform: scale(0.93);
}

.bottom-nav__btn.active {
  background: var(--c-forest);
  color: #fff;
}

.bottom-nav__icon {
  width: 22px;
  height: 22px;
}

.bottom-nav__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ============================================================
   7. PAGES
   ============================================================ */
.page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: opacity var(--t2) var(--ease),
              transform var(--t2) var(--ease);
  /* bottom padding for floating nav */
  padding-bottom: calc(88px + var(--safe-bottom));
}

.page.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.page.exit {
  opacity: 0;
  transform: translateX(-18px);
  pointer-events: none;
}

/* ============================================================
   8. ROUTE HERO
   ============================================================ */
.route-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #1A3D2B 0%, #2E7D5A 55%, #4A9E76 100%);
  padding: 36px 20px 32px;
  animation: heroFadeIn 0.6s var(--ease-out) both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

.route-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(244,160,68,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 90%, rgba(255,255,255,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.route-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 32px;
  background: var(--c-paper-2);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.route-hero__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
}

.route-hero__title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 14px;
}

.route-hero__title em {
  font-style: italic;
  color: var(--c-sand);
}

.route-hero__path {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.route-hero__stats {
  display: flex;
  align-items: center;
  gap: 0;
}

.route-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.route-hero__stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.route-hero__stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 3px;
}

.route-hero__stat-div {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

/* ============================================================
   9. DAY CARDS
   ============================================================ */
.days-list {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-card {
  background: var(--c-paper);
  border-radius: var(--r-lg);
  box-shadow: var(--s-card);
  overflow: hidden;
  transition: box-shadow var(--t2) var(--ease), transform var(--t2) var(--ease);
  animation: cardReveal 0.5s var(--ease-out) both;
  contain: layout;
}

.day-card:hover {
  box-shadow: var(--s-raised);
  transform: translateY(-1px);
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header row */
.day-card__header {
  display: flex;
  align-items: stretch;
  width: 100%;
  text-align: left;
  padding: 0;
  gap: 0;
  position: relative;
  overflow: hidden;
  min-height: 76px;
}

.day-card__header:active { opacity: 0.9; }

.day-card__accent {
  width: 4px;
  flex-shrink: 0;
  border-radius: 4px 0 0 4px;
}

.day-card__num-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  flex-shrink: 0;
  padding: 14px 6px;
}

.day-card__num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--c-ink);
  line-height: 1;
}

.day-card__info {
  flex: 1;
  min-width: 0;
  padding: 14px 8px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}

.day-card__date {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-ink-4);
}

.day-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-ink);
  line-height: 1.3;
}

.day-card__city {
  font-size: 12px;
  color: var(--c-ink-3);
  margin-top: 2px;
}

.day-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 14px 16px 14px 8px;
  gap: 6px;
  flex-shrink: 0;
}

.day-card__transport {
  font-size: 20px;
  line-height: 1;
}

.day-card__chevron {
  width: 18px;
  height: 18px;
  color: var(--c-ink-4);
  transition: transform var(--t2) var(--spring);
  flex-shrink: 0;
}

.day-card.open .day-card__chevron {
  transform: rotate(180deg);
}

/* Accordion body */
.day-card__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t3) var(--ease);
}

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

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

.day-card__body-content {
  border-top: 1px solid var(--c-divider);
}

/* ============================================================
   10. PHOTO CAROUSEL
   ============================================================ */
.carousel {
  position: relative;
  padding: 16px 0 0;
  animation: carouselSlideIn 0.4s var(--ease-out) 0.08s both;
}

@keyframes carouselSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.carousel__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  padding: 0 16px 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel__track::-webkit-scrollbar { display: none; }

.carousel__slide {
  scroll-snap-align: start;
  flex-shrink: 0;
  width: calc(72vw);
  max-width: 300px;
}

.carousel__img-wrap {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--c-paper-3);
}

.carousel__skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--c-paper-3) 0%, var(--c-paper-2) 50%, var(--c-paper-3) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--t2) var(--ease), transform var(--t3) var(--ease);
  opacity: 0;
}

.carousel__img.loaded {
  opacity: 1;
}

.carousel__img.error-fallback {
  opacity: 1;
}

.carousel__img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  pointer-events: none;
}

.carousel__label {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel__error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--c-ink-4);
  font-size: 13px;
  display: none;
}

.carousel__error-icon { font-size: 28px; }

/* Dots */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 4px 0 8px;
}

.carousel__dot {
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--c-paper-3);
  transition: width var(--t2) var(--ease), background var(--t2) var(--ease);
  width: 5px;
  padding: 0;
}

.carousel__dot.active {
  background: var(--c-forest);
  width: 18px;
}

/* ============================================================
   11. DAY SUMMARY
   ============================================================ */
.day-summary {
  padding: 4px 16px 16px;
  font-size: 14px;
  font-style: italic;
  color: var(--c-ink-3);
  line-height: 1.6;
  animation: fadeUp 0.4s var(--ease-out) 0.16s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   12. TIMELINE
   ============================================================ */
.timeline {
  padding: 8px 0 20px;
  border-top: 1px solid var(--c-divider);
}

.timeline__item {
  display: grid;
  grid-template-columns: 52px 20px 1fr;
  grid-template-rows: auto 1fr;
  position: relative;
  animation: fadeUp 0.35s var(--ease-out) both;
}

.timeline__item--highlight {
  background: linear-gradient(135deg, rgba(244,160,68,0.06) 0%, rgba(244,160,68,0.04) 100%);
  border-left: 3px solid var(--c-sand);
  margin: 2px 0;
}

.timeline__time {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--c-forest);
  font-weight: 500;
  padding: 14px 0 0 16px;
  line-height: 1;
}

.timeline__dot {
  grid-column: 2;
  grid-row: 1;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 17px;
  margin-left: 5px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 2px var(--c-paper);
}

.timeline__line-v {
  grid-column: 2;
  grid-row: 2;
  width: 2px;
  background: var(--c-paper-3);
  margin-left: 9px;
  min-height: 10px;
}

.timeline__item:last-child .timeline__line-v {
  display: none;
}

.timeline__content {
  grid-column: 3;
  grid-row: 1 / 3;
  padding: 12px 16px 12px 8px;
}

.timeline__title-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 2px;
}

.timeline__icon {
  font-size: 14px;
  line-height: 1.3;
  flex-shrink: 0;
  margin-top: 1px;
}

.timeline__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-ink);
  line-height: 1.4;
}

.timeline__item--highlight .timeline__title {
  color: var(--c-sand-dark);
}

.timeline__note {
  font-size: 12.5px;
  color: var(--c-ink-3);
  line-height: 1.5;
  margin-top: 2px;
}

.timeline__flight-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  background: var(--c-paper-2);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
}

.timeline__flight-from,
.timeline__flight-to {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--c-ink);
}

.timeline__flight-arrow { color: var(--c-ink-4); }

.timeline__flight-dur {
  margin-left: auto;
  font-size: 12px;
  color: var(--c-ink-3);
}

.timeline__drive-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--c-ink-3);
}

.timeline__drive-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--c-forest-pale);
  color: var(--c-forest);
  border-radius: var(--r-pill);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
}

/* Gap chip between events */
.timeline__gap {
  display: flex;
  align-items: center;
  padding: 0 16px 0 72px;
  gap: 8px;
}

.timeline__gap-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--c-ink-4);
  background: var(--c-paper-2);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-pill);
  padding: 3px 9px;
}

/* ============================================================
   13. MAP
   ============================================================ */
#leaflet-map,
.map-mobile-canvas {
  width: 100%;
  height: 100%;
  background: #e8e4d9;
}

/* Leaflet overrides */
.leaflet-container {
  font-family: var(--font-body) !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--s-card) !important;
  border-radius: var(--r-md) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  border-color: var(--c-divider) !important;
  color: var(--c-ink-2) !important;
  font-weight: 600 !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--c-forest-pale) !important;
  color: var(--c-forest) !important;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--r-lg) !important;
  box-shadow: var(--s-raised) !important;
  padding: 0 !important;
  overflow: hidden;
  border: none !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 220px !important;
}

.leaflet-popup-tip { background: var(--c-paper) !important; }
.leaflet-popup-close-button { color: var(--c-ink-3) !important; right: 8px !important; top: 8px !important; }

/* Custom map markers */
.map-marker-host {
  background: none !important;
  border: none !important;
}

.map-marker {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--c-forest);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28), 0 0 0 3px rgba(255,255,255,0.9);
  cursor: pointer;
  transition: transform var(--t1) var(--spring), box-shadow var(--t1) var(--ease);
  position: relative;
  user-select: none;
}

.map-marker:hover {
  transform: scale(1.18);
  box-shadow: 0 4px 18px rgba(0,0,0,0.3), 0 0 0 3px rgba(255,255,255,0.95);
}

.map-marker__ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--c-forest);
  opacity: 0;
  pointer-events: none;
}

.map-marker.pulsing .map-marker__ring {
  animation: markerRipple 1.8s var(--ease-out) 3;
}

@keyframes markerRipple {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Map popup */
.map-popup__img-wrap {
  overflow: hidden;
  height: 120px;
}

.map-popup__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-popup__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--c-forest-pale), var(--c-paper-3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.map-popup__body {
  padding: 12px 14px 14px;
}

.map-popup__num {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-forest);
  margin-bottom: 2px;
}

.map-popup__city {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 10px;
}

.map-popup__btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--c-forest);
  color: #fff;
  border-radius: var(--r-md);
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: background var(--t1);
}

.map-popup__btn:hover { background: var(--c-forest-lt); }

/* Mobile map waypoints list */
.map-waypoints-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  background: var(--c-paper-2);
}

.waypoint-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-paper);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--s-card);
  text-align: left;
  transition: box-shadow var(--t1), transform var(--t1);
}

.waypoint-btn:active { transform: scale(0.98); }

.waypoint-btn__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-forest);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.waypoint-btn__info {
  flex: 1;
  min-width: 0;
}

.waypoint-btn__city {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-ink);
}

.waypoint-btn__code {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-ink-4);
}

.waypoint-btn__arrow {
  width: 16px;
  height: 16px;
  color: var(--c-ink-4);
}

/* ============================================================
   14. CHEATSHEET
   ============================================================ */
.cheatsheet-hero {
  background: linear-gradient(135deg, #1A3D2B 0%, #2E7D5A 100%);
  padding: 32px 20px 28px;
  position: relative;
  overflow: hidden;
}

.cheatsheet-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 24px;
  background: var(--c-paper-2);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.cheatsheet-hero__title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}

.cheatsheet-hero__sub {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.cheatsheet-body {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-section {
  background: var(--c-paper);
  border-radius: var(--r-lg);
  box-shadow: var(--s-card);
  overflow: hidden;
}

.cs-section__header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border-radius: var(--r-lg);
  transition: background var(--t1);
}

.cs-section__header:hover { background: var(--c-paper-2); }

.cs-section__icon { font-size: 18px; flex-shrink: 0; }

.cs-section__title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-ink);
}

.cs-section__badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-forest);
  background: var(--c-forest-pale);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  flex-shrink: 0;
}

.cs-section__chevron {
  width: 16px;
  height: 16px;
  color: var(--c-ink-4);
  transition: transform var(--t2) var(--spring);
  flex-shrink: 0;
}

.cs-section.open .cs-section__chevron { transform: rotate(180deg); }

.cs-section__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t3) var(--ease);
}

.cs-section.open .cs-section__body { grid-template-rows: 1fr; }

.cs-section__body-inner { overflow: hidden; }

.cs-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--c-divider);
  cursor: pointer;
  transition: background var(--t1);
}

.cs-item:hover { background: var(--c-paper-2); }
.cs-item:active { background: var(--c-forest-pale); }

.cs-item__label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--c-ink);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.cs-item__detail {
  font-size: 12px;
  color: var(--c-ink-3);
  line-height: 1.4;
  flex: 1.2;
  min-width: 0;
  text-align: right;
}

.cs-item__copy {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-ink-4);
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--t1), background var(--t1);
}

.cs-item:hover .cs-item__copy { opacity: 1; }
.cs-item__copy:hover { background: var(--c-forest-pale); color: var(--c-forest); }

/* ============================================================
   15. UTILITIES & MICRO-COMPONENTS
   ============================================================ */
.toast {
  position: fixed;
  bottom: calc(90px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  z-index: 300;
  background: rgba(25,39,30,0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  box-shadow: var(--s-raised);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity var(--t2) var(--ease), transform var(--t2) var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   16. ANIMATIONS & KEYFRAMES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   17. RESPONSIVE — TABLET (≥768px)
   ============================================================ */
@media (min-width: 768px) {
  .route-hero { padding: 44px 32px 36px; }
  .route-hero__title { font-size: 52px; }
  .days-list { padding: 24px 24px; gap: 14px; }

  .carousel__slide {
    width: 280px;
    max-width: 280px;
  }

  .carousel__track { padding: 0 24px 12px; }
}

/* ============================================================
   18. RESPONSIVE — DESKTOP (≥1024px)
   ============================================================ */
@media (min-width: 1024px) {
  .layout { flex-direction: row; }

  /* Left content panel — fixed width, scrollable */
  .panel--content {
    width: var(--panel-left);
    flex-shrink: 0;
    border-right: 1px solid var(--c-divider);
  }

  /* Right map panel — always visible */
  .panel--map {
    display: flex;
    flex: 1;
    min-width: 0;
  }

  /* Map page hidden on desktop (it's always in right panel) */
  .page--map { display: none; }

  /* Bottom nav hidden */
  .bottom-nav { display: none; }

  /* Header nav visible */
  .header__nav { display: flex; }

  /* Pages fill left panel, no page-bottom padding */
  .page {
    padding-bottom: 40px;
    transform: none;
    transition: opacity var(--t2) var(--ease);
  }

  /* Carousel wider slides */
  .carousel__slide {
    width: 240px;
    max-width: 240px;
  }

  .carousel__img-wrap:hover .carousel__img {
    transform: scale(1.04);
  }

  /* Cards less top padding */
  .days-list { padding: 20px 20px; }

  /* Route hero less ornate */
  .route-hero { padding: 36px 24px 30px; }
  .route-hero__title { font-size: 42px; }
}

/* ============================================================
   19. DESKTOP LARGE (≥1440px)
   ============================================================ */
@media (min-width: 1440px) {
  :root { --panel-left: 42%; }
  .route-hero__title { font-size: 48px; }
}

/* ============================================================
   20. ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--c-forest);
  outline-offset: 3px;
  border-radius: 3px;
}

.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;
}
