/* Episode player: opens over the page when an episode thumbnail is pressed,
   so every episode is one press away. Shared by the homepage and /watch/.
   The markup is created by assets/episodes.js. */
html.pd-lock { overflow: hidden; }
.pd { box-sizing: border-box; padding: 0; margin: auto; width: min(1120px, calc(100vw - 48px), calc((100dvh - 360px) * 16 / 9)); min-width: min(640px, calc(100vw - 48px)); max-width: 100vw; max-height: calc(100dvh - 48px); overflow: auto; background: var(--black, #0A0A0A); color: var(--white, #F2F0ED); border: 1px solid rgba(184,146,42,0.22); box-shadow: 0 40px 120px rgba(0,0,0,0.7); font-family: 'Barlow', sans-serif; }
.pd *, .pd *::before, .pd *::after { box-sizing: border-box; }
.pd::backdrop { background: rgba(5,5,5,0.9); backdrop-filter: blur(6px); }
.pd[open] { animation: pdIn 0.35s cubic-bezier(0.16,1,0.3,1); }
@keyframes pdIn { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }

.pd-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 14px 12px 24px; border-top: 2px solid var(--gold, #B8922A); }
.pd-kicker { margin: 0; font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-light, #D4A840); }
.pd-close { flex-shrink: 0; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; background: transparent; border: 1px solid rgba(242,240,237,0.24); color: var(--white, #F2F0ED); font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; cursor: pointer; transition: border-color 0.25s, color 0.25s; }
.pd-close:hover { border-color: var(--gold, #B8922A); color: var(--gold-light, #D4A840); }

.pd-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pd-frame iframe, .pd-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
/* The trailer is vertical: size it by height so it fits any screen */
.pd.is-vertical { width: min(480px, calc(100vw - 24px)); }
.pd.is-vertical .pd-frame { aspect-ratio: 9 / 16; height: min(68dvh, 720px); width: auto; max-width: 100%; margin: 0 auto; }

.pd-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; padding: 22px 26px 26px; }
.pd.is-vertical .pd-info { grid-template-columns: 1fr; padding: 20px 22px 24px; }
.pd-title { margin: 0 0 10px; font-family: 'Playfair Display', serif; font-size: clamp(24px, 2.4vw, 34px); font-weight: 900; line-height: 1.12; color: var(--white, #F2F0ED); }
.pd-meta { margin: 0 0 14px; font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey-pale, #C8C8C8); }
.pd-hook { margin: 0; max-width: 560px; font-size: 16px; font-weight: 300; line-height: 1.7; color: var(--grey-pale, #C8C8C8); }
.pd-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.pd.is-vertical { min-width: 0; }
.pd.is-vertical .pd-actions { justify-content: flex-start; }
.pd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: var(--white, #F2F0ED); background: rgba(255,255,255,0.04); border: 1px solid rgba(242,240,237,0.24); cursor: pointer; transition: border-color 0.25s, color 0.25s, background 0.25s; }
.pd-btn:hover { border-color: var(--gold, #B8922A); color: var(--gold-light, #D4A840); }
.pd-next { background: var(--gold, #B8922A); border-color: var(--gold, #B8922A); color: var(--black, #0A0A0A); }
.pd-next:hover { background: var(--gold-light, #D4A840); border-color: var(--gold-light, #D4A840); color: var(--black, #0A0A0A); }
.pd-btn[hidden], .pd-meta[hidden], .pd-hook[hidden] { display: none; }

.pd :focus-visible { outline: 2px solid var(--gold-light, #D4A840); outline-offset: 3px; }
.pd .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 900px) {
  .pd-info { grid-template-columns: 1fr; }
  .pd-actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .pd { width: 100vw; min-width: 0; max-height: 100dvh; border-left: 0; border-right: 0; }
  .pd-bar { padding: 8px 10px 8px 16px; }
  .pd-info { padding: 20px 18px 24px; }
  .pd-actions .pd-btn { flex: 1 1 140px; }
  .pd-actions .pd-next { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pd[open] { animation: none; }
  .pd-btn, .pd-close { transition: none; }
}
