/* ===================== Design tokens ===================== */
:root {
  /* EdFringeNow light-map palette (P1 foundation). Variable names kept so the
     existing rules keep resolving; values retuned to the approved theme. */
  --red: #0f8f86;        /* primary action — teal */
  --red-dark: #0a6f68;
  --gold: #5b54c9;       /* commitment / secondary — indigo */
  --blue: #5b54c9;       /* destination / user pin — indigo */
  --pink: #c62024;       /* warning red — debug chip only */
  --ink: #222a24;        /* warm near-black */
  --paper: #fffdf8;      /* card surface */
  --bg: #f3efe5;         /* page background */
  --muted: #6b7268;
  --line: #e6e1d5;
  --yellow-badge: #f4d645;
  --shadow-soft: 0 10px 26px rgba(34, 42, 36, 0.10);
  --shadow-offset: 6px;
  --maxw: 1120px;
  --radius: 14px;
  --serif: "Fraunces", Georgia, serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

/* ===================== Debug clock badge ===================== */
.debug-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin: 0 0 24px;
  background: var(--red);
  color: #fff;
  font-size: 0.92rem;
  letter-spacing: 0.3px;
  padding: 14px 18px;
  border: 2px solid #fff;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.debug-banner:empty { display: none; }
.debug-banner strong { text-transform: uppercase; letter-spacing: 0.6px; }
.debug-banner__status { font-weight: 700; }
.debug-banner__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
}
.debug-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.debug-control input[type="datetime-local"] {
  font: inherit;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
  padding: 5px 8px;
  border: 1px solid #fff;
  border-radius: 5px;
}
.debug-move-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.debug-btn {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 5px 10px;
  color: var(--red);
  background: #fff;
  border: 1px solid #fff;
  border-radius: 5px;
}
.debug-btn:hover { background: #ffe5e5; }
.debug-btn:active { transform: translateY(1px); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 24px;
}

a { color: inherit; }

/* ===================== Header ===================== */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo-now { color: var(--red); }
.main-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: auto;
}
.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.98rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--red); }
.nav-link.is-active {
  color: var(--red);
  border-bottom-color: var(--red);
}
.header-icons { display: flex; gap: 8px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--red);
  cursor: pointer;
}
.icon-btn:hover { background: rgba(198, 32, 36, 0.08); }

/* ===================== Hero ===================== */
.hero { text-align: center; padding: 56px 24px 40px; }
.hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.hero-subtitle {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
}

/* Constraint cards */
.constraint-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  text-align: left;
}
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.card.is-open,
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(34, 42, 36, 0.14);
}
/* Lift the open card (and its pop-over) above the map's stacking context. */
.card.is-open { z-index: 1500; }
.card-trigger {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 28px 22px 22px;
}

/* Pop-over panels */
.card-panel {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(34, 42, 36, 0.18);
  padding: 18px 18px 20px;
}
.card-panel[hidden] { display: none; }
.panel-title {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--muted);
}
.panel-options { display: grid; gap: 4px; }
.panel-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
}
.panel-option:hover { background: var(--line); }
.panel-option input { accent-color: var(--red); width: 16px; height: 16px; }
.panel-field-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin: 12px 0 6px;
}
.panel-select {
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
}
.panel-select:disabled { opacity: 0.5; cursor: not-allowed; }
.panel-input {
  width: 100%;
  font: inherit;
  font-weight: 600;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}
.panel-input:disabled { opacity: 0.5; }
.panel-range {
  width: 100%;
  accent-color: var(--red);
  cursor: pointer;
  margin: 2px 0 0;
}
.range-value {
  margin: 6px 0 2px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}
.panel-note {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}
.card-caret {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-bottom: 18px;
}
.card-icon--red { background: rgba(198, 32, 36, 0.12); color: var(--red); }
.card-icon--gold { background: rgba(199, 154, 54, 0.18); color: var(--gold); }
.card-icon--blue { background: rgba(47, 107, 214, 0.14); color: var(--blue); }

.card-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 6px;
}
.card--genre .card-label { color: var(--red); }
.card--travel .card-label { color: var(--gold); }
.card--constraint .card-label { color: var(--blue); }

.card-value {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.2;
}

/* ===================== Map ===================== */
.map-section { margin: 16px auto 0; }
#leaflet-map {
  width: 100%;
  height: 460px;
  background: #e9eee7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  /* Positioned + z-index:0 caps Leaflet's internal panes/controls (which go up
     to z-index 1000) inside this stacking context, so the card pop-overs above
     the map can render over it. */
  position: relative;
  z-index: 0;
}

/* Map legend */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 12px 2px 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot--ok { background: var(--red); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.legend-dot--tight { background: #b9bcc1; border: 2px solid #9aa0a6; opacity: 0.7; }
.legend-dot--leg { background: var(--red); border: 3px solid #1e7d34; }
.legend-dot--circle { background: rgba(47, 107, 214, 0.18); border: 1.5px solid var(--blue); }

/* Journey arrows drawn on the map */
.leaflet-overlay-pane path.route-line {
  stroke-dasharray: 10 8;
  animation: routeDash 0.8s linear infinite;
}
@keyframes routeDash { to { stroke-dashoffset: -18; } }
.route-arrow-wrap { background: transparent; border: none; }
.route-arrow {
  display: block;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 12px solid var(--ink);
}
.route-label {
  width: auto !important;
  height: auto !important;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -130%);
}
.route-check {
  border-color: #1e7d34;
  color: #14601f;
}
.route-check .tick { color: #1e7d34; font-weight: 800; }

/* ===================== Journey strip ===================== */
/* Narrow timeline that mirrors the plan: origin → optional stop → commitment. */
/* Row holding the journey summary box and, on its right, the Google Maps
   route link. The strip flexes to fill; the link keeps its content width. */
.journey-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-top: 18px;
}
.journey-row > .journey { flex: 1 1 auto; min-width: 0; margin: 0; }
.journey-row:has(> #journeyStrip:empty) { display: none; }

.journey {
  display: flex;
  align-items: stretch;
  margin: 18px auto 0;
  padding: 10px 16px;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}
.journey:empty { display: none; }

/* Nodes (origin / stop / destination) */
.journey-node {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
  max-width: 220px;
  padding: 2px 6px;
}
.journey-flag {
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}
.journey-flag--dull { color: var(--muted); }
.journey-flag--stop { color: #1e7d34; }
.journey-flag--dest { color: var(--blue); }
.journey-sub {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}
.journey-slack {
  margin-top: 3px;
  align-self: flex-start;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.journey-slack--ok { background: #e3f4e6; color: #14601f; border: 1px solid #1e7d34; }
.journey-slack--late { background: #fde7e7; color: var(--red-dark); border: 1px solid var(--red); }

/* Connector segments */
.journey-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1 1 80px;
  min-width: 78px;
  padding: 0 8px;
}
.journey-seg--long { flex-grow: 3; }
.journey-line-label {
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.journey-line {
  position: relative;
  width: 100%;
  height: 0;
  border-top: 2px dashed var(--ink);
}
.journey-line-walker {
  position: absolute;
  top: -11px;
  left: 0;
  font-size: 0.9rem;
  animation: journeyWalk 2.6s linear infinite;
}
@keyframes journeyWalk {
  from { left: 0; }
  to { left: calc(100% - 14px); }
}

/* Idle middle: walker bobbing in place + trailing dots */
.journey-seg--idle { flex: 1 1 auto; gap: 6px; }
.journey-idle-row { display: inline-flex; align-items: center; gap: 8px; }
.journey-walker {
  font-size: 1.35rem;
  animation: journeyBob 0.55s ease-in-out infinite alternate;
}
@keyframes journeyBob {
  from { transform: translateY(0); }
  to { transform: translateY(-3px); }
}
.journey-dots { display: inline-flex; gap: 4px; }
.journey-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: journeyDot 1.2s ease-in-out infinite;
}
.journey-dots i:nth-child(2) { animation-delay: 0.2s; }
.journey-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes journeyDot {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}
.journey-hint { font-size: 0.72rem; color: var(--muted); }

/* "Buy now" CTA on a selected paid show */
.journey-buy {
  margin-top: 4px;
  align-self: flex-start;
  display: inline-block;
  max-width: 210px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  border: 1px solid var(--red-dark);
  box-shadow: 0 1px 0 var(--red-dark);
  animation: journeyPulse 1.6s ease-in-out infinite;
}
.journey-buy:hover { background: var(--red-dark); }
@keyframes journeyPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.journey-soldout {
  margin-top: 4px;
  align-self: flex-start;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}

/* Google Maps route link — its own bordered box matching the journey strip's
   neobrutalist style, sitting to the strip's right. */
.maps-route-btn {
  flex: 0 0 auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 150px;
  padding: 10px 16px;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.8rem;
  line-height: 1.2;
  color: #fff;
  background: var(--blue);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.maps-route-btn:hover { background: var(--blue-dark, #1746a2); }
.maps-route-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}
.maps-route-btn[hidden] { display: none; }
.maps-route-btn__pin { font-size: 1.2rem; }

@media (max-width: 560px) {
  .journey-row { flex-direction: column; }
  .maps-route-btn {
    max-width: none;
    flex-direction: row;
    align-self: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .journey-walker,
  .journey-line-walker,
  .journey-dots i,
  .journey-buy { animation: none; }
}

/* ===================== Shows list ===================== */
.shows-section { padding: 36px 24px 56px; }
.shows-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 22px;
}
.shows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.show-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease;
  background: var(--paper);
}
.show-item:hover { border-color: var(--ink); transform: translateY(-2px); }
.show-item--tight { opacity: 0.55; }
.show-item--leg { border-color: #1e7d34; border-width: 2px; }
.show-item--selected { border-color: var(--red); border-width: 2px; box-shadow: var(--shadow-soft); }
.show-genre {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 8px;
}
.show-name { font-weight: 800; font-size: 1.05rem; margin: 0 0 6px; }
.show-meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 2px; }
.show-time { font-weight: 700; }

/* Map popup */
.popup-genre {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--red);
}
.popup-title { font-weight: 800; font-size: 1rem; margin: 2px 0 4px; }
.popup-meta { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* "You are here" marker */
.user-marker { background: transparent; border: none; }
.user-dot {
  display: block;
  width: 16px;
  height: 16px;
  margin: 2px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(47, 107, 214, 0.5);
  animation: userPulse 2s infinite;
}
@keyframes userPulse {
  0%   { box-shadow: 0 0 0 0 rgba(47, 107, 214, 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(47, 107, 214, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 107, 214, 0); }
}

/* ===================== Footer ===================== */
.site-footer {
  background: var(--ink);
  color: #d9d9d9;
  padding: 48px 0;
  margin-top: 24px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 32px;
  align-items: start;
}
.logo--footer { color: var(--red); margin: 0 0 12px; }
.footer-tagline { max-width: 320px; margin: 0 0 16px; color: #cfcfcf; }
.footer-copy { color: #8c8c8c; font-size: 0.85rem; margin: 0; }
.footer-heading {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.82rem;
  margin: 4px 0 14px;
}
.footer-link {
  display: block;
  text-decoration: underline;
  color: #d9d9d9;
  margin-bottom: 10px;
  font-size: 0.92rem;
}
.footer-link:hover { color: #fff; }
.footer-actions { display: flex; gap: 10px; }
.icon-btn--dark {
  background: #2b2b2b;
  color: #d9d9d9;
}
.icon-btn--dark:hover { background: #3a3a3a; color: #fff; }

/* ===================== Responsive ===================== */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .constraint-cards { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-actions { grid-column: 1 / -1; }
}

/* ============================================================
   Redesign v2 — one calm centered column on every screen size.
   Standard time picker, vertical plan, compact capped list,
   collapsible debug, and a supporting (not dominant) map.
   ============================================================ */
.app { width: 100%; }
.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 16px 20px 60px; }

.now-line { font-size: 0.92rem; color: var(--muted); margin: 2px 0 16px; }
.now-line b { color: var(--ink); }

/* --- Debug collapsed behind a red header chip --- */
.debug-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: var(--pink); border: none; border-radius: 999px; padding: 7px 12px;
}
.debug-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.debug-chip[aria-expanded="true"] { background: #9c181b; }
.debug-chip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* The (otherwise loud) debug banner, compacted into a tidy dropdown card. */
.debug-banner {
  display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: flex-end;
  background: #fff5f4; color: var(--ink); border: 1px solid #f2c9c4;
  border-radius: 12px; padding: 14px 16px; margin: 0 0 16px;
  box-shadow: none; font-size: 0.82rem;
}
.debug-banner[hidden] { display: none; }
.debug-banner strong { color: var(--pink); text-transform: uppercase; letter-spacing: 0.5px; }
.debug-banner__status { font-weight: 700; }
.debug-banner__controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.debug-control { display: flex; flex-direction: column; gap: 6px; font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.debug-control input[type="datetime-local"] { font: inherit; font-size: 0.82rem; text-transform: none; letter-spacing: normal; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; }
.debug-move-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.debug-btn { font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; padding: 5px 9px; color: var(--pink); background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.debug-btn:hover { background: #ffecea; }

/* --- Primary CTA (opens the next-commitment picker) --- */
.cta-card { border: none; box-shadow: none; background: transparent; }
.cta-card:hover { transform: none; box-shadow: none; }
.cta-card.is-open { z-index: 1500; }
.cta-trigger {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--red); color: #fff; border: none; border-radius: 16px;
  padding: 17px 20px; box-shadow: 0 10px 24px rgba(15, 143, 134, 0.26);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cta-trigger:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 143, 134, 0.32); }
.cta-trigger:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.cta-kicker { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.85); }
.cta-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; line-height: 1.12; margin: 5px 0 6px; color: #fff; text-transform: none; }
.cta-hint { display: block; font-size: 0.82rem; color: rgba(255,255,255,0.92); }

/* --- Constraint picker: a standard <input type=time> + a show list --- */
/* Scroll-snap time wheel (real native momentum scrolling, like an iOS picker). */
.wheel-time {
  position: relative; display: flex; align-items: stretch; justify-content: center;
  gap: 4px; height: 200px; margin: 4px 0 2px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
}
.wheel {
  position: relative; z-index: 1; height: 200px; width: 88px; overflow-y: scroll;
  scroll-snap-type: y mandatory; text-align: center; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 32%, #000 68%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 32%, #000 68%, transparent);
}
.wheel::-webkit-scrollbar { display: none; }
.wheel:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 10px; }
.wheel-item {
  height: 40px; line-height: 40px; scroll-snap-align: center;
  font-family: var(--serif); font-weight: 600; font-size: 1.55rem; color: #b3bab2;
  transition: color 0.12s ease;
}
.wheel-item.sel { color: var(--ink); }
.wheel-pad { height: 80px; }
.wheel-sep { align-self: center; font-family: var(--serif); font-weight: 700; font-size: 1.55rem; color: var(--ink); }
/* The highlighted centre band. */
.wheel-band {
  position: absolute; left: 8px; right: 8px; top: 80px; height: 40px; z-index: 0;
  border-radius: 10px; background: rgba(91, 84, 201, 0.10);
  border: 1px solid rgba(91, 84, 201, 0.28); pointer-events: none;
}
.timepick-count { text-align: center; margin: 10px 0 10px; font-size: 0.82rem; color: var(--muted); }
.timepick-count .countnum { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--red-dark); display: inline-block; vertical-align: -2px; }
.timepick-count .countnum.bump { animation: countbump 0.4s ease; }
@keyframes countbump { 0% { transform: scale(1); } 42% { transform: scale(1.16); color: var(--red); } 100% { transform: scale(1); } }
.timepick-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.timepick-suggest button { font: inherit; font-size: 0.8rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--red-dark); cursor: pointer; }
.timepick-suggest button:hover { border-color: var(--red); }

.show-picklist { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; margin: 2px 0 8px; }
.show-pick { display: flex; align-items: center; gap: 11px; text-align: left; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; font: inherit; color: inherit; }
.show-pick:hover { border-color: #cfc9bb; }
.show-pick.is-sel { border-color: var(--gold); background: rgba(91,84,201,0.07); }
.show-pick:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.sp-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9aa39c; flex: 0 0 auto; }
.show-pick.is-sel .sp-radio { border-color: var(--gold); background: radial-gradient(circle at 50% 50%, var(--gold) 0 5px, transparent 6px); }
.sp-body { min-width: 0; }
.sp-title { display: block; font-family: var(--serif); font-weight: 600; font-size: 1rem; line-height: 1.15; }
.sp-venue { display: block; font-size: 0.78rem; color: var(--muted); }
.sp-genre { display: block; font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; color: #9aa39c; margin-top: 2px; }
.show-pick.anim { animation: pickin 0.32s ease both; }
@keyframes pickin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.picklist-empty { font-size: 0.85rem; color: var(--muted); margin: 4px 0; }

/* --- Filters as compact chips --- */
.filters-row { display: flex; align-items: center; gap: 8px; margin: 16px 0 4px; flex-wrap: wrap; }
.filters-label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #8c958c; }
.filter-chip { position: relative; border: none; box-shadow: none; background: transparent; border-radius: 999px; }
.filter-chip:hover { transform: none; box-shadow: none; }
.filter-chip.is-open { z-index: 1500; }
.filter-chip .card-trigger {
  display: inline-flex; align-items: center; gap: 7px; width: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; font: inherit; color: var(--ink);
}
.filter-chip .card-trigger:hover { border-color: #cfc9bb; }
.filter-chip .card-trigger:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.filter-chip .fc-ico { font-size: 1rem; }
.filter-chip .card-value { font-weight: 700; font-size: 0.9rem; text-transform: none; letter-spacing: 0; }
.filter-chip .fc-caret { color: var(--muted); font-size: 0.72rem; }
.filter-chip .card-panel { left: 0; right: auto; min-width: 260px; }

/* --- The plan: a compact vertical itinerary (works on narrow screens) --- */
.plan { margin: 16px 0 0; }
.plan:empty { display: none; }
.plan-head { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; margin: 4px 0 12px; }
.plan-node { position: relative; padding: 0 0 2px 26px; }
.plan-node::before { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; }
.plan-node.you::before { background: var(--red); }
.plan-node.stop::before { background: #2e9e7e; }
.plan-node.dest::before { background: #fff; border: 3px solid var(--blue); }
.plan-leg { margin: 3px 0 3px 6px; padding: 7px 0 7px 19px; border-left: 2px dashed #cfc9bb; font-size: 0.74rem; color: var(--muted); }
.plan-time { font-size: 0.74rem; font-weight: 700; color: var(--red-dark); }
.plan-title { font-family: var(--serif); font-weight: 600; font-size: 1.06rem; line-height: 1.18; margin: 1px 0; }
.plan-sub { font-size: 0.78rem; color: var(--muted); }
.plan-slack { display: inline-block; margin-top: 6px; font-size: 0.68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.plan-slack.ok { color: #14601f; background: #e3f4e6; }
.plan-slack.late { color: var(--red-dark); background: #fde7e7; }
.plan-buy-inline { display: inline-block; margin-top: 8px; font-size: 0.72rem; font-weight: 700; text-decoration: none; padding: 5px 11px; border-radius: 999px; color: #fff; background: var(--red); }
.plan-buy-inline:hover { background: var(--red-dark); }
.plan-soldout { display: inline-block; margin-top: 8px; font-size: 0.7rem; font-weight: 700; color: var(--muted); }
/* Plan header row: "Your plan" on the left, a mild Maps link on the right. */
.plan-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.plan-head-row .plan-head { margin: 0; }
.plan-maps-mild { flex: 0 0 auto; font-size: 0.8rem; font-weight: 700; text-decoration: none; color: var(--blue); white-space: nowrap; }
.plan-maps-mild:hover { text-decoration: underline; }
.plan-maps-mild:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* Spare-time CTA: turns the plan's slack into a prompt to browse shows. */
.spare-cta { margin: 14px 0 0; }
.spare-cta[hidden] { display: none; }
.spare-line { margin: 0; padding: 13px 16px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; background: var(--paper); font-size: 0.98rem; line-height: 1.4; color: var(--ink); }
.spare-line b { color: var(--blue); }
.spare-line--tight { border-left-color: var(--muted); color: var(--muted); }
.spare-count { display: inline-block; margin-left: 4px; font-size: 0.82rem; font-weight: 700; color: var(--red-dark); white-space: nowrap; }

/* --- Map: supporting, calm, modest --- */
.map-section { margin: 20px 0 0; }
#leaflet-map { height: 260px; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
/* Desaturate the tiles a touch so the map reads as informative, not the main thing. */
.leaflet-tile-pane { filter: saturate(0.82) brightness(1.03); }

/* --- Focus card: the tapped show, shown above the list (not a map popup) --- */
.focus-card { position: relative; margin: 12px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-soft); }
.focus-card[hidden] { display: none; }
.focus-close { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: none; background: transparent; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; border-radius: 8px; }
.focus-close:hover { color: var(--ink); background: rgba(0, 0, 0, 0.05); }
.focus-close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.focus-genre { display: inline-block; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: var(--red); margin: 0 0 4px; }
.focus-title { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; line-height: 1.18; margin: 0 0 4px; padding-right: 30px; }
.focus-meta { color: var(--muted); font-size: 0.82rem; margin: 2px 0; }
.focus-fits { display: inline-block; margin: 6px 0 0; font-size: 0.72rem; font-weight: 700; color: #1f7a4d; }
.focus-actions { margin: 10px 0 0; }
.focus-buy { display: inline-block; font-size: 0.78rem; font-weight: 700; text-decoration: none; padding: 8px 14px; border-radius: 999px; color: #fff; background: var(--red); }
.focus-buy:hover { background: var(--red-dark); }
.focus-buy:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.focus-soldout { display: inline-block; margin: 4px 0 0; font-size: 0.76rem; font-weight: 700; color: var(--muted); }

/* --- Reachable list: compact rows, capped --- */
.shows-section { padding: 24px 0 0; }
.shows-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.shows-head .shows-title { margin: 0; }
.sort-toggle { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 2px; }
.sort-btn { font: inherit; font-size: 0.78rem; font-weight: 700; color: var(--muted); background: transparent; border: none; padding: 5px 13px; border-radius: 999px; cursor: pointer; transition: color 0.12s ease, background 0.12s ease; }
.sort-btn.is-active { color: #fff; background: var(--red); }
.sort-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.shows-title { font-size: 1.3rem; }
.shows-grid { display: flex; flex-direction: column; gap: 8px; grid-template-columns: none; }
.show-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  cursor: pointer; transition: border-color 0.12s ease;
}
.show-item:hover { border-color: #cfc9bb; transform: none; }
.show-item--tight { opacity: 0.6; }
.show-item--leg { border-color: #2e9e7e; border-width: 2px; }
.show-item--selected { border-color: var(--red); border-width: 2px; box-shadow: none; }
.si-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.show-genre { align-self: flex-start; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: var(--red); margin: 0 0 2px; }
.show-name { font-family: var(--serif); font-weight: 600; font-size: 1rem; margin: 0 0 2px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-meta { color: var(--muted); font-size: 0.78rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-side { flex: 0 0 auto; text-align: right; }
.si-time { font-family: var(--serif); font-weight: 700; font-size: 1rem; color: var(--ink); }
.si-walk { font-size: 0.72rem; color: var(--muted); }
.si-fits { font-size: 0.66rem; font-weight: 700; color: #1f7a4d; }
.shows-group-head { font-family: var(--serif); font-weight: 600; font-size: 0.95rem; color: var(--red-dark); margin: 14px 0 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.shows-group-head:first-child { border-top: none; padding-top: 0; margin-top: 2px; }
.show-more { display: block; width: 100%; margin: 14px 0 0; padding: 12px; font: inherit; font-weight: 700; font-size: 0.9rem; color: var(--red-dark); background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.show-more:hover { border-color: var(--red); }
.show-more[hidden] { display: none; }

/* --- Focus visibility --- */
.nav-link:focus-visible, .icon-btn:focus-visible, .footer-link:focus-visible,
.show-item:focus-visible, .show-more:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .timepick-count .countnum.bump, .show-pick.anim { animation: none; }
}

/* Desktop keeps the same centered single column as mobile — just a wider gutter. */
@media (min-width: 720px) {
  .wrap { padding-left: 28px; padding-right: 28px; }
  #leaflet-map { height: 300px; }
}
