:root {
  --bg: #111321;
  --card: #191d31;
  --card-2: #202640;
  --line: #303755;
  --text: #f5f2eb;
  --muted: #a6acc5;
  --dim: #707996;
  --coral: #ff866f;
  --gold: #f4c36a;
  --mint: #67d9bc;
  --indigo: #8198ff;
  --shadow: 0 24px 70px rgba(0,0,0,.38);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(125,72,100,.35), transparent 64%),
    radial-gradient(850px 520px at 90% 15%, rgba(55,76,145,.28), transparent 68%),
    var(--bg);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: inherit; }
button { font: inherit; }
.hidden { display: none !important; }
.shell { width: min(1500px, 100%); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px calc(34px + env(safe-area-inset-bottom)); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark { font-size: 30px; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .2px; }
.brand small { color: var(--muted); font-size: 11px; }
.status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; border: 1px solid var(--line); background: rgba(25,29,49,.78); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.dot.ok { background: var(--mint); box-shadow: 0 0 0 4px rgba(103,217,188,.12); }
.dot.warn { background: var(--gold); }

.episode-card { overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 410px); grid-template-areas: "intro intro" "video transcript" "player transcript" "chapters transcript"; align-items: start; border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(150deg, rgba(32,38,64,.98), rgba(24,28,47,.98)); box-shadow: var(--shadow); }
.episode-card[data-st-dock-position="left"] { grid-template-columns: clamp(320px, 28vw, 410px) minmax(0, 1fr); grid-template-areas: "intro intro" "transcript video" "transcript player" "transcript chapters"; }
.episode-card[data-st-dock-position="below"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "video" "player" "chapters" "transcript"; }
.episode-intro { grid-area: intro; display: grid; grid-template-columns: 280px 1fr; gap: 34px; align-items: center; padding: 34px; border-bottom: 1px solid var(--line); }
.cover { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 22px; background: linear-gradient(145deg, #41263d, #282b52 58%, #1a3850); box-shadow: 0 20px 44px rgba(0,0,0,.38); isolation: isolate; }
.cover::before, .cover::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; }
.cover::before { width: 240px; height: 240px; right: -94px; top: -84px; box-shadow: 0 0 0 34px rgba(255,255,255,.025), 0 0 0 74px rgba(255,255,255,.018); }
.cover::after { width: 126px; height: 126px; left: -48px; bottom: -42px; box-shadow: 0 0 0 30px rgba(255,255,255,.025); }
.cover-glow { position: absolute; width: 150px; height: 150px; left: 62px; top: 64px; background: rgba(255,134,111,.36); filter: blur(46px); border-radius: 50%; z-index: -1; }
.cover-label { position: absolute; top: 20px; left: 22px; color: rgba(255,255,255,.64); font-size: 10px; font-weight: 750; letter-spacing: 2px; line-height: 1.35; }
.cover-heart { position: absolute; left: 0; right: 0; top: 60px; text-align: center; color: var(--coral); font: 700 92px/1 Georgia, serif; text-shadow: 0 8px 30px rgba(255,92,82,.3); transform: rotate(-5deg); }
.cover-map { position: absolute; left: 0; right: 0; bottom: 52px; text-align: center; color: rgba(255,255,255,.78); font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
.cover-wave { position: absolute; left: 22px; right: 22px; bottom: 22px; height: 18px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.cover-wave i { width: 3px; height: 7px; border-radius: 3px; background: rgba(255,255,255,.58); }
.cover-wave i:nth-child(2), .cover-wave i:nth-child(8) { height: 11px; }
.cover-wave i:nth-child(3), .cover-wave i:nth-child(7) { height: 16px; }
.cover-wave i:nth-child(4), .cover-wave i:nth-child(6) { height: 10px; }
.cover-wave i:nth-child(5) { height: 18px; background: var(--gold); }

.eyebrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.eyebrow span, .eyebrow-label { color: var(--gold); font-size: 11px; font-weight: 750; letter-spacing: 1.3px; text-transform: uppercase; }
.eyebrow span + span::before { content: "·"; margin-right: 8px; color: var(--dim); }
.episode-copy h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; letter-spacing: -1.8px; }
.subtitle { margin: 10px 0 0; color: var(--coral); font-size: 19px; font-weight: 650; }
.description { color: var(--muted); max-width: 580px; margin: 18px 0; }
.episode-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.episode-meta span { color: var(--muted); font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; background: rgba(17,19,33,.42); }

.video-stage { grid-area: video; min-width: 0; padding: 26px 28px 0; background: rgba(14,17,30,.3); }
.video-frame { position: relative; overflow: hidden; border-radius: 18px; background: #090b14; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 16px 44px rgba(0,0,0,.34); }
.video-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #090b14; cursor: pointer; }
.video-frame video:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.video-fullscreen { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; color: #fff; background: rgba(9,11,20,.82); backdrop-filter: blur(8px); cursor: pointer; box-shadow: 0 4px 18px rgba(0,0,0,.28); }
.video-fullscreen:hover, .video-fullscreen:focus-visible { background: rgba(30,35,58,.96); border-color: var(--gold); }
.video-fullscreen:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.video-fullscreen span:first-child { font-size: 20px; line-height: 1; }
.video-fullscreen span:last-child { font-size: 11px; font-weight: 750; letter-spacing: .2px; }
.video-badge { position: absolute; top: 12px; right: 12px; color: rgba(255,255,255,.88); background: rgba(9,11,20,.72); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 700; letter-spacing: .3px; pointer-events: none; }
body.video-expanded { overflow: hidden; }
.video-stage.theater-mode { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 18px; background: #05070d; }
.video-stage.theater-mode .video-frame { width: min(100%, calc(100vh * 16 / 9)); max-height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.video-stage.theater-mode .video-frame video { max-height: calc(100vh - 36px); }
.video-frame:fullscreen, .video-frame:-webkit-full-screen { display: grid; place-items: center; width: 100%; height: 100%; border: 0; border-radius: 0; background: #000; }
.video-frame:fullscreen video, .video-frame:-webkit-full-screen video { width: 100%; max-height: 100vh; }

.player { grid-area: player; min-width: 0; padding: 28px 34px; border-bottom: 1px solid var(--line); background: rgba(14,17,30,.3); }
.now-playing { display: flex; justify-content: space-between; gap: 18px; align-items: baseline; margin-bottom: 14px; }
.now-playing span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; }
.now-playing strong { color: var(--text); font-size: 13px; text-align: right; }
.scrub-track { display: block; width: 100%; height: 9px; border: 0; padding: 0; border-radius: 999px; overflow: hidden; cursor: pointer; background: #0d1020; }
.scrub-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--gold)); }
.times { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: 7px; font-variant-numeric: tabular-nums; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 18px 0 12px; }
.round-control, .play-control, .player-tools button { color: var(--text); cursor: pointer; }
.round-control { position: relative; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: rgba(17,19,33,.62); }
.round-control span { font-size: 25px; line-height: 1; }
.round-control small { position: absolute; inset: 17px 0 auto; font-size: 9px; font-weight: 800; }
.play-control { display: grid; place-items: center; width: 76px; height: 76px; border: 0; border-radius: 50%; background: linear-gradient(145deg, var(--coral), #ffb061); color: #29161a; font-size: 25px; box-shadow: 0 13px 30px rgba(255,134,111,.25); }
.play-control:active, .round-control:active { transform: scale(.96); }
.player-tools { display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.player-tools button { min-width: 46px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; background: transparent; font-size: 12px; }

.chapters-section { grid-area: chapters; min-width: 0; padding: 28px 34px; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head span { color: var(--muted); font-size: 12px; }
.chapters { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.chapter-button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; color: var(--text); text-align: left; cursor: pointer; background: rgba(14,17,30,.34); border: 1px solid transparent; border-radius: 13px; padding: 11px 13px; }
.chapter-button:hover, .chapter-button.active { border-color: rgba(244,195,106,.42); background: rgba(244,195,106,.065); }
.chapter-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--gold); background: rgba(244,195,106,.1); font-size: 11px; font-weight: 800; }
.chapter-title { font-size: 14px; font-weight: 620; }
.chapter-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.transcript-pane { grid-area: transcript; position: sticky; top: 18px; align-self: start; display: flex; flex-direction: column; min-width: 0; height: min(780px, calc(100vh - 36px)); padding: 22px 22px 24px; border-left: 1px solid var(--line); background: linear-gradient(180deg, rgba(12,15,27,.88), rgba(20,24,41,.82)); --st-dock-control-border: var(--line); --st-dock-control-color: var(--muted); --st-dock-control-background: rgba(17,19,33,.72); --st-dock-control-active-color: var(--text); --st-dock-control-active-border: rgba(244,195,106,.55); --st-dock-control-active-background: rgba(244,195,106,.12); --st-dock-control-font-size: 10px; }
.episode-card[data-st-dock-position="left"] .transcript-pane { border-left: 0; border-right: 1px solid var(--line); }
.episode-card[data-st-dock-position="below"] .transcript-pane { position: static; height: min(520px, 58vh); border-top: 1px solid var(--line); border-left: 0; }
.transcript-head { padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.transcript-head h2 { margin: 0; font-size: 18px; }
.transcript-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
#podcastTranscript { flex: 1; color: var(--dim); font-size: 15px; line-height: 1.95; margin: 16px 0 0; padding: 0 9px 40vh 0; scrollbar-color: var(--line) transparent; }
#podcastTranscript.st-transcript { --st-ink: var(--text); --st-past: #a5acc4; --st-dim: var(--dim); --st-highlight: rgba(255,134,111,.20); }
#podcastTranscript .st-word { padding: 1px; }
#podcastTranscript .st-spoken { color: var(--text); background: var(--st-highlight); }

.learn-more { margin-top: 18px; border: 1px solid var(--line); border-radius: 20px; padding: 24px 28px; background: rgba(25,29,49,.75); display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.learn-more h2 { margin: 5px 0 4px; font-size: 20px; }
.learn-more p { margin: 0; color: var(--muted); font-size: 14px; max-width: 640px; }
.learn-actions { display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; text-align: center; }
.primary-link { text-decoration: none; border-radius: 11px; padding: 10px 15px; background: var(--mint); color: #08261f; font-weight: 750; white-space: nowrap; }
.plain-link { color: var(--muted); font-size: 12px; }
footer { display: flex; justify-content: center; gap: 7px; color: var(--muted); font-size: 11px; padding-top: 22px; }
footer a { color: var(--muted); }

@media (max-width: 720px) {
  .shell { padding-left: 14px; padding-right: 14px; }
  .episode-intro { grid-template-columns: 112px 1fr; gap: 18px; padding: 20px; align-items: start; }
  .cover { border-radius: 16px; }
  .cover-label { top: 11px; left: 12px; font-size: 6px; letter-spacing: 1.2px; }
  .cover-heart { top: 29px; font-size: 44px; }
  .cover-map { bottom: 27px; font-size: 5.5px; letter-spacing: .6px; }
  .cover-wave { left: 12px; right: 12px; bottom: 10px; height: 10px; gap: 2px; }
  .cover-wave i { width: 2px; height: 4px; }
  .cover-wave i:nth-child(2), .cover-wave i:nth-child(8) { height: 6px; }
  .cover-wave i:nth-child(3), .cover-wave i:nth-child(7) { height: 9px; }
  .cover-wave i:nth-child(4), .cover-wave i:nth-child(6) { height: 6px; }
  .cover-wave i:nth-child(5) { height: 10px; }
  .episode-copy h1 { font-size: 29px; letter-spacing: -.8px; }
  .subtitle { font-size: 15px; }
  .description { grid-column: 1 / -1; font-size: 13px; margin: 12px 0; }
  .episode-meta { grid-column: 1 / -1; }
  .episode-card, .episode-card[data-st-dock-position="left"], .episode-card[data-st-dock-position="right"], .episode-card[data-st-dock-position="below"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "video" "player" "chapters" "transcript"; }
  .player, .chapters-section, .transcript-pane { padding-left: 20px; padding-right: 20px; }
  .video-stage { padding: 16px 14px 0; }
  .now-playing { display: block; }
  .now-playing strong { display: block; text-align: left; margin-top: 3px; }
  .transcript-pane, .episode-card[data-st-dock-position="left"] .transcript-pane, .episode-card[data-st-dock-position="right"] .transcript-pane { position: static; height: min(520px, 62vh); border-top: 1px solid var(--line); border-left: 0; border-right: 0; }
  .transcript-head.st-dock-head { display: block; }
  .transcript-dock { justify-content: flex-start; margin-top: 10px; }
  .learn-more { display: block; padding: 20px; }
  .learn-actions { margin-top: 18px; }
}

@media (max-width: 420px) {
  .episode-intro { grid-template-columns: 96px 1fr; }
  .episode-copy h1 { font-size: 25px; }
  .episode-meta span:last-child { display: none; }
  .status span:last-child { display: none; }
}
