/* ============================================================
   SOYBU STREAM — "warm noir"
   A cinema-poster-first interface: near-black canvas, warm ivory
   type, one gold accent. Colour belongs to the artwork, not the UI.
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-raise: #101013;
  --surface: #16161a;
  --surface-2: #1d1d22;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #f5f2ea;
  --muted: #a29c92;
  --faint: #6f6a62;

  --gold: #e8b54b;
  --gold-dim: #c9973a;
  --gold-soft: rgba(232, 181, 75, 0.12);
  --gold-line: rgba(232, 181, 75, 0.42);

  --r-card: 12px;
  --r-btn: 10px;
  --nav-h: 72px;
  --max: 1560px;
  --shadow: 0 30px 70px rgba(0, 0, 0, 0.62);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable Display", "Segoe UI", Inter, -apple-system,
    BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img { display: block; }

::selection { background: var(--gold); color: #12110e; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--gold); color: #12110e; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 700;
}
.skip:focus { left: 0; top: 0; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(22px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.stuck {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; height: 100%;
  padding: 0 36px;
  display: flex; align-items: center; gap: 40px;
}

.logo { display: flex; align-items: center; gap: 11px; flex: none; }
.logo-mark {
  width: 27px; height: 27px; border-radius: 7px; position: relative;
  background: linear-gradient(150deg, #f0c767, var(--gold-dim));
  box-shadow: 0 0 0 1px rgba(232, 181, 75, 0.28), 0 6px 20px rgba(232, 181, 75, 0.22);
}
.logo-mark::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 7px solid #12110e;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translateX(1px);
}
.logo-text {
  font-size: 14px; font-weight: 800;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.logo-text em {
  font-style: normal; font-weight: 400;
  color: var(--faint); letter-spacing: 0.2em;
}

.nav-links { display: flex; gap: 30px; font-size: 13.5px; }
.nav-links a {
  position: relative; padding: 7px 0;
  color: var(--muted); font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 600; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1.5px; background: var(--gold); border-radius: 2px;
}

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- search + controls ---------- */
.search {
  display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  width: 230px;
  transition: width 0.3s var(--ease), border-color 0.2s ease, background 0.2s ease;
}
.search:focus-within {
  width: 300px;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--gold-line);
}
.search input {
  background: none; border: 0; outline: 0; width: 100%;
  color: var(--text); font-size: 13.5px;
}
.search input::placeholder { color: var(--faint); }
.search-ico {
  width: 13px; height: 13px; flex: none; position: relative;
  border: 1.6px solid var(--faint); border-radius: 50%;
}
.search-ico::after {
  content: ""; position: absolute; right: -4px; bottom: -3px;
  width: 6px; height: 1.6px; background: var(--faint);
  transform: rotate(45deg); border-radius: 2px;
}

.key-btn, .theme-btn {
  height: 38px; border-radius: var(--r-btn);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: all 0.2s ease; flex: none;
}
.key-btn {
  padding: 0 13px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.key-btn:hover, .theme-btn:hover { color: var(--text); border-color: var(--line-strong); }
.key-btn.on {
  color: var(--gold); border-color: var(--gold-line);
  background: var(--gold-soft);
}
.theme-btn {
  width: 38px; display: grid; place-items: center;
  font-size: 15px; line-height: 1;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 24px;
  border-radius: var(--r-btn); border: 1px solid transparent;
  font-size: 14px; font-weight: 650; letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.16s var(--ease), background 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.975); }
.btn-primary {
  background: var(--gold); color: #12110e;
  box-shadow: 0 10px 28px rgba(232, 181, 75, 0.24);
}
.btn-primary:hover {
  background: #f2c463;
  box-shadow: 0 14px 36px rgba(232, 181, 75, 0.34);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); }
.btn-ghost.on { border-color: var(--gold-line); color: var(--gold); }
.btn.small { height: 38px; padding: 0 16px; font-size: 12.5px; }

.icon-btn {
  width: 46px; height: 46px; flex: none;
  border-radius: var(--r-btn);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--text); font-size: 18px; line-height: 1;
  display: grid; place-items: center;
  transition: all 0.18s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }
.icon-btn.on { color: var(--gold); border-color: var(--gold-line); }
.tri {
  width: 0; height: 0;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: clamp(520px, 84vh, 880px);
  overflow: hidden;
  isolation: isolate;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.hero-slide.active { opacity: 1; visibility: visible; }

.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg .art-img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  transition: transform 9s linear;
}
.hero-slide.active .hero-bg .art-img { transform: scale(1.12); }

.hero-veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg,
      var(--bg) 0%,
      color-mix(in srgb, var(--bg) 88%, transparent) 26%,
      color-mix(in srgb, var(--bg) 42%, transparent) 58%,
      transparent 88%),
    linear-gradient(0deg,
      var(--bg) 2%,
      color-mix(in srgb, var(--bg) 72%, transparent) 22%,
      transparent 62%);
}

.hero-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: var(--max); margin: 0 auto;
  padding: 0 36px 84px;
}
.hero-content { max-width: 660px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--gold);
  opacity: 0.7;
}

.hero h1 {
  font-size: clamp(40px, 5.4vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.042em;
  font-weight: 800;
  margin-bottom: 20px;
  text-wrap: balance;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.hero-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 9px; font-size: 13px; color: var(--muted);
  margin-bottom: 18px;
}
.hero-meta .dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: 0.5;
}
.rating-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 5px; border: 1px solid var(--gold-line);
  background: var(--gold-soft);
  color: var(--gold); font-size: 11.5px; font-weight: 700;
}
.tag-pill {
  height: 22px; padding: 0 8px;
  display: inline-flex; align-items: center;
  border-radius: 5px; border: 1px solid var(--line-strong);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--muted);
}

.hero-copy {
  font-size: 15.5px; line-height: 1.72;
  color: #cfc9bf; max-width: 56ch;
  margin-bottom: 30px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.hero-dots {
  position: absolute; right: 36px; bottom: 46px;
  display: flex; gap: 8px; z-index: 3;
}
.dot-btn {
  width: 44px; height: 3px; padding: 0; border: 0;
  background: rgba(255, 255, 255, 0.2);
  position: relative; overflow: hidden;
  transition: background 0.2s ease;
}
.dot-btn:hover { background: rgba(255, 255, 255, 0.36); }
.dot-btn.on { background: rgba(255, 255, 255, 0.26); }
.dot-btn.on::after {
  content: ""; position: absolute; inset: 0;
  background: var(--gold);
  transform-origin: left;
  animation: heroFill 9s linear forwards;
}
@keyframes heroFill { from { transform: scaleX(0) } to { transform: scaleX(1) } }

/* Trailer preview. An iframe can't object-fit, so give it a 16:9 element
   box that always covers the hero (hero is viewport-wide and <= 100vh tall),
   centered and cropped by the hero's overflow:hidden. Sits above the
   backdrop .art-img (z 2) so the poster shows until the video starts. */
.hero-bg .hero-trailer {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, 177.78vh);
  height: max(56.25vw, 100vh);
  border: 0;
  background: #000;
  z-index: 3;
  pointer-events: none;
}
.hero-mute {
  position: absolute; right: 36px; bottom: 66px; z-index: 4;
  width: 42px; height: 42px; border-radius: 50%; font-size: 16px;
}

/* ---------- page shell ---------- */
.page {
  max-width: var(--max); margin: 0 auto;
  padding: 8px 36px 100px;
}
.page-top { padding-top: 52px; }
.page-head { margin-bottom: 30px; }
.page-head h1 {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.038em; font-weight: 800;
  margin-bottom: 10px;
}
.muted { color: var(--muted); font-size: 14px; }
.empty {
  color: var(--muted); font-size: 14.5px;
  padding: 60px 0; grid-column: 1 / -1; text-align: center;
}

/* ---------- rows ---------- */
.row { margin-bottom: 54px; }
.row:first-child { margin-top: 40px; }
.row-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.row-head h2 {
  font-size: 17px; font-weight: 700;
  letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 12px;
}
.row-head h2::before {
  content: ""; width: 3px; height: 15px;
  background: var(--gold); border-radius: 2px;
}
.row-arrows { display: flex; gap: 6px; }
.arrow {
  width: 30px; height: 30px; padding: 0;
  border-radius: 7px;
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); font-size: 15px; line-height: 1;
  display: grid; place-items: center;
  transition: all 0.18s ease;
}
.arrow:hover {
  color: var(--text); border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

.rail {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(150px, 13vw, 208px);
  gap: 18px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 14px;
  margin: 0 -2px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { height: 0; }

/* ---------- poster card ---------- */
.card { scroll-snap-align: start; display: block; }

.card-art {
  position: relative; aspect-ratio: 2 / 3;
  border-radius: var(--r-card); overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease,
    border-color 0.35s ease;
}
.card:hover .card-art {
  transform: translateY(-6px);
  border-color: var(--gold-line);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.6);
}
.card-art .art-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.55s var(--ease), filter 0.35s ease;
}
.card:hover .card-art .art-img { transform: scale(1.06); filter: brightness(0.82); }

.card-art::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0; transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover .card-art::after { opacity: 1; }

.play-fab {
  position: absolute; z-index: 3;
  left: 50%; top: 50%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0; transform: scale(0.7);
  transition: opacity 0.26s ease, transform 0.26s var(--ease);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.play-fab::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0;
  border-left: 12px solid #12110e;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  transform: translateX(2px);
}
.card:hover .play-fab { opacity: 1; transform: scale(1); }

/* continue-watching progress line, inside the poster frame */
.resume-track {
  position: absolute; z-index: 3;
  left: 10px; right: 10px; bottom: 9px;
  height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.26);
  overflow: hidden; pointer-events: none;
}
.resume-bar {
  display: block; height: 100%; border-radius: inherit;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(232, 181, 75, 0.55);
}

.rate {
  position: absolute; z-index: 2; top: 8px; right: 8px;
  height: 21px; padding: 0 7px;
  display: inline-flex; align-items: center; gap: 3px;
  border-radius: 5px;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gold); font-size: 10.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card-meta { padding: 11px 1px 0; }
.card-title {
  font-size: 13.5px; font-weight: 600; line-height: 1.35;
  letter-spacing: -0.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-sub {
  font-size: 11.5px; color: var(--faint); margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* ---------- ranked rail ---------- */
.rail-rank {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(250px, 23vw, 330px);
  gap: 6px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 14px; margin: 0 -2px;
  scrollbar-width: none;
}
.rail-rank::-webkit-scrollbar { height: 0; }

.rank-card {
  display: flex; align-items: center;
  height: clamp(196px, 17.5vw, 264px);
  scroll-snap-align: start;
  position: relative;
}
.rank-num {
  flex: none;
  font-size: clamp(136px, 15vw, 208px);
  font-weight: 900;
  line-height: 0.7;
  letter-spacing: -0.09em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(245, 242, 234, 0.2);
  margin-right: -26px;
  user-select: none;
  transition: -webkit-text-stroke-color 0.3s ease, transform 0.3s var(--ease);
  z-index: 0;
}
.rank-card:hover .rank-num {
  -webkit-text-stroke-color: rgba(232, 181, 75, 0.65);
  transform: translateX(-4px);
}
.rank-art {
  position: relative; z-index: 1;
  height: 100%; aspect-ratio: 2 / 3; flex: none;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.3s ease, transform 0.3s var(--ease),
    box-shadow 0.3s ease;
}
.rank-card:hover .rank-art {
  border-color: var(--gold-line);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.rank-art .art-img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- grid + filters ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 30px 18px;
}

.filters {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  height: 33px; padding: 0 15px;
  border-radius: var(--r-btn);
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; font-weight: 500;
  transition: all 0.18s ease;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.on {
  background: var(--gold); border-color: var(--gold);
  color: #12110e; font-weight: 650;
}
.filter-right { margin-left: auto; display: flex; gap: 8px; }
.select {
  height: 34px; padding: 0 30px 0 13px;
  border-radius: var(--r-btn);
  background-color: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--text); font-size: 12.5px;
  outline: none; cursor: pointer;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--faint) 50%),
    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.select:focus { border-color: var(--gold-line); }
.more-wrap { display: flex; justify-content: center; padding: 46px 0 6px; }
.more-wrap .btn { min-width: 190px; }

/* ---------- detail ---------- */
.detail {
  position: relative; isolation: isolate;
  overflow: hidden; padding-bottom: 24px;
}
.detail-bg { position: absolute; inset: 0; z-index: -2; }
.detail-bg .art-img {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(6px) brightness(0.5) saturate(1.1);
  transform: scale(1.08);
}
.detail .hero-veil {
  background:
    linear-gradient(90deg, var(--bg) 4%,
      color-mix(in srgb, var(--bg) 78%, transparent) 42%, transparent 92%),
    linear-gradient(0deg, var(--bg) 3%,
      color-mix(in srgb, var(--bg) 64%, transparent) 30%, transparent 78%);
}

.detail-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 80px 36px 64px;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 56px; align-items: start;
}
.detail-art {
  position: relative; aspect-ratio: 2 / 3;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.detail-art .art-img { width: 100%; height: 100%; object-fit: cover; }

.detail-body h1 {
  font-size: clamp(32px, 4.2vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.042em;
  font-weight: 800;
  margin-bottom: 18px;
  text-wrap: balance;
}
.detail-copy {
  font-size: 15px; line-height: 1.78;
  color: #c8c2b8; max-width: 64ch;
  margin: 20px 0 30px;
}
.detail-body .hero-actions { margin-bottom: 6px; }

/* ---------- episodes ---------- */
.season-block { margin: 12px 0 56px; }
.season-block .row-head { align-items: center; }
.season-block .row-head h2::before { display: none; }
.season-block .row-head h2 { font-size: 18px; }

.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 10px;
}
.ep-card {
  display: flex; gap: 15px; padding: 10px;
  border-radius: var(--r-card);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.028);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}
.ep-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  transform: translateX(3px);
}
.ep-still {
  position: relative; flex: none;
  width: 132px; aspect-ratio: 16 / 9;
  border-radius: 8px; overflow: hidden;
  background: var(--surface-2);
}
.ep-still img { width: 100%; height: 100%; object-fit: cover; }
.ep-still .ep-num {
  position: absolute; left: 6px; top: 6px;
  min-width: 20px; padding: 2px 5px;
  border-radius: 4px; text-align: center;
  background: rgba(8, 8, 10, 0.75);
  backdrop-filter: blur(6px);
  color: var(--gold); font-size: 10px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ep-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.ep-text .ep-name {
  font-size: 13.5px; font-weight: 650; line-height: 1.32;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-meta {
  font-size: 11.5px; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.ep-overview {
  font-size: 12px; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- watch ---------- */
.watch-shell { background: #000; }
.player-wrap {
  background: #000;
  display: flex; justify-content: center;
  border-bottom: 1px solid var(--line);
}
.player-frame {
  position: relative; width: 100%; max-width: 1600px;
  aspect-ratio: 16 / 9; background: #000; overflow: hidden;
}
.player-frame::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: var(--bg);
  background-size: cover; background-position: center;
  opacity: 0.4; filter: blur(3px) saturate(1.1);
}
.player-loading {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 15px; pointer-events: none;
}
.pl-ring {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--gold);
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.pl-text {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.6);
}
.player-frame iframe {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; border: 0;
}

.player-bar {
  max-width: var(--max); margin: 0 auto;
  padding: 24px 36px 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  background: #000;
}
.watch-title {
  font-size: clamp(19px, 2.3vw, 28px);
  font-weight: 750; letter-spacing: -0.028em;
  margin-bottom: 7px;
}
.watch-sub {
  font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.watch-actions { display: flex; gap: 10px; }

.player-extra {
  max-width: var(--max); margin: 0 auto;
  padding: 26px 36px 40px;
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.srv-block { margin-bottom: 20px; }
.srv-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 11px;
}
.srv-row { display: flex; flex-wrap: wrap; gap: 7px; }
.srv {
  height: 34px; padding: 0 15px;
  border-radius: var(--r-btn);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; font-weight: 600;
  transition: all 0.18s ease;
}
.srv:hover { color: var(--text); border-color: var(--line-strong); }
.srv.on {
  background: var(--gold-soft);
  border-color: var(--gold-line);
  color: var(--gold);
}

.eps-inline { display: flex; flex-wrap: wrap; gap: 6px; }
.eps-inline .ep {
  min-width: 38px; height: 34px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: all 0.16s ease;
}
.eps-inline .ep:hover { color: var(--text); border-color: var(--line-strong); }
.eps-inline .ep.on {
  background: var(--gold); border-color: var(--gold);
  color: #12110e; font-weight: 700;
}
.srv-hint {
  font-size: 12px; color: var(--faint);
  line-height: 1.65; max-width: 74ch;
}

/* ---------- artwork fallback ---------- */
.art {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(110% 90% at 24% 2%, hsl(var(--h) 62% 40%) 0%, transparent 58%),
    radial-gradient(95% 85% at 88% 90%, hsl(calc(var(--h) + 42) 68% 34%) 0%, transparent 62%),
    linear-gradient(158deg, hsl(var(--h) 36% 16%), hsl(calc(var(--h) + 22) 42% 8%));
}
.art::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(125% 120% at 50% 0%, transparent 45%, rgba(0, 0, 0, 0.34) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0.34) 100%);
}
.art-grain {
  position: absolute; inset: -40%; z-index: 1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 0.5px, transparent 0.5px);
  background-size: 4px 4px; opacity: 0.14;
  transform: rotate(8deg);
}
.art-mark {
  position: absolute; right: 8%; bottom: -4%; z-index: 1;
  font-size: clamp(30px, 3vw, 44px); font-weight: 900;
  letter-spacing: -0.03em; line-height: 1;
  color: rgba(255, 255, 255, 0.2);
  user-select: none;
}
.art.v2 .art-mark { right: auto; left: 8%; }
.art.v3 .art-mark { bottom: auto; top: -3%; right: 6%; opacity: 0.6; }
.art-img {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
}

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 24px;
  background: rgba(6, 6, 8, 0.78);
  backdrop-filter: blur(10px);
  animation: fade 0.2s ease both;
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.modal-card {
  width: 100%; max-width: 470px;
  background: var(--bg-raise);
  border: 1px solid var(--line-strong);
  border-radius: 16px; padding: 30px;
  box-shadow: var(--shadow);
  animation: rise 0.3s var(--ease) both;
}
.modal-card h2 {
  font-size: 21px; font-weight: 750;
  letter-spacing: -0.028em; margin-bottom: 12px;
}
.modal-copy { font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.modal-copy code {
  font-size: 12px; padding: 1px 5px; border-radius: 4px;
  background: var(--gold-soft); color: var(--gold);
}
.modal-input {
  width: 100%; height: 46px; margin-top: 20px; padding: 0 14px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text); font-size: 13.5px; outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.modal-input:focus {
  border-color: var(--gold-line);
  box-shadow: 0 0 0 3px rgba(232, 181, 75, 0.12);
}
.modal-hint { font-size: 11.5px; color: var(--faint); margin-top: 11px; line-height: 1.6; }
.modal-err {
  font-size: 12.5px; margin-top: 12px; padding: 9px 12px;
  border-radius: 8px; color: #f0907f;
  background: rgba(240, 144, 127, 0.1);
  border: 1px solid rgba(240, 144, 127, 0.24);
}
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px;
}

/* ---------- buy-me-a-coffee QR modal ---------- */
.coffee-card { max-width: 380px; text-align: center; }
.coffee-card .modal-actions { justify-content: center; }
.coffee-qr-wrap { margin-top: 20px; display: grid; place-items: center; }
.coffee-qr {
  width: 240px; height: 240px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff; /* QR needs a light field to scan reliably in dark theme */
  padding: 10px;
  image-rendering: pixelated;
}
.coffee-qr-missing { display: none; font-size: 12px; color: var(--faint); padding: 26px 8px; line-height: 1.7; }
.coffee-qr-wrap.missing .coffee-qr { display: none; }
.coffee-qr-wrap.missing .coffee-qr-missing { display: block; }

/* ---------- skeleton ---------- */
.sk-hero {
  height: 62vh; min-height: 420px;
  background: var(--surface);
  animation: pulse 1.6s ease-in-out infinite;
}
.sk-bar {
  height: 18px; width: 190px; border-radius: 5px;
  background: var(--surface);
  margin: 10px 0 20px;
  animation: pulse 1.6s ease-in-out infinite;
}
.sk-rail { display: flex; gap: 18px; overflow: hidden; margin-bottom: 46px; }
.sk-card {
  flex: 0 0 clamp(150px, 13vw, 208px);
  aspect-ratio: 2 / 3;
  border-radius: var(--r-card);
  background: var(--surface);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.45 }
  50% { opacity: 0.85 }
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 40px 36px 54px;
  max-width: var(--max); margin: 0 auto;
  color: var(--faint); font-size: 12px; line-height: 1.8;
}
.foot strong {
  color: var(--text); font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase; font-size: 11px;
}
.foot-links { margin-top: 12px; display: flex; gap: 18px; }
.foot-links a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.foot-links a:hover { color: var(--gold); border-bottom-color: var(--gold-line); }

/* ---------- entrance ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px) }
  to { opacity: 1; transform: none }
}
.page > * { animation: rise 0.55s var(--ease) both; }
.page > *:nth-child(2) { animation-delay: 0.06s; }
.page > *:nth-child(3) { animation-delay: 0.12s; }
.page > *:nth-child(4) { animation-delay: 0.18s; }
.page > *:nth-child(5) { animation-delay: 0.24s; }
.detail-inner { animation: rise 0.6s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- hero stays a dark cinema window in both themes ---------- */
.hero h1 { color: #fbf8f2; }
.hero .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fbf8f2;
}
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }
.hero .icon-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fbf8f2;
}
.hero .icon-btn:hover { background: rgba(255, 255, 255, 0.18); }

/* ---------- light theme ---------- */
html[data-theme="light"] {
  --bg: #faf7f1;
  --bg-raise: #ffffff;
  --surface: #efeae0;
  --surface-2: #e5dfd3;
  --line: rgba(22, 20, 15, 0.1);
  --line-strong: rgba(22, 20, 15, 0.18);
  --text: #17150f;
  --muted: #6b6459;
  --faint: #948c7e;
  --gold: #a8720f;
  --gold-dim: #8d5f0c;
  --gold-soft: rgba(168, 114, 15, 0.1);
  --gold-line: rgba(168, 114, 15, 0.38);
  --shadow: 0 24px 60px rgba(30, 26, 18, 0.16);
}

html[data-theme="light"] .hero-veil {
  background:
    linear-gradient(90deg,
      rgba(10, 10, 12, 0.94) 0%,
      rgba(10, 10, 12, 0.8) 26%,
      rgba(10, 10, 12, 0.38) 58%,
      transparent 88%),
    linear-gradient(0deg,
      rgba(10, 10, 12, 0.97) 2%,
      rgba(10, 10, 12, 0.58) 22%,
      transparent 62%);
}
html[data-theme="light"] .hero-meta { color: rgba(255, 255, 255, 0.74); }
html[data-theme="light"] .hero .rating-pill {
  border-color: rgba(232, 181, 75, 0.5);
  background: rgba(232, 181, 75, 0.16);
  color: #f0c767;
}
html[data-theme="light"] .hero .tag-pill {
  border-color: rgba(255, 255, 255, 0.26);
  color: rgba(255, 255, 255, 0.76);
}

html[data-theme="light"] .detail-copy { color: var(--muted); }
html[data-theme="light"] .ep-card { background: rgba(22, 20, 15, 0.035); }
html[data-theme="light"] .ep-card:hover { background: rgba(22, 20, 15, 0.07); }
html[data-theme="light"] .detail .hero-veil {
  background:
    linear-gradient(90deg, var(--bg) 2%,
      color-mix(in srgb, var(--bg) 74%, transparent) 44%, transparent 94%),
    linear-gradient(0deg, var(--bg) 2%,
      color-mix(in srgb, var(--bg) 58%, transparent) 32%, transparent 80%);
}
html[data-theme="light"] .btn-ghost {
  background: #fff;
  border-color: var(--line-strong);
}
html[data-theme="light"] .btn-ghost:hover { background: #fff; border-color: var(--faint); }
html[data-theme="light"] .search,
html[data-theme="light"] .key-btn,
html[data-theme="light"] .theme-btn,
html[data-theme="light"] .select,
html[data-theme="light"] .srv,
html[data-theme="light"] .eps-inline .ep {
  background: #fff;
}
html[data-theme="light"] .card-art { border-color: rgba(22, 20, 15, 0.12); }
html[data-theme="light"] .rate {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(22, 20, 15, 0.1);
  color: var(--gold-dim);
}
html[data-theme="light"] .rank-num {
  -webkit-text-stroke-color: rgba(22, 20, 15, 0.16);
}
html[data-theme="light"] .modal { background: rgba(250, 247, 241, 0.8); }
html[data-theme="light"] .modal-input { background: #fff; }
html[data-theme="light"] .player-bar,
html[data-theme="light"] .player-extra { background: #000; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .detail-inner { grid-template-columns: 250px minmax(0, 1fr); gap: 44px; }
}

@media (max-width: 1120px) {
  .nav-inner, .page, .player-bar, .player-extra, .foot { padding-left: 26px; padding-right: 26px; }
  .hero-body { padding-left: 26px; padding-right: 26px; }
  .hero-dots { right: 26px; }
  .hero-mute { right: 26px; }
  .detail-inner { padding-left: 26px; padding-right: 26px; }
  .search { width: 190px; }
  .search:focus-within { width: 230px; }
  .nav-links { gap: 22px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 62px; }
  .nav-links { display: none; }
  .nav-inner { gap: 16px; }
  .hero { height: 68vh; min-height: 480px; }
  .hero-body { padding-bottom: 60px; }
  .hero-content { max-width: 100%; }
  .hero h1 { font-size: clamp(34px, 7vw, 48px); }
  .hero-copy { font-size: 14.5px; -webkit-line-clamp: 2; }
  .hero-dots { display: none; }

  .detail-inner {
    grid-template-columns: 1fr; gap: 26px;
    padding: 44px 26px 40px;
  }
  .detail-art { width: 150px; }
  .detail-body h1 { font-size: 32px; }

  .rail { grid-auto-columns: 142px; gap: 13px; }
  .rail-rank { grid-auto-columns: 216px; }
  .rank-card { height: 172px; }
  .rank-num { font-size: 132px; margin-right: -20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 24px 13px; }
  .ep-grid { grid-template-columns: 1fr; }
  .filters { gap: 12px; }
  .filter-right { margin-left: 0; width: 100%; }
  .select { flex: 1; }
}

@media (max-width: 620px) {
  .nav-inner, .page, .player-bar, .player-extra, .foot { padding-left: 18px; padding-right: 18px; }
  .hero-body { padding-left: 18px; padding-right: 18px; }
  .detail-inner { padding-left: 18px; padding-right: 18px; }
  .logo-text { display: none; }
  .nav-right { flex: 1; min-width: 0; gap: 8px; }
  .search, .search:focus-within { width: 100%; max-width: none; flex: 1; min-width: 0; }
  .hero { height: 76vh; min-height: 520px; }
  .hero-mute { right: 18px; bottom: 58px; width: 40px; height: 40px; }
  .hero-actions { gap: 9px; }
  .btn { height: 43px; padding: 0 18px; font-size: 13px; }
  .icon-btn { width: 43px; height: 43px; }
  .hero-meta { font-size: 12px; gap: 7px; }
  .watch-actions { width: 100%; }
  .watch-actions .btn { flex: 1; }
  .page-head h1 { font-size: 26px; }
  .ep-still { width: 104px; }
  .ep-overview { display: none; }
  .rail { grid-auto-columns: 128px; }
  .rail-rank { grid-auto-columns: 186px; }
  .rank-card { height: 148px; }
  .rank-num { font-size: 112px; margin-right: -16px; }
}

/* ---------- detail season chips ---------- */
.season-chips { margin-top: 34px; }
.season-chips .srv-label { margin-bottom: 12px; }
.season-chips .chip { height: 34px; }

/* ---------- ranked rail: numerals sit on the poster baseline ---------- */
.rank-card { align-items: flex-end; }
.rank-num {
  font-size: clamp(150px, 16.4vw, 228px);
  line-height: 0.74;
  letter-spacing: -0.07em;
  margin-right: -30px;
  padding-bottom: 6px;
  -webkit-text-stroke: 2.5px rgba(245, 242, 234, 0.3);
}
.rank-card:hover .rank-num { -webkit-text-stroke-color: rgba(232, 181, 75, 0.8); }

/* player fits the viewport so the title and server row stay visible */
.player-frame {
  max-width: min(1600px, calc((100vh - var(--nav-h) - 104px) * 16 / 9));
}
@media (max-width: 900px) {
  .player-frame { max-width: 100%; }
}

/* once the player paints, drop the placeholder so it can't show through */
.player-frame.loaded::before,
.player-frame.loaded .player-loading { display: none; }

/* light theme: the hero is still a dark window, so its controls stay light */
html[data-theme="light"] .hero .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fbf8f2;
}
html[data-theme="light"] .hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.34);
}
html[data-theme="light"] .hero .icon-btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fbf8f2;
}
html[data-theme="light"] .rank-num {
  -webkit-text-stroke-color: rgba(22, 20, 15, 0.22);
}
html[data-theme="light"] .card:hover .card-art {
  box-shadow: 0 22px 44px rgba(30, 26, 18, 0.18);
}

/* ============================================================
   BEAUTY PASS — editorial type, grain, depth, staged motion
   ============================================================ */

:root {
  --serif: "Fraunces", "Georgia", "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

body { font-family: var(--sans); }

/* cinematic grain over everything — thematic, whisper-quiet */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 900;
  pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- display typography ---------- */
.hero h1, .detail-body h1, .page-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 130;
}
.hero h1 { text-wrap: balance; }
.page-head h1 { font-variation-settings: "opsz" 100; }
.watch-title { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; }

.logo-text {
  background: linear-gradient(92deg, var(--text) 30%, var(--gold) 110%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.logo-text em {
  -webkit-text-fill-color: var(--faint); color: var(--faint);
}

/* nav links: gold underline grows from center */
.nav-links a::after {
  left: 50%; right: 50%; bottom: -1px;
  width: 0; height: 1.5px;
  background: var(--gold); border-radius: 2px;
  transition: left 0.24s var(--ease), right 0.24s var(--ease), width 0.24s var(--ease);
}
.nav-links a:hover::after { left: calc(50% - 12px); width: 24px; }
.nav-links a.active::after { left: 0; right: 0; width: auto; }

/* ---------- hero: staged entrance + depth ---------- */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 108%, rgba(232, 181, 75, 0.07), transparent 55%);
}
.hero-body { z-index: 2; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(22px) }
  to { opacity: 1; transform: none }
}
.hero-slide.active .eyebrow      { animation: slideUp 0.7s 0.05s var(--ease) both; }
.hero-slide.active h1            { animation: slideUp 0.8s 0.12s var(--ease) both; }
.hero-slide.active .hero-meta    { animation: slideUp 0.7s 0.22s var(--ease) both; }
.hero-slide.active .hero-copy    { animation: slideUp 0.7s 0.30s var(--ease) both; }
.hero-slide.active .hero-actions { animation: slideUp 0.7s 0.38s var(--ease) both; }

/* dots sit above the grain-safe layer */
.hero-dots { z-index: 4; }
.dot-btn { height: 2px; width: 40px; }

/* ---------- buttons: gilded primary ---------- */
.btn-primary {
  background: linear-gradient(160deg, #f4cb72, var(--gold) 48%, #d3a03c);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg);
  transition: left 0.55s var(--ease);
}
.btn-primary:hover::after { left: 130%; }

/* ---------- scroll reveal ---------- */
html.js .row,
html.js .page-head,
html.js .filters,
html.js .season-block,
html.js .more-wrap {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
html.js .row.in,
html.js .page-head.in,
html.js .filters.in,
html.js .season-block.in,
html.js .more-wrap.in {
  opacity: 1; transform: none;
}

/* ---------- cards: richer hover, type chip ---------- */
.type-chip {
  position: absolute; z-index: 2; left: 8px; top: 8px;
  height: 19px; padding: 0 7px;
  display: inline-flex; align-items: center;
  border-radius: 4px;
  background: rgba(8, 8, 10, 0.66);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(245, 242, 234, 0.82);
  font-size: 9px; font-weight: 800; letter-spacing: 0.12em;
}
.card:hover .type-chip { opacity: 0; }
.type-chip { transition: opacity 0.2s ease; }

.card:hover .card-title { color: var(--gold); }
.card-title { transition: color 0.2s ease; }

/* gold hairline that rises beneath the poster on hover */
.card-art::before {
  content: ""; position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 0;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transform: scaleX(0.3);
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}
.card:hover .card-art::before { opacity: 0.9; transform: scaleX(1); }

/* ---------- ranked numerals: serif, gradient-filled ---------- */
.rank-num {
  font-family: var(--serif);
  font-weight: 900;
  background: linear-gradient(178deg, rgba(245, 242, 234, 0.24), rgba(245, 242, 234, 0.03) 78%);
  -webkit-background-clip: text; background-clip: text;
}
.rank-card:hover .rank-num {
  background: linear-gradient(178deg, rgba(232, 181, 75, 0.55), rgba(232, 181, 75, 0.06) 82%);
  -webkit-background-clip: text; background-clip: text;
}

/* ---------- chips ---------- */
.chip.on {
  background: linear-gradient(160deg, #f0c468, var(--gold-dim));
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(232, 181, 75, 0.25);
}

/* ---------- detail: framed poster, softer backdrop ---------- */
.detail-art {
  box-shadow: 0 0 0 1px rgba(232, 181, 75, 0.18), 0 0 60px rgba(232, 181, 75, 0.05), var(--shadow);
}
.detail-bg .art-img { filter: blur(10px) brightness(0.42) saturate(1.15); }

.season-chips .chip.on { transform: translateY(-1px); }

/* episode cards: play affordance on the still */
.ep-still::after {
  content: ""; position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(8, 8, 10, 0.4);
  opacity: 0; transition: opacity 0.22s ease;
}
.ep-still::before {
  content: ""; position: absolute; inset: 0; margin: auto; z-index: 1;
  width: 0; height: 0;
  border-left: 13px solid #fbf8f2;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  transform: translateX(2px);
  opacity: 0; transition: opacity 0.22s ease;
}
.ep-card:hover .ep-still::after,
.ep-card:hover .ep-still::before { opacity: 1; }

/* ---------- skeletons: shimmer, not pulse ---------- */
.sk-hero, .sk-bar, .sk-card {
  animation: none; position: relative; overflow: hidden;
  background: var(--surface);
}
.sk-hero::after, .sk-bar::after, .sk-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%) } to { transform: translateX(100%) } }

/* ---------- footer ---------- */
.foot { padding-bottom: 64px; }
.foot p + p { margin-top: 6px; }

/* ---------- light theme adjustments for the pass ---------- */
html[data-theme="light"] body::after { opacity: 0.04; }
html[data-theme="light"] .rank-num {
  background: linear-gradient(178deg, rgba(22, 20, 15, 0.22), rgba(22, 20, 15, 0.03) 78%);
  -webkit-background-clip: text; background-clip: text;
}
html[data-theme="light"] .rank-card:hover .rank-num {
  background: linear-gradient(178deg, rgba(168, 114, 15, 0.5), rgba(168, 114, 15, 0.05) 82%);
  -webkit-background-clip: text; background-clip: text;
}
html[data-theme="light"] .btn-primary {
  background: linear-gradient(160deg, #c78c1c, var(--gold-dim));
}
html[data-theme="light"] .type-chip {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(22, 20, 15, 0.1);
  color: var(--muted);
}

/* no-JS: never hide reveal targets */
html:not(.js) .row,
html:not(.js) .page-head,
html:not(.js) .filters,
html:not(.js) .season-block,
html:not(.js) .more-wrap { opacity: 1; transform: none; }

/* reduced motion: reveal elements must still be visible */
@media (prefers-reduced-motion: reduce) {
  html.js .row, html.js .page-head, html.js .filters,
  html.js .season-block, html.js .more-wrap {
    opacity: 1; transform: none; transition: none;
  }
}

/* ---------- Brave recommendation notice ---------- */
.brave-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px auto 0;
  max-width: var(--max);
  padding: 10px 16px;
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: var(--r-btn);
}
.brave-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.brave-note strong { color: var(--text); font-weight: 600; }
.brave-note a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold-line); }
.brave-note a:hover { color: var(--gold-dim); border-bottom-color: var(--gold-dim); }
.brave-ico { font-size: 18px; line-height: 1; }
.brave-x {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.brave-x:hover { color: var(--text); background: var(--surface-2); }

@media (prefers-reduced-motion: no-preference) {
  .brave-note { animation: rise .4s var(--ease) both; }
}
