/* Runclubs.pro — palette: sky #69a8f1, deep blue #3b62a3, sage #5e8982,
   cream #eee6cb, grey-blue #9fafbe. Dark = deep-blue night, light = cream day. */
:root {
  /* deep-water night: cool blue ramp; cream reserved for display type */
  --bg: #0e1724;
  --surface-lowest: #0a111b;
  --surface-low: #151f2e;
  --surface-container: #182536;
  --surface-high: #223349;
  --surface-highest: #2c405a;
  --outline: #96a9bd;
  --outline-var: #293a50;
  --on-surface: #e6ecf3;
  --on-variant: #93a5b8;
  --volt: #74b1f6;
  --volt-dim: #5d9be0;
  --on-volt: #0a1a2c;
  --volt-tint: rgba(116, 177, 246, 0.14);
  --orange: #63958c;
  --on-orange: #eef5f3;
  --error: #ffb4ab;
  --heading: #f6f1e1;
  --glow: 0 8px 20px -8px rgba(116, 177, 246, 0.45);
  --card-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.55);
  --radius: 16px;
  --radius-lg: 22px;
  --font-display: "Archivo Narrow", "Arial Narrow", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
:root[data-theme="light"] {
  /* warm sand day: parchment ground, deep sea-blue ink and accent */
  --bg: #f3eedf;
  --surface-lowest: #fffef8;
  --surface-low: #eae3cf;
  --surface-container: #fbf8ee;
  --surface-high: #e9e1cb;
  --surface-highest: #dcd3b8;
  --outline: #6b7a8c;
  --outline-var: #d8cfb4;
  --on-surface: #22303f;
  --on-variant: #5a6878;
  --volt: #365e9d;
  --volt-dim: #2d5188;
  --on-volt: #ffffff;
  --volt-tint: rgba(54, 94, 157, 0.12);
  --orange: #4c736c;
  --heading: #182634;
  --error: #ba1a1a;
  --glow: 0 8px 20px -8px rgba(54, 94, 157, 0.35);
  --card-shadow: 0 10px 22px -16px rgba(56, 46, 18, 0.45);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

/* Touch devices: no hover styling — finger-scrolling was lighting up controls */
@media (hover: none) {
  .chip:hover { background: transparent; }
  .chip.active:hover { background: var(--volt); }
  .menu-item:hover { background: none; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  /* room for the fixed app bar */
  padding-top: calc(60px + env(safe-area-inset-top));
}
a { color: var(--volt); }
button { font: inherit; cursor: pointer; }

.ms {
  font-family: "Material Symbols Outlined";
  font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap;
  word-wrap: normal; direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-smoothing: antialiased;
}
.ms.fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

.label {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* ---------------------------------------------------------------- app bar */
.appbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  display: flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 14px 0 16px;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--outline-var);
  transition: transform 0.22s ease;
  will-change: transform;
}
.appbar.hide { transform: translateY(-110%); }
.appbar > * { box-sizing: border-box; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.app-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700;
  letter-spacing: -0.03em; text-transform: uppercase;
  color: var(--heading); text-decoration: none;
}
.app-title .pro { color: var(--volt); }
.btn-theme {
  flex: none; width: 38px; height: 38px; border-radius: 999px;
  background: none; border: none; color: var(--on-variant);
  display: grid; place-items: center;
}
.btn-theme:hover { background: var(--surface-high); color: var(--on-surface); }
.btn-theme .ms { font-size: 21px; }
.appbar .region {
  flex: none;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--on-variant);
  border: 1px solid var(--outline-var); border-radius: 999px;
  padding: 5px 12px; text-decoration: none; white-space: nowrap;
}

/* ---------------------------------------------------------------- menu (FB-style drawer) */
.menu-overlay {
  position: fixed; inset: 0; z-index: 79;
  background: rgba(4, 8, 14, 0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }
.menu {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 80;
  width: min(82vw, 320px);
  background: var(--surface-low);
  border-left: 1px solid var(--outline-var);
  padding: calc(14px + env(safe-area-inset-top)) 10px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 2px;
  transform: translateX(105%);
  transition: transform 0.25s cubic-bezier(0.3, 0.9, 0.3, 1);
  box-shadow: -24px 0 56px -24px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
}
.menu.open { transform: translateX(0); }
.menu-head {
  padding: 12px 14px 12px;
  border-bottom: 1px solid var(--outline-var);
  margin-bottom: 4px;
}
.menu-brand {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--heading);
}
.menu-brand .accent { color: var(--volt); }
.menu-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--on-variant); }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 11px;
  background: none; border: none; text-align: left;
  color: var(--on-surface); text-decoration: none; font-size: 14.5px; font-weight: 500;
}
.menu-item:hover { background: var(--surface-highest); }
.menu-item .ms { font-size: 20px; color: var(--volt-dim); }
.menu-item .ig-icon { flex: none; color: var(--volt-dim); }
.menu-foot {
  margin-top: auto; padding: 14px 14px 4px;
  border-top: 1px solid var(--outline-var);
  font-size: 12.5px; color: var(--on-variant); line-height: 1.5;
}
.menu-foot b { display: block; color: var(--orange); font-weight: 650; }
.menu-foot .copyright {
  display: block; margin-top: 10px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.03em; color: var(--on-variant);
}

/* ---------------------------------------------------------------- shell */
.shell { max-width: 480px; margin: 0 auto; padding: 0 20px calc(48px + env(safe-area-inset-bottom)); }

.intro { padding: 22px 0 10px; }
.intro .brand-h1 { text-transform: none; }
.intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 7.5vw, 42px); font-weight: 700;
  line-height: 1.1; letter-spacing: -0.02em; text-transform: uppercase;
  text-wrap: balance;
}
.intro h1 .accent { color: var(--volt); }
.intro p { margin: 6px 0 0; color: var(--on-variant); font-size: 14px; max-width: 46ch; }

/* ---------------------------------------------------------------- search + chips (sticky) */
.discover {
  position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 30;
  background: var(--bg);
  padding: 14px 20px 2px; margin: 0 -20px;
}
.search-row { display: flex; gap: 10px; margin-bottom: 12px; }
.search-wrap { position: relative; flex: 1; min-width: 0; }
.search-wrap .ms {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--on-variant); font-size: 22px; pointer-events: none;
}
.search {
  width: 100%;
  -webkit-appearance: none; appearance: none;
  background: var(--surface-high);
  border: 1px solid var(--outline-var); border-radius: 999px;
  padding: 11px 16px 11px 46px;
  color: var(--on-surface); font: inherit;
  font-size: 16px; /* ≥16px stops iOS from zooming the page on focus */
}
.search::-webkit-search-cancel-button { -webkit-appearance: none; }
.search::placeholder { color: var(--on-variant); }
.search:focus { outline: none; border-color: var(--volt); }
.btn-locate {
  flex: none; width: 46px; height: 46px; border-radius: 999px;
  background: var(--surface-high); border: 1px solid var(--outline-var);
  color: var(--volt-dim);
  display: grid; place-items: center;
  transition: transform 0.1s ease;
}
.btn-locate:hover { background: var(--surface-highest); }
.btn-locate:active { transform: scale(0.93); }
.btn-locate[disabled] { opacity: 0.5; }
.btn-locate.on { background: var(--volt); border-color: var(--volt); color: var(--on-volt); }

.filters {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border-radius: 999px; padding: 8px 16px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--surface-container); color: var(--on-variant);
  border: 1px solid color-mix(in srgb, var(--outline-var) 70%, transparent);
  transition: transform 0.1s ease;
}
.chip:hover { background: var(--surface-high); }
.chip:active { transform: scale(0.95); }
.chip .ms { font-size: 15px; vertical-align: -3px; margin-right: 4px; }
.chip.active {
  background: var(--volt); border: 2px solid var(--volt);
  color: var(--on-volt); font-weight: 700; padding: 6px 15px;
}

.menu-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--on-variant); padding: 12px 14px 8px;
}
.menu .filters { flex-wrap: wrap; overflow: visible; padding: 0 10px 6px; margin: 0; }
.loc-note {
  display: flex; gap: 6px; align-items: flex-start;
  margin: 0; padding: 2px 14px 10px;
  color: var(--on-variant); font-size: 11.5px; line-height: 1.45;
  border-bottom: 1px solid var(--outline-var);
}
.loc-note .ms { flex: none; font-size: 14px; margin-top: 1px; color: var(--volt-dim); }
.loc-note[hidden] { display: none; }

/* ---------------------------------------------------------------- radius slider */
.range-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 2px 10px;
}
.range-bar .ms { flex: none; font-size: 19px; color: var(--volt-dim); }
.range-bar input[type="range"] {
  flex: 1; min-width: 0;
  accent-color: var(--volt);
}
#radius-label { flex: none; min-width: 56px; text-align: right; color: var(--on-surface); }

/* ---------------------------------------------------------------- list bar */
.listbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0 12px;
}
.listbar .count { color: var(--on-variant); }

/* ---------------------------------------------------------------- cards */
.club-list { display: flex; flex-direction: column; gap: 16px; }
.club-card {
  width: 100%; text-align: left;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--surface-high) 42%, var(--surface-container)) 0%,
    var(--surface-container) 100%);
  border: 1px solid color-mix(in srgb, var(--outline-var) 80%, transparent);
  border-radius: var(--radius-lg);
  padding: 16px 16px 14px;
  color: var(--on-surface);
  display: grid; gap: 5px;
  overflow: hidden; min-width: 0;
  box-shadow: var(--card-shadow);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
/* Cards are pure tap targets: no hover/press/focus state ever distinguishes them */
.club-card:focus, .club-card:focus-visible, .club-card:active { outline: none; }
.club-card .head { display: flex; align-items: flex-start; gap: 12px; }
.club-card h3 {
  margin: 0; flex: 1; min-width: 0;
  font-family: var(--font-display);
  font-size: 21px; font-weight: 600; line-height: 1.15;
  text-transform: uppercase; color: var(--heading);
}
.club-card .sched {
  flex: 0 1 auto; max-width: 45%;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.6;
  color: var(--volt); text-align: right; overflow-wrap: break-word;
  background: var(--volt-tint);
  border-radius: 10px; padding: 3px 9px;
  align-self: flex-start;
}
.club-card .meta { color: var(--on-variant); font-size: 14px; margin: 2px 0 0; }
.club-card .addr {
  display: flex; gap: 6px; align-items: center; min-width: 0;
  color: var(--on-variant); font-size: 13px; margin: 2px 0 0;
}
.club-card .addr .ms { flex: none; font-size: 15px; color: var(--volt-dim); }
/* one clean line — the full address lives in the details sheet */
.club-card .addr .addr-text {
  min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.club-card .foot {
  display: flex; align-items: center; gap: 12px;
  border-top: 1px solid color-mix(in srgb, var(--outline-var) 55%, transparent);
  margin-top: 11px; padding-top: 11px;
}
/* stats wrap onto new lines — the card grows taller, never wider */
.club-card .stats { flex: 1; display: flex; flex-wrap: wrap; gap: 6px 16px; min-width: 0; }
.club-card .btn-pill { align-self: flex-end; }
.stat { display: flex; align-items: center; gap: 5px; }
.stat .ms { font-size: 16px; color: var(--volt-dim); }
.stat .ig-icon { flex: none; color: var(--volt-dim); }
.stat { min-width: 0; }
.stat b {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.02em;
}
.stat b small { font-size: 9px; margin-left: 1px; }
.btn-pill {
  flex: none;
  background: var(--volt-tint);
  border: none; color: var(--volt);
  border-radius: 999px; padding: 8px 16px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.empty-state { padding: 44px 16px; text-align: center; color: var(--on-variant); font-size: 14px; }

/* ---------------------------------------------------------------- map */
/* position+z-index isolate Leaflet's internal z-indexes (up to ~800) so the
   map never paints over the sticky header, bottom nav, or sheets. */
#map-wrap { display: none; position: relative; z-index: 0; }
#map-wrap.visible { display: block; }
#map {
  height: min(64dvh, 580px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline-var);
  background: var(--surface-container);
}

/* Map view: full-bleed map between app bar and bottom nav; chips + count float on top */
body.map-view { overflow: hidden; }
body.map-view #map-wrap.visible {
  position: fixed; z-index: 10;
  top: calc(60px + env(safe-area-inset-top));
  bottom: 0;
  left: 0; right: 0;
}
body.map-view #map {
  width: 100%; height: 100%;
  border: none; border-radius: 0;
}
body.map-view .range-bar {
  position: fixed; z-index: 20;
  top: calc(60px + env(safe-area-inset-top) + 10px);
  left: 14px; right: 14px;
  background: var(--surface-high);
  border: 1px solid var(--outline-var);
  border-radius: 999px;
  padding: 9px 16px;
}
body.map-view .listbar { display: none; }
.leaflet-container { font-family: var(--font-body); background: var(--surface-low); }
/* OSM tiles are light; invert them for the dark theme (fully open-source stack) */
:root[data-theme="dark"] #map .leaflet-tile {
  filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9) saturate(0.6);
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--surface-high); color: var(--on-surface);
  border-radius: 12px;
}
.leaflet-popup-content { margin: 12px 16px; }
.map-popup b {
  display: block; margin-bottom: 2px;
  font-family: var(--font-display); text-transform: uppercase;
  font-size: 15px; letter-spacing: 0.01em;
}
.map-popup span { font-family: var(--font-mono); font-size: 11px; color: var(--on-variant); text-transform: uppercase; }
.map-popup button {
  display: block; margin-top: 8px; border: none; border-radius: 999px;
  background: var(--volt); color: var(--on-volt);
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 14px;
}

/* ---------------------------------------------------------------- detail sheet */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 7, 7, 0.65);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  max-width: 480px; margin: 0 auto;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--surface-highest) 30%, var(--surface-high)) 0%,
    var(--surface-high) 120px);
  border: 1px solid var(--outline-var); border-bottom: none;
  border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform 0.25s cubic-bezier(0.3, 0.9, 0.3, 1);
  max-height: 84dvh; overflow-y: auto;
}
.sheet.open { transform: translateY(0); }
.sheet-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--volt-tint); color: var(--volt); border: none;
  margin: 2px 0 10px;
}
.sheet-back .ms { font-size: 20px; }
.sheet .grab {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--outline-var); margin: 4px auto 16px;
}
.sheet h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700; line-height: 1.1;
  text-transform: uppercase; color: var(--heading);
}
.sheet .hood { color: var(--on-variant); font-size: 14px; margin: 4px 0 14px; }
.sheet .stat-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--outline-var);
  border-bottom: 1px solid var(--outline-var);
  margin-bottom: 16px;
}
.sheet .stat-grid > div {
  padding: 12px 10px; display: grid; gap: 3px;
}
.sheet .stat-grid > div + div { border-left: 1px solid color-mix(in srgb, var(--outline-var) 55%, transparent); }
.sheet .stat-grid .label { color: var(--on-variant); font-size: 10px; }
.sheet .stat-grid b {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  color: var(--heading); overflow-wrap: anywhere;
}
.sheet .desc { font-size: 15px; margin: 0 0 16px; color: var(--on-surface); }
.sheet .meta-row {
  display: flex; gap: 12px; align-items: center;
  padding: 11px 0; border-top: 1px solid color-mix(in srgb, var(--outline-var) 55%, transparent);
  font-size: 14px;
}
.sheet .meta-row .ms { flex: none; font-size: 20px; color: var(--volt-dim); }
.sheet .meta-row .ig-icon { flex: none; color: var(--volt-dim); }
.sheet .meta-row a { word-break: break-all; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn-main {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--volt) 0%, var(--volt-dim) 100%);
  color: var(--on-volt);
  border: none; border-radius: 999px; padding: 13px 18px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none;
  box-shadow: var(--glow);
  transition: transform 0.1s ease;
}
.sheet-actions .btn-main:active { transform: scale(0.96); }
.sheet-actions .btn-ghost {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--on-surface);
  border: 1px solid var(--outline-var); border-radius: 999px; padding: 13px 20px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.sheet-actions .btn-ghost:hover { background: var(--surface-highest); }

/* ---------------------------------------------------------------- FAB */
.fab {
  position: fixed; right: 20px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 45;
  width: 56px; height: 56px; border-radius: 999px;
  background: var(--volt); color: var(--on-volt); border: none;
  display: grid; place-items: center; text-decoration: none;
  box-shadow: var(--glow);
  transition: transform 0.1s ease;
}
.fab:active { transform: scale(0.93); }
.fab .ms { font-size: 30px; }

/* ---------------------------------------------------------------- bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; justify-content: space-evenly; align-items: center; gap: 4px;
  padding: 3px 8px calc(4px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface-container) 80%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--outline-var);
  transition: transform 0.22s ease;
  will-change: transform;
}
.bottomnav.hide { transform: translateY(110%); }
.navitem {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 84px; padding: 4px 12px; border-radius: 999px;
  background: none; border: none;
  color: var(--on-variant); text-decoration: none;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap;
  transition: transform 0.1s ease;
}
.navitem:active { transform: scale(0.92); }
.navitem.active { background: var(--volt-tint); color: var(--volt); font-weight: 700; }
.navitem .ms { font-size: 20px; }

/* ---------------------------------------------------------------- coming soon */
.soon-card {
  margin-top: 24px;
  background: var(--surface-container);
  border: 1px solid var(--outline-var); border-left: 4px solid var(--orange);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.soon-card h3 {
  margin: 0 0 4px;
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  text-transform: uppercase; color: var(--heading);
}
.soon-card p { margin: 0; color: var(--on-variant); font-size: 14px; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  padding: 32px 0 8px;
  text-align: center; color: var(--on-variant);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.site-footer a { color: var(--on-variant); }

/* ---------------------------------------------------------------- forms (submit page) */
.form-page h1 {
  margin: 24px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 7.5vw, 42px); font-weight: 700;
  line-height: 1.1; letter-spacing: -0.02em; text-transform: uppercase;
  text-wrap: balance;
}
.form-page h1 .accent { color: var(--volt); }
.form-page .lede { color: var(--on-variant); font-size: 15px; margin: 0 0 24px; max-width: 48ch; }
.club-form { display: grid; gap: 16px; }
.field label {
  display: block; margin-bottom: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--on-variant);
}
.field input, .field textarea {
  width: 100%;
  -webkit-appearance: none; appearance: none;
  background: var(--surface-high);
  border: 1px solid var(--outline-var); border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--on-surface); font: inherit;
  font-size: 16px; /* ≥16px stops iOS from zooming the page on focus */
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--on-variant) 60%, transparent); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--volt); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field .select {
  width: 100%;
  -webkit-appearance: none; appearance: none;
  background: var(--surface-high);
  border: 1px solid var(--outline-var); border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--on-surface); font: inherit; font-size: 16px;
}
.field .select:focus { outline: none; border-color: var(--volt); }
.form-section {
  margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--outline-var);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--volt-dim);
}
.form-note { font-size: 13px; color: var(--on-variant); margin: 0; }
.btn-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--volt) 0%, var(--volt-dim) 100%);
  color: var(--on-volt);
  border: none; border-radius: 999px; padding: 14px 20px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  box-shadow: var(--glow);
  transition: transform 0.1s ease;
}
.btn-submit:active { transform: scale(0.97); }
.btn-submit[disabled] { opacity: 0.6; }
.form-status { min-height: 20px; font-size: 14px; font-weight: 600; }
.form-status.err { color: var(--error); }
.submit-success {
  display: none;
  background: var(--surface-container);
  border: 1px solid var(--outline-var); border-left: 4px solid var(--volt);
  border-radius: var(--radius-lg); padding: 24px 22px; margin-top: 24px;
}
.submit-success.visible { display: block; }
.submit-success h2 {
  margin: 0 0 6px;
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  text-transform: uppercase; color: var(--heading);
}
.submit-success p { margin: 0; color: var(--on-variant); font-size: 14.5px; }

/* ---------------------------------------------------------------- update + pull-to-refresh */
.update-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 70;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--volt); color: var(--on-volt); border: none;
  border-radius: 999px; padding: 11px 18px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
  box-shadow: var(--glow);
}
.update-bar[hidden] { display: none; }
.update-bar .ms { font-size: 18px; }

.ptr {
  position: fixed; left: 50%; top: calc(52px + env(safe-area-inset-top)); z-index: 65;
  width: 40px; height: 40px; margin-left: -20px;
  border-radius: 999px; display: grid; place-items: center;
  background: var(--surface-high); border: 1px solid var(--outline-var);
  color: var(--on-variant);
  /* fully off-screen AND invisible unless a pull is in progress — the
     auto-hiding app bar used to expose a sliver of this circle */
  transform: translateY(-130px);
  visibility: hidden;
  transition: transform 0.15s ease;
  pointer-events: none;
}
.ptr.pulling { visibility: visible; }
.ptr .ms { font-size: 20px; transition: transform 0.15s ease; }
.ptr.ready { color: var(--on-volt); background: var(--volt); border-color: var(--volt); }
.ptr.ready .ms { transform: rotate(180deg); }
.ptr.spin .ms { animation: ptr-spin 0.8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- prose (terms) */
.prose { padding-bottom: 24px; }
.prose h2 {
  margin: 26px 0 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--volt-dim);
}
.prose p, .prose li { color: var(--on-variant); font-size: 14.5px; margin: 0 0 10px; }
.prose ul { padding-left: 20px; margin: 0 0 10px; }
.prose .updated {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--on-variant);
}

/* Mobile-only product: no tablet/desktop layouts — larger screens simply
   get the same phone-width column, centered. */

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