/* =========================================================================
   Free Audio Tours — shared design system
   Direction: Chicago civic wayfinding. River-light ground, flag light-blue +
   warm brick red accents. Signature: the six-pointed Chicago star as chapter
   marker, and the flag's twin light-blue bars as section dividers.
   Type: Fraunces (display serif) + Archivo (grotesque sans / data).
   ========================================================================= */

:root {
  /* Chicago palette — cool river light, not cream */
  --paper:      #EAF1F6;
  --paper-deep: #DCE7EF;
  --card:       #FFFFFF;
  --ink:        #12232E;   /* river charcoal */
  --ink-soft:   #33485600; /* placeholder, overridden below */
  --ink-2:      #2E4453;
  --muted:      #5C7180;
  --line:       #D3E0EA;
  --line-soft:  #E4EDF3;

  --sky:        #41B6E6;    /* Chicago flag light blue (Pantone 298) */
  --sky-deep:   #0C7CB6;
  --sky-ink:    #073B57;
  --brick:      #B4433B;    /* warm brick red */
  --brick-deep: #8E2F29;
  --ember:      #D9772B;    /* food — warm signage amber */
  --star:       #B4433B;    /* stars ride the brick red */

  --shadow-sm: 0 1px 2px rgba(12,35,48,.06), 0 2px 6px rgba(12,35,48,.05);
  --shadow-md: 0 4px 10px rgba(12,35,48,.08), 0 12px 30px rgba(12,35,48,.09);
  --shadow-lg: 0 10px 24px rgba(12,35,48,.12), 0 28px 60px rgba(12,35,48,.16);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --maxw: 1120px;
  --gutter: clamp(16px, 4vw, 34px);

  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}
:root { --ink-soft: #334856; }

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--sky-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--sky-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.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;
}

/* --------------------------------------------------------------- type ---- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sky-deep);
}

/* --------------------------------------------------------------- star ---- */
/* Six-pointed Chicago star — the signature marker */
.star {
  display: inline-block;
  width: 1em; height: 1em;
  color: var(--star);
  flex: none;
}
.star svg { width: 100%; height: 100%; fill: currentColor; }

/* twin flag bars — section divider echoing the Chicago flag */
.flagbars { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.flagbars span { height: 4px; border-radius: 4px; background: var(--sky); opacity: .85; }
.flagbars span:nth-child(2) { opacity: .55; }

/* ------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--sans); font-weight: 700; font-size: .95rem;
  letter-spacing: .01em;
  padding: .8em 1.3em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--ink); color: #fff;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  text-decoration: none;
  min-height: 46px;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn--sky { background: var(--sky-deep); }
.btn--brick { background: var(--brick); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: #fff; }
.btn--lg { font-size: 1.05rem; padding: 1em 1.6em; min-height: 56px; }
.btn--block { width: 100%; justify-content: center; }
.btn[aria-pressed="true"] { background: var(--sky-deep); color: #fff; border-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(234,241,246,.82);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head__row {
  display: flex; align-items: center; gap: 14px;
  min-height: 62px; padding-block: 10px;
}
.brandmark { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; }
.brandmark .star { font-size: 1.15rem; }
.brandmark b { font-size: 1.02rem; letter-spacing: -.01em; }
.brandmark small { display: block; font-family: var(--sans); font-weight: 600; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.site-head__spacer { flex: 1; }

.near-toggle { position: relative; }

/* geolocation help note */
.geo-note {
  font-size: .82rem; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--brick);
  border-radius: var(--r-sm);
  padding: 10px 12px; margin-top: 10px;
  box-shadow: var(--shadow-sm);
}
.geo-note[hidden] { display: none; }

/* =====================================================================
   HERO (index)
   ===================================================================== */
.hero {
  position: relative;
  color: #EAF4FA;
  background:
    radial-gradient(120% 90% at 82% -10%, rgba(65,182,230,.42), transparent 60%),
    radial-gradient(90% 70% at 8% 110%, rgba(180,67,59,.30), transparent 55%),
    linear-gradient(160deg, #0d2130 0%, #103247 52%, #0c283a 100%);
  overflow: hidden;
}
.hero::after {
  /* faint river route line motif */
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='400' viewBox='0 0 600 400'><path d='M-20 120 C 120 60 180 200 320 170 S 520 90 640 160' fill='none' stroke='white' stroke-width='2' stroke-opacity='0.10'/><path d='M-20 260 C 140 210 200 320 360 300 S 540 250 660 300' fill='none' stroke='white' stroke-width='2' stroke-opacity='0.07'/></svg>");
  background-size: cover; pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(40px, 8vw, 92px); }
.hero .flagbars { max-width: 72px; margin-bottom: 22px; }
.hero__eyebrow { color: var(--sky); font-weight: 700; letter-spacing: .24em; text-transform: uppercase; font-size: .74rem; }
.hero h1 {
  font-size: clamp(2.6rem, 8.5vw, 5.4rem);
  font-weight: 600;
  line-height: .98;
  margin-top: 14px;
  letter-spacing: -.02em;
  max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--sky); font-weight: 500; }
.hero__sub { margin-top: 20px; font-size: clamp(1rem, 2.6vw, 1.28rem); color: #C7DEEC; max-width: 40ch; }
.hero__meta {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 10px;
}
.hero__meta span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.16);
  padding: 7px 12px; border-radius: var(--r-pill);
  color: #DBECF5;
}
.hero__meta span svg { width: 15px; height: 15px; flex: none; opacity: .8; }

/* =====================================================================
   FEATURED BANNER — the river cruise centerpiece
   ===================================================================== */
.featured { margin-top: clamp(-40px, -6vw, -56px); position: relative; z-index: 5; }
.featured__card {
  display: block;               /* anchor defaults to inline; without this the dark
                                   gradient collapses to a 0-width inline box and the
                                   pale page shows through, killing text contrast (#6) */
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  color: #fff;
  background:
    radial-gradient(110% 140% at 100% 0%, rgba(65,182,230,.55), transparent 55%),
    linear-gradient(135deg, #0b6699 0%, #0c3a54 60%, #123a4f 100%),
    #0c3a54;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.14);
  isolation: isolate;
}
.featured__card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='800' height='300' viewBox='0 0 800 300'><path d='M-20 210 C 160 150 260 260 440 220 S 720 150 820 210' fill='none' stroke='white' stroke-width='3' stroke-opacity='0.16' stroke-dasharray='2 12' stroke-linecap='round'/></svg>");
  background-size: cover; background-position: center;
}
.featured__grid {
  display: grid; gap: 18px 30px;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: clamp(22px, 4vw, 40px);
}
.featured__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: .72rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: #fff; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  padding: 6px 12px; border-radius: var(--r-pill);
}
.featured__tag .dot { width: 8px; height: 8px; border-radius: 50%; background: #7CE0A6; box-shadow: 0 0 0 0 rgba(124,224,166,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(124,224,166,.55)} 70%{box-shadow:0 0 0 9px rgba(124,224,166,0)} 100%{box-shadow:0 0 0 0 rgba(124,224,166,0)} }
@media (prefers-reduced-motion: reduce){ .featured__tag .dot{ animation:none } }
.featured h2 {
  font-size: clamp(1.9rem, 5.6vw, 3rem); font-weight: 600; margin-top: 14px; line-height: 1;
}
.featured h2 em { font-style: italic; color: var(--sky); }
.featured p { margin-top: 12px; color: #D3E7F1; max-width: 46ch; font-size: 1rem; }
.featured__cta { display: flex; align-items: center; gap: 14px; }
.featured__cta .btn { background: #fff; color: var(--sky-ink); }
.featured__cta .btn:hover { background: #eafaff; }
.featured__side {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: .78rem; color: #Bfe0f0; text-align: center;
}
.featured__side .big { font-family: var(--serif); font-size: 2.6rem; color: #fff; line-height: 1; }
@media (max-width: 720px) {
  .featured__grid { grid-template-columns: 1fr; }
  .featured__side { flex-direction: row; justify-content: flex-start; gap: 16px; order: 3; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.14); }
  .featured__side .big { font-size: 1.8rem; }
}

/* =====================================================================
   DAY CHAPTERS
   ===================================================================== */
.days { padding-block: clamp(40px, 7vw, 72px); }
.day { padding-top: clamp(28px, 5vw, 46px); }
.day + .day { margin-top: clamp(24px, 4vw, 40px); }

.day summary.day__divider { list-style: none; cursor: pointer; }
.day summary.day__divider::-webkit-details-marker { display: none; }
.day__divider { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.day__chev { flex: none; margin-left: auto; color: var(--sky-deep); transition: transform .25s var(--ease); }
.day[open] .day__chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .day__chev { transition: none; } }
.day__marker {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; flex: none;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-sm);
  position: relative;
}
.day__marker .star { font-size: 1.5rem; }
.day__marker b {
  position: absolute; bottom: -9px; right: -9px;
  font-family: var(--sans); font-weight: 700; font-size: .72rem;
  background: var(--ink); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.day__flag { flex: 1; max-width: 120px; }
.day__head { }
.day__label { font-family: var(--sans); font-weight: 700; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sky-deep); }
.day__title { font-size: clamp(1.7rem, 4.4vw, 2.5rem); margin-top: 4px; }
.day__summary { margin-top: 8px; color: var(--ink-2); max-width: 62ch; font-size: 1.02rem; }
.day__summary:empty { display: none; }

/* live forecast chip, injected by weather.js into each day header */
.day__wx {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 12px;
  padding: 6px 12px 6px 10px;
  background: linear-gradient(180deg, #fff, var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  font-family: var(--sans);
  font-size: .92rem;
  line-height: 1;
  color: var(--ink-2);
}
.day__wx-ico { font-size: 1.15rem; line-height: 1; }
.day__wx-temp { font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.day__wx-temp b { font-weight: 800; }
.day__wx-lo { margin-left: 4px; font-weight: 600; color: var(--muted); }
.day__wx-desc { color: var(--ink-2); }
.day__wx-pop { color: var(--sky-deep); font-weight: 700; }
.day__wx-city {
  margin-left: 2px; padding: 3px 9px;
  background: rgba(65,182,230,.14); color: var(--sky-ink);
  border-radius: var(--r-pill);
  font-weight: 700; font-size: .72rem; letter-spacing: .04em;
  text-transform: uppercase;
}
.day__wx-desc::before,
.day__wx-pop::before {
  content: "·"; margin-right: 8px; color: var(--line); font-weight: 700;
}

/* card grid */
.stops {
  margin-top: 26px;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
}

/* =====================================================================
   STOP CARD
   ===================================================================== */
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  scroll-margin-top: 90px;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #C4D6E3; }
@media (prefers-reduced-motion: reduce){ .card:hover { transform: none; } }
.card.is-near { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(65,182,230,.22), var(--shadow-md); }

/* photo w/ graceful fallback */
.ph {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--g1, #2e5c74), var(--g2, #123243));
  overflow: hidden;
}
.ph img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.card:hover .ph img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce){ .card:hover .ph img { transform: none; } }
.ph__label {
  position: absolute; inset: 0; z-index: 1;
  display: none; flex-direction: column; justify-content: flex-end;
  padding: 16px; gap: 6px;
  color: #EAF4FA;
}
.ph__label .star { font-size: 1.1rem; color: rgba(255,255,255,.85); }
.ph__label span { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; line-height: 1.1; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.ph.is-broken img { display: none; }
.ph.is-broken .ph__label { display: flex; }
.ph.is-broken::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><g fill='none' stroke='white' stroke-opacity='0.14' stroke-width='2'><path d='M0 90 C 30 70 50 100 80 88 S 120 70 130 92'/><path d='M0 60 C 30 44 50 72 80 60 S 120 46 130 66'/></g></svg>");
  background-size: 150px;
}

/* type badge on photo */
.card__type {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-weight: 700; font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.92); color: var(--ink);
  box-shadow: var(--shadow-sm); backdrop-filter: blur(4px);
}
.card__type.is-food { background: var(--ember); color: #fff; }
.card__type.is-featured { background: var(--sky-deep); color: #fff; }
.card__type.is-game { background: var(--brick); color: #fff; }
.card__type.is-ride { background: var(--sky-ink); color: #fff; }

/* distance badge */
.card__dist {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: none; align-items: center; gap: 5px;
  font-family: var(--sans); font-weight: 700; font-size: .74rem;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-sm);
}
.card__dist.is-on { display: inline-flex; }
.card.is-near .card__dist { background: var(--sky-deep); }

.card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card.is-food { border-color: #EAD4BC; background: linear-gradient(180deg, #fffaf4, #ffffff 40%); }

.card__name { font-size: 1.3rem; font-weight: 600; line-height: 1.08; }
.card__tag { color: var(--ink-2); font-size: .96rem; line-height: 1.45; }
.card__tag:empty { display: none; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .78rem; font-weight: 600; color: var(--ink-2);
  background: var(--paper); border: 1px solid var(--line-soft);
  padding: 5px 10px; border-radius: var(--r-pill);
}
.chip svg { width: 13px; height: 13px; opacity: .7; }
.chip.chip--cost { color: var(--brick-deep); background: #fbeeed; border-color: #f2d9d7; }

/* tour meta badges (duration/distance/accessibility, from data/tour.json meta) */
.meta-badges { margin: 0 0 14px; }
.meta-badges .chip { background: var(--card); box-shadow: var(--shadow-sm); }

/* address → one-tap Google Maps directions */
.maplink {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start; max-width: 100%;
  font-size: .82rem; font-weight: 600; line-height: 1.3;
  color: var(--sky-ink); text-decoration: none;
  background: #e8f6fd; border: 1px solid #c3e6f6;
  padding: 8px 12px; border-radius: var(--r-pill);
  transition: background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.maplink:hover { background: #d9f0fb; text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.maplink:active { transform: translateY(0); }
.maplink .maplink__pin { width: 15px; height: 15px; flex: none; color: var(--sky-deep); }
.maplink .maplink__go { width: 13px; height: 13px; flex: none; opacity: .6; }
.maplink .maplink__addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .maplink:hover { transform: none; } }

/* facts (expandable) */
.facts { border-top: 1px solid var(--line-soft); margin-top: 2px; }
.facts[hidden] { display: none; }
.facts summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 2px 4px;
  font-family: var(--sans); font-weight: 700; font-size: .78rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--sky-deep);
}
.facts summary::-webkit-details-marker { display: none; }
.facts summary .chev { transition: transform .25s var(--ease); }
.facts[open] summary .chev { transform: rotate(180deg); }
.facts ul { list-style: none; padding: 6px 0 6px; display: flex; flex-direction: column; gap: 8px; }
.facts li { position: relative; padding-left: 20px; font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.facts li::before {
  content: ""; position: absolute; left: 2px; top: .5em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sky); box-shadow: 0 0 0 3px rgba(65,182,230,.18);
}

/* interactive event-map link — same pill as .maplink, brick accent */
.maplink--map .maplink__pin { color: var(--brick); }

/* menu / restaurant-website link — same pill as .maplink, warm accent */
.maplink--menu { background: #fdf2e8; border-color: #f6ddc3; color: #7a4a17; }
.maplink--menu:hover { background: #fbe8d5; }
.maplink--menu .maplink__pin { color: #d98828; }

.maplink--phone { background: #eef6fb; border-color: #cfe3f0; color: var(--sky-ink); }
.maplink--phone:hover { background: #e2eff8; }
.maplink--phone .maplink__pin { color: var(--sky-deep); }

/* =====================================================================
   AUDIO PLAYER (custom)
   ===================================================================== */
.aplayer {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  padding: 7px 12px 7px 7px;
  margin-top: auto;
}
.aplayer.is-unavailable { opacity: .72; }
.aplayer.is-loading .aplayer__label { animation: aplayer-pulse 1.1s ease-in-out infinite; }
@keyframes aplayer-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.aplayer__btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: none; background: var(--ink); color: #fff;
  display: grid; place-items: center;
  transition: transform .16s var(--ease), background .16s var(--ease);
}
.aplayer__btn:hover { transform: scale(1.06); }
.aplayer__btn:active { transform: scale(.96); }
.aplayer.is-playing .aplayer__btn { background: var(--sky-deep); }
.aplayer__btn svg { width: 18px; height: 18px; fill: currentColor; }
.aplayer__btn .i-pause { display: none; }
.aplayer.is-playing .aplayer__btn .i-play { display: none; }
.aplayer.is-playing .aplayer__btn .i-pause { display: block; }
.aplayer__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.aplayer__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aplayer__label { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aplayer__time { font-size: .74rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.aplayer__track {
  position: relative; height: 8px; border-radius: 6px;
  background: var(--paper-deep); cursor: pointer; touch-action: none;
  border: 1px solid var(--line-soft);
}
.aplayer__fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%; border-radius: 6px;
  background: linear-gradient(90deg, var(--sky), var(--sky-deep));
}
.aplayer__fill::after {
  content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(12,35,48,.3); border: 2px solid var(--sky-deep);
  opacity: 0; transition: opacity .15s;
}
.aplayer:hover .aplayer__fill::after, .aplayer.is-playing .aplayer__fill::after { opacity: 1; }

/* =====================================================================
   NEAR-ME floating nearest bar (index)
   ===================================================================== */
.nearest {
  position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 140%);
  z-index: 60; width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff;
  border-radius: var(--r-pill); padding: 10px 12px 10px 16px;
  box-shadow: var(--shadow-lg);
  transition: transform .35s var(--ease);
  cursor: pointer;
}
.nearest.is-on { transform: translate(-50%, 0); }
.nearest .star { font-size: 1.2rem; color: var(--sky); }
.nearest__txt { flex: 1; min-width: 0; }
.nearest__txt small { display: block; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sky); font-weight: 700; }
.nearest__txt b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nearest__dist { font-weight: 700; font-size: .9rem; background: rgba(255,255,255,.14); padding: 6px 11px; border-radius: var(--r-pill); white-space: nowrap; }
@media (prefers-reduced-motion: reduce){ .nearest { transition: none; } }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-foot {
  margin-top: 40px; padding-block: 40px 60px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .86rem;
  background: var(--paper-deep);
}
.site-foot .flagbars { max-width: 60px; margin-bottom: 16px; }
.site-foot b { color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.site-foot a { color: var(--sky-deep); font-weight: 600; }

/* =====================================================================
   RIVER PAGE
   ===================================================================== */
.cruise { background: var(--paper); min-height: 100vh; }

.cruise-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: #fff;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cruise-head a.back { color: #Bfdcec; font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.cruise-head a.back:hover { text-decoration: none; color: #fff; }
.cruise-head .title { flex: 1; min-width: 0; }
.cruise-head .title b { font-family: var(--serif); font-weight: 600; font-size: 1rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cruise-head .title small { font-size: .68rem; color: #9dc0d5; letter-spacing: .1em; text-transform: uppercase; display: inline-block; max-width: 100%; vertical-align: top; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Below ~720px the back link + share button + full-name language pills no
   longer fit alongside the title on one line, so the title drops to its own
   full-width row instead of being squeezed toward 0 width (previously
   rendering as "L…" with the subtitle stacked one word per line — #109). */
@media (max-width: 720px) {
  .cruise-head .title { order: 2; flex: 1 1 100%; }
}
/* At the narrowest phone widths, back+share+the full-name language pills
   still don't fit on one row together, pushing the picker onto its own row
   and the header past ~100px. Visually collapse the back link to just its
   arrow (label stays for assistive tech) rather than touching the pills —
   the full language names are the point, per #109. */
@media (max-width: 400px) {
  .cruise-head a.back span {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
}

/* language switcher — a globe disclosure button at the right of the dark header
   that toggles a popover of real anchors. Trigger width is constant regardless
   of how many languages a tour advertises, so the header never overflows. */
.lang-picker { position: relative; flex: none; }
.lang-picker:empty { display: none; }               /* zero-child fallback; the <2-lang guard lives in JS */

.lang-picker__trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; min-height: 44px; padding: 4px 12px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.08); color: #Bfdcec;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em;
}
.lang-picker__trigger:hover { background: rgba(255,255,255,.16); color: #fff; }
.lang-picker__trigger:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: 2px; }
.lang-picker__globe { width: 18px; height: 18px; flex: none; }
.lang-picker__caret { width: 12px; height: 12px; flex: none; opacity: .8; }
.lang-picker__current { white-space: nowrap; }

/* Globe alone below ~360px — the endonym label drops out but the button keeps
   its ≥44px hit target; the aria-label carries the name for assistive tech. */
@media (max-width: 360px) {
  .lang-picker__current {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
}

/* The popover. z-index sits it above the Leaflet map: `.cruise-head` is a
   z-index:50 stacking context and the map subtree is rooted at z-index:1, so
   everything in the header — this menu included — paints over the map and its
   high Leaflet panes. Scrolls internally past ~8 languages rather than growing
   the page. */
.lang-picker__menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 168px; max-width: min(80vw, 260px); padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--ink); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.45);
  max-height: 60vh; overflow-y: auto;
}
.lang-picker__menu[hidden] { display: none; }
.lang-picker__opt {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 8px;
  font-size: .9rem; font-weight: 600; letter-spacing: .02em;
  color: #Bfdcec; white-space: nowrap;
}
.lang-picker__opt::before { content: ""; flex: none; width: 16px; text-align: center; color: var(--sky-deep); }
.lang-picker__opt:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.08); }
.lang-picker__opt:focus-visible { outline: 2px solid var(--sky-deep); outline-offset: -2px; }
.lang-picker__opt.is-current { color: #fff; }
.lang-picker__opt.is-current::before { content: "\2713"; }   /* ✓ */

/* cross-language nudge banner ("Ver en español"); dismissible, never redirects */
.lang-banner { background: var(--sky-deep); color: #fff; }
.lang-banner[hidden] { display: none; }
.lang-banner__inner {
  display: flex; align-items: center; gap: 12px;
  padding: 8px var(--gutter);
  max-width: 900px; margin: 0 auto;
}
.lang-banner__cta {
  flex: 1; min-width: 0;
  color: #fff; font-weight: 700; font-size: .92rem;
  text-decoration: underline; text-underline-offset: 2px;
}
.lang-banner__cta:hover { color: #fff; }
.lang-banner__close {
  flex: none; border: 0; background: transparent; color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  padding: 2px 6px; border-radius: 6px; opacity: .85;
}
.lang-banner__close:hover { opacity: 1; background: rgba(255,255,255,.15); }

/* map */
.map-wrap { position: relative; }
#map { height: clamp(320px, 56vh, 560px); width: 100%; background: #cde0ea; z-index: 1; }
#map.is-dead { display: none; }

/* expand / fullscreen toggle (T3): same cached tiles, a bigger viewport */
.map-wrap.is-fullscreen { position: fixed; inset: 0; z-index: 200; }
.map-wrap.is-fullscreen #map { height: 100vh; height: 100dvh; }
body.map-fullscreen-lock { overflow: hidden; }
.map-dead {
  display: none;
  align-items: center; gap: 12px;
  padding: 16px var(--gutter); background: #dfeaf1; color: var(--ink-2);
  font-size: .9rem; border-bottom: 1px solid var(--line);
}
.map-dead.is-on { display: flex; }
.map-dead .star { color: var(--sky-deep); font-size: 1.3rem; }

/* leaflet numbered marker */
.wp-marker {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--sky-deep); color: #fff;
  display: grid; place-items: center;
  font-family: var(--sans); font-weight: 700; font-size: .82rem;
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.wp-marker.is-active { background: var(--brick); transform: scale(1.18); }
.wp-marker.is-passed { background: #7f97a5; }
.wp-marker.is-intro { background: var(--ink); }

/* live user-location marker: a heading cone (T2) behind the position dot.
   The marker is an L.divIcon (40x40, centre-anchored) so the cone can be a real
   DOM element rotated with CSS transform; the accuracy ring stays an SVG L.circle
   underneath. No heading yet -> the cone is hidden and only the dot shows. */
.user-marker-icon { background: none; border: 0; }
.user-marker { position: relative; width: 40px; height: 40px; }
.user-dot {
  position: absolute; left: 50%; top: 50%;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  box-sizing: border-box; border-radius: 50%;
  background: #0C7CB6; border: 3px solid #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.45));
}
.user-accuracy { pointer-events: none; }
/* heading cone: a triangular beam whose apex sits at the dot centre and points
   north by default; JS rotates it clockwise to the live compass / GPS heading.
   Placed before .user-dot in the DOM so the dot paints on top of the apex. */
.user-cone {
  position: absolute; left: 50%; bottom: 50%;
  width: 40px; height: 30px; margin-left: -20px;
  transform-origin: 50% 100%;
  transform: rotate(0deg);
  clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
  background: linear-gradient(to top, rgba(12,124,182,.55), rgba(12,124,182,0));
  display: none;
}
.user-marker.has-heading .user-cone { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .user-dot { animation: user-dot-pulse 2.4s ease-in-out infinite; }
}
@keyframes user-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}

/* recenter / follow-me button, shown once a manual drag turns follow off */
.map-follow-btn {
  position: absolute; right: 12px; bottom: 12px; z-index: 15;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--sky-deep);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  cursor: pointer;
}
.map-follow-btn[hidden] { display: none; }
.map-follow-btn:hover { background: var(--paper); }
.map-follow-btn svg { width: 20px; height: 20px; }

/* expand / fullscreen toggle, mirrors the follow-me button at the opposite corner */
.map-expand-btn {
  position: absolute; right: 12px; top: 12px; z-index: 15;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--sky-deep);
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  cursor: pointer;
}
.map-expand-btn:hover { background: var(--paper); }
.map-expand-btn svg { width: 20px; height: 20px; }
.map-expand-btn .ico-collapse { display: none; }
.map-expand-btn.is-on .ico-expand { display: none; }
.map-expand-btn.is-on .ico-collapse { display: block; }

/* GPS control strip */
.gps-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px var(--gutter);
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.gps-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700;
  padding: 8px 13px; border-radius: var(--r-pill);
  background: var(--paper); border: 1px solid var(--line);
  color: var(--ink-2); user-select: none;
}
.gps-status .led { width: 9px; height: 9px; border-radius: 50%; background: #9fb2bf; flex: none; }
.gps-status.is-live .led { background: #24b36b; box-shadow: 0 0 0 0 rgba(36,179,107,.5); animation: pulse-g 1.8s infinite; }
.gps-status.is-sim .led { background: var(--ember); }
.gps-status.is-paused .led { background: #d9a441; }
@keyframes pulse-g { 0%{box-shadow:0 0 0 0 rgba(36,179,107,.5)} 70%{box-shadow:0 0 0 7px rgba(36,179,107,0)} 100%{box-shadow:0 0 0 0 rgba(36,179,107,0)} }
@media (prefers-reduced-motion: reduce){ .gps-status.is-live .led { animation: none; } }
.gps-bar .spacer { flex: 1; }
.switch {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .82rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--paper-deep); border: 1px solid var(--line); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--sky-deep); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid var(--sky-deep); outline-offset: 2px; }

.cruise-body { padding: var(--gutter); padding-bottom: 90px; }

.geo-note.cruise-note { max-width: 640px; }

/* Heading / next-destination strip + manual override */
.cruise-next {
  max-width: 640px; margin: 0 auto 16px;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 10px 12px; box-shadow: var(--shadow-sm);
}
.cruise-next__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cruise-next__label {
  font-family: var(--sans); font-weight: 700; font-size: .64rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--sky-deep);
}
.cruise-next__name {
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem; line-height: 1.12;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cruise-next__meta { color: var(--ink-2); font-size: .82rem; }
.cruise-next__meta:empty { display: none; }
.cruise-next.is-waiting { border-color: #ecd39a; background: #fffaf0; }
.cruise-next.is-waiting .cruise-next__label { color: #b9822a; }
.cruise-next.is-waiting .cruise-next__name { color: var(--muted); }
.cruise-next.is-waiting .cruise-next__name::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px;
  border: 2px solid #e5c67e; border-top-color: #b9822a; border-radius: 50%;
  vertical-align: -1px; animation: spin-wait .8s linear infinite;
}
@keyframes spin-wait { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .cruise-next.is-waiting .cruise-next__name::before { animation: none; } }
.nav-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .12s var(--ease);
}
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn:hover:not(:disabled) { background: #fff; border-color: #C4D6E3; }
.nav-btn:active:not(:disabled) { transform: scale(.93); }
.nav-btn:disabled { opacity: .34; cursor: default; }
@media (prefers-reduced-motion: reduce){ .nav-btn:active:not(:disabled) { transform: none; } }

/* Now Passing hero card */
.now {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md);
  max-width: 640px; margin-inline: auto;
}
.now__eyebrow {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 0;
  font-family: var(--sans); font-weight: 700; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sky-deep);
}
.now__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brick); }
.now .ph { aspect-ratio: 16 / 9; border-radius: 0; margin-top: 10px; }
.now__side {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-weight: 700; font-size: .8rem;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: rgba(18,35,46,.86); color: #fff; backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
}
.now__side.is-port { background: rgba(180,67,59,.92); }
.now__side.is-star { background: rgba(12,124,182,.92); }
.now__side.is-both { background: rgba(18,35,46,.86); }
.now__num {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255,255,255,.94); color: var(--ink);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.now__body { padding: 16px; display: flex; flex-direction: column; gap: 13px; }
.now__name { font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 600; line-height: 1.05; }
.now__tag { color: var(--ink-2); font-size: 1.02rem; }
.now__tag:empty { display: none; }
/* mode-change card (type:"card" waypoints, e.g. Philadelphia's walk→drive
   hand-off): no player or facts, just narrative copy — see renderNow(). */
.now--card .now__card-para { margin: 0; line-height: 1.55; }

/* "More about this stop →" — entrance to the per-stop page (#174). A
   comfortable driving-speed tap target at the foot of the hero card, but
   deliberately secondary to the play controls above it: a quiet full-width
   outline link, not a second primary button competing with play/pause. */
.now__more {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 2px; padding: 13px 16px; min-height: 46px;
  font-size: .92rem; font-weight: 600; line-height: 1.25;
  color: var(--sky-ink); text-decoration: none;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-md);
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.now__more:hover { background: #f2f8fc; border-color: #c3e6f6; text-decoration: none; }
.now__more:active { background: #e8f6fd; }
.now__more .now__more-go { width: 18px; height: 18px; flex: none; color: var(--sky-deep); }
@media (prefers-reduced-motion: reduce) { .now__more { transition: none; } }

/* playlist controls */
.cruise-controls {
  max-width: 640px; margin: 16px auto 4px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.cruise-controls .btn { flex: 1; min-width: 150px; }

/* timeline */
.timeline { max-width: 640px; margin: 26px auto 0; }
.timeline h3 {
  font-family: var(--sans); font-weight: 700; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.timeline h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.tl {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding-left: 8px;
}
.tl::before { content: ""; position: absolute; left: 24px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }

/* SSR crawlable stop index (#178): the raw-HTML table of contents seeded into
   #timeline (a real <a href> per waypoint). tour.js overwrites #timeline on
   hydration, so these rules are seen only by crawlers and no-JS visitors. */
.tour-intro { color: var(--ink-2); }
.stop-hub { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.stop-hub a { font-weight: 600; color: var(--ink); }
.stop-hub__tagline { color: var(--muted); }
.wp {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 10px 14px 10px 10px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.wp:hover { transform: translateX(2px); border-color: #C4D6E3; }
@media (prefers-reduced-motion: reduce){ .wp:hover { transform: none; } }
.wp__num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sky-deep); color: #fff; display: grid; place-items: center;
  font-family: var(--sans); font-weight: 700; font-size: .85rem;
  border: 3px solid var(--paper);
}
.wp.is-active { border-color: var(--brick); box-shadow: 0 0 0 2px rgba(180,67,59,.2), var(--shadow-sm); }
.wp.is-active .wp__num { background: var(--brick); }
.wp.is-passed { opacity: .62; }
.wp.is-passed .wp__num { background: #8399a6; }
.wp__info { flex: 1; min-width: 0; }
.wp__info b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.1; }
.wp__info small { color: var(--muted); font-size: .8rem; }
.wp__side {
  flex: none; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-pill); background: var(--paper); color: var(--ink-2); border: 1px solid var(--line-soft);
}
.wp__side.is-port { color: var(--brick-deep); background: #fbeeed; border-color: #f2d9d7; }
.wp__side.is-star { color: var(--sky-deep); background: #e7f5fc; border-color: #cfeaf7; }
.wp__check { flex: none; color: #24b36b; width: 20px; height: 20px; opacity: 0; }
.wp.is-passed .wp__check { opacity: 1; }

/* dev-mode toast */
.dev-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--ember); color: #fff; font-weight: 700; font-size: .82rem;
  padding: 9px 16px; border-radius: var(--r-pill); box-shadow: var(--shadow-md);
  z-index: 70; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.dev-toast.is-on { opacity: 1; }

/* donation card — end-of-tour ask, and the re-surface on the next visit */
.donate-mount:empty { display: none; }
.donate-card {
  max-width: 640px; margin: 16px auto 0; position: relative;
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--brick);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  padding: 16px 40px 16px 18px;
}
.donate-card__close {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.2rem; line-height: 1;
  color: var(--muted); background: transparent;
}
.donate-card__close:hover { background: var(--paper); color: var(--ink); }
.donate-card__body { color: var(--ink-2); font-size: .95rem; margin-bottom: 12px; }
.donate-card__cta { min-height: 40px; padding: .6em 1.1em; font-size: .9rem; }

/* pitch sections — cost table, language, how-it-works */
.pitch { max-width: 640px; margin: 34px auto 0; }
.pitch__h { font-size: 1.3rem; margin-bottom: 8px; }
.pitch__lede { color: var(--ink-2); font-size: .98rem; margin-bottom: 14px; }
.pitch__fine { color: var(--muted); font-size: .78rem; margin-top: 10px; }

/* "Book a nearby experience" affiliate cards (rendered from tour.related). */
.nearby-cards { display: flex; flex-direction: column; gap: 10px; }
.nearby-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; border: 1px solid #cdd9e2; border-radius: 12px;
  background: #fff; box-shadow: var(--shadow-sm); text-decoration: none;
}
.nearby-card:hover { border-color: var(--brick); box-shadow: 0 0 0 2px rgba(180,67,59,.14), var(--shadow-sm); }
.nearby-card__title { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; color: var(--sky-ink); }
.nearby-card__op { color: var(--muted); font-size: .82rem; }
.nearby-card__net { color: var(--sky-deep); font-weight: 600; font-size: .88rem; margin-top: 2px; }

/* "Stay nearby" hotel slot — second, independent card below the experience
   list (tour.hotel, issue #182). */
.nearby-hotel { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }

.cmp-table { display: flex; flex-direction: column; gap: 8px; }
.cmp-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; box-shadow: var(--shadow-sm);
}
.cmp-row--head {
  background: transparent; border: none; box-shadow: none; padding: 0 14px;
  font-family: var(--sans); font-weight: 700; font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.cmp-row--best { border-color: var(--brick); box-shadow: 0 0 0 2px rgba(180,67,59,.14), var(--shadow-sm); }
.cmp-price { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; white-space: nowrap; }
.cmp-price small { display: block; font-family: var(--sans); font-weight: 600; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cmp-link {
  display: inline-flex; align-items: center; font-weight: 700; font-size: .85rem;
  color: var(--sky-deep); white-space: nowrap;
}
.cmp-soon { color: var(--muted); font-size: .78rem; font-style: italic; white-space: nowrap; }
.cmp-cruise { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
@media (max-width: 480px) {
  .cmp-row { grid-template-columns: 1fr; text-align: left; gap: 4px; }
  .cmp-row--head { display: none; }
  .cmp-cruise { align-items: flex-start; }
}

.how { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.how li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; box-shadow: var(--shadow-sm); color: var(--ink-2); font-size: .92rem; line-height: 1.5;
}
.how li b { color: var(--ink); }

/* footer disclaimers */
.cruise-foot {
  max-width: 640px; margin: 36px auto 0; padding: 20px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .78rem; line-height: 1.6;
}
.cruise-foot p { margin-bottom: 8px; }
.cruise-foot a { color: var(--sky-deep); font-weight: 600; }

/* =====================================================================
   CITY GUIDE — "All About Chicago" (chicago.html)
   A reading page, not a card grid: one narrow column of chapters, each with
   the grown-up story, a warm kid callout, the facts list and its narration.
   ===================================================================== */
.hero--guide .hero__inner { padding-block: clamp(32px, 6vw, 68px); }
.hero__desc {
  margin-top: 14px; max-width: 58ch;
  color: #A9C6D8; font-size: .95rem; line-height: 1.6;
}
.hero__desc:empty { display: none; }

/* entry card on the itinerary page — quieter sibling of .featured__card */
.guidelink {
  display: block; margin-top: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 18px 20px;
  color: inherit; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.guidelink:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #C4D6E3; }
@media (prefers-reduced-motion: reduce) { .guidelink:hover { transform: none; } }
.guidelink__row { display: flex; align-items: center; gap: 16px; }
.guidelink .star { font-size: 1.6rem; flex: none; }
.guidelink__txt { flex: 1; min-width: 0; }
.guidelink__eyebrow {
  font-weight: 700; font-size: .7rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--sky-deep);
}
.guidelink h2 { font-size: clamp(1.15rem, 3vw, 1.45rem); margin-top: 3px; line-height: 1.15; }
.guidelink p { color: var(--ink-2); font-size: .92rem; margin-top: 5px; }
.guidelink__go { flex: none; color: var(--sky-deep); width: 22px; height: 22px; }

/* sticky chapter jump bar */
.topicnav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(234,241,246,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topicnav__row {
  display: flex; gap: 8px; overflow-x: auto; padding-block: 12px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.topicnav__row::-webkit-scrollbar { display: none; }
.topicnav__pill {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 7px 14px 7px 8px; font-size: .8rem; font-weight: 600;
  color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.topicnav__pill:hover { text-decoration: none; border-color: var(--sky); color: var(--sky-ink); }
.topicnav__pill b {
  display: grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: .7rem; font-weight: 700;
}
.topicnav__pill:hover b { background: var(--sky-deep); }

/* the chapters */
.cityguide { padding-block: clamp(28px, 5vw, 54px); }
.cityguide > .wrap > div { max-width: 780px; margin-inline: auto; }

.topic {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-sm);
  padding: clamp(20px, 4vw, 30px);
  scroll-margin-top: 74px;
}
.topic + .topic { margin-top: clamp(18px, 3vw, 26px); }

.topic__head { display: flex; align-items: flex-start; gap: 16px; }
.topic__marker {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; flex: none;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 14px; position: relative;
}
.topic__marker .star { font-size: 1.35rem; }
.topic__marker b {
  position: absolute; bottom: -8px; right: -8px;
  font-family: var(--sans); font-weight: 700; font-size: .68rem;
  background: var(--ink); color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.topic__heading { flex: 1; min-width: 0; }
.topic__eyebrow {
  font-family: var(--sans); font-weight: 700; font-size: .7rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--sky-deep);
}
.topic__eyebrow:empty { display: none; }
.topic__title { font-size: clamp(1.5rem, 4vw, 2.05rem); margin-top: 4px; line-height: 1.1; }
.topic__tag { margin-top: 8px; color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.topic__tag:empty { display: none; }

.topic__body { display: flex; flex-direction: column; gap: 18px; margin-top: 20px; }
.topic__prose { display: flex; flex-direction: column; gap: 13px; }
.topic__prose p { color: var(--ink-2); font-size: 1rem; line-height: 1.68; }

/* per-chapter photo gallery — reuses .ph's broken-image fallback */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.gallery__item { min-width: 0; }
.gallery__ph { border-radius: var(--r-sm); }
.gallery__cap {
  margin-top: 6px; display: flex; flex-direction: column; gap: 2px;
}
.gallery__caption { font-size: .82rem; color: var(--ink-2); line-height: 1.35; }
.gallery__credit { font-size: .68rem; color: var(--muted); line-height: 1.3; }

/* kid callout — the one warm thing on a cool page, so it reads as "this bit
   is for you" to a 5-year-old scanning the screen. */
.kidbox {
  background: linear-gradient(180deg, #fff8ef, #fffdfa);
  border: 1px solid #f2ddc2; border-left: 4px solid var(--ember);
  border-radius: var(--r-sm); padding: 15px 17px;
}
.kidbox__label {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-weight: 700; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: #9a5a15;
}
.kidbox__label .star { font-size: .95rem; color: var(--ember); }
.kidbox__fact {
  margin-top: 9px; color: #4a3a29;
  font-size: 1.03rem; line-height: 1.6;
}
.kidbox__challenge {
  margin-top: 11px; padding-top: 11px; border-top: 1px dashed #eccfa8;
  color: #6b4f30; font-size: .92rem; line-height: 1.55;
}
.kidbox__challenge b { color: #9a5a15; }

/* small screens */
@media (max-width: 520px) {
  .stops { grid-template-columns: 1fr; }
  .hero__meta span { font-size: .78rem; }
  .topic__head { gap: 12px; }
  .topic__marker { width: 40px; height: 40px; border-radius: 12px; }
  .topic__marker .star { font-size: 1.1rem; }
  .guidelink__row { gap: 12px; }
}

/* -------------------------------------------------------------------- print
   The River Cruise featured card relies entirely on its dark gradient for
   contrast — its text is white / pale-blue. Browsers drop background colors &
   images when printing (or "Save as PDF"), so on paper the card collapsed to
   near-invisible light text on the pale --paper ground (contrast ~1.1:1).
   Re-ink the card for print: legible dark text on a light card, no reliance on
   the background painting. */
@media print {
  .featured__card {
    background: #fff !important;
    color: var(--ink) !important;
    border: 1px solid var(--line);
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .featured__card::before { display: none; }
  .featured__tag {
    color: var(--sky-ink);
    background: transparent;
    border-color: var(--sky-ink);
  }
  .featured__tag .dot { background: var(--sky-deep); }
  .featured h2 { color: var(--ink); }
  .featured h2 em { color: var(--sky-deep); }
  .featured p { color: var(--ink-2); }
  .featured__side { color: var(--muted); }
  .featured__side .big { color: var(--sky-ink); }
  .featured__cta .btn { background: transparent; color: var(--sky-ink); border: 1px solid var(--sky-ink); }
}

/* ======================================================== SHARE SHEET (#66)
   Header share button + the overlay it opens: language chooser, QR code,
   OS share / copy-link actions. Rendered by TG.mountShare in js/shared.js. */
.share-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.08); color: #Bfdcec;
}
.share-btn:hover { background: rgba(255,255,255,.16); color: #fff; }
.share-btn svg { width: 17px; height: 17px; }
.share-btn[hidden] { display: none; }

.share-sheet {
  position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center;
  justify-content: center; padding: 18px; background: rgba(10, 20, 28, .62);
}
.share-sheet[hidden] { display: none; }
.share-sheet__card {
  position: relative; width: min(340px, 100%); max-height: 90vh; overflow: auto;
  background: #fff; color: #16323f; border-radius: 14px; padding: 20px 20px 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,.4); text-align: center;
}
.share-sheet__close {
  position: absolute; top: 6px; right: 10px; border: 0; background: none;
  font-size: 1.5rem; line-height: 1; color: #7a93a1; cursor: pointer; padding: 4px;
}
.share-sheet__h { margin: 0 0 12px; font-size: 1.05rem; }
.share-sheet__langs {
  display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px;
  background: rgba(18,35,46,.08); margin: 0 0 14px;
}
.share-sheet__lang {
  border: 0; background: none; border-radius: 999px; padding: 5px 12px;
  font-size: .8rem; font-weight: 700; color: #46626f; cursor: pointer;
}
.share-sheet__lang.is-current { background: #16323f; color: #fff; }
.share-sheet__qr {
  /* White padding doubles as the QR quiet zone (createSvgTag margin is 0). */
  width: min(210px, 70vw); margin: 0 auto; background: #fff;
  border: 1px solid rgba(18,35,46,.15); border-radius: 10px; padding: 12px;
}
.share-sheet__qr svg { display: block; width: 100%; height: auto; }
.share-sheet__qr[hidden] { display: none; }
.share-sheet__hint { margin: 8px 0 0; font-size: .75rem; color: #59747f; }
.share-sheet__url { margin: 10px 0 14px; font-size: .8rem; font-weight: 700; word-break: break-all; color: #16323f; }
.share-sheet__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
