/* ============================================================================
   Nachklang — Konzept „Sphäre", Layout der Startseite (public/index.html)
   Die Radio-Kugel groß, mittig und fest (hero-viz-radio.js, wie auf
   eins/zwei/drei.nachklang.fm); alle Abschnitte aus sender.css scrollen
   darüber. Navigation ohne Balken und ohne Hintergrund.
   ========================================================================== */

/* Kugel + Saiten: fester Vollbild-Layer über der Aurora, hinter allen Inhalten. */
body.sd > #nk-hero-viz { position: fixed; inset: 0; z-index: -2; pointer-events: none; transition: opacity .5s ease; }
body.sd > #nk-hero-viz canvas { mix-blend-mode: overlay; }
body.sd #nk-three { opacity: 1; }
body.view-player > #nk-hero-viz { display: none; }

/* Navigation: frei schwebend, auch beim Scrollen kein Balken, kein Hintergrund. */
body.sd .sd-nav, body.sd .sd-nav.is-solid { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

/* Oben das Logo auf der Kugel, direkt darunter die Sendetafel. */
.sp-first { padding: clamp(104px, 14vh, 160px) 0 0; }
.sp-logo { margin: 0 auto clamp(24px, 4.5vh, 48px); text-align: center; line-height: 0; }
.sp-logo img { width: min(1040px, 92vw); height: auto; }
/* Sendetafel so breit wie das Programm (volle .sd-wrap-Breite). */
#programm .sd-board { max-width: none; margin: 0 0 clamp(26px, 3vw, 42px); }
/* Hörspiele direkt unter dem Logo: die Genre-Leiste füllt die ganze Kastenbreite */
#hoerspiele .sd-tools { display: block; margin-bottom: 22px; }
#hoerspiele .sd-pills { width: 100%; }
#hoerspiele .sd-pill { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; }
/* Größeres Logo oben links, Kopfzeile entsprechend höher. */
body.sd .sd-nav { height: 92px; }
body.sd .sd-nav__brand .lg { height: 80px; margin-left: -10px; }

/* Glas etwas klarer, damit die Kugel durch die Flächen leuchtet. */
body.sd .sd-board { background: rgba(9, 14, 26, .4); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
body.sd .sd-prog__col, body.sd .sd-recv article, body.sd .sd-soon article { background: rgba(9, 14, 26, .44); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

/* Programm: Sender-Cover über jeder Titelliste, mit Abspielknopf wie auf einem Album. */
.sd-prog__col .sd-prog__cov { position: relative; margin: -6px -6px 14px; }
.sd-prog__col .sd-prog__cov h3 { margin: 0; line-height: 0; text-align: left; }
.sd-prog__col .sd-prog__cov img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 26px 50px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .08); }
/* Sender ohne Cover: sein Name an der Stelle des Bildes */
.sd-prog__col .sd-prog__cov h3.sd-prog__name { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; line-height: 1; background: rgba(238, 242, 248, .06); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: clamp(44px, 6vw, 88px); text-align: center; }
.sd-prog__play { position: absolute; right: 14px; bottom: 14px; }

/* Lesbarkeit über der Kugel: Nebentexte deutlich heller (vorher .58 / .34). */
body.sd { --dim: rgba(238, 242, 248, .78); --faint: rgba(238, 242, 248, .58); }
/* Hörspiele: Liste auf leichtem Glas wie die Programmspalten, Nebeninfos klar lesbar. */
#hoerspiele .sd-listpanel { padding: 4px 16px 10px; border-radius: 16px; background: rgba(9, 14, 26, .46); box-shadow: inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#hoerspiele .sd-list { border-top: 0; }
/* Werkzeugleiste der Liste: Sortierung als Textreiter, Suche als ruhiges Feld. */
#hoerspiele .sd-listbar { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
#hoerspiele .sd-listbar .sd-sort { flex: none; margin: 0; padding: 0; border: 0; border-radius: 0; gap: 22px; }
#hoerspiele .sd-listbar .sd-sort button { height: 36px; padding: 0 1px; border-radius: 0; background: none; font-size: 14px; font-weight: 600; color: rgba(238, 242, 248, .7); box-shadow: inset 0 -2px 0 transparent; transition: color .2s, box-shadow .2s; }
#hoerspiele .sd-listbar .sd-sort button:hover { color: #fff; }
#hoerspiele .sd-listbar .sd-sort button[aria-pressed="true"] { color: #fff; background: none; box-shadow: inset 0 -2px 0 var(--red-hi); }
#hoerspiele .sd-listbar .sd-search { flex: 0 1 280px; width: auto; min-width: 150px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: rgba(238, 242, 248, .06); transition: border-color .2s, background-color .2s; }
#hoerspiele .sd-listbar .sd-search:focus-within { border-color: rgba(63, 234, 255, .55); background: rgba(238, 242, 248, .08); }
#hoerspiele .sd-listbar .sd-search input:focus-visible { outline: none; }
#hoerspiele .sd-side { color: rgba(238, 242, 248, .86); font-size: 14px; }
#hoerspiele .sd-track__no { color: rgba(238, 242, 248, .62); font-size: 13px; }
#hoerspiele .sd-track__genre, #hoerspiele .sd-track__dur { color: rgba(238, 242, 248, .86); font-size: 14px; }
#hoerspiele .sd-track__sub { color: rgba(238, 242, 248, .68); font-size: 13.5px; }
#hoerspiele .sd-pill { color: rgba(238, 242, 248, .86); border-color: rgba(238, 242, 248, .26); }
#hoerspiele .sd-pill span { color: rgba(238, 242, 248, .6); }
#hoerspiele .sd-search input::placeholder { color: rgba(238, 242, 248, .62); }
#hoerspiele .sd-lead, #hoerspiele .sd-detail .sd-meta { color: rgba(238, 242, 248, .8); }

/* Unter vier Ohren: Cover 20 % kleiner (460 → 368 px). */
#sendungen .sd-show { grid-template-columns: minmax(0, 368px) minmax(0, 1fr); }
/* „Im Vollbild hören" führt zur Seite des laufenden Senders (eins/zwei/drei.nachklang.fm). */
.sd-board__foot a.sd-board__full { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.sd-board__foot a.sd-board__full:hover { color: var(--ink); }
.sd-board__foot a.sd-board__full[hidden] { display: none; }
/* Player-Leiste ohne Vollbild-Knopf. */
body.sd .sd-dock { grid-template-columns: auto minmax(0, 1fr) 130px auto auto; }

@media (max-width: 820px) {
  #sendungen .sd-show { grid-template-columns: 1fr; }
  #sendungen .sd-show img { width: 80%; }
  body.sd .sd-dock { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  #hoerspiele .sd-listpanel { padding: 2px 10px 8px; }
  #hoerspiele .sd-listbar .sd-sort { gap: 16px; }
  #hoerspiele .sd-listbar { flex-wrap: wrap; }
  #hoerspiele .sd-listbar .sd-search { flex: 1 1 auto; min-width: 0; }
  .sp-first { padding-top: 84px; }
  .sp-logo img { display: block; width: 96vw; margin-inline: calc(50% - 48vw); }
  body.sd .sd-nav { height: 72px; }
  body.sd .sd-nav__brand .lg { height: 44px; margin-left: -8px; }
}
/* Hochformat: Fläche fast quadratisch, sonst wird die Kugel breiter als der
   Bildschirm und zerfällt in Punkte (hero-viz misst seinen Host). */
@media (max-aspect-ratio: 4/5) {
  body.sd > #nk-hero-viz { inset: auto; left: 0; right: 0; top: 50%; height: min(122vw, 100svh); transform: translateY(-58%); }
}

/* 27.09.: Podcast-Zeile und Plattformen mittig (alle Größen) */
.sd-listen { justify-content: center; }
.sd-listen li:first-child { flex-basis: 100%; margin: 0 0 6px; text-align: center; }

@media (max-width: 820px) {
  /* Radio: Uhr klein rechts neben Titel und Einleitung */
  #programm .sd-prog__head { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
  #programm .sd-clock { width: 92px; height: 92px; }
  #programm .sd-clock figcaption span { font-size: 21px; }
  #programm .sd-clock figcaption small { margin-top: 1px; font-size: 10.5px; }
  /* Auf Sendung: „Live“ über dem Sendernamen, nicht davor */
  #programm .sd-row__station { flex-wrap: wrap; row-gap: 4px; }
  #programm .sd-row__live { flex-basis: 100%; }
  /* Unter vier Ohren: Cover, Titel, Text und Knopf mittig */
  #sendungen .sd-show { justify-items: center; text-align: center; }
  #sendungen .sd-show img { margin: 0 auto; }
  #sendungen .sd-show p { margin-left: auto; margin-right: auto; }
  #sendungen .sd-show .sd-btns { justify-content: center; }
  /* Fußzeile: Logo und Links mittig */
  .sd-foot .sd-wrap { flex-direction: column; justify-content: center; text-align: center; }
  .sd-foot nav { justify-content: center; }
  /* Über Nachklang: Titel und Text mittig, die Fragen bleiben linksbündig */
  #ueber .sd-about > div:first-child { text-align: center; }
  #ueber .sd-about > div:first-child p { margin-left: auto; margin-right: auto; }
  /* Überall hören: Titel und Text mittig */
  #empfang .sd-head { text-align: center; justify-items: center; }
  #empfang .sd-head .sd-lead { margin-left: auto; margin-right: auto; }
}

/* Hörspiel-Zeilen: Abspielknopf rot mit weißem Dreieck; beim Überfahren und während der Hörprobe wie bisher (Fortschrittsring) */
#hoerspiele .sd-pvbtn[aria-pressed="false"]:not(.is-pending):not(:hover):not(:focus-visible) .sd-ring,
#hoerspiele .sd-pvbtn[aria-pressed="false"]:not(.is-pending):not(:hover):not(:focus-visible) .sd-ring::before { background: var(--red); }
#hoerspiele .sd-pvbtn[aria-pressed="false"]:not(.is-pending):not(:hover):not(:focus-visible) .sd-ring svg { fill: #fff; }

/* Unter vier Ohren: Text über die ganze Spalte, „Im Programm auf …“ so groß wie die Beschreibung */
#sendungen .sd-show p { max-width: none; }
#sendungen .sd-show .sd-onair { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
/* Sendungen: eine Karte pro Zeile, großes Cover links, Titel und Text rechts */
#sendungen .sd-shows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.sd-showcard { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: center; padding: clamp(18px, 2vw, 24px); border-radius: 18px; background: rgba(9, 14, 26, .44); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px var(--line); }
.sd-showcard__bild { display: block; line-height: 0; }
.sd-showcard__bild img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 30px 60px -32px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .08); transition: transform .25s; }
.sd-showcard__bild:hover img { transform: translateY(-2px); }
.sd-showcard h3 { margin: 0; font-weight: 900; font-stretch: 62%; font-size: clamp(30px, 3vw, 44px); line-height: .92; text-wrap: balance; }
.sd-showcard p { margin: 16px 0 0; max-width: 62ch; font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.sd-showcard .sd-btns { margin-top: 26px; }
@media (max-width: 1023px) {
  .sd-showcard { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sd-showcard { grid-template-columns: 1fr; gap: 20px; padding: 16px; }
  .sd-showcard p { font-size: 16px; }
}
/* 01.10.: Podcast der Sendung als rechte Spalte der Karte, Knöpfe untereinander (lib/podcastLinks.js) */
.sd-showcard.has-pod { grid-template-columns: minmax(0, 270px) minmax(0, 1fr) minmax(180px, 220px); }
.sd-showcard__pod { align-self: start; }
.sd-showcard .sd-showcard__podt { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.sd-podlist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sd-podlist a, .sd-podlist .sd-feedcopy { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: none;
  font: 600 13.5px/1 var(--font); color: var(--dim); text-decoration: none; cursor: pointer; transition: color .2s, border-color .2s, background-color .2s; }
.sd-podlist a:hover, .sd-podlist .sd-feedcopy:hover { color: var(--ink); border-color: var(--faint); background: rgba(238, 242, 248, .05); }
.sd-podlist .sd-feedcopy.ok { color: #6ee7a8; border-color: #6ee7a8; }
.sd-podlist i { width: 18px; text-align: center; font-size: 15px; }
@media (max-width: 1100px) {
  .sd-showcard.has-pod { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); }
  .sd-showcard__pod { grid-column: 2; padding-left: 0; box-shadow: none; }
  .sd-podlist { display: flex; flex-wrap: wrap; }
  .sd-podlist a, .sd-podlist .sd-feedcopy { width: auto; }
}
@media (max-width: 640px) {
  .sd-showcard.has-pod { grid-template-columns: 1fr; }
  .sd-showcard__pod { grid-column: auto; }
}

/* 27.09.: Studiouhr im Radio-Kopf auf breiten Schirmen etwa 30 % kleiner (208 → 146 px) */
@media (min-width: 821px) {
  #programm .sd-clock { width: 146px; height: 146px; }
  #programm .sd-clock figcaption span { font-size: 35px; }
  #programm .sd-clock figcaption small { margin-top: 3px; font-size: 11.5px; }
}
