/* 1radiœ web app. Light by default, navy in dark mode. Logo blue #1a80b6 is the strong
   accent, mint #9ac7bf marks "Olli hört gerade". Wide screens: player in the middle,
   stations on a scale below. Phones (760 px and less): list with a docked player. */

@font-face {
  font-family: "R1 Sans";
  src: url("fonts/R1Sans.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 100% 112%;
  font-display: swap;
}

:root {
  --bg: #fcfcfd;
  --fg: #0b1328;
  --muted: #3d4a66;
  --line: rgb(11 19 40 / .18);
  --accent: #1a80b6;
  --onaccent: #fcfcfd;
  --needle: #1a80b6;
  --hl: rgb(26 128 182 / .14);
  --focus: #1777ab;
  --live: #1a80b6;
  --pillbg: #0b1328;
  --panel: #0b1328;
  --panelfg: #fcfcfd;
  --panelmuted: #9ac7bf;
  --tilebg: #e3ebf3;
  --tipbg: rgb(11 19 40 / .9);
  --mint: #9ac7bf;
  --stretch: 112%;
  --slot: 88px;
  --sun: none; --moon: block;   /* St. Pauli Pop fork: the icon of the light/dark button */
  color-scheme: light;
}
/* St. Pauli Pop fork: dark by the system setting, unless the visitor chose light; and dark
   by choice (data-theme, set by assets/theme.js). Keep the two lists the same. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1328;
    --fg: #fcfcfd;
    --muted: #9ac7bf;
    --line: rgb(252 252 253 / .2);
    --hl: rgb(26 128 182 / .3);
    --focus: #9ac7bf;
    --live: #9ac7bf;
    --pillbg: #22335f;
    --panel: #13203f;
    --tilebg: #17244a;
    --tipbg: rgb(23 119 171 / .95);
    color-scheme: dark;
    --sun: block; --moon: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1328;
  --fg: #fcfcfd;
  --muted: #9ac7bf;
  --line: rgb(252 252 253 / .2);
  --hl: rgb(26 128 182 / .3);
  --focus: #9ac7bf;
  --live: #9ac7bf;
  --pillbg: #22335f;
  --panel: #13203f;
  --tilebg: #17244a;
  --tipbg: rgb(23 119 171 / .95);
  color-scheme: dark;
  --sun: block; --moon: none;
}

/* St. Pauli Pop fork: colour themes, chosen in the admin (Texte, Farbthema; BRAND_SKINS in
   app/brand.php). Each value is light-dark(light, dark): the browser takes the one for the
   colour scheme set above. Browsers without light-dark() keep the standard colours. */
:root[data-skin="coffee"] {
  --bg: light-dark(#faf6f0, #1a120d);
  --fg: light-dark(#2b1d14, #faf6f0);
  --muted: light-dark(#6b5444, #d9b99b);
  --line: light-dark(rgb(43 29 20 / .18), rgb(250 246 240 / .2));
  --accent: light-dark(#8a4b21, #c8783f);
  --onaccent: light-dark(#fffaf3, #1a120d);
  --needle: light-dark(#8a4b21, #c8783f);
  --hl: light-dark(rgb(138 75 33 / .14), rgb(200 120 63 / .3));
  --focus: light-dark(#7a4019, #d9b99b);
  --live: light-dark(#8a4b21, #d9b99b);
  --pillbg: light-dark(#2b1d14, #4a3324);
  --panel: light-dark(#2b1d14, #2a1d15);
  --panelfg: #faf6f0;
  --panelmuted: #d9b99b;
  --tilebg: light-dark(#efe4d6, #2a1d15);
  --tipbg: light-dark(rgb(43 29 20 / .9), rgb(122 64 25 / .95));
  --mint: #d9b99b;
}
/* the docked player's panel is dark in both views: its play button as in the dark view */
:root[data-skin="coffee"] .mini .ic-play { background: #c8783f; color: #1a120d; }
:root[data-skin="csd"] {
  --bg: light-dark(#fdfdfd, #111114);
  --fg: light-dark(#15151a, #fdfdfd);
  --muted: light-dark(#4a4a57, #c9c9d6);
  --line: light-dark(rgb(21 21 26 / .18), rgb(253 253 253 / .2));
  --accent: light-dark(#6d28d9, #8b5cf6);
  --onaccent: #fdfdfd;
  --needle: light-dark(#6d28d9, #a78bfa);
  --hl: light-dark(rgb(109 40 217 / .12), rgb(139 92 246 / .3));
  --focus: light-dark(#5b21b6, #c4b5fd);
  --live: light-dark(#6d28d9, #c4b5fd);
  --pillbg: light-dark(#15151a, #33333d);
  --panel: light-dark(#15151a, #1c1c22);
  --panelfg: #fdfdfd;
  --panelmuted: #c9c9d6;
  --tilebg: light-dark(#ececf1, #22222a);
  --tipbg: light-dark(rgb(21 21 26 / .9), rgb(91 33 182 / .95));
  --mint: #c9c9d6;
  --rainbow: linear-gradient(90deg, #e40303, #ff8c00, #ffed00, #008026, #004dff, #750787);
}
/* the rainbow: a line across the top and a ring around the play buttons */
:root[data-skin="csd"] body::before { content: ""; position: fixed; inset: 0 0 auto; height: 5px; background: var(--rainbow); z-index: 5; }
:root[data-skin="csd"] .play, :root[data-skin="csd"] .mini .ic-play {
  border: 4px solid transparent;
  background: linear-gradient(var(--accent), var(--accent)) padding-box, var(--rainbow) border-box;
}
:root[data-skin="csd"] .mini .ic-play { border-width: 3px; }
/* black and white, nothing else: pictures lose their colour too (the players of other
   services keep theirs). In the dark view the docked player's panel turns white. */
:root[data-skin="mono"] {
  --bg: light-dark(#fff, #000);
  --fg: light-dark(#000, #fff);
  --muted: light-dark(#444, #c4c4c4);
  --line: light-dark(rgb(0 0 0 / .3), rgb(255 255 255 / .36));
  --accent: light-dark(#000, #fff);
  --onaccent: light-dark(#fff, #000);
  --needle: light-dark(#000, #fff);
  --hl: light-dark(rgb(0 0 0 / .1), rgb(255 255 255 / .2));
  --focus: light-dark(#000, #fff);
  --live: light-dark(#000, #fff);
  --pillbg: light-dark(#000, #3a3a3a);
  --panel: light-dark(#000, #fff);
  --panelfg: light-dark(#fff, #000);
  --panelmuted: light-dark(#c4c4c4, #444);
  --tilebg: light-dark(#ededed, #1e1e1e);
  --tipbg: light-dark(#000, #3a3a3a);
  --mint: light-dark(#c4c4c4, #444);
}
:root[data-skin="mono"] img { filter: grayscale(1); }
:root[data-skin="mono"] .mini .ic { border-color: var(--panelmuted); }
:root[data-skin="mono"] .mini .ic-play { background: var(--panelfg); color: var(--panel); }
/* brown, white and red */
:root[data-skin="fcsp"] {
  --bg: light-dark(#fff, #24150c);
  --fg: light-dark(#2b1a10, #fff);
  --muted: light-dark(#6a5343, #e6d5c8);
  --line: light-dark(rgb(43 26 16 / .2), rgb(255 255 255 / .22));
  --accent: light-dark(#d2001c, #f0283c);
  --onaccent: #fff;
  --needle: light-dark(#d2001c, #f0283c);
  --hl: light-dark(rgb(210 0 28 / .1), rgb(240 40 60 / .28));
  --focus: light-dark(#a80016, #e6d5c8);
  --live: light-dark(#d2001c, #e6d5c8);
  --pillbg: light-dark(#4a2c17, #5c3a21);
  --panel: light-dark(#4a2c17, #3a2415);
  --panelfg: #fff;
  --panelmuted: #e6d5c8;
  --tilebg: light-dark(#f1e9e3, #3a2415);
  --tipbg: light-dark(rgb(43 26 16 / .92), rgb(92 58 33 / .97));
  --mint: #e6d5c8;
}
/* on the brown panel red would drown: the play button there is white with red */
:root[data-skin="fcsp"] .mini .ic-play { background: #fff; color: #d2001c; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 "R1 Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
button svg, a svg, label svg { fill: currentColor; flex: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.disp { font-weight: 820; font-stretch: var(--stretch); letter-spacing: -.015em; }

/* ---------- Frame ---------- */

.page { min-height: 100vh; max-width: 1200px; margin: 0 auto; padding: 28px 48px 20px; display: flex; flex-direction: column; gap: 24px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
/* the wordmark (app/brand.php): as high as the letters were in text at 34 px */
.wm { display: block; line-height: 0; text-decoration: none; }
.wm .wordmark { display: block; height: 27px; width: auto; fill: currentColor; }
.wm .wordmark .oe { fill: var(--accent); }
/* St. Pauli Pop fork: the name as text, or a configured logo picture (app/brand.php) */
.wm .wordmark-text { line-height: 27px; font-size: 27px; font-weight: 900; letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
.wm .wordmark-img { object-fit: contain; }
.wm .wordmark-pic { display: block; }
/* St. Pauli Pop fork: the site's title next to the logo, its description above the stations */
.wm:has(.wm-title) { display: flex; align-items: center; gap: 12px; line-height: 1.2; color: var(--fg); min-width: 0; }
.wm-title { font-size: 20px; font-weight: 760; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-desc { margin: 0; max-width: 760px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }

/* only in Ollie's own browser: listening is recorded here, can be paused for the session */
.listen-switch {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px;
  border: 1.5px dashed var(--line); background: transparent; cursor: pointer; font-size: 13px; color: var(--muted);
}
.listen-switch:hover { background: var(--hl); }
.listen-switch[aria-pressed="false"] .pill i { animation: none; transform: scaleY(.3); opacity: .5; }
main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 48px; }
/* with JavaScript only the keys at the right edge, the links are in the menu (nojs.css shows them);
   a page without stations shows them too (index.php, foot-links) */
.foot { display: flex; justify-content: flex-end; align-items: center; gap: 20px; font-size: 13px; }
.foot a { display: none; }
.foot.foot-links a { display: inline; }
.foot a { color: var(--muted); text-underline-offset: 3px; padding: 12px 0; }
.notice { text-align: center; color: var(--muted); }
.menu-btn, .theme-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; padding: 0;
}
.menu-btn:hover, .theme-btn:hover { background: var(--hl); }
.theme-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .sun { display: var(--sun); }
.theme-btn .moon { display: var(--moon); }
.menu-btn line { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------- Shared pieces ---------- */

.tile {
  display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
  border-radius: 14px; background: var(--tilebg); color: var(--accent); font-weight: 820; font-stretch: var(--stretch);
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-xl { width: 248px; height: 248px; border-radius: 32px; font-size: 68px; }
.tile-m { width: 72px; height: 72px; border-radius: 16px; font-size: 22px; }
.tile-s { width: 44px; height: 44px; border-radius: 11px; font-size: 14px; }
/* a category: its picture with a stack over the top right corner, in the logo blue */
.tile.cat { position: relative; overflow: visible; }
.tile.cat img { border-radius: inherit; }
.tile .stack {
  position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; color: var(--onaccent); background: var(--accent);
  box-shadow: 0 0 0 2.5px var(--bg);
}
.tile .stack svg { width: 14px; height: 14px; }
.tile-s .stack { top: -5px; right: -5px; width: 19px; height: 19px; border-radius: 6px; box-shadow: 0 0 0 2px var(--bg); }
.tile-s .stack svg { width: 11px; height: 11px; }

.ic {
  width: 52px; height: 52px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none;
}
.ic:hover { background: var(--hl); }
.play {
  width: 84px; height: 84px; border-radius: 999px; border: 0; background: var(--accent); color: var(--onaccent);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none;
  transition: transform .15s ease;
}
.play:hover { transform: scale(1.04); }
.i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }
.pillbtn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; cursor: pointer; font-size: 15px; text-decoration: none;
}
.pillbtn:hover { background: var(--hl); }

.numchip {
  position: absolute; top: 12px; left: 12px; padding: 4px 9px; border-radius: 10px; background: rgb(11 19 40 / .84);
  color: #fcfcfd; font-size: 15px; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums;
}
.numchip:empty { display: none; }

/* "Olli hört gerade": mint bars on a navy pill, in every color mode */
.pill {
  display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; padding: 3px 5px; border-radius: 999px;
  background: var(--pillbg); vertical-align: middle; flex: none;
}
.pill i { display: block; width: 3px; height: 10px; border-radius: 1px; background: var(--mint); transform-origin: bottom; animation: r1eq 1s ease-in-out infinite; }
.pill i:nth-child(2) { animation-delay: -.4s; }
.pill i:nth-child(3) { animation-delay: -.7s; }
@keyframes r1eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.pill { position: relative; }
.pill::before { content: ""; position: absolute; inset: -10px; }   /* easier to hit with a finger */

/* info at "Olli hört gerade": hover with the mouse, tap on touch screens */
.ptip {
  position: fixed; left: 0; top: 0; z-index: 60; max-width: min(260px, calc(100vw - 16px));
  background: var(--tipbg); color: #fcfcfd; padding: 8px 12px; border-radius: 6px; font-size: 12px; line-height: 1.4;
  pointer-events: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ptip::after { content: ""; position: absolute; top: 100%; left: var(--ax, 50%); transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--tipbg); }
.ptip.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--tipbg); }
.ptip.right::after { top: 50%; left: auto; right: 100%; transform: translateY(-50%); border-top-color: transparent; border-right-color: var(--tipbg); }

/* the song from the stream, while it plays */
.track { margin: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.track-title, .track-artist { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a song stays on one line each and ends in "…"; the description wraps, at most two lines */
.track.is-desc .track-artist {
  white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow-wrap: break-word;
}
.track-title { font-size: 18px; font-weight: 640; }
.track-artist { font-size: 16px; color: var(--muted); }
.sheet-body .track { text-align: center; align-items: center; max-width: 100%; }

.state { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 12px; }
.state-main { display: inline-flex; align-items: center; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 9px; background: var(--line); flex: none; }
.dot.live { background: var(--live); animation: r1pulse 2s ease-in-out infinite; }
.dot.connecting { background: var(--live); animation: r1blink .8s steps(2) infinite; }
.dot.error { background: #e5484d; }
@keyframes r1pulse { 50% { opacity: .4; } }
@keyframes r1blink { 50% { opacity: .15; } }

/* ---------- Player in the middle (wide screens) ---------- */

.stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px 56px; }
.stage-art { position: relative; flex: none; }
.stage-info { display: flex; flex-direction: column; gap: 18px; width: 440px; min-width: 0; }
.kicker { margin: 0; font-size: 14px; color: var(--muted); }
.stage-name { margin: 0; font-size: 54px; line-height: 1.02; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.stage-name.is-long { font-size: 42px; }
/* "About the station" as a small round button right after the name, in the middle of the
   name's height, also when it takes two lines */
.name-row { display: flex; align-items: center; gap: 16px; }
.name-row .stage-name { min-width: 0; }
.ic-info { width: 40px; height: 40px; }
.controls { display: flex; align-items: center; gap: 18px; }
.secondary { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.volume { display: flex; align-items: center; gap: 10px; }
.volume input { width: 150px; accent-color: var(--fg); }
.sp-cur [data-volume] { visibility: hidden; }   /* St. Pauli Pop fork: Spotify's player cannot be turned down from outside */
/* four waves at the speaker, one per quarter of the volume: each fades in and grows
   from the speaker while its quarter fills, the others stay as a faint outline */
.vol-ic .waves path {
  --o: clamp(0, calc(var(--v, .8) * 4 - var(--i)), 1);
  opacity: calc(.18 + .82 * var(--o));
  transform: scale(calc(.82 + .18 * var(--o)));
  transform-origin: 10.5px 12px;
  transition: opacity .12s ease-out, transform .12s ease-out;
}
.vol-ic .waves path:nth-child(1) { --i: 0; }   /* in CSS, the page allows no inline styles */
.vol-ic .waves path:nth-child(2) { --i: 1; }
.vol-ic .waves path:nth-child(3) { --i: 2; }
.vol-ic .waves path:nth-child(4) { --i: 3; }
@media (prefers-reduced-motion: reduce) { .vol-ic .waves path { transition: none; } }

/* SoundCloud: a note with a button, after the click SoundCloud's own player */
.sc-slot { width: 100%; }
.sc-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 16px; text-align: left;
}
.sc-title { margin: 0; font-weight: 640; font-size: 15px; }
.sc-text { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.sc-text a { color: inherit; }
.sc-load {
  min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--accent); color: var(--onaccent);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.sc-load:hover { filter: brightness(1.08); }
.sc-load.nudge { animation: sc-nudge .5s ease 2; }
@keyframes sc-nudge { 50% { transform: scale(1.06); } }
.sc-frame { display: block; width: 100%; height: 166px; border: 0; border-radius: 12px; background: var(--tilebg); }
.sheet .sc-slot { max-width: 440px; }
.sc-slot:focus { outline: none; }
.sc-slot:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 16px; }
/* SoundCloud's player brings its own buttons; the docked player on phones keeps ours */
.sc-cur .stage .controls, .sc-cur .sheet .controls { display: none; }

/* YouTube: the video stands where a station shows its logo, 16:9 and never below
   200 px high (YouTube's minimum for its player); nothing lies on top of it */
.yt-box { display: none; position: relative; overflow: hidden; width: 441px; aspect-ratio: 16 / 9; min-height: 200px; border-radius: 22px; background: #000; }
.yt-cur .yt-box:not([hidden]) { display: block; }
.yt-cur .stage-art .tile-xl, .yt-cur .stage-art .numchip { display: none; }
/* the running time beside the channel: digits of one width, so the line does not wobble */
.yt-cur .track-artist, .yt-cur .mini [data-r1="state"], .yt-cur .row[aria-current="true"] .rsub { font-variant-numeric: tabular-nums; }
.yt-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* St. Pauli Pop fork: Mixcloud's small player (mini) below the name; our buttons stay */
/* St. Pauli Pop fork: Spotify's compact player, 152 px as Spotify makes it */
.sp-frame { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; }
/* St. Pauli Pop fork: Tidal's player with its list of songs */
.td-frame { display: block; width: 100%; height: 275px; border: 0; border-radius: 12px; color-scheme: light dark; }
.sheet.docked .td-frame { height: 120px; }
.mc-frame { display: block; width: 100%; height: 60px; border: 0; border-radius: 12px; background: var(--tilebg); }
.sheet .yt-box { width: min(calc(100vw - 32px), 440px); border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { .sc-load.nudge { animation: none; } }

/* ---------- Scale ---------- */

.picker-head { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 6px; }
/* "Zuletzt von Olli gehört": small and quiet, the name starts the station */
.lastheard { margin: 0; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-head .lastheard { margin-left: auto; }
.lastheard-st { padding: 0; border: 0; background: none; font: inherit; color: var(--fg); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.lastheard-st:hover { text-decoration-color: currentColor; }
.lastheard-st:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.lastheard-list { display: none; }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 640; }
.crumbs .sep { color: var(--muted); font-weight: 400; }
.crumbs .pillbtn { min-height: 36px; padding: 0 12px 0 8px; font-size: 14px; font-weight: 400; }
.crumbs .pillbtn.here { padding: 0 12px; cursor: default; }
.crumbs .pillbtn.here:hover { background: transparent; }
.scale-row { display: flex; align-items: center; gap: 8px; }
.scl { width: 44px; height: 44px; background: var(--bg); }
.scl.is-off { visibility: hidden; }
.scroller { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding: 4px 0 6px; scroll-behavior: smooth; }
.scroller::-webkit-scrollbar { display: none; }
.strip { position: relative; margin: 0 auto; padding: 0 8px; }
.strip::before { content: ""; position: absolute; left: 8px; right: 8px; top: 26px; height: 1px; background: var(--line); }
.slots { display: grid; grid-auto-flow: column; grid-auto-columns: var(--slot); list-style: none; margin: 0; padding: 4px 0 0; }
.slots li { display: flex; justify-content: center; min-width: 0; }
.st {
  background: transparent; border: 0; padding: 0 2px; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 6px; width: 100%; min-width: 0; position: relative; z-index: 1;
}
.st .num { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.st .tick { width: 1px; height: 10px; background: var(--line); }
.st .pill-slot { height: 16px; display: flex; align-items: center; }
.st .tile { width: 60px; height: 60px; font-size: 17px; transition: transform .25s ease; }
.st:hover .tile { transform: translateY(-3px); }
.st[aria-current="true"] .tile { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--needle); }
/* station name: up to two lines, cut with an ellipsis only after the second */
.st .snm {
  font-size: 12px; line-height: 1.25; color: var(--muted); max-width: 100%; text-align: center;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  overflow-wrap: break-word;
  /* hyphens only in long words like "Deutschlandfunk", not "Se-ven" */
  -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4;
  -webkit-hyphenate-limit-before: 4; -webkit-hyphenate-limit-after: 4;
}
/* St. Pauli Pop fork: overview (System, Start): the scale as a grid of tiles, all at a glance */
@media (min-width: 761px) {
  .overview .scl, .overview .needle, .overview .strip::before, .overview .st .tick, .overview .st .num { display: none; }
  .overview .scroller { overflow: visible; padding-top: 8px; }
  .overview .strip { width: auto !important; max-width: 1180px; margin: 0 auto; padding: 0; }
  .overview .slots { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 36px 20px; }
  .overview .st { gap: 10px; }
  .overview .st .tile { width: 148px; height: 148px; border-radius: 26px; font-size: 40px; box-shadow: 0 10px 28px rgb(5 9 20 / .14); }
  .overview .st:hover .tile { transform: translateY(-4px) scale(1.03); }
  .overview .st .snm { font-size: 15px; font-weight: 560; color: var(--fg); }
  .overview .st[aria-current="true"] .tile { box-shadow: none; }   /* an overview, no tile stands out */
}
.needle {
  /* ends right above the status bars, which sit between scale line and logo */
  position: absolute; top: 24px; height: 12px; width: 2px; margin-left: -1px; background: var(--needle);
  transition: left .45s cubic-bezier(.2, .8, .2, 1); pointer-events: none; z-index: 2;
}
.needle::after {
  content: ""; position: absolute; bottom: -8px; left: -6px;
  border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--needle);
}
.needle.dim { opacity: .45; }

/* keyboard help (as the theme tooltip of eichhof.me) */
.tipwrap { position: relative; display: inline-flex; margin-left: auto; }
.qbtn {
  width: 44px; height: 44px; padding: 0; border: 0; background: none; display: inline-flex; align-items: center;
  justify-content: center; cursor: help; color: var(--muted); transition: transform .2s ease;
}
.qmark {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 700; line-height: 1;
}
.qbtn:hover, .qbtn:focus-visible { transform: scale(1.1); }
.qbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 50%; }
.tip {
  position: absolute; top: 50%; right: calc(100% + 6px); transform: translateY(calc(-50% - 1px));
  background: var(--tipbg); color: #fcfcfd; padding: 10px 14px; border-radius: 6px; font-size: 12px; line-height: 1.5;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s ease;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; flex-direction: column; gap: 5px; z-index: 20;
}
.tip::after { content: ""; position: absolute; top: 50%; left: 100%; transform: translateY(-50%); border: 5px solid transparent; border-left-color: var(--tipbg); }
@media (hover: hover) { .tipwrap:hover .tip { opacity: 1; } }
.tipwrap:focus-within .tip { opacity: 1; }
/* "About the station": the same tooltip, right of the button (left of it is the name, which
   may take two lines). Without room there, in narrow windows, below the button (app.js sets
   .below; the hidden tooltip must not widen the page either). Focus shows it only from the
   keyboard, a click leaves the focus there when the dialog closes */
.infowrap { position: relative; display: inline-flex; flex: none; }
/* the keys in the footer: above the button, right edges in line, the arrow points down at it */
.tip-up { top: auto; bottom: calc(100% + 10px); right: 0; transform: none; }
.tip-up::after { top: 100%; left: auto; right: 17px; transform: none; border-left-color: transparent; border-top-color: var(--tipbg); }
.tip-side { right: auto; left: calc(100% + 8px); }
.tip-side::after { left: auto; right: 100%; border-left-color: transparent; border-right-color: var(--tipbg); }
.tip-side.below { top: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
.tip-side.below::after { top: auto; bottom: 100%; left: 50%; right: auto; transform: translateX(-50%); border-right-color: transparent; border-bottom-color: var(--tipbg); }
@media (hover: hover) { .infowrap:hover .tip { opacity: 1; } }
.ic-info:focus-visible + .tip { opacity: 1; }
.tip.show { opacity: 1; }
.sheet-acts { display: flex; align-items: center; gap: 8px; }
.sheet-acts .tip:empty { display: none; }
.tip kbd { font-family: inherit; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgb(255 255 255 / .18); margin-right: 6px; }

/* ---------- List (phones) ---------- */

.list-title { display: none; margin: 0 0 8px 10px; font-size: 14px; font-weight: 640; }
.list { display: none; list-style: none; margin: 0; padding: 0; flex-direction: column; gap: 2px; }
.list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 10px; border: 0;
  border-radius: 14px; background: transparent; text-align: left; cursor: pointer;
}
.row[aria-current="true"] { background: var(--hl); }
.row.is-sub { padding-left: 34px; }
.row.is-deep { padding-left: 68px; }   /* St. Pauli Pop fork: inside a stack inside a category */
.row .num { min-width: 22px; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.rn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rname { font-weight: 640; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* running text (app.js): the "…" gives way while a cut-off line runs */
.mq-on { text-overflow: clip !important; }
.mq { display: inline-block; white-space: nowrap; }
.chev { transition: transform .2s ease; }
.row[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* docked player and the full player on phones */
.mini {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 20px;
  background: var(--panel); color: var(--panelfg); box-shadow: 0 12px 32px rgb(5 9 20 / .35);
}
.mini-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: transparent; border: 0; padding: 2px; text-align: left; cursor: pointer; min-height: 48px; }
.mini .rsub { color: var(--panelmuted); display: flex; align-items: center; }
/* the state, song or description next to the dot ends in "…" (a flex line cannot) */
.mini .rsub [data-r1="state"] { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .ic { width: 48px; height: 48px; border-color: rgb(252 252 253 / .24); }
.mini .ic-play { background: var(--accent); color: var(--onaccent); border: 0; }

.sheet {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 16px 16px calc(32px + env(safe-area-inset-bottom));
  background: var(--bg); color: var(--fg); flex-direction: column;
}
.sheet[open] { display: flex; }
/* St. Pauli Pop fork: the preview of a tile (overview) replaces the player's own part */
.sheet:not(.pv) [data-pv-part], .sheet.pv [data-r1="level"] { display: none !important; }
/* the player's own part stays only for a running Mixcloud, Spotify or YouTube player:
   those must stay visible (dock.js) */
.sheet.pv .sheet-main { order: 2; flex: none; padding: 12px 0 0; }
.sheet.pv .sheet-main > * { display: none !important; }
.sheet.pv .sheet-main > [data-mc-slot]:not([hidden]):has(.mc-frame),
.sheet.pv .sheet-main > [data-sp-slot]:not([hidden]):has(.sp-frame),
.sheet.pv .sheet-main > [data-td-slot]:not([hidden]):has(.td-frame),
.sheet.pv .sheet-main > .stage-art:has(.yt-box:not([hidden]) iframe) { display: block !important; }
.sheet.pv .sheet-main > .stage-art > :not(.yt-box) { display: none !important; }
.sheet.pv .sheet-main .yt-box { width: 356px; margin: 0 auto; }
.sheet.pv > [data-pv-part] { order: 1; }
/* St. Pauli Pop fork: closed while Mixcloud, Spotify or YouTube plays: the player docks above the bar */
.sheet.docked, .overview .sheet.docked {
  position: fixed; inset: auto 12px calc(84px + env(safe-area-inset-bottom)) 12px; z-index: 29;
  width: auto; height: auto; max-height: none; margin: 0; padding: 0; border-radius: 12px;
  background: transparent; box-shadow: 0 12px 32px rgb(5 9 20 / .3); display: block;
}
.sheet.docked > :not(.sheet-main), .sheet.docked .sheet-main > * { display: none !important; }
.sheet.docked .sheet-main { display: block; padding: 0; }
.sheet.dock-mc .sheet-main > [data-mc-slot], .sheet.dock-sp .sheet-main > [data-sp-slot], .sheet.dock-td .sheet-main > [data-td-slot],
.sheet.dock-yt .sheet-main > .stage-art { display: block !important; max-width: none; width: 100%; background: transparent; }
.sheet.dock-yt .stage-art > :not(.yt-box) { display: none !important; }
.sheet.dock-yt .yt-box { display: block; width: 356px; height: 200px; min-height: 0; border-radius: 12px; }
.sheet.docked.dock-yt, .overview .sheet.docked.dock-yt { left: 50%; right: auto; width: 356px; transform: translateX(-50%); }
.sheet::backdrop { background: var(--bg); }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-level { margin: 0; font-size: 14px; color: var(--muted); }
.sheet-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 24px 0; }
.sheet-body .tile-xl { width: min(232px, 62vw); height: min(232px, 62vw); border-radius: 30px; font-size: 60px; }
.sheet-name { margin: 0; font-size: 30px; line-height: 1.1; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.sheet-name.is-long { font-size: 25px; }
.sheet .controls { gap: 24px; }

/* ---------- Dialogs ---------- */

.dialog {
  width: calc(100% - 32px); max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; border: 0;
  border-radius: 24px; padding: 28px 24px 24px; background: var(--panel); color: var(--panelfg);
}
.dialog::backdrop { background: rgb(5 9 20 / .62); }
.dialog a { color: var(--mint); }
.dh { margin: 0 0 16px; padding-right: 44px; font-size: 28px; line-height: 1.1; }
.dp { margin: 0 0 14px; font-size: 15px; line-height: 1.6; }
/* texts from the admin (Über, Impressum, Datenverarbeitung): paragraphs like .dp */
.rich p, .rich ul, .rich ol { margin: 0 0 14px; font-size: 15px; line-height: 1.6; }
.rich h3 { margin: 20px 0 4px; font-size: 15px; font-weight: 700; }
.rich h3:first-child { margin-top: 0; }
.rich ul, .rich ol { padding-left: 1.3em; }
.rich li + li { margin-top: 4px; }
.rich > :last-child { margin-bottom: 0; }
/* an e-mail address before the script set it in (without JavaScript: a hint) */
.rich .mail { font-style: italic; color: var(--panelmuted); }
.dnote { margin: 20px 0 0; font-size: 13px; color: var(--panelmuted); }
.dkicker { margin: 0; font-size: 13px; color: var(--panelmuted); }
.dlinks { display: flex; flex-direction: column; gap: 6px; font-weight: 640; }
/* the website of a station: a globe (Europe and Africa) instead of the word */
.site-link { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; }
.site-link .globe { flex: none; fill: currentColor; }
/* where the station comes from: a map pin, city and country, above the website */
.origin { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-weight: 500; }
.origin .pin { flex: none; fill: currentColor; }
.info-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding-right: 36px; }
.info-head .dh { margin: 4px 0 0; padding: 0; }
.with-pill { display: flex; align-items: flex-start; gap: 10px; }
.with-pill .pill { margin-top: 4px; }

/* menu on phones: slides in from the right, closed with the same turning X as the dialogs.
   A link in it shows the text of that page in the menu itself, the arrow leads back. */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(420px, 92vw); height: 100%; max-width: none; max-height: none; margin: 0;
  border: 0; border-radius: 24px 0 0 24px; padding: 0 24px calc(24px + env(safe-area-inset-bottom));
  background: var(--panel); color: var(--panelfg); overflow-y: auto;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.drawer.is-open { transform: none; }
.drawer::backdrop { background: rgb(5 9 20 / 0); transition: background .3s ease; }
.drawer.is-open::backdrop { background: rgb(5 9 20 / .62); }
.drawer-bar {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: flex-end;
  margin: 0 -24px; padding: calc(16px + env(safe-area-inset-top)) 16px 12px; background: var(--panel);
}
.drawer-bar .close { position: relative; top: auto; right: auto; }
.back {
  position: relative; margin-right: auto; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / .1); color: #fcfcfd; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; transition: background .3s ease, transform .3s ease;
}
.back::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.back:hover, .back:focus-visible { background: rgb(255 255 255 / .2); transform: translateX(-3px); }
.back:focus-visible { outline: 2px solid rgb(255 255 255 / .5); outline-offset: 2px; }
.back polyline, .back line { stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; }
.drawer-nav.from-page { animation: r1from-left .28s cubic-bezier(.2, .8, .2, 1); }
.drawer-page { padding-top: 8px; animation: r1from-right .28s cubic-bezier(.2, .8, .2, 1); }
.drawer-page .dh { padding-right: 0; }
.drawer-page .dh:focus { outline: none; }
.drawer-page a { color: var(--mint); }
@keyframes r1from-right { from { opacity: 0; transform: translateX(32px); } }
@keyframes r1from-left { from { opacity: 0; transform: translateX(-32px); } }
.drawer-nav a {
  color: var(--panelfg); text-decoration: none; padding: 10px 0;
  font-size: clamp(24px, 7vw, 30px); line-height: 1.15; font-weight: 820; overflow-wrap: anywhere; font-stretch: var(--stretch); letter-spacing: -.015em;
}
.drawer-nav a:hover, .drawer-nav a:focus-visible { color: var(--mint); }
.drawer-nav a:focus-visible { outline: 2px solid rgb(255 255 255 / .5); outline-offset: 4px; border-radius: 6px; }
.drawer-lang { display: flex; gap: 8px; margin-top: 28px; }
.drawer-nav .drawer-lang a {
  font-size: 14px; font-weight: 640; font-stretch: normal; letter-spacing: 0; line-height: 1; padding: 9px 14px;
  border-radius: 999px; border: 1.5px solid rgb(255 255 255 / .2);
}
.drawer-nav .drawer-lang a[aria-current="true"] { background: rgb(255 255 255 / .14); border-color: transparent; color: var(--panelfg); }
/* the desktop has room: a wider menu, but not the whole screen */
@media (min-width: 761px) {
  .drawer { width: min(520px, 92vw); padding-left: 32px; padding-right: 32px; }
  .drawer-bar { margin: 0 -32px; padding-left: 24px; padding-right: 24px; }
}

/* close button as on eichhof.me: turns a quarter on hover and focus */
.close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / .1); color: #fcfcfd; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; transition: background .3s ease, transform .3s ease;
}
.close::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.close:hover, .close:focus-visible { background: rgb(255 255 255 / .2); transform: rotate(90deg); }
.close:focus-visible { outline: 2px solid rgb(255 255 255 / .5); outline-offset: 2px; }
.close line { stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.nojs-list { display: none; }

/* ---------- Medium screens ---------- */

@media (max-width: 1000px) {
  .page { padding: 24px 28px 16px; }
  .stage { gap: 36px; }
  .tile-xl { width: 200px; height: 200px; border-radius: 26px; font-size: 54px; }
  .yt-box { width: 356px; }
  .stage-info { width: 380px; }
  .stage-name { font-size: 44px; }
  .stage-name.is-long { font-size: 36px; }
}

/* ---------- Phones ---------- */

@media (max-width: 760px) {
  .page { padding: 20px 16px 128px; gap: 16px; }
  .wm .wordmark { height: 24px; }
  .wm-title { font-size: 17px; }
  .site-desc { font-size: 15px; margin: 4px 10px 16px; }
  .listen-switch { padding: 0 10px; }
  .listen-switch [data-listen-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  main { justify-content: flex-start; gap: 0; }
  .stage, .picker-head, .scale-row, .foot .tipwrap { display: none; }
  .lastheard-list:not([hidden]) { display: block; margin: 0 10px 10px; }
  /* "Alle Sender" has no counterpart on phones (categories open in place):
     only screen readers keep it, as the heading of the list */
  .list-title { display: block; position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .list { display: flex; }
}
@media (min-width: 761px) {
  .mini { display: none !important; }
  /* St. Pauli Pop fork: overview (System, Start): only the tiles, the bar docks below them
     and opens the player as a window in the middle */
  .overview .stage { display: none; }
  .overview main { justify-content: flex-start; padding-top: 24px; }
  .overview .page { padding-bottom: 120px; }
  .overview .mini:not([hidden]) { display: flex !important; left: 50%; right: auto; width: min(560px, calc(100vw - 48px)); transform: translateX(-50%); bottom: 24px; }
  .overview .sheet { width: min(520px, calc(100vw - 48px)); height: auto; max-height: calc(100vh - 48px); margin: auto; border-radius: 28px; padding: 20px 24px 28px; box-shadow: 0 24px 64px rgb(5 9 20 / .35); }
  .overview .sheet::backdrop { background: rgb(5 9 20 / .45); }
  .overview .sheet.docked { left: 50%; right: auto; width: min(560px, calc(100vw - 48px)); transform: translateX(-50%); bottom: 104px; }
  .overview .sheet-body { padding: 16px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pill i { animation: none; transform: scaleY(.7); }
  .dot.live, .dot.connecting { animation: none; }
  .needle, .st .tile, .chev, .play, .qbtn, .tip, .close, .back, .drawer, .drawer::backdrop { transition: none; }
  .drawer-nav.from-page, .drawer-page { animation: none; }
  .scroller { scroll-behavior: auto; }
  .close:hover, .close:focus-visible, .back:hover, .back:focus-visible, .qbtn:hover, .qbtn:focus-visible { transform: none; }
}
