/* ── PODCAST-PLAYER — mehrere Podcasts, ein Player, Folgen von YouTube ──
   Ein gemeinsamer Bereich: oben große Auswahl-Karten je Podcast
   (.podcast-tabs, Cover + Name + Kurzbeschreibung), darunter pro Podcast
   ein Panel. Links Cover + Infos (bleibt beim Scrollen stehen),
   rechts Player, „Ausgewählt“-Zeile und Folgenliste.
   Es spielt immer nur eine Folge: Beim Umschalten stoppt der Player.
   Folge: <li class="podcast-ep" data-yt="YouTube-Link oder ID"> mit Nummer,
   Titel, Datum, Dauer. Neueste Folge zuerst. Leeres data-yt = Platzhalter.
   Vorausgewähltes Video außerhalb der Reihe: data-yt, data-title, data-meta
   am .podcast-player. Vorschau vor dem Abspielen = YouTube-Vorschaubild.
   Die Liste zeigt erst data-show Folgen (Standard 5), der Rest kommt über
   „Alle Folgen anzeigen“. YouTube lädt erst beim Klick (youtube-nocookie).
   Die Folgen-Infos stehen unter dem Video, nicht darauf, weil YouTube beim
   Abspielen eigene Titel und Bedienelemente einblendet.
   Hintergrund: schwarz, randlos (passt direkt nach dem Seitenkopf).
   Schrift: podcast-tab-kicker label t-micro · podcast-tab-name t-h3 ·
            podcast-tab-sub t-small · podcast-name t-h3 · podcast-host t-xs ·
            podcast-desc t-small · podcast-link t-small (je Plattform, mit svg.podcast-link-icon) · podcast-now-title t-lead ·
            podcast-ep-title t-body · podcast-ep-num/-meta t-xs ·
            Labels label t-micro
   UI: Play-Symbole, Equalizer, Haken der Auswahl-Karte, Platzhalter-Hinweis
   Plattformen: .podcast-links > a.podcast-link mit svg.podcast-link-icon (Markenfarben im SVG).
             Weitere Plattformen in .podcast-links-more: Button „…“ (.podcast-links-toggle) öffnet
             .podcast-links-menu mit a.podcast-links-item. Das Menü bleibt innerhalb der
             Link-Zeile und ist höchstens so breit wie sie (ragt mobil nicht heraus). JS setzt es direkt
             unter den Button (rechtsbündig), reicht der Platz nicht, darüber (.is-up).
             data-platzhalter = Link fehlt noch (eintragen oder Zeile löschen).
   Variante .podcast-guest (Folgen in anderen Podcasts): eigener Audio-Player auf dem Verlauf.
             Links Cover, Titel, Play und Fortschritt, rechts die Folgenliste (.podcast-ep mit
             data-audio = MP3, data-cover, data-link, data-show). Es spielt immer nur eine Folge
             auf der Seite, auch über die YouTube-Player hinweg.
             Schrift: podcast-guest-sub t-body · podcast-guest-title t-lead · podcast-guest-meta/
             -time/-source t-xs · Folgen wie oben */
.podcast {
  padding: var(--section-y) var(--gutter);
  background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax);
  border-bottom: 1px solid var(--line);
}
.podcast-head { margin-bottom: clamp(24px, 3vw, 40px); }
.podcast-head .section-title { margin: 0; }

/* Auswahl-Karten: ein Podcast pro Karte, die aktive ist hell umrandet */
.podcast-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px);
  margin-bottom: var(--head-gap);
}
.podcast-tab {
  position: relative; display: flex; align-items: center; gap: clamp(14px, 1.8vw, 28px);
  padding: clamp(12px, 1.2vw, 18px); padding-right: clamp(52px, 5vw, 80px);
  font-family: var(--f); text-align: left; color: var(--ink); cursor: pointer;
  background: transparent; border: 1px solid var(--line);
  transition: border-color .3s, background .3s, transform .4s var(--ease-out);
}
.podcast-tab:hover { border-color: var(--mute); }
.podcast-tab:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.podcast-tab-cover {
  width: clamp(72px, 8vw, 128px); aspect-ratio: 1; flex-shrink: 0; object-fit: cover; display: block;
  filter: grayscale(.85); opacity: .55; transition: filter .4s, opacity .4s;
}
.podcast-tab-body   { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.podcast-tab-kicker { font-weight: 700; color: var(--mute); }
.podcast-tab-name   { font-weight: 700; color: var(--mute); line-height: 1.1; transition: color .3s; }
.podcast-tab-sub    { color: var(--mute); }
.podcast-tab-check { /* UI: Haken */
  position: absolute; right: clamp(16px, 1.8vw, 28px); top: 50%; translate: 0 -50%;
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; transition: background .3s, border-color .3s;
}
.podcast-tab-check::after { content: ''; width: 10px; height: 6px; margin-top: -3px; border: solid var(--bg); border-width: 0 0 2px 2px; rotate: -45deg; opacity: 0; }
.podcast-tab[aria-selected="true"] { border-color: var(--orange); background: rgba(244,156,36,.08); }
.podcast-tab[aria-selected="true"] .podcast-tab-cover { filter: none; opacity: 1; }
.podcast-tab[aria-selected="true"] .podcast-tab-name  { color: var(--ink); }
.podcast-tab[aria-selected="true"] .podcast-tab-kicker { color: var(--orange); }
.podcast-tab[aria-selected="true"] .podcast-tab-check { background: var(--orange); border-color: var(--orange); }
.podcast-tab[aria-selected="true"] .podcast-tab-check::after { opacity: 1; }
.podcast-tab:not([aria-selected="true"]):hover .podcast-tab-cover { filter: none; opacity: .85; }
.podcast-tab:not([aria-selected="true"]):hover .podcast-tab-name  { color: var(--ink); }

/* Panel: links Cover + Infos, rechts Player + Liste */
.podcast-panel { display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 16fr); /* Cover so hoch wie das 16:9-Video */ gap: clamp(28px, 4vw, 72px); align-items: start; }
.podcast-panel[hidden] { display: none; }
.podcast-aside { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: clamp(18px, 2vw, 28px); }
.podcast-cover { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--card); box-shadow: var(--shadow-lg); }
.podcast-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.podcast-name { font-weight: 700; color: var(--ink); }
.podcast-host { color: var(--mute); margin-top: 6px; }
.podcast-desc { color: var(--mid); }
.podcast-links { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.podcast-links-more { display: contents; } /* Button reiht sich in die Links ein, das Menü richtet sich an .podcast-links aus */
.podcast-links-toggle { font-family: var(--f); background: transparent; cursor: pointer; min-width: 44px; min-height: 34px; justify-content: center; }
.podcast-links-toggle[aria-expanded="true"] { color: var(--ink); border-color: var(--ink); }
.podcast-links-dots { width: 16px; height: 4px; fill: currentColor; display: block; } /* UI: drei Punkte */
.podcast-links-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  width: 260px; max-width: 100%; padding: 6px;
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.podcast-links-menu[hidden] { display: none; }
/* Lage am Button setzt podcast-player.js (left/top), .is-up = über dem Button */
.podcast-links-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: var(--mid); text-decoration: none; transition: color .15s, background .15s;
}
.podcast-links-item:hover, .podcast-links-item:focus-visible { color: var(--ink); background: rgba(240,237,231,.06); }
.podcast-link  { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 100px; color: var(--mid); text-decoration: none; transition: color .2s, border-color .2s; }
.podcast-link:hover { color: var(--ink); border-color: var(--ink); }
.podcast-link-icon { width: 18px; height: 18px; flex-shrink: 0; display: block; } /* UI: Plattform-Icon in Markenfarbe */

/* Player */
.podcast-main { min-width: 0; }
.podcast-player { position: relative; aspect-ratio: 16/9; background: var(--card); overflow: hidden; }
.podcast-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.podcast-poster { /* UI: Vorschau vor dem Abspielen (Cover unscharf + Play) */
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--card); color: var(--ink);
}
.podcast-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; transition: opacity .4s, transform .8s var(--ease-out); }
.podcast-poster::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at center, rgba(20,6,0,.15), rgba(20,6,0,.6)); }
.podcast-poster[hidden] { display: none; }
.podcast-poster:hover img { opacity: .75; transform: scale(1.03); }
.podcast-poster-play { z-index: 2; }
.podcast-poster-play {
  position: relative; width: clamp(64px, 7vw, 96px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--bg);
  box-shadow: 0 0 0 10px rgba(240,237,231,.12); transition: transform .4s var(--ease-out), box-shadow .4s;
}
.podcast-poster-play svg { width: 34%; margin-left: 8%; fill: currentColor; }
.podcast-poster:hover .podcast-poster-play { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(240,237,231,.1); }
.podcast-poster:focus-visible .podcast-poster-play { outline: 2px solid var(--orange); outline-offset: 6px; }
.podcast-missing { /* UI: Hinweis, wenn der YouTube-Link noch fehlt */
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center;
  background: var(--card); color: var(--mute); font-size: var(--fs-small);
}

/* Ausgewählte Folge unter dem Player */
.podcast-now {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px;
  padding: clamp(16px, 1.6vw, 22px) 0; border-bottom: 1px solid var(--line);
}
.podcast-now-label { font-weight: 700; color: var(--orange); }
.podcast-now-title { font-weight: 600; color: var(--ink); flex: 1 1 280px; }
.podcast-now-meta  { color: var(--mute); }

/* Folgenliste */
.podcast-list { list-style: none; margin: 0; padding: 0; }
.podcast-ep { border-bottom: 1px solid var(--line); }
.podcast-ep.is-more { display: none; }
.podcast-list.is-open .podcast-ep.is-more { display: block; }
.podcast-ep-btn {
  width: 100%; display: grid; grid-template-columns: auto 56px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 14px 12px 14px 0; border: 0; background: transparent; color: var(--ink);
  font-family: var(--f); text-align: left; cursor: pointer; position: relative;
  transition: background .25s, padding .3s var(--ease-out);
}
.podcast-ep-btn:hover { background: rgba(240,237,231,.04); }
.podcast-ep-btn:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.podcast-ep-play { /* UI: Play-Kreis, bei aktiver Folge Equalizer */
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink); transition: background .25s, border-color .25s, color .25s;
}
.podcast-ep-play svg { width: 12px; margin-left: 2px; fill: currentColor; }
.podcast-ep-btn:hover .podcast-ep-play { border-color: var(--ink); }
.podcast-ep-num   { color: var(--mute); font-variant-numeric: tabular-nums; }
.podcast-ep-title { font-weight: 500; line-height: 1.4; }
.podcast-ep-meta  { color: var(--mute); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Aktive Folge: Balken links, Play-Kreis gefüllt, Titel in Markenfarbe */
.podcast-ep.is-active .podcast-ep-btn { padding-left: 16px; background: rgba(244,156,36,.07); }
.podcast-ep.is-active .podcast-ep-btn::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--orange); }
.podcast-ep.is-active .podcast-ep-play { background: var(--orange); border-color: var(--orange); color: var(--bg); }
.podcast-ep.is-active .podcast-ep-title { color: var(--orange); }
.podcast-eq { display: none; gap: 2px; align-items: flex-end; height: 14px; } /* UI: Equalizer */
.podcast-eq i { width: 3px; height: 100%; background: currentColor; transform-origin: bottom; animation: podcast-eq .9s ease-in-out infinite; }
.podcast-eq i:nth-child(2) { animation-delay: -.3s; }
.podcast-eq i:nth-child(3) { animation-delay: -.6s; }
.podcast-ep.is-playing .podcast-eq { display: flex; }
.podcast-ep.is-playing .podcast-ep-play svg { display: none; }
@keyframes podcast-eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.podcast-more { margin-top: clamp(20px, 2vw, 28px); cursor: pointer; }
.podcast-more .arrow { transform: rotate(135deg); transition: transform .3s; }
.podcast-list.is-open + .podcast-more .arrow { transform: rotate(-45deg); }

/* Variante: Nawid als Gast (eigener Audio-Player) */
.podcast-guest { padding: var(--section-y) var(--gutter); }
.podcast-guest-head { margin-bottom: var(--head-gap); }
.podcast-guest-head .section-title { margin: 0; }
.podcast-guest-sub { color: var(--mid); max-width: 62ch; margin-top: clamp(12px,1.4vw,20px); }
.podcast-guest-box {
  display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 16fr); gap: clamp(28px, 4vw, 72px); align-items: start;
  padding: clamp(20px, 3vw, 44px); background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.podcast-guest-now { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 20px); }
.podcast-guest-cover { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--card); }
.podcast-guest-info { display: flex; flex-direction: column; gap: 6px; }
.podcast-guest-title { font-weight: 600; color: var(--ink); line-height: 1.3; }
.podcast-guest-meta { color: var(--mute); }
.podcast-guest-controls { display: flex; align-items: center; gap: 16px; }
.podcast-guest-play { /* UI: großer Play-/Pause-Kreis */
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--orange); color: var(--bg);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.podcast-guest-play:hover { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(244,156,36,.15); }
.podcast-guest-play:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.podcast-guest-play svg { width: 16px; margin-left: 3px; fill: currentColor; }
.podcast-guest-pause { display: none; gap: 4px; }
.podcast-guest-pause i { width: 4px; height: 16px; background: currentColor; border-radius: 1px; }
.podcast-guest.is-playing .podcast-guest-play svg { display: none; }
.podcast-guest.is-playing .podcast-guest-pause { display: flex; }
.podcast-guest-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.podcast-guest-seek { /* UI: Fortschritt, --p setzt podcast-player.js */
  --p: 0%; width: 100%; height: 4px; margin: 0; appearance: none; -webkit-appearance: none; cursor: pointer; border-radius: 2px;
  background: linear-gradient(to right, var(--orange) var(--p), var(--line) var(--p));
}
.podcast-guest-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 0; }
.podcast-guest-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 0; }
.podcast-guest-seek:focus-visible { outline: 2px solid var(--orange); outline-offset: 6px; }
.podcast-guest-time { display: flex; justify-content: space-between; color: var(--mute); font-variant-numeric: tabular-nums; }
.podcast-guest-cur, .podcast-guest-dur { min-width: 4ch; }
.podcast-guest-dur { text-align: right; }
.podcast-guest-source { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); text-decoration: none; transition: color .2s; }
.podcast-guest-source:hover { color: var(--ink); }
.podcast-guest-list .podcast-ep-btn { grid-template-columns: auto 44px minmax(0, 1fr) auto; }
.podcast-ep-cover { width: 44px; height: 44px; object-fit: cover; display: block; }

@media (max-width: 1024px) {
  .podcast-panel { grid-template-columns: 1fr; }
  .podcast-guest-box { grid-template-columns: 1fr; }
  /* Cover klein neben Titel, Bedienung darunter */
  .podcast-guest-now { position: static; display: grid; grid-template-columns: clamp(80px, 18vw, 120px) minmax(0, 1fr); gap: 14px 20px; align-items: center; }
  .podcast-guest-controls, .podcast-guest-source { grid-column: 1 / -1; }
  /* Cover wird klein und steht als Kopfzeile über dem Player */
  .podcast-aside { position: static; display: grid; grid-template-columns: clamp(96px, 22vw, 160px) minmax(0, 1fr); gap: 4px 20px; align-items: center; }
  .podcast-cover { grid-row: span 2; box-shadow: none; }
  .podcast-desc, .podcast-links { grid-column: 1 / -1; }
  .podcast-desc { margin-top: 12px; }
}
@media (max-width: 640px) {
  .podcast-tabs { grid-template-columns: 1fr; gap: 10px; }
  .podcast-tab-sub { display: none; }
  .podcast-player { margin: 0 calc(-1 * var(--gutter)); border-left: 0; border-right: 0; }
  /* Folge: Play | Titel, darunter Nummer · Datum · Dauer */
  .podcast-ep-btn { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "play title" "play meta"; gap: 2px 14px; }
  .podcast-ep-play  { grid-area: play; }
  .podcast-ep-title { grid-area: title; }
  .podcast-ep-num   { display: none; }
  .podcast-ep-meta  { grid-area: meta; white-space: normal; }
  .podcast-ep-meta::before { content: attr(data-num); }
  .podcast-guest-box { margin: 0 calc(-1 * var(--gutter)); border-left: 0; border-right: 0; }
  .podcast-guest-list .podcast-ep-btn { grid-template-columns: auto minmax(0, 1fr); }
  .podcast-guest-list .podcast-ep-cover { display: none; }
  .podcast-guest-list .podcast-ep-meta::before { content: none; }
}
@media (prefers-reduced-motion: reduce) {
  .podcast-eq i { animation: none; transform: scaleY(.7); }
}
