:root {
  --bg: #f6f2ea;
  --surface: #fffdf8;
  --surface-2: #efe9dd;
  --text: #1d1a24;
  --muted: #6c6676;
  --line: #e2dacb;
  --accent: #e8552a;
  --accent-2: #f2b134;
  --on-accent: #fff;
  --ok: #2f8a4f;
  --who-l: 40%;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(40 20 0 / .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110e19; --surface: #1a1625; --surface-2: #241f31; --text: #f3eee6; --muted: #a39cb2;
    --line: #2e283d; --accent: #ff6b3d; --accent-2: #ffc94a; --on-accent: #1a0d06; --ok: #5fc985; --who-l: 70%;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #110e19; --surface: #1a1625; --surface-2: #241f31; --text: #f3eee6; --muted: #a39cb2;
  --line: #2e283d; --accent: #ff6b3d; --accent-2: #ffc94a; --on-accent: #1a0d06; --ok: #5fc985; --who-l: 70%;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* gilt sonst nicht für SVG */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* ---------- Kopf & Navigation ---------- */
.top, main, .foot { max-width: 1160px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand strong { display: block; font-size: 1.15rem; letter-spacing: -.01em; }
.brand small { display: block; font-size: .8rem; }
.logo { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; flex: none; }
.logo span { width: 13px; height: 13px; border-radius: 50%; background: var(--bg); }
.tabs { display: flex; gap: 4px; justify-self: center; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.tabs a { text-decoration: none; padding: 6px 14px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.meta { display: flex; align-items: center; gap: 14px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.live { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: .08em; font-size: .72rem; color: var(--accent); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.live.off { color: var(--muted); }
.live.off i { animation: none; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card h2 { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.card h2.spaced { margin-top: 22px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2 { margin: 0; }

/* ---------- Player ---------- */
.player { display: grid; grid-template-columns: 196px 1fr; gap: 24px; align-items: center; }
.cover { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; transition: background .8s; }
.cover-initials { font-size: 3rem; font-weight: 800; color: rgb(255 255 255 / .92); letter-spacing: -.04em; text-shadow: 0 2px 12px rgb(0 0 0 / .25); }
.eq { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 3px; align-items: flex-end; height: 22px; opacity: 0; transition: opacity .3s; filter: drop-shadow(0 1px 3px rgb(0 0 0 / .5)); }
.eq i { width: 4px; height: 100%; background: #fff; border-radius: 2px; transform-origin: bottom; animation: eq 1s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; }
.eq i:nth-child(4) { animation-delay: -.15s; } .eq i:nth-child(5) { animation-delay: -.45s; }
body.playing .eq { opacity: 1; }
.np { min-width: 0; }
.badges { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.badge { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.song { background: var(--accent); color: var(--on-accent); }
.badge.moderation { background: var(--accent-2); color: #241a00; }
.badge.news { background: var(--text); color: var(--bg); }
.badge.jingle, .badge.repeat { background: var(--surface-2); color: var(--accent); }
.np h1 { font-size: clamp(1.4rem, 3.4vw, 2.1rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.np p { margin: 4px 0 0; }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 16px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .5s linear; }
.times { display: flex; justify-content: space-between; font-size: .8rem; margin-top: 6px; font-variant-numeric: tabular-nums; min-height: 1.2em; }
.controls { display: flex; align-items: center; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .15s; }
.play:hover { transform: scale(1.05); }
.play svg { width: 26px; height: 26px; fill: currentColor; }
.spinner { width: 24px; height: 24px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.vol { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.vol svg { width: 20px; height: 20px; fill: currentColor; }
.vol input { width: 120px; accent-color: var(--accent); }
.votes { display: flex; gap: 6px; align-items: center; }
.votes + .votes { margin-left: 4px; }
#votes { margin-left: auto; }
.vote-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.vote { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: .9rem; cursor: pointer; font-variant-numeric: tabular-nums; }
.vote.active { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.studio { display: flex; align-items: center; gap: 10px; margin: 14px 4px; font-size: .9rem; color: var(--muted); }
.studio i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex: none; animation: pulse 2s infinite; }

/* ---------- Radio-Layout ---------- */
.layout { display: grid; gap: 16px; padding-bottom: 32px;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "text program" "text wish"; align-items: start; }
.area-text { grid-area: text; } .area-program { grid-area: program; } .area-wish { grid-area: wish; }
.text { display: flex; flex-direction: column; max-height: 78vh; min-height: 420px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.scroll { overflow-y: auto; flex: 1; padding-right: 6px; scroll-behavior: smooth; }
.line { margin-bottom: 14px; }
.who { font-size: .78rem; font-weight: 700; color: hsl(var(--h, 20) 70% var(--who-l)); }
.line p { margin: 2px 0 0; }
.lyrics { white-space: pre-wrap; }
.lyrics .section { display: block; margin-top: 16px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.lyrics .section:first-child { margin-top: 0; }
.empty { color: var(--muted); font-style: italic; }
.notice { font-size: .85rem; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); border-left: 3px solid var(--accent-2); margin: 0 0 16px; }
.sources { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .85rem; }
.sources ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.jingle-text { font-size: 1.2rem; font-style: italic; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list li { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; font-size: .9rem; min-width: 0; }
.list .k { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }
.list .t { overflow-wrap: anywhere; }
.list .s { grid-column: 2; font-size: .8rem; color: var(--muted); }
.recent li { grid-template-columns: 40px 1fr auto; }
.recent .thumb { grid-row: span 2; width: 40px; height: 40px; border-radius: 6px; background: var(--surface-2) center / cover no-repeat; }
.recent .k { grid-column: 3; grid-row: 1; }
.recent .s { grid-column: 2; }

.wish { display: grid; gap: 8px; }
.wish input:not([type]), .wish textarea, .field { width: 100%; font-size: .9rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; }
.kinds { display: flex; gap: 14px; font-size: .9rem; }
.kinds input { accent-color: var(--accent); }
.wish-foot { display: flex; justify-content: space-between; align-items: center; }
.button { border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 600; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.button.danger { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.button:disabled { opacity: .5; cursor: default; }
.error { margin: 0; color: var(--accent); font-size: .85rem; }
.wishes { margin-top: 14px; }
.status-abgelehnt { color: var(--accent) !important; }

/* ---------- Sendeplan ---------- */
.page-title { font-size: 1.6rem; margin: 8px 0 16px; letter-spacing: -.02em; }
.section-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 20px 0 10px; }
.shows { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.show-card { display: grid; gap: 6px; align-content: start; }
.show-card.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.show-card .when { font-size: .8rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.show-card h3 { font-size: 1.1rem; }
.show-card p { margin: 0; font-size: .9rem; }

/* ---------- Info ---------- */
.prose { max-width: 760px; line-height: 1.65; }
.prose h1, .prose h2, .prose h3 { margin: 1.2em 0 .5em; text-transform: none; letter-spacing: -.01em; color: var(--text); font-size: 1.3rem; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--accent); }
.prose code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- Fuß ---------- */
.foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 28px; flex-wrap: wrap; }

@keyframes pulse { 50% { opacity: .35; } }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 900px) {
  .top { grid-template-columns: 1fr auto; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: space-between; }
  .tabs a { flex: 1; text-align: center; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "program" "text" "wish"; }
  .text { max-height: none; min-height: 0; }
  .scroll { max-height: 60vh; }
}
@media (max-width: 560px) {
  .player { grid-template-columns: 1fr; }
  .cover { max-width: 220px; width: 100%; margin: 0 auto; }
  .votes { margin-left: 0; }
  .meta #listeners { display: none; }
}
.show-card .badge { justify-self: start; }
@media (max-width: 900px) { .recent li:nth-child(n+6) { display: none; } }

/* ---------- Avatare & Sendungsbilder ---------- */
.cover-hosts { position: absolute; right: 10px; bottom: 10px; display: flex; }
.cover-hosts img, .show-faces img { width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--surface); object-fit: cover; box-shadow: 0 2px 8px rgb(0 0 0 / .3); }
.cover-hosts img + img, .show-faces img + img { margin-left: -14px; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.line-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.show-card { overflow: hidden; }
.show-art { position: relative; margin: -20px -20px 6px; aspect-ratio: 16 / 9; background: var(--surface-2) center / cover no-repeat; }
.show-faces { position: absolute; left: 14px; bottom: -18px; display: flex; }
.show-faces img { width: 44px; height: 44px; }
.show-art + .when { margin-top: 18px; }

/* Team */
.team-note { margin: -8px 0 8px; font-size: .9rem; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.team-card { display: grid; gap: 12px; align-content: start; }
.team-head { display: flex; align-items: center; gap: 14px; }
.team-head h3 { font-size: 1.15rem; margin: 0 0 4px; }
.team-avatar { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.team-initials { display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 1.4rem; color: var(--muted); }
.team-about { font-size: .95rem; line-height: 1.6; }
.team-about p { margin: 0 0 .6em; }
.team-about > :last-child { margin-bottom: 0; }
.team-shows { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: .85rem; }
.team-shows li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 420px) { .team { grid-template-columns: 1fr; } }
