/* Arka, on an adapted Sodium: warm paper greys, 1px rules for structure, square corners, no
   shadows. Inter (400, optical sizes) for titles and prose; Commit Mono in capitals for the
   interface's labels. Follows the phone's light or dark setting. Both faces OFL, self-hosted. */
@font-face {
  font-family: "Inter";
  src: url(inter-latin.woff2) format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url(inter-latin-ext.woff2) format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Commit Mono";
  src: url(commit-mono.woff2) format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
/* Stand-ins while Inter and Commit Mono load (font-display: swap), sized so the text they set takes the
   room the real fonts will, and nothing reflows when they arrive. Measured with fontTools from
   inter-latin.woff2 and commit-mono.woff2 against Windows' Arial and Courier New (Arimo and Liberation
   Sans, Cousine and Liberation Mono have the same widths and are used where those aren't installed):
   size-adjust is the real font's average advance over the stand-in's, letters weighted by how often they
   come up in English text with the space (Inter .4741 em, Arial .4416: 107.35%; both monospaces .6000 em:
   99.98%); the overrides are the real font's ascender, descender and line gap (Inter 1984, 494, 0 of 2048
   units; Commit Mono 900, 200, 0 of 1000, the same in hhea and OS/2) divided by that size-adjust. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Arimo"), local("Liberation Sans");
  size-adjust: 107.35%; ascent-override: 90.24%; descent-override: 22.47%; line-gap-override: 0%;
}
@font-face {
  font-family: "Commit Mono Fallback";
  src: local("Courier New"), local("CourierNewPSMT"), local("Cousine"), local("Liberation Mono");
  size-adjust: 99.98%; ascent-override: 90.01%; descent-override: 20.00%; line-gap-override: 0%;
}

:root {
  color-scheme: light dark;
  /* surfaces */
  --page: #fff;
  --panel: #fafaf7;
  --well: #f4f3ee;
  --hover: #1615120a;
  --pressed: #16151214;
  /* text */
  --text-1: #161512;
  --text-2: #55524a;
  --text-3: #6b675e;     /* 5.6:1 on page, 5.4:1 on panel */
  --text-off: #a8a499;
  /* rules */
  --line-faint: #efede6;
  --line: #e2dfd5;
  --line-control: #8a8478;
  /* controls */
  --btn-bg: #f8f7f3;
  --raised: #fff;          /* the chosen part of a segmented switch, raised out of its well */
  --ink-bg: #161512;
  --ink-fg: #fff;
  /* status */
  --live: #d92d20;
  --fail: #b3261e;
  --fail-tint: #fdecea;
  --fail-line: #f2c4be;
  --scrim: #16151252;
  --sheet-bg: var(--page);   /* sheets and menus: in dark, higher surfaces are lighter */
  /* bits */
  --art-edge: rgb(22 21 18 / .08);
  --map-bg: #fafaf7;
  --map-cross: rgb(22 21 18 / .08);
  --track: #e2dfd5;
  --dot-o: .75;

  --font-sans: "Inter", "Inter Fallback", system-ui, sans-serif;
  --font-mono: "Commit Mono", "Commit Mono Fallback", ui-monospace, Menlo, Consolas, monospace;

  --gut: 16px;
  --bar-h: 52px;
  --tabs-h: 56px;
  --mini-h: 64px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  /* the most the bottom inset can become (Chrome draws behind the gesture bar once its toolbar
     hides). Where it isn't supported, the plain inset, which makes the dock maths a no-op */
  --sab-max: env(safe-area-max-inset-bottom, env(safe-area-inset-bottom, 0px));

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  --ease-exit: cubic-bezier(.4, 0, 1, 1);
  --ease-icon: cubic-bezier(.2, 0, 0, 1);

  --z-bar: 10; --z-dock: 20; --z-np: 30; --z-sheet: 40; --z-toast: 50;
}
/* Dark: the system's, unless Account's Appearance says Light; or always, when it says Dark (app.js sets
   data-theme on <html> before anything is drawn) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #141412;
    --panel: #1c1b19;
    --well: #22211e;
    --hover: #f5f3ee0a;
    --pressed: #f5f3ee14;
    --text-1: #f5f3ee;
    --text-2: #c4c0b6;
    --text-3: #a19c90;   /* 6.7:1 on page, 6.3:1 on panel */
    --text-off: #5e5a52;
    --line-faint: #22211e;
    --line: #2c2a25;
    --line-control: #736d61;
    --btn-bg: #181715;
    --raised: #2a2924;
    --ink-bg: #f5f3ee;
    --ink-fg: #141412;
    --live: #ff6b57;
    --fail: #ff6b57;
    --fail-tint: #3a1915;
    --fail-line: #5c2a22;
    --scrim: #000000a3;
    --sheet-bg: var(--panel);
    --art-edge: rgb(245 243 238 / .08);
    --map-bg: #0d0d0c;
    --map-cross: rgb(245 243 238 / .08);
    --track: #3a3832;
    --dot-o: .55;
  }
}
:root[data-theme="dark"] {
  --page: #141412;
  --panel: #1c1b19;
  --well: #22211e;
  --hover: #f5f3ee0a;
  --pressed: #f5f3ee14;
  --text-1: #f5f3ee;
  --text-2: #c4c0b6;
  --text-3: #a19c90;   /* 6.7:1 on page, 6.3:1 on panel */
  --text-off: #5e5a52;
  --line-faint: #22211e;
  --line: #2c2a25;
  --line-control: #736d61;
  --btn-bg: #181715;
  --raised: #2a2924;
  --ink-bg: #f5f3ee;
  --ink-fg: #141412;
  --live: #ff6b57;
  --fail: #ff6b57;
  --fail-tint: #3a1915;
  --fail-line: #5c2a22;
  --scrim: #000000a3;
  --sheet-bg: var(--panel);
  --art-edge: rgb(245 243 238 / .08);
  --map-bg: #0d0d0c;
  --map-cross: rgb(245 243 238 / .08);
  --track: #3a3832;
  --dot-o: .55;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html {
  scrollbar-gutter: stable;   /* the page doesn't shift sideways between pages that scroll and pages that don't */
  scroll-padding-top: calc(var(--bar-h) + var(--sat) + var(--stuck-h, 0px));   /* focus and scrollIntoView clear the bar, what's stuck under it, and the dock */
  scroll-padding-bottom: calc(var(--tabs-h) + var(--mini-h) + var(--sab) + 16px);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--page);
}
body {
  margin: 0; min-height: 100dvh;
  background: var(--page); color: var(--text-1);
  font: 400 15px/24px var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; border-radius: 0;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
button, a, input { touch-action: manipulation; }
a { color: inherit; text-decoration: none; -webkit-touch-callout: none; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, b, strong { font-weight: 400; }   /* one weight: hierarchy is size, case and colour */
svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
svg .f, svg.f { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--text-1); outline-offset: 2px; }
/* after a tap, no rings on what the app focused for you (app.js sets data-touch); text fields keep theirs */
:root[data-touch] :not(input, textarea, select):focus-visible { outline-color: transparent !important; }
main:focus-visible { outline: none; }
[hidden] { display: none !important; }
::selection { background: var(--text-1); color: var(--page); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ------------------------------------------------------------ type roles */
.display {
  font-family: var(--font-sans); font-weight: 400;
  font-size: 18px; line-height: 24px; letter-spacing: -.025em;
  text-wrap: balance; overflow-wrap: break-word;
}
.h-xl { font-size: 32px; line-height: 35px; letter-spacing: -.035em; }
.h-1 { font-size: 24px; line-height: 29px; letter-spacing: -.025em; }
.meta { font-size: 13px; line-height: 18px; color: var(--text-2); }

/* the interface's voice: Commit Mono in capitals, tracked out */
.label, .sec-head, .seg > a, .seg > button, .bar-title, .kick-st, .kicker-link, .text-btn,
.see-all, .genre, .gc-go, .sm-done, .sheet-cancel, .toast-act, .st-edit, .np-source-v, .btn-sm, .times, .tl-time,
.tracklist li::before, .row .num {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 12px; line-height: 16px; letter-spacing: .04em; text-transform: uppercase;
}
.mast, .tabs a, .badge, .np-source-k, .np-now-s, .mini-sub, .tag, .live-ch, .chip, .q-status, .smap .ax, .smap .stag, .st-txt span {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 11px; line-height: 14px; letter-spacing: .03em; text-transform: uppercase;
}
.times, .tl-time, .row .num, .badge, .mast .d { font-variant-numeric: tabular-nums; }
.times, .tl-time { text-transform: none; letter-spacing: 0; }

/* small shared parts (also for library.css) */
.mark { display: inline-block; flex: none; width: 8px; height: 8px; background: var(--line-control); }
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 6px; flex: none;
  background: var(--well); border: 1px solid var(--line); color: var(--text-2); white-space: nowrap;
}
.tag .mark { width: 6px; height: 6px; }

/* ------------------------------------------------------------ top bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: var(--z-bar);
  height: calc(var(--bar-h) + var(--sat)); padding: var(--sat) max(4px, env(safe-area-inset-right)) 0 max(4px, env(safe-area-inset-left));
  display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(44px, auto); align-items: center; column-gap: 4px;
}
.bar::before { /* the bar's own surface, there once content scrolls under it */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: var(--page); border-bottom: 1px solid var(--line);
  transition: opacity 150ms ease;
}
.bar.scrolled::before { opacity: 1; }
.bar-back { grid-column: 1; width: 44px; height: 44px; display: grid; place-items: center; }
.bar-back svg { translate: -6px 0; transition: translate 150ms var(--ease-out); }   /* the chevron's point on the page's 16px column */
body.has-hero .bar:not(.scrolled) .bar-back svg { translate: 0 0; }   /* in its square over a picture it centres */
.bar-btn {
  width: 44px; height: 44px; display: grid; place-items: center; color: var(--text-1);
  border: 1px solid transparent; transition: background-color 150ms ease, border-color 150ms ease, scale 150ms var(--ease-out);
}
body.has-hero .bar:not(.scrolled) .bar-btn { background: var(--page); border-color: var(--line); }
.bar-back:active .bar-btn { scale: .96; background-image: linear-gradient(var(--pressed), var(--pressed)); }
.bar-title {
  grid-column: 2; text-align: start; min-width: 0; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; translate: 0 4px; transition: opacity 180ms ease, translate 180ms var(--ease-out);
}
.bar.scrolled .bar-title { opacity: 1; translate: 0 0; }
.bar-back[hidden] + .bar-title { grid-column: 1 / 3; padding-left: 12px; }
/* The page's main action (Play on an episode or playlist, Follow on a show or DJ) comes up into the
   bar once its own button has scrolled under it, so it's never more than a thumb away. */
.bar-act {
  grid-column: 3; justify-self: end; opacity: 0; visibility: hidden; translate: 0 4px;
  transition: opacity 180ms ease, translate 180ms var(--ease-out), visibility 0s 180ms, background-color 150ms ease, scale 150ms var(--ease-out);
}
.bar.has-act .bar-act { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s; }
.bar-act.btn { height: 32px; padding: 0 10px; margin-right: 8px; gap: 6px; }
.bar-act.btn::before { inset: -6px -4px; }
.bar-act.btn svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------ main */
main {
  display: block; outline: none; overflow-x: clip;
  padding: calc(var(--bar-h) + var(--sat)) 0 calc(var(--tabs-h) + var(--sab-max) + 40px);
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px); /* landscape: clear the notch (after the shorthand, which would reset it) */
}
body.has-hero main { padding-top: 0; }
/* a tab's own page has no Back and its heading says where you are, so the bar shrinks to the status
   bar's strip (the page colour, so nothing scrolls under the clock) and the heading moves up */
body.is-root { --bar-h: 0px; }
body.is-root main { padding-top: calc(var(--sat) + 16px); }   /* a tab's title: the same 16px above it as below it and at the sides */
body.is-root .bar-title { display: none; }
body.is-root .bar::before { border-bottom: 0; }
body.has-mini main { padding-bottom: calc(var(--tabs-h) + var(--mini-h) + var(--sab-max) + 40px); }

.page-head { padding: 0 var(--gut) 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.page-head .kicker { color: var(--text-3); display: flex; align-items: center; gap: 8px; min-height: 16px; flex-wrap: wrap; row-gap: 4px; }
.page-head .kicker > span { white-space: nowrap; }
/* the title with a link at its right (Library's Account): same place as a title alone */
.ph-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
.ph-row > h1 { min-width: 0; }
.ph-act { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 16px; min-width: 0; color: var(--text-3); margin-left: auto; }
.ph-act > span { white-space: nowrap; }
/* The station line heads Home and the station pages (and sits under Search's field): the stations you've used
   lately, one mono line between rules that never scrolls, then "All 32" at the right, which unfolds every
   station under it. It says which one you're on, so it stays at the top as the page scrolls. */
.st-head { gap: 0; }
/* Home and the station pages have no visible title: the station names under this line say where you are.
   The status and Stations line is as tall as another tab's title, so these pages start where the other tabs'
   do, and it's the same on every one of them, so the names never move when you switch station */
.st-head .kicker { min-height: 35px; column-gap: 16px; }
.st-head .st-edit { margin-left: auto; }
.st-bar {
  position: sticky; top: calc(var(--bar-h) + var(--sat)); z-index: 3;
  background: var(--page); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
html:has(.st-bar) { --stuck-h: 46px; }
.st-bar + .sec { margin-top: 0; }
.st-bar + .sec > .sec-head:first-child { border-top: 0; }
/* side scrollers fade at an edge with more beyond it (armScrollers sets --fl/--fr) */
.seg {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent);
}
:root[data-hover] { .seg > :hover, .sl-line > :not([aria-current]):not(:disabled):hover, .sl-flow > :not(:disabled):hover, .sl-flow .sl-city > :not(.sl-cl):hover { color: var(--text-1); } }
.sl-top { display: flex; align-items: stretch; height: 44px; min-width: 0; }
.sl-line { flex: 1; min-width: 0; display: flex; column-gap: 20px; padding-left: var(--gut); overflow: hidden; white-space: nowrap; }
.sl-line > * {
  position: relative; flex: none; height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  border: 0; background: none; color: var(--text-3); white-space: nowrap; cursor: pointer; transition: color 150ms ease;
}
.sl-line > *::before { content: ""; position: absolute; inset: 0 -10px; }
.sl-line > [aria-current="page"], .sl-line > [aria-pressed="true"] { color: var(--text-1); box-shadow: inset 0 -2px 0 var(--text-1); }
.sl-line > :active { color: var(--text-1); }
.sl-line > :focus-visible, .sl-tog:focus-visible, .sl-flow :focus-visible, .sl-mode :focus-visible { outline: 2px solid var(--text-1); outline-offset: -2px; }
.sl-line > [hidden] { display: none; }
.sl-tog {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--gut) 0 14px; margin-left: 12px;
  border: 0; border-left: 1px solid var(--line); background: none; color: var(--text-1); cursor: pointer; white-space: nowrap;
}
.sl-tog svg { width: 14px; height: 14px; transition: rotate 200ms var(--ease-out); }
.sl-tog[aria-expanded="true"] svg { rotate: 180deg; }
/* the unfolded list: every station, pushing the page down rather than covering it */
.sl-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms var(--ease-out); }
.sl-panel.open { grid-template-rows: 1fr; }
.sl-in { overflow: hidden; min-height: 0; }
.sl-panel.open .sl-in { border-top: 1px solid var(--line-faint); max-height: min(470px, 60dvh); overflow-y: auto; overscroll-behavior: contain; }
.sl-mode { display: flex; gap: 10px; align-items: center; padding: 12px var(--gut) 4px; color: var(--text-off); }
.sl-mode button { height: 28px; padding: 0; border: 0; background: none; color: var(--text-3); cursor: pointer; }
.sl-mode button[aria-pressed="true"] { color: var(--text-1); text-decoration: underline; text-underline-offset: 4px; }
.sl-note { margin-left: auto; color: var(--text-3); font-family: var(--font-sans); font-size: 13px; letter-spacing: 0; text-transform: none; }
.sl-flow { display: flex; flex-wrap: wrap; column-gap: 18px; padding: 4px var(--gut) 14px; }
.sl-flow a, .sl-flow span[data-s], .sl-flow button {
  height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font-family: var(--font-sans);
  font-size: 16px; letter-spacing: -.01em; color: var(--text-2); white-space: nowrap; cursor: pointer;
}
.sl-flow [aria-current="page"], .sl-flow [aria-pressed="true"] { color: var(--text-1); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.sl-flow a:active, .sl-flow button:active { color: var(--text-1); }
.sl-city { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 14px; margin-right: 6px; }
.sl-cl { color: var(--text-3); font-size: 11px; letter-spacing: .06em; }
.sl-nf { padding: 6px var(--gut) 0; margin: 0; }
/* Search: counts beside the names, a tick on the chosen ones in the list, and nothing found greyed */
.sl-c { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: .86em; }
.sl-line .sl-c { font-size: inherit; }
.sl-tick { display: none; }
.sl-tick svg { width: 14px; height: 14px; display: block; }
.sl-flow [aria-pressed="true"] .sl-tick { display: inline-flex; }
.sl-line > :disabled, .sl-flow > :disabled, .sl-city > :disabled { color: var(--text-off); cursor: default; }
@media (prefers-reduced-motion: reduce) { .sl-panel, .sl-tog svg { transition: none; } }
.page-head p.intro { color: var(--text-2); font-size: 14px; line-height: 20px; max-width: 60ch; text-wrap: pretty; }
.on-air { display: inline-flex; align-items: center; gap: 8px; }
.on-air i { width: 8px; height: 8px; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.on-air.on i { background: var(--text-1); box-shadow: none; }
.on-air.on { color: var(--text-1); }

/* a choice of one (Search's stations, Library's lists): written like Home's station names, the chosen one in ink
   and underlined, the rest grey, straight on the band with no well or raised box; scrolls sideways when it
   doesn't fit */
.seg {
  display: flex; column-gap: 20px; height: 44px; padding: 0 var(--gut); margin: 0; position: relative;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg > * { flex: none; }
/* Library's switch stays at the top while its list scrolls (the 8px above and below belong to the
   bar, so rows don't show in the gap); the rule under it comes only once something is beneath it */
/* Search's field and chips and Library's switch sit in a band ruled top and bottom, as Home's station names do,
   so every tab's content starts with the same edge-to-edge line under its title */
.seg-bar { position: sticky; top: calc(var(--bar-h) + var(--sat)); z-index: 3; background: var(--page); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html:has(.seg-bar) { --stuck-h: 46px; }
.seg > a, .seg > button {
  position: relative; display: inline-flex; align-items: center; height: 44px; padding: 0;
  border: 0; background: none; color: var(--text-3); white-space: nowrap;
  cursor: pointer; transition: color 150ms ease;
}
.seg > a:active, .seg > button:active { color: var(--text-1); }
.seg > a::before, .seg > button::before { content: ""; position: absolute; inset: 0 -10px; }   /* the gap's width to tap */
.seg > [aria-current="page"], .seg > [aria-checked="true"], .seg > [aria-pressed="true"], .seg > [aria-selected="true"] {
  color: var(--text-1); box-shadow: inset 0 -2px 0 var(--text-1);
}
.seg > :focus-visible { outline: 2px solid var(--text-1); outline-offset: -2px; }

/* ------------------------------------------------------------ sections */
.sec { margin-top: 24px; }
.page-head + .sec { margin-top: 0; }
.page-head + .sec > .sec-head:first-child { border-top: 0; }
.sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 36px; padding: 0 var(--gut); margin: 0;
  background: var(--panel); border-top: 1px solid var(--line-faint); border-bottom: 1px solid var(--line-faint);
  color: var(--text-1);
}
.sec-head h2 { font: inherit; letter-spacing: inherit; color: var(--text-1); text-wrap: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sec-head .count { color: var(--text-3); white-space: nowrap; }
.see-all {
  position: relative; display: inline-flex; align-items: center; gap: 4px; flex: none;
  color: var(--text-1); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color 150ms ease;
}
.see-all svg { width: 12px; height: 12px; }
.see-all::before { content: ""; position: absolute; inset: -14px -10px; }
.see-all:active { color: var(--text-2); }
.pad { padding: 0 var(--gut); }
.sec-head + .pad, .sec-head + .hint { margin-top: 12px; }

/* ------------------------------------------------------------ artwork */
.art {
  position: relative; display: block; width: 100%; aspect-ratio: 1;
  overflow: hidden; background: var(--well); isolation: isolate;
}
.art::before { /* placeholder glyph */
  content: ""; position: absolute; inset: 0; margin: auto; width: 30%; height: 30%;
  background: var(--line);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Crect x='3.5' y='3.5' width='17' height='17'/%3E%3Crect x='10' y='10' width='4' height='4'/%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 24 24' fill='none' stroke='%23000' stroke-width='1.5'%3E%3Crect x='3.5' y='3.5' width='17' height='17'/%3E%3Crect x='10' y='10' width='4' height='4'/%3E%3C/svg%3E") center/contain no-repeat;
}
.art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 220ms cubic-bezier(.2, 0, 0, 1);
}
.art img.ok { opacity: 1; }
/* the picture's own colour (cached art_color) fills the square while it loads, instead of the glyph */
.art.tinted { background: var(--ac); }
.art.tinted::before { display: none; }
.art::after { /* hairline so pale artwork keeps an edge on the page */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 0 1px var(--art-edge);
}
.art .tag { position: absolute; left: 6px; top: 6px; z-index: 2; }
/* a genre line: all three genres in a list row, the first and how many more on a narrow rail tile */
.g-one { display: none; }
.rail .g-rest { display: none; }
.rail .g-one { display: inline; }

/* the "playing now" marker on any art in a list: sound bars over the picture */
.art .eq-on {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  background: rgb(0 0 0 / .55); opacity: 0; transition: opacity 200ms ease;
}
.is-now .art .eq-on { opacity: 1; }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq i { width: 2px; height: 100%; background: currentColor; transform-origin: bottom; scale: 1 .45; }
.eq i:nth-child(2) { scale: 1 .9; }
.eq i:nth-child(3) { scale: 1 .6; }
.eq-on .eq { color: #fff; height: 14px; gap: 2px; }
.eq-on .eq i { width: 3px; }
body.np-paused .eq.on i, body.np-paused .is-now .eq-on .eq.on i { animation: none; }

/* ------------------------------------------------------------ live (rows) */
.live-list { display: block; padding: 0; }
.live-card {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 8px 4px 8px var(--gut); border-bottom: 1px solid var(--line-faint);
  transition: background-color 120ms ease;
}
.live-card:has(.live-open:active) { background: var(--pressed); }
.live-card .art, .live-card > .skel { width: 48px !important; height: 48px !important; flex: none; }
.live-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.live-open { text-align: start; min-width: 0; }
.live-open::after { content: ""; position: absolute; inset: 0; }
.live-name { font-size: 14px; line-height: 20px; overflow-wrap: break-word; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.live-ch { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-3); }
.live-ch b { flex: none; font: inherit; color: var(--text-2); }
.live-ch .lv { display: inline-flex; align-items: center; color: var(--live); font: inherit; letter-spacing: inherit; }
.live-ch .lv .dot { margin: 0; }
.live-loc, .live-ch .live-loc { min-width: 0; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-ch b + .live-loc::before { content: "·"; margin-right: 8px; }
.live-body > .live-loc { font-size: 13px; line-height: 18px; color: var(--text-2); }
.live-body .gline { margin-top: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; }

.round-play {
  position: relative; z-index: 1; flex: none; width: 44px; height: 44px;
  display: grid; place-items: center; color: var(--text-1);
  transition: scale 150ms var(--ease-out), background-color 150ms ease;
}
.round-play svg { width: 16px; height: 16px; }
.round-play:active { scale: .96; background: var(--pressed); }
.round-play .eq { display: none; }
.is-now .round-play svg { display: none; }
.is-now .round-play .eq { display: inline-flex; }

/* ------------------------------------------------------------ rails + lists of tiles */
/* side scrollers move on one axis only: overflow-y hidden, so a corner button or hit area poking out
   below can't make them scroll up and down */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 12px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 12px var(--gut) 10px; scroll-padding-inline: var(--gut);
  scrollbar-width: none; align-items: start;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail.sm { grid-auto-columns: 34%; }
@media (min-width: 600px) { .rail { grid-auto-columns: 28%; } .rail.sm { grid-auto-columns: 22%; } }
/* a grid of tiles reads as a list: one row each, like every other list */
.grid { display: block; padding: 0; }

/* ------------------------------------------------------------ tiles */
.tile { position: relative; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.tile > .art { grid-column: 1 / -1; transition: scale 150ms var(--ease-out); }
.tile:has(.tile-open:active) > .art { scale: .96; }
/* Press feedback inside scrolling content waits a beat (as iOS lists do), so a finger that's only
   starting a scroll doesn't press things. Letting go has no delay. */
.tile:has(.tile-open:active) > .art, .row:has(.row-open:active), .live-card:has(.live-open:active), .grid > .tile:has(.tile-open:active),
.link-row:active, .genre:active, a.chip:active, .q-now:active, .tl-jump:active::before, .tracklist li.tl-tap:active { transition-delay: 90ms; }
.tile-text { min-width: 0; padding-top: 8px; display: flex; flex-direction: column; }
.tile-open { display: block; text-align: start; }
.tile-open::after { content: ""; position: absolute; inset: 0; }
.tile .t {
  font-size: 14px; line-height: 20px; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.tile .s { font-size: 13px; line-height: 18px; color: var(--text-2); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: break-word; }
.tile .gline { margin-top: 0; }
.grid > .tile .t { font-size: 15px; letter-spacing: -.011em; }
.tile .mast { margin-top: 2px; }
/* a rail tile is too narrow for station and date on one line: the station keeps the line, the date goes
   under it. Grid tiles are drawn as full-width rows on phones and keep the date at the right. */
.rail .tile .mast { flex-wrap: wrap; row-gap: 2px; }
.rail .tile .mast .st { max-width: calc(100% - 24px); }   /* clear of the options button in the corner */
.rail .tile .mast .d { flex-basis: 100%; margin-left: 0; padding-left: 0; }
/* rail tiles line up: the title holds two lines, the show one; the title gets the tile's width and
   the options button sits in the corner beside the masthead */
.rail .tile .t { text-wrap: pretty; }   /* up to two lines, broken evenly; what follows sits right under it, no reserved gap */
.rail .tile .s { -webkit-line-clamp: 1; }
.rail .tile .tile-text { grid-column: 1 / -1; }
.rail .tile .more-btn { position: absolute; right: -8px; bottom: -6px; margin: 0; }
.mast .st .lv { margin-right: 6px; vertical-align: 1px; }
.more-btn {
  position: relative; z-index: 1; width: 32px; height: 40px; margin: 4px -8px 0 0;
  display: grid; place-items: center; color: var(--text-3);
  transition: color 150ms ease, background-color 150ms ease;
}
.more-btn::before { content: ""; position: absolute; inset: -4px -6px; } /* 44 to tap */
.more-btn:active { color: var(--text-1); background: var(--pressed); }
.grid > .tile {
  grid-template-columns: 48px minmax(0, 1fr) 44px; column-gap: 12px; align-items: start;
  min-height: 64px; padding: 8px 4px 8px var(--gut); border-bottom: 1px solid var(--line-faint);
  transition: background-color 120ms ease;
}
.grid > .tile > .art { grid-column: 1; grid-row: 1; width: 48px; margin-top: 2px; }
.grid > .tile:has(.tile-open:active) > .art { scale: none; }
.grid > .tile:has(.tile-open:active) { background: var(--pressed); }
.grid > .tile .tile-text { grid-column: 2; grid-row: 1; padding-top: 0; }
.grid > .tile .more-btn { grid-column: 3; grid-row: 1; width: 44px; height: 44px; margin: 0; align-self: center; }
.grid > .tile .more-btn::before { content: none; }
/* skeletons in a list of tiles hold a row's shape */
.grid > div:not(.tile) {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 12px; align-content: start;
  min-height: 71px; padding: 8px var(--gut); border-bottom: 1px solid var(--line-faint);
}
.grid > div:not(.tile) > .skel { grid-row: 1 / span 3; width: 48px; height: 48px; aspect-ratio: auto !important; margin-top: 2px; }
.grid > div:not(.tile) > .skel-t { grid-column: 2; margin-top: 4px; }

/* ------------------------------------------------------------ rows */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { border-bottom: 1px solid var(--line-faint); }
/* the last row of a section has no rule of its own: the next section's head draws one */
.sec > .rows > li:last-child, .sec > .grid > .tile:last-child, .sec > .live-list > :last-child { border-bottom: 0; }

/* ------------------------------------------------------------ the ledger
   A Latest list by day: each day's divider sticks under the bar and whatever is stuck under it, and
   says the date once, so the rows drop theirs. */
.ledger .day { position: relative; }
/* days out of sight skip layout and paint; app.js (llHold) gives each the height it measured, so nothing moves */
.ledger > .day.cv { content-visibility: auto; }
/* and Search's rows the same way, one by one (a row's own rule still draws; its focus rings stay inside it) */
.ll-list > .rows > li.cv { content-visibility: auto; }
.ledger .day-h {
  position: sticky; top: calc(var(--bar-h) + var(--sat) + var(--stuck-h, 0px)); z-index: 2;
  display: flex; align-items: center; gap: 8px; height: 28px; margin: 0; padding: 0 var(--gut);
  background: var(--page); border-bottom: 1px solid var(--line); color: var(--text-3);
  font-family: var(--font-mono); font-weight: 400; font-size: 11px; line-height: 14px; letter-spacing: .06em;
  text-transform: uppercase; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ledger .mast .d { display: none; }
.ledger .grid > .tile:last-child { border-bottom: 0; }   /* the next day's divider draws the rule */

/* ------------------------------------------------------------ long lists
   Pages arrive on their own; the foot says what's happening (loading, a failed page, the end). The rows
   in view are kept still by app.js (llAppend), never by the browser's scroll anchoring. */
.ll-wrap, .ll-list, .ll-foot { overflow-anchor: none; }
.ll-foot { min-height: 1px; }
.ll-foot > .grid, .ll-foot > .rows { border-top: 1px solid var(--line-faint); }
.sec > .ll-list > .rows > li:last-child { border-bottom: 0; }
.ll-end { display: grid; justify-items: center; gap: 12px; padding: 24px var(--gut) 8px; text-align: center; border-top: 1px solid var(--line); }
.ll-end p { color: var(--text-2); font-size: 14px; line-height: 20px; max-width: 40ch; text-wrap: pretty; }
.ll-end p.label { color: var(--text-3); font-size: 11px; line-height: 16px; letter-spacing: .06em; max-width: 44ch; }
.ll-none { padding: 8px 0 0; }

/* Rider: one bar under the top bar holds the day you're on and the filters. It tucks under the top bar
   as you read down and the day dividers rise with it; any scroll up brings both back. */
#rb-s { border-top: 1px solid var(--line); }
.rb { position: sticky; top: calc(var(--bar-h) + var(--sat)); z-index: 4; background: var(--page); border-bottom: 1px solid var(--line);
  transition: translate 200ms var(--ease-out); }
html:has(.rb) { --stuck-h: 49px; }
html:has(.rb.tucked) { --stuck-h: 0px; }
.rb.tucked { translate: 0 -100%; }
.rb-in { display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 var(--gut); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl, 0px), #000 calc(100% - var(--fr, 0px)), transparent); }
.rb-in::-webkit-scrollbar { display: none; }
.rb-sep { flex: none; width: 1px; height: 20px; background: var(--line); margin: 0 4px 0 2px; }

/* a filter chip: a mono label and a caret; chosen, it takes the ink */
.ll-chip { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 1px solid var(--line);
  color: var(--text-1); font-family: var(--font-mono); font-size: 11px; line-height: 14px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  font-variant-numeric: tabular-nums; transition: background-color 150ms ease, color 150ms ease, scale 150ms var(--ease-out); }
.ll-chip::before { content: ""; position: absolute; inset: -6px -3px; }    /* 44px tall to the finger */
.ll-chip svg { width: 12px; height: 12px; transition: rotate 200ms var(--ease-out); }
.ll-chip[aria-expanded="true"] { border-color: var(--text-1); }
.ll-chip[aria-expanded="true"] svg { rotate: 180deg; }
.ll-chip[aria-pressed="true"] { background: var(--ink-bg); border-color: var(--ink-bg); color: var(--ink-fg); }
.ll-chip:active { scale: .96; }
.ll-chip:focus-visible { outline: 2px solid var(--text-1); outline-offset: 2px; }
.ll-x { width: 38px; justify-content: center; padding: 0; color: var(--text-2); }
.rb-pos, .rb-pos[aria-expanded="true"] { border-color: transparent; padding-left: 0; }

/* the panel a chip drops: the days to jump to, or a facet's values to tick */
.ll-panel { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; background: var(--page); border-bottom: 1px solid var(--line);
  max-height: min(440px, calc(100dvh - var(--bar-h) - var(--sat) - var(--stuck-h, 0px) - var(--tabs-h) - var(--mini-h) - var(--sab) - 16px)); }
.ll-panel.in { animation: ll-drop 180ms var(--ease-out); }
@keyframes ll-drop { from { opacity: 0; translate: 0 -6px; } }
.ll-ph { flex: none; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 var(--gut); border-bottom: 1px solid var(--line-faint); }
.ll-ph .label { font-size: 11px; line-height: 14px; letter-spacing: .06em; }
.ll-ph .n { margin-left: auto; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ll-ph .text-btn { flex: none; }
.ll-opts { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 4px; }
.ll-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 var(--gut); font-size: 15px; line-height: 20px; color: var(--text-1);
  text-align: left; transition: background-color 120ms ease; }
.ll-opt + .ll-opt { border-top: 1px solid var(--line-faint); }
.ll-opt:active { background: var(--pressed); }
.ll-opt:disabled { color: var(--text-off); }
.ll-opt:focus-visible { outline: 2px solid var(--text-1); outline-offset: -2px; }
.ll-opt .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ll-opt .n { margin-left: auto; color: var(--text-3); font-family: var(--font-mono); font-size: 11px; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.ll-opt .box { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--line-control); }
.ll-opt .box svg { width: 14px; height: 14px; opacity: 0; }
.ll-opt[aria-pressed="true"] .box { background: var(--ink-bg); border-color: var(--ink-bg); color: var(--ink-fg); }
.ll-opt[aria-pressed="true"] .box svg { opacity: 1; }
.ll-opt .mark.none { background: none; box-shadow: inset 0 0 0 1px var(--line-control); }
.ll-day .nm { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.ll-day[aria-current="true"] .nm::after { content: " · you’re here"; color: var(--text-3); }
.ll-older { color: var(--text-2); }
.ll-older svg { margin-left: auto; color: var(--text-3); }
.ll-mh { padding: 14px var(--gut) 6px; color: var(--text-3); font-size: 11px; line-height: 14px; letter-spacing: .06em; border-top: 1px solid var(--line-faint); }
.ll-mh:first-child { border-top: 0; }
.ll-note { padding: 14px var(--gut); color: var(--text-3); font-size: 11px; letter-spacing: .06em; border-top: 1px solid var(--line-faint); }
.ll-scrim { position: fixed; inset: 0; z-index: 2; background: var(--scrim); touch-action: none; }
.search-top.ll-open { z-index: 4; }
.search-top > .ll-panel { border-top: 1px solid var(--line); }

/* the way back after a jump: a pill under the bar; on a page without one (a show, a DJ) it waits above the
   player instead, clear of the page's picture */
.ll-ret { position: absolute; top: calc(100% + 8px); left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; }
.ll-ret.fixed { position: fixed; top: auto; bottom: calc(var(--tabs-h) + var(--sab) + 12px); z-index: 5; }
body.has-mini .ll-ret.fixed { bottom: calc(var(--tabs-h) + var(--mini-h) + var(--sab) + 12px); }
.ll-ret.in { animation: ll-drop 200ms var(--ease-out); }
.ll-ret.fixed.in { animation-name: ll-rise; }
@keyframes ll-rise { from { opacity: 0; translate: 0 6px; } }
.ll-retb { position: relative; pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; height: 36px; max-width: calc(100vw - 2 * var(--gut)); padding: 0 12px;
  background: var(--ink-bg); color: var(--ink-fg); font-family: var(--font-mono); font-size: 11px; line-height: 14px; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap; transition: scale 150ms var(--ease-out); }
.ll-retb::before { content: ""; position: absolute; inset: -4px; }
.ll-retb svg { flex: none; width: 14px; height: 14px; }
.ll-retb span { overflow: hidden; text-overflow: ellipsis; }
.ll-retb:active { scale: .96; }
.ll-retb:focus-visible { outline: 2px solid var(--text-1); outline-offset: 2px; }
.ll-panel:not([hidden]) ~ .ll-ret, .rb.tucked .ll-ret { visibility: hidden; }

/* Search: the filter chips share the station buttons' line, at their height, so the block doesn't grow */
.s-row-in { display: flex; gap: 6px; align-items: center; }
.s-row-in > .sl-top { flex: 1; }
.s-row-in:has(.s-chips:not(:empty)) { padding-right: var(--gut); }
.s-row-in:has(.s-chips:not(:empty)) .sl-tog { padding-right: 8px; }
.s-chips { flex: none; display: flex; gap: 6px; }
.s-chips:empty { display: none; }
.s-chips .ll-chip { height: 44px; }
.s-chips .ll-chip::before { inset: 0 -3px; }
@media (prefers-reduced-motion: reduce) {
  .rb, .ll-chip svg { transition: none; }
  .ll-panel.in, .ll-ret.in { animation: none; }
}
.row {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  min-height: 64px; padding: 8px 4px 8px var(--gut);
  transition: background-color 120ms ease, opacity 180ms ease, translate 180ms var(--ease-exit);
}
.row:has(.row-open:active) { background: var(--pressed); }
.row > .art, .row > .skel { width: 48px !important; height: 48px !important; flex: none; }
/* text hangs from the top of the row, the picture's top level with the title's; the button centres */
.row > .art, .row > .skel, .row > .mosaic, .row > .num { margin-top: 2px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-text > .skel-t { margin-top: 4px; }
.row-open { text-align: start; min-width: 0; }
.row-open::after { content: ""; position: absolute; inset: 0; }
/* masthead: station, then the show or the place, the date at the right; quiet mono under the title */
.mast { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-3); }
.mast .st { flex: none; max-width: none; min-width: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mast .pl { flex: 0 100 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mast .st + .pl::before { content: "·"; margin-right: 8px; color: var(--text-3); }
.mast .d { margin-left: auto; padding-left: 8px; flex: none; white-space: nowrap; }
/* Live is the one round mark in the app: squares are sound colours, so a red square beside a genre's
   square read as another genre. It leads the station line, as in the Live now rows. */
.mast .lv { display: inline-flex; flex: none; color: var(--live); }
.mast .lv i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.row .t {
  font-size: 15px; line-height: 20px; letter-spacing: -.011em; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.row .s { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--text-2); min-width: 0; }
.row .s span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.row .num { width: 24px; flex: none; text-align: end; color: var(--text-3); margin-right: -2px; }
.row-btn {
  position: relative; z-index: 1; flex: none; width: 44px; height: 44px; align-self: center;
  display: grid; place-items: center; color: var(--text-3);
  transition: color 150ms ease, background-color 150ms ease;
}
.row-btn:active { color: var(--text-1); background: var(--pressed); }
.row-btn:disabled { color: var(--text-off); }
.row.pending { opacity: .45; }
.row.leaving { opacity: 0; translate: -24px 0; }
/* queue: hold to lift, drag to reorder */
#qv .rows.numbered .row { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.rows.reordering > li { position: relative; transition: translate 200ms cubic-bezier(.645, .045, .355, 1); }
.rows.reordering > li.lifted { z-index: 2; transition: none; }
.rows.reordering > li.lifted.settling { transition: translate 180ms var(--ease-out); }
.rows.reordering > li.lifted .row {
  background: var(--page); outline: 1px solid var(--text-1); outline-offset: -1px; scale: 1.02;
  transition: scale 160ms var(--ease-out), background-color 160ms ease;
}
.rows.reordering > li.lifted.settling .row { scale: 1; }
.is-now .row .t, .row.is-now .t { color: var(--text-1); }

/* ------------------------------------------------------------ buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 14px; white-space: nowrap;
  font-family: var(--font-mono); font-weight: 400; font-size: 13px; line-height: 16px; letter-spacing: .04em; text-transform: uppercase;
  background: var(--btn-bg); color: var(--text-1); border: 1px solid var(--line);
  transition: scale 150ms var(--ease-out), background-color 150ms ease, opacity 150ms ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink-bg); border-color: var(--ink-bg); color: var(--ink-fg); }
.btn:not(:disabled):active { scale: .96; background-image: linear-gradient(var(--pressed), var(--pressed)); }
.btn-primary:not(:disabled):active { background-image: linear-gradient(rgb(128 128 128 / .2), rgb(128 128 128 / .2)); }
.btn:disabled { color: var(--text-off); cursor: default; }
.btn-primary:disabled { background: var(--well); border-color: var(--line); }
.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 12px; }
.btn-sm::before, .sm-done::before { content: ""; position: absolute; inset: -3px -1px; } /* 44 to tap, 40 to see */
.btn.loading { color: transparent; }
.btn.loading::after { content: ""; position: absolute; left: calc(50% - 7.5px); --dot-on: var(--text-1); }
.btn .eq { height: 12px; }

/* equal columns, so each pair of secondary buttons splits at the same x as the row below it */
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.actions .btn { min-width: 0; }
.actions .btn-primary, .actions > .btn:only-child { grid-column: 1 / -1; }
/* an episode's actions on one row: Play now, then square Play next, Save and More */
.actions.ep-acts { grid-template-columns: minmax(0, 1fr) 44px 44px 44px; }
.actions.ep-acts .btn-primary { grid-column: auto; }
.btn.icon-sq { width: 44px; padding: 0; }
.ep-acts [aria-pressed="true"] { border-color: var(--text-1); }
/* the date line: mono, like every other date */
.ep-meta { font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ chips + genre lines */
.chips { display: flex; flex-wrap: wrap; gap: 12px 6px; }
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px;
  border: 1px solid var(--line); background: none; color: var(--text-1); white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, scale 150ms var(--ease-out);
}
.chip .mark { width: 8px; height: 8px; }
a.chip::before, button.chip::before { content: ""; position: absolute; inset: -6px -3px; }
a.chip:active, button.chip:active { background: var(--pressed); }
/* genres on every row, tile and live card: one plain line, led by the show's colour on the sound map */
.gline { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; line-height: 18px; color: var(--text-2); }
.gline > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gdot { flex: none; width: 8px; height: 8px; }

/* ------------------------------------------------------------ sound map */
/* every genre where Every Noise at Once puts it; a square ring picks a spot */
.smap { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; background: var(--map-bg);
  border: 1px solid var(--line); overflow: hidden; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.smap::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(var(--map-cross), var(--map-cross)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--map-cross), var(--map-cross)) 0 50% / 100% 1px no-repeat; }
.smap:focus-visible { outline: 2px solid var(--text-1); outline-offset: 2px; }
.smap > i { position: absolute; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; opacity: var(--dot-o); pointer-events: none; }
.smap .lb { position: absolute; translate: -50% -50%; font-size: 11px; line-height: 14px; white-space: nowrap; pointer-events: none; color: var(--text-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .smap .lb { color: var(--c, var(--text-2)); } }
:root[data-theme="dark"] .smap .lb { color: var(--c, var(--text-2)); }
.smap .ax { position: absolute; font-size: 10px; line-height: 12px; color: var(--text-3); pointer-events: none; white-space: nowrap; }
.smap .ax.t { top: 8px; left: 50%; translate: -50% 0; }
.smap .ax.b { bottom: 8px; left: 50%; translate: -50% 0; }
.smap .ax.l { left: 6px; top: 50%; writing-mode: vertical-rl; rotate: 180deg; translate: 0 -50%; }
.smap .ax.r { right: 6px; top: 50%; writing-mode: vertical-rl; translate: 0 -50%; }
.smap .ring { position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px; pointer-events: none;
  border: 1.5px solid var(--text-1); }
.smap .ring::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--text-1); }
.smap .ring.sm { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.smap .ring.sm::after { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
.smap .here { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; pointer-events: none;
  box-shadow: 0 0 0 1.5px var(--page), 0 0 0 3px var(--text-1); }
.smap.mini { width: 104px; flex: none; touch-action: manipulation; cursor: pointer; }
.smap.mini > i { width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; }
button.smap.mini { transition: scale 150ms var(--ease-out); }
button.smap.mini:active { scale: .96; }

/* "Sounds like this" on an episode: the small map and where you are, the nudges under them */
.like {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px var(--gut); margin: 0; border-bottom: 1px solid var(--line-faint);
  background: linear-gradient(180deg, color-mix(in oklch, var(--glow, var(--page)) 18%, var(--page)), var(--page));   /* the sound's glow, as on By sound */
}
.like .smap.mini { width: 88px; }
.sec-head + .like.pad { margin-top: 0; }   /* the glow meets the heading's rule */
.like-c { display: contents; }
.like .near { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-1); text-wrap: pretty; }
.nudges { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nudges .btn { width: 100%; min-width: 0; padding: 0 8px; height: 40px; background: none; border-color: var(--line-faint); }
.nudges .btn[data-nudge="back"] { grid-column: 1 / -1; }

/* Search: the way into By sound */
.sound-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); background: var(--page);
  color: var(--text-1); text-decoration: none; }
.sound-card .smap.mini { width: 64px; }
.sound-card .sc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sound-card b { font-size: 14px; line-height: 20px; }
.sound-card .sc-text span { font-size: 13px; line-height: 18px; color: var(--text-3); }
.sound-card > svg { color: var(--text-3); }
#scard { margin-top: 16px; }

/* By sound: the place you're at glows in its colour (card, drawer, and a pool of light under the
   ring). The only glow in the app. */
@property --glow { syntax: "<color>"; inherits: true; initial-value: #888; }
/* the drawer's colour, set on the sheet, the ring and the pool of light alone: not inherited, so moving
   the ring doesn't restyle the map's few hundred dots */
@property --lit { syntax: "<color>"; inherits: false; initial-value: #888; }
.glow-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: start;
  width: 100%; padding: 16px; border: 1px solid var(--line); text-align: start; color: var(--text-1);
  background: linear-gradient(180deg, color-mix(in oklch, var(--glow) 34%, var(--panel)) 0, var(--panel) 80%);
  transition: --glow 450ms ease, scale 150ms ease-out; touch-action: manipulation; }
.glow-card:active { scale: .96; }
/* text on the left, top-aligned with the map; the button sits at the bottom of the text column */
.gc-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; min-height: 100%; }
.gc-text .label { color: var(--text-2); }
.gc-text b { margin-bottom: 12px; font-size: 18px; line-height: 24px; letter-spacing: -.025em; text-wrap: pretty; }
.gc-go { margin-top: auto; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; background: var(--page); border: 1px solid var(--line); color: var(--text-1); }
.glow-card .smap.mini { width: 96px; height: 96px; background: var(--page); }
.sheet.sound { gap: 12px; max-height: 88svh; overflow: hidden; touch-action: none; /* fits without scrolling; nothing to pan */
  background: linear-gradient(180deg, color-mix(in oklch, var(--lit) 30%, var(--panel)) 0, var(--panel) 40%); --skirt: var(--panel); }
.sm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sm-head [data-back] { margin-left: auto; }   /* opened from an episode: next to Done */
.s-back { margin-top: 12px; }
.sm-h { min-width: 0; }
.sm-h .label { color: var(--text-3); }
.sm-near { margin: 2px 0 0; min-height: 48px; font-size: 18px; line-height: 24px; letter-spacing: -.025em; text-wrap: balance; }
.sm-done { position: relative; flex: none; height: 40px; padding: 0 12px; background: var(--btn-bg); border: 1px solid var(--line); color: var(--text-1); }
.sm-done:active { background-image: linear-gradient(var(--pressed), var(--pressed)); }
.cr-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; min-height: 208px; border-top: 1px solid var(--line-faint); }
.cr-list li { display: flex; align-items: center; min-width: 0; border-bottom: 1px solid var(--line-faint); }
.cr { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; height: 51px; text-align: start; touch-action: manipulation; }
.cr .art { width: 40px; flex: none; }
.cr-t { min-width: 0; display: flex; flex-direction: column; }
.cr-t .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; line-height: 20px; }
.cr-play { flex: none; display: grid; place-items: center; width: 44px; height: 44px; color: var(--text-1); touch-action: manipulation; }
.cr-empty { display: flex; align-items: center; height: 51px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.smap.big > i { width: 4px; height: 4px; margin: -2px 0 0 -2px;
  opacity: calc(var(--dot-o) + (1 - var(--dot-o)) * var(--k, 0)); scale: calc(1 + .7 * var(--k, 0)); }
.smap .stag { position: absolute; translate: -50% -50%; display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px;
  background: var(--page); border: 1px solid var(--line); color: var(--text-1);
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 180ms ease-out; }
.smap .stag.on { opacity: 1; }
.smap .stag b { width: 6px; height: 6px; }
.smap.big .lb { opacity: .85; transition: opacity 150ms ease-out; }
.smap .lb.hid, .smap.big .lb.hid { opacity: 0; }   /* after the rule above, which otherwise wins */
/* the drawer's ring: a square lens lit in the colour of where it sits, with a centre point */
.smap.big .ring { left: 0; top: 0; width: 56px; height: 56px; margin: -28px 0 0 -28px;   /* moved by translate */
  border-color: color-mix(in oklch, var(--text-1) 92%, transparent);
  box-shadow: 0 0 22px 3px color-mix(in oklch, var(--lit) 65%, transparent), inset 0 0 16px color-mix(in oklch, var(--lit) 55%, transparent); }
.smap .pins { position: absolute; inset: 0; pointer-events: none; }
.smap .pin { animation: pin-in 220ms var(--ease-out) both; position: absolute; translate: -50% -50%; width: 26px;
  box-shadow: 0 0 0 1.5px var(--page), 0 0 0 2.5px color-mix(in oklch, var(--text-1) 20%, transparent); }
.smap .pin .art::before { display: none; }
.smap.big { width: max(180px, min(100%, calc(88svh - 360px))); margin: 0 auto; isolation: isolate; }
/* the pool of light under the ring: one layer twice the map's size, centred on the map's top-left corner
   and moved (translate) and sized (scale, the old gradient's farthest-corner reach) from app.js, so a drag
   never repaints the map's background. Behind the cross lines and dots, as the background was. */
.smap .glow { display: none; }
.smap.big .glow { display: block; position: absolute; left: 0; top: 0; width: 200%; height: 200%; margin: -100% 0 0 -100%;
  z-index: -1; pointer-events: none; will-change: translate, scale;
  background: radial-gradient(circle closest-side, color-mix(in oklch, var(--lit) 62%, transparent) 0,
    color-mix(in oklch, var(--lit) 40%, transparent) 10%, color-mix(in oklch, var(--lit) 20%, transparent) 21%,
    color-mix(in oklch, var(--lit) 7%, transparent) 31%, transparent 40%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .smap.big .glow {
    background: radial-gradient(circle closest-side, color-mix(in oklch, var(--lit) 55%, transparent) 0,
      color-mix(in oklch, var(--lit) 36%, transparent) 10%, color-mix(in oklch, var(--lit) 18%, transparent) 21%,
      color-mix(in oklch, var(--lit) 6%, transparent) 31%, transparent 40%);
  }
}
:root[data-theme="dark"] .smap.big .glow {
  background: radial-gradient(circle closest-side, color-mix(in oklch, var(--lit) 55%, transparent) 0,
    color-mix(in oklch, var(--lit) 36%, transparent) 10%, color-mix(in oklch, var(--lit) 18%, transparent) 21%,
    color-mix(in oklch, var(--lit) 6%, transparent) 31%, transparent 40%);
}


/* ------------------------------------------------------------ detail pages */
.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero .art { aspect-ratio: 16 / 9; max-height: 340px; width: 100%; }
.hero .art img { object-position: 50% 28%; }   /* faces sit high in a square photo */
.hero .art::after { box-shadow: none; }
.detail { position: relative; z-index: 1; padding: 16px var(--gut); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
/* the station above a show or episode title, then the show */
.kick { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; margin: 0; justify-self: start; }
.kick-st { position: relative; flex: none; color: var(--text-1); text-decoration: none; white-space: nowrap; }
a.kick-st::before, button.kick-st::before { content: ""; position: absolute; inset: -14px -6px; }
.kick > :not(:first-child) { min-width: 0; }
.kick .kicker-link, .kick .label { color: var(--text-2); }
.np-kicker .kick-st { color: var(--text-1); }
.kicker-link {
  position: relative; justify-self: start; display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-1); max-width: 100%;
}
.kicker-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line-control); }
.kicker-link svg { width: 12px; height: 12px; }
.kicker-link::before { content: ""; position: absolute; inset: -14px -6px; }
.detail .actions { margin-top: 4px; }
.prose {
  font-size: 15px; line-height: 24px; color: var(--text-2); white-space: pre-line;
  overflow-wrap: break-word; max-width: 65ch; text-wrap: pretty;
}
.prose.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
section.sec.pad:has(> .prose) { margin-top: 8px; }
.text-btn {
  position: relative; justify-self: start; color: var(--text-1); padding: 4px 0;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.text-btn::before { content: ""; position: absolute; inset: -10px -10px; }

.tracklist { list-style: none; margin: 0; padding: 0; counter-reset: tr; }
.tracklist li {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center;
  min-height: 52px; padding: 6px var(--gut); border-bottom: 1px solid var(--line-faint); counter-increment: tr;
}
.tracklist li::before { content: counter(tr, decimal-leading-zero); color: var(--text-3); justify-self: end; font-variant-numeric: tabular-nums; }
/* with timings: the time replaces the number, and timed rows are buttons */
.tracklist.timed li { display: block; padding: 0; }
.tracklist.timed li::before { content: none; }
.tl-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; min-height: 52px; padding: 6px var(--gut); text-align: start; }
.tl-jump { position: relative; }
.tl-jump::before { content: ""; position: absolute; inset: 0; transition: background-color 120ms ease; }
.tl-jump:active::before { background: var(--pressed); }
.tl-jump > * { position: relative; }
.tl-time { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--text-3); }
/* the same artist as the row above steps back */
.tracklist .same b { color: var(--text-3); }
/* the track playing now: ink, with small bars by its time (no weight change) */
.tl-jump.is-cur .tl-time, .tl-jump.is-cur b, .tl-jump.is-cur span { color: var(--text-1); }
.tl-jump.is-cur .tl-time::before {
  content: ""; flex: none; width: 10px; height: 10px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='1' y='5' width='2' height='6'/%3E%3Crect x='5' y='1' width='2' height='10'/%3E%3Crect x='9' y='4' width='2' height='7'/%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'%3E%3Crect x='1' y='5' width='2' height='6'/%3E%3Crect x='5' y='1' width='2' height='10'/%3E%3Crect x='9' y='4' width='2' height='7'/%3E%3C/svg%3E") center/contain no-repeat;
}
.tl-jump:focus-visible { outline: 2px solid var(--text-1); outline-offset: -2px; }
.tracklist b { display: block; font-size: 14px; line-height: 20px; overflow-wrap: break-word; }
.tracklist span { display: block; color: var(--text-2); font-size: 13px; line-height: 18px; overflow-wrap: break-word; }
.tracklist .tl-time { display: flex; font-size: 12px; line-height: 16px; }
/* A held row opens the track's sheet, so a long press neither selects its words nor calls up the system's
   menu on a phone. Every row ends in a ⋯, and a row with no time opens it on a tap too (the row button's 44px, the
   gutter's room given to it as on any row). */
.tracklist li { -webkit-touch-callout: none; }
@media (hover: none) { .tracklist li { -webkit-user-select: none; user-select: none; } }
.tracklist span.tl-row { display: grid; }   /* over .tracklist span's block */
.tracklist:not(.timed) li.tl-tap, .tl-row:has(.tl-more) { grid-template-columns: 52px minmax(0, 1fr) 44px; padding-right: 4px; }
.tracklist li.tl-tap { cursor: pointer; transition: background-color 120ms ease; }
.tracklist.timed li.tl-timed { display: flex; align-items: center; padding-right: 4px; }
.tracklist li.tl-timed > .tl-jump { flex: 1; min-width: 0; padding-right: 0; }
.tracklist li.tl-tap:active:not(:has(.tl-more:active)) { background: var(--pressed); }

.link-row {
  position: relative; display: flex; align-items: center; gap: 12px; margin: 0;
  min-height: 64px; padding: 8px var(--gut); border-top: 1px solid var(--line-faint); border-bottom: 1px solid var(--line-faint);
  transition: background-color 120ms ease;
}
.link-row .art { width: 48px; flex: none; }
.link-row .lr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link-row .lr-text .label { font-size: 11px; line-height: 14px; }
.link-row .lr-text b { font-size: 14px; line-height: 20px; }
.link-row > svg { color: var(--text-3); }
.link-row:active { background: var(--pressed); }

/* ------------------------------------------------------------ states */
.empty {
  display: flex; flex-direction: column; align-items: flex-start; text-align: start; gap: 12px;
  padding: 32px var(--gut); color: var(--text-2);
}
.empty h3 { font-size: 18px; line-height: 23px; letter-spacing: -.025em; color: var(--text-1); }
.empty p { font-size: 14px; line-height: 20px; max-width: 60ch; text-wrap: pretty; }
.empty .e-actions { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; justify-content: flex-start; }
.empty.compact { padding: 16px var(--gut) 0; }

.skel { background: var(--well); }
.skel-t { height: 10px; background: var(--line-faint); margin-top: 10px; width: 82%; }
.skel-t.short { width: 48%; margin-top: 8px; height: 8px; background: var(--well); }
.skel-t.wide { width: 100%; }
.skel-t.big { height: 24px; width: 70%; margin-top: 0; }
/* a row's or tile's three lines: title, genres, masthead (the bars sit where their text's x-height would) */
.skel-t.sk-a { display: block; height: 10px; width: 70%; margin-top: 13px; }
.skel-t.sk-b, .skel-t.sk-c { display: block; height: 8px; margin-top: 6px; background: var(--well); }
.skel-t.sk-b { width: 55%; }
.skel-t.sk-c { width: 30%; }
.row-text.sk-text { min-height: 52px; }
.row-text.sk-text > .sk-a, .grid > div:not(.tile) > .sk-a { margin-top: 5px; }
.grid > div:not(.tile) > .sk-b, .grid > div:not(.tile) > .sk-c { margin-top: 6px; }
.sec-head .skel-t.big { height: 12px; background: var(--line-faint); }
@media (prefers-reduced-motion: no-preference) {
  .skel, .skel-t { animation: shimmer 1.4s ease-in-out infinite; }
}
@keyframes shimmer { 50% { opacity: .45; } }
/* working: three dots that light in turn, like a typed ellipsis (one 3px dot, the other two its shadows) */
.btn.loading::after, .spinner {
  width: 3px; height: 3px; border-radius: 50%;
  --dot-off: color-mix(in srgb, var(--dot-on) 28%, transparent);
  animation: dots 1.2s steps(1, end) infinite;
}
@keyframes dots {
  0%     { background: var(--dot-on);  box-shadow: 6px 0 var(--dot-off), 12px 0 var(--dot-off); }
  33.3%  { background: var(--dot-off); box-shadow: 6px 0 var(--dot-on),  12px 0 var(--dot-off); }
  66.6%  { background: var(--dot-off); box-shadow: 6px 0 var(--dot-off), 12px 0 var(--dot-on); }
}

.load-more { display: flex; justify-content: center; padding: 24px var(--gut) 0; }

/* ------------------------------------------------------------ search */
/* the field and the station filter are one block that stays at the top: deep in the results you can
   still retype or switch station (which starts the list from its top again) */
.search-top { position: sticky; top: calc(var(--bar-h) + var(--sat)); z-index: 3; background: var(--page); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
html:has(.search-top) { --stuck-h: 106px; }
.search-wrap { padding: 12px var(--gut) 4px; }   /* the station names sit on the band's bottom rule, as Home's do */
#sres > .sec:first-child, #sres > .arrive > .sec:first-child { margin-top: 0; }
#sres > #scard, #sres > .arrive > #scard { margin-top: 16px; }
.search-field {
  display: flex; align-items: center; height: 44px; padding-left: 11px; gap: 10px;
  background: var(--page); border: 1px solid var(--line-control);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.search-field:focus-within { border-color: var(--text-1); box-shadow: inset 0 0 0 1px var(--text-1); }   /* a square 2px edge, inside */
.search-field > svg { color: var(--text-2); }
.search-field input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; caret-color: var(--text-1);
  font-size: 16px; padding: 0; -webkit-appearance: none; appearance: none;
}
.search-field input::placeholder { color: var(--text-3); opacity: 1; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 44px; height: 42px; display: grid; place-items: center; color: var(--text-2); }
.search-clear span { display: grid; place-items: center; width: 24px; height: 24px; }
.search-clear svg { width: 14px; height: 14px; }
.hint { color: var(--text-2); font-size: 14px; line-height: 20px; max-width: 60ch; text-wrap: pretty; }
.hint b { color: var(--text-1); }
.genre-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px var(--gut) 0; }
.genre {
  position: relative; display: flex; align-items: center; height: 44px; padding: 0 12px;
  background: var(--btn-bg); border: 1px solid var(--line); color: var(--text-1);
  transition: scale 150ms var(--ease-out), background-color 150ms ease;
}
.genre:active { scale: .96; background-image: linear-gradient(var(--pressed), var(--pressed)); }

/* ------------------------------------------------------------ queue */
.q-now {
  position: relative; display: flex; align-items: center; gap: 12px; margin: 0;
  min-height: 72px; padding: 12px 12px 12px var(--gut); width: 100%; text-align: start;
  border-bottom: 1px solid var(--line-faint);   /* its top rule is the queue's own (#qv), there with or without it */
  transition: background-color 150ms ease;
}
.q-now:active { background: var(--pressed); }
.q-now .art { width: 48px; flex: none; }
.q-now .q-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.q-now .q-status { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.q-now .q-status .eq { height: 10px; color: var(--text-1); }
.q-now .t { font-size: 14px; line-height: 20px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.q-now > svg { color: var(--text-3); }
/* the numbers' column: the bars for what's on, then 1, 2, 3… below */
.q-now .num { width: 24px; flex: none; display: flex; justify-content: flex-end; margin-right: -2px; color: var(--text-1); }
.q-now .num .eq { height: 10px; }
.q-now-sec { margin-top: 0; }   /* what's on sits right under the heading */
/* the Queue's content starts on the same edge-to-edge line as every tab's first band, whether something is playing,
   only queued, or nothing at all */
#qv { border-top: 1px solid var(--line); }
#qv > .sec:first-child > .sec-head:first-child { border-top: 0; }
#qv > .empty:first-child { padding-top: 24px; }
/* what's been played steps back */
.q-hist .row { min-height: 56px; }
.q-hist .row > .art { width: 40px !important; height: 40px !important; }
.q-hist .row .t { color: var(--text-2); -webkit-line-clamp: 1; }
.q-hist .gline { display: none; }

/* ------------------------------------------------------------ dock: mini player + tabs */
.dock {
  position: fixed; inset: auto 0 0; z-index: var(--z-dock); pointer-events: none;
  /* Chrome's edge-to-edge pattern: the tabs are padded for the largest the bottom inset gets, and
     the dock is pulled down by the difference, so only bottom moves as the toolbar comes and goes */
  bottom: calc(var(--sab) - var(--sab-max));
}
.dock > * { pointer-events: auto; }
.mini {
  position: relative; display: flex; align-items: center; height: var(--mini-h);
  padding: 0 max(4px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: var(--panel); border-top: 1px solid var(--line);
  transition: translate 260ms var(--ease-sheet), opacity 200ms ease;
}
.mini.off { translate: 0 calc(100% + 16px); opacity: 0; }
.mini-open { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 12px; }
.mini-art {
  position: relative; width: 48px; height: 48px; flex: none; overflow: hidden; background: var(--art-color, var(--well));
  transition: scale 150ms var(--ease-out);
}
.mini-open:active .mini-art { scale: .96; }
.mini-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms ease; }
.mini-art img.ok { opacity: 1; }
.mini-text { min-width: 0; display: flex; flex-direction: column; }
.mini-title { font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { display: flex; align-items: center; gap: 8px; color: var(--text-3); min-width: 0; font-variant-numeric: tabular-nums; }
.mini-sub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub.err { color: var(--fail); }
.mini-btn {
  position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; color: var(--text-1);
  transition: scale 150ms var(--ease-out), opacity 150ms ease, background-color 150ms ease;
}
.mini-btn:not(:disabled):active { scale: .96; background: var(--pressed); }
.mini-btn:disabled { color: var(--text-off); }
.mini-bar { position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--line-faint); overflow: hidden; }
.mini-fill { height: 100%; background: var(--text-1); transform-origin: left; scale: var(--p, 0) 1; }
.mini-fill.full { scale: 1 1; background: var(--text-3); }
.mini-fill.live { scale: 0 1; }
.mini.live::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--live); pointer-events: none; }

.tabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  height: calc(var(--tabs-h) + var(--sab-max)); padding-bottom: var(--sab-max);
  background: var(--page); border-top: 1px solid var(--line);
  position: relative;
}
/* Chrome moves fixed elements a beat late while its address bar slides in or out; this skirt
   reaches below the screen edge so nothing shows through underneath in the meantime. */
.tabs::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 160px;
  background: var(--page); pointer-events: none;
}
.tabs a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-3); -webkit-user-select: none; user-select: none; transition: color 150ms ease;
}
.tabs a > span:first-child { display: grid; place-items: center; width: 16px; height: 16px; transition: scale 150ms var(--ease-out); }
.tabs a > span:nth-child(2) { margin-right: -.06em; } /* letter-spacing trails the last letter: pull it back so the label centres under the icon */
.tabs a:active > span:first-child { scale: .96; }
.tabs a.on { color: var(--text-1); } /* no bar: the mini player's progress line sits just above and the two read as one doubled mark */
.badge {
  position: absolute; top: 6px; left: calc(50% + 11px); min-width: 16px; height: 16px; padding: 0 3px;
  background: var(--page); border: 1px solid var(--line); color: var(--text-2);
  font-size: 10px; line-height: 14px; letter-spacing: 0; text-align: center;
}

/* play/pause icon cross-fade */
.pp { position: relative; }
.pp > span { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 200ms var(--ease-icon), scale 200ms var(--ease-icon), filter 200ms var(--ease-icon); }
.pp .i-pause { opacity: 0; scale: .25; filter: blur(4px); }
.pp[data-state="playing"] .i-play { opacity: 0; scale: .25; filter: blur(4px); }
.pp[data-state="playing"] .i-pause { opacity: 1; scale: 1; filter: none; }

/* ------------------------------------------------------------ now playing */
.np { position: fixed; inset: 0; z-index: var(--z-np); }
.np-backdrop { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 320ms var(--ease-sheet); }
.np.open .np-backdrop { opacity: 1; }
.np.closing .np-backdrop { transition-duration: 240ms; }
.np-sheet {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  --np-xl: max(24px, env(safe-area-inset-left)); --np-xr: max(24px, env(safe-area-inset-right));
  padding: var(--sat) var(--np-xr) calc(var(--sab) + 12px) var(--np-xl);
  background: var(--page); translate: 0 100%;
  transition: translate 320ms var(--ease-sheet);
  box-shadow: 0 40px 0 0 var(--page);   /* not a shadow: a skirt, so pulling it up past the top shows more sheet */
  scroll-padding-top: calc(var(--sat) + 72px);
}
.np.open .np-sheet { translate: 0 0; }
.np-sheet > * { flex-shrink: 0; }
.np.closing .np-sheet { transition-duration: 240ms; }
.np-sheet.dragging { transition: none; border-top: 1px solid var(--line); }
.np-drag { touch-action: none; flex: none; -webkit-user-select: none; user-select: none; }
/* The player's own bar stays at the top while the sheet scrolls down to the tracklist, so Close is
   always there; once the title and the big play button have gone under it, it carries them
   (.has-t: title and current track in place of the source; .has-p: play/pause in place of More). */
.np-top {
  position: sticky; top: 0; z-index: 3; flex: none;
  margin: calc(-1 * var(--sat)) calc(-1 * var(--np-xr)) 0 calc(-1 * var(--np-xl)); padding: var(--sat) var(--np-xr) 0 var(--np-xl); background: var(--page);
  touch-action: none; -webkit-user-select: none; user-select: none;
}
.np-mid, .np-end { display: grid; min-width: 0; }
.np-mid > *, .np-end > * { grid-area: 1 / 1; }
.np-source { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; transition: opacity 180ms ease, visibility 0s; }
.np-now {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 0;
  opacity: 0; visibility: hidden; translate: 0 4px;
  transition: opacity 180ms ease, translate 180ms var(--ease-out), visibility 0s 180ms;
}
.np-now > span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-now-t { font-size: 14px; line-height: 18px; color: var(--text-1); }
.np-now-s { color: var(--text-3); }
.np-now-s:empty { display: none; }
/* scrolled: gone from sight and from the Tab order (More has Play on… meanwhile) */
.np-top.has-t .np-source { opacity: 0; visibility: hidden; transition: opacity 180ms ease, visibility 0s 180ms; }
/* where it plays, the owner's alone: a tap picks the device */
button.np-source { justify-self: center; max-width: 100%; padding: 7px 12px; transition: opacity 180ms ease, visibility 0s, background-color 150ms ease, scale 150ms var(--ease-out); }
button.np-source:active { background: var(--pressed); scale: .96; }
.np-source-r { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.np-source-r > span:last-child { display: flex; flex: none; }
.np-source-r svg { width: 12px; height: 12px; color: var(--text-2); }
.dev-menu button > svg:last-child { margin-left: auto; color: var(--text-1); }
.dev-menu [aria-pressed="false"] > svg:last-child { visibility: hidden; }
.np-top.has-t .np-now { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s; }
#np-pp, #np-more { transition: opacity 150ms ease, visibility 0s 150ms, background-color 150ms ease, scale 150ms var(--ease-out); }
#np-more { color: var(--text-2); }
#np-pp { opacity: 0; visibility: hidden; }
#np-pp svg { width: 20px; height: 20px; }
.np-top.has-p #np-more { opacity: 0; visibility: hidden; }
.np-top.has-p #np-pp, .np-top:not(.has-p) #np-more { transition-delay: 0s; }
.np-top.has-p #np-pp { opacity: 1; visibility: visible; }
.grabber { display: block; width: 36px; height: 4px; background: var(--line-control); margin: 8px auto 0; }
.np-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; column-gap: 4px; height: 48px;
  margin: 0 calc(-1 * var(--np-xr)) 0 calc(-1 * var(--np-xl)); border-bottom: 1px solid var(--line);
  /* its rule bleeds to the screen's edges; Close and More stay 4px in, and clear of the notch on a phone on its side */
  padding: 0 max(4px, env(safe-area-inset-right)) 0 max(4px, env(safe-area-inset-left)); }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; color: var(--text-1); transition: background-color 150ms ease, scale 150ms var(--ease-out); }
.icon-btn:not(:disabled):active { background: var(--pressed); scale: .96; }
.icon-btn:disabled { color: var(--text-off); }
.np-source-k { color: var(--text-3); }
.np-source-v { color: var(--text-1); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-art-wrap { display: flex; justify-content: center; padding: 24px 0 0; }
.np-art {
  position: relative; width: min(100%, max(200px, calc(100dvh - 420px - var(--np-extra, 0px) - var(--sat) - var(--sab)))); aspect-ratio: 1;
  overflow: hidden; background: var(--art-color, var(--well));   /* the cover's colour until the photo lands */
  transition: opacity 300ms ease;   /* the same size playing or paused: the button says which */
}
.np-sheet:has(.np-id:not([hidden])) { --np-extra: 52px; }   /* room for the What's this? button */
.np-art::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--art-edge); pointer-events: none; }
.np-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms ease; }
.np-art img.ok { opacity: 1; }
.np-art img, .mini-art img { pointer-events: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.np-art.loading { opacity: .55; }
/* Cover flight: a copy of the cover travels between the mini player's square and the player's on the
   sheet's own curve and time, laid out at the bigger square and scaled down so the photo is never
   blown up. The real squares hide while it's in the air. */
.cf-fly { position: fixed; z-index: calc(var(--z-np) + 1); overflow: hidden; pointer-events: none;
  background: var(--well); transform-origin: 0 0; will-change: transform; }
.cf-fly::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--art-edge); }
.cf-fly img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms ease; }
.cf-fly img.ok { opacity: 1; }
body.cf-flying #np-art, body.cf-flying .mini-art { visibility: hidden; }
/* the mini player is a handle: a vertical drag on it opens the player, it doesn't scroll the page */
#mini { touch-action: none; }
/* queue: swipe a row left to remove it. The browser keeps vertical scrolling; the layer behind says
   what letting go will do. */
#qv .rows.numbered .row { touch-action: pan-y; }
#qv .rows.numbered > li { position: relative; }
#qv .rows.numbered > li.q-swiping .row { background: var(--page); }
.q-rm {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding-right: var(--gut); background: var(--fail); color: var(--page); opacity: 0; pointer-events: none;
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase;
}
.q-rm svg { width: 16px; height: 16px; }
li.q-gone { overflow: hidden; }
.np-art .np-state {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 10px; background: rgb(0 0 0 / .72); color: #fff;
  font-family: var(--font-mono); font-size: 11px; line-height: 14px; letter-spacing: .03em; text-transform: uppercase;
}
.spinner { display: inline-block; flex: none; margin-right: 20px; --dot-on: currentColor; }   /* 20: the two shadow dots sit 12px to its right */
.np-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 4px; margin-top: 20px; min-height: 0; align-content: start; }
.np-info > :not(.np-save) { grid-column: 1; }
.np-save { grid-column: 2; grid-row: 1 / 4; align-self: center; }
.np-title-link { font: inherit; letter-spacing: inherit; color: inherit; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-color 120ms ease; }
@media (hover: hover) { .np-title-link:hover { text-decoration-color: currentColor; } }
.np-title-link:active { color: var(--text-2); }
.np-kicker { display: flex; align-items: center; gap: 12px; min-height: 16px; color: var(--text-2); min-width: 0; }
.np-kicker .lv { color: var(--live); display: inline-flex; align-items: center; gap: 8px; }
.np-kicker button { position: relative; color: var(--text-1); display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.np-kicker button.label { color: var(--text-2); }
.np-kicker button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-kicker button svg { width: 12px; height: 12px; }
.np-kicker button::before { content: ""; position: absolute; inset: -14px -6px; }
.np-title { font-size: 24px; line-height: 29px; min-height: 29px; letter-spacing: -.025em; padding-block: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.np-sub { font-size: 14px; line-height: 20px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 20px; }
.np-trk { position: relative; display: flex; align-items: center; gap: 8px; max-width: 100%; color: var(--text-1); text-align: start; }
.np-trk::before { content: ""; position: absolute; inset: -12px -6px; }   /* 44px to tap */
.np-trk .eq { flex: none; height: 10px; }
.np-trk-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-trk:active .np-trk-t { color: var(--text-2); }

.scrub { position: relative; height: 44px; margin-top: 16px; touch-action: none; cursor: pointer; --p: 0; }
.scrub-track { position: absolute; left: 0; right: 0; top: 20px; height: 4px; background: var(--track); overflow: hidden; isolation: isolate; transition: scale 150ms var(--ease-out); }
.scrub-fill { position: absolute; inset: 0; background: var(--text-1); transform-origin: left; scale: var(--p) 1; }
/* the tracklist on the bar: a gap where each track starts; the rest of the current one a shade darker */
.scrub-track i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--page); z-index: 1; }
.scrub-cur { position: absolute; top: 0; bottom: 0; background: var(--text-3); }
.scrub-thumb {
  position: absolute; left: 0; right: 0; top: 16px; height: 12px; pointer-events: none;
  translate: calc(var(--p) * 100%) 0;
}
.scrub-thumb::before {
  content: ""; position: absolute; left: -6px; top: 0; width: 12px; height: 12px; background: var(--text-1);
  transition: scale 150ms var(--ease-out);
}
.scrub.dragging .scrub-track { scale: 1 1.5; }
.scrub.dragging .scrub-thumb::before { scale: 1.5; }
.scrub.off { cursor: default; }
.scrub.off .scrub-thumb { display: none; }
/* live: no red field, one round mark where the thumb would sit at the end */
.scrub.live .scrub-fill { scale: 0 1; }
.scrub.live::after { content: ""; position: absolute; right: -4px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.scrub.endless .scrub-fill { scale: 1 1; background: var(--text-3); }
.scrub.loading .scrub-fill { width: 30%; scale: 1 1; background: var(--text-3); animation: indet 1.2s var(--ease-sheet) infinite; }
.scrub.idle .scrub-fill { scale: 0 1; }
@keyframes indet { from { translate: -100% 0; } to { translate: 340% 0; } }
.times { display: flex; justify-content: space-between; margin-top: -6px; color: var(--text-3); }
.times .lv { color: var(--live); display: inline-flex; align-items: center; gap: 8px; }

/* one ink slab and four glyphs on an even pitch across the text column */
.transport { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; justify-content: stretch; align-items: center; margin: 16px 0 24px; }
.np.is-live .transport { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.np.is-live #t-back, .np.is-live #t-fwd { display: none; }
.t-btn { width: 100%; height: 56px; display: grid; place-items: center; color: var(--text-1); border: 1px solid transparent; transition: scale 150ms var(--ease-out), background-color 150ms ease; }
.t-btn svg { width: 20px; height: 20px; }
#t-back svg, #t-fwd svg { width: 28px; height: 28px; }
.t-btn:not(:disabled):active { scale: .96; background-color: var(--pressed); }
.t-btn:disabled { color: var(--text-off); }
.t-play { width: 100%; height: 56px; background: var(--ink-bg); color: var(--ink-fg); border: 1px solid var(--ink-bg); transition: scale 150ms var(--ease-out), background-color 150ms ease; }
.t-play svg { width: 20px; height: 20px; }
.t-play .i-play svg { translate: 1px 0; }   /* optical: the triangle's weight sits left of its box */
.t-play:not(:disabled):active { scale: .96; background-image: linear-gradient(rgb(128 128 128 / .2), rgb(128 128 128 / .2)); }
.t-play:disabled { background: var(--well); border-color: var(--line); color: var(--text-off); }

.np-next {
  display: flex; align-items: center; gap: 12px; width: auto; margin: auto calc(-1 * var(--np-xr)) 0 calc(-1 * var(--np-xl)); padding: 12px var(--np-xr) 4px var(--np-xl);
  border-top: 1px solid var(--line); text-align: start; min-height: 64px;
}
.np-next .label { color: var(--text-3); flex: none; }
.np-next .art { width: 36px; flex: none; }
.np-next .nx-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }   /* the title, then the station · show or place line a row shows */
.np-next .nx-t { min-width: 0; font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-next .nx-e { flex: 1; color: var(--text-3); font-size: 13px; line-height: 18px; }
.np-next > svg { color: var(--text-3); }
.np-next:active .nx-t { color: var(--text-2); }

/* ------------------------------------------------------------ sheets */
.sheet-wrap { position: fixed; inset: 0; z-index: var(--z-sheet); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: env(keyboard-inset-height, 0px); }
/* while a sheet is open the page behind it never scrolls: a swipe on a sheet that doesn't itself scroll
   used to fall through to the page, and on phones that also moved the URL bar and resized the sheet */
html:has(.sheet-wrap.open), html:has(body.np-open) { overflow: hidden; }
.sheet-backdrop { touch-action: none; position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 260ms var(--ease-sheet); }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet {
  position: relative; display: grid; gap: 12px; max-height: calc(88dvh - env(keyboard-inset-height, 0px)); overflow-y: auto; overscroll-behavior: contain;
  grid-template-columns: minmax(0, 1fr); overflow-x: hidden;   /* never wider than the screen: a long line truncates, the sheet doesn't scroll sideways */
  padding: 0 var(--gut) calc(16px + var(--sab)); background: var(--sheet-bg); border-top: 1px solid var(--line);
  padding-inline: max(var(--gut), env(safe-area-inset-left)) max(var(--gut), env(safe-area-inset-right));
  translate: 0 100%; transition: translate 260ms var(--ease-sheet);
  box-shadow: 0 40px 0 0 var(--skirt, var(--sheet-bg));   /* a skirt, not a shadow: pulled up, it shows more sheet */
}
.sheet-wrap.open .sheet { translate: 0 0; }
.sheet-wrap.closing .sheet, .sheet-wrap.closing .sheet-backdrop { transition-duration: 200ms; }
.sheet-wrap.closing { pointer-events: none; }
.sheet.dragging { transition: none; }
.sheet-grab { touch-action: none; -webkit-user-select: none; user-select: none; padding: 0; display: grid; gap: 12px; }
.sheet-grab .grabber { margin-top: 8px; }
.sheet-head { display: flex; gap: 12px; align-items: center; padding: 0 0 12px; margin: 0 calc(-1 * var(--gut)); padding-inline: var(--gut); border-bottom: 1px solid var(--line); }
.sheet-head .art { width: 48px; flex: none; }
.sheet-head .t { font-size: 18px; line-height: 24px; letter-spacing: -.025em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.sheet-head .s { margin-top: 2px; }
.sheet-desc { font-size: 14px; line-height: 20px; color: var(--text-2); text-wrap: pretty; }
.menu { display: grid; border: 1px solid var(--line); background: var(--sheet-bg); }
.menu button, .menu a {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px;
  font-size: 15px; line-height: 20px; color: var(--text-1); text-align: start; transition: background-color 120ms ease;
}
.menu > * + * { border-top: 1px solid var(--line-faint); }
.menu :focus-visible { outline-offset: -2px; }
.menu svg { color: var(--text-2); }
.menu button:active, .menu a:active { background: var(--pressed); }
.menu button:disabled { color: var(--text-off); }
.menu button:disabled svg { color: var(--text-off); }
.menu .danger, .menu .danger svg { color: var(--fail); }
.sheet .btn-primary, .sheet .btn-block { height: 48px; }
.sheet-cancel { display: flex; align-items: center; justify-content: center; height: 48px; background: var(--btn-bg); border: 1px solid var(--line); color: var(--text-1); transition: background-color 120ms ease, scale 150ms var(--ease-out); }
.sheet-cancel:active { background-image: linear-gradient(var(--pressed), var(--pressed)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sheet-cancel { background: var(--well); } }
:root[data-theme="dark"] .sheet-cancel { background: var(--well); }   /* a step up from the sheet, not down */
.confirm-head { padding: 4px 0; display: grid; gap: 4px; }
.confirm-head h3 { font-size: 18px; line-height: 24px; letter-spacing: -.025em; }
.confirm-head p { color: var(--text-2); font-size: 14px; line-height: 20px; max-width: 60ch; text-wrap: pretty; }

/* A sheet opened with a mouse from something on screen: a popover beside it, placed by app.js (placePop),
   which sets left, top or bottom, the height it has room for, and the corner it grows from. No scrim (the
   backdrop is still there, unseen, to catch the click outside), no grab handle, and no Cancel outside a
   confirm: Escape and a click outside cancel. Ids, so these win over desktop.css's dialog at any width. */
#sheet-wrap.pop { display: block; padding: 0; }
#sheet-wrap.pop .sheet-backdrop { background: none; transition: none; }
#sheet-wrap.pop #sheet {
  --gut: 12px;
  position: fixed; gap: 8px; padding: 8px 12px 12px;
  width: max-content; min-width: 220px; max-width: min(320px, calc(100vw - 16px));
  border: 1px solid var(--line); box-shadow: none; background: var(--sheet-bg);
  translate: none; opacity: 0; scale: .97;
  transition: opacity 120ms ease-out, scale 120ms var(--ease-out);
}
#sheet-wrap.pop-w #sheet { width: 360px; max-width: calc(100vw - 16px); }
#sheet-wrap.pop.open #sheet { opacity: 1; scale: 1; }
#sheet-wrap.pop.closing #sheet { transition-duration: 80ms; }
#sheet-wrap.pop .grabber { display: none; }
#sheet-wrap.pop .sheet-grab { touch-action: auto; gap: 8px; }
#sheet-wrap.pop #sheet:not(:has(.confirm-head)) > .sheet-cancel { display: none; }
/* a popover sits beside the thing it's about, so it doesn't name it again: no item head, no track title
   (they stay readable as the dialog's name); a step's title (Add to playlist) and a confirm's question stay */
#sheet-wrap.pop .sheet-head, #sheet-wrap.pop .sheet-title.of-item { display: none; }
#sheet-wrap.pop .sheet-grab:not(:has(.confirm-head, .sheet-title:not(.of-item))) { display: none; }
#sheet-wrap.pop .confirm-head h3 { font-size: 16px; line-height: 22px; }
#sheet-wrap.pop .menu { border: 0; margin-inline: -12px; }
#sheet-wrap.pop .menu:last-child { margin-bottom: -12px; }   /* the popover is the frame: no box inside it (the head already rules it off) */
#sheet-wrap.pop .menu button, #sheet-wrap.pop .menu a { min-height: 40px; padding: 0 12px; font-size: 14px; }
#sheet-wrap.pop .btn-primary, #sheet-wrap.pop .btn-block, #sheet-wrap.pop .sheet-cancel { height: 40px; }
@media (prefers-reduced-motion: reduce) { #sheet-wrap.pop #sheet { scale: none; } }

/* ------------------------------------------------------------ toast */
/* attached to the dock: full width, just above the mini player (or the tabs), rising from behind its
   top rule; so it sits under the dock. Over the player it rises from the screen's bottom edge. */
.toast {
  position: fixed; left: 0; right: 0; z-index: calc(var(--z-dock) - 1);
  bottom: calc(var(--tabs-h) + var(--sab));
  min-height: 52px;
  display: flex; align-items: center; gap: 10px; padding: 6px max(var(--gut), env(safe-area-inset-right)) 6px max(var(--gut), env(safe-area-inset-left));
  background: var(--ink-bg); color: var(--ink-fg); border: solid var(--ink-bg); border-width: 1px 0 0;
  opacity: 0; translate: 0 100%; pointer-events: none; visibility: hidden;   /* hidden, its button isn't in the Tab order */
  transition: opacity 160ms ease, translate 160ms var(--ease-exit), visibility 0s 160ms;
}
body.has-mini .toast { bottom: calc(var(--tabs-h) + var(--mini-h) + var(--sab)); }
body.kb-open .dock { visibility: hidden; }   /* iOS, keyboard up: it would sit behind the keys, or float mid-screen once the page is dragged */
body.np-open .toast { bottom: 0; padding-bottom: calc(6px + var(--sab)); z-index: var(--z-toast); }
body:has(.sheet-wrap.open) .toast { z-index: var(--z-toast); }
.toast.show { pointer-events: auto; opacity: 1; translate: 0 0; visibility: visible; transition: opacity 220ms ease, translate 280ms var(--ease-out), visibility 0s; }
.toast > svg { width: 16px; height: 16px; }
.toast-act {
  position: relative; flex: none; height: 40px; margin-left: auto; padding: 0 12px; color: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 35%, transparent);
  transition: background-color 120ms ease;
}
.toast-act::before { content: ""; position: absolute; inset: -2px -2px; }
.toast-act:active { background: color-mix(in srgb, currentColor 15%, transparent); }
.toast-act:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.toast .tt { min-width: 0; display: grid; padding: 4px 8px 4px 0; }
.toast b { font-size: 14px; line-height: 20px; }
.toast small { font-size: 13px; line-height: 18px; color: color-mix(in srgb, currentColor 70%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.err { background: var(--fail-tint); color: var(--text-1); border-color: var(--fail-line); }
.toast.err > svg { color: var(--fail); }
.toast.err b { color: var(--fail); }
.toast.err small { color: var(--text-2); white-space: normal; }

/* ------------------------------------------------------------ page motion */
@media (prefers-reduced-motion: no-preference) {
  main.push { animation: push-in 260ms var(--ease-sheet); }
  main.pop { animation: fade-in 200ms ease-out; }
  .arrive { animation: fade-in 220ms ease-out; }
  .dot.pulse { animation: pulse 1.8s ease-in-out infinite; }
  .eq.on i { animation: eq 1s ease-in-out infinite; }
  .eq.on i:nth-child(2) { animation-duration: .8s; animation-delay: -.4s; }
  .eq.on i:nth-child(3) { animation-duration: 1.15s; animation-delay: -.7s; }
  /* every tile and row carries the bars over its art, hidden; only the playing one's move (186 hidden
     ones animating cost ~1.4 s of main thread every 4 s on a phone) */
  .eq-on .eq.on i { animation-name: none; }
  .is-now .eq-on .eq.on i { animation-name: eq; }
  .bar:not(.has-act) .bar-act .eq.on i { animation-name: none; }   /* the bar's copy, while it's put away */
}
@keyframes push-in { from { opacity: 0; translate: 28px 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes eq { 0%, 100% { scale: 1 .3; } 50% { scale: 1 1; } }

/* hovers only while a mouse or trackpad is the pointer in use (index.html sets data-hover from the pointer's own
   events: Chrome on a touch-screen laptop reports that nothing can hover); a touch turns them off so taps don't stick */
:root[data-hover] {
  .see-all:hover, .text-btn:hover, .kicker-link:hover { color: var(--text-2); }
  .row:has(.row-open:hover), .grid > .tile:has(.tile-open:hover), .live-card:has(.live-open:hover), .link-row:hover, .q-now:hover,
  .tl-jump:hover::before, .menu button:not(:disabled):hover, .menu a:hover, .sound-card:hover, button.np-source:hover, .mini-open:hover { background-color: var(--hover); }
  .more-btn:hover, .row-btn:not(:disabled):hover { color: var(--text-1); background: var(--hover); }
  .btn:not(:disabled):hover, .genre:hover, .sheet-cancel:hover, .sm-done:hover,
  .icon-btn:not(:disabled):hover, .t-btn:not(:disabled):hover, .t-play:not(:disabled):hover, .mini-btn:not(:disabled):hover, .round-play:hover, a.chip:hover, button.chip:hover {
    background-image: linear-gradient(var(--hover), var(--hover)); }
  .tabs a:hover { color: var(--text-1); }
}

@keyframes pin-in { from { opacity: 0; scale: .9; } }
@keyframes fade-only { from { opacity: 0; } }

/* press feedback (the tap highlight is off everywhere) */
.sound-card, .sm-done, .cr .art, .cr-play, .search-clear span, .text-btn, .kicker-link, .np-kicker button {
  transition-property: background-color, color, scale; transition-duration: 120ms; transition-timing-function: ease-out; }
.sound-card:active { background: var(--pressed); }
.cr:active .art, .cr-play:active { scale: .96; }
.search-clear:active span { background: var(--pressed); }
.text-btn:active, .kicker-link:active, .np-kicker button:active { color: var(--text-3); }
/* links that act as controls: a long press shouldn't select their label */
.seg > a, .sl-line > *, .sl-flow a, .sl-flow button, a.chip, .link-row, .genre, .sound-card, .see-all, .kicker-link { -webkit-user-select: none; user-select: none; }

/* a short screen (landscape phone): the drawer can't fit the map, so let it scroll instead of squashing it */
@media (max-height: 560px) { .sheet.sound { overflow-y: auto; touch-action: pan-y; } }

.np-live { display: inline-flex; align-items: center; gap: 8px; }


/* Stations page: which stations show up */
.page-head .st-edit { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; }
.st-edit::before { content: ""; position: absolute; inset: -14px -10px; }
.st-edit:active { color: var(--text-1); }
:root[data-hover] { .st-edit:hover { color: var(--text-1); } }
.st-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.st-row { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 6px var(--gut); border-bottom: 1px solid var(--line-faint); }
.st-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-txt b { font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }
.st-txt span { color: var(--text-3); }
.switch { position: relative; flex: none; width: 44px; height: 24px; background: var(--well); border: 1px solid var(--line-control); transition: background-color 160ms ease-out, border-color 160ms ease-out; }
.switch::before { content: ""; position: absolute; inset: -11px -1px; }
.switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--text-3); transition: transform 200ms cubic-bezier(.2, 0, 0, 1), background-color 160ms ease-out; }
.switch[aria-checked="true"] { background: var(--ink-bg); border-color: var(--ink-bg); }
.switch[aria-checked="true"] i { transform: translateX(20px); background: var(--ink-fg); }
.switch:disabled { opacity: .45; }
.switch:focus-visible { outline: 2px solid var(--text-1); outline-offset: 3px; }

/* Account page: who you are, a code for another device (big, in mono, counting down), your devices */
.acct-pad { display: grid; gap: 16px; padding: 12px var(--gut) 0; }
.acct-pad > p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 20px; max-width: 60ch; text-wrap: pretty; }
.acct-pad > .btn, .acct-skel { max-width: 480px; }
.acct-skel { height: 44px; }   /* the button's place while the page loads */
.acct-pad > .field-err { min-height: 18px; }   /* the line is always there, so an error doesn't move the page */
.acct-code { display: grid; gap: 8px; justify-self: start; }
.acct-code:focus-visible { outline-offset: 4px; }
.acct-digits { font: 400 48px/56px var(--font-mono); letter-spacing: .08em; font-variant-numeric: tabular-nums; color: var(--text-1); }
.acct-digits span + span { margin-left: .25em; }
.acct-code.gone .acct-digits { color: var(--text-3); }
.acct-left { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Invites page: a form for a new link, the link once it's made, the ones sent */
.iv-form, .iv-made { display: grid; gap: 24px; padding: 12px var(--gut) 0; max-width: 560px; }
.iv-form[hidden], .iv-made[hidden] { display: none; }
.iv-f { display: grid; gap: 8px; }
.iv-f > .label { color: var(--text-2); }
.iv-opt { color: var(--text-3); }
.iv-f input, .iv-f textarea {
  width: 100%; min-width: 0; padding: 0 14px; border-radius: 0; border: 1px solid var(--line-control);
  background: var(--page); color: var(--text-1); font: inherit; font-family: var(--font-sans); font-size: 16px;   /* 16px: no zoom on iOS */
}
.iv-f input { height: 48px; }
.iv-f textarea { padding: 12px 14px; line-height: 22px; resize: vertical; min-height: 112px; }
.iv-f input::placeholder, .iv-f textarea::placeholder { color: var(--text-3); }
.iv-f input:focus-visible, .iv-f textarea:focus-visible { outline: 2px solid var(--text-1); outline-offset: -2px; }
.iv-f input[aria-invalid="true"] { border-color: var(--fail); }
.iv-f input:disabled { color: var(--text-3); }
.iv-help { margin: 0; color: var(--text-3); font-size: 13px; line-height: 18px; max-width: 60ch; text-wrap: pretty; }
.iv-help b { color: var(--text-1); font-weight: 500; }
#iv-dj-found { display: grid; gap: 4px; }
.iv-add { display: grid; gap: 8px; }
.iv-add[hidden] { display: none; }
.iv-add .rows { margin-top: 4px; }
.iv-picks[hidden] { display: none; }
.iv-form .rows { border-top: 1px solid var(--line-faint); }
.iv-row { padding-left: 0; padding-right: 0; }
.iv-form .st-list { border-top: 1px solid var(--line-faint); }
.iv-form .st-row { padding-left: 0; padding-right: 0; gap: 12px; }
.iv-fol[hidden] { display: none; }
.iv-row .row-text .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.iv-form > .field-err:empty { display: none; }
.iv-made:focus-visible { outline: none; }
.iv-made > .label { color: var(--text-2); }
.iv-url { margin: 0; padding: 14px; background: var(--well); font: 400 14px/20px var(--font-mono); overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.iv-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-off .st-txt b { color: var(--text-3); }
.iv-row-acts { display: flex; flex: none; gap: 8px; }
.acct-addr { font-family: var(--font-mono); color: var(--text-1); overflow-wrap: anywhere; }
.st-row > .btn-sm { flex: none; }

/* Beta stats (#/stats): figures in mono, a 28-day strip of squares per person (ink = a day they came) */
.sx-link { color: inherit; text-decoration: none; }
.sx-link > svg { flex: none; width: 16px; height: 16px; color: var(--text-3); }
.sx-link:active { background: var(--pressed); }
:root[data-hover] { .sx-link:hover { background: var(--hover); } }
.sx-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--line-faint); }
.sx-totals > div { padding: 12px var(--gut); border-top: 1px solid var(--line-faint); }
.sx-totals > div:nth-child(-n+2) { border-top: 0; }
.sx-totals > div:nth-child(odd) { border-right: 1px solid var(--line-faint); }
.sx-totals dt { color: var(--text-3); font-size: 11px; line-height: 14px; }
.sx-totals dd { margin: 4px 0 0; font: 400 28px/32px var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-1); }
.sx-totals dd small { font-size: 13px; color: var(--text-3); }
.sx-skel-n { display: block; width: 40px; height: 28px; margin-top: 2px; }
@media (min-width: 640px) {
  .sx-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sx-totals > div { border-top: 0; border-right: 1px solid var(--line-faint); }
  .sx-totals > div:last-child { border-right: 0; }
}
.sx-strip-w { padding: 12px var(--gut); max-width: calc(28 * 16px + 2 * var(--gut)); }
.sx-strip { display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); gap: 2px; }
.sx-strip i { display: block; aspect-ratio: 1; box-shadow: inset 0 0 0 1px var(--line); }
.sx-strip i.on { background: var(--text-1); box-shadow: none; }
.sx-strip i.skel { box-shadow: none; }
.sx-ends { display: flex; justify-content: space-between; margin-top: 6px; color: var(--text-3); font-size: 11px; line-height: 14px; }
.sx-kv { margin: 0; border-top: 1px solid var(--line-faint); }
.sx-kv > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 8px var(--gut); border-bottom: 1px solid var(--line-faint); }
.sx-kv dt { color: var(--text-3); font-size: 11px; line-height: 14px; }
.sx-kv dd { margin: 0; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sx-sub { margin: 0; padding: 18px var(--gut) 6px; color: var(--text-3); font-size: 11px; line-height: 14px; }
.sx-list { border-top: 1px solid var(--line-faint); }
.sx-list .st-row { min-height: 48px; }
.sx-list .st-txt b { font-size: 14px; line-height: 20px; font-weight: 400; }
.sx-list .st-txt span { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sx-none { min-height: 40px !important; }
.sx-n { flex: none; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-1); }
@media (forced-colors: active) { .sx-strip i { forced-color-adjust: none; } .sx-strip i.on { background: CanvasText; } .sx-strip i { box-shadow: inset 0 0 0 1px CanvasText; } }

/* Windows High Contrast / forced colours: keep the edges the colours drew */
@media (forced-colors: active) {
  .tabs a.on, .sl-line > [aria-current="page"], .sl-line > [aria-pressed="true"] { text-decoration: underline; }
  .gdot, .mark, .dot, .mast .lv i, .smap > i { forced-color-adjust: none; }
}

/* reduced motion: sheets and the player fade instead of sliding, and nothing shrinks when pressed */
@media (prefers-reduced-motion: reduce) {
  .np-sheet { translate: none; opacity: 0; transition: opacity 200ms ease, translate 150ms ease-out; }   /* a drag still springs back */
  .np.open .np-sheet { opacity: 1; }
  .sheet { translate: none; opacity: 0; transition: opacity 200ms ease, translate 150ms ease-out; }
  .sheet-wrap.open .sheet { opacity: 1; }
  .toast, .toast.show { translate: none; }
  .mini.off { translate: none; }
  .pp > span { scale: 1 !important; filter: none !important; }
  .row.leaving { translate: none; }
  .bar-back svg { transition: none; }
  .bar-act, .np-now { translate: none; }
  .bar-title { translate: none !important; }
  .rows.reordering > li, .rows.reordering > li.lifted.settling { transition: none; }
  .scrub.loading .scrub-fill { animation: none; translate: none; width: 100%; opacity: .5; }
  .btn.loading::after, .spinner { animation-duration: 1.6s; }
  .smap .pin { animation-name: fade-only; }
  .switch i { transition: none; }
  .bar-btn, .seg > *, .round-play, .tile > .art, .btn, .genre, .mini-art, .tabs a > span, .icon-btn, .t-btn, .t-play,
  .glow-card, .cr .art, .cr-play, .mini-btn, .scrub-track, .scrub-thumb::before, .rows.reordering > li.lifted .row, .chip,
  .sound-card, .smap.mini, .sheet-cancel, button.np-source { scale: none !important; }
}

/* ------------------------------------------------------------ TRIAL: section headings that stay
   In a long list (Latest, a show's Episodes, a DJ's shows) the heading stays under whatever is
   stuck above it, so the list keeps its name and its See all. Not over the side-scrolling rails,
   which are never more than a flick tall, and not in Search, whose own block is tall enough. It
   tucks 1px under the rule above so two rules don't stack. On with the switch on the Stations page. */
html[data-heads] .sec:not(:has(> .rail, > .live-list, > #home-mix)) > .sec-head,
html[data-heads] .sub-sec > .sec-head {
  position: sticky; top: calc(var(--bar-h) + var(--sat) + var(--stuck-h, 0px) - 1px); z-index: 2;
}
html[data-heads] #sres .sec-head { position: static; }
