:root {
  --bg: #f6f7f5;
  --panel: #ffffff;
  --panel-2: #f0f3ef;
  --text: #17201b;
  --muted: #5d6b63;
  --line: #dde3de;
  --accent: #0b6b3a;
  --accent-ink: #ffffff;
  --accent-soft: #e2f1e8;
  --live: #d9342b;
  --soon: #0b8a47;
  --today: #58a877;
  --later: #7b8a9a;
  --past: #b9c2bc;
  --approx: #b7791f;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 6px 24px rgb(0 0 0 / .10);
  --radius: 12px;
  --panel-w: 400px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1411;
    --panel: #161d19;
    --panel-2: #1e2722;
    --text: #e6ece8;
    --muted: #9aa8a0;
    --line: #2b3630;
    --accent: #37b36b;
    --accent-ink: #06150c;
    --accent-soft: #1d3527;
    --later: #8d9bab;
    --past: #4d5751;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 6px 24px rgb(0 0 0 / .4);
    color-scheme: dark;
  }
  .leaflet-tile-pane { filter: brightness(.82) contrast(1.05) saturate(.85); }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
html { accent-color: var(--accent); caret-color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.panel, .matches, .club-results, .pop ol { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
h1 .mark { width: 22px; height: 22px; margin-right: 7px; vertical-align: -4px; color: var(--accent); }
/* External links carry a drawn arrow instead of a ↗ character. */
.pop a[target="_blank"]::after {
  content: ""; display: inline-block; width: .75em; height: .75em; margin-left: 3px; vertical-align: -1px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2h6v6M10 2 2.5 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2h6v6M10 2 2.5 9.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.app { position: fixed; inset: 0; display: flex; }

/* ---------- panel ---------- */
.panel {
  width: var(--panel-w);
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-right: 1px solid var(--line);
  z-index: 1000;
  min-height: 0;
  overflow-y: auto; /* only kicks in when unfolded filters leave the list too little room */
}
.brand { padding: 14px 16px 8px; border-bottom: 1px solid var(--line); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h1 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
.tagline { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.sheet-handle { display: none; }

.filters { padding: 12px 16px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.more-filters { display: grid; gap: 10px; }
.fold {
  display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel-2); cursor: pointer; font-size: 13.5px; text-align: left;
}
.fold .chev { flex: none; color: var(--muted); transition: transform .15s ease; }
.fold[aria-expanded="true"] .chev { transform: rotate(180deg); }
.fold-title { font-weight: 700; flex: none; }
.fold .badge { flex: none; }
.fold-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.filters .row.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.checks .btn-link { margin-left: auto; }
select, input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 9px;
  padding: 8px 10px;
  min-height: 36px;
}
.search input { padding-left: 34px; background: var(--panel-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b8a9a' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center; }
select:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* When: Today · Tomorrow · Weekend · 7 days · All */
.segmented.periods button { padding: 7px 2px; font-size: 13px; min-width: 0; }
.segmented.periods button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.chips button {
  flex: none;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 13.5px;
  white-space: nowrap;
}
.chips button small { color: var(--muted); margin-left: 4px; }
.chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips button[aria-pressed="true"] small { color: inherit; opacity: .8; }

.segmented { display: flex; background: var(--panel-2); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 13.5px;
  white-space: nowrap;
}
.segmented button[aria-pressed="true"] { background: var(--panel); box-shadow: 0 1px 3px rgb(0 0 0 / .12); font-weight: 600; }
.segmented button:disabled { opacity: .45; cursor: not-allowed; }
.segmented.small button { font-size: 12.5px; padding: 4px 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}
.btn-ghost { background: transparent; }
.btn-link { border: 0; background: none; color: var(--accent); padding: 4px; font-weight: 500; font-size: 13.5px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.map-controls .btn { border: 0; box-shadow: 0 1px 2px rgb(0 0 0 / .14), 0 3px 10px rgb(0 0 0 / .14); }
.btn-toggle[aria-pressed="true"] { background: var(--live); border-color: var(--live); color: #fff; }
.btn-toggle[aria-pressed="true"] .dot { background: #fff; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; padding: 1px 6px; }
#filtersToggle { display: none; }

/* ---------- list ---------- */
.list-section { flex: 1; min-height: 260px; display: flex; flex-direction: column; }
.list-head { display: flex; gap: 8px; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.matches { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.day-head {
  position: sticky; top: 0; z-index: 1;
  background: var(--panel-2);
  padding: 5px 16px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.match {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 2px 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.match:hover, .match:focus-visible { background: var(--panel-2); outline: none; }
.match .time { font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 5px; }
.match .teams { font-weight: 600; min-width: 0; }
.match .teams span { color: var(--muted); font-weight: 400; }
.match .meta { grid-column: 2 / 4; color: var(--muted); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match .dist { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.match.nolocation { cursor: default; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 5px; vertical-align: 1px; margin-left: 4px; }
.tag.live { background: var(--live); color: #fff; }
.tag.done { background: var(--panel-2); color: var(--muted); }
.tag.off { background: #fde7e6; color: #a1231c; }
.tag.approx { background: #fdf1dc; color: #7a4f0e; }
@media (prefers-color-scheme: dark) {
  .tag.off { background: #3a1715; color: #ffb4ae; }
  .tag.approx { background: #3a2c12; color: #f5c77a; }
}
.empty { padding: 28px 16px; color: var(--muted); text-align: center; display: grid; justify-items: center; gap: 6px; }
.matches .skeleton { height: 46px; margin: 12px 16px; border-radius: 8px; background: var(--panel-2); animation: breathe 1.1s ease-in-out infinite alternate; }
.matches .skeleton:nth-child(2n) { width: 78%; }
@keyframes breathe { from { opacity: .45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .matches .skeleton { animation: none; } }
.more { margin: 10px auto 14px; }

.foot { padding: 10px 16px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.foot p { margin: 0 0 4px; }

/* ---------- map ---------- */
.map-wrap { position: relative; flex: 1; min-width: 0; }
#map { position: absolute; inset: 0; background: var(--bg); }
.map-controls { position: absolute; top: 12px; right: 12px; z-index: 900; display: flex; gap: 8px; }
.legend {
  position: absolute; left: 12px; bottom: 22px; z-index: 900;
  display: grid; gap: 5px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border-radius: 10px; padding: 6px 10px; font-size: 12px; box-shadow: var(--shadow);
}
.legend-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.legend-row.tiers { gap: 3px; }
.legend-label { color: var(--muted); margin-right: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend .tier { font-style: normal; margin: 0; min-width: 18px; }

/* Senior league tiers: gold, silver, bronze, then a blue ramp. */
.tier {
  display: inline-grid; place-items: center;
  min-width: 24px; height: 16px; padding: 0 4px; margin-right: 5px;
  border-radius: 4px; vertical-align: 1px;
  font: 800 11px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .02em;
}
.tier.t1 { background: #e0b12e; color: #2b1d00; }
.tier.t2 { background: #b4bcc4; color: #1c2328; }
.tier.t3 { background: #a2622c; color: #fff; }
.tier.t4 { background: #1d4a93; color: #fff; }
.tier.t5 { background: #2d6bc9; color: #fff; }
.tier.t6 { background: #5a93dc; color: #0d1f38; }
.tier.t7 { background: #8fb6ea; color: #0d1f38; }
.tier.t8 { background: #c6daf4; color: #0d1f38; }
.tier.t9 { background: #5f6b78; color: #fff; }
.tier.tc { background: #7a2e8e; color: #fff; }
.tier.tr { background: #3f6f64; color: #fff; }
.site-icon, .cluster-icon { position: relative; }

/* Crests: 100×56 images with the badge centred, so crop to the middle. */
.crest { width: 18px; height: 18px; object-fit: cover; vertical-align: -4px; margin-right: 5px; }

/* Fixture label beside big-game markers, shown from city zoom (see syncLabels in app.js). */
.venue-label {
  position: absolute; left: calc(100% + 7px); top: 50%; transform: translateY(-50%);
  display: none; align-items: center; gap: 5px;
  max-width: 280px; padding: 3px 6px 3px 5px; border-radius: 7px;
  background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / .28);
  font: 600 12px/1.25 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  white-space: nowrap; letter-spacing: 0;
}
#map.show-labels .venue-label { display: flex; }
.venue-label .fx { overflow: hidden; text-overflow: ellipsis; }
.venue-label .when { color: var(--muted); font-weight: 500; }
.venue-label .when.live { color: var(--live); font-weight: 700; }
.venue-label .crest { width: 16px; height: 16px; margin: 0; flex: none; }
.venue-label .tier { margin: 0; flex: none; }
.venue-label.national { background: #005293; color: #fff; }
.venue-label.national .when { color: #fecc02; }
/* National-team venues: Swedish blue with a gold ring, drawn above everything else. */
.site-icon.national {
  width: 38px; height: 38px; font-size: 14px;
  background: #005293; color: #fecc02; border: 3px solid #fecc02;
  box-shadow: 0 1px 4px rgb(0 0 0 / .35);
}
.site-icon.national.live { animation: pulse-gold 1.8s infinite; }
@keyframes pulse-gold {
  0% { box-shadow: 0 1px 4px rgb(0 0 0 / .35), 0 0 0 0 rgb(254 204 2 / .7); }
  70% { box-shadow: 0 1px 4px rgb(0 0 0 / .35), 0 0 0 14px rgb(254 204 2 / 0); }
  100% { box-shadow: 0 1px 4px rgb(0 0 0 / .35), 0 0 0 0 rgb(254 204 2 / 0); }
}
.cluster-icon.national { border-color: #fecc02; }
.match.national, .pop li.m.national { background: color-mix(in srgb, #005293 10%, var(--panel)); }
.pop li.m.national { padding-left: 8px; margin-left: -8px; }

.tier-filter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 8px; }
.tier-label { font-size: 13.5px; color: var(--muted); }
/* Sweden: blue and gold */
.tier.tn { background: #005293; color: #fecc02; letter-spacing: .04em; }
.tier-chips { grid-column: 1 / -1; grid-row: 2; display: grid; gap: 5px; }
.tier-row { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.tier-row.special { display: flex; flex-wrap: wrap; gap: 5px; }
.tier-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px 0 4px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--panel); cursor: pointer; font-size: 13px;
}
.tier-pill[data-v="0"] { padding-left: 9px; }
.tier-pill .tier { margin: 0; font-style: normal; }
.tier-pill[aria-pressed="false"] { color: var(--muted); text-decoration: line-through; opacity: .6; }
.tier-pill[aria-pressed="false"] .tier { filter: grayscale(1); }
.tier-row > .tier {
  margin: 0; border: 0; cursor: pointer;
  min-width: 0; height: 28px; padding: 0 2px; border-radius: 6px; font-size: 12.5px;
}

.segmented.gender button { padding: 8px; font-size: 14px; }
.segmented.gender button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.tier-row > .tier[aria-pressed="false"] {
  background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line);
  text-decoration: line-through; opacity: .75;
}
.tier-quick { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13px; }
.tier-quick .btn-link { padding: 2px 3px; font-size: 13px; }
.tier.corner {
  position: absolute; top: -7px; right: -9px; margin: 0;
  min-width: 16px; height: 16px; padding: 0 3px; font-size: 11px; border-radius: 4px;
  box-shadow: 0 0 0 1.5px #fff;
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.live { background: var(--live); }
.dot.soon { background: var(--soon); }
.dot.today { background: var(--today); }
.dot.later { background: var(--later); }
.toast {
  position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 950;
  background: var(--text); color: var(--panel); padding: 8px 14px; border-radius: 999px; font-size: 13.5px;
  box-shadow: var(--shadow); max-width: calc(100% - 32px);
}

/* markers */
.site-icon {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 12.5px;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / .35);
}
.site-icon.live { background: var(--live); animation: pulse 1.8s infinite; }
.site-icon.soon { background: var(--soon); }
.site-icon.today { background: var(--today); }
.site-icon.later { background: var(--later); }
.site-icon.past { background: var(--past); }
.site-icon.approx { border-style: dashed; border-color: var(--approx); opacity: .92; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(217 52 43 / .55); }
  70% { box-shadow: 0 0 0 12px rgb(217 52 43 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(217 52 43 / 0); }
}
@media (prefers-reduced-motion: reduce) { .site-icon.live { animation: none; } }
.cluster-icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  font-weight: 700; font-size: 13px; color: #fff;
  border: 3px solid rgb(255 255 255 / .9);
  box-shadow: 0 1px 5px rgb(0 0 0 / .35);
}
.cluster-icon.live { background: var(--live); }
.cluster-icon.soon { background: var(--soon); }
.cluster-icon.today { background: var(--today); }
.cluster-icon.later { background: var(--later); }
.cluster-icon.past { background: var(--past); }
.leaflet-marker-icon.site, .leaflet-marker-icon.cluster { background: none; border: 0; }
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #2f7cf6; border: 3px solid #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .2), 0 1px 4px rgb(0 0 0 / .35); }

/* popups */
.leaflet-popup-content-wrapper { border-radius: var(--radius); background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-content { margin: 12px 14px; width: min(320px, 78vw) !important; font: inherit; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.pop h3 { margin: 0 20px 2px 0; font-size: 16px; }
.pop .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.pop .note { font-size: 12.5px; background: #fdf1dc; color: #7a4f0e; border-radius: 6px; padding: 5px 8px; margin: 6px 0; }
@media (prefers-color-scheme: dark) { .pop .note { background: #3a2c12; color: #f5c77a; } }
.pop ol { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.pop .d { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 0 2px; }
.pop li.m { padding: 6px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 44px 1fr; gap: 0 8px; }
.pop .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.pop .tm { font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.pop .tm span { display: flex; align-items: center; gap: 6px; }
.pop .tm img { flex: none; margin: 0; }
.pop .c { grid-column: 2; color: var(--muted); font-size: 12.5px; }
.pop .c a { white-space: nowrap; }

/* ---------- page switcher ---------- */
.pages { display: flex; gap: 4px; margin: -2px 0 8px; }
.pages a {
  padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); text-decoration: none; background: var(--panel-2);
}
.pages a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- club map ---------- */
.club-app { position: fixed; inset: 0; }
.club-app #map { position: absolute; inset: 0; }
.club-bar {
  position: absolute; top: 12px; left: 12px; z-index: 1000; width: 330px;
  display: grid; gap: 10px; padding: 12px 14px;
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow);
}
.club-bar h1 { margin: 0; }
.club-bar .tagline { margin: -6px 0 0; }
.club-bar .pages { margin: 0; }
.club-search { position: relative; }
.club-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 2;
  list-style: none; margin: 0; padding: 4px; background: var(--panel); border-radius: 10px; box-shadow: var(--shadow);
  max-height: 320px; overflow-y: auto;
}
.club-results li.muted { padding: 8px 10px; }
.club-results button {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border: 0; border-radius: 7px; background: none; cursor: pointer; text-align: left; font-size: 14px;
}
.club-results button:hover, .club-results button:focus-visible { background: var(--panel-2); outline: none; }
.club-results img { width: 22px; height: 22px; object-fit: cover; flex: none; }
.club-results .tier { margin: 0 0 0 auto; }
.club-legend { bottom: 22px; }
.muted { color: var(--muted); }

.club-marker { background: none; border: 0; }
.club-marker img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / .45)); animation: crest-in .25s ease;
  cursor: pointer; transition: transform .12s ease;
}
.club-marker:hover img { transform: scale(1.12); }
@keyframes crest-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .club-marker img { animation: none; transition: none; } }

.club-pop .club-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.club-pop .club-head img { width: 52px; height: 52px; object-fit: cover; flex: none; }
.club-pop .club-head h3 { margin: 0 0 2px; }
.club-pop .sub { margin: 4px 0 0; }
.club-line { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.club-line .k { width: 52px; flex: none; color: var(--muted); font-size: 12.5px; }
.club-games { border-top: 1px solid var(--line); padding-top: 4px; font-size: 13px; }
.club-games ol { list-style: none; margin: 0; padding: 0; }
.club-games li { display: grid; grid-template-columns: 104px 1fr; gap: 0 8px; padding: 4px 0; }
.club-games .w { color: var(--muted); font-variant-numeric: tabular-nums; }
.club-games .f { font-weight: 600; }
.club-games .c { grid-column: 2; color: var(--muted); font-size: 12px; }

/* ---------- mobile: map full screen, panel as a bottom sheet ---------- */
@media (max-width: 820px) {
  .app { display: block; }
  .map-wrap { position: absolute; inset: 0; }
  .panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    width: auto; height: 92dvh;
    border-right: 0; border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgb(0 0 0 / .18);
    /* --sheet-y is set by app.js: peek, half or full, or wherever a drag has it */
    transform: translateY(var(--sheet-y, calc(92dvh - var(--peek, 150px))));
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel.dragging { transition: none; }
  /* The header is the drag handle and stays put while the list scrolls under it. */
  .brand {
    position: sticky; top: 0; z-index: 5; background: var(--panel);
    border-radius: 16px 16px 0 0; touch-action: none; user-select: none; cursor: grab;
  }
  .sheet-handle {
    display: block; width: 100%; height: 26px; margin: -14px 0 0; border: 0; background: none; cursor: grab; position: relative;
  }
  .sheet-handle::after {
    content: ""; position: absolute; left: 50%; top: 10px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: var(--muted); opacity: .45;
  }
  #filtersToggle { display: inline-flex; }
  .segmented.periods button { font-size: 12.5px; }
  /* On phones the whole sheet scrolls as one page: filters, then the list. */
  .panel { overscroll-behavior: contain; }
  .list-section { flex: none; min-height: 0; }
  .matches { overflow: visible; flex: none; }
  .map-wrap { z-index: 0; }
  .leaflet-bottom { bottom: var(--peek, 150px); }
  .map-controls { top: 76px; right: 12px; }
  .legend { top: 12px; bottom: auto; left: 12px; right: 12px; justify-items: center; font-size: 11.5px; }
  .legend-row { gap: 10px; }
  .toast { top: 124px; }
  .leaflet-control-zoom { display: none; }
  /* Phones: one row for page + men/women, search underneath, so popups have room. */
  .club-bar {
    left: 8px; right: 8px; top: 8px; width: auto; padding: 8px 10px; gap: 8px;
    grid-template-columns: auto 1fr; align-items: center;
  }
  .club-bar h1, .club-bar .tagline { display: none; }
  .club-bar .segmented.gender button { padding: 5px 8px; font-size: 13.5px; }
  .club-search { grid-column: 1 / -1; }
  .club-app .leaflet-bottom { bottom: 0; }
  .club-legend { top: auto; bottom: 16px; left: 8px; right: auto; }
}
.tier-label small { font-size: 12px; opacity: .8; }
