:root {
  --bg: #0b0f12;
  --surface: #13191f;
  --surface-2: #1a222a;
  --border: rgba(235, 242, 248, 0.09);
  --border-strong: rgba(235, 242, 248, 0.18);
  --text: #f1f4f7;
  --muted: #98a5b3;
  --accent: #df723c;
  --accent-hover: #ec824d;
  --accent-ink: #120904;
  --accent-soft: rgba(223, 114, 60, 0.15);
  --ok: #38b87c;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --font-head: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(14px, 3vw, 32px); }

/* Header */
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 18, 0.94);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.nav { display: flex; align-items: center; gap: 18px; font-size: 15px; color: var(--muted); }
.nav > a:hover, .nav > a.active { color: var(--text); }
.nav-dd { position: relative; }
.nav-dd-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 2px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-dd-btn:hover, .nav-dd.open .nav-dd-btn, .nav-dd-btn.active { color: var(--text); }
.nav-dd-btn .caret { font-size: 11px; opacity: 0.7; transition: transform 150ms ease; }
.nav-dd.open .nav-dd-btn .caret { transform: rotate(180deg); }
.nav-dd-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -10px;
  min-width: 215px;
  background: #141b22;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 70;
}
.nav-dd.open .nav-dd-menu, .nav-dd:hover .nav-dd-menu { display: flex; }
.nav-dd-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-dd-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  font-size: 14px;
  color: #cdd6df;
  white-space: nowrap;
}
.nav-dd-menu a:hover, .nav-dd-menu a.active { background: var(--surface-2); color: var(--accent); }
.nav-dd-menu a small { font-size: 12px; color: var(--muted); }
.nav-dd-sep { height: 1px; background: var(--border); margin: 4px 6px; }

.theater-lead {
  margin: 8px 0 0;
  font-size: 15px;
  color: #c2ccd7;
  max-width: 78ch;
  line-height: 1.48;
}
.btn-continue {
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-glow, rgba(223, 114, 60, 0.38));
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.btn-continue:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }

/* Mobile quick-nav bar (visible only < 720px) */
.mob-nav {
  display: none;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 20, 25, 0.96);
}
.mob-nav-in {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 34px 8px 14px;
}
.mob-nav-in::-webkit-scrollbar { display: none; }

/* Horizontal scroll wrapper with subtle arrows ‹ / › */
.hscroll-wrap {
  position: relative;
  min-width: 0;
}
.hscroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 32px;
  height: 32px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: rgba(11, 15, 18, 0.94);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  transition: opacity 150ms ease, border-color 150ms ease;
}
.hscroll-arrow:hover { border-color: var(--accent); color: var(--accent); }
.hscroll-arrow.prev { left: 2px; }
.hscroll-arrow.next { right: 2px; }
.hscroll-arrow.is-hidden { opacity: 0; pointer-events: none; }

/* Player source tabs + Lights Off mode */
.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.player-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ptab {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: 150ms ease;
}
.ptab:hover { color: var(--text); border-color: var(--border-strong); }
.ptab.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 700;
}

/* Watched episode mark */
.ep-row.watched .ep-qual { color: var(--ok); font-weight: 700; }

/* Cast horizontal strip & Actors hub/profile */
.cast-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px 8px;
}
.cast-strip::-webkit-scrollbar { display: none; }
.cast-card {
  flex: 0 0 212px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 180ms ease, border-color 180ms ease;
}
.cast-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.cast-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--surface-2);
  overflow: hidden;
}
.cast-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.cast-body {
  padding: 12px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.cast-role { font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--text); }
.cast-actor { font-size: 13px; color: var(--accent); font-weight: 600; }
.cast-bio { margin: 2px 0 0; font-size: 14px; color: #c4ced9; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.actors-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.actors-grid .cast-card { flex: none; width: 100%; }

.actor-profile {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 18px;
}
.actor-photo {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  aspect-ratio: 3 / 4;
  background: var(--surface);
}
.actor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.actor-key-eps { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.actor-ep-chip {
  padding: 7px 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: 150ms ease;
}
.actor-ep-chip:hover { border-color: var(--accent); color: var(--accent); }
.actor-ep-chip span { color: var(--accent); margin-right: 6px; font-family: var(--font-head); }

@media (max-width: 960px) {
  .actors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .actor-profile { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .actor-photo { max-width: 240px; }
}
@media (max-width: 480px) {
  .cast-card { flex: 0 0 176px; }
  .actors-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cast-body { padding: 10px; }
  .cast-role { font-size: 14px; }
  .cast-actor { font-size: 14px; }
  .cast-bio { display: none; }
}

/* Spoiler hide box inside episode descriptions */
.spoiler-box {
  margin: 18px 0;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px solid var(--accent-glow, rgba(223, 114, 60, 0.32));
  border-radius: var(--r-md);
  padding: 13px 16px;
}
.spoiler-box summary {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--spoiler-title, #f4b28d);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.spoiler-box summary::-webkit-scrollbar, .spoiler-box summary::-webkit-details-marker { display: none; }
.spoiler-box summary::after {
  content: 'Показать';
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 99px;
  flex-shrink: 0;
}
.spoiler-box[open] summary::after { content: 'Скрыть'; }
.spoiler-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.spoiler-body p:last-child { margin-bottom: 0; }

/* Table scroll hint on narrow screens */
.table-hint {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 6px;
  font-size: 12px;
  color: var(--muted);
}
.table-hint.is-scrollable { display: flex; }
.table-hint-btns { display: inline-flex; gap: 5px; }
.table-hint-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.table-hint-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Next season & News block */
.next-season-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), rgba(19, 25, 31, 0.98) 65%);
  border: 1px solid var(--accent-glow, rgba(223, 114, 60, 0.34));
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  margin-bottom: 18px;
}
.ns-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 99px;
  margin-bottom: 8px;
}
.next-season-card h3 { margin: 0 0 6px; font-family: var(--font-head); font-size: clamp(18px, 2vw, 22px); }
.next-season-card p { margin: 0; color: #ccd5df; font-size: 14px; line-height: 1.55; }
.ns-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.ns-fact {
  background: rgba(11, 15, 18, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 11px;
}
.ns-fact span { display: block; font-size: 11px; color: var(--muted); }
.ns-fact b { font-family: var(--font-head); font-size: 14px; color: var(--text); }
.notify-box {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), rgba(19, 25, 31, 0.98) 70%);
  border-color: var(--accent-glow, rgba(223, 114, 60, 0.3));
}
.notify-inline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
}
.notify-inline-text strong { display: block; font-size: 15px; color: var(--text); }
.notify-inline-text span { font-size: 13px; color: var(--muted); }
.notify-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.notify-field {
  display: flex;
  flex-direction: column;
  flex: 1 1 220px;
  min-width: 240px;
}
.notify-form input[type="email"] {
  height: 40px;
  width: 100%;
  min-width: 0;
  padding: 0 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.field-error {
  color: #f28b82;
  font-size: 12.5px;
  line-height: 1.35;
  margin-top: 5px;
}
.is-invalid {
  border-color: #f28b82 !important;
}
.notify-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}
.notify-form .btn-ghost { height: 40px; }
.notify-msg {
  width: 100%;
  font-size: 13.5px;
  margin-top: 4px;
  min-height: 0;
}
.notify-msg.ok { color: var(--ok); font-weight: 600; }
.notify-msg.err { color: #f28b82; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.news-date { font-size: 13px; font-weight: 600; color: var(--accent); }
.news-card h3 { margin: 0; font-family: var(--font-head); font-size: 16px; line-height: 1.3; }
.news-card p { margin: 0; font-size: 14px; color: #c4ced9; line-height: 1.52; }

@media (max-width: 820px) {
  .next-season-card { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .ns-facts { grid-template-columns: minmax(0, 1fr); }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
}
.mob-nav a {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
}
.mob-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-glow, rgba(223, 114, 60, 0.42));
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  padding: 16px 0 4px;
  flex-wrap: wrap;
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { opacity: 0.45; }

/* Theater 1st Screen */
.theater { padding: 18px 0 36px; }
.theater-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.theater-head h1 {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.theater-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  border: 1px solid var(--border);
}
.score-chip b { color: var(--accent); }

.voice-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.voice-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.voice-pill {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 150ms ease;
}
.voice-pill:hover { color: var(--text); border-color: var(--border-strong); }
.voice-pill.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 700;
}
.voice-pill small { font-size: 12px; opacity: 0.72; }

.theater-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.theater-grid > *, .details-grid > * { min-width: 0; }

/* Player */
.player-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-width: 0;
}
.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #06090b;
  overflow: hidden;
  cursor: pointer;
}
.player-stage img.stage-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  display: block;
}
.player-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(11, 15, 18, 0.28) 0%, rgba(11, 15, 18, 0.88) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  text-align: center;
}
.ep-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(11, 15, 18, 0.82);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--accent-glow, rgba(223, 114, 60, 0.45));
}
.play-big {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 36px var(--accent-glow, rgba(223, 114, 60, 0.38));
  transition: transform 180ms ease, background 180ms ease;
}
.play-big:hover { transform: scale(1.06); background: var(--accent-hover); }
.player-caption { font-family: var(--font-head); font-size: clamp(16px, 1.8vw, 21px); font-weight: 700; }
.player-hint { font-size: 13px; color: var(--muted); max-width: 46ch; }
.player-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.player-toolbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
}
.nav-eps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-ghost {
  height: 40px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-ghost.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 700;
}
.btn-ghost.primary:hover { background: var(--accent-hover); }
.btn-ghost.disabled { opacity: 0.42; pointer-events: none; }

.player-tools-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vote-btn {
  height: 38px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: border-color 150ms ease, background 150ms ease, transform 120ms ease;
}
.vote-btn .emo { font-size: 15px; line-height: 1; }
.vote-btn:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.vote-btn.voted { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.vote-btn.report-btn { background: transparent; color: var(--muted); font-weight: 500; }
.vote-btn.report-btn:hover { color: var(--text); }

/* Playlist Sidebar */
.playlist {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.playlist-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.playlist-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.playlist-title { margin: 0; font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--text); }
.playlist-count { font-size: 13px; color: var(--muted); }
.season-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.s-btn {
  height: 34px;
  min-width: 68px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.s-btn:hover { color: var(--text); border-color: var(--border-strong); }
.s-btn.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }

.playlist-body { position: relative; }
.playlist-items {
  max-height: 520px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.playlist-more {
  display: none;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(19, 25, 31, 0.6), rgba(19, 25, 31, 0.98));
  cursor: pointer;
}
.playlist-body.has-more .playlist-more { display: block; }
.ep-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: 150ms ease;
}
.ep-row:hover { background: var(--surface-2); }
.ep-row.active { background: var(--accent-soft); border-color: var(--accent-glow, rgba(223, 114, 60, 0.45)); }
.ep-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  background: var(--bg);
  padding: 4px 0;
  border-radius: 5px;
}
.ep-row.active .ep-num { background: var(--accent); color: var(--accent-ink); }
.ep-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-qual { font-size: 11px; color: var(--muted); }

/* Ad Slot (VideoRoll / custom) */
.ad-slot { margin: 20px 0; display: flex; justify-content: center; }

/* Season Matrix (Voice × Season quick map from Variant D) */
.section-block { padding: 32px 0; border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-family: var(--font-head); font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; }
.section-head span { font-size: 14px; color: var(--muted); }

.seasons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.season-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
  display: flex;
  flex-direction: column;
}
.season-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.season-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.season-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.season-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(11, 15, 18, 0.82);
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--accent-glow, rgba(223, 114, 60, 0.35));
}
.season-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.season-body h3 { margin: 0; font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.season-body p { margin: 0; font-size: 13px; color: var(--muted); }

/* Episodes Cards Grid (Season & Voice pages) */
.episodes-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ep-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 14px;
  transition: border-color 150ms ease, background 150ms ease;
}
.ep-card:hover { border-color: var(--accent); background: var(--surface-2); }
.ep-card-code {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 10px 6px;
  border-radius: var(--r-sm);
  text-align: center;
}
.ep-card-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.ep-card-desc { font-size: 14px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-card-go { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* Voice Availability Matrix */
.voice-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.vm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vm-name { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.vm-name:hover { color: var(--accent); }
.vm-cnt { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: 99px; }
.vm-seasons { display: flex; flex-wrap: wrap; gap: 6px; }
.vm-s {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}
.vm-s:hover { border-color: var(--accent); color: var(--accent); }

/* Editorial Content & Passport */
.details-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.details-passport-head {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}
.details-passport-head .meta-list {
  margin-bottom: 0;
  align-content: center;
}
.poster-box {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 2 / 3;
  background: var(--surface);
}
.poster-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin-bottom: 22px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
}
.meta-k { color: var(--muted); display: block; font-size: 12px; }
.meta-v { color: var(--text); font-weight: 600; }

/* Editorial styled cards for rich text sections */
.prose { max-width: 78ch; }
.prose.prose-wide { max-width: none; }
.prose h2 {
  font-family: var(--font-head);
  font-size: clamp(20px, 2vw, 24px);
  margin: 28px 0 12px;
  line-height: 1.25;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--font-head); font-size: 18px; margin: 20px 0 8px; }
.prose p { margin: 0 0 14px; color: #ccd5df; line-height: 1.65; }
.prose ul { margin: 0 0 16px; padding-left: 20px; color: #ccd5df; }
.prose li { margin-bottom: 8px; }
.prose a:not(.voice-pill):not(.actor-ep-chip):not(.btn-ghost) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.editorial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.editorial-card.warn-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent), rgba(19, 25, 31, 0.98) 65%);
  border-color: var(--accent-glow, rgba(223, 114, 60, 0.28));
}
.editorial-card > h2:first-child { margin-top: 0; }
.editorial-card > p:last-child, .editorial-card > ul:last-child, .editorial-card > .info-grid-2:last-child { margin-bottom: 0; }
.info-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 8px;
}
.info-tile {
  background: rgba(11, 15, 18, 0.58);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 15px;
}
.info-tile strong { display: block; font-family: var(--font-head); font-size: 15px; color: var(--text); margin-bottom: 5px; }
.info-tile p { margin: 0; font-size: 14px; color: #c4ced9; line-height: 1.5; }

/* Episode lower 2-col layout (matches player + playlist grid above!) */
.episode-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}
.ep-side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ep-side-card h3 { margin: 0; font-family: var(--font-head); font-size: 16px; }
.ep-specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.ep-specs dt { color: var(--muted); }
.ep-specs dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; }
.ep-side-links { display: flex; flex-direction: column; gap: 7px; padding-top: 10px; border-top: 1px solid var(--border); }
.ep-side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.ep-side-link:hover { border-color: var(--accent); color: var(--accent); }

.voice-ep-specs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.voice-ep-specs div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.voice-ep-specs dt { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.voice-ep-specs dd { margin: 0; font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--text); }

/* Branded 404 */
.not-found-box {
  max-width: 680px;
  margin: 40px auto 56px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  text-align: center;
}
.not-found-code { font-family: var(--font-head); font-size: 56px; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.not-found-box h1 { margin: 0 0 10px; font-family: var(--font-head); font-size: 26px; }
.not-found-box p { margin: 0 0 22px; color: var(--muted); }
.not-found-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.prose th { text-align: left; padding: 11px 12px; background: var(--surface-2); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.prose td { padding: 11px 12px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
.prose tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 18px; }
.faq-item summary { font-family: var(--font-head); font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 12px 0 0; color: #ccd5df; font-size: 15px; line-height: 1.6; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 14px;
}
.footer-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }
.footer-legal {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(152, 165, 179, 0.78);
}
.footer-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal a:hover { color: var(--accent); }

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 55;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(19, 25, 31, 0.92);
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, border-color 150ms ease, color 150ms ease;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}
@media (max-width: 720px) {
  .back-to-top { right: 14px; bottom: 16px; width: 40px; height: 40px; }
}

/* Modal for Report Issue */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 11, 0.82);
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  max-width: 420px;
  width: 100%;
  padding: 22px;
}
.modal-box h3 { margin: 0 0 14px; font-family: var(--font-head); font-size: 18px; }
.modal-box label { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 14px; cursor: pointer; }
.modal-box textarea { width: 100%; min-height: 70px; margin: 10px 0 14px; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg); color: var(--text); font-family: inherit; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 1040px) {
  .theater-grid { grid-template-columns: minmax(0, 1fr); }
  .episode-lower-grid { grid-template-columns: minmax(0, 1fr); }
  .seasons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .topbar { height: 54px; }
  .nav { display: none; }
  .mob-nav { display: block; }
  .brand { font-size: 15px; gap: 7px; }
  .btn-continue { height: 34px; padding: 0 10px; font-size: 13px; }
  .btn-continue .cont-prefix { display: none; }
  .theater { padding: 12px 0 24px; }
  .theater-head { margin-bottom: 10px; }
  .theater-head h1 { font-size: 21px; line-height: 1.2; }
  .theater-lead { font-size: 14px; margin-top: 6px; }
  .theater-sub { font-size: 14px; gap: 7px; margin-top: 6px; }
  .voice-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 10px;
    padding-bottom: 2px;
  }
  .voice-bar::-webkit-scrollbar { display: none; }
  .voice-label { display: none; }
  .voice-pill { flex-shrink: 0; white-space: nowrap; height: 34px; font-size: 13px; padding: 0 11px; }
  .play-big { width: 54px; height: 54px; }
  .play-big svg { width: 22px; height: 22px; }
  .player-vignette { gap: 8px; padding: 12px; }
  .ep-tag { font-size: 11px; padding: 3px 10px; }
  .player-caption { font-size: 15px; }
  .player-hint { display: none; }
  .player-toolbar { padding: 10px 12px; gap: 10px; }
  .nav-eps {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }
  .nav-eps .btn-ghost { justify-content: center; height: 42px; padding: 0 8px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .player-tools-right { width: 100%; justify-content: space-between; gap: 6px; }
  .vote-btn { flex: 1 1 auto; justify-content: center; height: 38px; padding: 0 8px; font-size: 13px; }
  .playlist-items { max-height: 320px; }
  .season-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .s-btn { min-width: 0; padding: 0 4px; font-size: 12px; }
  .section-block { padding: 24px 0; }
  .episodes-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .details-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .details-passport-head {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }
  .details-passport-head .poster-box { width: 108px; max-width: 108px; }
  .details-passport-head .meta-list { margin-bottom: 0; padding: 12px; gap: 8px; grid-template-columns: minmax(0, 1fr); }
  .editorial-card { padding: 16px; }
  .info-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .voice-ep-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-list { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px; }
  .voice-matrix { grid-template-columns: minmax(0, 1fr); }
  .footer-legal { font-size: 14px; }
}
@media (max-width: 480px) {
  .seasons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .season-body { padding: 10px; gap: 3px; }
  .season-body h3 { font-size: 14px; line-height: 1.25; }
  .season-body p { font-size: 12px; }
  .season-badge { top: 6px; left: 6px; padding: 2px 6px; font-size: 10px; }
  .ep-card { grid-template-columns: 52px minmax(0, 1fr); padding: 11px 12px; gap: 10px; }
  .ep-card-title { font-size: 15px; }
  .ep-card-go { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
