:root {
  --paper: #F4F5F7;
  --surface: #FFFFFF;
  --ink: #161A23;
  --muted: #6A7080;
  --line: #E3E5EA;
  --red: #E5281E;
  --red-deep: #B81810;
  --red-wash: #FDECEA;
  --on-red: #FFFFFF;
  --focus: #E5281E;
  --scrim: rgba(22, 26, 35, .45);
  --lift: 0 1px 2px rgba(22, 26, 35, .06), 0 8px 24px -12px rgba(22, 26, 35, .22);
  --player-h: 84px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121419;
    --surface: #1B1E25;
    --ink: #EEF0F3;
    --muted: #9AA0AD;
    --line: #2A2E37;
    --red: #FF3B2F;
    --red-deep: #E5281E;
    --red-wash: #3A1A19;
    --scrim: rgba(0, 0, 0, .6);
    --lift: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 28px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; } /* reserve the scrollbar so pages without one (loading, empty) don't shift sideways */
/* Scrollbars: a slim inset pill that stays quiet until you reach for it, then turns kite red. */
:root { --thumb: color-mix(in srgb, var(--ink) 24%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--thumb) transparent; }
@supports selector(::-webkit-scrollbar) {
  * { scrollbar-width: auto; scrollbar-color: auto; }
  ::-webkit-scrollbar { width: 14px; height: 14px; background: transparent; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--thumb); background-clip: content-box;
    border: 4px solid transparent; border-radius: 999px; min-height: 48px; min-width: 48px;
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--red); background-clip: content-box; border-width: 3px; }
  ::-webkit-scrollbar-thumb:active { background: var(--red-deep); background-clip: content-box; border-width: 3px; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variation-settings: "opsz" 14;
  padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom, 0px));
}
body.no-player { padding-bottom: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
svg { width: 1em; height: 1em; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto minmax(0, 560px) 1fr; align-items: center; gap: 24px;
  /* same left/right edges as main: gutter, plus half of whatever exceeds the 1680px content column */
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(var(--gutter), calc((100% - 1680px) / 2 + var(--gutter))) 12px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 760; font-size: 22px; letter-spacing: -.02em;
  font-variation-settings: "opsz" 48, "wdth" 85;
}
.kite { width: 15px; height: 15px; background: var(--red); border-radius: 3px; transform: rotate(45deg); margin: 0 3px; }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 16px 0 42px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-wash); }
.account { justify-self: end; display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; text-decoration: none; font-weight: 560; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn.primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface); border-color: var(--line); }
.btn.danger { color: var(--red); }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Main layout ---------- */
main { padding: 8px var(--gutter) 48px; outline: none; max-width: 1680px; margin: 0 auto; }
.lede { margin: 12px 0 22px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.lede h1 {
  margin: 0; font-weight: 780; letter-spacing: -.025em; line-height: 1;
  font-size: clamp(30px, 4.2vw, 52px); font-variation-settings: "opsz" 96, "wdth" 80;
}
.lede p { margin: 0; color: var(--muted); max-width: 48ch; }
.pagehead { margin: 18px 0 20px; }
.pagehead h1 { margin: 0; font-weight: 780; letter-spacing: -.025em; line-height: 1.05; font-size: clamp(30px, 4vw, 48px); font-variation-settings: "opsz" 96, "wdth" 80; }
.pagehead p { margin: 6px 0 0; color: var(--muted); }

/* ---------- Cover wall (hero) ---------- */
.wall {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-flow: dense;
}
.wall .tile:first-child { grid-column: span 2; grid-row: span 2; }
.wall .tile:first-child .meta b { font-size: 20px; font-variation-settings: "opsz" 36, "wdth" 85; }

/* ---------- Tiles ---------- */
.tile { position: relative; min-width: 0; }
.cover {
  cursor: pointer; position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: var(--surface); box-shadow: var(--lift);
  transition: transform .18s ease;
}
.cover img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.cover img.fill { object-fit: cover; }
.tile:hover .cover { transform: translateY(-2px); }
.tile .meta { display: block; padding: 9px 2px 0; text-decoration: none; }
.tile .meta:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.tile .meta b {
  display: block; font-weight: 640; font-size: 15px; line-height: 1.25; letter-spacing: -.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tile .meta span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Typographic cover for stations without usable artwork, sized relative to its tile */
.cover, .np-cover, .art-drop, .athumb, .st-art { container-type: inline-size; }
.gen {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  padding: 9%; background: var(--g); color: var(--gi);
  font-weight: 800; letter-spacing: -.03em; line-height: .92;
  font-variation-settings: "opsz" 96, "wdth" 75;
  font-size: var(--gs, 26px); overflow: hidden; word-break: break-word; hyphens: auto;
}
.gen::before {
  content: ""; position: absolute; top: 10%; left: 10%;
  width: 11%; aspect-ratio: 1; border-radius: 18%; transform: rotate(45deg);
  background: currentColor; opacity: .9;
}

/* The kite marker: one glyph at a time (play on hover, bars while live, pause when hovering the live tile).
   The 44px box holds the whole rotated 30px square, so it sits flush 8px from the cover's corner. */
.tile .go {
  position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px;
  display: grid; place-items: center; color: var(--on-red); pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.tile .go::before { content: ""; position: absolute; inset: 7px; background: var(--red); border-radius: 7px; transform: rotate(45deg); box-shadow: 0 6px 16px -6px rgba(0,0,0,.5); }
.tile .go > * { grid-area: 1 / 1; position: relative; }
.tile .go svg { width: 18px; height: 18px; }
.tile .go .i-play { translate: 1px 0; } /* the triangle's weight sits left of its box centre */
.tile .go .i-pause, .tile .go .eq { display: none; }
.tile:hover .go, .tile:focus-within .go { opacity: 1; transform: none; }
.tile.on .cover { box-shadow: 0 0 0 3px var(--red), var(--lift); }
.tile.on .go { opacity: 1; transform: none; }
.playing .tile.on .go .i-play { display: none; }
.playing .tile.on .go .eq { display: flex; }
.playing .tile.on:hover .go .eq, .playing .tile.on:focus-within .go .eq { display: none; }
.playing .tile.on:hover .go .i-pause, .playing .tile.on:focus-within .go .i-pause { display: block; }
.eq { align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; background: currentColor; border-radius: 1px; height: 30%; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.4s; }
.eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.tile .heart {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink);
  opacity: 0; transition: opacity .15s;
}
.tile .heart svg { width: 17px; height: 17px; }
.tile .heart.is-fav { color: var(--red); opacity: 1; }
.tile:hover .heart, .tile .heart:focus-visible { opacity: 1; }
@media (hover: none) { .tile .heart { opacity: 1; } }

/* ---------- Favourite pills ---------- */
.pills { display: flex; gap: 8px; overflow-x: auto; margin: 0 -4px 22px; padding: 4px 4px 6px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; display: inline-flex; align-items: center; gap: 9px; height: 40px; max-width: 240px;
  padding: 0 14px 0 4px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 560; cursor: pointer; text-decoration: none;
}
.pill:hover { border-color: var(--ink); }
.pill.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.pill .thumb { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--paper); container-type: inline-size; }
.pill .thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pill .thumb img.fill { object-fit: cover; }
.pill .thumb .gen { --gs: 8px !important; padding: 4px; align-items: center; justify-content: center; text-align: center; }
.pill .thumb .gen::before { display: none; }
.pill .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.more { padding: 0 16px; color: var(--muted); }
.pill.more:hover { color: var(--red); }

/* ---------- Genre chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 6px; }
.chip {
  height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  font-weight: 520; text-transform: capitalize;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Shelves ---------- */
.shelf { margin-top: 38px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.shelf-head h2 {
  margin: 0; font-size: 26px; font-weight: 740; letter-spacing: -.02em; text-transform: capitalize;
  font-variation-settings: "opsz" 48, "wdth" 85;
}
.shelf-head a { color: var(--muted); text-decoration: none; font-weight: 520; }
.shelf-head a:hover { color: var(--red); }
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 168px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 4px 12px; margin: -4px -4px 0;
  scrollbar-width: thin;
}
.row .tile { scroll-snap-align: start; }
.grid { display: grid; gap: 22px 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* ---------- Library ---------- */
.tabs { display: flex; gap: 6px; margin: 4px 0 24px; flex-wrap: wrap; align-items: center; }
.tabs .spacer { flex: 1; }
.tab { height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: none; cursor: pointer; font-weight: 560; color: var(--muted); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
.tile .edit {
  position: absolute; top: 8px; left: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.tile .edit svg { width: 16px; height: 16px; }

.empty {
  border: 1.5px dashed var(--line); border-radius: 16px; padding: 40px 24px; text-align: center; color: var(--muted);
}
.empty h3 { margin: 0 0 6px; color: var(--ink); font-size: 20px; font-weight: 700; font-variation-settings: "opsz" 36, "wdth" 85; }
.empty p { margin: 0 auto 18px; max-width: 46ch; }
.note { color: var(--muted); margin: 26px 0 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---------- Skeletons ---------- */
.sk .cover { background: var(--line); box-shadow: none; animation: pulse 1.4s ease-in-out infinite; }
.sk .meta b, .sk .meta span { background: var(--line); border-radius: 4px; height: 12px; margin-top: 6px; width: 70%; }
.sk .meta span { width: 40%; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- Player ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px;
  height: calc(var(--player-h) + env(safe-area-inset-bottom, 0px));
  /* same left/right edges as the header and main content */
  padding: 0 max(var(--gutter), calc((100% - 1680px) / 2 + var(--gutter))) env(safe-area-inset-bottom, 0px);
  background: var(--surface); border-top: 1px solid var(--line);
}
.np { display: flex; align-items: center; gap: 14px; min-width: 0; }
.np-cover { position: relative; width: 56px; height: 56px; flex: none; border-radius: 8px; overflow: hidden; background: var(--line); }
.np-cover img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.np-cover .gen { --gs: 13px !important; padding: 7px; }
.np-cover .gen::before { display: none; }
.np-text { min-width: 0; }
.np-name { display: block; font-weight: 680; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.np-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.np-title { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.np-title .live {
  flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--red); font-weight: 650;
}
.np-title .live::before { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 1.5px; transform: rotate(45deg); }
.playing .np-title .live::before { animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.np-title .err { color: var(--red); }

.controls { display: flex; align-items: center; gap: 10px; }
.ctl {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
}
.ctl:hover { background: var(--paper); }
.ctl svg { width: 22px; height: 22px; }
.ctl[disabled] { opacity: .35; cursor: default; background: none; }
.fav.is-fav { color: var(--red); }

/* The kite: the one loud thing on the page */
.kite-btn {
  position: relative; width: 64px; height: 64px; border: 0; background: none; cursor: pointer; padding: 0;
  display: grid; place-items: center; color: var(--on-red);
}
.kite-shape {
  position: absolute; inset: 10px; background: var(--red); border-radius: 11px; transform: rotate(45deg);
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), background .15s;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--red) 70%, transparent);
}
.kite-btn:hover .kite-shape { background: var(--red-deep); transform: rotate(45deg) scale(1.06); }
.kite-btn:active .kite-shape { transform: rotate(45deg) scale(.96); }
.kite-btn .glyph { position: relative; width: 24px; height: 24px; }
.kite-btn.loading .kite-shape { animation: spin 1.1s linear infinite; }
@keyframes spin { from { transform: rotate(45deg); } to { transform: rotate(405deg); } }
.kite-btn:focus-visible { outline: none; }
.kite-btn:focus-visible .kite-shape { outline: 3px solid var(--ink); outline-offset: 3px; }

.side { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.vol { display: flex; align-items: center; gap: 4px; }
.vol input { width: 120px; accent-color: var(--red); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--red) var(--p, 80%), var(--line) var(--p, 80%)); cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--red); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--red); }

/* ---------- Modal ---------- */
dialog {
  border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink);
  width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45);
}
dialog.wide { width: min(640px, calc(100vw - 32px)); }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
dialog[open] { animation: rise .2s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.m-body { padding: 28px; }
.m-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.m-head h2 { margin: 0; font-size: 26px; font-weight: 760; letter-spacing: -.02em; line-height: 1.1; font-variation-settings: "opsz" 48, "wdth" 85; }
.m-head .ctl { margin: -6px -8px 0 0; }
.m-sub { color: var(--muted); margin: 0 0 22px; }
.m-sub b { color: var(--ink); font-weight: 600; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field > small { display: block; color: var(--muted); font-size: 13px; margin-top: 5px; }
.field input[type=text], .field input[type=email], .field input[type=url], .field input:not([type]) {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: inherit;
}
.field textarea {
  width: 100%; min-height: 132px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: inherit; line-height: 1.55; resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-wash); background: var(--surface); }
.field input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-wash); background: var(--surface); }
.code-input { letter-spacing: .5em; font-size: 26px !important; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; height: 60px !important; }
.m-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.m-actions .left { margin-right: auto; }
.m-err { color: var(--red); font-weight: 560; min-height: 1.5em; margin: -4px 0 0; font-size: 14px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 560; }

.st-form { display: grid; grid-template-columns: 168px 1fr; gap: 24px; }
.art-pick { display: flex; flex-direction: column; gap: 8px; }
.art-drop {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 1.5px dashed var(--line); background: var(--paper); display: grid; place-items: center;
}
.art-drop.over { border-color: var(--red); background: var(--red-wash); }
.art-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-drop .gen { font-size: 22px; }
.art-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.art-pick small { color: var(--muted); font-size: 12.5px; text-align: center; }

/* ---------- ALTCHA (themed to the red accent) ---------- */
altcha-widget {
  --altcha-color-primary: var(--red);
  --altcha-color-primary-content: var(--on-red);
  --altcha-color-base: var(--paper);
  --altcha-color-base-content: var(--ink);
  --altcha-color-success: #1E9E5A;
  --altcha-color-error: var(--red);
  --altcha-border-color: var(--line);
  --altcha-border-radius: 10px;
  --altcha-max-width: 100%;
  display: block; margin-bottom: 4px;
}

/* ---------- Station page ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 14px 0 26px; color: var(--muted); font-size: 14px; }
.crumbs a { text-decoration: none; text-transform: capitalize; }
.crumbs a:hover { color: var(--red); }
.crumbs [aria-current] { color: var(--ink); }
.st-hero { display: grid; grid-template-columns: minmax(220px, 380px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.st-cover { position: relative; }
.st-art {
  position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: var(--surface); box-shadow: var(--lift);
}
.st-art img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.st-art img.fill { object-fit: cover; }
.station.on .st-art { box-shadow: 0 0 0 3px var(--red), var(--lift); }

/* The oversized kite sits on the cover's corner: the play control, the live bars and pause in one place. */
.st-cover .go { position: absolute; right: -20px; bottom: -20px; width: 112px; height: 112px; display: grid; place-items: center; color: var(--on-red); pointer-events: none; }
.st-cover .go::before {
  content: ""; position: absolute; inset: 17px; background: var(--red); border-radius: 16px; transform: rotate(45deg);
  box-shadow: 0 16px 32px -14px color-mix(in srgb, var(--red) 85%, black); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), background .15s;
}
.st-art:hover + .go::before { background: var(--red-deep); transform: rotate(45deg) scale(1.06); }
.st-cover .go > * { grid-area: 1 / 1; position: relative; }
.st-cover .go svg { width: 34px; height: 34px; }
.st-cover .go .i-play { translate: 2px 0; }
.st-cover .go .i-pause, .st-cover .go .eq { display: none; }
.st-cover .eq { height: 26px; gap: 3px; align-items: flex-end; }
.st-cover .eq i { width: 5px; border-radius: 2px; }
.playing .station.on .st-cover .go .i-play { display: none; }
.playing .station.on .st-cover .go .eq { display: flex; }
.playing .station.on .st-cover:hover .go .eq { display: none; }
.playing .station.on .st-cover:hover .go .i-pause { display: block; }

.st-main { min-width: 0; }
.st-main h1 {
  margin: 0; font-weight: 790; letter-spacing: -.03em; line-height: .95; text-wrap: balance; overflow-wrap: anywhere;
  font-size: clamp(40px, 6.2vw, 88px); font-variation-settings: "opsz" 96, "wdth" 75;
}
.st-meta { margin: 16px 0 0; color: var(--muted); font-size: 16px; }
.st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; }
.st-play { height: 56px; padding: 0 28px 0 22px; font-size: 17px; }
.st-play svg { width: 22px; height: 22px; }
.st-play .i-pause, .st-play .l-pause { display: none; }
.playing .station.on .st-play .i-play, .playing .station.on .st-play .l-play { display: none; }
.playing .station.on .st-play .i-pause { display: block; }
.playing .station.on .st-play .l-pause { display: inline; }
.st-fav { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.st-fav:hover { border-color: var(--muted); }
.st-fav svg { width: 22px; height: 22px; }
.st-fav.is-fav { color: var(--red); border-color: var(--red); }
.st-now { margin: 18px 0 0; min-height: 1.5em; font-weight: 560; overflow-wrap: anywhere; }
.st-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip.tag { cursor: default; }
.chip.tag:hover { border-color: var(--line); }
/* The text starts where the station name starts: same two columns as the hero. */
.st-about { display: grid; grid-template-columns: minmax(220px, 380px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); margin-top: 72px; }
.st-about h2 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 740; letter-spacing: -.02em; font-variation-settings: "opsz" 48, "wdth" 85; text-wrap: balance; }
.st-text { max-width: 62ch; }
.st-text p { margin: 0 0 1.1em; font-size: 17px; line-height: 1.68; overflow-wrap: break-word; }
.st-text p:last-child { margin-bottom: 0; }
.st-text p:first-child:not(:last-child) { font-size: 19.5px; line-height: 1.55; } /* with several paragraphs, the first reads as the introduction */
.station .shelf { margin-top: 64px; }
@media (max-width: 760px) {
  .st-hero { grid-template-columns: 1fr; gap: 36px; }
  .st-about { grid-template-columns: 1fr; gap: 14px; margin-top: 56px; }
  .st-cover { width: min(calc(100% - 28px), 340px); }
  .st-cover .go { right: -24px; bottom: -24px; width: 96px; height: 96px; }
  .st-cover .go::before { inset: 14px; border-radius: 13px; }
  .st-cover .go svg { width: 30px; height: 30px; }
}

/* ---------- Admin ---------- */
.atools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 18px; }
.asearch { position: relative; flex: 1 1 280px; max-width: 460px; }
.asearch svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.asearch input { width: 100%; height: 40px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; }
.asearch input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-wash); }
.atools .chips { margin: 0; flex: 1 1 auto; }
.atools .chip { height: 34px; padding: 0 13px; text-transform: none; }
.acount { color: var(--muted); margin: 0 0 8px; }
.alist { background: var(--surface); border-radius: 14px; box-shadow: var(--lift); overflow: hidden; }
.arow {
  display: grid; align-items: center; gap: 4px 16px; padding: 10px 14px;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, 190px) 84px auto;
  border-top: 1px solid var(--line);
}
.arow:first-child { border-top: 0; }
.athumb { position: relative; width: 48px; height: 48px; border-radius: 7px; overflow: hidden; background: var(--line); }
.athumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.athumb .gen { padding: 6px; --gs: 11cqw !important; }
.athumb .gen::before { display: none; }
.ainfo { min-width: 0; }
.ainfo b { display: block; font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ainfo span, .awho, .astat { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.astat { text-align: right; font-variant-numeric: tabular-nums; }
.aact { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.aicon { width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.aicon:hover { background: var(--paper); color: var(--ink); }
.aicon svg { width: 20px; height: 20px; }
.aicon.on { color: var(--red); }
.aicon[disabled] { opacity: .3; cursor: default; background: none; }
.abtn { height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid transparent; background: none; cursor: pointer; font-weight: 560; color: var(--muted); }
.abtn:hover { background: var(--paper); color: var(--ink); }
.abtn.sure { background: var(--red); color: var(--on-red); }
.arow.pos { grid-template-columns: 28px 48px minmax(0, 1fr) auto; }
.arow .num { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.divider { padding: 9px 14px; border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 13.5px; }
.alead { color: var(--muted); max-width: 62ch; margin: 0 0 18px; }
.amore { display: flex; justify-content: center; margin-top: 18px; }
.utable { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 14px; box-shadow: var(--lift); overflow: hidden; }
.utable th, .utable td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); white-space: nowrap; }
.utable th { border-top: 0; color: var(--muted); font-weight: 560; font-size: 13.5px; }
.utable td.n, .utable th.n { text-align: right; font-variant-numeric: tabular-nums; }
.uwrap { overflow-x: auto; border-radius: 14px; }
@media (max-width: 760px) {
  .arow { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .arow .awho, .arow .astat { display: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  translate: -50% 12px; opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s;
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-weight: 560;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .top { grid-template-columns: auto 1fr; gap: 10px 16px; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .vol input { display: none; }
  .player { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .side { display: none; }
  #prevBtn { display: none; }
}
@media (max-width: 520px) {
  :root { --player-h: 74px; }
  .wall { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
  .row { grid-auto-columns: 42%; }
  .np-cover { width: 48px; height: 48px; }
  .kite-btn { width: 56px; height: 56px; }
  .st-form { grid-template-columns: 1fr; }
  .art-pick { max-width: 168px; }
  .m-body { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Footer and legal pages ---------- */
.foot { display: flex; gap: 22px; max-width: 1680px; margin: 0 auto; padding: 8px var(--gutter) 28px; font-size: 14px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--red); }
body:not(.no-player) .foot { padding-bottom: 12px; }

.legal { max-width: 1040px; margin: 18px 0 24px; }
.legal-head h1 { margin: 0; font-weight: 780; letter-spacing: -.025em; line-height: 1.05; font-size: clamp(30px, 4vw, 48px); font-variation-settings: "opsz" 96, "wdth" 80; }
.legal-head p { margin: 12px 0 0; max-width: 52ch; font-size: 19px; line-height: 1.5; text-wrap: pretty; }
.legal-head .legal-date { font-size: 14px; color: var(--muted); }
.legal section { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: 8px clamp(24px, 5vw, 64px); margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.legal section:first-of-type { margin-top: 44px; }
.legal h2 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 740; letter-spacing: -.02em; font-variation-settings: "opsz" 48, "wdth" 85; text-wrap: balance; }
.legal-text { max-width: 62ch; font-size: 16.5px; line-height: 1.65; }
.legal-text p { margin: 0 0 1em; }
.legal-text p:last-child { margin-bottom: 0; }
.legal-text ul { margin: 0 0 1em; padding-left: 1.2em; }
.legal-text li { margin-bottom: .6em; }
.legal-text a { color: var(--red); text-underline-offset: 3px; }
@media (max-width: 720px) {
  .legal section { grid-template-columns: 1fr; }
}

/* ---------- Account tab ---------- */
.acct { max-width: 1040px; padding-top: 12px; }
.acct h2 { margin: 0; font-weight: 740; letter-spacing: -.02em; font-variation-settings: "opsz" 48, "wdth" 85; }
.acct-me h2 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.1; overflow-wrap: anywhere; font-variation-settings: "opsz" 96, "wdth" 80; }
.acct-me p { margin: 12px 0 20px; color: var(--muted); font-size: 17px; }
.acct-me p b { color: var(--ink); font-variant-numeric: tabular-nums; }
.acct-del { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: 12px clamp(24px, 5vw, 64px); margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.acct-del h2 { font-size: 22px; line-height: 1.2; }
.acct-note { margin: 6px 0 0; color: var(--muted); }
.acct-del form { max-width: 460px; }
.acct-del form p { margin: 0 0 8px; line-height: 1.55; }
.acct-del ul { margin: 0 0 22px; padding-left: 1.2em; color: var(--muted); line-height: 1.6; }
.acct-del .m-err { margin: -6px 0 14px; }
.acct .btn.danger:not(:disabled) { border-color: var(--red); }
.acct .btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 720px) { .acct-del { grid-template-columns: 1fr; } }
