:root {
  color-scheme: light;
  --ink: #17343a;
  --muted: #64767a;
  --paper: #f6f2e9;
  --card: #fffdf8;
  --ocean: #123a43;
  --teal: #0e6970;
  --coral: #d96b4b;
  --gold: #e3b758;
  --line: #d8d7cc;
  --shadow: 0 16px 45px rgba(21, 50, 55, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 90% 4%, rgba(227, 183, 88, 0.24), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a { color: inherit; }

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: calc(2.2rem + env(safe-area-inset-top)) max(5vw, 1.25rem) 2.2rem;
  color: #fff;
  background:
    linear-gradient(112deg, rgba(18, 58, 67, 0.98), rgba(14, 105, 112, 0.9)),
    var(--ocean);
}

.hero h1,
.section-heading h2,
.summary-panel h2,
.tour-note h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.hero h1 { max-width: 13ch; font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: 0.98; }
.hero__route { margin: 1rem 0 0; color: #dbe8e6; font-size: clamp(1rem, 2vw, 1.2rem); }
.eyebrow { margin: 0 0 0.65rem; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.16em; }

main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 5rem; }

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
}

.button--hero { flex: 0 0 auto; background: var(--gold); color: #17343a; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18); }
.button--primary { background: var(--teal); color: #fff; }
.button--secondary { border-color: #a8bab9; background: transparent; color: var(--ocean); }
.button:focus-visible, .timer__button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.tour-overview { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr); gap: 1.25rem; }
.map-shell, .summary-panel, .timeline-card, .tour-note { border: 1px solid rgba(23, 52, 58, 0.09); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.map-shell { position: relative; min-height: 510px; overflow: hidden; }
#map { width: 100%; height: 510px; background: #d9e1db; }
.map-fallback { position: absolute; z-index: 900; right: 1rem; bottom: 1rem; left: 1rem; margin: 0; border-radius: 12px; padding: 0.85rem 1rem; background: rgba(255, 253, 248, 0.95); box-shadow: 0 4px 20px rgba(0,0,0,.14); }

.summary-panel { padding: 1.6rem; }
.summary-panel h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); line-height: 1.05; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 1.5rem 0; }
.summary-grid div { border-top: 1px solid var(--line); padding-top: 0.65rem; }
.summary-grid dt { color: var(--muted); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.summary-grid dd { margin: 0.15rem 0 0; font-size: 1.1rem; font-weight: 750; }
.caveat { margin: 0; color: var(--muted); font-size: 0.87rem; }

.timeline { width: min(790px, 100%); margin: 3.5rem auto 0; }
.section-heading { margin-bottom: 1.2rem; text-align: center; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3rem); }
.timeline-card { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); margin-bottom: 1rem; overflow: hidden; }
.timeline-card__rail { display: flex; justify-content: center; background: #e9eee8; }
.timeline-card__rail::after { position: absolute; top: 49px; bottom: 0; width: 2px; background: #b7c8c4; content: ""; }
.timeline-card__rail span { z-index: 1; display: grid; width: 34px; height: 34px; margin-top: 1.15rem; place-items: center; border-radius: 50%; background: var(--coral); color: #fff; font-weight: 800; }
.timeline-card--start .timeline-card__rail span { background: var(--ocean); }
.timeline-card__body { min-width: 0; padding: 1.15rem 1.25rem 1.3rem; }
.timeline-card h3 { margin: 0.55rem 0 0.12rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 4vw, 1.85rem); font-weight: 500; }
.timeline-card p { margin: 0; }
.drive-label { margin-bottom: 0.4rem !important; color: var(--teal); font-size: 0.77rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.time-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 1.04rem; font-weight: 800; }
.status-pill { border-radius: 999px; padding: 0.22rem 0.58rem; background: #f6e2ca; color: #784227; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; }
.actions { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0.55rem; margin: 1rem 0 0.75rem; }
.text-link { display: inline-block; margin-top: 0.85rem; color: var(--teal); font-weight: 700; text-underline-offset: 0.2em; }

.timer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; border: 1px solid var(--line); border-radius: 14px; padding: 0.6rem 0.65rem 0.6rem 0.9rem; background: #f8f5ed; }
.timer__display { min-width: 4.2rem; font-variant-numeric: tabular-nums; font-size: 1.2rem; font-weight: 800; }
.timer__button { min-height: 44px; border: 0; border-radius: 999px; padding: 0.6rem 0.9rem; background: var(--ocean); color: #fff; font: inherit; font-size: 0.82rem; font-weight: 750; cursor: pointer; }
.timer.is-complete .timer__display { color: #9d3d28; }

.tour-note { width: min(790px, 100%); margin: 2rem auto 0; padding: 1.4rem 1.5rem; }
.tour-note h2 { font-size: 1.55rem; }
.tour-note p { margin: 0.55rem 0 0; color: var(--muted); }
.mobile-route-bar { display: none; }

/* Minimal Leaflet layout rules, hosted with this page so map layout does not depend on CDN CSS. */
.leaflet-pane, .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-tile-container, .leaflet-pane > svg, .leaflet-pane > canvas, .leaflet-zoom-box, .leaflet-image-layer, .leaflet-layer { position: absolute; top: 0; left: 0; }
.leaflet-container { overflow: hidden; -webkit-tap-highlight-color: transparent; outline-offset: 1px; }
.leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow { user-select: none; -webkit-user-drag: none; }
.leaflet-tile-container { pointer-events: none; }
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control-zoom { margin: 12px; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 14px rgba(0,0,0,.2); }
.leaflet-control-zoom a { display: grid; width: 36px; height: 36px; place-items: center; background: #fff; color: var(--ink); font-size: 22px; text-decoration: none; }
.leaflet-control-attribution { margin: 0; padding: 2px 6px; background: rgba(255,255,255,.82); color: #445; font-size: 10px; }
.leaflet-control-attribution a { color: #24536b; }
.leaflet-marker-icon { border: 0; background: transparent; }
.tour-marker span { display: grid; width: 34px; height: 34px; place-items: center; border: 3px solid #fff; border-radius: 50%; background: var(--coral); color: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.34); font-weight: 850; }
.tour-marker--start span { background: var(--ocean); }
.leaflet-tooltip { position: absolute; border: 0; border-radius: 8px; padding: 6px 9px; background: #fff; box-shadow: 0 3px 14px rgba(0,0,0,.2); white-space: nowrap; font-size: 12px; font-weight: 700; }
.leaflet-popup { position: absolute; margin-bottom: 18px; text-align: center; }
.leaflet-popup-content-wrapper { border-radius: 14px; background: #fff; box-shadow: 0 5px 25px rgba(0,0,0,.22); text-align: left; }
.leaflet-popup-content { width: 220px; margin: 13px 16px; line-height: 1.4; }
.leaflet-popup-tip-container { width: 40px; height: 20px; margin: 0 auto; overflow: hidden; }
.leaflet-popup-tip { width: 17px; height: 17px; margin: -10px auto 0; transform: rotate(45deg); background: #fff; box-shadow: 2px 2px 5px rgba(0,0,0,.14); }
.leaflet-popup-close-button { position: absolute; z-index: 1; top: 4px; right: 7px; color: #596; font-size: 22px; text-decoration: none; }
.popup-title { display: block; padding-right: 10px; font-size: 14px; }
.popup-time { margin: 4px 0 0; color: var(--teal); }

@media (hover: hover) {
  .button:hover, .timer__button:hover { transform: translateY(-1px); filter: brightness(1.04); }
}

@media (max-width: 780px) {
  .hero { display: block; padding-bottom: 1.6rem; }
  .hero .full-route-link { display: none; }
  .hero h1 { max-width: none; }
  main { width: min(100% - 1rem, 650px); padding-top: 0.75rem; padding-bottom: 7rem; }
  .tour-overview { display: flex; flex-direction: column; }
  .map-shell, #map { min-height: 42vh; height: 390px; border-radius: 18px; }
  .summary-panel { padding: 1.25rem; }
  .timeline { margin-top: 2.5rem; }
  .timeline-card { grid-template-columns: 48px minmax(0, 1fr); border-radius: 18px; }
  .timeline-card__body { padding: 1rem 0.9rem 1.15rem; }
  .actions { grid-template-columns: 1fr; }
  .mobile-route-bar { position: fixed; z-index: 2000; right: 0; bottom: 0; left: 0; display: block; padding: 0.7rem max(0.8rem, env(safe-area-inset-right)) calc(0.7rem + env(safe-area-inset-bottom)) max(0.8rem, env(safe-area-inset-left)); background: rgba(18, 58, 67, 0.96); backdrop-filter: blur(10px); }
  .mobile-route-bar .button { width: 100%; }
}

@media (max-width: 390px) {
  .timer { align-items: stretch; flex-direction: column; }
  .timer__display { text-align: center; }
}

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