/* Flat, neutral, modern-app styling. Color lives only in icon tiles, chips,
   and the map; cards and page surface stay white/neutral. */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #1c1c1e;
  --muted: #6e6e73;
  --hairline: #e6e6e8;
  --wine: #7b2d43;           /* route line + single accent */
  --gold: #8a6508;         /* WCAG: 5.3:1 on white (was #b8860b at 3.3) */

  --c-food: #d1553f;
  --c-wine: #8c3a54;
  --c-lodging: #3672a8;
  --c-bar: #a8701c;        /* WCAG: 4.2:1 on white (was #c98a2e at 2.9) */
  --c-bike: #3f8a4c;
  --c-scenery: #7263b8;
}

* { box-sizing: border-box; margin: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.site-header {
  display: flex; align-items: center;
  padding: 0.8rem 1.6rem;
  background: var(--surface);
  border-bottom: 1px solid var(--hairline);
}
.site-header { justify-content: space-between; }
.brand { display: flex; align-items: baseline; gap: 0.5rem; text-decoration: none; color: inherit; }
.back-link { font-size: 0.78rem; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--ink); }
.lang-switch { display: flex; gap: 0.55rem; font-size: 0.72rem; letter-spacing: 0.04em; }
.lang-switch a { color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch .lang-cur { color: var(--ink); font-weight: 600; }

.lang-banner {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  padding: 0.45rem 1rem; font-size: 0.8rem;
  background: #f4efe4; border-bottom: 1px solid var(--hairline); color: var(--ink);
}
.lang-banner a { color: var(--wine); font-weight: 500; }
.lang-banner button {
  font: inherit; cursor: pointer; border: none; background: none;
  color: var(--muted); font-size: 1rem; line-height: 1; padding: 0 0.2rem;
}

.brand-mark { color: var(--wine); font-size: 1rem; }
.brand-name { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-tag { font-size: 0.75rem; color: var(--muted); }

.route-hero { padding: 1.7rem 1.6rem 0.6rem; background: var(--surface); }
.route-hero h1 { font-size: 1.45rem; font-weight: 600; letter-spacing: -0.02em; }
.route-meta { margin-top: 0.4rem; color: var(--muted); font-size: 0.85rem; }
.route-meta .dot { margin: 0 0.5rem; color: var(--hairline); }

.day-tabs {
  display: flex; gap: 0.45rem; padding: 0.9rem 1.6rem 0; flex-wrap: wrap;
  background: var(--surface);
}
.day-tab {
  font: inherit; font-size: 0.82rem; cursor: pointer; text-align: left;
  padding: 0.42rem 0.95rem; border-radius: 10px;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--ink);
}
.day-tab:hover { border-color: #c9c9cd; }
.day-tab .sub { display: block; font-size: 0.66rem; color: var(--muted); margin-top: 1px; }
.day-tab.active { background: var(--wine); border-color: var(--wine); color: #fff; }
.day-tab.active .sub { color: rgba(255, 255, 255, 0.72); }

.day-tab .stat { display: block; font-size: 0.66rem; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.day-tab.active .stat { color: rgba(255, 255, 255, 0.72); }

.gpx-btn {
  margin-left: auto; text-decoration: none; text-align: left;
  font-size: 0.82rem; color: var(--wine); font-weight: 500;
  padding: 0.42rem 0.95rem; border-radius: 10px;
  border: 1px dashed var(--hairline); background: var(--surface);
}
.gpx-btn:hover { border-color: var(--wine); }
.gpx-btn .sub { display: block; font-size: 0.66rem; color: var(--muted); font-weight: 400; margin-top: 1px; }

.filter-bar {
  display: flex; gap: 0.35rem; padding: 0.7rem 1.6rem 0.9rem; flex-wrap: wrap;
  background: var(--surface); border-bottom: 1px solid var(--hairline);
}
.filter-chip {
  font: inherit; font-size: 0.76rem; cursor: pointer;
  padding: 0.26rem 0.72rem; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--muted);
}
.filter-chip:hover { border-color: #c9c9cd; color: var(--ink); }
.filter-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-chip .pill-icon {
  width: 12px; height: 12px; margin-right: 0.35em; vertical-align: -1.5px;
}

/* Sticky split view: the list scrolls with the page while the map column
 * pins to the viewport — hover-highlighting always has a visible map. */
.layout {
  display: grid; grid-template-columns: minmax(360px, 480px) 1fr;
  align-items: start;
}
.sidebar { padding: 1.1rem 1.3rem 3rem; min-width: 0; }
.map-wrap {
  position: sticky; top: 0; height: 100vh;
  border-left: 1px solid var(--hairline);
}
#map { position: absolute; inset: 0; }

/* Mobile-only "show on map" affordance on cards (map sits above the list
 * in normal flow there, so cards need a way to jump to their pin). */
.show-map { display: none; }

.town-group { margin-bottom: 1.9rem; }
.town-heading {
  display: flex; align-items: center; gap: 0.6rem;
  border-bottom: 1px solid var(--hairline); padding-bottom: 0.45rem; margin-bottom: 0.75rem;
}
.town-photo {
  width: 44px; height: 44px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--hairline); flex: 0 0 auto;
}
.town-heading h2 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.town-heading .town-sub { font-size: 0.72rem; color: var(--muted); }

.section-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin: 0.9rem 0 0.45rem; font-weight: 500;
}

/* --- Cards: flat, hairline, icon tile left --- */
.card {
  display: flex; gap: 0.7rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 0.72rem 0.8rem; margin-bottom: 0.5rem; cursor: pointer;
}
.card:hover { border-color: #c9c9cd; }
/* Set from the map: hovering a pin highlights its sidebar card. */
.card.card-hl { border-color: var(--ink); background: #fbfbfc; }

.card-nomap {
  font-size: 0.72rem; color: var(--muted); font-style: italic; margin-top: 0.3rem;
}
.card.curated { border-left: 3px solid var(--wine); }
.ourpick {
  font-size: 0.62rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--wine);
}

.icon-tile {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.icon-tile svg { width: 17px; height: 17px; }

.card-body { flex: 1; min-width: 0; }
.card-line1 { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.card-name { font-weight: 500; font-size: 0.9rem; letter-spacing: -0.01em; }
.card-line2 { font-size: 0.78rem; color: var(--muted); margin-top: 0.18rem; }
.card-line2 .mich { color: var(--gold); font-weight: 600; }
.card-line2 a { color: var(--wine); text-decoration: none; }
.card-line2 a:hover { text-decoration: underline; }
.card-desc { font-size: 0.78rem; color: var(--muted); margin-top: 0.28rem; line-height: 1.4; }

.chip {
  flex: 0 0 auto; font-size: 0.68rem; padding: 0.13rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--hairline); color: var(--muted); background: var(--surface);
  white-space: nowrap;
}
.chip.bucket-on { background: #eef6ee; border-color: #d5e8d5; color: #2e6b34; }
.chip.bucket-off { background: #faf4e8; border-color: #ecdfc3; color: #8a6414; }
.chip.bucket-gateway { background: #f0eef8; border-color: #ddd7ee; color: #55489a; }
.chip.bucket-excursion { background: #f0eef8; border-color: #ddd7ee; color: #55489a; }

.av { color: #2e6b34; font-weight: 600; }

/* --- Map declutter / progressive disclosure --- */
.town-label {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-size: 0.68rem; font-weight: 600; color: var(--ink); padding: 1px 6px;
}
.town-label::before { display: none; }

.showall-toggle {
  font: inherit; font-size: 0.78rem; cursor: pointer;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--hairline); border-radius: 10px;
  padding: 0.35rem 0.7rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.showall-toggle:hover { color: var(--ink); border-color: #c9c9cd; }

.marker-cluster, .marker-cluster div { background-clip: padding-box; border-radius: 50%; }
.marker-cluster { background: rgba(123, 45, 67, 0.18); }
.marker-cluster div {
  background: var(--wine); color: #fff; width: 28px; height: 28px; margin: 4px;
  display: flex; align-items: center; justify-content: center;
  font: 600 11px/1 -apple-system, sans-serif;
}

.day-note {
  background: var(--surface); border: 1px solid var(--hairline); border-left: 3px solid var(--wine);
  border-radius: 12px; padding: 0.75rem 0.9rem; margin-bottom: 1rem;
  font-size: 0.82rem; color: var(--ink); line-height: 1.5;
}
.day-note-label {
  display: block; font-size: 0.62rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--wine); margin-bottom: 0.25rem;
}

/* --- On-ride mode --- */
.onride-toggle {
  font: inherit; font-size: 0.8rem; font-weight: 500; cursor: pointer;
  background: var(--surface); color: var(--wine);
  border: 1px solid var(--hairline); border-radius: 10px;
  padding: 0.4rem 0.75rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.onride-toggle:hover { border-color: var(--wine); }
body.onride .onride-toggle { background: var(--wine); color: #fff; border-color: var(--wine); }
body.onride .day-tabs, body.onride .filter-bar, body.onride .route-hero { display: none; }

.onride-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 1rem; margin-bottom: 0.7rem;
}
.onride-exit {
  font: inherit; font-size: 0.78rem; cursor: pointer;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 8px;
  padding: 0.25rem 0.7rem; color: var(--muted);
}
.onride-exit:hover { color: var(--ink); border-color: #c9c9cd; }

.onride-status {
  border: 1px solid var(--hairline); border-radius: 10px;
  padding: 0.65rem 0.8rem; font-size: 0.85rem; color: var(--muted);
  margin-bottom: 0.7rem; line-height: 1.45;
}
.onride-status.ok { background: #eef6ee; border-color: #d5e8d5; color: #2e6b34; }
.onride-status.warn { background: #faf4e8; border-color: #ecdfc3; color: #7a5a12; }

.onride-chips { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.7rem; }

.disclaimer {
  margin-top: 1rem; font-size: 0.7rem; color: var(--muted); font-style: italic;
  border-top: 1px solid var(--hairline); padding-top: 0.6rem; line-height: 1.5;
}

.excursion-marker.marker-hl {
  outline: 2px solid var(--ink); outline-offset: 1px; transform: scale(1.15);
}

.excursion-marker {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: #7263b8; color: #fff; font-size: 14px; line-height: 1;
  border: 2px solid #fff; box-shadow: 0 0 0 1px #7263b8;
}

.tips-box {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 0.75rem 0.9rem; margin-bottom: 1.3rem; font-size: 0.8rem; color: var(--muted);
  line-height: 1.45;
}
.tips-box strong { color: var(--ink); font-weight: 600; }

.coming-soon {
  font-size: 0.75rem; color: var(--muted);
  padding: 0.4rem 0.6rem; margin-bottom: 0.45rem;
  background: var(--bg); border-radius: 8px; border: 1px dashed var(--hairline);
}

.show-more {
  font: inherit; font-size: 0.76rem; cursor: pointer; border: none; background: none;
  color: var(--wine); padding: 0.1rem 0; margin: 0.05rem 0 0.5rem;
}
.show-more:hover { text-decoration: underline; }

.empty-note { color: var(--muted); font-size: 0.83rem; }

.leaflet-popup-content { font-family: inherit; }
.popup-name { font-weight: 600; font-size: 0.86rem; }
.popup-meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; line-height: 1.45; }
.popup-meta a { color: var(--wine); }

/* --- Landing page --- */
.landing { max-width: 880px; margin: 0 auto; padding: 0 1.6rem 3rem; }

.landing-hero { padding: 3.2rem 0 2.4rem; }
.landing-hero h1 {
  font-size: 1.9rem; font-weight: 650; letter-spacing: -0.025em; line-height: 1.25;
}
.landing-sub {
  margin-top: 0.9rem; max-width: 620px;
  color: var(--muted); font-size: 0.95rem; line-height: 1.6;
}
.cta {
  display: inline-block; margin-top: 1.4rem;
  background: var(--wine); color: #fff; text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  padding: 0.6rem 1.1rem; border-radius: 10px;
}
.cta:hover { background: #692639; }

.landing-section { padding: 1.6rem 0 0.6rem; }
.landing-heading {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); font-weight: 600; margin-bottom: 1rem;
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.step {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 1.1rem;
}
.step-tile { width: 38px; height: 38px; }
.step h3 { font-size: 0.92rem; font-weight: 600; margin-top: 0.75rem; letter-spacing: -0.01em; }
.step p { font-size: 0.8rem; color: var(--muted); line-height: 1.55; margin-top: 0.35rem; }

.route-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 1.1rem 1.2rem; text-decoration: none; color: inherit;
}
a.route-card:hover { border-color: #c9c9cd; }
.route-card.featured { border-left: 3px solid var(--wine); }
.route-card-body { flex: 1; min-width: 0; }
.route-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.route-card-name { font-weight: 600; font-size: 1.02rem; letter-spacing: -0.015em; }
.route-card-meta { font-size: 0.76rem; color: var(--muted); margin-top: 0.15rem; }
.route-card-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.5; margin-top: 0.5rem; }
.route-card-stats { font-size: 0.76rem; color: var(--ink); margin-top: 0.55rem; }
.route-card-cta { color: var(--wine); font-size: 0.85rem; font-weight: 500; white-space: nowrap; }

.coming-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin-top: 0.9rem;
}
.route-card.ghost { opacity: 0.55; align-items: flex-start; }
.route-card.ghost .route-card-name { color: var(--muted); }

@media (max-width: 720px) {
  .steps, .coming-strip { grid-template-columns: 1fr; }
  .landing-hero h1 { font-size: 1.5rem; }
}

/* --- Elevation profile card (day views) --- */
.elev-card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 0.7rem 0.8rem 0.45rem; margin-bottom: 1rem;
}
.elev-head {
  display: flex; justify-content: space-between; gap: 0.6rem;
  font-size: 0.78rem; font-weight: 500; margin-bottom: 0.35rem;
}
.elev-stats { color: var(--muted); font-weight: 400; white-space: nowrap; }
.elev-card svg { width: 100%; height: 96px; display: block; }
.elev-t { font-size: 9px; fill: var(--muted); font-family: inherit; }

/* --- Landing hero photo --- */
.landing-hero { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
.hero-photo {
  width: 100%; max-height: 300px; object-fit: cover; border-radius: 14px;
  border: 1px solid var(--hairline);
}
@media (min-width: 860px) {
  .landing-hero { grid-template-columns: 3fr 2fr; align-items: center; }
  .hero-photo { max-height: 240px; }
}
.featured-photo {
  width: 128px; height: 96px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--hairline); flex: 0 0 auto;
}
@media (max-width: 600px) { .featured-photo { display: none; } }

.site-footer {
  padding: 0.7rem 1.6rem;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  font-size: 0.72rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--ink); }

/* --- Route Patches: device-local check-in collectibles --- */
.patches-btn {
  font: inherit; font-size: 0.82rem; color: var(--wine); font-weight: 500; cursor: pointer;
  border: 1px dashed var(--hairline); background: var(--surface);
  border-radius: 10px; padding: 0.4rem 0.75rem; text-align: left;
}
.patches-btn:hover, .patches-btn.active { border-color: var(--wine); }
.patches-btn .sub { display: block; font-size: 0.66rem; color: var(--muted); font-weight: 400; margin-top: 1px; }
body.patches .route-hero, body.patches .filter-bar { display: none; }

.patch-svg.patch-locked { filter: grayscale(1); opacity: 0.4; }

.patches-progress { margin: 0.4rem 0 0.9rem; }
.patches-progress-text { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.35rem; }
.patches-bar { height: 6px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.patches-bar-fill { height: 100%; background: var(--wine); border-radius: 999px; }

.gold-card {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 0.8rem 0.95rem; margin-bottom: 1rem;
}
.gold-card.unlocked { border-color: var(--gold); background: #fdfaf0; }
.gold-card .gold-sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

.patch-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.9rem; margin-bottom: 1rem;
}
.patch-cell {
  text-align: center; background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 12px; padding: 0.8rem 0.5rem 0.7rem;
}
.patch-name { font-size: 0.78rem; font-weight: 600; margin-top: 0.4rem; line-height: 1.3; }
.patch-date { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }
.patch-share, .patches-share {
  font: inherit; font-size: 0.74rem; cursor: pointer; margin-top: 0.4rem;
  padding: 0.22rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--surface); color: var(--wine);
}
.patch-share:hover, .patches-share:hover { border-color: var(--wine); }
.patches-share { font-size: 0.82rem; padding: 0.4rem 0.9rem; }
.patches-actions { margin-bottom: 0.9rem; }
.patches-device {
  font-size: 0.74rem; color: var(--muted); font-style: italic;
  border-top: 1px solid var(--hairline); padding-top: 0.6rem;
}

.checkin-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--surface); border: 1.5px solid var(--wine); border-radius: 12px;
  padding: 0.7rem 0.85rem; margin-bottom: 0.7rem;
}
.checkin-card.earned { border-color: var(--gold); background: #fdfaf0; }
.checkin-card strong { display: block; font-size: 0.88rem; margin-bottom: 0.35rem; }
.checkin-btn {
  font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  background: var(--wine); color: #fff; border: none; border-radius: 999px;
  padding: 0.4rem 1rem; min-height: 38px;
}
.checkin-view {
  font: inherit; font-size: 0.8rem; cursor: pointer; color: var(--wine);
  border: 1px solid var(--hairline); background: var(--surface); border-radius: 999px;
  padding: 0.3rem 0.85rem;
}

/* --- Full-route overview: day-summary cards (summary + jump only) --- */
.overview-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 0.8rem 0.95rem; margin-bottom: 0.7rem;
}
.overview-card:hover { border-color: var(--wine); }
.overview-card.expanded { border-color: var(--wine); margin-bottom: 0.45rem; }
.ov-detail {
  margin: 0 0 0.9rem; padding-left: 0.75rem;
  border-left: 2px solid var(--hairline);
}
.ov-top { display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; }
.ov-day { font-weight: 600; font-size: 0.9rem; color: var(--wine); white-space: nowrap; }
.ov-leg { font-weight: 500; font-size: 0.88rem; }
.ov-stats {
  margin-left: auto; font-size: 0.78rem; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ov-highlight { font-size: 0.82rem; color: var(--muted); line-height: 1.5; margin-top: 0.35rem; }
.ov-icons { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.5rem; }
.ov-icon { width: 16px; height: 16px; }
.ov-mich { font-size: 0.8rem; }
@media (max-width: 720px) {
  .ov-highlight { font-size: 0.88rem; }
  .ov-icon { width: 18px; height: 18px; }
}

/* --- Mobile accessibility: larger type, more air (tester feedback r4) --- */
@media (max-width: 720px) {
  html { font-size: 17.5px; }
  .brand-tag { display: none; }
  .site-header { gap: 0.8rem; }
  .card { padding: 0.85rem 0.95rem; gap: 0.75rem; }
  .card-name { font-size: 0.95rem; }
  .card-line2, .card-desc { font-size: 0.84rem; line-height: 1.55; }
  .chip { font-size: 0.74rem; padding: 0.2rem 0.6rem; }
  .ourpick, .day-note-label { font-size: 0.68rem; }
  .card-nomap { font-size: 0.78rem; }
  .filter-chip { font-size: 0.84rem; padding: 0.45rem 0.85rem; min-height: 40px; }
  .day-tab { padding: 0.5rem 0.75rem; }
  .day-tab .sub, .day-tab .stat { font-size: 0.72rem; }
  .town-heading .town-sub { font-size: 0.78rem; }
  .section-label { font-size: 0.72rem; }
  .route-meta { font-size: 0.9rem; line-height: 1.6; }
  .day-note { font-size: 0.88rem; }
  .show-map { font-size: 0.78rem; padding: 0.3rem 0.7rem; }
  .site-footer { font-size: 0.78rem; line-height: 1.6; }
  .landing-sub, .step p, .route-card-desc { font-size: 0.9rem; }
}

/* --- On-ride: prominent floating toggle + one-time hint on mobile --- */
.onride-fab, .onride-hint { display: none; }
@media (max-width: 860px) {
  .onride-fab {
    display: flex; align-items: center; justify-content: center;
    position: fixed; bottom: 1rem; right: 1rem; z-index: 1100;
    font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
    min-height: 48px; padding: 0.65rem 1.15rem; border-radius: 999px;
    background: var(--wine); color: #fff; border: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
  }
  body.onride .onride-fab { background: var(--ink); }
  .onride-hint {
    display: block; position: fixed; bottom: 4.4rem; right: 1rem; z-index: 1100;
    max-width: 15rem; padding: 0.7rem 0.85rem; border-radius: 12px;
    background: var(--ink); color: #fff; font-size: 0.85rem; line-height: 1.5;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
  }
  .onride-hint button {
    display: block; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
    margin-top: 0.5rem; padding: 0.25rem 0; border: none; background: none;
    color: #f0d9a8; min-height: 32px;
  }
  /* The map-corner toggle duplicates the fab on small screens. */
  .onride-ctl { display: none; }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .map-wrap {
    order: -1; position: relative; top: auto; height: 45vh;
    border-left: none; border-bottom: 1px solid var(--hairline);
  }
  /* Cards get a jump-to-pin button since the map scrolls out of view. */
  .show-map {
    display: inline-block; font: inherit; font-size: 0.7rem; cursor: pointer;
    margin-top: 0.35rem; padding: 0.16rem 0.55rem; border-radius: 999px;
    border: 1px solid var(--hairline); background: var(--surface); color: var(--wine);
  }
}
