:root {
  color-scheme: light dark;
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --line: #dde3ee;
  --ink: #16203a;
  --ink-2: #5b6784;
  --ink-3: #636d87;
  --accent: #2f5bd6;
  --accent-ink: #ffffff;
  --here: #1a73e8;          /* you, on the map - not a rink's blue */
  --ring: rgba(47, 91, 214, .28);
  /* Beta has a colour of its own. In the same blue as every other control it read as
     one more control; it is a status. */
  --beta: #a85d16;
  --beta-soft: rgba(168, 93, 22, .12);
  --shadow: 0 1px 2px rgba(16, 26, 51, .06), 0 8px 24px rgba(16, 26, 51, .06);
  --radius: 14px;
}
/* Three theme states: an explicit Light or Dark choice stamps data-theme on <html>,
   and "System" stamps nothing and follows the OS. The media query is guarded so an
   explicit Light choice still wins on a machine set to dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1224;
    --surface: #131c33;
    --surface-2: #18223d;
    --line: #27324f;
    --ink: #eef2fb;
    --ink-2: #a6b1cc;
    --ink-3: #8d97b3;
    --accent: #6d93ff;
    --accent-ink: #0b1224;
    --here: #6ea8ff;
    --ring: rgba(109, 147, 255, .3);
    --beta: #e8a24e;
    --beta-soft: rgba(232, 162, 78, .16);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .32);
  }
}
:root[data-theme="dark"] {
    --bg: #0b1224;
    --surface: #131c33;
    --surface-2: #18223d;
    --line: #27324f;
    --ink: #eef2fb;
    --ink-2: #a6b1cc;
    --ink-3: #8d97b3;
    --accent: #6d93ff;
    --accent-ink: #0b1224;
    --here: #6ea8ff;
    --ring: rgba(109, 147, 255, .3);
    --beta: #e8a24e;
    --beta-soft: rgba(232, 162, 78, .16);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .32);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
/* The scar this file kept reopening - a rule's own `display: flex` beating the [hidden]
   attribute, five times by Nov 2026 - closed once for every element. Nothing on the
   page is meant to show while it carries [hidden] (checked across every mode, Nov
   2026). The per-selector [hidden] rules further down predate this; left in place. */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(14px, 3vw, 28px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 800;
}
.brand { display: flex; align-items: center; gap: 12px; }
/* Generated by tools/make_icons.py from the same geometry as the home-screen icon,
   so the two cannot drift apart. Each line carries its own stroke-width - the spokes
   are thicker than the barbs - so none is set here. */
.brand-mark {
  width: 30px; height: 30px; flex: none;
  fill: none; stroke: var(--accent); stroke-linecap: round;
}
.brand h1 { font-size: 19px; letter-spacing: -.015em; }
.tagline { margin: 1px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* ---------------------------------------------------------------- buttons */
.btn {
  font: inherit; font-weight: 550;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .13s, border-color .13s, color .13s;
}
.btn:hover { border-color: var(--ink-3); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn.ghost { background: transparent; }
.btn.icon { padding: 7px 12px; font-size: 17px; line-height: 1; }
.btn.tiny { padding: 4px 9px; font-size: 12px; }
.btn.seg { border-radius: 0; border-left-width: 0; }
.btn.seg:first-child { border-radius: 10px 0 0 10px; border-left-width: 1px; }
.btn.seg:last-child { border-radius: 0 10px 10px 0; }
.btn.seg.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-right: 6px; vertical-align: 1px;
}
/* Near me while it is on: the button's dot becomes the one on the map. */
#locate.is-on { border-color: var(--here); }
#locate.is-on .dot { background: var(--here); box-shadow: 0 0 0 3px color-mix(in srgb, var(--here) 30%, transparent); }

/* ---------------------------------------------------------------- layout */
main {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px clamp(14px, 3vw, 28px);
  max-width: 1400px; margin: 0 auto;
}
/* `1fr` is `minmax(auto, 1fr)`, and `auto` resolves to min-content — which the
   no-wrap filter row makes as wide as all its chips, blowing the page out sideways
   on a phone. `minmax(0, 1fr)` lets the column actually shrink. */
@media (max-width: 900px) { main { grid-template-columns: minmax(0, 1fr); } }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;   /* panels must be allowed to shrink inside their grid column */
}
/* The map needs its corners clipped; the schedule panel must NOT clip, or
   `position: sticky` stops working for the filter bar and day headers inside it. */
.map-panel { overflow: hidden; }
/* Was a hardcoded 82px, which was only ever right for one viewport: the top bar is
   63.5px at 375px, 72.5px at 1200px, and shorter again in the installed app. */
.map-panel { position: sticky; top: calc(var(--topbar-h, 64px) + 12px); }
@media (max-width: 900px) {
  /* `position: static` hands Leaflet's zoom control (z-index 1000, set by the
     library) straight to the root stacking context, where it paints over the
     pinned bars and steals their taps. `isolation` makes the panel a stacking
     context without touching overflow or position - overflow here would silently
     kill `position: sticky` for the filter bar and every day header. */
  .map-panel { position: static; isolation: isolate; }
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
/* `display: flex` above beats the [hidden] attribute's own `display: none`, the same
   scar as .filters and #date-pop. Without this the learn-to-skate panel keeps its
   collapsible header in the mode where the panel IS the page. */
.panel-head[hidden] { display: none; }

#map { height: 260px; background: var(--surface-2); }
#map.is-hidden { display: none; }

/* ---------------------------------------------------------------- rinks */
.rink-list { list-style: none; margin: 0; padding: 6px; max-height: 340px; overflow-y: auto; }
.rink {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 10px;
  border: 1px solid transparent; background: none; cursor: pointer;
  font: inherit; color: var(--ink);
}
.rink:hover { background: var(--surface-2); }
/* Double-clicking a rink isolates it, and a double-click on text otherwise selects
   the word under the cursor - a flash of highlighted rink name on every use. */
.rink { user-select: none; -webkit-user-select: none; }
.rink.is-on { background: var(--surface-2); border-color: var(--accent); }
.rink:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.rink-name { font-weight: 600; }
.rink-meta { font-size: 12px; color: var(--ink-3); width: 100%; }
/* A closed rink's reason and phone number, under its name: the row wraps. */
.rink-note { font-size: 12px; line-height: 1.35; color: var(--ink-2); width: 100%; }
.map-popup-note { margin-top: 4px; max-width: 240px; font-size: 12px; line-height: 1.35; }
.pill {
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line);
}
.pill.soon { color: #b07b1f; border-color: #e0c286; background: rgba(224, 194, 134, .14); }
/* A rink that is shut, as opposed to one not connected yet. Red rather than amber,
   because it is a fact about the rink and not a gap in this site. */
.pill.shut { color: #a33a33; border-color: #dda6a1; background: rgba(221, 166, 161, .16); }
:root[data-theme="dark"] .pill.shut,
:root:not([data-theme="light"]) .pill.shut { color: #ff9c95; border-color: #6d3a36; background: rgba(255, 156, 149, .12); }
/* A rink still showing its last good schedule because the refresh could not get a
   new one. Amber like "No schedule yet": a gap in this site, not news about the rink,
   so never the red of a closure. Its own class so the reason line under it can be
   told apart from a closure's, and so dark mode can lift the amber, which is too dim
   to read as text on the dark surface. */
.pill.stale { color: #b07b1f; border-color: #e0c286; background: rgba(224, 194, 134, .14); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill.stale { color: #e8b45c; border-color: #6b5426; background: rgba(232, 180, 92, .12); }
}
:root[data-theme="dark"] .pill.stale { color: #e8b45c; border-color: #6b5426; background: rgba(232, 180, 92, .12); }

/* ---------------------------------------------------------------- controls */
.controls {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.date-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* The anchor for the calendar popover on desktop. On a phone this goes back to
   `static` so the fixed dock becomes the containing block instead, which is what
   turns the same popover into an upward-opening sheet with no JS repositioning. */
.date-nav { position: relative; }
.range-heading { font-size: 15px; margin-left: 6px; min-width: 0; }
.view-toggle { display: flex; }
/* The recurring scar in this file: a rule's own `display` beats the `[hidden]`
   attribute's `display: none`, so hiding this in JS did nothing at all. Fourth time. */
.view-toggle[hidden] { display: none; }

/* ------------------------------------------------------- the date trigger */
.date-trigger {
  display: inline-flex; align-items: center; gap: 7px;
  max-width: 100%; min-width: 0;
  font-size: 15px; font-weight: 650;
  padding: 6px 11px;
}
#range-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.caret-down { flex: none; font-size: 10px; color: var(--ink-3); }
/* The bottom row was being missed on a phone - read as browser chrome rather than as
   the date controls. An icon says what it does before the words are read. */
.cal-icon {
  flex: none; width: 15px; height: 15px;
  stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round;
  opacity: .75;
}
.date-trigger[aria-expanded="true"] { border-color: var(--accent); }

/* --------------------------------------------------- the date dock (phone) */
/*
   The reported bug: scroll a phone past the rink picker and the date controls are
   gone, so changing the date means scrolling back up for every single tap. Rather
   than pin a fourth bar to the already 147px-deep top stack, the row leaves the
   flow entirely and welds itself to the bottom - where thumbs already are, and
   where it touches none of the --topbar-h offset the day headers depend on. It also
   hands 114px back to the top of the schedule.

   Deliberately no hide-on-scroll: having to scroll to summon the date controls is
   the bug we came here to fix, with extra steps.
*/
@media (max-width: 900px) {
  #date-dock {
    position: fixed; left: 0; right: 0; bottom: 0;
    /* Above Leaflet's z-1000 zoom control, which escapes into the root stacking
       context here - .map-panel isolates it, but belt and braces on the one bar
       that must always be tappable. */
    z-index: 1200;
    flex-wrap: nowrap; gap: 6px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); border-bottom: 0;
    background: var(--surface);
    box-shadow: 0 -6px 20px rgba(16, 26, 51, .10);
  }
  #date-dock .date-nav { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; gap: 6px; }
  /* The first 44px touch targets in the app; everything else here is 31-33px. */
  #date-dock .btn { min-height: 44px; }
  #date-dock #prev, #date-dock #next { min-width: 40px; padding: 7px 10px; }
  #date-dock .btn.seg { font-size: 13px; padding: 7px 10px; }
  /* Five controls need 355px at 375px wide, which is the entire row - it squeezed
     the date itself down to 54px of text and ellipsised it. Today is the one to
     drop: it is a pure action with no state to read, the calendar sheet carries its
     own Today button, and the app already opens on today. Day/Week stays, because
     hiding the control that says which mode you are in is worse than hiding an
     action you can reach in one more tap. */
  #date-dock #today { display: none; }
  #date-dock .range-heading { flex: 1 1 auto; margin-left: 0; }
  #date-dock .date-trigger { width: 100%; justify-content: space-between; font-size: 14px; }
}
/* Landscape phone: 61px of a 375px-tall viewport is too much to give up. */
@media (max-width: 900px) and (max-height: 520px) {
  #date-dock { padding: 4px 10px calc(4px + env(safe-area-inset-bottom)); }
  #date-dock .btn { min-height: 38px; }
}
html { scroll-padding-bottom: var(--dock-h, 0px); }

/* ------------------------------------------------------------ the calendar */
#date-pop {
  position: absolute; z-index: 1200;
  top: calc(100% + 8px); left: 0; width: 320px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  max-height: calc(100dvh - var(--topbar-h, 64px) - var(--dock-h, 0px) - 24px);
  overflow-y: auto;   /* safe: nothing sticky lives inside or below this node */
}
/* `display: flex/block` beats the [hidden] attribute's default - the same scar the
   .filters rule below was written for, where "hidden" chips left a ghost row. */
#date-pop[hidden] { display: none; }
#date-scrim {
  position: fixed; inset: 0; z-index: 1150;
  background: rgba(11, 18, 36, .45);
}
#date-scrim[hidden] { display: none; }
@media (min-width: 901px) { #date-scrim { display: none; } }

@media (max-width: 900px) {
  .date-nav { position: static; }
  /* Containing block is now the fixed dock, so this is effectively fixed and opens
     upward - which is the only way a ~430px sheet fits above a bottom bar on an
     iPhone SE. A downward popover from a top bar would need 663px.

     max-width matters: the day cells are square (aspect-ratio: 1), so a sheet
     stretched across a 768px tablet gives 105px cells and a 800px-tall calendar.
     Capped and centred, a tablet gets the same calendar a phone does. */
  #date-pop {
    top: auto; bottom: calc(100% + 8px);
    left: 0; right: 0; width: auto;
    max-width: 420px; margin-inline: auto;
  }
}

.cal-topline {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
#cal-month { font-size: 14px; font-weight: 650; }
#date-pop table { width: 100%; border-collapse: collapse; table-layout: fixed; }
#date-pop th {
  font-size: 11px; font-weight: 650; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .04em;
  padding-bottom: 4px;
}
#date-pop td { padding: 1px; }
.cal-day {
  font: inherit; font-size: 13px;
  width: 100%; aspect-ratio: 1; min-height: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid transparent; border-radius: 9px;
  background: none; color: var(--ink); cursor: pointer;
}
.cal-day:hover { background: var(--surface-2); border-color: var(--line); }
.cal-day:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.cal-day.is-other { color: var(--ink-3); opacity: .55; }
.cal-day.is-today { color: var(--accent); font-weight: 750; }
td[aria-selected="true"] .cal-day {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.cal-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
}
td[aria-selected="true"] .cal-dot { background: var(--accent-ink); }
.cal-day.is-empty .cal-dot { background: transparent; }
/* Week view: the whole row is the target, so it has to read as one. */
.wk-head { width: 26px; padding: 1px 2px 1px 0; }
.wk-btn {
  font: inherit; font-size: 10px; font-weight: 700;
  width: 100%; min-height: 40px; padding: 0;
  border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--ink-3); cursor: pointer;
}
.wk-btn:hover { background: var(--surface-2); border-color: var(--line); }
.wk-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
tr.wk-on .wk-btn { color: var(--accent); }
tr:hover .cal-day:not(.is-other) { background: var(--surface-2); }
#cal-help { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-3); }
.cal-foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}
.cal-foot .view-toggle { margin-left: auto; }

/* ------------------------------------------------------------ privacy note */
.privacy-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Inside the sheet now, not pinned under the header, so it neither sticks nor needs
   to stay one row tall. It sits at the foot of the sheet, under the rinks. */
.filter-bar {
  display: flex; align-items: baseline; gap: 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.filters {
  /* Wrapping was wrong while this bar was pinned to the top of a phone screen -
     tall enough to swallow it. In the sheet it is only on screen when you asked for
     it, so every type can be visible at once rather than scrolled sideways past. */
  display: flex; gap: 7px; flex-wrap: wrap;
  flex: 1 1 auto; min-width: 0;
}
/* Tools that belong with the rinks they act on: the map toggle and the ZIP box. In
   the header the ZIP box wrapped the whole bar onto a second row at 375px. */
.sheet-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px 0;
}
.sheet-tools .zip { margin-left: auto; }

.filter-summary {
  flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--ink-3);
  /* Must never wrap: the whole point of collapsing is a shorter sticky bar. */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* A hint of separation once it detaches from the controls above it. */
/* `display: flex` beats the [hidden] attribute's default, so say it explicitly -
   otherwise "hiding" the chips left a 32px ghost row behind. */
.filters[hidden] { display: none; }
/* Fade the trailing edge so it reads as "there is more, scroll me" rather than as
   a chip that got cut off. */
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; }
/* A chip that is showing looks filled and ticked; one that is not looks plainly
   switched off. The old styling made "on" and "off" too similar to read at a glance,
   which is half of why people clicked the wrong one. */
.chip {
  font: inherit; font-size: 13px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-3);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, opacity .12s;
}
.chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.chip:hover { border-color: var(--ink-3); color: var(--ink-2); }
.chip.is-on {
  color: var(--ink);
  border-color: var(--c, var(--accent));
  background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent);
}
.chip .check {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--ink-3); background: transparent;
  font-size: 9px; color: transparent;
}
.chip.is-on .check {
  border-color: var(--c, var(--accent));
  background: var(--c, var(--accent));
  color: #fff;
}
.chip-all.is-on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.filter-label {
  flex: none; font-size: 12px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}

/* ---------------------------------------------------------------- results */
.results { padding: 6px 14px 16px; }
.day-group { margin-top: 14px; }
.day-head {
  display: flex; align-items: baseline; gap: 9px;
  padding: 6px 0 8px; margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  /* Under the top bar and nothing else. This used to add the height of the session-type
     chips, from when they were pinned under the header; they moved into the rink sheet
     and scroll away with it, so with the sheet open the heading stuck 132px down - on a
     desktop and on a phone alike - with the previous day's sessions showing above it. */
  top: var(--topbar-h, 64px);
  background: var(--surface); z-index: 500;
}
.day-head h3 { font-size: 14px; }
.day-head .count { font-size: 12px; color: var(--ink-3); }
.day-head.is-today h3 { color: var(--accent); }

.session {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  gap: 12px; align-items: center;
  padding: 10px 10px; margin: 3px -10px 0;
  border-radius: 10px;
  border-left: 3px solid var(--c);
}
.session:hover { background: var(--surface-2); }
@media (max-width: 620px) {
  .session { grid-template-columns: 1fr auto; }
  .session .when { grid-column: 1 / -1; }
}
.when { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 14px; }
.when .dur { display: block; font-weight: 450; font-size: 11.5px; color: var(--ink-3); }
.what { min-width: 0; }
.what .type { font-weight: 600; }
/* The price. This used to be painted in the session type's own colour, and every one
   of those nine colours lands between 2.9:1 and 4.5:1 as small bold text in one theme
   or the other - readable as a splash of colour, not as a number you can actually
   read. The colour still identifies the row through the left border and the filter
   chip, where a 3:1 UI threshold applies and they pass; the price itself is
   information, so it gets ink that clears AA in both themes. */
.what .type .badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2); margin-left: 7px;
}
.what .sub { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Which classes are on this block of ice, and for what ages.
   Unlike .sub above, this must WRAP rather than ellipsis: on a phone the row is
   already narrow, and a truncated "Ages 4–6 Beginner 1, Beg…" answers neither of
   the two questions a parent opened the page with. */
.levels { margin-top: 5px; display: flex; flex-direction: column; gap: 3px; }
.lvl-row {
  display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap;
  font-size: 12px; line-height: 1.35;
}
.lvl-age {
  flex: none;
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  padding: 1px 7px; border-radius: 999px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 45%, transparent);
}
.lvl-names { color: var(--ink-2); min-width: 0; }
/* The session's actions in one cell: star then Register, side by side and never
   wrapping apart. The row is a three-column grid and two separate children made a
   fourth column that did not exist. */
.actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

.go {
  font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  padding: 7px 12px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
}
.go:hover { filter: brightness(1.07); }
.go:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }

.empty { padding: 34px 10px; text-align: center; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink-2); margin-bottom: 4px; font-size: 15px; }

/* A one-tap question (app.js, surveyCard). A card in the list like a notice, marked
   with the accent rather than a warning colour: it is asking, not reporting. */
.survey {
  display: grid; gap: 8px;
  margin: 0 0 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; background: var(--surface);
}
.survey-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.survey-q { margin: 0; font-weight: 600; line-height: 1.35; }
.survey-a { display: flex; flex-wrap: wrap; gap: 6px; }
.survey-skip { flex: none; font-size: 15px; line-height: 1; padding: 3px 8px; }
.survey-note { margin: 0; font-size: 12px; color: var(--ink-3); }
.survey-note a { color: inherit; }

/* "Hide all N notes" (app.js, hideAllBar): small and to the right, above the notes. */
/* Learn to skate added under a calendar scrolls the courses into view; this keeps
   their header clear of the sticky top bar when it lands (app.js, revealCourses). */
.programs-panel { scroll-margin-top: calc(var(--topbar-h, 64px) + 12px); }

.notes-bar { display: flex; justify-content: flex-end; margin: -4px 0 6px; }

/* Notes sit above the first session, so on a phone they are the first screen. Kept
   tight: a short line in a slim box, so the schedule starts within a thumb's reach. */
.notice {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 8px 0 0; padding: 7px 10px;
  border-radius: 9px; font-size: 13px; line-height: 1.4;
  background: rgba(224, 194, 134, .14); border: 1px solid #e0c286; color: var(--ink-2);
}
.notice svg { flex: none; width: 15px; height: 15px; margin-top: 2px; stroke: #b07b1f; fill: none; stroke-width: 2; }
/* Pushed to the right so it never sits between the icon and the words, and given a
   44px touch target without taking 44px of layout - on a phone these notes are
   competing with the schedule for the screen. */
.notice-x {
  flex: none; margin: -6px -6px -6px auto; padding: 0;
  width: 26px; height: 26px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; color: inherit; opacity: .6;
  background: none; border: 0; border-radius: 7px; cursor: pointer;
}
/* The hit area is centred on the button itself. Positioned against .notice instead,
   it would have sat at the far left of the note and taken taps meant for the text. */
.notice-x { position: relative; }
.notice-x::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px; transform: translate(-50%, -50%);
}
.notice-x:hover, .notice-x:focus-visible { opacity: 1; background: rgba(0, 0, 0, .07); }
.notice-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* "Get current counts": at the end of the line, never squeezed into the words. */
.notice-action { flex: none; margin: -3px 0 -3px auto; align-self: center; }

/* ---------------------------------------------------------------- footer */
.foot {
  max-width: 1400px; margin: 0 auto;
  padding: 6px clamp(14px, 3vw, 28px) 34px;
  color: var(--ink-3); font-size: 12.5px;
}
.foot p { margin: 4px 0; }
/* The standing text at the foot is worth reading once. It folds to its one live line
   - when the schedules were last refreshed - and remembers that it is folded. */
.foot-toggle {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 4px 0; margin: 0;
  background: none; border: 0; cursor: pointer;
  font: inherit; color: var(--ink-3); text-align: left;
}
.foot-toggle .caret {
  flex: none; width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transform: rotate(90deg); transition: transform .15s;
}
.foot-toggle[aria-expanded="false"] .caret { transform: none; }
.foot-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.foot.is-closed #foot-body { display: none; }
.licence-line { opacity: .85; }
/* Sits outside #foot-body so it survives the fold; a little air off the line above. */
.foot > #unhide { margin-top: 4px; }
/* ------------------------------------------------------------- myIceTime */
.beta-toggle { font-size: 12px; padding: 5px 10px; }
.beta-toggle.is-on {
  border-color: var(--beta); color: var(--beta); background: var(--beta-soft);
}
.mode-quiet[hidden] { display: none; }

/* Sat beside the button, which left it ambiguous which thing was in beta - you had to
   click it to find out. It rides the button's top-right corner instead, the way a
   count badge does, and shares the toggle's colour so the two read as one idea. */
.mode-beta { position: relative; display: inline-flex; }
.mode-beta[hidden] { display: none; }
.beta-tag {
  position: absolute; top: 0; right: 0; transform: translate(38%, -38%);
  z-index: 2;
  font: inherit; font-size: 10.5px; font-weight: 700; line-height: 1;
  letter-spacing: .02em;
  padding: 3px 7px; border-radius: 999px;
  border: 1px solid var(--beta); color: var(--beta); background: var(--surface);
  cursor: pointer;
}
.beta-tag:hover, .beta-tag:focus-visible { background: var(--beta-soft); }
.beta-tag:focus-visible { outline: 2px solid var(--beta); outline-offset: 1px; }
/* A 34px target without 34px of badge: it is small by design and sits on a button
   that switches the whole view, so a near miss must not change the page. */
.beta-tag::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 34px; height: 34px; transform: translate(-50%, -50%);
}
/* Same pill, no interaction and back in the flow, for the overlay's own heading. */
.beta-tag.as-label {
  position: static; transform: none; cursor: default; pointer-events: none;
  vertical-align: middle;
}

/* Undo lives here rather than as a permanent button beside every starred row: the
   action you want to take back is the one you just did, and only for a moment. Above
   the docked date bar on a phone, which is fixed at the bottom. Above .modal (2000)
   too: the address popup stays open when a copy fails, and its "select the address"
   toast sat dimmed under the backdrop (Nov 2026). The feedback <dialog> is in the
   browser's top layer, so it still covers this. */
.toast {
  position: fixed; z-index: 2100;
  left: 50%; transform: translateX(-50%);
  bottom: calc(14px + var(--dock-h, 0px) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 28px);
  padding: 10px 12px 10px 14px; border-radius: 12px;
  background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow); font-size: 13.5px;
}
.toast[hidden] { display: none; }
.toast .btn { background: none; border-color: currentColor; color: inherit; }
/* The scar again: .btn sets its own display, so [hidden] alone does nothing. */
.toast .btn[hidden] { display: none; }

.modal {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center;
  padding: 18px; background: rgba(8, 13, 28, .55);
}
.modal[hidden] { display: none; }
.modal-card {
  max-width: 460px; max-height: 84vh; overflow-y: auto;
  padding: 18px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.modal-card h2 { margin: 0 0 10px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.modal-card p { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-2); }
.modal-note { color: var(--ink-3); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* The rink's address, as its own control. It cannot live inside the rink button - a
   button inside a button is not a thing - so it is a sibling, indented to line up
   under the name it belongs to. */
.rink-addr {
  display: block; width: 100%; text-align: left;
  margin: -2px 0 2px; padding: 4px 10px 6px 34px;
  font: inherit; font-size: 11.5px; color: var(--ink-3);
  background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.rink-addr:hover, .rink-addr:focus-visible { color: var(--ink-2); background: var(--surface-2); }
.rink-addr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rink-mi {
  flex: none; font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.nav-choices { display: grid; gap: 8px; margin-top: 6px; }
/* These are anchors so they can open a new tab, but they are buttons to look at. */
.nav-choices .btn { width: 100%; text-align: left; text-decoration: none; display: block; }

/* ---------------------------------------------------------- starred slots */
.star {
  flex: none; align-self: center;
  width: 34px; height: 34px; padding: 0;
  font-size: 17px; line-height: 1;
  background: none; border: 1px solid transparent; border-radius: 9px;
  color: var(--ink-3); cursor: pointer;
}
.star:hover, .star:focus-visible { color: var(--beta); border-color: var(--line); }
.star.is-on { color: var(--beta); }
.star:focus-visible { outline: 2px solid var(--beta); outline-offset: 1px; }

.star-cal { margin: 4px 0 14px; }
.star-cal-head h3 { margin: 0 0 8px; font-size: 15px; }
.star-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.star-dow {
  text-align: center; font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .04em;
}
.star-cell {
  min-height: 46px; padding: 4px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  display: flex; flex-direction: column; gap: 3px;
}
.star-cell.is-empty { border: 0; background: none; }
.star-cell.is-today { border-color: var(--accent); }
.star-cell.has-star { background: var(--surface-2); }
.star-cell.is-gone { border-color: var(--beta); }
/* The date itself carries the holiday rather than the border, which is already
   saying whether a starred slot went missing. */
.star-cell.is-holiday { cursor: help; }
.star-cell.is-holiday .star-day { color: var(--beta); font-weight: 650; }
.star-day { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.star-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.star-dot {
  width: 7px; height: 7px; border-radius: 99px; background: var(--accent);
}
.star-dot.is-gone { background: var(--beta); }
.star-dot.is-unknown { background: none; border: 1px solid var(--ink-3); }
.quiet-row.is-gone { border-color: var(--beta); }
.quiet-flag.is-gone { border-color: var(--beta); color: var(--beta); }

.quiet-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.quiet-head {
  margin: 18px 0 8px; font-size: 13px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-3);
}
.quiet-head:first-child { margin-top: 6px; }
.quiet-note { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); max-width: 62ch; }
.quiet-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.quiet-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.quiet-where { color: var(--ink-2); font-size: 13px; }
.quiet-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.quiet-count { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.quiet-count.muted { color: var(--ink-3); }
/* A bar is a picture of a number that was actually counted. Sessions with no count
   deliberately get no bar - there is nothing to draw. */
.quiet-bar {
  position: relative; width: 56px; height: 7px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden;
}
.quiet-bar::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: var(--fill, 0%);
  background: var(--accent);
}
.quiet-bar.is-quiet::after { background: #2fa27a; }
.quiet-bar.is-full::after { background: #c2603f; }
.quiet-flag {
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
}
/* A rink nearby with no ice on. Carries the beta colour rather than a red: it is a
   prediction about where people go, not a problem with this session. */
.quiet-flag.is-shut, .quiet-flag.is-holiday {
  border-color: var(--beta); color: var(--beta); background: var(--beta-soft);
  cursor: help;
}

.version-tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 11.5px; font-variant-numeric: tabular-nums;
}

/* Shown when a one-finger drag tries to move the map, which two fingers now do. A
   map that just ignores your finger reads as broken. */
.map-hint {
  position: absolute; inset: auto 12px 12px; z-index: 500;
  padding: 7px 10px; border-radius: 9px;
  background: rgba(16, 26, 51, .84); color: #fff;
  font-size: 12.5px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.map-hint.is-on { opacity: 1; }
#map { position: relative; }

/* Leaflet tweaks */
.leaflet-container { font: inherit; background: var(--surface-2); }
/* You, on the map. A white-ringed dot so it can never be mistaken for a rink's blue
   circle, a halo as wide as the browser says the fix is uncertain, and a slow pulse
   for people who have not asked for less motion. */
.here-dot {
  border-radius: 50%;
  background: var(--here);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 1px 4px rgba(0, 0, 0, .35);
}
.here-dot::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .here-dot::after { animation: here-pulse 2.4s ease-out infinite; }
}
@keyframes here-pulse {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--here) 45%, transparent); }
  to   { box-shadow: 0 0 0 16px transparent; }
}
path.here-halo { fill: var(--here); fill-opacity: .12; stroke: var(--here); stroke-opacity: .35; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-popup-content { margin: 10px 12px; font-size: 13px; }
.leaflet-popup-content b { display: block; margin-bottom: 2px; }

/* A portal link that only reaches the rink's front door, not the session itself.
   Visually quieter than a true deep link so the difference is legible at a glance. */
.go.indirect {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line);
}
.go.indirect:hover { border-color: var(--ink-3); filter: none; }

/* ---------------------------------------------------------------- multi-select */
.rink { align-items: center; }
.check {
  flex: none; width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid var(--ink-3); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; color: var(--accent-ink);
}
.check.is-on { background: var(--accent); border-color: var(--accent); }
.rink-all { border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; }
.rink.is-planned { opacity: .62; }
.rink.is-planned:hover { opacity: .85; }
.rink.is-planned .rink-name { font-weight: 500; }

/* ------------------------------------------------------- past days and sessions */
/* Already-happened ice stays reachable by scrolling, just visibly spent. */
.day-group.is-past .day-head h3,
.day-group.is-past .count { color: var(--ink-3); }
/* Past ice is dimmed so the week reads forward at a glance, but it is still real
   information someone scrolled back for. These two rules used to multiply - a past
   session inside a past day landed at .275, about 1.8:1, which is not readable text
   by any measure. They are kept apart now, and .7 clears AA at roughly 6:1 while
   still looking plainly secondary. */
.day-group.is-past { opacity: .7; }
.day-group.is-past:hover { opacity: 1; }
.session.is-past { opacity: .7; }
.day-group.is-past .session.is-past { opacity: 1; }
.session.is-past .go { background: transparent; color: var(--ink-3); border-color: var(--line); }
.pill.past {
  margin-left: auto; color: var(--ink-3);
  background: transparent; border-color: var(--line);
}

/* ------------------------------------------------- collapsible picker + filters */
/* Both the rink picker and the session-type chips fold away, because the point of
   the page is the list of times and on a laptop they were eating half the screen. */
.head-toggle {
  display: flex; align-items: baseline; gap: 8px;
  flex: 1 1 auto; min-width: 0;
  font: inherit; text-align: left;
  background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
}
.head-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: 6px; }
.head-toggle h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.head-summary {
  font-size: 12px; color: var(--ink-3); margin-left: auto; padding-right: 10px;
  white-space: nowrap;
}
.caret {
  flex: none; width: 0; height: 0; margin-top: 4px;
  border-left: 4.5px solid transparent; border-right: 4.5px solid transparent;
  border-top: 5px solid var(--ink-3);
  transition: transform .15s;
}
#rink-panel.is-closed .caret { transform: rotate(-90deg); }
#rink-panel.is-closed #rink-body { display: none; }

/* No inner scrolling on a phone. A scroll box inside a scrolling page traps the
   gesture on iOS - the list reaches its end and the page still will not move until
   you lift your finger - and the picker is opened on purpose now, so it can simply
   run full length and let the page do the scrolling. */
.rink-list { max-height: none; overflow: visible; }
.rink { padding: 7px 10px; }
.rink-meta { font-size: 11.5px; }


/* Walk-up sessions are not bookings, so their link should not look like one. */
.go.walkup {
  background: transparent;
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.go.walkup:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); filter: none; }

/* ------------------------------------------------------------------ theming */
/* Wraps rather than clips. The ZIP box was pushed off the right edge of a 375px
   screen, which is the width where it matters most - someone on a phone who declined
   the location prompt. The header may take a second line; measureChrome() reads its
   real height, so the sticky offsets follow it. */
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center;
                  justify-content: flex-end; gap: 8px; }
.locate-short { display: none; }
@media (max-width: 560px) {
  .locate-long { display: none; }
  .locate-short { display: inline; }
}
.icon-btn { display: inline-flex; align-items: center; gap: 7px; }

/* The way in for anyone who will not turn on location. Sized to the five characters
   it takes so it does not crowd the bar on a phone, where this matters most. */
.zip { display: flex; align-items: center; gap: 4px; }
.zip input {
  /* Five digits plus padding. 6.5ch clipped the last one, which reads as a typo in
     what you just entered. */
  width: 8.5ch; padding: 6px 8px; font: inherit; font-size: 13px;
  color: var(--ink); background: var(--surface); text-align: center;
  border: 1px solid var(--line); border-radius: 8px;
}
.zip input::placeholder { color: var(--ink-3); }
.zip input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* The message sits under the whole bar rather than inside the flex row, so a long
   sentence does not stretch the header. */
.zip-msg {
  flex-basis: 100%; margin: 4px 0 0; font-size: 12px; color: var(--ink-2);
}
.zip-msg.is-bad { color: var(--accent); }
.zip-msg[hidden] { display: none; }
.icon-btn #theme-icon { font-size: 14px; line-height: 1; }
@media (max-width: 560px) { #theme-label { display: none; } }

/* On a phone the tagline wrapped to a second line and pushed the whole schedule
   down for no information. The title already says what this is. */
@media (max-width: 620px) {
  .tagline { display: none; }
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; }
}

/* A ceiling on how many skaters can be on the ice — not a crowd estimate. */
.cap {
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  margin-left: 7px; padding: 1px 6px; border-radius: 999px;
  color: var(--ink-3); border: 1px solid var(--line);
}

/* Registration counts from the rink's booking system, as of the last refresh — a fact,
   not an estimate, but not live either (see .is-stale). */
.spots {
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  margin-left: 7px; padding: 1px 7px; border-radius: 999px;
  color: #1f7a4d; background: rgba(47, 162, 122, .14); border: 1px solid rgba(47, 162, 122, .45);
}
.spots.is-tight { color: #9a6410; background: rgba(224, 168, 58, .16); border-color: rgba(224, 168, 58, .5); }
.spots.is-full  { color: #a33; background: rgba(190, 60, 60, .14); border-color: rgba(190, 60, 60, .45); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .spots { color: #6ddba4; }
  :root:not([data-theme="light"]) .spots.is-tight { color: #e8b45c; }
  :root:not([data-theme="light"]) .spots.is-full { color: #ff8f8f; }
}
:root[data-theme="dark"] .spots { color: #6ddba4; }
:root[data-theme="dark"] .spots.is-tight { color: #e8b45c; }
:root[data-theme="dark"] .spots.is-full { color: #ff8f8f; }
/* A count old enough that its age is printed on it. Green says "this is how it is",
   which an overnight count is not, so it goes neutral. Tight and full keep their
   colour: "Full · 14h ago" is still worth noticing. Declared after the dark-mode
   colours and as specifically, so it wins in every theme. */
.spots.is-stale:not(.is-tight):not(.is-full),
:root:not([data-theme="light"]) .spots.is-stale:not(.is-tight):not(.is-full),
:root[data-theme="dark"] .spots.is-stale:not(.is-tight):not(.is-full) {
  color: var(--ink-2); background: transparent; border-color: var(--line);
}
/* An old count you can tap for a new one. A button, so it needs the browser's own
   button look taken off, and a refresh mark so it reads as something to press. */
button.spots {
  font-family: inherit; line-height: inherit; cursor: pointer;
}
button.spots.is-action::after { content: " ↻"; }
button.spots[aria-disabled="true"], .notice-action[aria-disabled="true"] { cursor: progress; opacity: .7; }
button.spots[aria-disabled="true"]::after { content: none; }
button.spots:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Visible only to screen readers. Used for the results summary, which is announced
   as one short sentence instead of re-reading every session row on each filter
   click - the results list itself is no longer a live region for that reason. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------- installed to the home screen */
/*
   Launched from the home screen there is no browser chrome, which is the point -
   it is roughly a hundred more pixels of schedule on a phone. Two things have to
   be handled by hand in exchange.

   The status bar is set to black-translucent so the page owns the full height, so
   the top bar has to pad itself past the notch; the footer has to clear the home
   indicator. env() is zero everywhere else, so these rules are harmless in a
   normal browser tab and do not need a media query.
*/
.topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
main { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
/* The docked date bar overlays the end of the page on a phone, so the footer carries
   the runway that lets the last session row scroll clear of it. --dock-h is 0px
   whenever the dock is in the flow, so this one rule serves both layouts - and it
   has to be the only .foot padding-bottom rule in the file, because an earlier one
   inside a media query loses to this one on source order alone. --dock-h already
   includes the dock's own safe-area padding, so env() is not added to it twice. */
.foot { padding-bottom: calc(34px + env(safe-area-inset-bottom) + var(--dock-h, 0px)); }

@media (display-mode: standalone) {
  /* Nothing here is a browser tab any more: the page cannot be reloaded with a
     pull, so the schedule should be what you land on rather than the header. */
  .tagline { display: none; }
  .topbar { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 8px; }
  .brand h1 { font-size: 17px; }
  .foot { font-size: 11.5px; }
}

/* Someone who has asked for less movement should not be given a sliding map. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------- learn to skate */
/*
   Courses, not drop-in ice. This panel exists because a learn-to-skate class in the
   day calendar reads as somewhere you can turn up, when in fact it is week five of a
   run that closed to new skaters a month ago. Here the run can say what it is: when
   it starts, how many weeks, what it costs, and whether you can still book it.
*/
/* Occupies the same grid cell as the schedule panel rather than a row of its own.
   The two are alternatives - the mode bar shows exactly one of them - so the course
   list lands in the place the calendar just left, beside the rink picker, at the
   same size. Placing it below instead pushed it under the sticky picker and made
   switching mode feel like navigating to a different page.

   Explicit row 2 because the mode bar spans both columns above and takes row 1. */
.schedule-panel, .programs-panel { grid-column: 2; grid-row: 2; }
/* Closing the sheet on a desktop used to buy nothing: it is a side column, so folding
   it away just left an empty one. It now hands its width to the schedule, which is
   what someone closing it actually wanted - more room for the ice times. */
@media (min-width: 901px) {
  main:has(#rink-panel.is-closed) { grid-template-columns: minmax(0, 1fr); }
  /* Rows stated explicitly. Collapsing to one column left the schedule holding its
     `grid-row: 2` while the sheet auto-placed after it, so the line telling you what
     you are looking at ended up below the whole schedule. */
  main:has(#rink-panel.is-closed) #rink-panel {
    grid-column: 1; grid-row: 2; position: static;
  }
  main:has(#rink-panel.is-closed) .schedule-panel,
  main:has(#rink-panel.is-closed) .programs-panel { grid-column: 1; grid-row: 3; }
}
@media (max-width: 900px) {
  /* One column: both fall back to normal flow under the rink picker. */
  .schedule-panel, .programs-panel { grid-column: 1; grid-row: auto; }
}
.programs-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.prog-label {
  font-size: 12px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}
#program-when { font-size: 13px; padding: 6px 10px; }
.programs {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding: 12px 14px 16px;
}
/* A freshness note above the course cards spans the row rather than taking one card's
   cell; the grid gap already spaces it, so it drops the margin it has elsewhere. */
.programs > .notice { grid-column: 1 / -1; margin: 0; }
.series {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; background: var(--surface-2);
  display: flex; flex-direction: column; gap: 7px;
  min-width: 0;
}
.series-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.series-head h3 { font-size: 15px; }
.series-rink { font-size: 12px; color: var(--ink-3); }
.series-when { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.series-when strong { color: var(--accent); }
.series-when span { font-size: 12px; color: var(--ink-3); }
/* Said out loud, because these dates were inferred rather than published. */
.series-derived {
  font-size: 10.5px; font-style: italic;
  border-bottom: 1px dotted var(--ink-3); cursor: help;
}
.series-class {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; padding-top: 5px; border-top: 1px solid var(--line);
}
.series-day { font-weight: 650; }
.series-time { color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* The level pills reuse the calendar's own block, so a course and a session
   describe their levels identically. */
.series-class .levels { width: 100%; margin-top: 3px; }
.series-note { font-size: 11.5px; color: var(--ink-3); }
.series-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: auto; padding-top: 7px;
}
.series-price { font-size: 13px; font-weight: 650; }
.series-price.is-unknown { font-weight: 450; font-size: 12px; color: var(--ink-3); }
.series-shut, .series-soon {
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line);
}
.series-soon { color: #1f7a4d; background: rgba(47, 162, 122, .14); border-color: rgba(47, 162, 122, .45); }
.series-shut { color: #a33; background: rgba(190, 60, 60, .12); border-color: rgba(190, 60, 60, .4); }
:root[data-theme="dark"] .series-soon,
:root:not([data-theme="light"]) .series-soon { color: #6ddba4; }
:root[data-theme="dark"] .series-shut,
:root:not([data-theme="light"]) .series-shut { color: #ff8f8f; }
.series-foot .go { margin-left: auto; }

/* ------------------------------------------------------------------- modes */
/*
   Who you are here as, rather than what you are filtering. Figure skating and hockey
   are two views of the same calendar and toggle together; learn to skate is a
   different view of a different kind of thing - a course you enrol in - so it sits
   apart behind a gap. Two of these behaving like checkboxes and the third like a
   radio is only confusing if they look identical, which is what the separation and
   the aria-pressed state are for.
*/
.modes {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.mode-group { display: flex; }
.mode-group .mode { border-radius: 0; border-left-width: 0; }
.mode-group .mode:first-child { border-radius: 10px 0 0 10px; border-left-width: 1px; }
.mode-group .mode:last-child { border-radius: 0 10px 10px 0; }
.mode { font-size: 14px; font-weight: 650; padding: 9px 16px; min-height: 42px; }
/* The scar this file keeps reopening: a rule's own `display` beats `[hidden]`. Stated
   for these before it bites a fifth time. */
.mode[hidden], .mode-group[hidden] { display: none; }
.mode.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* Set aside rather than off: Learn to skate has the page, and the pair is one tap from
   coming back. Opacity rather than a grey token so it dims the same in both themes;
   hover/focus restore it so the way back does not look disabled. */
.mode-group.is-dimmed { opacity: .55; transition: opacity .15s; }
.mode-group.is-dimmed:hover, .mode-group.is-dimmed:focus-within { opacity: 1; }
/* Separated from the pair, because choosing it replaces them rather than joining. */
.mode-course { border-radius: 10px; }
.mode-course::before {
  content: ''; position: absolute; margin-left: -8px;
  width: 1px; height: 22px; background: var(--line);
}
@media (max-width: 560px) {
  .modes { gap: 8px; }
  .mode { flex: 1 1 auto; padding: 9px 10px; font-size: 13px; text-align: center; }
  .mode-group { flex: 1 1 auto; }
  .mode-course::before { display: none; }
}
/* A rink that publishes classes but no drop-in ice. Neutral, not a warning: it is a
   fact about what the rink puts out, and the classes themselves are all there. */
.pill.classes { color: #4a5ea8; border-color: #b9c4e4; background: rgba(120, 145, 214, .14); }
:root[data-theme="dark"] .pill.classes,
:root:not([data-theme="light"]) .pill.classes { color: #9db4ff; border-color: #38477a; background: rgba(120, 145, 214, .16); }

/* Who a session is for - "Adults only", "Youth only", "Ages 13+". Sits beside the
   session type, not in the truncated detail line, and is deliberately more visible
   than the price: it decides whether the session is any use to you at all. */
.what .type .audience {
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  margin-left: 7px; padding: 1px 7px; border-radius: 999px;
  color: #8a4b08; background: rgba(224, 150, 40, .16); border: 1px solid rgba(224, 150, 40, .55);
}
:root[data-theme="dark"] .what .type .audience,
:root:not([data-theme="light"]) .what .type .audience { color: #f2b766; }

/* The spots-left snapshot: worth saying once, not worth a warning triangle. */
/* The per-rink detail behind a month's "not fully posted yet" line. Inline, so the
   closed state costs one word on the same line rather than a row of its own. */
.notice-more { display: inline; }
.notice-more > summary {
  display: inline; cursor: pointer; color: var(--accent); text-decoration: underline;
  text-underline-offset: 2px; list-style: none;
}
.notice-more > summary::-webkit-details-marker { display: none; }
.notice-more[open] > summary { margin-right: 4px; }
.notice-more ul { margin: 6px 0 4px; padding-left: 18px; }
.notice-more li { margin: 2px 0; }
.notice-more p { margin: 4px 0 0; color: var(--ink-3); font-size: 12.5px; }
.notice.subtle { background: transparent; border-style: dashed; color: var(--ink-3); font-size: 12.5px; }

/* --------------------------------------------------------------- feedback */
/* A native dialog, like the welcome, so Escape, focus and the backdrop come free. */
dialog.feedback {
  width: min(30rem, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  overflow: auto; overscroll-behavior: contain;
}
dialog.feedback::backdrop { background: rgba(8, 14, 30, .55); }
dialog.feedback h2 { margin: 0 0 6px; font-size: 17px; }
.feedback-lede { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-2); }
.feedback label { display: block; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.feedback select, .feedback input, .feedback textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  font: inherit; font-weight: 400; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
}
.feedback textarea { resize: vertical; min-height: 72px; }
.feedback :is(select, input, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* The honeypot: off-screen, not display:none, which some bots respect. */
.fb-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-msg { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.feedback-msg.is-bad { color: #c0392b; }
:root:not([data-theme="light"]) .feedback-msg.is-bad { color: #ff9c95; }
.feedback .btn.send { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
