/* ========================================
   ДоброКаст — Layouts spécifiques
   ======================================== */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
  /* iOS PWA notch + home-indicator safe-area (Yann, 12 juin 2026).
     En browser normal, ces env() valent 0 → aucun impact. En standalone
     iOS, le contenu ne passe plus sous le notch ni sous la home indicator. */
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; outline: none; color: inherit; }
img { max-width: 100%; display: block; }
header, main, nav { min-width: 0; }

/* ── Header (dark by default, follows theme) ──
   Le body a déjà un padding-top: env(safe-area-inset-top). Le header sticky
   se place naturellement SOUS la zone safe, ce qu'on veut. On garde un
   padding horizontal qui s'ajoute au body padding-left/right pour ne pas
   coller aux bords sur iPad Pro / Dynamic Island. */
.dc-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  color: var(--text);
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}
.dc-header-right { display: flex; align-items: center; gap: 6px; }
.dc-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.dc-brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #FFFFFF;
  font-size: 1.1rem;
}
.dc-brand-text {
  font-size: 1.4rem;        /* Bumped from 1.15rem — marketing punch */
  letter-spacing: 0.01em;
  line-height: 1.05;
  display: block;
}
/* Cyrillic subtitle directly under the latin name.
   (Yann, 12 juin 2026 — "pour le marketing, DobroCast en un peu plus gros
   et juste en dessous, pareil mais en cyrillique".) */
.dc-brand-text-sub {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  opacity: 0.7;
  line-height: 1;
  margin-top: 2px;
  text-transform: none;
}
.dc-nav { display: flex; gap: 4px; align-items: center; margin-right: 4px; }
.dc-nav a {
  color: var(--text);
  padding: 8px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
  opacity: 0.6;
}
.dc-nav a:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.dc-nav a.active {
  opacity: 1;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Theme toggle (sun/moon) */
.dc-theme-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  opacity: 0.75;
}
.dc-theme-btn:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  transform: rotate(15deg);
}
.dc-theme-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Hero ── */
.dc-hero {
  padding: 32px 20px 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-light) 0%, transparent 100%);
}
.dc-hero-no-title { padding: 28px 20px 16px; }
.dc-hero h1 {
  font-family: var(--font-display);
  font-size: 2.4rem; font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px; letter-spacing: -0.02em;
}
.dc-hero .dc-tagline {
  font-size: 0.95rem; color: var(--subtext);
  max-width: 520px; margin: 0 auto 16px;
}
.dc-hero .dc-pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.dc-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 12px;
  font-size: 0.75rem; font-weight: 600;
  color: var(--text);
}
.dc-pill.brick { background: var(--brick-light); color: var(--brick); border-color: var(--brick); }
.dc-pill.gold { background: rgba(184,134,11,0.12); color: var(--gold); border-color: var(--gold); }

/* ── Main grid ──
   Body padding-top/bottom gère déjà les safe-areas iOS. On garde
   juste un padding latéral + vertical standard. */
.dc-main {
  flex: 1;
  padding: 24px 20px 60px;
  max-width: 900px; margin: 0 auto; width: 100%;
}

/* ── Section title ── */
.dc-section-title {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* ── Player card ── */
.dc-player {
  position: sticky; top: 70px; z-index: 20;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}
.dc-player-now {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 18px;
}
.dc-player-cover {
  width: 72px; height: 72px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; flex-shrink: 0; color: white;
}
.dc-player-meta { flex: 1; min-width: 0; }
.dc-player-meta h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; color: var(--accent);
  margin-bottom: 3px; line-height: 1.2;
}
.dc-player-meta p { font-size: 0.78rem; color: var(--subtext); }

.dc-play-btn {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; cursor: pointer;
  transition: transform 0.15s, background 0.2s;
  box-shadow: var(--shadow);
}
.dc-play-btn:hover { transform: scale(1.05); background: var(--brick); }
.dc-play-btn.playing { background: var(--brick); }

.dc-player-controls { text-align: center; margin: 12px 0 8px; }

.dc-audio-wrap audio {
  width: 100%; height: 40px; margin-top: 8px;
  border-radius: var(--radius-sm);
}

/* ── Progress bar custom ── */
.dc-progress {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.7rem; color: var(--subtext); margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.dc-progress-bar {
  flex: 1; height: 4px; background: var(--border);
  border-radius: 2px; cursor: pointer; position: relative;
}
.dc-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px; transition: width 0.3s;
}

/* ── Transcript ── */
.dc-transcript-toggle {
  display: block; margin: 12px auto 0;
  background: none; color: var(--accent);
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.dc-transcript {
  margin-top: 14px;
  background: var(--accent-light); border-radius: var(--radius);
  padding: 14px; max-height: 240px; overflow-y: auto;
}
.dc-transcript-line {
  display: flex; gap: 10px; padding: 6px 4px;
  border-radius: 6px; cursor: pointer; transition: background 0.2s;
}
.dc-transcript-line:hover { background: rgba(139,46,46,0.05); }
.dc-transcript-line.active { background: rgba(184,134,11,0.15); }
.dc-transcript-time {
  font-size: 0.65rem; color: var(--gold);
  font-weight: 600; flex-shrink: 0; min-width: 36px; padding-top: 2px;
}
.dc-transcript-text { flex: 1; font-size: 0.8rem; line-height: 1.4; }

/* ── About block ── */
.dc-about {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  margin-bottom: 20px;
}
.dc-about h3 { font-family: var(--font-display); font-size: 1rem; color: var(--accent); margin-bottom: 10px; }
.dc-about p { font-size: 0.85rem; line-height: 1.6; color: var(--text); }

/* ── Host card ── */
.dc-host {
  display: flex; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
  margin-bottom: 20px;
}
.dc-host-photo {
  width: 64px; height: 64px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0; border: 2px solid var(--gold);
}
.dc-host-photo img { width: 100%; height: 100%; object-fit: cover; }
.dc-host-info h3 { font-family: var(--font-display); font-size: 1rem; color: var(--accent); margin-bottom: 3px; }
.dc-host-info p { font-size: 0.8rem; color: var(--subtext); margin-bottom: 8px; }
.dc-host-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.dc-tag {
  display: inline-block;
  background: rgba(28,150,115,0.1); color: var(--accent);
  border-radius: 8px; padding: 3px 10px;
  font-size: 0.65rem; font-weight: 600;
}

/* ── CTA ── */
.dc-cta {
  background: linear-gradient(135deg, var(--accent), #6b1e1e);
  color: white; border-radius: var(--radius-lg);
  padding: 24px; text-align: center; margin-bottom: 20px;
}
.dc-cta h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 8px; }
.dc-cta p { font-size: 0.85rem; opacity: 0.92; margin-bottom: 16px; }
.dc-cta-btn {
  background: var(--gold); color: white;
  padding: 10px 24px; border-radius: 20px;
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  transition: transform 0.15s;
}
.dc-cta-btn:hover { transform: scale(1.04); }

/* ========================================
   DobroCast Reader — design DobroCastReader.jpg
   Dark mint, glassmorphism, waveform 60 bars
   ======================================== */
.dc-reader {
  --mint:        #5EEAD4;
  --mint-bright: #34D399;
  --bg-deep:     #0B1426;
  --bg-vignette: #16243A;
  --glass-bg:    rgba(15, 23, 42, 0.55);
  --glass-bd:    rgba(94, 234, 212, 0.18);
  --slate-400:   #94A3B8;
  --slate-300:   #CBD5E1;
  --slate-800:   #1E293B;
  --text-mute:   rgba(255,255,255,0.85);

  position: relative;
  max-width: 520px;
  margin: 0 auto 32px;
  padding: 36px 28px 32px;
  border-radius: 28px;
  color: #fff;
  font-family: var(--font-body);
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 18%, var(--bg-vignette) 0%, var(--bg-deep) 65%),
    var(--bg-deep);
  background-image:
    radial-gradient(ellipse at 50% 18%, var(--bg-vignette) 0%, var(--bg-deep) 65%),
    repeating-linear-gradient(45deg,  transparent, transparent 40px, rgba(255,255,255,0.012) 40px, rgba(255,255,255,0.012) 41px),
    repeating-linear-gradient(-45deg, transparent, transparent 40px, rgba(255,255,255,0.012) 40px, rgba(255,255,255,0.012) 41px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  overflow: hidden;
}

/* Subtle film grain to feel like the reader */
.dc-reader::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(94,234,212,0.08), transparent 60%);
  pointer-events: none;
}

/* Brand mark */
.dc-reader-brand { position: relative; margin-bottom: 6px; }
.dc-reader-brand h2 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mint);
  text-shadow: 0 0 30px rgba(94,234,212,0.45);
  margin: 0;
}
.dc-reader-brand .sub {
  font-size: 1.3rem;
  font-weight: 400;
  color: #fff;
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Cover — micro with radial glow */
.dc-reader-cover {
  position: relative;
  margin: 8px auto 10px;
  width: 200px; height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-size: 6.4rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94,234,212,0.32) 0%, transparent 65%);
  filter: drop-shadow(0 0 50px rgba(94,234,212,0.35));
}

/* Episode title */
.dc-reader-title {
  position: relative;
  margin: 16px 0 4px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}
.dc-reader-meta {
  position: relative;
  font-size: 0.95rem;
  color: var(--text-mute);
  margin-bottom: 18px;
}

/* Waveform — 60 bars, varying heights, mint with opacity gradient */
.dc-reader-wave {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  gap: 3px;
  height: 110px;
  margin: 8px 0 14px;
  filter: drop-shadow(0 0 10px rgba(94,234,212,0.45));
}
.dc-reader-wave .bar {
  width: 3px;
  background: var(--mint);
  border-radius: 999px;
  opacity: 0.55;
  transition: opacity 0.25s, height 0.25s;
}
.dc-reader-wave .bar.played { opacity: 1; }
.dc-reader-wave .bar.future { opacity: 0.35; }

/* Progress bar — track + fill + knob */
.dc-reader-progress {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  margin: 4px 6px 12px;
  font-size: 0.78rem;
  color: var(--slate-400);
  font-variant-numeric: tabular-nums;
}
.dc-reader-track {
  position: relative; flex: 1; height: 4px;
  background: var(--slate-800);
  border-radius: 999px;
  cursor: pointer;
}
.dc-reader-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--mint);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(94,234,212,0.55);
}
.dc-reader-knob {
  position: absolute; top: 50%;
  width: 16px; height: 16px;
  background: var(--mint);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px rgba(94,234,212,0.7);
  pointer-events: none;
}
.dc-reader-knob::after {
  content: ""; position: absolute;
  top: 50%; left: 50%;
  width: 5px; height: 5px;
  background: #fff; border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Controls — skip back 15s, big play, skip forward 15s */
.dc-reader-controls {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 18px 0 8px;
}
.dc-reader-skip {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: #fff;
  background: none; cursor: pointer;
  font-size: 0.72rem;
  color: var(--slate-400);
  transition: color 0.2s;
}
.dc-reader-skip:hover { color: var(--mint); }
.dc-reader-skip svg { width: 26px; height: 26px; fill: currentColor; }
.dc-reader-skip.left  { justify-self: end; }
.dc-reader-skip.right { justify-self: start; }

.dc-reader-play {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--mint-bright);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  border: none; cursor: pointer;
  box-shadow: 0 0 40px rgba(52,211,153,0.6);
  transition: transform 0.15s, box-shadow 0.2s;
}
.dc-reader-play:hover { transform: scale(1.04); box-shadow: 0 0 50px rgba(52,211,153,0.75); }
.dc-reader-play.playing { background: var(--mint-bright); }

/* Glassmorphism live transcription */
.dc-reader-transcript {
  position: relative;
  margin-top: 22px;
  padding: 22px 22px 18px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-bd);
  border-radius: 18px;
  text-align: left;
}
.dc-reader-transcript-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.dc-live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mint);
  color: var(--bg-deep);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}
.dc-live-badge .dot {
  width: 7px; height: 7px; background: var(--bg-deep); border-radius: 50%;
  animation: dc-pulse 1.6s infinite;
}
@keyframes dc-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50%      { opacity: 1;   transform: scale(1.2); }
}
.dc-reader-transcript .dc-pulse-dots { display: inline-flex; gap: 3px; }
.dc-reader-transcript .dc-pulse-dots span {
  width: 4px; height: 4px; background: var(--mint); border-radius: 50%;
  animation: dc-pulse 1.4s infinite;
}
.dc-reader-transcript .dc-pulse-dots span:nth-child(2) { animation-delay: 0.2s; }
.dc-reader-transcript .dc-pulse-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Transcript body — CAPPED-SIZE window with internal scroll if needed.
   Holds 3 lines of the active cue (EN + RU + FR). The window has a
   comfortable min-height (10rem) for short cues, grows up to a max-height
   (14rem) for medium cues, and gets an internal scroll for very long ones
   — the user never sees cut text, and the layout never explodes to fill
   the page. (Yann, 12 juin 2026 — "le module qui contient les sous-titres
   doit aussi être contenu aux lignes en cours et pas un modal plus gros".) */
#dcReaderTranscriptBody {
  min-height: 10rem;
  max-height: 14rem;
  width: 100%;
  overflow-y: auto;
  padding: 0 4px;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
#dcReaderTranscriptBody::-webkit-scrollbar { display: none; }

/* One cue = 3 stacked lines: EN (audio) → RU → FR. */
.tl-cue {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 100%;
  /* No fixed height — content drives layout. */
}

/* Each line in a cue.
   UNIFORM readability (Yann, 12 juin 2026 — "les trois doivent être de la
   même couleur bien visible") :
   - All 3 lines: solid white #FFFFFF, opacity 1, no dimming.
   - Hierarchy comes from: badge "TRANSCRIPTION EN DIRECT" above + EN chip
     background. The text itself stays uniformly crisp.
   - EN is "stabilisée" via the chip background (see .tl-en below), not via
     opacity tricks. RU and FR stay clean white, same size, no shadows. */
.dc-reader-transcript .tl {
  display: flex; gap: 10px; align-items: baseline;
  padding: 6px 12px;
  border-radius: 10px;
  min-width: 0;
  /* Allow multi-line wrapping without cutoff. */
  overflow: visible;
}
.dc-reader-transcript .tl-en,
.dc-reader-transcript .tl-ru,
.dc-reader-transcript .tl-fr {
  color: #FFFFFF;
  opacity: 1;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 500;
  /* No more -webkit-line-clamp: text wraps freely, nothing is cut. */
}

/* EN chip — Option B (Yann, 12 juin 2026). The active language lives in
   a subtle mint pill so the user always knows what's being spoken RIGHT
   NOW. RU and FR stay clean white outside the chip. The chip background
   is the only hierarchy signal — text color and size stay uniform across
   the 3 lines (per "les trois doivent être de la même couleur bien
   visible"). */
.dc-reader-transcript .tl-en {
  background: rgba(94, 234, 212, 0.18);
  border: 1px solid rgba(94, 234, 212, 0.32);
  font-weight: 600;
}

.dc-reader-transcript .tl-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mint);
  flex-shrink: 0;
  min-width: 32px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* Time label stays mint on all 3 lines — the timestamp is metadata, not
   the active language signal, so it can be uniformly accented. */
.dc-reader-transcript .tl-ru .tl-time,
.dc-reader-transcript .tl-fr .tl-time { color: var(--mint); font-weight: 600; }

.dc-reader-transcript .tl-text {
  line-height: 1.4;
  min-width: 0;
  flex: 1;
  /* Text wraps freely. No clamp, no max-height, no overflow:hidden. */
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.dc-reader-transcript .hl { color: var(--mint); font-weight: 700; }

/* Hide a translation entirely if the user toggled it off */
body.dc-hide-ru .dc-reader-transcript .tl-ru { display: none; }
body.dc-hide-fr .dc-reader-transcript .tl-fr { display: none; }

/* Lang legend — EN is always-on (span), RU and FR are toggle buttons */
.dc-transcript-lang-legend {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.dc-legend-item {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  border: 1px solid rgba(94, 234, 212, 0.25);
  color: var(--slate-300);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: background 0.18s, color 0.18s, border-color 0.18s, opacity 0.18s;
}
.dc-legend-item .dc-legend-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 6px rgba(94, 234, 212, 0.6);
  flex-shrink: 0;
}
.dc-legend-item:hover { opacity: 0.85; }
.dc-legend-item.active {
  background: rgba(94, 234, 212, 0.18);
  color: var(--mint);
  border-color: var(--mint);
}
.dc-legend-item:not(.active) {
  opacity: 0.5;
  border-color: rgba(148, 163, 184, 0.3);
  color: var(--slate-400);
}
.dc-legend-item:not(.active) .dc-legend-dot {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--slate-500);
}

/* When a translation is toggled off, hide its lines in the transcript */
body.dc-hide-ru .dc-reader-transcript .tl-ru { display: none; }
body.dc-hide-fr .dc-reader-transcript .tl-fr { display: none; }

/* Audio element — hidden, we drive everything via UI */
.dc-reader-audio { display: none; }

/* Fullscreen button — in controls bar.
   Position respects the iOS safe-area so it never sits under the notch. */
.dc-reader-fullscreen {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0));
  right: calc(16px + env(safe-area-inset-right, 0));
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(94, 234, 212, 0.12);
  color: var(--mint);
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  transition: background 0.2s, transform 0.15s;
}
.dc-reader-fullscreen:hover { background: rgba(94, 234, 212, 0.22); }
.dc-reader-fullscreen:active { transform: scale(0.92); }

/* Page fullscreen mode — tap on fullscreen button.
   Strategy: the reader is position:fixed with z-index:9999 and an opaque background,
   which visually covers the rest of the page. We do NOT display:none the rest of
   the page (that would cascade and hide the reader too, because position:fixed
   does not escape display:none on an ancestor). */
body.dc-fs-active {
  overflow: hidden;
  display: block !important;
  position: static !important;
}
body.dc-fs-active .dc-reader.dc-fullscreen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  margin: 0;
  border-radius: 0;
  /* iOS fullscreen safe-area — keep content out of notch / home indicator.
     When standalone, the whole screen is ours but the notch + indicator
     still claim their zones. (Yann, 12 juin 2026.) */
  padding: calc(24px + env(safe-area-inset-top, 0))
           calc(20px + env(safe-area-inset-right, 0))
           calc(20px + env(safe-area-inset-bottom, 0))
           calc(20px + env(safe-area-inset-left, 0));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  background: var(--bg-deep);
  overflow: hidden;
  animation: dcFsIn 0.25s ease-out;
  isolation: isolate;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}
body.dc-fs-active .dc-reader.dc-fullscreen > * {
  width: 100%;
  max-width: 520px;
  flex-shrink: 0;
}
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-brand { display: flex; justify-content: center; margin-bottom: 0; gap: 0; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-brand h2,
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-brand .sub { display: none; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-ep-switcher { margin-top: 0; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-cover { width: 96px; height: 96px; font-size: 2.6rem; border-radius: 20px; margin: 4px 0 2px; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-title { font-size: 1.05rem; line-height: 1.2; margin: 0; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-meta { font-size: 0.72rem; line-height: 1.3; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-wave { height: 38px; margin: 2px 0 0; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-progress { margin-top: 2px; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-progress span { font-size: 0.7rem; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-play { width: 56px; height: 56px; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-skip svg { width: 20px; height: 20px; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-skip span { font-size: 0.6rem; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-controls { margin-top: 2px; gap: 8px; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-transcript { margin-top: 4px; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-transcript-head { margin-bottom: 4px; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-live-badge { font-size: 0.6rem; padding: 3px 8px; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-legend-item { font-size: 0.55rem; padding: 2px 6px; }
body.dc-fs-active .dc-reader.dc-fullscreen #dcReaderTranscriptBody {
  /* Fullscreen: same capped behaviour (min 18vh, max 28vh) so the
     transcript stays self-contained and never becomes a giant modal
     that covers the player. */
  min-height: 18vh;
  max-height: 28vh;
  overflow-y: auto;
}
body.dc-fs-active .dc-reader.dc-fullscreen .tl-cue { padding: 3px 4px; }
body.dc-fs-active .dc-reader.dc-fullscreen .tl-en .tl-text { font-size: 0.82rem; }
body.dc-fs-active .dc-reader.dc-fullscreen .tl-ru .tl-text,
body.dc-fs-active .dc-reader.dc-fullscreen .tl-fr .tl-text { font-size: 0.72rem; }
body.dc-fs-active .dc-reader.dc-fullscreen .tl-time { font-size: 0.6rem; }
body.dc-fs-active .dc-reader.dc-fullscreen .dc-reader-fullscreen {
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  background: rgba(94, 234, 212, 0.18);
}
@keyframes dcFsIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Light theme override — same look (reader is always dark) */
[data-theme="light"] .dc-reader { color: #fff; }

/* Mobile */
@media (max-width: 480px) {
  .dc-reader { padding: 28px 18px 24px; border-radius: 22px; }
  .dc-reader-brand h2 { font-size: 2.4rem; }
  .dc-reader-cover { width: 180px; height: 180px; font-size: 5.5rem; }
  .dc-reader-title { font-size: 1.35rem; }
  .dc-reader-wave { height: 90px; }
  .dc-reader-play { width: 70px; height: 70px; font-size: 1.7rem; }
}

/* ── Footer ── */
.dc-footer {
  border-top: 1px solid var(--border);
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--subtext); font-size: 0.75rem;
  display: flex; flex-direction: column; gap: 12px;
  align-items: center;
}
.dc-footer a { color: var(--accent); }
.dc-footer-row { width: 100%; max-width: 600px; }
.dc-footer-row.dc-footer-lang {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 0.7rem; opacity: 0.85;
}
.dc-footer-lang-label { color: var(--subtext); text-transform: lowercase; }

/* Lang toggle (3 mini-pills) */
.dc-lang { display: inline-flex; gap: 4px; }
.dc-lang button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--subtext);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-width: 38px; min-height: 32px;
}
.dc-lang button:hover { border-color: var(--accent); color: var(--text); }
.dc-lang button.active {
  background: var(--accent); color: var(--bg, #0F172A);
  border-color: var(--accent);
}

/* Pills under the player (was in hero, moved 12 juin 2026) */
.dc-pills-under-player {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin: 8px 0 28px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .dc-hero h1 { font-size: 1.9rem; }
  .dc-header { padding: 12px 16px; }
  .dc-nav a { padding: 4px 6px; font-size: 0.78rem; }
  .dc-player { top: 60px; }
}

/* ── Episode switcher (in the player brand row) ── */
.dc-ep-switcher {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  font-family: var(--font-display, system-ui);
}
.dc-ep-nav {
  background: rgba(255,255,255,0.10); color: inherit;
  border: 1px solid rgba(255,255,255,0.18);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.dc-ep-nav:hover:not(:disabled) { background: rgba(255,255,255,0.22); transform: scale(1.06); }
.dc-ep-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.dc-ep-count {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.03em;
  min-width: 36px; text-align: center;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}
.dc-ep-info {
  background: rgba(255,255,255,0.10); color: inherit;
  border: 1px solid rgba(255,255,255,0.18);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-left: 4px;
  transition: background 0.2s, transform 0.1s;
}
.dc-ep-info:hover { background: rgba(255,255,255,0.22); transform: scale(1.06); }

/* ── Episode info modal (overlay, opened from the player) ── */
.dc-ep-info-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: dcEpInfoFade 0.18s ease-out;
}
/* Fix: episode info modal must sit ABOVE the fullscreen reader (z=9999),
   otherwise tapping the ⓘ button from a fullscreen player opens the modal
   hidden behind the reader. (Yann, 12 juin 2026.) */
body.dc-fs-active .dc-ep-info-backdrop { z-index: 10000; }

/* Header — stays sticky on the page EXCEPT in fullscreen player mode
   where it would clutter the immersive view. (Yann, 12 juin 2026.) */
body.dc-fs-active .dc-header { display: none; }
@keyframes dcEpInfoFade { from { opacity: 0; } to { opacity: 1; } }

.dc-ep-info-modal {
  background: var(--card, #fff);
  color: var(--text, #2D3741);
  border-radius: 16px;
  border: 1px solid var(--border, #E2E8F0);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  width: 100%;
  max-width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px 20px 20px;
  position: relative;
  animation: dcEpInfoSlide 0.22s ease-out;
  -webkit-overflow-scrolling: touch;
}
@keyframes dcEpInfoSlide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 480px) {
  .dc-ep-info-modal { padding: 20px 16px 16px; }
  .dc-ep-info-cover-img,
  .dc-ep-info-cover-fallback { width: 96px; height: 96px; font-size: 2.4rem; }
  .dc-ep-info-title { font-size: 1.2rem; }
  .dc-ep-info-desc { font-size: 0.88rem; }
}

.dc-ep-info-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.06); color: inherit;
  font-size: 1.1rem; cursor: pointer; border: none;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.1s;
}
.dc-ep-info-close:hover { background: var(--accent, #1C9673); color: white; transform: rotate(90deg); }

.dc-ep-info-cover {
  display: flex; justify-content: center; margin-bottom: 14px;
}
.dc-ep-info-cover-img {
  width: 120px; height: 120px;
  border-radius: 16px; object-fit: cover;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}
.dc-ep-info-cover-fallback {
  width: 120px; height: 120px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent, #1C9673), var(--gold, #B8860B));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: white;
}

.dc-ep-info-meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px; font-size: 0.78rem; color: var(--subtext, #718096);
  align-items: center;
}
.dc-ep-info-lang {
  padding: 2px 8px; border-radius: 10px;
  font-size: 0.7rem; font-weight: 600; color: white;
}

.dc-ep-info-title {
  font-family: var(--font-display, system-ui);
  font-size: 1.4rem;
  color: var(--accent, #1C9673);
  margin: 6px 0 10px; line-height: 1.2;
}
.dc-ep-info-desc {
  font-size: 0.92rem; line-height: 1.55; margin-bottom: 16px;
  color: var(--text, #2D3741);
}

.dc-ep-info-transcript {
  background: rgba(28,150,115,0.08);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 0;
}
.dc-ep-info-transcript summary {
  cursor: pointer; font-weight: 600; font-size: 0.85rem;
  color: var(--accent, #1C9673); user-select: none;
}
.dc-ep-info-transcript-body {
  margin-top: 10px; max-height: 220px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.dc-ep-info-line {
  display: flex; gap: 10px;
  font-size: 0.82rem; line-height: 1.4;
}
.dc-ep-info-time {
  color: var(--accent, #1C9673); font-weight: 600; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.dc-ep-info-text { color: var(--text, #2D3741); }
