
:root {
  /* Gunmetal: cool greys after the radio's chrome skull. */
  --bg: #0b0d10; --surface: #13161b; --surface-2: #1a1e24; --line: #262b33; --line-strong: #313844;
  /* Borders of inputs, selects and text boxes: 3:1 against the input fill and the panel (WCAG 1.4.11). */
  --control-line: #6b7480;
  --text: #e9ecf0; --muted: #9ba3ae; --faint: #858d98;
  /* Ember, the radio's own orange (#ff7733 in cybermetalradio.com's stylesheet): what's current, selected or
     ranked, focus, and the data in charts. Never a large fill, so it reads as a glow. */
  --accent: #ff7733; --accent-hover: #ff9459; --on-accent: #120a05;
  --glow: color-mix(in srgb, var(--accent) 45%, transparent);
  /* Chrome: links, buttons and the wordmark. */
  --link: #d7dde5; --link-hover: #ffffff;
  --chrome: linear-gradient(180deg, #ffffff 0%, #e3e8ee 42%, #a9b2bd 58%, #eef1f4 100%);
  --btn: linear-gradient(180deg, #f4f6f9, #b9c1cb); --btn-hover: linear-gradient(180deg, #ffffff, #d3d9e0);
  --btn-line: #c9d0d9; --on-btn: #0b0d10;
  --good: #7bd88f; --bad: #ff6b5e; --seasonal: #b48cff;
  /* Event types. The countdown wears the accent; surges are steel blue. */
  --kind-countdown: var(--accent); --kind-surge: #7fa9dc;
  --rotation: #3a3f49; --playlist: #5b616c;
  /* Discord's own embed colours, for the preview of an archive post. */
  --dc-bg: #2b2d31; --dc-text: #dbdee1; --dc-title: #f2f3f5; --dc-muted: #b5bac1; --dc-dim: #949ba4; --dc-link: #00a8fc;
  /* Depth: the shadow under menus and popovers, the softer one under pictures, the dimming behind a sheet, and
     the faint edge that keeps a picture or a divider visible against a tinted band. */
  --shadow: rgb(0 0 0 / .6); --shadow-soft: rgb(0 0 0 / .5); --scrim: rgb(0 0 0 / .55);
  /* A song cover under its play icon: dimmed the same in both themes, since the picture is the same. */
  --art-scrim: rgb(0 0 0 / .5); --on-art: #ffffff;
  /* The full-screen picture viewer: near-black in both themes, as photo viewers are. */
  --zoom-bg: rgb(5 6 8 / .94); --zoom-fg: #f2f3f5; --zoom-hover: rgb(255 255 255 / .14);
  --edge: rgb(255 255 255 / .08); --edge-strong: rgb(255 255 255 / .12);
  --cover-tint: .4; /* how strongly a song's cover colours the band behind its header */
  /* Type scale: six sizes, in rem so the browser's text size setting applies. */
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.375rem; --fs-2xl: 1.75rem;
  /* Yanone Kaffeesatz, the radio site's condensed face. It runs small for its size, so text set in it takes the
     display sizes (--fd-*) instead of the body sizes (--fs-*). */
  --display: "Yanone Kaffeesatz", "Arial Narrow", ui-sans-serif, sans-serif;
  --fd-xs: 1rem; --fd-sm: 1.15rem; --fd-md: 1.35rem; --fd-lg: 1.6rem; --fd-xl: 1.85rem; --fd-2xl: 2.4rem; --fd-3xl: 2.75rem;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Space scale: 4px steps. Every padding, margin and gap is one of these, or one of the roles below. */
  --space-half: .125rem; --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.25rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem; --space-16: 4rem;
  --hair: 1px; /* a border's width, for pulling an edge over a border */
  /* Roles: the same job gets the same space on every page. */
  --gutter: var(--space-5);       /* page edge to content */
  --pad-box: var(--space-4);      /* inside any box (panel, card, tile, form), and a table's outer columns */
  --row-y: var(--space-2);        /* above and below a table or list row */
  --row-y-lg: var(--space-3);     /* above and below a row that is a block or is tapped: cards, settings, summaries */
  --cell-x: var(--space-2);       /* either side of a table column */
  --gap-pair: var(--space-1);     /* a label and its value, a kicker and its title */
  --gap-items: var(--space-2);    /* chips, buttons and filters in a row; cards in a list */
  --gap-boxes: var(--space-3);    /* boxes side by side */
  --gap-block: var(--space-4);    /* one block and the next: filters, then the table */
  --gap-section: var(--space-8);  /* before a section heading */
  /* Control sizes: three heights, and the play button. */
  --control-h: 2.5rem;            /* inputs, dropdowns, buttons */
  --control-h-sm: 2.25rem;        /* small buttons, chips, jump links */
  --control-x: var(--space-3);    /* inside an input, left and right */
  --tap: 3rem;                    /* rows that are tapped whole: the menu, a folded section */
  --play: 2rem;                   /* the play button beside a song, with its cover in it; 2.5rem on a wide screen */
  --bar: 6rem;                    /* the longest bar beside the count a song list is sorted by, on a wide screen */
  --icon-btn: 1.25rem;            /* a small round icon beside a label (the "?" on Settings); its tap area is --control-h-sm */
  --header-h: 3.5rem; --player-h: 4.5rem; --player-art: 4.5rem;
  --day-step-h: calc(var(--control-h) + 2 * var(--space-2)); /* the day stepper's band, which sticks under the header */
  /* Letter-spacing: display text, uppercase labels, small kickers, the wordmark. */
  --ls-display: .02em; --ls-caps: .06em; --ls-kicker: .14em; --ls-wordmark: .2em;
  /* Transition times: a press, a hover or colour change, something that moves. */
  --dur-press: .08s; --dur-fast: .15s; --dur-base: .2s;
  color-scheme: dark;
}
/* Steel, the light theme: used when the phone or computer is in light mode, unless Dark is chosen in the account
   menu, or whenever Light is chosen. Every colour above has a light value here, except Discord's own. */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { 
  --bg: #e9ecf0; --surface: #ffffff; --surface-2: #f3f5f7; --line: #d6dbe1; --line-strong: #c2c9d2;
  --control-line: #7d8691;
  --text: #0f1318; --muted: #4a535e; --faint: #59626d;
  --accent: #b13a0a; --accent-hover: #93300a; --on-accent: #ffffff;
  --glow: color-mix(in srgb, var(--accent) 25%, transparent);
  --link: #1b222a; --link-hover: #000000;
  --chrome: linear-gradient(180deg, #4a5460 0%, #1c2128 46%, #5d6773 60%, #1f252c 100%);
  --btn: linear-gradient(180deg, #3d4650, #1b2026); --btn-hover: linear-gradient(180deg, #4e5864, #262c34);
  --btn-line: #1b2026; --on-btn: #ffffff;
  --good: #1d7a3a; --bad: #c0281a; --seasonal: #6a3cc0;
  --kind-surge: #2d5c96;
  --rotation: #c3c9d1; --playlist: #969da7;
  --shadow: rgb(16 22 30 / .16); --shadow-soft: rgb(16 22 30 / .14); --scrim: rgb(16 22 30 / .35);
  /* A song cover under its play icon: dimmed the same in both themes, since the picture is the same. */
  --art-scrim: rgb(0 0 0 / .5); --on-art: #ffffff;
  --zoom-bg: rgb(5 6 8 / .94); --zoom-fg: #f2f3f5; --zoom-hover: rgb(255 255 255 / .14);
  --edge: rgb(0 0 0 / .1); --edge-strong: rgb(0 0 0 / .12);
  --cover-tint: .22;
  color-scheme: light;
 } }
:root[data-theme="light"] { 
  --bg: #e9ecf0; --surface: #ffffff; --surface-2: #f3f5f7; --line: #d6dbe1; --line-strong: #c2c9d2;
  --control-line: #7d8691;
  --text: #0f1318; --muted: #4a535e; --faint: #59626d;
  --accent: #b13a0a; --accent-hover: #93300a; --on-accent: #ffffff;
  --glow: color-mix(in srgb, var(--accent) 25%, transparent);
  --link: #1b222a; --link-hover: #000000;
  --chrome: linear-gradient(180deg, #4a5460 0%, #1c2128 46%, #5d6773 60%, #1f252c 100%);
  --btn: linear-gradient(180deg, #3d4650, #1b2026); --btn-hover: linear-gradient(180deg, #4e5864, #262c34);
  --btn-line: #1b2026; --on-btn: #ffffff;
  --good: #1d7a3a; --bad: #c0281a; --seasonal: #6a3cc0;
  --kind-surge: #2d5c96;
  --rotation: #c3c9d1; --playlist: #969da7;
  --shadow: rgb(16 22 30 / .16); --shadow-soft: rgb(16 22 30 / .14); --scrim: rgb(16 22 30 / .35);
  /* A song cover under its play icon: dimmed the same in both themes, since the picture is the same. */
  --art-scrim: rgb(0 0 0 / .5); --on-art: #ffffff;
  --zoom-bg: rgb(5 6 8 / .94); --zoom-fg: #f2f3f5; --zoom-hover: rgb(255 255 255 / .14);
  --edge: rgb(0 0 0 / .1); --edge-strong: rgb(0 0 0 / .12);
  --cover-tint: .22;
  color-scheme: light;
 }
@media (max-width: 760px) {
  :root { --gutter: var(--space-3); --pad-box: var(--space-3); --gap-section: var(--space-6); --player-h: 6rem; }
}
* { box-sizing: border-box; }
/* Anything scrolled to (a # link, a focused field) stops clear of the sticky header and Save bar. */
html { scroll-padding: calc(var(--header-h) + var(--space-4)) 0 calc(var(--control-h) + var(--space-10)); }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-md)/1.5 var(--body); }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
@media (hover: hover) { a:hover { color: var(--link-hover); text-decoration: underline; } }
/* Links inside running text are underlined, so they don't rely on colour alone (WCAG 1.4.1). */
:is(p, .note, .banner, .empty, .hint, footer):not(.crumbs, .status-line) a:not(.btn) { text-decoration: underline; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: var(--gutter); top: calc(-1 * var(--space-12)); z-index: 10; padding: var(--space-2) var(--space-4); background: var(--accent); color: var(--on-accent); font-weight: 700; }
.skip:focus { top: var(--space-2); color: var(--on-accent); text-decoration: none; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--space-6); padding: 0 var(--gutter); height: var(--header-h);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 70%, var(--bg)), var(--bg)); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--display); font-weight: 700; line-height: 1; color: var(--text); white-space: nowrap; }
.brand img { flex: none; filter: drop-shadow(0 0 5px var(--glow)); transition: filter var(--dur-base); }
@media (hover: hover) { .brand:hover { color: var(--text); text-decoration: none; } .brand:hover img { filter: drop-shadow(0 0 9px var(--accent)); } }
.mark, .brand-rest, .home-head h1 { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark { font-size: var(--fd-xl); letter-spacing: var(--ls-display); }
.brand-rest { font-size: var(--fd-xs); font-weight: 500; letter-spacing: var(--ls-wordmark); text-transform: uppercase; }
.bar { display: flex; gap: var(--space-half); flex: 1; min-width: 0; align-self: stretch; }
.bar a, .menu-sheet a { font-family: var(--display); font-weight: 500; text-transform: uppercase; letter-spacing: var(--ls-caps); font-size: var(--fd-sm); color: var(--muted); white-space: nowrap; }
.bar a { display: flex; align-items: center; padding: 0 var(--space-3); border-bottom: 2px solid transparent; margin-bottom: calc(-1 * var(--hair)); transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast); }
@media (hover: hover) { .bar a:hover { color: var(--text); text-decoration: none; background: var(--surface); } }
.bar a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.nav-gap { flex: 1; }
.search-btn { display: inline-flex; margin-left: auto; align-items: center; gap: var(--space-2); background: transparent; color: var(--muted); border: 1px solid var(--line-strong); padding: 0 var(--space-3); font-size: var(--fd-sm); font-weight: 500; }
.search-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
@media (hover: hover) { .search-btn:hover { background: var(--surface); color: var(--text); border-color: var(--muted); } }
.search-sheet { padding: var(--space-4) var(--gutter) var(--space-5); }
.search-sheet form, .search-form { display: flex; gap: var(--space-2); max-width: 640px; }
.search-sheet form { margin: 0 auto; }
:is(.search-sheet, .search-form) input { flex: 1; min-width: 0; }
.hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-2); }
.hit { display: grid; gap: var(--space-half); padding: var(--row-y-lg) var(--pad-box); background: var(--surface); border: 1px solid var(--line); color: var(--text); overflow-wrap: anywhere; transition: border-color var(--dur-fast), background var(--dur-fast); }
.hit .dim { font-size: var(--fs-sm); }
@media (hover: hover) { .hit:hover { border-color: var(--accent); background: var(--surface-2); color: var(--text); text-decoration: none; } }
.hit:active { background: var(--surface-2); }
tr[id] { scroll-margin-top: calc(var(--header-h) + var(--space-4)); }
.filter-more, .range { display: contents; }
.apply-keys:not(:focus-visible) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.range[hidden] { display: none; }
.filters > input[type=search] { align-self: end; }
td.nowrap { white-space: nowrap; }
.tag-cell { overflow-wrap: anywhere; }
.tag-cell .meta { display: block; color: var(--faint); font-size: var(--fs-sm); margin-top: var(--space-half); overflow-wrap: anywhere; }
.req-from { overflow: hidden; overflow-wrap: anywhere; }
.hint { margin: 0 0 var(--space-3); color: var(--muted); font-size: var(--fs-sm); }
.hint summary { cursor: pointer; color: var(--muted); width: fit-content; }
@media (hover: hover) { .hint summary:hover { color: var(--text); } }
.hint p { margin: var(--space-2) 0 0; max-width: 70ch; }
.view-switch { display: flex; gap: var(--space-2); margin: 0 0 var(--space-4); }
.day.compact { padding: var(--row-y-lg) var(--pad-box); }
.day.compact .day-head { margin-bottom: var(--space-2); }
.post-bar { margin: 0; }
.post-bar .actions { margin: 0; }
.post-bar .sub { margin: var(--space-3) 0 0; }
.post-bar .note { margin: var(--space-3) 0 0; }
.post-bar .running { margin-top: var(--space-3); }
.preview-body { padding: var(--space-1) var(--pad-box) var(--pad-box); display: grid; gap: var(--space-3); }
.preview-body .sub { margin: 0; }
/* The menu button: three bars at the header's left edge, turning to a cross while the menu is open. */
.menu-btn { display: none; place-items: center; width: var(--control-h); height: var(--control-h); min-height: 0; margin-left: calc(-1 * var(--space-2)); padding: 0; background: transparent; color: var(--text); border: 1px solid transparent; box-shadow: none; }
@media (hover: hover) { .menu-btn:hover { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: none; } }
.menu-btn:active { background: var(--surface-2); }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: currentColor; transition: transform var(--dur-fast), background-color var(--dur-fast); }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
html:has(#menu:popover-open) .menu-icon { background: transparent; }
html:has(#menu:popover-open) .menu-icon::before { transform: translateY(6px) rotate(45deg); }
html:has(#menu:popover-open) .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }
.menu-sheet { position: fixed; inset: var(--header-h) 0 auto 0; width: auto; max-width: none; max-height: calc(100dvh - var(--header-h)); margin: 0; padding: var(--space-2) 0 var(--space-3); border: 0; border-bottom: 1px solid var(--line);
  background: var(--surface); color: var(--text); overflow-y: auto; box-shadow: 0 24px 48px var(--shadow);
  opacity: 0; transform: translateY(-8px); transition: opacity var(--dur-fast), transform var(--dur-fast), overlay var(--dur-fast) allow-discrete, display var(--dur-fast) allow-discrete; }
.menu-sheet:popover-open { opacity: 1; transform: none; }
@starting-style { .menu-sheet:popover-open { opacity: 0; transform: translateY(-8px); } }
.menu-sheet::backdrop { background: var(--scrim); }
/* While a sheet is open the page behind it stays still, and scrolling the sheet to its end doesn't carry on into it. */
html:has(.menu-sheet:popover-open) { overflow: hidden; }
.menu-sheet { overscroll-behavior: contain; }
.menu-sheet a { display: flex; align-items: center; min-height: var(--tap); padding: 0 var(--gutter); font-size: var(--fd-md); border-left: 3px solid transparent; }
@media (hover: hover) { .menu-sheet a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; } }
.menu-sheet a:active { color: var(--text); background: var(--surface-2); }
.menu-sheet a[aria-current] { color: var(--text); border-left-color: var(--accent); background: var(--surface-2); }
.menu-sheet .nav-gap { display: block; height: 1px; background: var(--line); margin: var(--space-2) 0; }
/* The account: the avatar at the header's right edge at every width, opening a card under it (a sheet on a phone). */
.avatar { flex: none; width: var(--size, 32px); height: var(--size, 32px); border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.avatar.blank { display: inline-grid; place-items: center; border: 1px solid var(--line-strong); color: var(--muted); font: 600 calc(var(--size, 32px) * .45)/1 var(--body); }
.avatar.blank svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.acct-btn { position: relative; display: inline-grid; place-items: center; min-height: 0; padding: var(--space-half); background: transparent; border: 1px solid transparent; border-radius: 50%; }
.acct-btn .avatar { width: 32px; height: 32px; }
@media (hover: hover) { .acct-btn:hover { background: transparent; border-color: var(--line-strong); box-shadow: none; } }
.acct-btn:focus-visible { border-radius: 50%; }
/* Viewing as someone else (view-as.ts): the avatar keeps an accent ring, and a strip under the header says who. */
.acct-btn.viewing-as { border-color: var(--accent); }
.view-as-bar { display: flex; align-items: center; gap: var(--gap-items); padding: var(--space-2) var(--gutter); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 0 2px 0 var(--accent); }
.view-as-bar > svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.view-as-who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.view-as-bar form { margin: 0; }
html:has(.acct-pop:popover-open) .acct-btn { border-color: var(--accent); }
/* Something on What's new this browser hasn't seen: a dot on the avatar and a count in the menu. */
.wn-dot { display: none; position: absolute; top: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.wn-count { display: none; font-size: var(--fs-xs); font-weight: 600; line-height: 1; padding: var(--space-1) var(--space-2); background: var(--accent); color: var(--on-accent); font-variant-numeric: tabular-nums; }
.wn-unread .wn-dot { display: block; }
.wn-unread .wn-count { display: inline-block; }
.acct-pop { position: fixed; inset: calc(var(--header-h) + var(--space-2)) var(--gutter) auto auto; margin: 0; width: min(20rem, calc(100vw - 2 * var(--gutter))); padding: 0; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  box-shadow: 0 24px 48px var(--shadow); opacity: 0; transform: translateY(-6px); transition: opacity var(--dur-fast), transform var(--dur-fast), overlay var(--dur-fast) allow-discrete, display var(--dur-fast) allow-discrete; }
.acct-pop:popover-open { opacity: 1; transform: none; }
@starting-style { .acct-pop:popover-open { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .acct-pop, .menu-icon, .menu-icon::before, .menu-icon::after { transition: none; } }
.acct { display: flex; align-items: center; gap: var(--space-3); padding: var(--row-y-lg) var(--pad-box); }
.acct-who { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.acct-who strong { overflow-wrap: anywhere; }
.acct-who span { color: var(--muted); font-size: var(--fs-sm); }
/* Its rows: icon, label, and anything at the end (the count, the theme switch). */
.acct-rows { display: grid; margin: 0; padding: var(--space-1) 0; border-top: 1px solid var(--line); }
.acct-rows a, .acct-out, .acct-theme { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap); padding: 0 var(--pad-box); color: var(--text); }
.acct-out { width: 100%; margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; font: inherit; font-weight: 400; text-transform: none; letter-spacing: 0; text-align: left; color: var(--muted); cursor: pointer; }
.acct-rows svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); transition: color var(--dur-fast); }
.acct-rows svg .fill { fill: currentColor; }
.acct-label { flex: 1; min-width: 0; }
@media (hover: hover) {
  .acct-rows a:hover, .acct-out:hover { color: var(--text); background: var(--surface-2); text-decoration: none; box-shadow: none; }
  .acct-rows a:hover svg, .acct-out:hover svg { color: var(--accent); }
}
.acct-rows a:active, .acct-out:active { background: var(--surface-2); }
.acct-rows a[aria-current] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.acct-rows :is(a, .acct-out):focus-visible { outline-offset: -2px; }
/* The theme switch: three square icons, bordered like the header's buttons, the chosen one underlined like the nav. */
.theme-pick { min-width: 0; margin: 0; padding: 0; border: 0; }
.theme-seg { display: grid; grid-template-columns: repeat(3, var(--control-h-sm)); border: 1px solid var(--line-strong); }
.theme-seg label { position: relative; display: grid; place-items: center; height: var(--control-h-sm); cursor: pointer; color: var(--muted); transition: color var(--dur-fast), background-color var(--dur-fast); }
.theme-seg label + label { border-left: 1px solid var(--line-strong); }
.theme-seg label::after { content: ""; position: absolute; inset: auto 0 calc(-1 * var(--hair)); height: 2px; background: transparent; transition: background-color var(--dur-fast); }
.theme-seg input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.acct-rows .theme-seg svg { width: 15px; height: 15px; color: inherit; }
.theme-seg label:has(input:checked) { color: var(--accent); background: var(--surface-2); }
.theme-seg label:has(input:checked)::after { background: var(--accent); }
.theme-seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.theme-seg label:active { background: var(--surface-2); }
@media (hover: hover) { .theme-seg label:not(:has(input:checked)):hover { color: var(--text); } }

/* The login and no-access screens: the skull, the wordmark and one action, in the middle of the screen. */
body.bare { min-height: 100dvh; display: grid; place-items: center;
  background: radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%), var(--bg); }
main.gate { width: 100%; max-width: 400px; padding: var(--space-10) var(--gutter) calc(var(--space-10) + env(safe-area-inset-bottom)); display: grid; justify-items: center; text-align: center; gap: 0; }
.gate-logo { filter: drop-shadow(0 0 18px var(--glow)); animation: gate-in .6s ease-out both; }
.gate-mark { display: flex; align-items: baseline; gap: var(--space-2); margin: var(--space-4) 0 var(--space-6); font-family: var(--display); font-weight: 700; line-height: 1; animation: gate-in .6s .08s ease-out both; }
.gate-mark .mark { font-size: var(--fd-3xl); }
.gate-mark .brand-rest { font-size: var(--fd-sm); }
.gate h1 { font-size: var(--fd-xl); margin: 0 0 var(--space-2); }
.gate p { color: var(--muted); margin: 0 0 var(--space-5); max-width: 34ch; }
.gate .banner { width: 100%; text-align: left; margin: 0 0 var(--space-5); }
.gate .gate-actions { display: grid; gap: var(--space-2); width: 100%; animation: gate-in .6s .16s ease-out both; }
.gate .gate-actions .btn { text-align: center; }
.gate .fine { margin: var(--space-5) 0 0; font-size: var(--fs-sm); color: var(--faint); }
.btn.discord { display: inline-flex; justify-content: center; align-items: center; gap: var(--space-2); min-height: var(--tap); padding: var(--space-1) var(--space-5); font-size: var(--fd-md);
  background: #5865f2; color: #fff; border: 1px solid #5865f2; }
.btn.discord svg { width: 22px; height: 22px; fill: currentColor; }
@media (hover: hover) { .btn.discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; box-shadow: 0 0 18px -4px rgba(88,101,242,.7); } }
.btn.discord:active { background: #3c45a5; }
@keyframes gate-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .gate-logo, .gate-mark, .gate .gate-actions { animation: none; } }
/* Settings → Access. */
.login-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-3); }
.copy-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-2); flex-basis: 100%; min-width: 0; font-size: var(--fs-sm); }
.copy-line code { overflow-wrap: anywhere; min-width: 0; }
.rules, .people { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); }
.rule, .person { display: grid; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--row-y-lg) var(--pad-box); border-bottom: 1px solid var(--line); }
.rule:last-child, .person:last-child { border-bottom: 0; }
.rule { grid-template-columns: minmax(0, 1fr) auto; }
.rule-name, .person-who, .person-level, .person-seen { display: grid; gap: var(--space-half); min-width: 0; }
.rule .meta, .person .meta { color: var(--faint); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.rule-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.rule-form select { min-height: var(--control-h-sm); }
.person { grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto; }
.person-level { display: block; }
.person-level .meta { display: block; margin-top: var(--space-half); }
.person-seen { justify-items: end; gap: var(--space-2); }
.bad-text { color: var(--bad) !important; }
.add-rule { margin-top: var(--space-3); padding: 0; }
.add-rule h3 { margin: 0; padding: var(--pad-box) var(--pad-box) 0; font-size: var(--fd-md); }
.add-rule .actions { border-top: 1px solid var(--line); }
.kind-pick { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: end; }
.kind-pick legend { padding: 0; margin-bottom: var(--space-2); font-size: var(--fs-sm); color: var(--muted); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.kind-pick input { accent-color: var(--accent); width: 18px; height: 18px; }
@media (max-width: 760px) {
  .rule { grid-template-columns: minmax(0, 1fr); }
  .person { grid-template-columns: auto minmax(0, 1fr); }
  .person-level, .person-seen { grid-column: 2; }
  .person-seen { justify-items: start; grid-auto-flow: column; justify-content: space-between; align-items: center; }
}
.err-find { margin: 0 0 var(--space-3); max-width: 360px; }
.err-list, .err-row { display: grid; }
.err-list { background: var(--surface); border: 1px solid var(--line); }
.err-row { border-bottom: 1px solid var(--line); }
.err-list .err-row:last-child { border-bottom: 0; }
p.note + .err-list, .err-row[open]:not(.err-list .err-row) { margin-bottom: var(--space-3); }
.err-row:not(.err-list .err-row) { background: var(--surface); border: 1px solid var(--accent); }
.err-row summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-half) var(--space-3); padding: var(--row-y-lg) var(--pad-box); cursor: pointer; list-style: none; }
.err-row summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .err-row summary:hover { background: var(--surface-2); } }
.err-row .err-what { overflow-wrap: anywhere; }
.err-row .meta { grid-column: 2; color: var(--faint); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.err-row pre { margin: 0; padding: var(--row-y-lg) var(--pad-box); border-top: 1px solid var(--line); overflow-x: auto; font-size: var(--fs-xs); color: var(--muted); white-space: pre; }
.err-code { font-family: ui-monospace, monospace; letter-spacing: var(--ls-caps); color: var(--text); }
@media (prefers-reduced-motion: reduce) { .menu-sheet { transition: none; } }

main { max-width: 1240px; margin: 0 auto; padding: var(--space-6) var(--gutter) var(--space-12); }
main:focus { outline: none; }
/* Pages built around one form or one table stay at a width that reads in one sweep. */
main.narrow > * { max-width: 880px; }
/* The footer: links on one row, then the small print. */
footer { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter) var(--space-8); font-size: var(--fs-sm); }
.foot { border-top: 1px solid var(--line); padding-top: var(--space-5); display: grid; gap: var(--space-3); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); margin-block: calc(-1 * var(--space-2)); }
.foot-links a { padding-block: var(--space-2); color: var(--muted); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
.foot-links a:hover, .foot-links a[aria-current] { color: var(--text); }
.foot-note { margin: 0; color: var(--faint); font-size: var(--fs-xs); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: var(--ls-display); line-height: 1.1; margin: 0 0 var(--space-3); }
h1 { font-size: var(--fd-2xl); font-weight: 700; letter-spacing: var(--ls-display); }
h2 { font-size: var(--fd-lg); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--muted); margin-top: var(--gap-section); }
h3 { font-size: var(--fd-md); }
.sub { color: var(--muted); margin: calc(-1 * var(--space-1)) 0 var(--space-5); max-width: 72ch; }
/* A page's one link to the rule behind it (How it works) sits at the end of its sub line, or of the
   heading it explains. */
.sub.with-how { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); align-items: baseline; }
.section-head .how { white-space: nowrap; }
:is(.sub, .section-head) .how { margin-left: auto; font-size: var(--fs-sm); color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); transition: color var(--dur-fast), border-color var(--dur-fast); }
@media (hover: hover) { :is(.sub, .section-head) .how:hover { color: var(--text); text-decoration: none; border-bottom-color: var(--accent); } }

/* How it works: sections to jump to, then questions that open. */
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { cursor: pointer; list-style: none; display: flex; gap: var(--space-3); align-items: baseline; padding: var(--row-y-lg) var(--space-1); font-weight: 500; transition: color var(--dur-fast), background var(--dur-fast); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: "›"; flex: none; color: var(--accent); font-size: var(--fs-lg); line-height: 1; transition: transform var(--dur-fast); }
.qa details[open] > summary::before { transform: rotate(90deg); }
.qa details[open] > summary { color: var(--link-hover); }
@media (hover: hover) { .qa summary:hover { background: var(--surface); } }
.qa summary:active { background: var(--surface-2); }
.qa details:target > summary { box-shadow: inset 2px 0 0 var(--accent); padding-left: var(--space-3); }
.ans { padding: 0 var(--space-1) var(--space-4) var(--space-6); color: var(--muted); max-width: 60ch; }
.ans p { margin: 0 0 var(--space-3); }
.ans p:last-child { margin-bottom: 0; }
.ans b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .qa details[open] .ans { animation: ans-in .18s ease-out; }
  @keyframes ans-in { from { opacity: 0; transform: translateY(-4px); } }
}
/* A worked example: three dates along a line, the last one lit. */
.eg-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--space-2); margin: var(--space-4) 0 var(--space-1); position: relative; }
.eg-line::before { content: ""; position: absolute; left: 5px; right: 33.3%; top: 5px; height: 1px; background: var(--line-strong); }
.eg-line div { position: relative; padding-top: var(--space-4); font-size: var(--fs-sm); line-height: 1.3; }
.eg-line div::before { content: ""; position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1px solid var(--muted); }
.eg-line div:last-child::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px var(--glow); }
.eg-line small { display: block; font: 500 var(--fd-xs)/1.2 var(--display); text-transform: uppercase; letter-spacing: var(--ls-caps); color: var(--faint); }
.eg-line span { color: var(--text); font-variant-numeric: tabular-nums; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--gap-boxes); }
.tile { background: var(--surface); border: 1px solid var(--line); padding: var(--pad-box); }
.tile .k { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.tile .v { font-family: var(--display); font-size: var(--fd-xl); font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; margin-top: var(--space-half); }
.tile .d { color: var(--faint); font-size: var(--fs-sm); }

.panel { background: var(--surface); border: 1px solid var(--line); padding: var(--pad-box); }
.scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: var(--row-y) var(--cell-x); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
/* A table's first and last columns sit as far from the box edge as the text in any other box. */
:is(th, td):first-child { padding-left: var(--pad-box); }
:is(th, td):last-child { padding-right: var(--pad-box); }
th { font-family: var(--display); font-weight: 600; font-size: var(--fd-xs); text-transform: uppercase; letter-spacing: var(--ls-kicker); color: var(--muted);
  background: var(--surface-2); white-space: nowrap; }
/* A table's header row stays under the site header while its rows scroll past. Sticky needs the
   box around the table to stop clipping sideways, so the page script adds .fits to every box whose
   table fits its width; a table that still scrolls sideways keeps its header in place.
   Sticky waits for .fits: inside a box that still scrolls, the offset would push the header
   down over the rows (seen for a moment on load, and always on wide tables).
   The line under it is a shadow: a collapsed border stays behind when the cell sticks. */
thead th { z-index: 1; border-bottom: 0; box-shadow: inset 0 -1px var(--line); }
.scroll.fits > table > thead th { position: sticky; top: var(--header-h); }
.scroll.fits { overflow-x: visible; }
th a { color: inherit; }
th[aria-sort] a { color: var(--accent); }
/* A phone's list (figureTable) has no header row: one sort bar sits above it instead, sticking under the
   site header while the rows scroll past. The sort control is on its left on every page; the count, where
   the page shows none elsewhere, is on its right. The control's name opens the phone's own list of columns (an invisible select over it, as in .hour-jump); the arrow
   reverses the order and turns as it's tapped. Both are full-size targets, so the bar is a tap tall. */
.sort-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); z-index: 1;
  padding: 0 var(--pad-box) 0 calc(var(--pad-box) - var(--space-2)); background: var(--surface-2); box-shadow: inset 0 -1px var(--line);
  font-family: var(--display); font-weight: 600; font-size: var(--fd-xs); text-transform: uppercase; letter-spacing: var(--ls-kicker); color: var(--muted); white-space: nowrap; }
.scroll.fits > .sort-bar { position: sticky; top: var(--header-h); }
.sorter { display: flex; align-items: center; min-width: 0; }
.sort-count { margin-left: auto; }
.sorter form { display: contents; }
:is(.sorter-pick, .sorter-dir) { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1);
  min-width: var(--tap); min-height: var(--tap); padding: 0 var(--space-2); color: var(--accent); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast); }
:is(.sorter-pick, .sorter-dir):active { background: var(--surface); }
/* Ringed only for the keyboard: a tap leaves focus on the select, and the ring would stay after the list closes. */
.sorter-pick:has(select:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.sorter-dir:focus-visible { outline-offset: -2px; }
.sorter-pick select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.sorter svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.sorter .chev { width: 12px; height: 12px; }
.sorter-dir svg { width: 16px; height: 16px; transition: transform var(--dur-base) cubic-bezier(.3, 0, .2, 1); }
.sorter-dir[data-dir="asc"] svg, .sorter-dir.turning svg { transform: rotate(180deg); }
.sorter-dir[data-dir="asc"].turning svg { transform: rotate(360deg); }
@media (prefers-reduced-motion: reduce) { .sorter-dir svg { transition: none; } }
@media (max-width: 760px) {
  .scroll.figs > table > thead { display: none; }
  .scroll.figs :is(th, td).fig { width: 1%; white-space: nowrap; }
}
tbody tr { transition: background var(--dur-fast); }
@media (hover: hover) { tbody tr:hover { background: var(--surface-2); } }
tbody tr:last-child td { border-bottom: 0; }
/* A number column is as wide as its widest figure; spare width goes to the text columns, so a
   table of short titles doesn't push its # column out into the middle. */
td.num, th.num { text-align: right; width: 1%; white-space: nowrap; }
td.dim { color: var(--muted); }
/* The column a song list is sorted by. On a wide screen a count gets a bar after it, as long as the
   song's share of the list's top figure (songTable sets --pct, and --fig-w for the widest figure). */
td.sorted { color: var(--text); font-weight: 600; }
td.sorted .meta { font-weight: 400; }
.bar-n { display: inline-block; min-width: var(--fig-w); text-align: right; }
@media (min-width: 761px) {
  :is(th, td).has-bar { text-align: left; width: calc(var(--fig-w) + var(--space-3) + var(--bar) + var(--cell-x) * 2); }
  tr[style*="--pct"] > td.has-bar { background: linear-gradient(var(--accent), var(--accent)) no-repeat
    left calc(var(--cell-x) + var(--fig-w) + var(--space-3)) top calc(var(--row-y) + .75em - var(--space-half) * 1.5) / calc(var(--bar) * var(--pct)) calc(var(--space-half) * 3); }
}
td.date { white-space: nowrap; }
.title-cell { overflow-wrap: break-word; }
.title-cell .a { color: var(--muted); font-size: var(--fs-sm); display: block; }
/* A song in a list (songName): the title and its marks, the artist under it, then any note. In a
   narrow list (Home's countdown, Statistics) each line stays on one line and ends in "…". */
.song-name { display: grid; min-width: 0; }
.song-name > .a { color: var(--muted); font-size: var(--fs-sm); }
:is(.cd-song, .rl-name) .song-t { display: flex; align-items: baseline; gap: var(--space-1); min-width: 0; }
:is(.cd-song, .rl-name) .song-t > a, :is(.cd-song, .rl-name) .song-name > .a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.cd-song, .rl-name) .song-t > .pill { flex: none; }

.filters { display: flex; flex-wrap: wrap; gap: var(--gap-items); align-items: end; margin: 0 0 var(--gap-block); }
.filters label { display: grid; gap: var(--gap-pair); font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: var(--ls-caps); }
/* Every control is one height (--control-h) and its text one size, whatever it sits in. */
input, select, button { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--control-line); min-height: var(--control-h); padding: var(--space-1) var(--control-x); border-radius: 0; }
input, select, textarea { font-size: var(--fs-md); }
input:is([type=checkbox], [type=radio], [type=range]) { min-height: 0; padding: 0; }
[aria-invalid="true"] { border-color: var(--bad) !important; }
.banner .error-item, .flash-line { display: block; }
input[type=search] { min-width: 220px; }
button, .btn { cursor: pointer; background: var(--btn); color: var(--on-btn); border-color: var(--btn-line); font-family: var(--display); font-weight: 600; font-size: var(--fd-sm); line-height: 1.3;
  text-transform: uppercase; letter-spacing: var(--ls-caps); transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-press); display: inline-block; min-height: var(--control-h); padding: var(--space-1) var(--space-4); }
a.btn { display: inline-flex; align-items: center; justify-content: center; }
@media (hover: hover) { button:hover, .btn:hover { background: var(--btn-hover); border-color: var(--link-hover); color: var(--on-btn); text-decoration: none; box-shadow: 0 0 14px -4px var(--glow); } }
button:active, .btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
@media (hover: hover) { .btn.ghost:hover { border-color: var(--link); color: var(--link-hover); } }

.pill { display: inline-block; font-size: var(--fs-xs); padding: 0 var(--space-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.pill.hot { color: var(--accent-hover); background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 60%, transparent); font-weight: 600; }
.pill.warm { color: var(--accent-hover); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
/* The viewer's own song in a chart or tracklist: a word, and an edge on its row so it's found at a glance. */
.pill.mine { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 600; }
tr:has(.pill.mine) > td:first-child, li:has(.pill.mine) { box-shadow: inset 3px 0 0 var(--accent); }
.rank { font-family: var(--display); font-weight: 600; font-size: var(--fd-md); line-height: 1.1; color: var(--accent); text-shadow: 0 0 12px var(--glow); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); }
.split > * { min-width: 0; }
/* The countdown builder: your list stays in view beside a ranking that runs far below it. */
@media (min-width: 761px) {
  .builder > #list { position: sticky; top: calc(var(--header-h) + var(--space-4)); align-self: start; max-height: calc(100dvh - var(--header-h) - var(--space-8)); overflow-y: auto; overscroll-behavior: contain; }
}
/* A section that sits open beside its neighbour on a wide screen and folds away on a phone. */
.fold > summary { list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
@media (min-width: 761px) { .fold > summary { pointer-events: none; } }
/* The stepper at the top of an event page: the earlier one, back to the list, the later one. One row, even
   on a phone. Each end has a small line over its name: Earlier/Later, or the kind when it walks every event. */
.stepper { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--gap-items); max-width: 32rem; margin: 0 0 var(--gap-block); }
.stepper > a { display: flex; flex-direction: column; justify-content: center; gap: var(--space-half); min-width: 0; min-height: var(--tap); padding: var(--space-1) var(--space-2); border: 1px solid var(--line); color: var(--text);
  transition: border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-press); }
.stepper > a:active { transform: translateY(1px); }
@media (hover: hover) { .stepper > a:hover { border-color: var(--link); color: var(--link-hover); text-decoration: none; } }
.stepper .next { align-items: flex-end; text-align: right; }
.stepper :is(.over, .to) { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .over { font-size: var(--fs-xs); line-height: 1.3; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--faint); }
.stepper .mark { display: inline-block; width: var(--space-2); height: var(--space-2); margin-right: var(--space-1); background: var(--kc); }
.stepper .to { font: 600 var(--fd-sm)/1.1 var(--display); letter-spacing: var(--ls-caps); text-transform: uppercase; }
.stepper .back { width: min-content; align-items: center; padding-inline: var(--space-3); color: var(--muted); font: 600 var(--fd-xs)/1.1 var(--display); letter-spacing: var(--ls-caps); text-transform: uppercase; text-align: center; }
.sub .due { color: var(--accent); font-weight: 600; }
/* The line under the last suggested song in a ranking. */
tr.cut td { padding: 0; border-bottom: 0; }
tr.cut span { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--pad-box); color: var(--accent); font: 600 var(--fd-xs)/1 var(--display); letter-spacing: var(--ls-caps); text-transform: uppercase; }
tr.cut span::before, tr.cut span::after { content: ""; flex: 1; height: 1px; background: var(--accent); opacity: .55; }
@media (hover: hover) { tbody tr.cut:hover { background: none; } }
@media (max-width: 760px) { .inline-form:has(> .seed) { display: block; } .seed { width: 100%; } }
.pager { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-3); color: var(--muted); font-size: var(--fs-sm); }
/* Prev and Next: small, the same width, at either end; the page count sits centred between them. */
nav.pager { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--space-3); }
nav.pager > .btn { width: 5.5rem; gap: var(--space-1); white-space: nowrap; }
nav.pager > .btn:first-child { padding-left: var(--space-2); }
nav.pager > .btn:last-child { padding-right: var(--space-2); }
nav.pager svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-fast); }
nav.pager a.btn:first-child:active svg { transform: translateX(-2px); }
nav.pager a.btn:last-child:active svg { transform: translateX(2px); }
@media (hover: hover) { nav.pager a.btn:first-child:hover svg { transform: translateX(-2px); } nav.pager a.btn:last-child:hover svg { transform: translateX(2px); } }
nav.pager > .btn:last-child { justify-self: end; }
nav.pager > .btn[aria-disabled] { opacity: .35; pointer-events: none; }
.pager-at { display: grid; justify-items: center; text-align: center; line-height: 1.3; white-space: nowrap; }
.pager-at b { color: var(--text); font-weight: 600; }
.empty { padding: var(--space-6); text-align: center; color: var(--muted); }
/* What's new: a day per row, its changes beside it (under it on a phone). New ones since this browser last looked get the accent. */
.wn-head { flex-wrap: wrap; margin-bottom: var(--gap-block); }
.wn-head h1 { margin: 0; }
.wn-day { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--space-4); padding: var(--space-5) 0; border-top: 1px solid var(--line); }
.wn-day h2 { margin: 0; font-size: var(--fd-md); line-height: 1.3; }
.wn-day ul { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.wn-day li { display: grid; justify-items: start; gap: var(--space-1); }
.wn-day li strong { font-weight: 600; line-height: 1.35; }
.wn-day li p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.wn-day li.new strong::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--space-2); border-radius: 50%; background: var(--accent); vertical-align: 2px; }
.wn-day.new h2 { color: var(--accent); }
@media (max-width: 760px) { .wn-day { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); } }
.wn-post { margin: 0 0 var(--gap-block); }
.wn-post h2 { margin: 0 0 var(--space-3); font-size: var(--fd-xs); color: var(--muted); }
.wn-post ul { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); background: var(--surface); }
.wn-post li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name state act"; align-items: center; gap: var(--space-1) var(--space-4); min-height: calc(var(--control-h-sm) + 2 * var(--space-3)); padding: var(--space-2) var(--pad-box); }
.wn-post li > strong { grid-area: name; }
.wn-post li > span { grid-area: state; }
.wn-post li > :is(a, form) { grid-area: act; }
.wn-post li + li { border-top: 1px solid var(--line); }
.wn-post li strong { font-weight: 600; }
@media (max-width: 760px) { .wn-post li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name act" "state act"; padding-block: var(--space-3); } .wn-post li > span { font-size: var(--fs-sm); } }
.wn-post li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-1) var(--space-4); margin: var(--space-3) 0 0; color: var(--muted); }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.note { border-left: 3px solid var(--accent); background: var(--surface); padding: var(--row-y-lg) var(--pad-box); color: var(--muted); margin: 0 0 var(--gap-block); }

.banner { border: 1px solid var(--line); border-left: 3px solid var(--good); background: var(--surface); padding: var(--row-y-lg) var(--pad-box); margin: 0 0 var(--space-5); display: grid; gap: var(--gap-pair); }
.banner.bad { border-left-color: var(--bad); }
.banner .undo { justify-self: start; }
/* Saving in place: the message after a save, low on the screen and clear of the player and the jump
   buttons; the row that was saved or put back lights up; a button waiting on its save dims. */
.toasts { position: fixed; z-index: 21; left: 0; right: 0; bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); display: grid; justify-items: center; padding: 0 var(--gutter); pointer-events: none; }
body.has-player .toasts { bottom: calc(var(--player-h) + var(--space-4)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--space-2); width: min(100%, 32rem); padding: var(--space-1) var(--space-1) var(--space-1) var(--pad-box);
  background: var(--surface-2); border: 1px solid var(--line-strong); border-left: 3px solid var(--good); box-shadow: 0 12px 32px -12px var(--shadow);
  opacity: 0; transform: translateY(var(--space-2)); transition: opacity var(--dur-base), transform var(--dur-base); }
.toast.on { opacity: 1; transform: none; }
.toast.bad { border-left-color: var(--bad); }
.toast-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-1) 0; overflow-wrap: anywhere; }
.toast-body form { margin: 0; }
.toast-close { flex: none; display: grid; place-items: center; width: var(--control-h-sm); height: var(--control-h-sm); min-height: 0; padding: 0; background: transparent; border: 1px solid transparent; color: var(--muted); }
.toast-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
@media (hover: hover) { .toast-close:hover { background: var(--surface); border-color: var(--line-strong); color: var(--link-hover); box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .toast { transform: none; } }
@media (max-width: 760px) { .toasts { justify-items: stretch; padding-right: calc(var(--gutter) + var(--tap) + var(--space-2)); } }
.arrive { animation: arrive 1.6s ease-out; }
@keyframes arrive { from { background-color: var(--surface-2); box-shadow: inset 3px 0 var(--accent); } }
@media (prefers-reduced-motion: reduce) { .arrive { animation: none; } }
form[aria-busy="true"] .is-busy { opacity: .6; cursor: progress; }
.toc { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-2); }
.toc a { display: inline-flex; align-items: center; min-height: var(--control-h-sm); font-size: var(--fs-sm); padding: 0 var(--space-3); border: 1px solid var(--line); color: var(--muted); }
@media (hover: hover) { .toc a:hover { color: var(--link-hover); border-color: var(--accent); text-decoration: none; } }
.group { margin-top: var(--gap-section); }
.group > form, .group > .kv, .group > .scroll, .group > .panel { background: var(--surface); border: 1px solid var(--line); }
.group > .kv { padding: var(--pad-box); margin: 0; }
.group-head h2 { margin: 0 0 var(--space-2); }
.group-head .sub { margin: 0 0 var(--space-3); }
.group > form .group-head { padding: var(--pad-box) var(--pad-box) var(--space-1); border-bottom: 1px solid var(--line); }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-2) var(--space-6); padding: var(--row-y-lg) var(--pad-box); border-bottom: 1px solid var(--line); }
.setting label[for] { font-weight: 600; }
.setting .pill { margin-left: var(--space-2); vertical-align: 1px; }
.label-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.label-line .pill { margin: 0; }
.group-head .label-line { margin: 0 0 var(--space-2); }
.group-head .label-line h2 { margin: 0; }
button.about { position: relative; flex: none; width: var(--icon-btn); height: var(--icon-btn); min-height: 0; padding: 0; border-radius: 50%; background: transparent; border: 1px solid var(--line-strong); color: var(--muted); font: 700 var(--fs-xs)/1 var(--body); letter-spacing: 0; text-transform: none; }
button.about::after { content: ""; position: absolute; inset: calc((var(--icon-btn) - var(--control-h-sm)) / 2); }
@media (hover: hover) { button.about:hover { background: transparent; color: var(--text); border-color: var(--accent); box-shadow: none; } }
button.about[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
/* A figure's name says what it counts when pressed: a dotted line under it, a small note beside it. */
button.fig { position: relative; min-height: 0; padding: 0; background: none; border: 0; box-shadow: none; color: inherit; font: inherit; letter-spacing: var(--ls-kicker); text-transform: inherit; text-align: inherit; cursor: help;
  text-decoration: underline dotted var(--line-strong); text-underline-offset: .3em; }
button.fig::after { content: ""; position: absolute; inset: calc(var(--space-3) * -1) calc(var(--space-2) * -1); }
button.fig:active { transform: none; }
@media (hover: hover) { button.fig:hover { background: none; box-shadow: none; color: var(--text); text-decoration-color: var(--accent); } }
.fig-pop { margin: auto; width: max-content; max-width: min(18rem, calc(100vw - 2 * var(--gutter))); padding: var(--space-3) var(--pad-box); border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: var(--fs-sm);
  box-shadow: 0 24px 48px var(--shadow); opacity: 0; transition: opacity var(--dur-fast), overlay var(--dur-fast) allow-discrete, display var(--dur-fast) allow-discrete; }
.fig-pop strong { display: block; margin-bottom: var(--space-1); color: var(--text); font-family: var(--display); font-size: var(--fd-sm); }
.fig-pop:popover-open { opacity: 1; }
@starting-style { .fig-pop:popover-open { opacity: 0; } }
@supports (position-area: bottom) { .fig-pop { inset: auto; margin: var(--space-2) 0; position-area: bottom span-right; position-try-fallbacks: flip-inline, flip-block, flip-block flip-inline; } }
@media (prefers-reduced-motion: reduce) { .fig-pop { transition: none; } }
/* The period row at the top of a list: the chips, then the dates they cover. */
.period-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin: 0 0 var(--gap-block); }
.period-bar .dim { font-size: var(--fs-sm); }
/* The period picker: equal cells in one row that always fits a phone, like a stocks app's range picker. */
.period-seg { display: flex; width: 100%; max-width: 24rem; border: 1px solid var(--line-strong); }
.period-seg a { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; min-height: var(--control-h); color: var(--muted);
  font-family: var(--display); font-weight: 500; font-size: var(--fd-sm); letter-spacing: var(--ls-caps); text-transform: uppercase; transition: color var(--dur-fast), background var(--dur-fast); }
.period-seg a + a { border-left: 1px solid var(--line-strong); }
.period-seg .cal { flex: 0 0 var(--control-h); }
.period-seg svg, .period-dates .go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.period-seg a[aria-current] { color: var(--text); background: var(--surface-2); font-weight: 700; }
.period-seg a[aria-current]::after { content: ""; position: absolute; inset: auto 0 calc(-1 * var(--hair)); height: 2px; background: var(--accent); }
.period-seg a[aria-current] svg { color: var(--accent); }
.period-seg a:focus-visible { outline-offset: -2px; }
.period-seg a:active { background: var(--surface-2); }
@media (hover: hover) { .period-seg a:not([aria-current]):hover { color: var(--text); text-decoration: none; } }
/* The day stepper (day-step.ts): before, the day (a calendar under it), after; then Today and the
   hour jump. Cells joined like the period picker's, the day as its chosen cell. The band sticks under
   the header, full width, with a line under it once it's stuck (the script adds .stuck). */
.day-step { position: sticky; top: var(--header-h); z-index: 3; display: flex; align-items: center; gap: var(--gap-items);
  margin: 0 calc(-1 * var(--gutter)) var(--space-2); padding: var(--space-2) var(--gutter); background: var(--bg);
  box-shadow: 0 1px 0 transparent; transition: box-shadow var(--dur-base); }
.day-step.stuck { box-shadow: 0 1px 0 var(--line); }
.day-step svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.day-seg { flex: 1; min-width: 0; display: flex; border: 1px solid var(--line-strong); margin: 0; }
.day-seg > :not(input) + :not(input) { border-left: 1px solid var(--line-strong); }
.day-seg .day-end { flex: none; width: var(--control-h); min-height: var(--control-h); display: grid; place-items: center; color: var(--muted);
  transition: color var(--dur-fast), background var(--dur-fast); }
.day-seg .day-end svg { transition: transform var(--dur-press); }
.day-seg a.day-end:active { background: var(--surface-2); }
.day-seg a.prev:active svg { transform: translateX(calc(-1 * var(--space-half))); }
.day-seg a.next:active svg { transform: translateX(var(--space-half)); }
@media (hover: hover) { .day-seg a.day-end:hover { color: var(--text); background: var(--surface); text-decoration: none; } }
.day-seg .day-end[aria-disabled] { color: var(--line-strong); }
.day-seg a.day-end:focus-visible { outline-offset: -2px; }
.day-pick { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-h); padding: 0 var(--space-3); background: var(--surface-2); cursor: pointer; overflow: hidden; transition: background var(--dur-fast); }
.day-pick::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--accent); }
.day-pick:has(select:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.day-pick :is(.when, .date) { font: 600 var(--fd-sm)/1.1 var(--display); letter-spacing: var(--ls-caps); white-space: nowrap; }
.day-pick .when { text-transform: uppercase; color: var(--accent); }
.day-pick .date { overflow: hidden; text-overflow: ellipsis; }
.day-pick svg { color: var(--muted); transition: color var(--dur-fast); }
@media (hover: hover) { .day-pick:hover { background: var(--line); } .day-pick:hover svg { color: var(--accent); } }
.day-pick input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.day-pick input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.today-link { flex: none; display: flex; align-items: center; min-height: var(--control-h); padding: 0 var(--space-2);
  font: 600 var(--fd-xs)/1 var(--display); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--accent); }
.today-link:active { opacity: .7; }
@media (hover: hover) { .today-link:hover { color: var(--accent); } }
.hour-jump { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); min-width: var(--control-h); min-height: var(--control-h);
  padding: 0 var(--space-2); border: 1px solid var(--line-strong); color: var(--muted); cursor: pointer; transition: color var(--dur-fast), background var(--dur-fast); }
.hour-jump .hl { display: none; font: 600 var(--fd-sm)/1 var(--display); letter-spacing: var(--ls-caps); color: var(--text); font-variant-numeric: tabular-nums; }
.hour-jump svg:last-of-type { display: none; width: 14px; height: 14px; }
.hour-jump select { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.hour-jump:has(select:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .hour-jump:hover { color: var(--text); background: var(--surface); } }
@media (min-width: 761px) {
  .day-seg { flex: 0 1 19rem; }
  .hour-jump { padding: 0 var(--space-3); }
  .hour-jump .hl { display: inline; }
  .hour-jump svg:last-of-type { display: block; }
}
/* A table in runs by hour (History): each run's heading row sticks under the day stepper, and the
   column headings stay put, as the hour rows carry the place. */
.scroll.fits > table.by-hour > thead th { position: static; }
.by-hour .hour-row th { padding: var(--space-1) var(--pad-box); background: var(--surface-2); color: var(--text); letter-spacing: var(--ls-kicker);
  box-shadow: inset 3px 0 var(--accent), inset 0 1px var(--line-strong), inset 0 -1px var(--line-strong); border-bottom: 0; }
.by-hour .hour-row th span { float: right; color: var(--faint); font-weight: 500; letter-spacing: var(--ls-caps); text-transform: none; }
.scroll.fits > table.by-hour .hour-row th { position: sticky; top: calc(var(--header-h) + var(--day-step-h)); z-index: 1; }
.by-hour .hour-row { scroll-margin-top: calc(var(--header-h) + var(--day-step-h)); }
@media (hover: hover) { .by-hour tr.hour-row:hover { background: none; } }
/* Chosen dates: From, To and a go button, one row under the picker. */
.period-dates { flex-basis: 100%; max-width: 24rem; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--control-h); gap: var(--gap-items); align-items: end; }
.period-dates label { display: grid; gap: var(--gap-pair); min-width: 0; font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.period-dates input { width: 100%; min-width: 0; padding-inline: var(--space-2); }
.period-dates .go { display: grid; place-items: center; width: var(--control-h); padding: 0; }
.sh-period .period-dates { order: 1; }
.setting .help { color: var(--muted); font-size: var(--fs-sm); margin: var(--space-1) 0 0; max-width: 60ch; overflow-wrap: anywhere; }
.setting .dim { color: var(--faint); }
.setting-input { display: grid; gap: var(--space-2); align-content: start; }
.setting-input input[type=text], .setting-input input[type=url], .setting-input input[type=password], .setting-input select { width: 100%; }
.setting-input input[type=number] { width: 110px; }
.with-unit { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.unit { color: var(--muted); font-size: var(--fs-sm); }
.setting.has-error input, .setting.has-error select { border-color: var(--bad); }
.error { color: var(--bad); margin: 0; font-size: var(--fs-sm); }
.inline { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.switch input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.secret { display: grid; gap: var(--space-2); }
.secret code { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: var(--gap-items); margin: var(--gap-block) 0 0; }
/* Inside a panel or a boxed form the row gets the panel's own padding; outside one it lines up with the text. */
:is(.panel, .group > form, .editor) .actions { margin: 0; padding: var(--row-y-lg) var(--pad-box); }

.tabs { display: flex; gap: 0 var(--space-1); border-bottom: 1px solid var(--line); margin: 0 0 var(--gap-block); }
.tabs a { font-family: var(--display); font-weight: 500; font-size: var(--fd-sm); letter-spacing: var(--ls-caps); color: var(--muted); padding: var(--row-y-lg) var(--space-4); border-bottom: 2px solid transparent; white-space: nowrap; transition: color var(--dur-fast), border-color var(--dur-fast); }
@media (hover: hover) { .tabs a:hover { color: var(--text); text-decoration: none; } }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.event-list { display: grid; gap: var(--gap-items); }
.event-card { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; background: var(--surface); border: 1px solid var(--line);
  padding: var(--row-y-lg) var(--pad-box); color: var(--text); transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-press); }
@media (hover: hover) { .event-card:hover { border-color: var(--accent); background: var(--surface-2); text-decoration: none; color: var(--text); } }
.event-card:active { transform: translateY(1px); }
.event-card .when { font-family: var(--display); font-weight: 500; font-size: var(--fd-sm); color: var(--muted); }
.event-card .line1 { overflow-wrap: anywhere; }
.event-card .line2 { font-size: var(--fs-sm); margin-top: var(--space-half); overflow-wrap: anywhere; }
.event-card .chev { color: var(--faint); font-size: var(--fs-xl); transition: color var(--dur-fast), transform var(--dur-fast); }
@media (hover: hover) { .event-card:hover .chev { color: var(--accent); transform: translateX(2px); } }
.dim { color: var(--muted); }
/* An artist's events (album debuts, events they hosted, specials they appeared in): one row each, under the Events tab. */
.tab-panel[hidden] { display: none; }
/* An artist's best Countdown songs: a row of covers that play, each with its title and how it charted.
   Narrower screens scroll the row sideways rather than shrinking the covers. */
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap-boxes); }
.shelf-item { display: grid; align-content: start; gap: var(--space-1); min-width: 0; }
.shelf-art { position: relative; display: block; width: 100%; aspect-ratio: 1; min-height: 0; padding: 0; margin: 0 0 var(--space-1); overflow: hidden; border: 1px solid var(--line); background: linear-gradient(135deg, var(--surface-2), var(--bg)); color: var(--on-art); }
.shelf-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-base); }
/* The play badge sits in the cover's corner, so the cover stays visible; it fills ember while its song plays. */
button.shelf-art::before { content: ""; position: absolute; left: var(--space-2); bottom: var(--space-2); z-index: 1; width: var(--play); height: var(--play); background: var(--art-scrim); border: 1px solid var(--edge-strong); transition: background-color var(--dur-fast), border-color var(--dur-fast); }
.shelf-art svg { position: absolute; z-index: 2; left: calc(var(--space-2) + (var(--play) - 14px) / 2); bottom: calc(var(--space-2) + (var(--play) - 14px) / 2); width: 14px; height: 14px; fill: currentColor; }
.shelf-art.is-playing { border-color: var(--accent); box-shadow: 0 0 12px -4px var(--glow); }
.shelf-art.is-playing::before { background: var(--accent); border-color: var(--accent); }
.shelf-art:active { transform: translateY(1px); }
.shelf-title { color: var(--text); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-meta { color: var(--muted); font-size: var(--fs-sm); }
@media (hover: hover) {
  .shelf-art:hover .shelf-img { transform: scale(1.04); }
  .shelf-art:hover { border-color: var(--link); }
  button.shelf-art:hover::before { border-color: var(--link); }
  .shelf-title:hover { color: var(--link-hover); }
}
@media (prefers-reduced-motion: reduce) { .shelf-img { transition: none; } .shelf-art:hover .shelf-img { transform: none; } }
@media (max-width: 1120px) {
  .shelf { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 24%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; }
  .shelf-item { scroll-snap-align: start; }
}
@media (max-width: 760px) {
  .shelf { grid-auto-columns: 40%; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
}
.ev-list { display: grid; gap: var(--hair); background: var(--line); border: 1px solid var(--line); }
.ev-row { display: grid; grid-template-columns: var(--tap) minmax(0, 1fr) auto auto; gap: var(--space-3); align-items: center; padding: var(--row-y) var(--pad-box); background: var(--surface); color: var(--text); transition: background var(--dur-fast); }
.ev-art { width: var(--tap); height: var(--tap); border: 1px solid var(--line-strong); background: linear-gradient(135deg, var(--surface-2), var(--bg)); overflow: hidden; }
.ev-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ev-what { display: grid; gap: var(--space-half); min-width: 0; }
.ev-title { font: 600 var(--fd-md)/1.1 var(--display); letter-spacing: var(--ls-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-role { color: var(--text); }
.ev-meta { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-num { display: grid; color: var(--faint); font-size: var(--fs-xs); text-align: right; }
.ev-num b { font: 600 var(--fd-md)/1.1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.ev-row .chev { color: var(--faint); font-size: var(--fs-xl); transition: color var(--dur-fast), transform var(--dur-fast); }
@media (hover: hover) { .ev-row:hover { background: var(--surface-2); color: var(--text); text-decoration: none; } .ev-row:hover .chev { color: var(--accent); transform: translateX(2px); } }
.ev-row:active { background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { .ev-row .chev { transition: none; } }
.pill.kind-surge { color: var(--on-accent); background: var(--kind-surge); border-color: var(--kind-surge); }
.pill.kind-countdown { color: var(--on-accent); background: var(--kind-countdown); border-color: var(--kind-countdown); }
.pill.kind-special { color: var(--text); border-color: var(--text); }
.crumbs { margin: 0 0 var(--space-3); font-size: var(--fs-sm); }
.event-head h1 { margin: var(--space-3) 0 var(--space-2); }
/* The tag row keeps the Edit button's height whether or not it shows, so stepping between Countdown
   weeks (only aired ones have Edit) never moves the title or the stepper. */
.event-head .head-row { min-height: var(--control-h-sm); }
.airings { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.airing { background: var(--surface); border: 1px solid var(--line); padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.airing .k { color: var(--muted); text-transform: uppercase; letter-spacing: var(--ls-caps); font-size: var(--fs-xs); margin-right: var(--space-2); }
/* An event's airings with what each drew: the premiere carries the ember edge. */
.activity { margin: 0 0 var(--space-4); }
.activity table { font-variant-numeric: tabular-nums; }
.activity th { white-space: nowrap; }
.activity th .short { display: none; }
.activity .airing-when .t { white-space: nowrap; }
.activity .airing-when { display: grid; gap: var(--space-half); white-space: nowrap; }
.activity .airing-when .k { color: var(--muted); text-transform: uppercase; font-family: var(--display); font-weight: 500; font-size: var(--fd-xs); letter-spacing: var(--ls-kicker); line-height: 1; }
.activity tr.premiere td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.activity td.strong { color: var(--text); font-weight: 600; }
.activity .up { color: var(--good); }
.activity .down { color: var(--muted); }
.activity + .small-note { margin: calc(-1 * var(--space-2)) 0 var(--space-4); }
.running { margin-top: var(--space-6); background: var(--surface); border: 1px solid var(--line); }
.running summary { cursor: pointer; padding: var(--row-y-lg) var(--pad-box); font-family: var(--display); font-weight: 500; font-size: var(--fd-md); letter-spacing: var(--ls-caps); color: var(--muted); }
@media (hover: hover) { .running summary:hover { color: var(--text); } }
.running ol { margin: 0; padding: var(--space-1) var(--pad-box) var(--pad-box) var(--space-12); display: grid; gap: var(--space-1); }
.running li.segment { list-style-type: "·  "; }

.btn.small, button.small { min-height: var(--control-h-sm); padding: 0 var(--space-3); font-size: var(--fd-xs); }
.btn.danger, button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
@media (hover: hover) { .btn.danger:hover, button.danger:hover { background: var(--bad); color: var(--on-accent); border-color: var(--bad); } }
.inline-form { display: inline; margin: 0; }
.added-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-1); }
.added-note .inline { font-size: var(--fs-sm); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { min-width: var(--control-h-sm); }
/* A destructive button sits apart, at the far end of its row of actions. */
:is(.actions, .rule-form) > :is(.danger, form:has(> .danger)) { margin-left: auto; }
.row-actions .spacer { display: inline-block; width: var(--control-h-sm); }
.row-actions .m-score { display: block; margin-bottom: var(--space-1); font-variant-numeric: tabular-nums; }
:is(.title-cell, td.num) .meta { display: block; color: var(--faint); font-size: var(--fs-sm); margin-top: var(--space-half); }
td.num .meta { white-space: nowrap; }
/* A count beside a heading or tab label reads as body text. */
.count { color: var(--faint); font: 400 var(--fs-sm)/1 var(--body); letter-spacing: 0; text-transform: none; margin-left: var(--space-2); }
.count.due { color: var(--accent); font-weight: 600; }
tr.muted td { opacity: .55; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.copybox { display: grid; gap: var(--space-2); }
.copybox textarea, .notes-form textarea, .form-grid textarea { width: 100%; font: var(--fs-sm)/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: var(--surface-2); border: 1px solid var(--control-line); padding: var(--space-2) var(--control-x); resize: vertical; }
.form-grid textarea { font-family: inherit; }
.copybox .btn { justify-self: start; }
.notes-form { display: grid; gap: var(--space-2); justify-items: start; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4) var(--space-5); padding: var(--pad-box); }
.form-grid label { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-pair); font-size: var(--fs-sm); color: var(--muted); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.form-grid label.inline { display: flex; text-transform: none; letter-spacing: 0; font-size: var(--fs-md); color: var(--text); }
.form-grid .wide { grid-column: 1 / -1; }
.edit-tracks select { max-width: 100%; }
.edit-tracks input[type=number] { width: 72px; text-align: right; }
.edit-tracks tr.segment td { color: var(--muted); }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); margin: 0 calc(-1 * var(--gutter)); padding: var(--space-3) var(--gutter); z-index: 3; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.panel.notes { white-space: pre-wrap; margin: 0 0 var(--space-4); }
.page-head h1 { margin: 0; }
.page-head { margin: 0 0 var(--space-3); }
.event-links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.pill.venue { color: var(--link); border-color: color-mix(in srgb, var(--link) 50%, transparent); }
.form-grid .hint { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); color: var(--faint); }
.pick-plays td { vertical-align: middle; }
.pick-plays .pick-col { text-align: center; width: 1%; padding-left: var(--space-1); padding-right: var(--space-1); }
.pick-plays .pick { display: flex; justify-content: center; align-items: center; min-width: var(--control-h); min-height: var(--control-h); cursor: pointer; }
.pick-plays input[type=radio] { width: 20px; height: 20px; padding: 0; accent-color: var(--accent); cursor: pointer; }
.pick-plays tbody tr:not(.in) td { color: var(--muted); }
.pick-plays tbody tr.in { background: var(--surface-2); }
.pick-plays tbody tr.in td:first-child { box-shadow: inset 3px 0 0 var(--accent); color: var(--text); }
.pick-plays .title-cell { min-width: 0; overflow-wrap: anywhere; }

.link-list { display: grid; gap: var(--gap-items); }
.link-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin: var(--gap-section) 0 var(--space-3); }
.link-group-head h2 { margin: 0; }
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: var(--space-2) var(--space-5); align-items: center; background: var(--surface); border: 1px solid var(--line); padding: var(--row-y-lg) var(--pad-box); transition: border-color var(--dur-fast); }
.link-row:focus-within { border-color: var(--accent); }
.link-row.has-error { border-color: var(--bad); }
.link-row .row-error { grid-column: -2 / -1; margin: 0; color: var(--bad); font-size: var(--fs-sm); }
.link-row .who { display: grid; gap: var(--space-1); min-width: 0; overflow-wrap: anywhere; }
.link-row .profiles { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.small-note { font-size: var(--fs-sm); }
.link-form { display: flex; gap: var(--space-2); }
.link-form input[type=url] { flex: 1; min-width: 0; }
.link-edit { margin-top: var(--space-2); }
.link-edit summary { cursor: pointer; color: var(--link); font-size: var(--fs-sm); }
@media (hover: hover) { .link-edit summary:hover { color: var(--link-hover); } }
.link-edit .link-form { margin: var(--space-2) 0; max-width: 520px; }
.embed { background: var(--dc-bg); border-left: 4px solid var(--bar); border-radius: 4px; padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4); max-width: 560px; color: var(--dc-text); font-size: var(--fs-sm); }
.embed-title { font-weight: 700; color: var(--dc-title); margin-bottom: var(--space-2); }
.embed-title.small { margin-top: var(--space-3); }
.embed-intro { margin: 0 0 var(--space-3); white-space: pre-wrap; }
.embed-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.embed-lines .r { color: var(--dc-muted); font-weight: 700; display: inline-block; min-width: 28px; }
.embed a { color: var(--dc-link); }
.embed .dim { color: var(--dc-dim); }
.embed-footer { margin-top: var(--space-3); font-size: var(--fs-xs); color: var(--dc-dim); }
button[disabled], .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
@media (hover: hover) { button[disabled]:hover { background: var(--btn); color: var(--on-btn); border-color: var(--btn-line); box-shadow: none; } }
@media (hover: hover) { .btn.ghost[disabled]:hover { background: transparent; color: var(--text); border-color: var(--line); } }
.visually-hidden-copy { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Schedule */
.sched-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap-boxes); margin: 0 0 var(--space-5); }
.next-show { display: grid; gap: var(--gap-pair); padding: var(--pad-box); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--kc, var(--line)); color: var(--text); transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-press); }
@media (hover: hover) { .next-show:hover { text-decoration: none; color: var(--text); background: var(--surface-2); border-color: var(--kc, var(--accent)); } }
.next-show:active { transform: translateY(1px); }
.ns-k { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-caps); display: flex; align-items: center; gap: var(--space-2); }
.ns-name { font-family: var(--display); font-size: var(--fd-xl); font-weight: 600; line-height: 1.05; }
.ns-name.small { font-size: var(--fd-md); margin-top: var(--space-half); }
.ns-when { font-variant-numeric: tabular-nums; }
.ns-then { font-size: var(--fs-sm); }
.sched-now { display: grid; gap: var(--space-1); align-content: start; }
.sched-counts { font-size: var(--fs-sm); margin-top: var(--space-2); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 60%, transparent); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 55%, transparent); } 70% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--bad) 0%, transparent); } 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.kind-countdown { --kc: var(--kind-countdown); }
.kind-surge { --kc: var(--kind-surge); }
.kind-debut { --kc: var(--accent-hover); }
.kind-seasonal { --kc: var(--seasonal); }
.kind-special { --kc: var(--text); }
.kind-show { --kc: var(--text); }
.kind-rotation { --kc: var(--rotation); }
.kind-playlist { --kc: var(--playlist); }
.legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-3); font-size: var(--fs-sm); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: var(--space-2); }
.sw { width: 12px; height: 12px; background: var(--kc); display: inline-block; }
.days { display: grid; gap: var(--gap-items); }
.day { background: var(--surface); border: 1px solid var(--line); padding: var(--row-y-lg) var(--pad-box); }
.day.has-show { border-color: var(--line-strong); }
.day-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); font-family: var(--display); font-size: var(--fd-md); font-weight: 500; letter-spacing: var(--ls-display); }
.strip { position: relative; height: 14px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.seg { position: absolute; top: 0; bottom: 0; background: var(--kc); border-right: 1px solid var(--bg); }
.seg.kind-countdown, .seg.kind-surge, .seg.kind-show { top: -1px; bottom: -1px; }
.now-mark { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: calc(-1 * var(--hair)); background: var(--bad); box-shadow: 0 0 6px color-mix(in srgb, var(--bad) 70%, transparent); }
.ticks { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--faint); margin: var(--space-half) 0 var(--space-2); font-variant-numeric: tabular-nums; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-half); }
.slot { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: var(--space-1) var(--space-4); align-items: center; padding: var(--row-y) var(--space-3); border-left: 3px solid var(--kc); background: transparent; transition: background var(--dur-fast); }
@media (hover: hover) { .slot:hover { background: var(--surface-2); } }
.slot.kind-rotation, .slot.kind-playlist { color: var(--muted); }
.slot.kind-rotation strong, .slot.kind-playlist strong { font-weight: 500; }
.slot.minor { grid-template-columns: 120px minmax(0, 1fr); padding: var(--space-half) var(--space-3); font-size: var(--fs-sm); border-left-width: 2px; }
.slot.minor .time { font-weight: 500; }
.slot.minor .meta { display: inline; margin-left: var(--space-1); font-size: var(--fs-xs); }
.slot.minor .pill { font-size: var(--fs-xs); padding: 0 var(--space-2); }
.slot.live { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.slot.past { opacity: .5; }
.slot.rerun { border-left-style: dashed; }
.slot.rerun strong { font-weight: 500; color: var(--muted); }
.seg.rerun { opacity: .5; }
.slot .time { font-family: var(--display); font-weight: 500; font-size: var(--fd-sm); font-variant-numeric: tabular-nums; }
.slot .what { min-width: 0; overflow-wrap: anywhere; }
.slot .meta { display: block; color: var(--faint); font-size: var(--fs-sm); }
.slot .links { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: flex-end; }
.pill.kind-show { color: var(--text); border-color: var(--text); }
.pill.kind-rotation, .pill.kind-playlist { color: var(--muted); }
.carry { margin: 0; }

/* Artists and members */
.aka { margin-top: calc(-1 * var(--space-3)); }
.editor { margin-top: var(--gap-section); background: var(--surface); border: 1px solid var(--line); }
.editor > summary { cursor: pointer; padding: var(--row-y-lg) var(--pad-box); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); font-family: var(--display); font-weight: 500; font-size: var(--fd-md); letter-spacing: var(--ls-caps); list-style: none; }
.editor > summary::-webkit-details-marker { display: none; }
.editor > summary::before { content: "›"; color: var(--accent); font-size: var(--fs-lg); line-height: 1; transition: transform var(--dur-fast); display: inline-block; }
.editor[open] > summary::before { transform: rotate(90deg); }
@media (hover: hover) { .editor > summary:hover { color: var(--link-hover); } }
.editor > .banner { margin: 0 var(--pad-box) var(--space-3); }
.editor .edit-form { border-top: 1px solid var(--line); }
:is(.editor, .group) .form-help { margin: 0; padding: 0 var(--pad-box); max-width: 72ch; font-size: var(--fs-sm); }
.editor-block { border-top: 1px solid var(--line); padding: var(--row-y-lg) var(--pad-box) var(--pad-box); }
.editor-block h3 { margin: 0 0 var(--space-2); font-family: var(--display); font-size: var(--fd-md); letter-spacing: var(--ls-display); }
/* Artist claims: My music's list to tick, and the editors' queue */
.claim-list { list-style: none; margin: 0; padding: 0; max-height: min(55dvh, 28rem); overflow-y: auto; border: 1px solid var(--line); background: var(--surface-2); }
.claim-list:not(:has(> li:not([hidden]))) { display: none; }
.claim-pick:not(:has(li:not([hidden]), .claim-none:not([hidden]))) { display: none; }
.claim-list > li + li { border-top: 1px solid var(--line); }
.claim-list > li:has(:checked) { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.form-grid .claim-list label.inline { min-height: var(--tap); align-items: center; gap: var(--gap-pair); padding: 0 var(--cell-x); cursor: pointer; }
.claim-list label > span:not(.pill) { min-width: 0; overflow-wrap: anywhere; }
.claim-list .pill { margin-left: auto; }
.claim-none { margin: 0; font-size: var(--fs-sm); }
.claim-note { font-style: italic; }
.claim-reject { flex: 1 1 16rem; min-width: 0; }
.claim-reject input { flex: 1; min-width: 0; }
.editor-block .sub, .edit-section > .sub { margin: 0 0 var(--space-3); max-width: 72ch; font-size: var(--fs-sm); }
.merge-form { max-width: 520px; }
.group > form.merge-form { background: none; border: 0; }
.pill.kind-debut { color: var(--accent-hover); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.pill.kind-seasonal { color: var(--on-accent); background: var(--seasonal); border-color: var(--seasonal); }

/* Home */
.home-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); margin-bottom: var(--space-4); }
.home-head h1, .home-head .sub { margin: 0; }
.home-head h1 { font-size: var(--fd-3xl); line-height: 1; width: fit-content; }
.home-head .sub { font-variant-numeric: tabular-nums; }
.banner-link { color: var(--text); transition: background var(--dur-fast); }
@media (hover: hover) { .banner-link:hover { color: var(--text); text-decoration: none; background: var(--surface-2); } }
.home-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--gap-boxes); align-items: start; }
.home-side { display: grid; gap: var(--gap-boxes); min-width: 0; }
.on-air { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--line); padding: var(--pad-box); display: grid; gap: var(--space-4); min-width: 0; }
.on-air.is-live { border-top-color: var(--bad); }
.oa-main { display: flex; gap: var(--space-4); align-items: center; min-width: 0; }
.oa-cover { width: 112px; height: 112px; flex: none; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.oa-blank { background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, var(--surface) 8px 16px); }
.oa-text { min-width: 0; display: grid; gap: var(--space-1); }
.oa-title { --oa-line: calc(var(--fd-2xl) * 1.05); font-family: var(--display); font-size: var(--fd-2xl); font-weight: 600; line-height: 1.05; overflow-wrap: anywhere; }
.oa-title a { color: var(--text); }
@media (hover: hover) { .oa-title a:hover { color: var(--accent); text-decoration: none; } }
.oa-artist { font-size: var(--fs-lg); overflow-wrap: anywhere; }
.oa-meta { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.oa-meta > span { white-space: nowrap; }
.oa-before { list-style: none; margin: 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--space-2); }
.oa-before li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--space-2); font-size: var(--fs-sm); }
.oa-time { color: var(--faint); font-variant-numeric: tabular-nums; }
.oa-song { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more { font-size: var(--fs-sm); white-space: nowrap; }
.todo-card { background: var(--surface); border: 1px solid var(--line); padding: var(--row-y-lg) 0 var(--space-2); }
.todo-card > .ns-k { padding: 0 var(--pad-box) var(--space-2); }
.todo { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--row-y-lg) var(--pad-box); color: var(--text); border-top: 1px solid var(--line); transition: background var(--dur-fast); }
@media (hover: hover) { .todo:hover { background: var(--surface-2); color: var(--text); text-decoration: none; } }
@media (hover: hover) { .todo:hover .chev { color: var(--accent); transform: translateX(2px); } }
.todo:active { transform: translateY(1px); }
.todo-n { font-family: var(--display); font-weight: 600; font-size: var(--fd-lg); line-height: 1; color: var(--accent); text-align: center; font-variant-numeric: tabular-nums; }
/* Your week: a CMR artist's Home opens on their own songs. */
.yours { margin-bottom: var(--gap-section); }
.yours > .section-head { margin-top: 0; }
.yours-split { margin-top: var(--gap-boxes); gap: var(--gap-boxes); align-items: start; }
.yours-col { display: grid; gap: var(--gap-boxes); min-width: 0; }
.yours-plays > .ns-k { margin-bottom: var(--space-2); }
.yours .todo-clear { margin: 0; padding: var(--row-y) var(--pad-box); border-top: 1px solid var(--line); }
.yours-claim { margin-bottom: var(--gap-boxes); padding: 0; }
.yours-claim .todo { border-top: 0; }
.todo strong { display: block; }
.todo .dim { display: block; font-size: var(--fs-sm); }
.todo .chev { color: var(--faint); font-size: var(--fs-xl); transition: color var(--dur-fast), transform var(--dur-fast); }
.todo-clear { margin: 0; padding: var(--row-y-lg) var(--pad-box); border-top: 1px solid var(--line); }
/* The standing backlog: under this week's work, smaller and without the big numbers. */
.backlog { margin: var(--space-2) 0 0; padding: var(--row-y) var(--pad-box) 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-1); }
.backlog .ns-k { margin-right: var(--space-2); }
.backlog a { color: var(--muted); }
@media (hover: hover) { .backlog a:hover { color: var(--link-hover); } }
.section-head { margin-top: var(--gap-section); align-items: baseline; }
.section-head h2 { margin: 0 0 var(--space-3); }
.cd-card { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); box-shadow: inset 6px 0 18px -10px var(--glow); }
.cd-state { display: grid; gap: var(--gap-pair); align-content: start; justify-items: start; padding: var(--pad-box); border-right: 1px solid var(--line); }
.cd-day { font-family: var(--display); font-size: var(--fd-xl); font-weight: 600; line-height: 1.05; }
.cd-state .btn { margin-top: var(--space-2); }
.cd-top { list-style: none; margin: 0; padding: var(--space-2) 0; }
.cd-top li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--row-y) var(--pad-box); transition: background var(--dur-fast); }
@media (hover: hover) { .cd-top li:hover { background: var(--surface-2); } }
.cd-top .rank { font-size: var(--fd-lg); text-align: right; }
.cd-song { min-width: 0; display: grid; }
.cd-score { font-family: var(--display); font-weight: 600; font-size: var(--fd-md); font-variant-numeric: tabular-nums; color: var(--muted); }
a.tile { color: var(--text); transition: border-color var(--dur-fast), background var(--dur-fast), transform var(--dur-press); }
@media (hover: hover) { a.tile:hover { border-color: var(--accent); background: var(--surface-2); color: var(--text); text-decoration: none; } }
a.tile:active { transform: translateY(1px); }
.status-line { margin: var(--space-6) 0 0; font-size: var(--fs-sm); }
.status-line a { color: var(--muted); display: inline-flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
@media (hover: hover) { .status-line a:hover { color: var(--text); text-decoration: none; } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.dot.bad { background: var(--bad); }

/* Events filters: chips for the type, a row of links for the year. */
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-5); }
.seg-links { display: flex; align-items: center; gap: 0 var(--space-half); }
.seg-links .k { margin-right: var(--space-2); color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.seg-links a { display: flex; align-items: center; min-height: var(--control-h-sm); padding: 0 var(--space-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; color: var(--muted); border-bottom: 2px solid transparent; transition: color var(--dur-fast), border-color var(--dur-fast); }
.seg-links a[aria-current] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
@media (hover: hover) { .seg-links a:not([aria-current]):hover { color: var(--text); text-decoration: none; } }

.chips { display: flex; gap: var(--gap-items); margin: 0 0 var(--space-2); }
.chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--control-h-sm); padding: 0 var(--space-3); background: var(--surface-2); color: var(--text);
  font-size: var(--fs-sm); font-weight: 500; transition: background var(--dur-fast), color var(--dur-fast); }
.chip .count { margin: 0; color: var(--faint); font-size: var(--fs-xs); }
.chip[aria-current] { background: var(--link); color: var(--on-btn); font-weight: 600; }
.chip[aria-current] .count { color: var(--on-btn); opacity: .75; }
.chip:active { transform: translateY(1px); }
@media (hover: hover) { .chip:not([aria-current]):hover { background: var(--line); color: var(--text); text-decoration: none; } }

/* A row of choices never wraps. One whose length depends on the data stays on one line and slides
   sideways, fading at whichever edge has more; tabs run to the screen's edges on a phone. */
.tabs, .chips, .seg-links, .sh-links { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--space-4); }
:is(.tabs, .chips, .seg-links, .sh-links)::-webkit-scrollbar { display: none; }
:is(.tabs, .chips, .seg-links, .sh-links) > * { flex: none; scroll-snap-align: start; }
:is(.tabs, .chips, .seg-links, .sh-links) > :focus-visible { outline-offset: -2px; }
@property --fade-start { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes strip-fade {
  0% { --fade-start: 0px; --fade-end: var(--space-10); } 15% { --fade-start: var(--space-10); }
  85% { --fade-end: var(--space-10); } 100% { --fade-start: var(--space-10); --fade-end: 0px; }
}
@supports (animation-timeline: scroll()) {
  :is(.tabs, .chips, .seg-links, .sh-links) { mask-image: linear-gradient(to right, transparent, black var(--fade-start), black calc(100% - var(--fade-end)), transparent);
    animation: strip-fade linear both; animation-timeline: scroll(self inline); }
}
@media (max-width: 760px) { .tabs { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); } }

/* Statistics: one chart with a tab per figure beside the period's top songs, artists and requests;
   then the busiest hours; then what doesn't change with the period. */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-boxes); }
@media (min-width: 1120px) { .ov-grid { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); } }
.ov-card { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); padding: var(--pad-box); }
.ov-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-2); }
.ov-head h2 { margin: 0; }
.ov-chart .ov-head { justify-content: flex-end; }
.ov-chart .chart { border: 0; background: none; padding: var(--space-3) 0 0; }
.ov-chart .hint { margin: var(--space-2) 0 0; }
.ov-note { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.ov-note a { color: var(--text); }
.ov-defs { margin: var(--space-2) 0 0; display: grid; gap: var(--space-1); max-width: 70ch; }
.ov-defs dt { display: inline; margin-right: var(--space-2); color: var(--text); font-weight: 600; }
.ov-defs dd { display: inline; margin: 0; }
:is(.ov-pane, .ov-list, .ov-rank, .ov-foot)[hidden] { display: none; }
.ov-pane:not([hidden]), .ov-list:not([hidden]) { animation: ov-in var(--dur-fast) ease-out; }
@keyframes ov-in { from { opacity: 0; } }
/* The tabs sit on the chart's top edge: the chosen one opens into the chart, the rest are recessed. */
.ov-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: calc(-1 * var(--pad-box)) calc(-1 * var(--pad-box)) var(--space-2); }
.ov-tab { position: relative; display: grid; align-content: start; gap: var(--space-half); min-width: 0; padding: var(--space-3) var(--pad-box); background: var(--bg); color: var(--muted); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); transition: background var(--dur-fast), color var(--dur-fast); }
.ov-tab:first-child { border-left: 0; }
.ov-tab::before { content: ""; position: absolute; inset: -1px 0 auto; height: 3px; background: var(--accent); transform: scaleX(0); transition: transform var(--dur-fast) ease-out; }
.ov-tab[aria-current] { background: var(--surface); color: var(--text); border-bottom-color: transparent; }
.ov-tab[aria-current]::before { transform: scaleX(1); }
@media (hover: hover) { .ov-tab:not([aria-current]):hover { background: var(--surface-2); color: var(--text); text-decoration: none; } }
.ov-tab:focus-visible { outline-offset: -2px; }
.ov-tab .k { font-family: var(--display); font-weight: 500; font-size: var(--fd-xs); letter-spacing: var(--ls-kicker); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-tab .short { display: none; }
.ov-tab .v { font-family: var(--display); font-size: var(--fd-lg); font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ov-tab .d { font-size: var(--fs-sm); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-kinds a { font-family: var(--display); font-size: var(--fd-sm); letter-spacing: var(--ls-kicker); text-transform: uppercase; }
.ov-top .rank-list { border: 0; background: none; margin: var(--space-2) calc(-1 * var(--pad-box)) 0; }
.ov-foot { margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); color: var(--muted); font-size: var(--fs-sm); }
.ov-foot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-when, .ov-alltime { margin-top: var(--gap-boxes); }
.ov-alltime .rank-list { border: 0; background: none; margin-inline: calc(-1 * var(--pad-box)); }
.ov-alltime .chart { border: 0; background: none; padding-inline: 0; }
@media (prefers-reduced-motion: reduce) { .ov-pane:not([hidden]), .ov-list:not([hidden]) { animation: none; } .ov-tab, .ov-tab::before { transition: none; } }
section .seg-links { margin-block: 0 var(--space-1); }
.chart { margin: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--space-2) var(--space-2); background: var(--surface); border: 1px solid var(--line); padding: var(--space-5) var(--space-6) var(--space-3) var(--space-3); }
.chart-y { position: relative; font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
.chart-y span { position: absolute; right: 0; transform: translateY(50%); line-height: 1; white-space: nowrap; }
.chart-plot { position: relative; height: 220px; touch-action: pan-y; cursor: crosshair; }
.chart-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-plot .grid { position: absolute; left: 0; right: 0; height: 1px; margin-bottom: calc(-1 * var(--hair)); background: var(--line); }
.chart-plot .grid:first-of-type { background: var(--line-strong); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
/* A comparison series: grey and dashed, so it reads as context and doesn't rely on colour alone. */
.chart .line.context { stroke: var(--muted); stroke-dasharray: 5 4; }
.chart-legend { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: var(--fs-sm); color: var(--muted); margin: calc(-1 * var(--space-2)) 0 var(--space-2); }
.chart-legend .key { display: inline-flex; align-items: center; gap: var(--space-2); }
.chart-legend .key i { width: 18px; height: 0; border-top: 2px solid var(--accent); }
.chart-legend .key.context i { border-top: 2px dashed var(--muted); }
.chart .area { fill: var(--accent); opacity: .14; }
.chart.bars rect { fill: var(--accent); }
.chart .cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted); pointer-events: none; }
.chart .pt { position: absolute; width: 10px; height: 10px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 10px var(--glow); pointer-events: none; }
.chart .pt.context { background: var(--muted); box-shadow: 0 0 0 2px var(--surface); }
.tip { position: absolute; z-index: 2; transform: translate(12px, -50%); pointer-events: none; display: grid; padding: var(--space-2) var(--space-3); background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: 0 8px 24px var(--shadow-soft); white-space: nowrap; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.tip.flip { transform: translate(calc(-100% - 12px), -50%); }
.tip[hidden], .chart .cursor[hidden], .chart .pt[hidden] { display: none; }
.tip-k { color: var(--muted); font-size: var(--fs-xs); }
.tip-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.tip-n { color: var(--muted); font-size: var(--fs-xs); display: inline-flex; align-items: center; gap: var(--space-2); }
.tip-n::before { content: ""; width: 12px; border-top: 2px solid var(--accent); }
.tip-row.context .tip-n::before { border-top: 2px dashed var(--muted); }
.chart-x { grid-column: 2; position: relative; height: 18px; font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
.chart-x span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.chart-table { grid-column: 1 / -1; font-size: var(--fs-sm); }
.chart-table summary { cursor: pointer; color: var(--muted); width: fit-content; padding: var(--space-1) 0; }
@media (hover: hover) { .chart-table summary:hover { color: var(--text); } }
.chart-table .scroll { max-height: 320px; overflow-y: auto; margin-top: var(--space-2); }
.chart-table thead th { position: sticky; top: 0; }
.chart + .hint { margin: var(--space-3) 0 0; }
.heat-panel { display: grid; gap: var(--space-3); }
.heat-best { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-half) var(--space-2); }
.heat-best .k { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.heat-best strong { font-family: var(--display); font-weight: 600; font-size: var(--fd-md); }
.heat { position: relative; display: grid; grid-template-columns: 36px repeat(24, minmax(0, 1fr)); gap: var(--space-half); align-items: center; }
.heat-h, .heat-d { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.heat-h.h-1 { visibility: hidden; }
.heat > i { height: 26px; background: color-mix(in srgb, var(--accent) var(--v), var(--surface-2)); }
.heat > i.none { background: repeating-linear-gradient(135deg, var(--surface-2) 0 3px, transparent 3px 6px); }
@media (hover: hover) { .heat > i:hover { outline: 1px solid var(--text); outline-offset: 0; } }
.heat-scale { margin: 0; display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
.heat-scale i { width: 120px; height: 8px; background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--accent) 52%, var(--surface-2)) 25%, var(--accent)); }
.rank-list { list-style: none; margin: var(--space-2) 0 0; padding: var(--space-1) 0; background: var(--surface); border: 1px solid var(--line); }
.rank-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); align-items: center; padding: var(--row-y) var(--pad-box); transition: background var(--dur-fast); }
@media (hover: hover) { .rank-list li:hover { background: var(--surface-2); } }
.rank-list .rank { text-align: right; }
.rl-name { min-width: 0; display: grid; }
.rl-title, .rl-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-sub { font-size: var(--fs-sm); color: var(--muted); }
.rl-sub a { color: var(--muted); }
.rl-val { font-family: var(--display); font-weight: 600; font-size: var(--fd-sm); font-variant-numeric: tabular-nums; }
.rl-bar { grid-column: 2 / -1; height: 4px; background: var(--surface-2); }
.rl-bar i { display: block; height: 100%; background: var(--accent); }
.list-foot { margin: var(--space-2) 0 0; }

/* Playlists page: a rotation's mix, each playlist's set share as a bar and what it played as a tick on it. */
.rot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: var(--gap-boxes); align-items: start; }
.rot { display: grid; gap: var(--space-3); min-width: 0; padding: var(--pad-box); transition: border-color var(--dur-fast); }
.rot.on-air { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); box-shadow: inset 3px 0 0 var(--good); }
.rot.gone { opacity: .7; }
.rot:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--glow); }
.rot-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
.rot-head h3 { margin: 0; font-size: var(--fd-xl); min-width: 0; overflow-wrap: anywhere; }
.rot-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.rot-pills .live-dot { display: inline-block; width: 6px; height: 6px; vertical-align: 1px; margin-right: var(--space-half); background: var(--good); animation: none; }
.rot-when { list-style: none; margin: calc(-1 * var(--space-1)) 0 0; padding: 0; display: grid; gap: var(--space-half); font-size: var(--fs-sm); }
.rot-when .rw-time { font-variant-numeric: tabular-nums; }
.mix-cols, .mix li { display: grid; grid-template-columns: minmax(0, 1fr) 52px 60px; column-gap: var(--space-2); align-items: baseline; }
.mix-cols { font-family: var(--display); font-weight: 500; font-size: var(--fd-xs); letter-spacing: var(--ls-kicker); text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); padding-bottom: var(--space-1); }
.mix-cols span:not(:first-child) { text-align: right; }
.mix { list-style: none; margin: calc(-1 * var(--space-1)) 0 0; padding: 0; }
.mix li { row-gap: var(--space-1); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.mix li:last-child { border-bottom: 0; }
.mix-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-name .pill { vertical-align: 1px; }
.mix-set, .mix-played { text-align: right; font-family: var(--display); font-weight: 600; font-size: var(--fd-sm); font-variant-numeric: tabular-nums; }
.mix-played { color: var(--muted); font-weight: 500; }
.mix-bar { grid-column: 1 / -1; position: relative; height: 6px; background: var(--surface-2); }
.mix-bar i { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 8px var(--glow); }
.mix-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: calc(-1 * var(--hair)); background: var(--text); }
.mix-other .mix-bar { background: transparent; }
.mix-legend { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); margin: 0 0 var(--space-3); font-size: var(--fs-sm); color: var(--muted); }
.mix-legend i { display: inline-block; vertical-align: middle; margin-right: var(--space-2); }
.mix-legend .k-set { width: 18px; height: 6px; background: var(--accent); }
.mix-legend .k-played { width: 2px; height: 12px; background: var(--text); }
.rot-foot { margin: 0; font-size: var(--fs-sm); }
.rot-history summary { cursor: pointer; font-size: var(--fs-sm); color: var(--link); }
.rot-history ol { margin: var(--space-2) 0 0; padding-left: var(--space-4); display: grid; gap: var(--space-1); font-size: var(--fs-sm); }
.rot-pill { margin: var(--hair) 0; color: var(--link); }
@media (hover: hover) { .rot-pill:hover { border-color: var(--muted); text-decoration: none; } }
.pl-table tr:target td { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pl-table tr.gone td { color: var(--faint); }

/* Small uppercase kickers above a value or a card's title. */
.ns-k, .tile .k, .seg-links .k, .heat-best .k, .airing .k { font-family: var(--display); font-weight: 500; font-size: var(--fd-xs); letter-spacing: var(--ls-kicker); }
/* The hint beside an expandable section's name reads as body text. */

/* The bar's eight entries, search and the account button need 1107px on one line (measured). */
@media (max-width: 1120px) {
  .bar { display: none; }
  .menu-btn { display: inline-grid; }
}
@media (max-width: 350px) { .brand-rest { display: none; } }
@media (min-width: 761px) { .phone-only { display: none !important; } }
@media (max-width: 760px) {
  .sched-top { grid-template-columns: minmax(0, 1fr); }
  .slot { grid-template-columns: minmax(0, 1fr); gap: var(--space-half); padding: var(--row-y) var(--space-3); }
  .slot.minor { grid-template-columns: 104px minmax(0, 1fr); gap: var(--space-2); padding: var(--space-half) var(--space-2); }
  .slot.minor .meta { display: none; }
  .slot .links { justify-content: flex-start; margin-top: var(--space-1); }
  .ns-name { font-size: var(--fd-lg); }
  .link-row { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .edit-tracks .pos { display: none; }
  .edit-tracks input[type=number] { width: 58px; }
  .event-card { grid-template-columns: 1fr auto; gap: var(--space-1) var(--space-3); }
  .event-card .when { grid-column: 1 / -1; font-size: var(--fd-xs); }
  .event-card .what { grid-column: 1; }
  .setting { grid-template-columns: minmax(0, 1fr); }
  .top { gap: var(--space-2); }
  .search-btn span { display: none; }
  .search-btn { width: var(--control-h); padding: 0; justify-content: center; }
  /* The account menu drops from the header as a sheet, like the menu. */
  .acct-pop { inset: var(--header-h) 0 auto 0; width: auto; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; border: 0; border-bottom: 1px solid var(--line); }
  .acct-pop::backdrop { background: var(--scrim); }
  html:has(.acct-pop:popover-open) { overflow: hidden; }
  .search-sheet { padding: var(--space-3) var(--gutter) var(--space-4); }
  .home-top, .cd-card { grid-template-columns: minmax(0, 1fr); }
  .cd-state { border-right: 0; border-bottom: 1px solid var(--line); }
  .oa-cover { width: 84px; height: 84px; }
  .oa-title { --oa-line: calc(var(--fd-xl) * 1.05); font-size: var(--fd-xl); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Three or five tiles: the last takes the whole row, so none sits beside a hole. */
  .tiles:not(.stat-tiles) > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .tile .v { font-size: var(--fd-lg); }
  /* A song list is the song and one figure (songTable): the title takes the room and breaks only
     between words, beside a cover big enough to tap. A word longer than the column breaks too
     ("anywhere": with "break-word" one such name widened the table past the phone). */
  .title-cell { --play: 2.75rem; min-width: 120px; overflow-wrap: anywhere; width: 100%; }
  table:has(.play-btn) td { vertical-align: middle; }
  /* An artist list reads the same way: the picture as big as a song's cover, centred on the row. */
  .title-cell > .who { align-items: center; }
  .title-cell > .who > .avatar { --size: var(--play) !important; }
  table:has(.title-cell > .who) td { vertical-align: middle; }
  tr[style*="--pct"] > .title-cell:has(> .who) { --pic: calc(var(--play) + var(--space-2));
    background-position: left var(--pic) bottom calc(-1 * var(--space-1));
    background-size: calc((100% - var(--pic)) * var(--pct)) calc(var(--space-half) * 1.5); }
  td.fig { font-family: var(--display); font-size: var(--fd-lg); font-weight: 600; color: var(--text); }
  /* The bar runs under the title and artist, as long as the song's share of the top figure. */
  tr[style*="--pct"] > .title-cell { background: linear-gradient(var(--accent), var(--accent)) no-repeat content-box border-box
    left bottom calc(-1 * var(--space-1)) / calc(100% * var(--pct)) calc(var(--space-half) * 1.5); }
  th.num, td.num { padding-left: var(--space-1); }
  .tag-cell { min-width: 170px; }
  .filters.has-toggle > input[type=search] { flex: 1 1 0; width: auto; }
  .filters.has-toggle .filter-more { display: flex; flex-wrap: wrap; gap: var(--gap-items); align-items: end; flex: 1 1 100%; }
  .filters.has-toggle:not(.open) .filter-more { display: none; }
  td .pill { white-space: normal; }
  th { white-space: normal; }
  /* A date column is as wide as its dates: its heading wraps so the titles get the room. */
  th.date > a { display: block; width: min-content; }
  .phone-wrap td { overflow-wrap: anywhere; }
  .phone-wrap td.date { white-space: normal; }
  table.ph-1 tr > :nth-child(1), table.ph-2 tr > :nth-child(2), table.ph-3 tr > :nth-child(3), table.ph-4 tr > :nth-child(4), table.ph-5 tr > :nth-child(5), table.ph-6 tr > :nth-child(6), table.ph-7 tr > :nth-child(7), table.ph-8 tr > :nth-child(8), table.ph-9 tr > :nth-child(9), table.ph-10 tr > :nth-child(10), table.ph-11 tr > :nth-child(11), table.ph-12 tr > :nth-child(12) { display: none; }
  main { padding: var(--space-5) var(--gutter) var(--space-10); }
  footer { padding: 0 var(--gutter) var(--space-6); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .fold { background: var(--surface); border: 1px solid var(--line); }
  .fold > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--tap); padding: 0 var(--pad-box); cursor: pointer; }
  .fold > summary::after { content: ""; flex: none; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-fast); }
  .fold[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
  .fold > summary h2 { margin: 0; font-size: var(--fd-md); }
  .fold > summary .count { white-space: nowrap; }
  .fold > .sub, .fold > .note { margin: var(--space-1) var(--pad-box) var(--space-3); }
  .fold > .scroll { border-width: 1px 0 0; }
  h1 { font-size: var(--fd-xl); }
  .home-head h1 { font-size: var(--fd-2xl); }
  input[type=search] { min-width: 0; width: 100%; }
  .ov-tab { padding: var(--space-2) var(--space-2) var(--space-3); }
  .ov-tab .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ov-tab .short { display: inline; }
  .ov-tab .v { font-size: var(--fd-md); }
  .ov-tab .d { font-size: var(--fs-xs); }
  .ov-chart .chart { padding-inline: 0; }
  .chart { padding: var(--space-4) var(--space-4) var(--space-3) var(--space-2); grid-template-columns: 30px minmax(0, 1fr); }
  .chart-plot { height: 180px; }
  /* The activity table fits a phone: date over time, short headers (the full ones stay for screen readers). */
  .activity th .long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .activity th .short { display: inline; }
  .activity .airing-when { white-space: normal; }
  .activity { --cell-x: var(--space-1); }
  .chart-x span:nth-child(even) { display: none; }
  .heat { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: var(--hair); }
  .heat > i { height: 22px; }
  .heat-h.h-3 { visibility: hidden; }
}
/* Song previews: the play buttons, the song page's player and the bar at the foot of the screen. */
.play-btn, .pl-toggle, .pl-close { display: inline-grid; place-items: center; min-height: 0; padding: 0; flex: none; }
.play-btn svg, .pl-toggle svg, .pl-close svg { width: 14px; height: 14px; fill: currentColor; }
.is-playing > .i-play, :not(.is-playing) > .i-pause { display: none; }
/* Every play button looks the same: outlined, and ember while its song plays. */
.play-btn, .pl-toggle { background: transparent; color: var(--link); border: 1px solid var(--line-strong); }
.play-btn { width: var(--play); height: var(--play); }
:is(.play-btn, .pl-toggle).is-playing { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px -4px var(--glow); }
@media (hover: hover) { :is(.play-btn, .pl-toggle):hover { background: var(--surface-2); color: var(--link-hover); border-color: var(--link); box-shadow: none; } :is(.play-btn, .pl-toggle).is-playing:hover { color: var(--accent-hover); border-color: var(--accent-hover); } }
/* The play slot: one size, one gap, one place. A table with any play button keeps the slot in every
   title cell, empty for a jingle or a song the radio no longer has, so the titles line up. */
table:has(.play-btn) .title-cell { position: relative; padding-left: calc(var(--cell-x) + var(--play) + var(--space-2)); }
table:has(.play-btn) .title-cell:first-child { padding-left: calc(var(--pad-box) + var(--play) + var(--space-2)); }
/* A row is never shorter than its cover. */
table:has(.play-btn) .title-cell { height: calc(var(--play) + var(--row-y) * 2); }
/* Centred on the whole row, however many lines the cell holds. Auto margins, not a transform,
   so the button's press nudge still works. */
.title-cell > .play-btn { position: absolute; left: var(--cell-x); top: 0; bottom: 0; margin: auto 0; float: none; }
.title-cell:first-child > .play-btn { left: var(--pad-box); }
.oa-song .play-btn, li > .play-btn { float: none; vertical-align: middle; margin-right: var(--space-2); }
/* Lists built as grids give the button its own column, centred on the title's first line. */
.rank-list:has(.play-btn) li { grid-template-columns: 24px var(--play) minmax(0, 1fr) auto; }
.rank-list:has(.play-btn) .rl-name { grid-column: 3; }
.rank-list:has(.play-btn) .rl-bar { grid-column: 3 / -1; }
.rank-list .play-btn { margin: 0; }
.oa-before:has(.play-btn) .oa-song:not(:has(> .play-btn)) { padding-left: calc(var(--play) + var(--space-2)); }
.oa-title:has(> .play-btn) { display: grid; grid-template-columns: var(--play) minmax(0, 1fr); column-gap: var(--space-3); align-items: start; }
.oa-title > .play-btn { margin: calc((var(--oa-line) - var(--play)) / 2) 0 0; }
.cd-song:has(> .play-btn) { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-2); align-items: center; }
.cd-song > .play-btn { margin: 0; }
.oa-title .play-btn { float: none; vertical-align: middle; margin-right: var(--space-2); }
@media (min-width: 761px) { :root { --play: 2.5rem; } }
/* The cover inside a play button. It fades in once loaded, over a tile the size of the slot.
   With a mouse, the icon shows while the row is hovered; on a touch screen, always. The song
   that's playing keeps its pause icon and the ember edge either way. */
:where(.play-btn.has-art) { position: relative; } /* the cover's frame, unless the slot already places it */
.play-btn.has-art { isolation: isolate; overflow: hidden; border: 0; background: var(--surface-2); color: var(--on-art); }
.pb-art { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--dur-base); }
.play-btn.art-in .pb-art { opacity: 1; }
.play-btn.has-art::after { content: ""; position: absolute; inset: 0; z-index: 1; border: 1px solid var(--line); background: transparent; transition: background-color var(--dur-fast), border-color var(--dur-fast); }
.play-btn.has-art svg { position: relative; z-index: 2; filter: drop-shadow(0 0 2px var(--art-scrim)); transition: opacity var(--dur-fast); }
.play-btn.has-art.is-playing { color: var(--on-art); }
.play-btn.has-art.is-playing::after { border-color: var(--accent); }
.play-btn.has-art:is(.is-playing, :focus-visible)::after, .play-btn.has-art:not(.art-in)::after { background: var(--art-scrim); }
.play-btn.has-art.art-in:not(.is-playing):not(:focus-visible) svg { opacity: 0; }
@media (hover: hover) {
  .play-btn.has-art:hover, .play-btn.has-art.is-playing:hover { background: var(--surface-2); color: var(--on-art); }
  .play-btn.has-art:hover::after { border-color: var(--link); }
  :is(tr, li, .oa-song, .oa-title, .cd-song):hover .play-btn.has-art::after { background: var(--art-scrim); }
  :is(tr, li, .oa-song, .oa-title, .cd-song):hover .play-btn.has-art.art-in svg { opacity: 1; }
}
@media (hover: none) {
  .play-btn.has-art::after { background: var(--art-scrim); }
  .play-btn.has-art.art-in:not(.is-playing):not(:focus-visible) svg { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .pb-art, .play-btn.has-art::after, .play-btn.has-art svg { transition: none; } }
.pl-controls { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.pl-toggle { position: relative; width: var(--tap); height: var(--tap); }
.player-inline .pl-toggle { width: var(--control-h); height: var(--control-h); }
.pl-toggle svg { width: 16px; height: 16px; }
.pl-toggle.is-loading svg { visibility: hidden; }
.pl-toggle.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pl-spin .8s linear infinite; }
@keyframes pl-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .pl-toggle.is-loading::after { animation-duration: 2.4s; } }
.pl-time { color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; min-width: 4ch; }
.pl-time[data-pl="len"] { text-align: right; }
.pl-seek { flex: 1 1 auto; min-width: 0; height: var(--control-h-sm); margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; --pct: 0%; }
.pl-seek:disabled { cursor: default; opacity: .5; }
.pl-seek::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(to right, var(--accent) var(--pct), var(--line-strong) var(--pct)); }
.pl-seek::-moz-range-track { height: 4px; background: var(--line-strong); }
.pl-seek::-moz-range-progress { height: 4px; background: var(--accent); }
.pl-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: calc((var(--space-1) - var(--space-4)) / 2); border-radius: 50%; background: var(--link-hover); border: 0; box-shadow: 0 0 10px var(--glow); transition: transform var(--dur-press); }
.pl-seek::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--link-hover); border: 0; box-shadow: 0 0 10px var(--glow); }
.pl-seek:active::-webkit-slider-thumb { transform: scale(1.2); }
.pl-seek:disabled::-webkit-slider-thumb { visibility: hidden; }
.pl-seek:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-error[hidden] { display: none; }
.pl-error { margin: var(--space-2) 0 0; display: flex; align-items: center; gap: var(--space-2); color: var(--bad); font-size: var(--fs-sm); }
.player-inline { max-width: 520px; margin: var(--space-1) 0 var(--space-4); padding: var(--space-2) var(--space-4) var(--space-2) var(--space-2); background: var(--surface); border: 1px solid var(--line); }
.player-bar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: auto minmax(0, 240px) minmax(0, 1fr) auto; align-items: center; gap: var(--space-2) var(--space-4);
  padding: var(--space-2) var(--gutter) calc(var(--space-2) + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: 0 -8px 24px -12px var(--shadow); animation: pl-rise .2s ease-out; }
@keyframes pl-rise { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .player-bar { animation: none; } }
.player-bar[hidden] { display: none; }
.player-bar .pl-error { grid-column: 3; margin: 0; }
.pl-info { display: grid; min-width: 0; line-height: 1.3; }
/* The playing song's cover, left of its title and artist; gone for a song without one. */
/* The bar's play button wears the playing song's cover, dimmed so its icon always reads. */
.pl-toggle.has-art { overflow: hidden; background: var(--surface-2); color: var(--on-art); }
.pl-toggle.has-art .pb-art { filter: brightness(.55); }
.pl-toggle.art-in .pb-art { opacity: 1; }
.pl-toggle.has-art svg { position: relative; z-index: 1; }
.pl-toggle.has-art::after { z-index: 1; }
.pl-toggle.has-art svg { filter: drop-shadow(0 0 2px var(--art-scrim)); }
.pl-toggle.has-art.is-playing { color: var(--on-art); }
@media (hover: hover) { .pl-toggle.has-art:hover, .pl-toggle.has-art.is-playing:hover { background: var(--surface-2); color: var(--on-art); } .pl-toggle.has-art:hover .pb-art { filter: brightness(.4); } }
.pl-info a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-info span { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-close { width: var(--control-h-sm); height: var(--control-h-sm); background: transparent; border: 1px solid transparent; color: var(--muted); }
.pl-close svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
@media (hover: hover) { .pl-close:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--link-hover); box-shadow: none; } }
body.has-player footer { padding-bottom: calc(var(--space-8) + var(--player-h)); }
/* Jump to the top or bottom of a long page. In the margin beside the page when there's room, above
   the player and any Save bar. Each button shows only when there's a long way to go in its direction. */
.jump { --jump-size: var(--control-h); position: fixed; z-index: 4; display: grid; gap: var(--space-2);
  right: max(var(--gutter), calc((100vw - 1240px) / 2 - var(--jump-size) - var(--space-4)));
  bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); transition: bottom var(--dur-base); }
body.has-player .jump { bottom: calc(var(--player-h) + var(--space-4)); }
body:has(.sticky-actions) .jump { bottom: calc(var(--control-h) + var(--space-10)); }
.jump[hidden] { display: none; }
.jump-btn { display: grid; place-items: center; width: var(--jump-size); height: var(--jump-size); min-height: 0; padding: 0;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line-strong); box-shadow: 0 6px 18px -8px var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(var(--space-2));
  transition: opacity var(--dur-base), visibility var(--dur-base), transform var(--dur-base), background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.jump-btn.on { opacity: 1; visibility: visible; transform: none; }
.jump-btn.on:active { transform: translateY(1px); }
.jump-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .jump-btn:hover { background: var(--surface-2); border-color: var(--link); color: var(--link-hover); box-shadow: 0 6px 18px -8px var(--shadow), 0 0 14px -4px var(--glow); } }
@media (prefers-reduced-motion: reduce) { .jump-btn { transform: none; } }
@media (max-width: 760px) {
  .jump { --jump-size: var(--tap); }
  /* "One" (trial): a single button that points the way you're scrolling and fades once you stop. */
  .jump.one { gap: 0; }
  .jump.one .jump-btn:not(.on) { position: absolute; bottom: 0; }
}
@media (max-width: 760px) {
  .player-bar { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom)) var(--gutter); gap: var(--space-half) var(--space-3); }
  .player-bar > .pl-toggle { grid-row: 1 / span 2; width: var(--player-art); height: var(--player-art); }
  .player-bar > .pl-toggle svg { width: 22px; height: 22px; }
  .player-bar .pl-info { grid-column: 2; grid-row: 1; }
  .player-bar .pl-close { grid-column: 3; grid-row: 1; }
  .player-bar .pl-controls { grid-column: 2 / -1; grid-row: 2; }
  .player-bar .pl-error { grid-column: 1 / -1; }
  body.has-player footer { padding-bottom: calc(var(--space-6) + var(--player-h)); }
  .player-inline { max-width: none; }
}

/* ---------- Song page header: a band tinted by the cover art, with the score as the headline number ---------- */
.sh { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: var(--space-6); align-items: center; padding: var(--space-6); margin-bottom: var(--space-5); background: var(--surface); border: 1px solid var(--line); }
.sh-bg { position: absolute; inset: -40px; z-index: -1; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(48px) saturate(1.4); opacity: var(--cover-tint); }
.sh::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, transparent 30%, color-mix(in srgb, var(--bg) 70%, transparent)); }
.sh-cover { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); border: 1px solid var(--edge); box-shadow: 0 12px 32px var(--shadow-soft); }
.sh-cover.blank { background: linear-gradient(135deg, var(--surface-2), var(--bg)); }
/* An artist's picture: round, as artist pictures are in music apps, with a camera button on its rim
   for whoever may change it. The menu hangs off that button, and is a bottom sheet on a phone. */
.sh-cover.pic { position: relative; container-type: inline-size; background: none; border: 0; box-shadow: none; }
.pic-img, .pic-letter, .pic-busy { display: block; width: 100%; height: 100%; border-radius: 50%; }
.pic-img { object-fit: cover; background: var(--surface-2); border: 1px solid var(--edge); box-shadow: 0 12px 32px var(--shadow-soft); }
.pic-letter { display: grid; place-items: center; background: linear-gradient(135deg, var(--surface-2), var(--bg)); border: 1px solid var(--line-strong); color: var(--muted); font: 600 45cqi/1 var(--display); text-transform: uppercase; }
/* Upload spinner over the picture itself, so it stays dark in both themes. */
.pic-busy { position: absolute; inset: 0; display: none; place-items: center; background: rgb(0 0 0 / .55); }
.pic-busy::after { content: ""; width: 28%; aspect-ratio: 1; border: 3px solid rgb(255 255 255 / .25); border-top-color: var(--accent); border-radius: 50%; animation: pl-spin .8s linear infinite; }
.pic.busy .pic-busy { display: grid; }
.pic.busy .pic-edit { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .pic-busy::after { animation-duration: 2.4s; } }
.pic-edit { position: absolute; right: 4%; bottom: 4%; display: grid; place-items: center; width: var(--control-h); height: var(--control-h); min-height: 0; padding: 0; border-radius: 50%;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); box-shadow: 0 4px 12px var(--shadow-soft); anchor-name: --pic-edit; }
.pic-edit svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
@media (hover: hover) { .pic-edit:hover { background: var(--surface-2); color: var(--accent-hover); border-color: var(--accent); } }
.pic-edit:active { background: var(--surface-2); }

/* ---------- Picture viewer: the page's cover or artist picture, full screen ----------
   The big copy grows out of the picture's spot and shrinks back into it (--zx, --zy, --zs, set by
   ZOOM_SCRIPT as it opens). Tapping anywhere closes it, as in photo viewers. */
button.zoom { display: block; width: 100%; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; cursor: zoom-in; }
button.zoom img { transition: filter var(--dur-fast); }
@media (hover: hover) { button.zoom:hover { background: none; border: 0; box-shadow: none; } button.zoom:hover img { filter: brightness(1.12); } }
.pic > button.zoom { height: 100%; border-radius: 50%; }
.zoom-view { position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: var(--space-4); border: 0; overflow: hidden;
  background: transparent; color: var(--zoom-fg); cursor: zoom-out; overscroll-behavior: contain;
  transition: background-color var(--dur-base); }
.zoom-view:popover-open { display: grid; place-items: center; background: var(--zoom-bg); }
@starting-style { .zoom-view:popover-open { background: transparent; } }
.zoom-view::backdrop { background: transparent; }
/* The ghost that plays the close: it starts as the open viewer and settles into the closed one. */
.zoom-view.zoom-ghost { z-index: 30; display: grid; place-items: center; pointer-events: none; }
@starting-style { .zoom-view.zoom-ghost { background: var(--zoom-bg); } }
/* Set by ZOOM_SCRIPT once the picture has finished moving: changing the page's overflow redraws the whole
   page, blurred header and all, and on a phone that stalls long enough to swallow the animation. */
html.zoom-lock { overflow: hidden; }
.zoom-img { display: block; max-width: none; object-fit: contain; background: var(--surface-2);
  transform: translate(var(--zx, 0), var(--zy, 0)) scale(var(--zs, 1));
  transition: transform var(--dur-base) cubic-bezier(.2, 0, 0, 1), border-radius var(--dur-base) cubic-bezier(.2, 0, 0, 1); }
.zoom-view:popover-open .zoom-img { transform: none; }
@starting-style { .zoom-view:popover-open .zoom-img { transform: translate(var(--zx, 0), var(--zy, 0)) scale(var(--zs, 1)); } }
.zoom-view.round .zoom-img { border-radius: 50%; }
.zoom-view.round:popover-open .zoom-img { border-radius: 0; }
@starting-style { .zoom-view.round:popover-open .zoom-img { border-radius: 50%; } }
.zoom-close { position: absolute; top: calc(var(--space-2) + env(safe-area-inset-top)); right: calc(var(--space-2) + env(safe-area-inset-right));
  display: grid; place-items: center; width: var(--tap); height: var(--tap); min-height: 0; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--zoom-fg); opacity: 0; transition: opacity var(--dur-base), background var(--dur-fast); }
.zoom-view:popover-open .zoom-close { opacity: 1; }
@starting-style { .zoom-view:popover-open .zoom-close { opacity: 0; } }
@starting-style {
  .zoom-ghost .zoom-img { transform: none; }
  .zoom-view.zoom-ghost.round .zoom-img { border-radius: 0; }
  .zoom-ghost .zoom-close { opacity: 1; }
}
.zoom-close svg { width: 45%; height: 45%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
@media (hover: hover) { .zoom-close:hover { background: var(--zoom-hover); color: var(--zoom-fg); border: 0; box-shadow: none; } }
.zoom-close:active { background: var(--zoom-hover); }
@media (prefers-reduced-motion: reduce) {
  .zoom-img { opacity: 0; transition: opacity var(--dur-base); }
  .zoom-img, .zoom-view:popover-open .zoom-img { transform: none; }
  .zoom-view.round .zoom-img, .zoom-view.round:popover-open .zoom-img { border-radius: 0; }
  .zoom-view:popover-open .zoom-img { opacity: 1; }
  @starting-style { .zoom-view:popover-open .zoom-img { transform: none; opacity: 0; } .zoom-view.round:popover-open .zoom-img { border-radius: 0; } }
  @starting-style { .zoom-ghost .zoom-img { opacity: 1; } .zoom-view.zoom-ghost.round .zoom-img { border-radius: 0; } }
}
.pic-pop { position: fixed; inset: auto; position-anchor: --pic-edit; top: anchor(bottom); left: anchor(left); position-try-fallbacks: flip-block, flip-inline;
  margin: var(--space-2) 0 0; width: min(19rem, calc(100vw - 2 * var(--gutter))); padding: var(--space-1) 0 var(--space-2); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); box-shadow: 0 24px 48px var(--shadow);
  opacity: 0; transform: translateY(-6px); transition: opacity var(--dur-fast), transform var(--dur-fast), overlay var(--dur-fast) allow-discrete, display var(--dur-fast) allow-discrete; }
@supports not (position-anchor: --a) { .pic-pop { inset: 0; margin: auto; height: fit-content; } }
.pic-pop:popover-open { opacity: 1; transform: none; }
@starting-style { .pic-pop:popover-open { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .pic-pop { transition: none; } }
.pic-pop-title { margin: 0; padding: var(--space-2) var(--pad-box) var(--space-1); color: var(--faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.pic-form { margin: 0; }
.pic-opt { position: relative; display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: var(--tap); padding: 0 var(--pad-box); background: transparent; color: var(--text); border: 0; text-align: left; cursor: pointer;
  font: 500 var(--fd-md)/1.2 var(--display); text-transform: uppercase; letter-spacing: var(--ls-caps); transition: background var(--dur-fast); }
@media (hover: hover) { .pic-opt:hover { background: var(--surface-2); } }
.pic-opt:active { background: var(--surface-2); transform: none; }
.pic-opt input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.pic-opt:has(input:focus-visible), .pic-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pic-err { margin: var(--space-2) var(--pad-box) var(--space-1); color: var(--bad); font-size: var(--fs-sm); }
@media (max-width: 760px) {
  .pic-edit { right: 0; bottom: 0; width: var(--control-h-sm); height: var(--control-h-sm); }
  .pic-pop { inset: auto 0 0 0; width: auto; margin: 0; padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); border-inline: 0; border-bottom: 0; transform: translateY(16px); }
  @starting-style { .pic-pop:popover-open { opacity: 0; transform: translateY(16px); } }
  .pic-pop::backdrop { background: var(--scrim); }
  html:has(.pic-pop:popover-open) { overflow: hidden; }
}
.who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.who > div { min-width: 0; }
@media (max-width: 760px) {
  /* Names wrap on a phone: the picture shrinks to one line's height and sits by the first. */
  .who { align-items: flex-start; gap: var(--space-2); }
  .who > .avatar { --size: 1.5rem !important; }
}
.sh-main { min-width: 0; }
/* The way back up, in the band's top corner. It takes a grid row of its own, pulled tight to the content. */
.sh-top { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-h-sm); margin: calc(-1 * var(--space-4)) 0 calc(-1 * var(--space-5)); }
.sh-back { display: inline-flex; align-items: center; min-height: var(--control-h-sm); color: var(--muted); font-size: var(--fs-sm); }
.sh-top > :is(.btn, form) { margin-left: auto; }
.sh-top > form + .btn { margin-left: 0; }
.sh-top :is(> .btn, > form .btn) { background: color-mix(in srgb, var(--bg) 55%, transparent); border-color: var(--edge-strong); }
.sh-links { display: flex; gap: var(--gap-items); margin-top: var(--space-4); }
.sh-links .chip { background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--edge-strong); }
.sh-links .chip svg { width: 16px; height: 16px; fill: currentColor; opacity: .8; }
@media (hover: hover) { .sh-links .chip:hover { background: color-mix(in srgb, var(--bg) 30%, transparent); border-color: var(--link); } }
.sh-sub strong { color: var(--text); font-weight: 600; }
.sh-ratio { display: block; height: 3px; margin-top: var(--space-1); background: linear-gradient(to right, var(--accent) var(--pct), var(--line-strong) var(--pct)); }
.sh-title { font-size: var(--fd-3xl); margin: 0; overflow-wrap: anywhere; }
.sh-by { margin: var(--space-2) 0 0; font-size: var(--fs-lg); }
.sh-sub { margin: var(--space-2) 0 0; color: var(--muted); overflow-wrap: anywhere; }
.sh.no-cover { grid-template-columns: minmax(0, 1fr) auto; }
/* The period the figures are for: the header's last row, since it also sets the list under it. */
.sh-period { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--edge-strong); font-size: var(--fs-sm); }
.sh-period .period-seg { background: color-mix(in srgb, var(--bg) 55%, transparent); border-color: var(--edge-strong); }
.sh-period .period-seg a + a { border-left-color: var(--edge-strong); }
.sh-by a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
@media (hover: hover) { .sh-by a:hover { text-decoration-color: var(--accent); } }
.sh-pills { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.sh .player-inline { max-width: none; margin: var(--space-4) 0 0; background: color-mix(in srgb, var(--bg) 55%, transparent); border-color: var(--edge-strong); }
.sh-board { display: grid; grid-template-columns: repeat(2, minmax(110px, auto)); gap: var(--space-3) var(--space-6); padding-left: var(--space-6); border-left: 1px solid var(--edge-strong); }
.sh-stat .k { font-family: var(--display); font-weight: 500; font-size: var(--fd-xs); letter-spacing: var(--ls-kicker); text-transform: uppercase; color: var(--muted); }
.sh-stat .v { font-family: var(--display); font-size: var(--fd-xl); font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sh-stat .d { color: var(--faint); font-size: var(--fs-sm); }
a.sh-stat { display: block; color: inherit; }
a.sh-stat .k::after { content: " →"; color: var(--accent); }
@media (hover: hover) { a.sh-stat:hover { color: inherit; text-decoration: none; } a.sh-stat:hover .k { color: var(--accent-hover); } }
.sh-board .sh-stat:first-child { grid-column: 1 / -1; }
.sh-board .sh-stat:first-child .v { font-size: calc(var(--fd-3xl) * 1.4); line-height: 1; color: var(--accent-hover); }

/* Facts: one quiet row of label-over-value pairs under the band. */
.sh-facts { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-8); margin: 0 0 var(--space-1); padding: var(--space-1) 0 var(--space-3); border-bottom: 1px solid var(--line); }
.sh-facts > div { min-width: 0; }
.sh-facts dt { color: var(--faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--ls-caps); }
.sh-facts dd { margin: var(--space-half) 0 0; overflow-wrap: anywhere; }
.sh-link { flex: 1 1 260px; }
.sh-link .link-edit { margin-top: var(--space-1); }

@media (max-width: 1120px) {
  .sh { grid-template-columns: 160px minmax(0, 1fr); }
  .sh.no-cover { grid-template-columns: minmax(0, 1fr); }
  .sh-board { grid-column: 1 / -1; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: var(--space-4) 0 0; border-left: 0; border-top: 1px solid var(--edge-strong); }
  .sh-board .sh-stat:first-child { grid-column: auto; }
  .sh-board .sh-stat:first-child .v { font-size: var(--fd-xl); line-height: 1.15; }
}
@media (max-width: 760px) {
  /* A phone stacks the band: back, picture beside the name, links, player, then the figures. */
  .sh { grid-template-columns: 88px minmax(0, 1fr); gap: 0 var(--space-4); padding: var(--space-4) var(--gutter); margin-inline: calc(-1 * var(--gutter)); border-inline: 0; }
  .sh::after { background: linear-gradient(180deg, transparent 20%, color-mix(in srgb, var(--bg) 75%, transparent)); }
  /* First on the page, the band runs up to the header bar. */
  main > .sh:first-child { margin-top: calc(-1 * var(--space-5)); border-top: 0; }
  .sh-top { margin: calc(-1 * var(--space-3)) 0 var(--space-1); }
  .sh-main { display: contents; }
  .sh > .sh-cover, .sh > .zoom { align-self: center; }
  .sh-name { align-self: center; min-width: 0; }
  .sh.no-cover { grid-template-columns: minmax(0, 1fr); }
  .sh-title { line-height: 1; }
  .sh-by { margin-top: var(--space-1); font-size: var(--fs-md); }
  .sh-sub { margin-top: var(--space-1); font-size: var(--fs-sm); }
  .sh-links, .sh .player-inline, .sh-board { grid-column: 1 / -1; }
  .sh .player-inline { margin-top: var(--space-4); padding-right: var(--space-3); }
  /* The headline figure takes a row: its number on the left, its detail and bar on the right. */
  .sh-board { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4) 0; padding-top: var(--space-4); margin-top: var(--space-4); }
  .sh-board.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sh-board .sh-stat:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-5); align-items: end; }
  .sh-board .sh-stat:first-child .k { grid-column: 1 / -1; }
  .sh-board .sh-stat:first-child .v { font-size: calc(var(--fd-3xl) * 1.3); line-height: .95; color: var(--accent-hover); }
  .sh-board .sh-stat:first-child .d { padding-bottom: var(--space-1); text-align: right; color: var(--muted); font-size: var(--fs-sm); }
  .sh-board .sh-stat:not(:first-child) { padding: 0 var(--space-3); border-left: 1px solid var(--edge-strong); }
  .sh-board .sh-stat:nth-child(3n+2), .sh-board.g2 .sh-stat:nth-child(2n) { padding-left: 0; border-left: 0; }
  .sh-board.g2 .sh-stat:nth-child(2n+3) { padding-left: var(--space-3); border-left: 1px solid var(--edge-strong); }
  .sh-stat .k { letter-spacing: var(--ls-caps); }
  .sh-stat .d { font-size: var(--fs-sm); }
  .sh-facts { gap: var(--space-2) var(--space-6); }
  /* Filters share a row where two fit. */
  .filters label { flex: 1 1 9rem; min-width: 0; }
  .filters label > select, .filters label > input:not([type=checkbox], [type=radio]) { width: 100%; min-width: 0; }
}
/* Spacing a page sets on one element, from the scale (never an inline style). Last, so they win. */
.m-0 { margin: 0; }
.mt-pair { margin-top: var(--gap-pair); }
.mt-block { margin-top: var(--gap-block); }
.mb-block { margin-bottom: var(--gap-block); }
