:root {
  --bg: #FFF8F1;
  --surface: #FFFFFF;
  --surface-2: #FFF3E8;
  --ink: #211D1A;
  --muted: #675F57;
  --line: #EDE2D6;
  --accent: #C2410C;
  --accent-ink: #FFFFFF;
  --accent-soft: #FFE8D9;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 10px 28px rgba(60, 40, 20, .08);
  --shadow-pin: 0 1px 2px rgba(40, 25, 10, .25), 0 4px 10px rgba(40, 25, 10, .22);
  /* Party type colours: marker rings, cluster rings, chips */
  --jump: #E5484D;
  --games: #7C5CDB;
  --sports: #2F7FD8;
  --nature: #2E9E57;
  --arts: #E8930C;
  --learn: #0E9AAE;
  --font-display: "Fredoka", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --panel-w: 384px;
  --ctrl-icon-filter: none;
  --danger: #B42318;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16130F;
    --surface: #211D18;
    --surface-2: #2A241E;
    --ink: #F4EDE5;
    --muted: #B5AB9F;
    --line: #3A332B;
    --accent: #FF8A4C;
    --accent-ink: #1C0F06;
    --accent-soft: #3A2416;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .3);
    --shadow-pin: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .45);
    --jump: #FF6B70;
    --games: #A08BFF;
    --sports: #5BA3F5;
    --nature: #4CC27A;
    --arts: #FFB13D;
    --learn: #2BC4D6;
    --ctrl-icon-filter: invert(1) brightness(.92);
    --danger: #FF8A80;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16130F;
  --surface: #211D18;
  --surface-2: #2A241E;
  --ink: #F4EDE5;
  --muted: #B5AB9F;
  --line: #3A332B;
  --accent: #FF8A4C;
  --accent-ink: #1C0F06;
  --accent-soft: #3A2416;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .3);
  --shadow-pin: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 12px rgba(0, 0, 0, .45);
  --jump: #FF6B70;
  --games: #A08BFF;
  --sports: #5BA3F5;
  --nature: #4CC27A;
  --arts: #FFB13D;
  --learn: #2BC4D6;
  --ctrl-icon-filter: invert(1) brightness(.92);
  --danger: #FF8A80;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.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; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ Top bar --- */
.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: var(--accent-soft); }
.brand-mark svg { width: 24px; height: 24px; stroke: var(--accent-soft); stroke-width: 1.4; }
.brand-text { font: 500 19px/1.05 var(--font-display); letter-spacing: -.005em; }
.brand-text b { font-weight: 600; color: var(--accent); }

.search { position: relative; flex: 1 1 auto; max-width: 560px; display: flex; align-items: center; }
.search-icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%;
  height: 46px;
  padding: 0 52px 0 44px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1 var(--font-body);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input::placeholder { color: var(--muted); font-weight: 400; }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input::-webkit-search-cancel-button { display: none; }
.icon-btn {
  position: absolute; right: 5px;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn.is-busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.suggest .group { padding: 8px 12px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.suggest .hint { padding: 10px 12px; color: var(--muted); }
.suggest [role="option"] {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.suggest [role="option"] svg { width: 18px; height: 18px; color: var(--muted); }
.suggest [role="option"] .s-logo { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; background: #fff; flex: none; }
.suggest [role="option"] .s-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest [role="option"] .s-meta { flex: none; font-size: 13px; color: var(--muted); }
.suggest [role="option"][aria-selected="true"], .suggest [role="option"]:hover { background: var(--accent-soft); }
.suggest mark { background: none; color: var(--accent); font-weight: 700; }

.tagline { margin: 0 0 0 auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.tagline b { color: var(--ink); font-weight: 700; }
.contact-btn {
  display: inline-flex; align-items: center; gap: 7px;
  flex: none;
  height: 40px;
  padding: 0 16px 0 13px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.contact-btn svg { width: 18px; height: 18px; color: var(--accent); }
.contact-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------ Filters --- */
.filters { position: relative; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.chips {
  display: flex; gap: 8px; padding: 10px 20px; overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  flex: none;
  height: 34px;
  padding: 0 13px 0 10px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
}
.chip svg { width: 18px; height: 18px; color: var(--c, var(--accent)); }
.chip .count { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--c, var(--accent)); }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--c, var(--accent)) 14%, var(--surface)); border-color: var(--c, var(--accent)); }
.chip[aria-pressed="false"] { opacity: .62; }
.chip[aria-pressed="false"] svg { color: var(--muted); }
.chip.all { --c: var(--accent); padding-left: 13px; }

/* ------------------------------------------------------------- Layout --- */
.layout { position: relative; display: grid; grid-template-columns: var(--panel-w) minmax(0, 1fr); min-height: 0; }
.map-wrap { position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--bg); }

/* -------------------------------------------------------------- Panel --- */
.panel {
  position: relative;
  z-index: 10;
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sheet-handle { display: none; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font: 600 21px/1.2 var(--font-display); text-wrap: balance; }
.panel-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.clear-btn {
  display: inline-flex; align-items: center; gap: 4px;
  flex: none;
  height: 32px; padding: 0 12px 0 8px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
}
.clear-btn svg { width: 16px; height: 16px; }
.clear-btn:hover { border-color: var(--accent); color: var(--accent); }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px 20px; }
.results { margin: 0; padding: 0; list-style: none; }
.panel-note { margin: 10px 12px 0; color: var(--muted); font-size: 13.5px; }
.panel-note:empty { display: none; }
.panel-foot { margin: 18px 12px 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.panel-foot p { margin: 0 0 6px; }
.panel-foot a, .link-btn { color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.panel-foot a:hover, .link-btn:hover { color: var(--accent); }
.link-btn { padding: 0; border: 0; background: none; font-size: inherit; cursor: pointer; }

.result {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px;
  border: 0; border-radius: 14px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.result:hover, .result.is-hot { background: var(--surface-2); }
.result.is-active { background: var(--accent-soft); }
.result-logo {
  position: relative;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  flex: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--c);
  overflow: hidden;
}
.result-logo img { width: 30px; height: 30px; object-fit: contain; }
.result-logo svg { width: 24px; height: 24px; color: var(--c); }
.result-logo.no-logo { background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.result-text { flex: 1; min-width: 0; }
.result-name { display: block; font-weight: 700; font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-dist { flex: none; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.city-row .result-logo { background: var(--accent-soft); box-shadow: none; color: var(--accent); font: 600 14px/1 var(--font-display); }
.city-row .result-dist { font-weight: 500; }

/* ------------------------------------------------------------ Markers --- */
.pin {
  --c: var(--accent);
  position: relative;
  display: block;
  width: 40px; height: 48px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: transform .15s ease;
}
.pin-badge {
  position: absolute; top: 0; left: 0;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px var(--c), var(--shadow-pin);
  overflow: hidden;
}
.pin::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 12px; height: 12px;
  margin-left: -6px;
  background: var(--c);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.pin img { width: 28px; height: 28px; object-fit: contain; }
.pin .pin-badge svg { width: 22px; height: 22px; color: var(--c); }
.pin img.logo-sm, .result-logo img.logo-sm { width: 18px; height: 18px; }
.card-logo img.logo-sm { width: 24px; height: 24px; }
.pin.no-logo .pin-badge { background: color-mix(in srgb, var(--c) 12%, #fff); }
.pin:hover, .pin.is-hot { transform: scale(1.18); z-index: 5; }
.pin.is-active { transform: scale(1.28); z-index: 6; }
.pin.is-active .pin-badge { box-shadow: 0 0 0 3px var(--c), 0 0 0 7px color-mix(in srgb, var(--c) 30%, transparent), var(--shadow-pin); }
.maplibregl-marker:has(.pin:hover), .maplibregl-marker:has(.pin.is-hot), .maplibregl-marker:has(.pin.is-active) { z-index: 3; }

.t-jump { --c: var(--jump); }
.t-games { --c: var(--games); }
.t-sports { --c: var(--sports); }
.t-nature { --c: var(--nature); }
.t-arts { --c: var(--arts); }
.t-learn { --c: var(--learn); }

.cluster {
  display: grid; place-items: center;
  padding: 0; border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 2px 5px rgba(40, 25, 10, .28));
}
/* The marker element's own transform is MapLibre's positioning, so animate the inner SVG. */
.cluster svg { width: 100%; height: 100%; display: block; overflow: visible; transition: transform .15s ease; }
.cluster:hover svg { transform: scale(1.1); }
.cluster text { font: 700 13px/1 var(--font-body); fill: var(--ink); stroke: none; }

.search-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid #fff;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent), var(--shadow-pin);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse { to { box-shadow: 0 0 0 18px transparent, var(--shadow-pin); } }

/* ------------------------------------------------------------- Popups --- */
.maplibregl-popup { max-width: 320px !important; }
.maplibregl-popup-content {
  padding: 0;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  font: 400 14px/1.45 var(--font-body);
  overflow: hidden;
}
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--surface); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }
.maplibregl-popup-close-button {
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 999px;
  font-size: 20px; line-height: 1;
  color: var(--muted);
}
.maplibregl-popup-close-button:hover { background: var(--surface-2); color: var(--ink); }
.card-top { display: flex; gap: 12px; padding: 16px 44px 12px 16px; border-top: 5px solid var(--c); }
.card-logo { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
.card-logo img { width: 38px; height: 38px; object-fit: contain; }
.card-logo svg { width: 28px; height: 28px; color: var(--c); }
.card-logo.no-logo { background: color-mix(in srgb, var(--c) 14%, var(--surface)); box-shadow: none; }
.card-name { margin: 0; font: 600 17px/1.2 var(--font-display); text-wrap: balance; }
.card-cat { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.3; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 16px 10px; }
.card-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 13%, var(--surface));
  color: var(--ink);
  font-size: 12.5px; font-weight: 600;
}
.card-badge svg { width: 15px; height: 15px; color: var(--c); }
.card-list { margin: 0; padding: 0 16px; list-style: none; }
.card-list li { display: flex; gap: 9px; padding: 5px 0; align-items: flex-start; }
.card-list svg { width: 17px; height: 17px; margin-top: 1px; color: var(--muted); }
.card-list a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.card-list a:hover { color: var(--accent); text-decoration: underline; }
.card-list .muted { color: var(--muted); }
.card-note { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.card-actions { display: flex; gap: 8px; padding: 12px 16px 0; }
.card-fine { margin: 0; padding: 10px 16px 14px; color: var(--muted); font-size: 12px; text-align: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  flex: 1;
  height: 38px;
  border: 0;
  border-radius: 999px;
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border: 1.5px solid var(--line); background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------ Contact dialog --- */
.contact {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(30, 18, 8, .28);
  overflow: auto;
  overscroll-behavior: contain;
}
.contact::backdrop { background: rgba(33, 24, 16, .48); }
.contact[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.contact-form, .contact-done { padding: 22px 24px 22px; }
.contact-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contact-head h2 { margin: 0; font: 600 24px/1.2 var(--font-display); }
.contact-close {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-right: -8px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  cursor: pointer;
}
.contact-close:hover { background: var(--surface-2); color: var(--ink); }
.contact-lede { margin: 6px 0 4px; color: var(--muted); font-size: 14.5px; }
.field { margin-top: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.45 var(--font-body);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent); }
.field-error { margin: 6px 0 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-status { margin: 14px 0 0; font-size: 14px; }
.contact-status:empty { display: none; }
.contact-status.is-error { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); font-weight: 600; }
.contact-status.is-error a { color: inherit; }
.contact-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.contact-actions .btn, .contact-done .btn { flex: 0 0 auto; height: 44px; padding: 0 20px; font-size: 15px; }
.contact-actions .btn-primary:disabled { opacity: .65; cursor: progress; filter: none; }
.contact-privacy { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; text-align: right; }
.contact-privacy a { color: var(--muted); font-weight: 600; }
.contact-done { text-align: center; padding-top: 32px; padding-bottom: 28px; }
.contact-done:focus { outline: none; }
.done-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.done-icon svg { width: 30px; height: 30px; stroke-width: 2.6; }
.contact-done h2 { margin: 16px 0 6px; font: 600 22px/1.25 var(--font-display); text-wrap: balance; }
.contact-done p { margin: 0 0 22px; color: var(--muted); overflow-wrap: anywhere; }
.contact-done b { color: var(--ink); }

/* -------------------------------------------------------- Map overlays --- */
.jump-to {
  position: absolute; left: 12px; bottom: 34px; z-index: 5;
  display: flex; gap: 6px;
}
.jump-to button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.jump-to button svg { width: 16px; height: 16px; color: var(--accent); }
.jump-to button:hover { border-color: var(--accent); color: var(--accent); }
.map-status {
  position: absolute; left: 50%; top: 14px; z-index: 5;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow);
  pointer-events: none;
  transition: opacity .2s;
}
.map-status:empty { opacity: 0; }
.maplibregl-ctrl-group { border-radius: 12px !important; overflow: hidden; background: var(--surface) !important; box-shadow: var(--shadow) !important; }
.maplibregl-ctrl-group button { width: 36px; height: 36px; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
.maplibregl-ctrl-group button:not(:disabled):hover { background: var(--surface-2) !important; }
.maplibregl-ctrl .maplibregl-ctrl-icon, .maplibregl-ctrl-attrib-button { filter: var(--ctrl-icon-filter); }
.maplibregl-ctrl.maplibregl-ctrl-attrib { background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--muted); }
.maplibregl-ctrl-attrib a { color: var(--muted) !important; }
.noscript { position: fixed; inset: auto 20px 20px; padding: 16px; background: var(--surface); border-radius: 12px; }

/* --------------------------------------------- Text pages (privacy, 404) --- */
body.page { display: block; height: auto; min-height: 100vh; overflow: auto; }
.page .topbar { position: sticky; top: 0; }
.back-link { margin-left: auto; font-weight: 700; font-size: 14px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.doc { max-width: 720px; margin: 0 auto; padding: 40px 24px 64px; font-size: 16.5px; line-height: 1.65; }
.doc h1 { margin: 0 0 6px; font: 600 clamp(30px, 5vw, 40px)/1.15 var(--font-display); }
.doc h2 { margin: 34px 0 8px; font: 600 21px/1.3 var(--font-display); }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .updated { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.doc .lede { font-size: 18px; color: var(--muted); }
.doc-center { text-align: center; padding-top: 12vh; }
.doc-center .btn { flex: none; height: 46px; padding: 0 22px; margin-top: 18px; }

/* City pages (written by build/build.py) */
.crumbs { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.crumbs a, .doc-foot a { color: var(--muted); font-weight: 600; }
.crumbs a:hover, .doc-foot a:hover { color: var(--accent); }
.doc .city-cta { flex: none; height: 46px; padding: 0 22px; font-size: 15px; }
.doc .venues { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.doc .venue { margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.venue-head { display: flex; align-items: center; gap: 14px; }
.doc .venue-name { margin: 0; font: 600 19px/1.25 var(--font-display); text-wrap: balance; }
.venue-num { color: var(--accent); }
.doc .venue-cat { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.doc .venue-info { margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.5; }
.doc .venue-info li { display: flex; gap: 10px; margin: 5px 0 0; }
.venue-info svg { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); }
.venue-info a { overflow-wrap: anywhere; }
.doc .venue-also { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.doc .note { margin: 20px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 14.5px; }
.doc .city-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.doc .city-pills li { margin: 0; }
.city-pills a { display: inline-flex; align-items: center; height: 36px; padding: 0 15px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.city-pills a:hover { border-color: var(--accent); color: var(--accent); }
.doc .doc-foot { margin: 40px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.states { margin-top: 32px; columns: 3 140px; column-gap: 32px; }
.state { break-inside: avoid; margin: 0 0 22px; }
.doc .state h2 { margin: 0 0 4px; font-size: 18px; }
.doc .state ul { margin: 0; padding: 0; list-style: none; }
.doc .state li { margin: 2px 0; }
.state a { font-weight: 600; text-decoration: none; }
.state a:hover { text-decoration: underline; }

/* ------------------------------------------------------------- Mobile --- */
@media (max-width: 1020px) {
  .tagline { display: none; }
  .contact-btn { margin-left: auto; }
  :root { --panel-w: 340px; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-text { font-size: 17px; }
  .search { flex-basis: 100%; max-width: none; order: 3; }
  .contact-btn { height: 36px; padding: 0 13px 0 11px; font-size: 13.5px; }
  .contact { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .contact-form, .contact-done { padding: 18px 18px 18px; }
  .contact-actions .btn { flex: 1; }
  .contact-privacy { text-align: center; }
  .search input { height: 44px; }
  .chips { padding: 8px 16px; }
  .layout { grid-template-columns: 1fr; }
  .map-wrap { grid-row: 1; grid-column: 1; }
  .panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 46%;
    border-right: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 28px rgba(40, 25, 10, .16);
    transition: height .25s ease;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel.is-collapsed { height: 92px; }
  .panel.is-collapsed .panel-body { visibility: hidden; }
  .sheet-handle {
    display: block;
    position: absolute; top: 0; left: 0; right: 0;
    height: 26px;
    border: 0; background: none; cursor: pointer;
  }
  .sheet-handle::before {
    content: "";
    position: absolute; top: 9px; left: 50%;
    width: 40px; height: 5px; margin-left: -20px;
    border-radius: 999px;
    background: var(--line);
  }
  .panel-head { padding: 22px 16px 10px; }
  .panel-title { font-size: 18px; }
  .panel-sub { font-size: 13px; }
  .jump-to { top: 10px; bottom: auto; left: 10px; }
  .jump-to button { height: 30px; padding: 0 10px; font-size: 12.5px; }
  .map-status { top: 50px; max-width: calc(100% - 32px); text-align: center; }
  .maplibregl-ctrl-bottom-right { bottom: 46%; }
  body.sheet-collapsed .maplibregl-ctrl-bottom-right { bottom: 92px; }
  .doc .venue { padding: 14px; }
  .doc .venue-name { font-size: 17.5px; }
}

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