/* ==========================================================================
   Dead Buttons Theater — Mid-Century Screening Room & Satirical Editorial UI
   Palette derived directly from the series' illustrated frames:
   Deep Pine Slate (#111a19), Archival Cream (#f3ead8), Terracotta (#c9523e),
   Vintage Brass (#d4a656), Forest Teal (#1e564a).
   ========================================================================== */

:root {
  --bg-deep: #0f1716;
  --bg-theater: #152120;
  --bg-elevated: #1c2c2a;
  --bg-chrome: #131d1c;
  --border-subtle: rgba(243, 234, 216, 0.12);
  --border-strong: rgba(243, 234, 216, 0.24);

  --cream: #f3ead8;
  --cream-soft: #e6dac2;
  --cream-muted: #b9ae98;
  --ink-dark: #162221;
  --ink-muted: #495755;

  --terracotta: #a33725;
  --terracotta-bright: #b8422e;
  --brass: #d4a656;
  --teal: #276e5e;
  --teal-light: #44a08b;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-stage: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(243, 234, 216, 0.12);
  --shadow-card: 0 14px 32px rgba(0, 0, 0, 0.35);
  --transition: 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

[x-cloak] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--ink-dark);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-card);
  transition: top 150ms ease;
}

.skip-link:focus {
  top: 0.75rem;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.episode-card a:focus-visible,
.episode-card button:focus-visible,
.toast-card button:focus-visible {
  outline-color: var(--ink-dark);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--cream);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(39, 110, 94, 0.26), transparent 65%),
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(201, 82, 62, 0.12), transparent 60%),
    var(--bg-deep);
  position: relative;
  overflow-x: hidden;
}

/* Subtle archival film grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.035;
  background-image: radial-gradient(rgba(243, 234, 216, 0.8) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.container {
  width: min(1320px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ==========================================================================
   Lights Out Cinema Dimmer
   ========================================================================== */
.lights-out-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 9, 0.9);
  backdrop-filter: blur(6px);
  z-index: 40;
  transition: opacity 300ms ease;
}

body.lights-out-active .hero-stage-shell {
  position: relative;
  z-index: 50;
}

/* ==========================================================================
   Top Navigation & Marquee Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(15, 23, 22, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-emblem {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--terracotta), #973526);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(201, 82, 62, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  flex-shrink: 0;
}

.brand-emblem::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--cream);
  opacity: 0.95;
}

.brand-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--cream);
  line-height: 1.1;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(243, 234, 216, 0.05);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.header-pill:hover {
  background: rgba(243, 234, 216, 0.12);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.header-pill.accent-pill {
  background: rgba(212, 166, 86, 0.14);
  border-color: rgba(212, 166, 86, 0.4);
  color: #f3d293;
}

.header-pill.accent-pill:hover {
  background: rgba(212, 166, 86, 0.24);
}

.dead-btn-trigger {
  background: linear-gradient(180deg, var(--terracotta-bright), var(--terracotta));
  background-color: var(--terracotta);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(163, 55, 37, 0.36);
}

.dead-btn-trigger:hover {
  background: linear-gradient(180deg, var(--terracotta), #8a2c1c);
  background-color: #8a2c1c;
  transform: translateY(-1px);
}

.dead-btn-trigger:active {
  transform: translateY(1px) scale(0.98);
}

.count-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--terracotta);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================================================
   Hero Intro Strip & Viewing Progress Ribbon
   ========================================================================== */
.hero-intro {
  padding: 0.95rem 0 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.3rem;
}

.hero-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--terracotta-bright);
  box-shadow: 0 0 10px var(--terracotta-bright);
}

.hero-headline {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 2.15rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--cream);
  max-width: 34ch;
}

.hero-headline em {
  font-style: italic;
  color: var(--brass);
  font-weight: 600;
}

.progress-card {
  background: rgba(243, 234, 216, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.95rem;
  min-width: 260px;
  max-width: 340px;
  flex: 1 1 260px;
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.progress-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cream-muted);
  font-size: 0.75rem;
}

.progress-count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--cream);
}

.progress-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(243, 234, 216, 0.12);
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-light), var(--brass));
  transition: width 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.resume-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.resume-link-btn:hover {
  text-decoration: underline;
}

.daily-pick-btn {
  background: rgba(39, 110, 94, 0.28);
  border: 1px solid rgba(68, 160, 139, 0.35);
  color: #bce9de;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
}

.daily-pick-btn:hover {
  background: rgba(39, 110, 94, 0.45);
}

/* ==========================================================================
   Widescreen Screening Stage (HTMX Target #screening-stage)
   ========================================================================== */
.hero-stage-shell {
  margin-bottom: 2rem;
}

#screening-stage {
  min-height: 320px;
  scroll-margin-top: 70px;
  transition: opacity 180ms ease;
}

#screening-stage.htmx-swapping {
  opacity: 0.4;
}

.theater-frame {
  width: 100%;
  max-width: min(1160px, calc((100vh - 205px) * 16 / 9));
  max-width: min(1160px, calc((100dvh - 205px) * 16 / 9));
  margin-inline: auto;
  background: var(--bg-theater);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-stage);
  border: 1px solid var(--border-subtle);
  transition: max-width 250ms ease;
}

body.lights-out-active .theater-frame {
  max-width: min(1240px, calc((100vh - 135px) * 16 / 9));
  max-width: min(1240px, calc((100dvh - 135px) * 16 / 9));
}

.meet-chrome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1.05rem;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.meet-chrome-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
}

.meet-cam-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  border-radius: 5px;
  background: var(--cream);
  color: var(--ink-dark);
}

.meet-brand {
  font-weight: 700;
  color: var(--cream);
}

.meet-divider {
  color: var(--cream-muted);
}

.meet-room {
  color: var(--cream-muted);
  font-weight: 500;
}

.meet-chrome-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.rec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--cream-muted);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(243, 234, 216, 0.05);
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--terracotta);
  opacity: 0.55;
}

.rec-indicator.is-playing .rec-dot {
  opacity: 1;
  background: #ff6049;
  box-shadow: 0 0 10px #ff6049;
  animation: recPulse 1.2s ease-in-out infinite;
}

@keyframes recPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.res-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cream-muted);
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.chrome-btn {
  border: 1px solid var(--border-subtle);
  background: rgba(243, 234, 216, 0.06);
  color: var(--cream);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  transition: var(--transition);
}

.chrome-btn:hover,
.chrome-btn.is-active {
  background: var(--brass);
  color: var(--ink-dark);
  border-color: var(--brass);
}

.video-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 205px);
  max-height: calc(100dvh - 205px);
  background: #080d0c;
  overflow: hidden;
}

.widescreen-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #080d0c;
}

/* Caption & Actions Strip under Video */
.stage-caption-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.4rem;
  background: linear-gradient(180deg, #182524, #141f1e);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.stage-caption-main {
  flex: 1 1 420px;
}

.stage-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.badge-ep,
.badge-cat,
.badge-status,
.badge-watched {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
}

.badge-ep {
  background: var(--terracotta);
  color: #ffffff;
}

.badge-cat {
  background: rgba(243, 234, 216, 0.1);
  color: var(--cream);
}

.badge-status {
  background: rgba(212, 166, 86, 0.14);
  color: #f0cf8c;
  border: 1px solid rgba(212, 166, 86, 0.3);
}

.badge-watched {
  background: rgba(68, 160, 139, 0.2);
  color: #8ee5d0;
  border: 1px solid rgba(68, 160, 139, 0.4);
}

.stage-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.15;
}

.stage-tagline {
  margin: 0;
  color: var(--cream-soft);
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 66ch;
}

.stage-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-self: center;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(243, 234, 216, 0.06);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.action-pill:hover {
  background: rgba(243, 234, 216, 0.14);
  border-color: var(--border-strong);
}

.action-pill.is-saved,
.action-pill.is-active {
  background: rgba(212, 166, 86, 0.18);
  border-color: rgba(212, 166, 86, 0.55);
  color: #f6d899;
}

.duration-chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cream-muted);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
}

/* Previous / Next Bar */
.stage-nav-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border-subtle);
  background: #111b1a;
}

.stage-nav-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.25rem;
  border: none;
  background: transparent;
  text-align: left;
  transition: background var(--transition);
}

.stage-nav-btn:hover {
  background: rgba(243, 234, 216, 0.06);
}

.stage-nav-next {
  justify-content: flex-end;
  text-align: right;
  border-left: 1px solid var(--border-subtle);
}

.nav-arrow {
  font-size: 1.2rem;
  color: var(--brass);
  flex-shrink: 0;
}

.nav-meta small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cream-muted);
}

.nav-meta strong {
  display: block;
  font-size: 0.88rem;
  color: var(--cream);
  margin-top: 2px;
}

/* ==========================================================================
   Filter & Search Toolbar
   ========================================================================== */
.controls-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(243, 234, 216, 0.04);
  border: 1px solid var(--border-subtle);
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--cream-muted);
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition);
}

.cat-tab:hover {
  color: var(--cream);
  background: rgba(243, 234, 216, 0.07);
}

.cat-tab.is-active {
  background: var(--cream);
  color: var(--ink-dark);
  border-color: var(--cream);
}

.cat-tab .tab-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.82;
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 230px;
  padding: 0.48rem 0.85rem 0.48rem 2.1rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(10, 16, 15, 0.65);
  color: var(--cream);
  font-size: 0.84rem;
  transition: var(--transition);
}

.search-input::placeholder {
  color: var(--cream-muted);
}

.search-input:focus {
  border-color: var(--brass);
  width: 265px;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--cream-muted);
  pointer-events: none;
  font-size: 0.85rem;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.46rem 0.82rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(243, 234, 216, 0.05);
  color: var(--cream-muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition);
}

.toggle-chip:hover {
  color: var(--cream);
}

.toggle-chip.is-active {
  background: rgba(68, 160, 139, 0.2);
  border-color: rgba(68, 160, 139, 0.5);
  color: #9df0dc;
}

/* ==========================================================================
   Widescreen Episode Gallery (HTMX Target #episode-shelf)
   ========================================================================== */
.shelf-meta-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.shelf-label {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
}

.shelf-count {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--cream-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.45rem;
  margin-bottom: 3.5rem;
}

.episode-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--cream);
  color: var(--ink-dark);
  box-shadow: var(--shadow-card);
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.episode-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.episode-card.is-current {
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(212, 166, 86, 0.25), 0 24px 48px rgba(0, 0, 0, 0.55);
}

.card-poster-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: #0d1413;
  text-align: left;
}

.poster-wrap {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d1413;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), filter 300ms ease;
}

.episode-card:hover .poster-wrap img {
  transform: scale(1.045);
}

.poster-scrim {
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 22, 0.22) 0%, transparent 45%, rgba(15, 23, 22, 0.55) 100%);
  pointer-events: none;
}

.card-ep-chip,
.card-duration-chip,
.card-new-chip,
.card-playing-chip {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  z-index: 2;
  pointer-events: none;
}

.card-ep-chip {
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(15, 23, 22, 0.88);
  color: var(--cream);
  border: 1px solid rgba(243, 234, 216, 0.2);
}

.card-new-chip {
  top: 0.65rem;
  left: 4.9rem;
  background: var(--terracotta);
  color: #fff;
  box-shadow: 0 2px 10px rgba(201, 82, 62, 0.5);
}

.card-duration-chip {
  bottom: 0.65rem;
  right: 0.65rem;
  background: rgba(15, 23, 22, 0.9);
  color: var(--cream);
}

.card-playing-chip {
  bottom: 0.65rem;
  left: 0.65rem;
  background: var(--brass);
  color: var(--ink-dark);
}

.card-play-orb {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%) scale(0.86);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(163, 55, 37, 0.94);
  color: #ffffff;
  display: grid;
  place-items: center;
  opacity: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transition: opacity var(--transition), transform var(--transition);
}

.episode-card:hover .card-play-orb,
.card-poster-btn:focus-visible .card-play-orb {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 1rem 1.15rem 1.05rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.card-room {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--terracotta);
  font-weight: 600;
}

.card-cat {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.card-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.24rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink-dark);
}

.card-title-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
}

.card-title-btn:hover {
  color: var(--terracotta);
}

.card-tagline {
  margin: 0 0 0.9rem;
  font-size: 0.88rem;
  line-height: 1.48;
  color: #364543;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(22, 34, 33, 0.12);
  font-size: 0.76rem;
}

.watched-stamp {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--teal);
}

.unwatched-dot {
  font-family: var(--font-mono);
  color: var(--ink-muted);
}

.card-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(22, 34, 33, 0.18);
  background: rgba(22, 34, 33, 0.04);
  color: var(--ink-dark);
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
}

.card-save-btn:hover {
  background: rgba(22, 34, 33, 0.12);
}

.card-save-btn.is-saved {
  background: var(--ink-dark);
  color: var(--brass);
  border-color: var(--ink-dark);
}

/* Coming Soon / Growing Archive Card */
.coming-soon-card {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(243, 234, 216, 0.03),
      rgba(243, 234, 216, 0.03) 12px,
      rgba(243, 234, 216, 0.06) 12px,
      rgba(243, 234, 216, 0.06) 24px
    ),
    var(--bg-elevated);
  color: var(--cream);
  border: 1px dashed rgba(212, 166, 86, 0.45);
}

.coming-soon-inner {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  gap: 0.9rem;
}

.coming-soon-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coming-soon-top .card-ep-chip {
  position: static;
}

.pending-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--brass);
}

.coming-soon-icon {
  font-size: 2.2rem;
  color: var(--brass);
  line-height: 1;
}

.coming-soon-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--cream);
}

.coming-soon-copy {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--cream-muted);
}

.coming-soon-btn {
  align-self: flex-start;
  border: 1px solid rgba(212, 166, 86, 0.55);
  background: rgba(212, 166, 86, 0.14);
  color: #f6d899;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition);
}

.coming-soon-btn:hover {
  background: var(--brass);
  color: var(--ink-dark);
}

/* ==========================================================================
   Parking Lot Slide-Over Drawer (Saved Watchlist)
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 10, 0.68);
  backdrop-filter: blur(4px);
  z-index: 70;
  display: flex;
  justify-content: flex-end;
}

.drawer-panel {
  width: min(420px, 92vw);
  height: 100%;
  background: var(--bg-theater);
  border-left: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  padding: 1.4rem;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.55);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--cream);
}

.drawer-sub {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--cream-muted);
}

.drawer-close {
  background: rgba(243, 234, 216, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--cream);
}

.drawer-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(243, 234, 216, 0.05);
  border: 1px solid var(--border-subtle);
}

.drawer-thumb {
  width: 96px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.drawer-item-info {
  flex: 1;
  min-width: 0;
}

.drawer-item-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brass);
}

.drawer-item-title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-item-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(243, 234, 216, 0.08);
  font-size: 0.75rem;
  font-weight: 600;
}

.mini-btn.play-mini {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #ffffff;
}

.drawer-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--cream-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ==========================================================================
   Satirical Dead-Button Toast Notification
   ========================================================================== */
.toast-stack {
  position: fixed;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 80;
  max-width: 380px;
}

.toast-card {
  background: var(--cream);
  color: var(--ink-dark);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  border-left: 5px solid var(--terracotta);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.toast-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--terracotta);
  display: block;
  margin-bottom: 0.2rem;
}

.toast-msg {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--ink-muted);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

/* ==========================================================================
   Footer & Keyboard Shortcut Legend
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 0 3rem;
  color: var(--cream-muted);
  font-size: 0.84rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.shortcut-strip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

kbd {
  display: inline-block;
  padding: 0.14rem 0.42rem;
  border-radius: 4px;
  background: rgba(243, 234, 216, 0.1);
  border: 1px solid var(--border-strong);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
body.lights-out-active .video-viewport {
  max-height: calc(100vh - 135px);
  max-height: calc(100dvh - 135px);
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 1.5rem);
  }

  .theater-frame {
    max-width: 100%;
  }

  .video-viewport {
    max-height: none;
  }

  .episode-grid {
    grid-template-columns: 1fr;
  }

  .stage-nav-bar {
    grid-template-columns: 1fr;
  }

  .stage-nav-next {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }

  .search-input,
  .search-input:focus {
    width: 100%;
  }

  .search-box {
    flex: 1 1 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
