/* ============================================================
   zentonic — design system
   Terminal / TUI / Retro-BBS / Cyberpunk-retrofuture
   dark-mode native · Berkeley Mono + TX-02 · glow not shadow
   ============================================================ */

/* ---------- DESIGN TOKENS ------------------------------------------ */
:root {
  /* surfaces */
  --bg-void:   #06050f;
  --bg-page:   #0b0a1a;
  --bg-panel:  #12112a;
  --bg-raised: #1c1940;
  --bg-inset:  #080612;

  /* foreground */
  --fg-1: #e8eef6;
  --fg-2: #97a6ba;
  --fg-3: #5b6b7e;
  --fg-4: #36424f;

  /* borders */
  --line-1: #1c2533;
  --line-2: #2a3647;
  --line-3: #3c4d63;

  /* accents */
  --blue:        #3d8bff;
  --blue-bright: #62a4ff;
  --blue-dim:    #1e4a8a;
  --blue-glow:   rgba(61,139,255,.45);

  --green:       #36f1a6;
  --green-bright:#5cffc0;
  --green-glow:  rgba(54,241,166,.40);

  --amber:       #ffb340;
  --amber-glow:  rgba(255,179,64,.40);

  --magenta:     #ff4d9d;
  --magenta-glow:rgba(255,77,157,.40);

  --cyan:        #36d6ff;
  --cyan-glow:   rgba(54,214,255,.38);

  --violet:      #7c4dff;
  --violet-glow: rgba(124,77,255,.42);

  --red:         #ff5c63;

  /* semantic */
  --link:        var(--blue);
  --link-hover:  var(--blue-bright);
  --prompt:      var(--green);

  /* type */
  /* #83: Berkeley Mono/TX-02 nur, wenn der Tenant sie liefert (fonts.css);
     sonst greift der freie Fallback-Stack */
  --font-fallback: ui-monospace,"JetBrains Mono","IBM Plex Mono",SFMono-Regular,Menlo,Consolas,monospace;
  --font-display: "Berkeley Mono Cond","Berkeley Mono",var(--font-fallback);
  --font-ultra:   "Berkeley Mono Ultra","Berkeley Mono",var(--font-fallback);
  --font-ui:      "Berkeley Mono",var(--font-fallback);
  --font-body:    "TX-02","Berkeley Mono",var(--font-fallback);
  --font-mono:    "TX-02","Berkeley Mono",var(--font-fallback);

  /* type scale */
  --t-display: clamp(52px, 9vw, 88px);
  --t-h1:      clamp(28px, 5vw, 44px);
  --t-h2:      30px;
  --t-h3:      21px;
  --t-h4:      16px;
  --t-body:    15px;
  --t-small:   13px;
  --t-micro:   11px;

  /* spacing (4px grid) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* radii — sharp by design */
  --r-0: 0px;
  --r-1: 2px;
  --r-2: 4px;

  /* elevation — glow, not shadow */
  --shadow-panel: 0 1px 0 rgba(255,255,255,.02) inset, 0 12px 32px -12px rgba(0,0,0,.8);
  --glow-blue:    0 0 0 1px rgba(61,139,255,.35), 0 0 18px -2px var(--blue-glow);
  --glow-green:   0 0 0 1px rgba(54,241,166,.35), 0 0 18px -2px var(--green-glow);
  --glow-magenta: 0 0 0 1px rgba(255,77,157,.35), 0 0 18px -2px var(--magenta-glow);
  --glow-text-blue:  0 0 12px var(--blue-glow);
  --glow-text-green: 0 0 10px var(--green-glow);

  /* motion */
  --ease: cubic-bezier(.2,.6,.2,1);
  --dur-fast: 90ms;
  --dur:      160ms;
  --dur-slow: 280ms;

  /* misc */
  --scanline: repeating-linear-gradient(
    to bottom, rgba(255,255,255,.022) 0 1px, transparent 1px 3px);
  --maxw: 1100px;

  /* component tokens (#105) — vormals Hartwerte in den Komponenten.
     Theme-Vertrag: TEMPLATE.md „Theme-Schicht“. Abgeleitete Werte folgen
     den Akzent-Tokens; ein Tenant überschreibt sie in theme/tokens.css. */
  --selection-bg:        color-mix(in srgb, var(--blue) 30%, transparent);
  /* Hero-Glow bewusst als Literal: color-mix im Verlauf rundet um 1/255 ab */
  --hero-bg:             radial-gradient(900px 360px at 18% -10%, rgba(61,139,255,.16), transparent 60%),
                         var(--bg-void);
  --hero-border:         1px solid var(--line-2);
  --wordmark-color:      var(--fg-1);
  --wordmark-shadow:     0 0 40px color-mix(in srgb, var(--blue) 25%, transparent);
  --ph-stripe-a:         #11304f;   /* Platzhalter-Cover, Streifen */
  --ph-stripe-b:         #0c2238;
  --ph-nr-color:         var(--blue);
  --ph-nr-shadow:        0 0 20px var(--blue-glow);
  --badge-bg:            color-mix(in srgb, var(--blue) 10%, transparent);
  --badge-border:        var(--blue-dim);
  --badge-amber-bg:      color-mix(in srgb, var(--amber) 10%, transparent);
  --badge-amber-border:  color-mix(in srgb, var(--amber) 35%, transparent);
  --badge-green-bg:      color-mix(in srgb, var(--green) 8%, transparent);
  --badge-green-border:  color-mix(in srgb, var(--green) 35%, transparent);
  --badge-magenta-bg:    color-mix(in srgb, var(--magenta) 8%, transparent);
  --badge-magenta-border:color-mix(in srgb, var(--magenta) 35%, transparent);
  --badge-cyan-bg:       color-mix(in srgb, var(--cyan) 7%, transparent);
  --badge-cyan-border:   color-mix(in srgb, var(--cyan) 30%, transparent);
  --avatar-bg:           radial-gradient(circle at 30% 30%, #2a4a6e, #0c1828);
  --backdrop:            rgba(6,5,15,.9);    /* Lightbox, --bg-void abgedunkelt */
  --overlay-btn-bg:      rgba(8,6,18,.8);    /* Lightbox-Schliessknopf */
  --glow-play-hover:     0 0 0 1px color-mix(in srgb, var(--blue) 50%, transparent), 0 0 28px -2px var(--blue-glow);
  --shadow-pop:          0 -12px 32px -12px rgba(0,0,0,.8);   /* Player, Chat, Shownotes-Panel */
}

/* ---------- RESET -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, video { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

/* ---------- BASE --------------------------------------------------- */
body {
  background: var(--bg-page);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--selection-bg); color: var(--fg-1); }

a { color: var(--link); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--link-hover); text-shadow: var(--glow-text-blue); }

/* ---------- SKIP LINK (a11y) --------------------------------------- */
.zt-skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 100;
  background: var(--blue);
  color: var(--bg-void);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 0 0 var(--r-2) var(--r-2);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease);
}
.zt-skip-link:focus { top: 0; }

/* ---------- LAYOUT UTILITIES --------------------------------------- */
.zt-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- HEADER ------------------------------------------------- */
.zt-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.zt-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 11px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.zt-logo {
  display: flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
}

.zt-logo__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -.02em;
  color: var(--blue);
  text-shadow: var(--glow-text-blue);
  transition: text-shadow var(--dur) var(--ease);
}

.zt-logo:hover .zt-logo__name {
  text-shadow: var(--glow-text-blue), 0 0 30px var(--blue-glow);
}

.zt-logo__slash {
  font-family: var(--font-ui);
  font-size: 10.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.zt-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.zt-nav__link {
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--fg-2);
  padding: 6px 11px;
  border-radius: var(--r-1);
  text-decoration: none;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.zt-nav__link:hover {
  color: var(--blue-bright);
  background: var(--bg-raised);
  text-shadow: none;
}

.zt-nav__feed {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--green);
  padding: 6px 11px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  text-decoration: none;
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.zt-nav__feed:hover {
  border-color: var(--green);
  box-shadow: var(--glow-green);
  color: var(--green-bright);
  text-shadow: var(--glow-text-green);
}

/* ---------- THEME-UMSCHALTER (#105) -------------------------------- */
/* Nur gerendert bei [theme] modes = ["light","dark"]. Ohne JS bleibt der
   Button hidden. Glyph zeigt den Modus, in den man wechselt: ☾ im Hellen,
   ☀ im Dunkeln (U+FE0E = Textform). */
.zt-theme-toggle {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1;
  color: var(--fg-2);
  width: 2.1em;
  height: 2.1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.zt-theme-toggle[hidden] { display: none; }
.zt-theme-toggle:hover,
.zt-theme-toggle:focus-visible {
  color: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 10px var(--amber-glow);
  outline: none;
}
.zt-theme-toggle::before                     { content: "\263E\FE0E"; }
[data-theme="dark"] .zt-theme-toggle::before { content: "\2600\FE0E"; }

/* Header mit Umschalter hat ein Element mehr: „⤓ feed“ bricht nicht um,
   auf schmalen Bildschirmen weicht die Logo-Unterzeile */
.zt-header--toggle .zt-nav__feed { white-space: nowrap; flex-shrink: 0; }
.zt-header--toggle .zt-nav { gap: 6px; }
@media (max-width: 479px) {
  .zt-header--toggle .zt-header__inner { gap: 10px; }
  .zt-header--toggle .zt-logo__slash { display: none; }
}

/* ---------- HERO --------------------------------------------------- */
.zt-hero {
  position: relative;
  overflow: hidden;
  border-bottom: var(--hero-border);
  background: var(--hero-bg);
}

.zt-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scanline);
  opacity: .6;
  pointer-events: none;
}

.zt-hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 54px 22px 46px;
  position: relative;
  z-index: 1;
}

.zt-hero__prompt {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--green);
  margin-bottom: 16px;
  user-select: none;
}

.zt-hero__prompt-user { color: var(--fg-3); }

.zt-hero__prompt-caret {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: zt-blink 1.05s steps(1) infinite;
}

.zt-hero__wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--t-display);
  line-height: .9;
  letter-spacing: -.03em;
  color: var(--wordmark-color);
  /* #75: Schreibweise aus brand.wordmark übernehmen (Holm: „Wortmarke b“) */
  text-shadow: var(--wordmark-shadow);
}

.zt-hero__sub {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 12px 0 22px;
}

.zt-hero__desc {
  display: grid;
  gap: 3px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg-2);
  max-width: 540px;
}

.zt-hero__desc-comment { color: var(--fg-4); }
.zt-hero__desc-hi { color: var(--fg-1); }

/* ---------- MAIN CONTENT AREA -------------------------------------- */
/* #58: main#main-content ist seit der SPA-Umstellung der einzige, seiten-
   uebergreifende Swap-Container (base.html.j2) — traegt jetzt das flex:1,
   das vorher an .zt-main haeng, damit der Footer auf allen Seiten
   (Index UND Episode) unten bleibt, unabhaengig vom Innenaufbau der Seite. */
main#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.zt-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 22px 56px;
  width: 100%;
}

/* ---------- EPISODE COUNT / FILTER BAR ----------------------------- */
.zt-list-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.zt-list-bar__label {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--fg-3);
}

.zt-list-bar__label span { color: var(--fg-4); }

/* ---------- SECTION LABEL ------------------------------------------ */
.zt-sect {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 400; /* reset h2 bold default */
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.zt-sect::before { content: "//"; color: var(--fg-4); }
.zt-sect__rule {
  flex: 1;
  height: 1px;
  background: var(--line-1);
}

/* ---------- EPISODE GRID ------------------------------------------- */
.zt-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;   /* #113: alle Reihen gleich hoch, nicht nur je Reihe */
  gap: 12px;
}

/* ---------- EPISODE CARD ------------------------------------------- */
/* #69: Zelle um Karte + Play-Button. Overlay ist ein quadratischer Layer
   exakt ueber dem Cover (gleiche aspect-ratio), nur der Button selbst
   nimmt Klicks an -- der Rest faellt auf den Karten-Link durch. */
.zt-ep-cell {
  position: relative;
  display: flex;
}

.zt-ep-cell > .zt-ep-card { flex: 1; }

.zt-ep-cell__overlay {
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  aspect-ratio: 1 / 1;
  pointer-events: none;
}

.zt-ep-card__play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: var(--bg-void);
  font-size: 18px;
  line-height: 1;
  padding-left: 3px;
  box-shadow: var(--glow-blue);
  cursor: pointer;
  pointer-events: auto;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}

.zt-ep-card__play:hover,
.zt-ep-card__play:focus-visible {
  background: var(--blue-bright);
  transform: scale(1.08);
}

.zt-ep-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--line-1);
  border-radius: var(--r-2);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
  transition:
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
  text-decoration: none;
  color: inherit;
}

.zt-ep-card:hover {
  border-color: var(--line-3);
  box-shadow: var(--glow-blue);
  background: var(--bg-raised);
  text-shadow: none;
  color: var(--fg-1);
}

/* ---- cover ---- */
.zt-ep-card__cover {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: var(--bg-inset);
  flex-shrink: 0;
}

.zt-ep-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* placeholder cover — diagonal stripes (exact bundle colours) + episode number */
.zt-ep-card__cover--ph {
  background:
    repeating-linear-gradient(45deg, var(--ph-stripe-a) 0 8px, var(--ph-stripe-b) 8px 16px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.zt-ep-card__cover--ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scanline);
  opacity: .45;
}

.zt-ep-card__nr-bg {
  font-family: var(--font-ultra);
  font-weight: 900;
  font-size: clamp(2.5rem, 8vw, 3.8rem);
  color: var(--ph-nr-color);
  text-shadow: var(--ph-nr-shadow);
  position: relative;
  z-index: 1;
  letter-spacing: -.02em;
  line-height: 1;
}

/* ---- card body ---- */
.zt-ep-card__body {
  min-width: 0;              /* #113: lange Wörter/URLs sprengen die Spalte nicht */
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 14px 14px;
  flex: 1;
}

.zt-ep-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- badges ---- */
.zt-ep-nr,
.zt-badge {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .08em;
  padding: 2px 7px;
  border-radius: var(--r-1);
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.5;
}

/* default / episode number = blue */
.zt-ep-nr,
.zt-badge {
  color: var(--blue);
  border-color: var(--badge-border);
  background: var(--badge-bg);
}

/* amber = ARCHIV */
.zt-badge--amber {
  color: var(--amber);
  border-color: var(--badge-amber-border);
  background: var(--badge-amber-bg);
}

/* green = NEU */
.zt-badge--green {
  color: var(--green);
  border-color: var(--badge-green-border);
  background: var(--badge-green-bg);
}

/* magenta = LIVE (with dot) */
.zt-badge--magenta {
  color: var(--magenta);
  border-color: var(--badge-magenta-border);
  background: var(--badge-magenta-bg);
}

/* cyan = SPECIAL / tags */
.zt-badge--cyan {
  color: var(--cyan);
  border-color: var(--badge-cyan-border);
  background: var(--badge-cyan-bg);
}

.zt-ep-card__ts {
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--cyan);
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

.zt-ep-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -.005em;
  color: var(--fg-1);
  transition: color var(--dur) var(--ease);
  /* #113: höchstens 2 Zeilen, voller Titel im title-Attribut */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.zt-ep-card:hover .zt-ep-card__title { color: var(--blue-bright); }

.zt-ep-card__sub {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.zt-ep-card__meta {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--fg-3);
  margin-top: auto;
  padding-top: 4px;
}

/* Speaker names inline — ▸ name in green (index card style) */
.zt-speaker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.zt-speaker-row__name {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--green);
}

/* ---- speaker chips (compact) ---- */
.zt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.zt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-raised);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 2px 9px 2px 3px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12px;
  color: var(--fg-1);
  white-space: nowrap;
}

.zt-chip__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line-3);
}

.zt-chip__initial {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--line-3);
  background: var(--avatar-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 10px;
  color: var(--blue-bright);
}

/* ---------- EPISODE DETAIL PAGE ------------------------------------ */
.zt-ep-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--fg-2);
  padding: 22px 22px 0;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.zt-ep-back:hover { color: var(--blue-bright); text-shadow: none; }

.zt-ep-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 22px 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.zt-ep-head__cover {
  width: 148px;
  height: 148px;
  flex-shrink: 0;
  border-radius: var(--r-2);
  border: 1px solid var(--line-2);
  overflow: hidden;
  background: var(--bg-inset);
  position: relative;
}

.zt-ep-head__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* #93: Cover-Link → Lightbox (spa.js); ohne JS öffnet er cover.png direkt */
.zt-cover-zoom {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}
.zt-cover-zoom:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

.zt-lightbox {
  margin: auto;          /* Reset (* { margin: 0 }) hebt sonst die Zentrierung auf */
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 95vw;
  max-height: 95vh;
  overflow: visible;
}
.zt-lightbox::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(3px);
}
/* Podcast-Cover sind quadratisch (Apple-Pflicht): feste Box statt
   Sprung beim Nachladen; object-fit hält Abweichler im Rahmen. */
.zt-lightbox__img {
  display: block;
  width: min(95vw, 95vh);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: var(--bg-inset);
  border: 1px solid var(--line-3);
  border-radius: var(--r-2);
  box-shadow: 0 0 48px var(--blue-glow);
  cursor: zoom-out;
}
.zt-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-3);
  border-radius: 50%;
  background: var(--overlay-btn-bg);
  color: var(--fg-1);
  font: 16px/1 var(--font-ui);
  cursor: pointer;
}
.zt-lightbox__close:hover,
.zt-lightbox__close:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
  outline: none;
}

.zt-ep-head__cover--ph {
  background:
    repeating-linear-gradient(45deg, var(--ph-stripe-a) 0 8px, var(--ph-stripe-b) 8px 16px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.zt-ep-head__cover--ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scanline);
  opacity: .5;
}

.zt-ep-head__cover-nr {
  font-family: var(--font-ultra);
  font-weight: 900;
  font-size: 3.2rem;
  color: var(--ph-nr-color);
  text-shadow: var(--ph-nr-shadow);
  position: relative;
  z-index: 1;
  line-height: 1;
}

.zt-ep-head__meta {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.zt-ep-head__top {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.zt-ep-head__path {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--fg-2);
}

.zt-ep-head__dur {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--cyan);
  margin-left: auto;
}

.zt-ep-head__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 5vw, 46px);
  line-height: .98;
  letter-spacing: -.01em;
  color: var(--fg-1);
  margin-bottom: 8px;
}

.zt-ep-head__date {
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--fg-3);
  margin-bottom: 16px;
}

.zt-ep-head__chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.zt-btn-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  color: var(--bg-void);
  background: var(--blue);
  border-radius: var(--r-1);
  padding: 10px 20px;
  box-shadow: var(--glow-blue);
  text-decoration: none;
  transition:
    background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
  border: none;
  cursor: pointer;
  align-self: flex-start;
}

.zt-btn-play:hover {
  background: var(--blue-bright);
  box-shadow: var(--glow-play-hover);
  color: var(--bg-void);
  text-shadow: none;
}

.zt-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.zt-btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  color: var(--fg-2);
  background: var(--bg-raised);
  border-radius: var(--r-1);
  padding: 10px 20px;
  text-decoration: none;
  border: 1px solid var(--fg-4);
  cursor: pointer;
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.zt-btn-dl:hover {
  background: var(--bg-panel);
  color: var(--fg-1);
  border-color: var(--fg-3);
}

/* ---------- EPISODE BODY (SHOWNOTES + CHAPTERS) -------------------- */
.zt-ep-body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

/* ---------- SHOWNOTES ---------------------------------------------- */
.zt-shownotes {
  font-family: var(--font-body);
  font-size: var(--t-body);
  color: var(--fg-1);
  line-height: 1.7;
}

.zt-shownotes p { margin-bottom: .9em; }
.zt-shownotes h2 { font-family: var(--font-ui); font-weight: 700; font-size: 20px;
  color: var(--fg-1); margin: 1.4em 0 .5em; }
.zt-shownotes h3 { font-family: var(--font-ui); font-weight: 600; font-size: 17px;
  color: var(--fg-2); margin: 1.2em 0 .4em; }
.zt-shownotes a { color: var(--blue); }
.zt-shownotes a:hover { color: var(--blue-bright); }
.zt-shownotes ul, .zt-shownotes ol { padding-left: 1.4em; margin-bottom: .9em; }
.zt-shownotes ul { list-style: disc; }
.zt-shownotes ol { list-style: decimal; }
.zt-shownotes li { margin-bottom: .3em; }
.zt-shownotes code {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  background: var(--bg-inset);
  border: 1px solid var(--line-1);
  border-radius: var(--r-1);
  padding: .1em .4em;
  color: var(--green-bright);
}
.zt-shownotes pre {
  background: var(--bg-inset);
  border: 1px solid var(--line-1);
  border-radius: var(--r-2);
  padding: 14px 16px;
  overflow-x: auto;
  margin-bottom: 1em;
}
.zt-shownotes pre code { background: none; border: none; padding: 0; }

/* ---------- TERMINAL WINDOW (used for chapter list etc.) ----------- */
.zt-term-win {
  background: var(--bg-panel);
  border: 1px solid var(--line-2);
  border-radius: var(--r-2);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}

.zt-term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line-2);
}

.zt-term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.zt-term-bar__title {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--fg-3);
  margin-left: 4px;
  letter-spacing: .08em;
}

.zt-term-body {
  padding: 14px 16px;
  background: linear-gradient(var(--bg-inset), var(--bg-inset));
}

/* ---------- CHAPTER LIST ------------------------------------------- */
.zt-chapters {
  /* wraps inside .zt-term-win — no extra background/border needed */
}

.zt-ch-list {
  display: grid;
  gap: 2px;
}

.zt-ch {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 7px 8px;
  border-radius: var(--r-1);
  transition: background var(--dur-fast) var(--ease);
  align-items: baseline;
}

.zt-ch:hover { background: var(--bg-raised); }

.zt-ch__ts {
  color: var(--cyan);
  flex-shrink: 0;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), text-shadow var(--dur-fast) var(--ease);
}

.zt-ch__ts:hover {
  color: var(--cyan);
  text-shadow: 0 0 8px var(--cyan-glow);
}

.zt-ch__title { color: var(--fg-2); }

/* ---------- SPEAKERS (DETAIL PAGE) --------------------------------- */
.zt-speakers {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px 56px;
}

.zt-speaker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.zt-speaker {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-raised);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
}

.zt-speaker__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-3);
  flex-shrink: 0;
}

.zt-speaker__initial {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--line-3);
  background: var(--avatar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 12px;
  color: var(--blue-bright);
}

.zt-speaker__name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--fg-1);
}

/* ---------- MASTODON-KOMMENTARE (#92, DETAIL PAGE) ----------------- */
.zt-masto {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px 56px;
}
/* Button/Liste haben eigenes display — [hidden] (ohne JS) muss gewinnen */
.zt-masto [hidden] { display: none !important; }

.zt-masto__intro {
  color: var(--fg-2);
  font-size: 14px;
  margin-bottom: 14px;
}

.zt-masto__host { color: var(--cyan); }

.zt-masto__load:disabled { opacity: .55; cursor: progress; }

.zt-masto__status {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 12px;
}
.zt-masto__status:empty { display: none; }

.zt-masto__list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.zt-masto__item {
  --zt-masto-depth: 0;
  margin-left: calc(var(--zt-masto-depth) * 22px);
  background: var(--bg-panel);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--violet);
  border-radius: var(--r-2);
  padding: 12px 14px;
}

.zt-masto__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.zt-masto__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-2);
  object-fit: cover;
  border: 1px solid var(--line-3);
  flex-shrink: 0;
}
.zt-masto__avatar--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  color: var(--violet);
}

.zt-masto__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.zt-masto__name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--fg-1);
}
.zt-masto__acct {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--fg-3);
  overflow-wrap: anywhere;
}

.zt-masto__orig, .zt-masto__time {
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--fg-3);
  white-space: nowrap;
  text-decoration: none;
}
.zt-masto__orig:hover .zt-masto__time { color: var(--blue-bright); }

.zt-masto__content {
  color: var(--fg-1);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.zt-masto__content p + p { margin-top: .6em; }
.zt-masto__content a { color: var(--blue); }
.zt-masto__content a:hover { color: var(--blue-bright); }
.zt-masto__invisible { display: none; }
.zt-masto__ellipsis::after { content: "…"; }
.zt-masto__cw summary { cursor: pointer; color: var(--amber); }
.zt-masto__media { color: var(--fg-3); font-size: 12px; }

/* ---------- FOOTER ------------------------------------------------- */
.zt-footer {
  border-top: 1px solid var(--line-2);
  background: var(--bg-void);
  margin-top: auto;
}

.zt-footer__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 36px 22px 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.zt-footer__col-head {
  font-family: var(--font-ui);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--fg-3);
  margin-bottom: 11px;
}

.zt-footer__row {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.9;
}

.zt-footer__row-hi { color: var(--fg-1); }
.zt-footer__bullet { color: var(--fg-4); }

/* #70: Markenzeile -- Logos gedimmt, beim Hover volle Deckkraft */
.zt-footer__brand {
  /* Linie exakt auf Inhaltsbreite (Grid hat 22px Innenabstand) */
  width: calc(100% - 44px);
  max-width: calc(var(--maxw) - 44px);
  margin: 0 auto;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line-1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.zt-footer__logos {
  display: flex;
  align-items: center;
  gap: 32px;
}

.zt-footer__logos img {
  height: 52px;
  width: auto;
  opacity: .72;
  transition: opacity var(--dur) var(--ease);
}

.zt-footer__logos img:hover { opacity: 1; }

.zt-footer__copy {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--fg-3);
}
/* #83: Lizenzhinweis der ausgelieferten Schrift, Zeile unter dem Copyright */
.zt-footer__fontcredit {
  display: block;
  margin-top: 4px;
  letter-spacing: .04em;
}

/* ---------- ANIMATIONS --------------------------------------------- */
@keyframes zt-blink { 50% { opacity: 0; } }

/* ---------- RESPONSIVE --------------------------------------------- */
@media (min-width: 640px) {
  .zt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zt-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .zt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .zt-ep-body { grid-template-columns: 1.4fr 1fr; }
  .zt-footer__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1440px) {
  .zt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- STICKY FOOTER PLAYER ------------------------------------ */
/* Persistiert Wiedergabe ueber Seitenwechsel via sessionStorage.
   Sichtbar auf ALLEN Seiten inkl. Episodenseite — einzige Audio-Instanz
   der Site seit #53 (P04, "sticky everywhere"). Kein Inline-Player mehr,
   der ihn ausblenden koennte. */
.zt-sticky-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  background: var(--bg-panel);
  border-top: 1px solid var(--line-2);
  box-shadow: var(--shadow-pop);
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease);
}

.zt-sticky-player.is-active {
  transform: translateY(0);
}

/* #53 Nachbesserung: der fixe Sticky-Player (~64px) legt sich sonst beim
   Ganz-nach-unten-Scrollen ueber die unterste Footer-Zeile. Padding nur
   reservieren wenn .is-active wirklich sichtbar ist (translateY(0)) —
   gilt jetzt einheitlich auf allen Seiten inkl. Episode. */
/* #104: Hoehe misst player.js (--zt-player-h), die Leiste traegt jetzt Meta */
body:has(.zt-sticky-player.is-active) {
  padding-bottom: calc(var(--zt-player-h, 64px) + 8px);
}

.zt-sticky-player__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
}

.zt-sticky-player__playbtn {
  background: none;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 1rem;
  width: 2.4em;
  height: 2.4em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-1);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.zt-sticky-player__playbtn:hover {
  background: var(--blue);
  color: var(--bg-void);
}

.zt-sticky-player__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* #104: Kopfzeile = Nummer + Tags (Badges der Episodenkarte) + Titel.
   Der Titel ist ein Button und klappt das Shownotes-Panel auf. */
.zt-sticky-player__head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.zt-sticky-player__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.zt-sticky-player__badges[hidden] { display: none; }

/* schmal (<640px): nur die Nummer, Tags erst ab 640px */
.zt-sticky-player__tag { display: none; }

.zt-sticky-player__title {
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  text-align: left;
  transition: color var(--dur-fast) var(--ease);
}

.zt-sticky-player__title:not(:disabled):hover,
.zt-sticky-player__title[aria-expanded="true"] { color: var(--blue-bright); }

.zt-sticky-player__title:disabled { cursor: default; }

.zt-sticky-player__title:focus-visible,
.zt-sticky-player__notesbtn:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 2px;
}

/* Live-Punkt nur beim Stream (#54) — Folgen tragen die Nummer-Badge */
.zt-sticky-player[data-zt-kind="stream"] .zt-sticky-player__title::before {
  content: "● ";
  color: var(--magenta);
}

/* #104: Untertitel · Datum · ▸ Sprecher — erst ab 640px sichtbar */
.zt-sticky-player__meta {
  display: none;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 11px;
}

.zt-sticky-player__sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--fg-2);
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

.zt-sticky-player__date {
  font-family: var(--font-ui);
  letter-spacing: .06em;
  color: var(--fg-3);
  flex-shrink: 0;
}

.zt-sticky-player__meta .zt-speaker-row__name { flex-shrink: 0; }

/* #104: Shownotes-Toggle — Bauart wie ..__streambtn */
.zt-sticky-player__notesbtn {
  background: none;
  border: 1px solid var(--fg-4);
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 1.9rem;
  padding: 0 9px;
  border-radius: var(--r-1);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.zt-sticky-player__notesbtn[hidden] { display: none; }

.zt-sticky-player__notesbtn:hover {
  color: var(--fg-1);
  border-color: var(--fg-3);
}

.zt-sticky-player__notesbtn[aria-expanded="true"] {
  color: var(--blue-bright);
  border-color: var(--blue);
}

.zt-sticky-player__notes-label { display: none; }

.zt-sticky-player__notes-glyph {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  transition: transform var(--dur) var(--ease);
}

.zt-sticky-player__notesbtn[aria-expanded="true"] .zt-sticky-player__notes-glyph {
  transform: rotate(180deg);
}

.zt-sticky-player__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zt-sticky-player__seek {
  /* #59: sichtbare Spur bleibt 3px (Optik), aber die klickbare Hoehe des
     Elements selbst wird auf ~18px angehoben (Hit-Area). Firefox rendert
     die Track-/Thumb-Pseudoelemente direkt; WebKit braucht die Track- +
     Thumb-Pseudoelemente separat, sonst gilt dort effektiv nur die native
     (sehr duenne) Default-Spur als Hit-Area. */
  flex: 1;
  width: 100%;
  accent-color: var(--blue);
  cursor: pointer;
  height: 18px;
  background: transparent;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.zt-sticky-player__seek::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--line-2, #3a3a4a);
  border-radius: 2px;
}

.zt-sticky-player__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: -5.5px;
  cursor: pointer;
}

.zt-sticky-player__seek::-moz-range-track {
  height: 3px;
  background: var(--line-2, #3a3a4a);
  border-radius: 2px;
}

.zt-sticky-player__seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--blue);
  cursor: pointer;
}

.zt-sticky-player__seek:disabled {
  cursor: default;
  opacity: .5;
}

.zt-sticky-player__times {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  flex-shrink: 0;
  white-space: nowrap;
}

.zt-sticky-player__close {
  background: none;
  border: 1px solid var(--fg-4);
  color: var(--fg-3);
  width: 1.9em;
  height: 1.9em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-1);
  font-size: .85rem;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.zt-sticky-player__close:hover {
  color: var(--fg-1);
  border-color: var(--fg-3);
}

/* #54: Stream-Button — eigenes Namensschema, gleiche Bauart wie ..__close.
   OFF-Zustand: neutraler Rahmen. LIVE (aria-pressed=true): magenta,
   pulsierender Punkt (siehe --stream-dot, reduced-motion macht ihn statisch). */
.zt-sticky-player__streambtn {
  background: none;
  border: 1px solid var(--fg-4);
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: var(--r-1);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.zt-sticky-player__streambtn:hover {
  color: var(--fg-1);
  border-color: var(--fg-3);
}

.zt-sticky-player__streambtn[aria-pressed="true"] {
  color: var(--magenta);
  border-color: var(--magenta);
}

.zt-sticky-player__stream-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg-4);
  flex-shrink: 0;
}

.zt-sticky-player__streambtn[aria-pressed="true"] .zt-sticky-player__stream-dot {
  background: var(--magenta);
  animation: zt-stream-pulse 1.6s ease-in-out infinite;
}

.zt-sticky-player__stream-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 8em;
}

@keyframes zt-stream-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--magenta-glow); }
  50%      { box-shadow: 0 0 0 4px transparent; }
}

/* #55: Chat-Toggle — eigenes Namensschema, gleiche Bauart wie ..__close.
   Sichtbarkeit ist unabhaengig vom Stream-Status; aria-pressed spiegelt nur
   den Panel-Offen-Zustand. */
.zt-sticky-player__chatbtn {
  background: none;
  border: 1px solid var(--fg-4);
  color: var(--fg-2);
  width: 1.9em;
  height: 1.9em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-1);
  font-size: .95rem;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.zt-sticky-player__chatbtn:hover {
  color: var(--fg-1);
  border-color: var(--fg-3);
}

.zt-sticky-player__chatbtn[aria-pressed="true"] {
  color: var(--blue-bright);
  border-color: var(--blue);
}

.zt-sticky-player__chat-glyph {
  line-height: 1;
}

/* #112: Teilen-Button — Bauart des Shownotes-Toggles (gleiche Klassen),
   Glyph bleibt aufrecht (kein Dreh wie beim Aufklappen). */
.zt-sticky-player__sharebtn .zt-sticky-player__notes-glyph { transform: none; }
.zt-sticky-player__sharebtn:focus-visible,
.zt-sticky-player__playbtn:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 2px;
}

/* #112: Deep-Link hat die Folge an eine Position gestellt, Abspielen bleibt
   dem Nutzer (Autoplay-Sperre) -- der Play-Knopf leuchtet als Hinweis. */
.zt-sticky-player.is-cued .zt-sticky-player__playbtn {
  box-shadow: var(--glow-blue);
  animation: zt-cue-pulse 1.6s ease-in-out infinite;
}

@keyframes zt-cue-pulse {
  0%, 100% { box-shadow: var(--glow-blue); }
  50%      { box-shadow: 0 0 0 4px var(--blue-glow); }
}

/* #112: Rueckmeldung der Tastenkuerzel, mittig ueber der Leiste */
.zt-sticky-player__toast {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--fg-1);
  background: var(--bg-raised);
  border: 1px solid var(--line-3);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-panel);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.zt-sticky-player__toast.is-visible { opacity: 1; }

/* #112: Tastenhilfe (Taste ?) — rechts ueber der Leiste */
.zt-keys-help {
  position: absolute;
  right: 16px;
  bottom: calc(100% + 10px);
  padding: 12px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--line-3);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-panel);
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--fg-2);
}

.zt-keys-help[hidden] { display: none; }

.zt-keys-help__title {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--fg-3);
  margin-bottom: 8px;
}

.zt-keys-help__title::before { content: "// "; color: var(--fg-4); }

.zt-keys-help__list {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 14px;
  align-items: baseline;
}

.zt-keys-help kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-1);
  padding: 0 5px;
  border: 1px solid var(--line-3);
  border-radius: var(--r-1);
  background: var(--bg-inset);
}

/* #112: Teilen-Dialog (<dialog>, modal) */
.zt-share {
  margin: auto;            /* Reset (* { margin: 0 }) hebt sonst die Zentrierung auf */
  width: min(560px, calc(100vw - 24px));
  padding: 0;
  background: var(--bg-panel);
  color: var(--fg-1);
  border: 1px solid var(--line-3);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-panel);
}

.zt-share::backdrop {
  background: color-mix(in srgb, var(--bg-void) 85%, transparent);
  backdrop-filter: blur(3px);
}

.zt-share__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line-2);
}

.zt-share__title {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.zt-share__title::before { content: "// "; color: var(--fg-4); }

.zt-share__close {
  background: none;
  border: 1px solid var(--fg-4);
  color: var(--fg-3);
  width: 1.9em;
  height: 1.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-1);
  font-size: .85rem;
}

.zt-share__close:hover { color: var(--fg-1); border-color: var(--fg-3); }

.zt-share__ep {
  padding: 14px 16px 0;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zt-share__label {
  display: block;
  padding: 12px 16px 4px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--fg-3);
}

.zt-share__url,
.zt-share__t {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--fg-1);
  background: var(--bg-inset);
  border: 1px solid var(--line-2);
  border-radius: var(--r-1);
  padding: 7px 9px;
}

.zt-share__url {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px;
}

.zt-share__url:focus-visible,
.zt-share__t:focus-visible,
.zt-share__check:focus-visible,
.zt-share__close:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 2px;
}

.zt-share__t { width: 8.5em; }
.zt-share__t[aria-invalid="true"] { border-color: var(--red); }

.zt-share__hint {
  padding: 8px 16px 0;
  font-size: 12px;
  color: var(--amber);
}

.zt-share__time {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--fg-2);
}

.zt-share__check { accent-color: var(--blue); width: 16px; height: 16px; }

.zt-share .zt-btn-row { padding: 4px 16px 0; }
/* .zt-btn-dl setzt display -- [hidden] (kein Web Share) muss gewinnen */
.zt-share [hidden] { display: none; }

.zt-share__status {
  min-height: 1.6em;
  padding: 8px 16px 14px;
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--green);
}

/* ---------- CHAT-PANEL (#55) ---------------------------------------- */
/* Fixed, neben/ueber dem Sticky-Player. Desktop: Sidebar rechts (~320px).
   Mobile: Full-Screen-Modal. iframe-src wird per JS erst beim ersten
   Oeffnen gesetzt (Lazy-Load). */
.zt-chat-panel {
  position: fixed;
  z-index: 600;
  background: var(--bg-panel);
  border: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-pop);
}

.zt-chat-panel:not(.is-active) {
  opacity: 0;
  pointer-events: none;
}

.zt-chat-panel.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile: Full-Screen-Modal ueber dem Sticky-Player. */
.zt-chat-panel {
  inset: 0;
  bottom: var(--zt-player-h, 68px);
  border-width: 1px 0 0 0;
  transition: opacity var(--dur) var(--ease);
}

.zt-chat-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  flex-shrink: 0;
}

.zt-chat-panel__title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.zt-chat-panel__close {
  background: none;
  border: 1px solid var(--fg-4);
  color: var(--fg-3);
  width: 1.9em;
  height: 1.9em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-1);
  font-size: .85rem;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.zt-chat-panel__close:hover {
  color: var(--fg-1);
  border-color: var(--fg-3);
}

.zt-chat-panel__body {
  flex: 1;
  min-height: 0;
}

.zt-chat-panel__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg-void);
}

/* ---------- SHOWNOTES-PANEL (#104) ---------------------------------- */
/* Shownotes + Kapitel der LAUFENDEN Folge, fixed ueber dem Player.
   Mobile: Full-Screen wie der Chat; ab 640px eine Schublade in --maxw-Breite
   mit hoechstens 60vh. Inhalt scrollt im Body, Kopf bleibt stehen. */
.zt-np-panel {
  position: fixed;
  z-index: 600;
  left: 0;
  right: 0;
  top: 0;
  bottom: var(--zt-player-h, 64px);
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border-top: 1px solid var(--line-2);
  box-shadow: var(--shadow-pop);
}

.zt-np-panel[hidden] { display: none; }

.zt-np-panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg-raised);
  flex-shrink: 0;
}

.zt-np-panel__label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  flex-shrink: 0;
}

.zt-np-panel__label::before { content: "// "; color: var(--fg-4); }

.zt-np-panel__title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: none;
}

.zt-np-panel__link {
  font-family: var(--font-mono);
  font-size: 11px;
  flex-shrink: 0;
}

.zt-np-panel__close {
  background: none;
  border: 1px solid var(--fg-4);
  color: var(--fg-3);
  width: 1.9em;
  height: 1.9em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-1);
  font-size: .85rem;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.zt-np-panel__close:hover {
  color: var(--fg-1);
  border-color: var(--fg-3);
}

.zt-np-panel__close:focus-visible,
.zt-np-panel__seek:focus-visible {
  outline: 1px solid var(--blue);
  outline-offset: 2px;
}

.zt-np-panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: grid;
  gap: 22px;
  align-content: start;
}

.zt-np-panel__status {
  font-family: var(--font-mono);
  font-size: var(--t-small);
  color: var(--fg-3);
}

.zt-np-panel__sub {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--fg-3);
  margin-bottom: 6px;
}

/* Kapitel-Sprung ist ein <button> — sieht aus wie der Zeitstempel-Link */
.zt-np-panel__seek {
  font-family: var(--font-mono);
  font-size: inherit;
}

@media (min-width: 640px) {
  .zt-sticky-player__inner { padding: 12px 22px; gap: 18px; }
  .zt-sticky-player__title { font-size: 13.5px; }
  .zt-sticky-player__stream-label { max-width: 12em; }
  /* #104: volle Meta ab 640px */
  .zt-sticky-player__tag { display: inline-block; }
  .zt-sticky-player__meta { display: flex; }
  .zt-sticky-player__meta[hidden] { display: none; }
  .zt-sticky-player__notes-label { display: inline; }

  /* Desktop: Sidebar rechts statt Full-Screen-Modal. */
  .zt-chat-panel {
    inset: auto;
    top: 0;
    right: 0;
    bottom: var(--zt-player-h, 68px);
    width: 320px;
    border-width: 0 0 0 1px;
  }

  .zt-np-panel {
    top: auto;
    left: 50%;
    right: auto;
    width: min(var(--maxw), 100%);
    transform: translateX(-50%);
    max-height: 60vh;
    border: 1px solid var(--line-2);
    border-bottom: 0;
    border-radius: var(--r-2) var(--r-2) 0 0;
  }
  .zt-np-panel__head { padding: 10px 22px; }
  .zt-np-panel__body {
    padding: 18px 22px 22px;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
  /* nur Kapitel oder nur Shownotes: volle Breite */
  .zt-np-panel__body > :only-child { grid-column: 1 / -1; }
}

/* ---------- REDUCED MOTION ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .zt-hero__prompt-caret { animation: none; opacity: 1; }
  .zt-sticky-player__streambtn[aria-pressed="true"] .zt-sticky-player__stream-dot { animation: none; box-shadow: none; }
}
