/* Radio – ein altes Röhrenradio mit Fernseher: Holzgehäuse, beleuchtete Glas-Skala, Klaviertasten aus Elfenbein,
   magisches Auge, das grün leuchtet, wenn etwas läuft. Die Senderfarbe (--ch) steckt nur in den kleinen Lämpchen. */

@font-face { font-family: 'Limelight'; src: url(/fonts/limelight-latin-400-normal.woff2) format('woff2'); font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Limelight'; src: url(/fonts/limelight-latin-ext-400-normal.woff2) format('woff2'); font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Courier Prime'; src: url(/fonts/courier-prime-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Courier Prime'; src: url(/fonts/courier-prime-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Courier Prime'; src: url(/fonts/courier-prime-latin-ext-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Courier Prime'; src: url(/fonts/courier-prime-latin-ext-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --wall: #1E2A25;
  --walnut: #4E2E1B;
  --ivory: #F1E6CB;
  --ink: #2A1C11;
  --cream-text: #EFE3C6;
  --mute: #B9AC8E;
  --needle: #C3301C;
  --glow: #FFC861;
  --ch: #2E9C8C;
  --display: 'Limelight', Georgia, serif;
  --type: 'Courier Prime', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh; display: flex; flex-direction: column;
  font-family: var(--type); font-size: 1rem; line-height: 1.5; color: var(--cream-text);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 214, 140, .10), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 46px, rgba(0,0,0,.08) 46px 48px, transparent 48px 92px),
    var(--wall);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
html[lang=de] [data-only=en], html[lang=en] [data-only=de] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ─── Kopf ─── */
.top {
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: clamp(16px, 3vw, 28px) clamp(16px, 3vw, 32px) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; row-gap: 8px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-word { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 5.5vw, 3.2rem); line-height: 1; color: var(--ivory); text-shadow: 0 2px 0 rgba(0,0,0,.35); }
/* Magisches Auge: grüne Röhre, die aufleuchtet, wenn Musik läuft */
.eye {
  position: relative; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: radial-gradient(circle, #0E140F 0 22%, #173B1E 40%, #0B1A0E 70%);
  box-shadow: 0 0 0 3px #8C7448, 0 0 0 5px #3A2A16, inset 0 2px 6px rgba(0,0,0,.7);
}
.eye::before {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: conic-gradient(from 210deg, transparent 0 40deg, #3E7A46 40deg 320deg, transparent 320deg);
  -webkit-mask: radial-gradient(circle, transparent 0 30%, #000 31%); mask: radial-gradient(circle, transparent 0 30%, #000 31%);
  opacity: .45; transition: opacity .4s, filter .4s;
}
body.playing .eye::before {
  background: conic-gradient(from 200deg, transparent 0 18deg, #9BFFA4 18deg 342deg, transparent 342deg);
  opacity: 1; filter: drop-shadow(0 0 6px #7CFF8A);
  animation: eye 2.4s ease-in-out infinite;
}
@keyframes eye { 50% { transform: rotate(8deg) scale(1.03); } }
/* Kleine Noten steigen neben dem Namen auf, solange Musik läuft */
.brand { position: relative; }
.notes { position: relative; width: 40px; height: 40px; align-self: flex-start; }
.notes i { position: absolute; left: 0; bottom: 0; font-style: normal; font-size: 1.2rem; color: var(--glow); opacity: 0; text-shadow: 0 0 8px rgba(255, 200, 97, .6); }
@media (prefers-reduced-motion: no-preference) {
  body.playing .notes i { animation: note 3.6s ease-out infinite; }
  body.playing .notes i:nth-child(2) { animation-delay: 1.2s; left: 12px; font-size: 1rem; }
  body.playing .notes i:nth-child(3) { animation-delay: 2.4s; left: 22px; }
  @keyframes note { 0% { opacity: 0; transform: translate(0, 10px) rotate(-10deg); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -34px) rotate(14deg); } }
}
.top-actions { display: flex; align-items: center; gap: 14px; }
.lang { color: var(--mute); font-weight: 700; padding: 7px 14px; border: 1px solid rgba(185, 172, 142, .4); border-radius: 999px; transition: color .2s, border-color .2s, background-color .2s; }
.lang:hover { color: var(--cream-text); border-color: var(--mute); background: rgba(255, 214, 140, .06); }
.power { font-weight: 700; padding: 7px 14px; border-radius: 8px; color: var(--ink); background: linear-gradient(#FBF4E2, #E2D3B0); box-shadow: 0 3px 0 #8C7A58; }
.power:active { transform: translateY(2px); box-shadow: 0 1px 0 #8C7A58; }

/* ─── Gehäuse aus Nussholz ─── */
.deck {
  flex: 1 0 auto; width: min(100% - 2 * clamp(12px, 3vw, 32px), 1180px); margin: clamp(14px, 2.4vw, 24px) auto 24px;
  padding: clamp(16px, 2.6vw, 30px);
  border-radius: clamp(20px, 3vw, 34px);
  background:
    linear-gradient(180deg, rgba(255, 230, 190, .10), rgba(0, 0, 0, .28)),
    repeating-linear-gradient(93deg, rgba(0,0,0,.14) 0 2px, transparent 2px 9px, rgba(255,220,170,.05) 9px 11px, transparent 11px 25px),
    repeating-linear-gradient(87deg, rgba(0,0,0,.09) 0 1px, transparent 1px 41px),
    linear-gradient(90deg, #4A2B18, #60391F 28%, #4B2C19 52%, #66402A 78%, #4A2B18);
  box-shadow: inset 0 2px 0 rgba(255, 230, 190, .18), inset 0 -8px 16px rgba(0,0,0,.45), 0 34px 60px -24px rgba(0,0,0,.8);
  display: grid; gap: clamp(18px, 2.6vw, 28px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "screen" "tuner" "now";
}
@media (min-width: 980px) {
  .deck { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); grid-template-areas: "screen now" "tuner now"; align-items: start; }
}
.screen-wrap { grid-area: screen; }
.now { grid-area: now; }
.tuner { grid-area: tuner; }

/* Fernseher mit Bakelit-Rahmen */
.screen-wrap { padding: clamp(10px, 1.6vw, 16px); border-radius: 30px; background: linear-gradient(145deg, #F4EAD2, #D8C7A0); box-shadow: inset 0 2px 0 #fff8e6, inset 0 -3px 6px rgba(90, 70, 30, .35), 0 6px 14px rgba(0,0,0,.45); }
.screen {
  position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; overflow: hidden;
  border-radius: 24px / 30px; background: #0C0F0C;
  box-shadow: 0 0 0 3px #8F7A52, inset 0 0 0 2px #000;
}
.yt, .yt iframe, .yt > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.static {
  position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: .42; pointer-events: none;
  filter: sepia(.35); transition: opacity .25s, visibility .25s;
}
.static.hidden { opacity: 0; visibility: hidden; }
.gate {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 16px; text-align: center; background: radial-gradient(closest-side, rgba(12, 15, 12, .78), rgba(12, 15, 12, .45));
}
/* Messingknopf */
.power-on {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: clamp(118px, 21vw, 146px); aspect-ratio: 1; border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(0,0,0,.08) 0 4deg, transparent 4deg 8deg),
    radial-gradient(circle at 36% 30%, #FBE7B0, #D4AE63 42%, #8A6630 85%, #5E4220);
  color: #2A1C11; border: 3px solid #5E4220;
  box-shadow: 0 6px 0 #3E2B14, 0 10px 22px rgba(0,0,0,.55), inset 0 2px 3px rgba(255,255,255,.6);
  font-family: var(--type); font-weight: 700; font-size: clamp(.82rem, 2vw, 1.1rem); letter-spacing: 0;
  transition: transform .1s, box-shadow .1s;
}
.power-on svg { width: 34%; height: auto; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.power-on:active { transform: translateY(4px); box-shadow: 0 2px 0 #3E2B14, 0 5px 12px rgba(0,0,0,.5), inset 0 2px 3px rgba(255,255,255,.6); }
.power-on:disabled { opacity: .7; cursor: progress; }
.gate-note { max-width: 40ch; font-size: .9rem; color: var(--ivory); text-shadow: 0 1px 2px #000; }
.gate-link { font-size: .9rem; font-weight: 700; color: var(--glow); text-decoration: underline; text-underline-offset: 3px; }
.tap-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); pointer-events: none;
  padding: 6px 12px; border-radius: 8px; background: rgba(241, 230, 203, .94); color: var(--ink); font-size: .85rem; white-space: nowrap;
}
@media (max-width: 480px) {
  .gate { gap: 6px; padding: 10px; }
  .gate-note { font-size: .76rem; line-height: 1.35; }
  .gate-link { font-size: .8rem; }
  .power-on { width: 100px; font-size: .7rem; box-shadow: 0 4px 0 #3E2B14, 0 8px 16px rgba(0,0,0,.55), inset 0 2px 3px rgba(255,255,255,.6); }
}

/* Senderkarte: Papier mit Linien, Schreibmaschine */
.now {
  position: relative; padding: clamp(18px, 2.4vw, 26px); border-radius: 6px; color: var(--ink);
  background:
    repeating-linear-gradient(transparent 0 27px, rgba(70, 110, 160, .16) 27px 28px),
    linear-gradient(#F7EEDB, #EFE2C4);
  box-shadow: 0 10px 22px rgba(0,0,0,.45), inset 0 0 0 1px rgba(120, 90, 40, .25);
}
.now::before { content: ""; position: absolute; left: 38px; top: 0; bottom: 0; width: 1px; background: rgba(195, 48, 28, .35); }
.now > * { position: relative; }
.now-tag { display: flex; align-items: center; gap: 10px; font-weight: 700; padding-left: 26px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ch); box-shadow: inset 0 -2px 2px rgba(0,0,0,.3), 0 0 8px color-mix(in srgb, var(--ch) 70%, transparent); }
.freq { margin-left: auto; font-weight: 700; font-size: 1.15rem; }
.freq::after { content: " MHz"; font-size: .8rem; font-weight: 400; }
.now-title {
  margin-top: 16px; padding-left: 26px; font-family: var(--display); font-weight: 400;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.05; overflow-wrap: anywhere;
}
.now-artist { margin-top: 6px; padding-left: 26px; font-size: 1.05rem; }
.meter { margin: 16px 0 0 26px; height: 6px; border-radius: 3px; background: rgba(42, 28, 17, .15); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: linear-gradient(90deg, #A47B33, #D9B163); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 1s linear; }
.now-time { margin-top: 4px; padding-left: 26px; font-size: .85rem; color: #6A5638; font-variant-numeric: tabular-nums; min-height: 1.3em; }
.next-h { margin-top: 18px; padding-left: 26px; font-family: var(--display); font-weight: 400; font-size: 1.3rem; }
.next { list-style: none; counter-reset: nx; margin-top: 6px; display: grid; }
.next li { counter-increment: nx; display: grid; grid-template-columns: 26px minmax(0, 1fr); padding: 7px 0; }
.next li::before { content: counter(nx) "."; grid-row: span 2; font-weight: 700; color: var(--needle); }
.next-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-artist { font-size: .9rem; color: #5E4B31; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Beleuchtete Glas-Skala */
.dial {
  position: relative; height: 84px; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(120% 140% at 50% 120%, rgba(255, 200, 97, .55), transparent 60%),
    linear-gradient(#FFF6DE, #F4DFA8);
  box-shadow: 0 0 0 4px #2E1B0E, 0 0 0 6px #B8955A, inset 0 0 18px rgba(160, 110, 30, .45), 0 0 30px rgba(255, 200, 97, .25);
}
.dial::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.45), transparent 35%); pointer-events: none; }
.dial-band, .dial-unit { position: absolute; top: 8px; font-weight: 700; font-size: .75rem; letter-spacing: .1em; color: #6A5030; }
.dial-band { left: 12px; } .dial-unit { right: 12px; }
.dial-scale { position: absolute; inset: 0 26px; }
.mark { position: absolute; left: calc(var(--pos) * 100%); bottom: 8px; transform: translateX(-50%); font-weight: 700; font-size: .9rem; color: var(--ink); }
.mark::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 5px); width: 2px; height: 26px; background: var(--ink); transform: translateX(-50%); }
.station-mark { position: absolute; left: calc(var(--pos) * 100%); top: 26px; width: 9px; height: 9px; border-radius: 50%; transform: translateX(-50%); background: var(--c); box-shadow: inset 0 -1px 1px rgba(0,0,0,.35); }
.needle {
  position: absolute; top: 6px; bottom: 6px; width: 3px; margin-left: -1.5px;
  left: calc(26px + var(--pos, 0) * (100% - 52px));
  background: var(--needle); box-shadow: 0 0 4px rgba(195, 48, 28, .6); border-radius: 2px;
  transition: left .8s cubic-bezier(.55, -0.2, .3, 1.25);
}

/* Klaviertasten aus Elfenbein */
.presets { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 10px 16px; border-radius: 10px; background: #1F120A; box-shadow: inset 0 3px 8px rgba(0,0,0,.6); }
@media (max-width: 560px) { .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.preset {
  position: relative; text-align: left; padding: 12px; border-radius: 6px 6px 10px 10px; min-height: 70px; color: var(--ink);
  background: linear-gradient(#FDF7E8, #E7D9B8);
  box-shadow: 0 7px 0 #8C7A58, 0 9px 10px rgba(0,0,0,.5), inset 0 1px 0 #fff;
  transition: transform .08s, box-shadow .08s;
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline;
}
.preset::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%;
  background: #6B5A40; box-shadow: inset 0 1px 2px rgba(0,0,0,.5);
}
.preset-num { grid-row: span 2; font-family: var(--display); font-size: 1.9rem; line-height: .9; color: var(--ink); }
.preset-name { font-weight: 700; line-height: 1.2; hyphens: auto; overflow-wrap: break-word; padding-right: 14px; }
@media (max-width: 560px) { .preset-name { font-size: .9rem; padding-right: 10px; } }
.preset-freq { font-size: .85rem; color: #6A5638; font-variant-numeric: tabular-nums; }
.preset[aria-pressed="true"] { transform: translateY(6px); box-shadow: 0 1px 0 #8C7A58, 0 2px 4px rgba(0,0,0,.5), inset 0 2px 4px rgba(120, 90, 40, .3); }
.preset[aria-pressed="true"]::after { background: var(--c); box-shadow: 0 0 8px var(--c), 0 0 2px #fff; }

/* ─── Fuß ─── */
.foot { padding: 4px 16px calc(28px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.foot-note { font-size: .85rem; color: var(--mute); max-width: 60ch; margin: 0 auto 6px; }
.foot-links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.link { color: var(--mute); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; padding: 6px 2px; }
.link:hover { color: var(--cream-text); }
.noscript { text-align: center; padding: 16px; font-weight: 700; }

/* ─── Impressum und Datenschutz: Papier ─── */
dialog { border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(14, 10, 6, .75); }
html:has(dialog[open]) { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .doc { opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .2s ease, transform .32s cubic-bezier(.2, .8, .2, 1), overlay .32s allow-discrete, display .32s allow-discrete; }
  .doc[open] { opacity: 1; transform: none; }
  @starting-style { .doc[open] { opacity: 0; transform: translateY(16px) scale(.97); } }
}
.doc { margin: auto; width: min(100% - 24px, 680px); max-height: min(100dvh - 24px, 900px); background: #F7EEDB; border-radius: 6px; padding: 0; font-family: var(--type); }
.doc article { padding: 28px 24px 30px; }
.doc h2 { font-family: var(--display); font-weight: 400; font-size: 2.1rem; line-height: 1.05; margin-bottom: 14px; padding-right: 44px; }
.doc h3 { font-size: 1.05rem; font-weight: 700; margin: 18px 0 6px; }
.doc p { line-height: 1.65; max-width: 68ch; }
.doc a { color: #8A2A16; }
.doc-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; width: 44px; height: 44px; border-radius: 50%; background: var(--walnut); color: var(--ivory); font-size: 26px; line-height: 1; }

@media (max-width: 560px) { .mark.minor { color: transparent; } }
@media (max-width: 520px) {
  .deck { padding: 12px; }
  .screen-wrap { padding: 8px; border-radius: 22px; }
  .screen { border-radius: 16px / 20px; }
  .brand-word { font-size: 2.1rem; }
  .eye { width: 28px; height: 28px; }
  .power { padding: 6px 10px; font-size: .9rem; }
  .now::before { left: 30px; }
  .now-tag, .now-title, .now-artist, .now-time, .next-h { padding-left: 20px; }
  .meter { margin-left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}
