/* ============================================================
   KOVAK.tv — interface styles
   Graded like a 35mm print: warm blacks, amber highlights,
   grain, halation and a soft vignette.
   ============================================================ */

:root {
  /* Print stock */
  --ink-0: #090705;
  --ink-1: #0f0c08;
  --ink-2: #17120d;
  --ink-3: #221a13;
  --ink-4: #2e2319;
  --line: rgba(255, 232, 200, 0.10);
  --line-2: rgba(255, 232, 200, 0.22);

  --paper: #f4ead9;
  --paper-2: #cbb9a1;
  --muted: #8d7c68;

  --brand: #f4572a;
  --brand-2: #ff8a5c;
  --gold: #d9a95c;
  --cream: #ffe8c8;

  --shadow: rgba(20, 10, 4, 0.6);
  --shadow-deep: rgba(14, 7, 3, 0.86);
  --glass: rgba(255, 232, 200, 0.12);
  --glass-2: rgba(255, 232, 200, 0.2);

  /* Motion */
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 160ms;
  --t-base: 240ms;
  --t-slow: 420ms;
  --t-cine: 900ms;

  /* Type & layout */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Anton", "Arial Narrow", Impact, sans-serif;
  --page-x: clamp(16px, 4.2vw, 64px);
  --header-h: 72px;
  --card-w: clamp(150px, 15vw, 216px);
  --radius: 14px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   Base
   ============================================================ */

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

html {
  background: var(--ink-1);
  color-scheme: dark;
  scrollbar-color: #3b2d21 var(--ink-0);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink-1);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

svg {
  display: block;
}

img {
  max-width: 100%;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: rgba(255, 232, 200, 0.05);
  color: var(--paper-2);
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
}

::selection {
  background: var(--brand);
  color: var(--ink-0);
}

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 800;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-0);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--t-base) var(--e-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ============================================================
   Film texture — grain, vignette (fixed, never interactive)
   ============================================================ */

.film {
  position: fixed;
  inset: 0;
  z-index: 400;
  overflow: hidden;
  pointer-events: none;
}

.film-grain {
  position: absolute;
  inset: -120px;
  background-image: var(--grain);
  background-size: 220px;
  opacity: 0.07;
  mix-blend-mode: overlay;
  will-change: transform;
  animation: grain 1s steps(1) infinite;
}

.film-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(135% 105% at 50% 44%, transparent 58%, rgba(6, 3, 1, 0.42) 86%, rgba(6, 3, 1, 0.55) 100%);
}

/* ~10 fps jitter — reads like real grain, costs a compositor translate */
@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  10% { transform: translate3d(-41px, 23px, 0); }
  20% { transform: translate3d(57px, -61px, 0); }
  30% { transform: translate3d(-83px, 77px, 0); }
  40% { transform: translate3d(19px, 96px, 0); }
  50% { transform: translate3d(-66px, -31px, 0); }
  60% { transform: translate3d(91px, 12px, 0); }
  70% { transform: translate3d(-7px, -88px, 0); }
  80% { transform: translate3d(73px, 54px, 0); }
  90% { transform: translate3d(-97px, -9px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Local grain for art blocks (also used inside the top-layer dialog) */
.grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 220px;
  opacity: 0.06;
  mix-blend-mode: overlay;
}

/* ============================================================
   Shared type & controls
   ============================================================ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.k-mark {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--brand);
  color: var(--ink-0);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

/* Display titles: warm gradient fill + faint amber bloom */
.hero-title,
.browse-title,
.sheet-title,
.watch-error h2,
.fatal h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.004em;
  background: linear-gradient(180deg, var(--paper) 18%, var(--paper-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 40px rgba(255, 170, 90, 0.08));
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--e-out),
    background-color var(--t-fast) ease,
    border-color var(--t-fast) ease,
    color var(--t-fast) ease;
}

.btn svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-play {
  background: var(--paper);
  color: var(--ink-0);
  box-shadow: 0 10px 30px -12px rgba(255, 190, 120, 0.35);
}

.btn-play:hover {
  background: var(--cream);
}

.btn-info {
  border-color: var(--line-2);
  background: var(--glass);
  color: var(--paper);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}

.btn-info:hover {
  border-color: rgba(255, 232, 200, 0.36);
  background: var(--glass-2);
}

.btn .icon-check,
.round-btn .icon-check {
  display: none;
}

.btn.is-added .icon-plus,
.round-btn.is-added .icon-plus {
  display: none;
}

.btn.is-added .icon-check,
.round-btn.is-added .icon-check {
  display: block;
}

.btn-info.is-added {
  border-color: rgba(217, 169, 92, 0.55);
  color: var(--cream);
}

.btn-info.is-added .icon-check {
  color: var(--gold);
}

/* Meta line (hero, sheet) */
.meta-chip {
  padding: 2px 7px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  color: var(--paper);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.meta-rating {
  color: var(--gold);
  font-weight: 600;
}

.meta-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 8px;
  border-radius: 20px;
  background:
    radial-gradient(120% 90% at 30% 15%, rgba(255, 232, 200, 0.28), transparent 55%),
    linear-gradient(150deg, var(--brand-2) 0%, var(--brand) 45%, #8f2e14 100%);
  color: var(--ink-0);
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  box-shadow:
    0 0 0 1px rgba(255, 200, 140, 0.18),
    0 0 60px rgba(244, 87, 42, 0.22),
    0 20px 40px -14px var(--shadow-deep);
}

.ring {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 232, 200, 0.14);
  border-top-color: var(--brand-2);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.view-in {
  animation: viewIn var(--t-base) var(--e-out) both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
}

/* Scrolled bar lives on a pseudo so fixed children (mobile sheet)
   aren't trapped by backdrop-filter's containing block */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 12, 8, 0.9), rgba(15, 11, 7, 0.78));
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 18px 40px -24px var(--shadow-deep);
  opacity: 0;
  transition: opacity var(--t-slow) var(--e-out);
  pointer-events: none;
}

.site-header.is-scrolled::before {
  opacity: 1;
}

.header-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 40px);
  height: var(--header-h);
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 var(--page-x);
}

.logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  font-family: var(--font-display);
  line-height: 1;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-radius: 4px;
}

.logo-word {
  color: var(--paper);
  font-size: clamp(24px, 2vw, 29px);
}

.logo-tv {
  margin-left: 1px;
  color: var(--brand);
  font-size: clamp(16px, 1.3vw, 19px);
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--paper-2);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--t-fast) ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 7px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--paper-2);
  opacity: 0.5;
  transform: scaleX(0);
  transition: transform var(--t-base) var(--e-out), opacity var(--t-base) ease;
}

.nav-link:hover {
  color: var(--paper);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link.is-active {
  color: var(--paper);
}

.nav-link.is-active::after {
  background: var(--brand);
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--paper-2);
  cursor: pointer;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}

.icon-btn:hover {
  color: var(--paper);
  background: rgba(255, 232, 200, 0.07);
}

.icon-btn svg {
  width: 21px;
  height: 21px;
}

.bell .dot {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 2px var(--ink-1), 0 0 12px rgba(244, 87, 42, 0.6);
}

.profile {
  position: relative;
  margin-left: 6px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 210, 160, 0.3);
  border-radius: 9px;
  background:
    radial-gradient(120% 90% at 25% 10%, rgba(255, 232, 200, 0.3), transparent 55%),
    linear-gradient(140deg, #4a2414 0%, #b8401d 62%, var(--brand) 100%);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 16px;
  cursor: pointer;
  transition: transform var(--t-fast) var(--e-out), border-color var(--t-fast) ease;
}

.avatar:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 210, 160, 0.6);
}

.avatar--lg {
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: default;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 240px;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(38, 29, 21, 0.98), rgba(28, 21, 15, 0.98));
  box-shadow: 0 30px 70px -10px var(--shadow-deep);
  transform-origin: top right;
  animation: menuIn var(--t-base) var(--e-out) both;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.profile-id {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.profile-id strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.profile-id span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.profile-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--paper-2);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}

.profile-menu button:hover {
  background: rgba(255, 232, 200, 0.07);
  color: var(--paper);
}

.menu-btn {
  display: none;
}

.menu-line {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--t-base) var(--e-out), opacity var(--t-fast) ease;
}

.menu-btn[aria-expanded="true"] .menu-line--a {
  transform: translateY(5px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-line--b {
  opacity: 0;
}

.menu-btn[aria-expanded="true"] .menu-line--c {
  transform: translateY(-5px) rotate(-45deg);
}

.mobile-nav {
  display: none;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  --hero-y: 0px;
  --hero-fade: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: max(82vh, 560px);
  min-height: max(82svh, 560px);
  padding: calc(var(--header-h) + 64px) var(--page-x) clamp(150px, 19vh, 210px);
  overflow: hidden;
  isolation: isolate;
  background: var(--ink-0);
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(70% 80% at 74% 28%, rgba(120, 62, 28, 0.38), transparent 70%),
    radial-gradient(60% 70% at 10% 100%, rgba(244, 87, 42, 0.06), transparent 70%),
    var(--ink-0);
  transform: translate3d(0, var(--hero-y), 0);
  will-change: transform;
}

.hero-img {
  position: absolute;
  inset: 0 0 0 auto;
  width: 84%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 22%;
  opacity: 0;
  transform-origin: 66% 38%;
  scale: 1.06;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 16%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.55) 16%, #000 42%);
  transition: opacity var(--t-cine) ease;
  animation:
    kenBurns 24s var(--e-inout) infinite alternate,
    gateWeave 9s ease-in-out infinite;
}

.hero-art.has-img .hero-img.is-loaded {
  opacity: 1;
}

/* No backdrop: the poster becomes a blurred, zoomed colour field */
.hero-art.is-poster .hero-img {
  width: 100%;
  filter: blur(34px) saturate(1.15) brightness(0.62);
  scale: 1.3;
  -webkit-mask-image: none;
  mask-image: none;
  animation: none;
}

@keyframes kenBurns {
  from { scale: 1.06; }
  to { scale: 1.12; }
}

/* Gate weave — sub-2px drift, felt rather than seen */
@keyframes gateWeave {
  0%, 100% { translate: 0 0; }
  22% { translate: 0.6px -0.9px; }
  47% { translate: -0.8px 0.4px; }
  71% { translate: 0.5px 1px; }
}

/* Warm print grade over the art only — the image itself is untouched */
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(120deg, rgba(255, 150, 70, 0.10), rgba(120, 60, 20, 0.12));
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Halation — warm bloom where the highlights live */
.hero-halation {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(42% 48% at 70% 30%, rgba(255, 200, 140, 0.10), transparent 72%),
    radial-gradient(26% 30% at 86% 18%, rgba(255, 214, 160, 0.06), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(9, 7, 5, 0.94) 0%, rgba(9, 7, 5, 0.74) 28%, rgba(9, 7, 5, 0.22) 58%, transparent 82%),
    linear-gradient(180deg, rgba(9, 7, 5, 0.66) 0%, transparent 20%, transparent 52%, rgba(15, 12, 8, 0.9) 100%);
  pointer-events: none;
}

.hero-fade {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 220px;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 12, 8, 0.7) 55%, var(--ink-1) 96%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(100%, 720px);
  opacity: var(--hero-fade);
}

.hero-content > * {
  animation: rise var(--t-cine) var(--e-out) both;
}

.hero-kicker { animation-delay: 80ms; }
.hero-title { animation-delay: 140ms; }
.hero-meta { animation-delay: 200ms; }
.hero-copy { animation-delay: 260ms; }
.hero-actions { animation-delay: 320ms; }
.hero-rank { animation-delay: 380ms; }

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--paper-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 20px;
  max-width: 11ch;
  font-size: clamp(58px, 9.4vw, 148px);
  line-height: 0.88;
  text-wrap: balance;
  overflow-wrap: break-word;
  filter:
    drop-shadow(0 12px 40px rgba(20, 10, 4, 0.55))
    drop-shadow(0 0 40px rgba(255, 170, 90, 0.08));
}

.hero-title.is-long {
  max-width: 16ch;
  font-size: clamp(44px, 6.4vw, 104px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--paper-2);
  font-size: 13px;
  font-weight: 500;
}

.hero-copy {
  display: -webkit-box;
  max-width: 54ch;
  margin: 0 0 30px;
  overflow: hidden;
  color: var(--paper-2);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.65;
  text-wrap: pretty;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions .btn {
  min-height: 52px;
  padding: 0 30px;
  font-size: 15px;
}

.hero-rank {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  color: var(--paper-2);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.rank-badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(217, 169, 92, 0.6);
  border-radius: 6px;
  background: rgba(217, 169, 92, 0.12);
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
}

.hero-side {
  position: absolute;
  top: 50%;
  right: clamp(18px, 2vw, 30px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(244, 234, 217, 0.4);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  opacity: var(--hero-fade);
}

.hero-side::before {
  content: "";
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, transparent, rgba(255, 232, 200, 0.4));
}

.hero-scroll {
  position: absolute;
  bottom: clamp(98px, 11vh, 128px);
  left: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  transform: translateX(-50%);
  opacity: var(--hero-fade);
  pointer-events: none;
}

.hero-scroll i {
  position: relative;
  width: 1px;
  height: 42px;
  overflow: hidden;
  background: rgba(255, 232, 200, 0.14);
}

.hero-scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--cream));
  transform: translateY(-100%);
  animation: scrollCue 2.4s var(--e-inout) infinite;
}

@keyframes scrollCue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* ============================================================
   Rows
   ============================================================ */

.rows {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.2vw, 30px);
  margin-top: clamp(-112px, -7vw, -56px);
  padding-bottom: clamp(48px, 6vw, 90px);
}

.row-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 0 var(--page-x);
}

.row-title {
  margin: 0;
  color: var(--paper);
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.row-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--t-fast) ease, transform var(--t-base) var(--e-out);
}

.row-more svg {
  width: 13px;
  height: 13px;
}

.row:hover .row-more,
.row-more:focus-visible {
  opacity: 1;
  transform: none;
}

.row-wrap {
  --fade: clamp(14px, 3.4vw, 56px);
  position: relative;
}

.row-track {
  display: flex;
  gap: clamp(10px, 1vw, 16px);
  padding: 16px var(--page-x) 32px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--page-x);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade), #000 calc(100% - var(--fade)), transparent 100%);
}

.row-track::-webkit-scrollbar {
  display: none;
}

.row-arrow {
  position: absolute;
  top: calc(50% - 30px);
  z-index: 12;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(28, 21, 15, 0.72);
  color: var(--paper);
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 12px 30px -10px var(--shadow-deep);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  transition: opacity var(--t-fast) ease, transform var(--t-fast) var(--e-out), background-color var(--t-fast) ease;
}

.row-arrow svg {
  width: 19px;
  height: 19px;
}

.row-arrow:hover {
  background: rgba(46, 35, 25, 0.92);
  transform: scale(1.06);
}

.row-arrow.prev {
  left: max(8px, calc(var(--page-x) - 30px));
}

.row-arrow.next {
  right: max(8px, calc(var(--page-x) - 30px));
}

.row-wrap:hover .row-arrow,
.row-arrow:focus-visible {
  opacity: 1;
}

/* Staggered entrance (rows get .in from IntersectionObserver) */
.rows .row .card {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--t-slow) ease,
    transform var(--t-cine) var(--e-out);
  transition-delay: calc(min(var(--i, 0), 8) * 40ms);
}

.rows .row.in .card {
  opacity: 1;
  transform: none;
}

.rows.is-static .row .card {
  transition: none;
}

/* ============================================================
   Cards
   ============================================================ */

.card {
  position: relative;
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  scroll-snap-align: start;
}

/* Warm lifted shadow — faded in, never animated as box-shadow */
.card::before {
  content: "";
  position: absolute;
  top: 6%;
  right: 4%;
  bottom: -2%;
  width: calc(var(--card-w) * 0.92);
  border-radius: var(--radius);
  box-shadow: 0 28px 50px -12px var(--shadow-deep), 0 0 50px -10px rgba(255, 170, 90, 0.10);
  opacity: 0;
  transform: translateY(0);
  transition: opacity var(--t-base) ease, transform var(--t-base) var(--e-out);
  pointer-events: none;
}

.poster {
  position: relative;
  z-index: 1;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255, 170, 90, 0.16), transparent 60%),
    linear-gradient(160deg, #3a2a1c 0%, #20170f 55%, #130e09 100%);
  box-shadow: 0 14px 26px -16px var(--shadow-deep), 0 2px 6px rgba(20, 10, 4, 0.5);
  transition: transform var(--t-base) var(--e-out);
}

.poster-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--e-out);
}

/* Legibility gradient for the title band — deep enough to sit over
   poster art that already has its own title burnt in at the bottom. */
.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(9, 7, 5, 0.42) 0%,
    transparent 18%,
    transparent 40%,
    rgba(9, 7, 5, 0.52) 62%,
    rgba(9, 7, 5, 0.9) 82%,
    rgba(9, 7, 5, 0.97) 100%
  );
  pointer-events: none;
}

/* Deepening on hover */
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(80% 60% at 50% 46%, rgba(15, 10, 6, 0.25), rgba(15, 10, 6, 0.62));
  opacity: 0;
  transition: opacity var(--t-base) ease;
  pointer-events: none;
}

.poster-mark {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  place-items: center;
  color: rgba(255, 232, 200, 0.2);
  font-family: var(--font-display);
  font-size: calc(var(--card-w) * 0.62);
  line-height: 1;
  text-transform: uppercase;
}

.poster:not(.has-img) .poster-mark,
.poster.no-img .poster-mark {
  display: grid;
}

.poster-top {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.poster-brand {
  color: rgba(244, 234, 217, 0.78);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-shadow: 0 1px 8px rgba(9, 7, 5, 0.6);
}

.poster-tag {
  padding: 3px 7px;
  border: 1px solid rgba(217, 169, 92, 0.5);
  border-radius: 4px;
  background: rgba(9, 7, 5, 0.82);
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.poster-bottom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  pointer-events: none;
  transition: transform var(--t-base) var(--e-out);
}

.poster-title {
  display: -webkit-box;
  margin: 0 0 4px;
  overflow: hidden;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(13px, 1.05vw, 16px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.08;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(9, 7, 5, 0.7);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.poster-meta {
  margin: 0;
  overflow: hidden;
  color: var(--paper-2);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.poster-meta b {
  color: var(--gold);
  font-weight: 600;
}

.card-actions {
  position: absolute;
  top: 46%;
  left: 50%;
  z-index: 6;
  display: flex;
  gap: 10px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity var(--t-fast) ease, transform var(--t-fast) var(--e-out);
  pointer-events: none;
}

/* Only the buttons take clicks — the gap between them falls through to card-open */
.card-actions .round-btn {
  pointer-events: none;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(28, 21, 15, 0.7);
  color: var(--paper);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform var(--t-fast) var(--e-out), background-color var(--t-fast) ease, border-color var(--t-fast) ease;
}

.round-btn:hover {
  transform: scale(1.08);
}

.round-btn svg {
  width: 18px;
  height: 18px;
}

.round-play {
  border-color: transparent;
  background: var(--paper);
  color: var(--ink-0);
}

.round-play svg {
  width: 14px;
  height: 15px;
  margin-left: 2px;
}

.round-play:hover {
  background: var(--cream);
}

.round-list:hover {
  border-color: rgba(255, 232, 200, 0.45);
  background: rgba(46, 35, 25, 0.86);
}

.round-list.is-added {
  border-color: rgba(217, 169, 92, 0.7);
  color: var(--gold);
}

.card-open {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
}

.card-open:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: -3px;
}

/* Hover / keyboard reveal */
@media (hover: hover) {
  .card:hover::before {
    opacity: 1;
    transform: translateY(-6px);
  }

  .card:hover .poster {
    transform: translateY(-6px);
  }

  .card:hover .poster-img {
    transform: scale(1.06);
  }

  .card:hover .poster::after {
    opacity: 1;
  }

  .card:hover .poster-bottom {
    transform: translateY(-4px);
  }

  .card:hover .card-actions {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  .card:hover .card-actions .round-btn {
    pointer-events: auto;
  }
}

.card:focus-within .poster::after {
  opacity: 1;
}

.card:focus-within .card-actions {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card:focus-within .card-actions .round-btn {
  pointer-events: auto;
}

/* Top 10 — outline numerals behind the poster */
.card--rank {
  display: flex;
  flex-basis: calc(var(--card-w) * 1.34);
  justify-content: flex-end;
  width: calc(var(--card-w) * 1.34);
}

/* Two-digit numeral needs a little more room */
.card--rank:nth-child(10) {
  flex-basis: calc(var(--card-w) * 1.56);
  width: calc(var(--card-w) * 1.56);
}

.card--rank .poster {
  flex: 0 0 var(--card-w);
  width: var(--card-w);
}

.rank {
  position: absolute;
  bottom: -0.1em;
  left: -0.02em;
  z-index: 0;
  font-family: var(--font-display);
  font-size: calc(var(--card-w) * 1.06);
  line-height: 1;
  letter-spacing: -0.08em;
  background: linear-gradient(180deg, rgba(217, 169, 92, 0.26) 0%, rgba(217, 169, 92, 0.02) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px rgba(217, 169, 92, 0.78);
  opacity: 0.62;
  transition: transform var(--t-base) var(--e-out), opacity var(--t-base) ease;
  pointer-events: none;
  user-select: none;
}

.card--rank:hover .rank {
  opacity: 1;
  transform: translateX(-4px);
}

/* ============================================================
   Mini cards (More like this)
   ============================================================ */

.mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.mini-art {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  isolation: isolate;
  border-radius: 12px;
  background: linear-gradient(160deg, #3a2a1c 0%, #20170f 55%, #130e09 100%);
  box-shadow: inset 0 0 0 1px var(--line), 0 12px 24px -14px var(--shadow-deep);
}

.mini-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--e-out);
}

.mini-art .grain {
  display: none;
}

.mini-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 50%, rgba(9, 7, 5, 0.86) 100%);
  box-shadow: inset 0 0 0 1px var(--line);
  pointer-events: none;
}

.mini-title {
  position: absolute;
  right: 10px;
  bottom: 9px;
  left: 10px;
  z-index: 2;
  display: -webkit-box;
  overflow: hidden;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-transform: uppercase;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.mini-meta {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

@media (hover: hover) {
  .mini:hover .mini-img {
    transform: scale(1.06);
  }

  .mini:hover .mini-meta {
    color: var(--paper-2);
  }
}

/* ============================================================
   Browse
   ============================================================ */

.browse {
  position: relative;
  max-width: 1680px;
  min-height: 80vh;
  margin: 0 auto;
  padding: calc(var(--header-h) + clamp(36px, 6vw, 84px)) var(--page-x) clamp(64px, 8vw, 110px);
}

.browse::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: min(900px, 100%);
  height: 520px;
  background: radial-gradient(60% 60% at 18% 20%, rgba(170, 82, 34, 0.16), transparent 70%);
  pointer-events: none;
}

.browse-head {
  max-width: 900px;
  margin-bottom: clamp(26px, 3.4vw, 44px);
}

.browse-title {
  margin: 0 0 14px;
  font-size: clamp(52px, 8.4vw, 118px);
  line-height: 0.88;
}

.browse-sub {
  max-width: 62ch;
  margin: 0;
  color: var(--paper-2);
  font-size: 14px;
}

.browse-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.pill {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--paper-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}

.pill:hover {
  border-color: rgba(255, 232, 200, 0.4);
  color: var(--paper);
}

.pill.is-active {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink-0);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: clamp(14px, 1.4vw, 20px);
}

.grid .card {
  --card-w: 100%;
  flex: none;
  width: auto;
}

.grid .card::before {
  width: 92%;
}

.grid .poster-mark {
  font-size: clamp(64px, 9vw, 110px);
}

.browse .grid .card:nth-child(-n + 18),
.search-grid .card:nth-child(-n + 24) {
  animation: cardIn var(--t-slow) var(--e-out) both;
  animation-delay: calc(min(var(--i, 0), 18) * 20ms);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 440px;
  margin: clamp(30px, 8vh, 80px) auto;
  text-align: center;
}

.empty-state h3 {
  margin: 8px 0 0;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
}

.empty-state p {
  margin: 0 0 14px;
  color: var(--paper-2);
  font-size: 14px;
  line-height: 1.6;
}

.empty-state--compact {
  margin: 24px auto;
}

.empty-state--compact .empty-mark {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  font-size: 30px;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-1), var(--ink-0));
  color: var(--muted);
  padding: clamp(40px, 5vw, 64px) var(--page-x) 28px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  max-width: 1680px;
  margin: 0 auto;
}

.footer-col {
  padding: 4px clamp(18px, 3vw, 40px);
}

.footer-col:first-child {
  padding-left: 0;
}

.footer-col + .footer-col {
  border-left: 1px solid var(--line);
}

.footer-brand p {
  max-width: 30ch;
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.footer-label {
  margin: 0 0 10px;
  color: var(--paper-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  column-gap: 28px;
  align-content: start;
}

.footer-links .footer-label {
  grid-column: 1 / -1;
}

.footer-links button {
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: color var(--t-fast) ease;
}

.footer-links button:hover {
  color: var(--paper);
}

.footer-keys dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.footer-keys dl div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-keys dt {
  min-width: 40px;
}

.footer-keys dd {
  margin: 0;
  font-size: 12.5px;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: 1680px;
  margin: clamp(30px, 4vw, 48px) auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-note {
  color: var(--paper-2);
}

/* ============================================================
   Search
   ============================================================ */

.search {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(70% 50% at 20% 0%, rgba(170, 82, 34, 0.18), transparent 70%),
    rgba(13, 10, 7, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: fadeIn var(--t-base) ease both;
}

.search-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 22px);
  max-width: 1680px;
  margin: 0 auto;
  padding: max(26px, env(safe-area-inset-top)) var(--page-x) 18px;
  background: linear-gradient(180deg, rgba(13, 10, 7, 0.98) 70%, rgba(13, 10, 7, 0.86));
  animation: rise var(--t-slow) var(--e-out) both;
}

.search-bar::after {
  content: "";
  position: absolute;
  right: var(--page-x);
  bottom: 0;
  left: var(--page-x);
  height: 1px;
  background: var(--line-2);
}

/* Focus indicator for the borderless input: an ember rule that grows from centre */
.search-bar::before {
  content: "";
  position: absolute;
  right: var(--page-x);
  bottom: 0;
  left: var(--page-x);
  z-index: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand) 20%, var(--brand-2) 80%, transparent);
  transform: scaleX(0);
  transition: transform var(--t-slow) var(--e-out);
}

.search-bar:focus-within::before {
  transform: scaleX(1);
}

.search-icon {
  flex: 0 0 auto;
  width: clamp(22px, 2.6vw, 32px);
  height: clamp(22px, 2.6vw, 32px);
  color: var(--muted);
}

#searchInput {
  flex: 1;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  caret-color: var(--brand);
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-transform: uppercase;
  -webkit-appearance: none;
  appearance: none;
}

#searchInput::placeholder {
  color: rgba(141, 124, 104, 0.7);
}

#searchInput::-webkit-search-cancel-button,
#searchInput::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.search-close kbd {
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: color var(--t-fast) ease, border-color var(--t-fast) ease;
}

.search-close:hover kbd {
  border-color: rgba(255, 232, 200, 0.4);
  color: var(--paper);
}

.search-body {
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px var(--page-x) 64px;
}

/* ============================================================
   Detail sheet (<dialog>)
   ============================================================ */

.sheet {
  width: min(980px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: 24px auto auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--ink-1);
  color: var(--paper);
  box-shadow:
    0 50px 120px -20px var(--shadow-deep),
    0 0 0 1px rgba(255, 232, 200, 0.03),
    0 0 120px -40px rgba(255, 170, 90, 0.18);
  scrollbar-width: thin;
  scrollbar-color: #45352a transparent;
}

.sheet[open] {
  animation: sheetIn var(--t-slow) var(--e-out);
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sheet::backdrop {
  background: rgba(9, 6, 4, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  animation: fadeIn var(--t-slow) ease;
}

.sheet:focus-visible {
  outline: none;
}

.sheet-close {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 14px 14px -58px auto;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(23, 18, 13, 0.72);
  color: var(--paper);
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform var(--t-fast) var(--e-out), background-color var(--t-fast) ease;
}

.sheet-close:hover {
  background: rgba(46, 35, 25, 0.92);
  transform: rotate(90deg);
}

.sheet-close svg {
  width: 19px;
  height: 19px;
}

.sheet-art {
  position: relative;
  aspect-ratio: 16 / 8.2;
  min-height: 300px;
  max-height: 520px;
  overflow: hidden;
  background:
    radial-gradient(70% 80% at 70% 20%, rgba(120, 62, 28, 0.4), transparent 70%),
    var(--ink-2);
}

.sheet-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
}

.sheet-art.no-img .sheet-img,
.sheet-art:not(.has-img) .sheet-img {
  display: none;
}

/* Series: no backdrop — poster becomes a blurred field + a sharp one-sheet */
.sheet-art.is-poster .sheet-img {
  filter: blur(30px) saturate(1.15) brightness(0.55);
  transform: scale(1.35);
}

.sheet-poster {
  position: absolute;
  right: clamp(20px, 4.4vw, 48px);
  bottom: clamp(22px, 3.4vw, 40px);
  z-index: 4;
  width: clamp(104px, 17%, 168px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 232, 200, 0.16),
    0 30px 60px -16px var(--shadow-deep),
    0 0 60px rgba(255, 200, 140, 0.10);
  animation: rise var(--t-cine) 120ms var(--e-out) both;
}

.sheet-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(40% 50% at 70% 26%, rgba(255, 200, 140, 0.10), transparent 72%),
    linear-gradient(120deg, rgba(255, 150, 70, 0.08), rgba(120, 60, 20, 0.1));
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.sheet-art-fade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(15, 12, 8, 0.86) 0%, rgba(15, 12, 8, 0.4) 40%, transparent 70%),
    linear-gradient(180deg, rgba(15, 12, 8, 0.3) 0%, transparent 30%, rgba(15, 12, 8, 0.6) 66%, var(--ink-1) 100%);
  pointer-events: none;
}

.sheet-art-content {
  position: absolute;
  right: clamp(20px, 4.4vw, 48px);
  bottom: clamp(20px, 3vw, 34px);
  left: clamp(20px, 4.4vw, 48px);
  z-index: 4;
}

.sheet-art.is-poster .sheet-art-content {
  right: calc(clamp(20px, 4.4vw, 48px) + clamp(104px, 17%, 168px) + 24px);
}

.sheet-kicker {
  margin: 0 0 12px;
  color: var(--paper-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.sheet-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(36px, 5.6vw, 70px);
  line-height: 0.9;
  text-wrap: balance;
  overflow-wrap: break-word;
  filter:
    drop-shadow(0 10px 30px rgba(20, 10, 4, 0.6))
    drop-shadow(0 0 40px rgba(255, 170, 90, 0.08));
}

.sheet-body {
  position: relative;
  z-index: 1;
  padding: 6px clamp(20px, 4.4vw, 48px) clamp(28px, 4vw, 48px);
}

.sheet-body > * {
  animation: rise var(--t-slow) var(--e-out) both;
}

.sheet-meta { animation-delay: 60ms; }
.sheet-actions { animation-delay: 110ms; }
.sheet-columns { animation-delay: 160ms; }

.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--paper-2);
  font-size: 13px;
  font-weight: 500;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.sheet-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 48px);
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.sheet-synopsis {
  max-width: 62ch;
  margin: 0;
  color: var(--paper);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}

.sheet-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px 18px;
  align-content: start;
  margin: 0;
  font-size: 13px;
}

.sheet-facts dt {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.9;
  text-transform: uppercase;
}

.sheet-facts dd {
  margin: 0;
  color: var(--paper-2);
  line-height: 1.6;
}

.sheet-episodes h3,
.sheet-related h3 {
  margin: 0 0 14px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.sheet-episodes {
  padding-top: 30px;
}

.episode-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  color: var(--muted);
  font-size: 13px;
}

.season-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.season-tabs::-webkit-scrollbar {
  display: none;
}

.season-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--t-fast) ease;
}

.season-tab::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform var(--t-base) var(--e-out);
}

.season-tab:hover {
  color: var(--paper-2);
}

.season-tab.is-active {
  color: var(--paper);
}

.season-tab.is-active::after {
  transform: scaleX(1);
}

.season-tab:focus-visible {
  outline-offset: -3px;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.episode {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px 10px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: inset 2px 0 0 var(--line);
  text-align: left;
  cursor: pointer;
  animation: rise var(--t-slow) var(--e-out) both;
  animation-delay: calc(min(var(--i, 0), 16) * 20ms);
}

.episode::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 232, 200, 0.06), rgba(255, 232, 200, 0.015));
  opacity: 0;
  transition: opacity var(--t-fast) ease;
  pointer-events: none;
}

.episode::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform var(--t-base) var(--e-out);
}

.episode:hover::before,
.episode:focus-visible::before {
  opacity: 1;
}

.episode:hover::after,
.episode:focus-visible::after {
  transform: scaleY(1);
}

.episode:focus-visible {
  outline-offset: -2px;
}

.episode-num {
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.episode-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.episode-name {
  overflow: hidden;
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.episode-meta {
  color: var(--muted);
  font-size: 11.5px;
}

.episode-play {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  color: var(--paper);
  transition: transform var(--t-fast) var(--e-out), background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}

.episode-play svg {
  width: 12px;
  height: 13px;
  margin-left: 2px;
}

.episode:hover .episode-play {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink-0);
  transform: scale(1.06);
}

.sheet-related {
  padding-top: 30px;
}

.sheet-related:empty {
  display: none;
}

.sheet-related .grid {
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 14px;
}

.sheet-related .mini {
  animation: cardIn var(--t-slow) var(--e-out) both;
}

.sheet-related .mini:nth-child(2) { animation-delay: 30ms; }
.sheet-related .mini:nth-child(3) { animation-delay: 60ms; }
.sheet-related .mini:nth-child(4) { animation-delay: 90ms; }
.sheet-related .mini:nth-child(5) { animation-delay: 120ms; }
.sheet-related .mini:nth-child(6) { animation-delay: 150ms; }

/* ============================================================
   Player
   ============================================================ */

.watch {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  animation: fadeIn var(--t-base) ease both;
}

.watch-stage {
  position: absolute;
  inset: 0;
  background: #000;
}

/* Source switch: a quick dim-flash so the change registers */
.watch-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.watch-stage.is-flash::after {
  animation: dimFlash 120ms ease-out;
}

@keyframes dimFlash {
  0% { opacity: 0.7; }
  100% { opacity: 0; }
}

.player-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.watch-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(50% 50% at 50% 46%, rgba(170, 82, 34, 0.14), transparent 70%),
    #000;
  color: var(--paper-2);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-align: center;
  transition: opacity var(--t-slow) ease;
}

.watch-loader p {
  margin: 0;
}

.watch-loader.is-out {
  opacity: 0;
  pointer-events: none;
}

.watch-loader .ring {
  width: 38px;
  height: 38px;
  border-width: 1.5px;
  border-color: rgba(255, 232, 200, 0.1);
  border-top-color: var(--brand-2);
  box-shadow: 0 0 30px rgba(255, 138, 92, 0.12);
}

.watch-loader.is-slow p::after {
  content: " · still buffering — try another source";
  color: var(--muted);
}

.watch-error {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  background:
    radial-gradient(60% 60% at 50% 34%, rgba(170, 82, 34, 0.16), transparent 70%),
    var(--ink-0);
  text-align: center;
  animation: fadeIn var(--t-slow) ease both;
}

.watch-error h2 {
  margin: 6px 0 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 0.92;
}

.watch-error p {
  max-width: 420px;
  margin: 0 0 12px;
  color: var(--paper-2);
  font-size: 13.5px;
  line-height: 1.6;
}

.watch-ui {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  transition: opacity var(--t-slow) ease;
}

.watch.idle {
  cursor: none;
}

.watch.idle .watch-ui {
  opacity: 0;
}

.watch.idle .watch-bottom button {
  pointer-events: none;
}

.watch-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) max(clamp(14px, 3vw, 40px), env(safe-area-inset-right)) 56px max(clamp(14px, 3vw, 40px), env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(9, 6, 4, 0.86) 0%, rgba(9, 6, 4, 0.5) 50%, transparent 100%);
  pointer-events: auto;
}

.watch-back,
.watch-btn {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-fast) var(--e-out);
}

.watch-back:hover,
.watch-btn:hover {
  border-color: var(--line-2);
  background: rgba(255, 232, 200, 0.1);
}

.watch-back svg {
  width: 22px;
  height: 22px;
}

.watch-btn svg {
  width: 19px;
  height: 19px;
}

.watch-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
}

.watch-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.watch-badge {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  color: var(--paper-2);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.watch-badge:empty {
  display: none;
}

.watch-spacer {
  flex: 1;
}

.watch-source {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(23, 18, 13, 0.6);
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease;
}

.watch-source:hover {
  border-color: rgba(255, 232, 200, 0.42);
  background: rgba(46, 35, 25, 0.8);
}

.watch-source-icon {
  width: 15px;
  height: 15px;
  color: var(--brand-2);
}

.watch-bottom {
  padding: 44px max(clamp(14px, 3vw, 40px), env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(clamp(14px, 3vw, 40px), env(safe-area-inset-left));
  background: linear-gradient(0deg, rgba(9, 6, 4, 0.7) 0%, transparent 100%);
}

.watch.is-error .watch-bottom {
  display: none;
}

.watch-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  color: var(--paper-2);
  font-size: 12px;
}

.watch-hint button {
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 138, 92, 0.6);
  text-underline-offset: 4px;
  cursor: pointer;
  pointer-events: auto;
}

.watch-keys {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.watch-keys kbd {
  min-width: 20px;
  height: 20px;
  font-size: 10px;
}

/* ============================================================
   States
   ============================================================ */

.row-skeleton {
  padding: 16px var(--page-x) 6px;
}

.skeleton-line,
.skeleton-cards i {
  position: relative;
  overflow: hidden;
}

.skeleton-line {
  display: block;
  width: 180px;
  height: 16px;
  margin-bottom: 18px;
  border-radius: 6px;
  background: var(--ink-3);
}

.skeleton-cards {
  display: flex;
  gap: clamp(10px, 1vw, 16px);
  overflow: hidden;
}

.skeleton-cards i {
  flex: 0 0 auto;
  width: var(--card-w);
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #20180f, var(--ink-2));
  box-shadow: inset 0 0 0 1px var(--line);
}

.skeleton-line::after,
.skeleton-cards i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 214, 160, 0.07) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer 1.6s var(--e-inout) infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.fatal {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  background:
    radial-gradient(55% 45% at 50% 30%, rgba(170, 82, 34, 0.2), transparent 70%),
    var(--ink-1);
  text-align: center;
  animation: fadeIn var(--t-slow) ease both;
}

.fatal .empty-mark {
  width: 88px;
  height: 88px;
  font-size: 50px;
}

.fatal .eyebrow {
  margin: 10px 0 0;
}

.fatal h2 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.9;
}

.fatal p:not(.eyebrow) {
  max-width: 440px;
  margin: 4px 0 14px;
  color: var(--paper-2);
  font-size: 14px;
  line-height: 1.65;
}

.fatal code {
  padding: 2px 7px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: rgba(255, 232, 200, 0.06);
  color: var(--cream);
  font-size: 0.92em;
}

.toast {
  position: fixed;
  bottom: max(26px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 700;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(34, 26, 19, 0.96);
  color: var(--paper);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 20px 50px -12px var(--shadow-deep);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity var(--t-base) ease, transform var(--t-slow) var(--e-out);
  pointer-events: none;
}

.toast:empty {
  display: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 30px;
  background: var(--ink-1);
  color: var(--paper);
  text-align: center;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1100px) {
  .hero-img {
    width: 100%;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .main-nav {
    display: none;
  }

  .menu-btn {
    display: grid;
  }

  .mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: min(340px, 86vw);
    padding: calc(var(--header-h) + 18px) 24px max(28px, env(safe-area-inset-bottom));
    overflow-y: auto;
    border-left: 1px solid var(--line);
    background:
      radial-gradient(90% 40% at 100% 0%, rgba(170, 82, 34, 0.18), transparent 70%),
      linear-gradient(180deg, #241b13, #17120d);
    box-shadow: -40px 0 80px -20px var(--shadow-deep);
    animation: navIn var(--t-slow) var(--e-out) both;
  }

  @keyframes navIn {
    from { transform: translateX(100%); }
    to { transform: none; }
  }

  /* Warm scrim behind the sheet — part of the header so outside taps close it */
  .site-header:has(.mobile-nav:not([hidden]))::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(9, 6, 4, 0.62);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: fadeIn var(--t-slow) ease both;
  }

  .mobile-nav-label {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .mobile-nav .nav-link {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0;
    border-bottom: 1px solid var(--line);
    color: var(--paper-2);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-align: left;
    text-transform: uppercase;
    animation: rise var(--t-slow) var(--e-out) both;
  }

  .mobile-nav .nav-link:nth-of-type(2) { animation-delay: 40ms; }
  .mobile-nav .nav-link:nth-of-type(3) { animation-delay: 80ms; }
  .mobile-nav .nav-link:nth-of-type(4) { animation-delay: 120ms; }
  .mobile-nav .nav-link:nth-of-type(5) { animation-delay: 160ms; }

  .mobile-nav .nav-link::after {
    right: auto;
    bottom: 12px;
    left: auto;
    width: 6px;
    height: 6px;
    margin-left: auto;
    position: static;
    border-radius: 50%;
    transform: scale(0);
  }

  .mobile-nav .nav-link.is-active {
    color: var(--paper);
  }

  .mobile-nav .nav-link.is-active::after {
    transform: scale(1);
  }

  .mobile-nav-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: auto 0 0;
    padding-top: 28px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .hero-side {
    display: none;
  }

  .sheet-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: max(82vh, 540px);
    min-height: max(82svh, 540px);
    padding-bottom: clamp(104px, 15vh, 140px);
  }

  .hero-img {
    object-position: 60% 20%;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(9, 7, 5, 0.6) 0%, transparent 18%, rgba(9, 7, 5, 0.25) 38%, rgba(9, 7, 5, 0.86) 70%, var(--ink-1) 100%),
      linear-gradient(90deg, rgba(9, 7, 5, 0.6) 0%, transparent 70%);
  }

  .hero-title {
    font-size: clamp(50px, 15vw, 84px);
  }

  .hero-title.is-long {
    font-size: clamp(38px, 10.5vw, 60px);
  }

  .hero-copy {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    font-size: 14px;
  }

  /* Dots are flex items; when the genre line wraps they strand one at the
     end of the line above. Spacing reads cleaner than an orphaned dot. */
  .hero-meta {
    gap: 6px 12px;
  }

  .hero-meta .meta-dot {
    display: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions .btn {
    padding: 0 16px;
  }

  .hero-scroll {
    display: none;
  }

  .rows {
    margin-top: -40px;
  }

  .row-more {
    opacity: 1;
    transform: none;
  }

  .browse-tools {
    flex-wrap: nowrap;
    margin-right: calc(var(--page-x) * -1);
    padding-right: var(--page-x);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .browse-tools::-webkit-scrollbar {
    display: none;
  }

  .pill {
    flex: 0 0 auto;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 12px;
  }

  .sheet {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .sheet-art {
    aspect-ratio: 4 / 3.4;
    min-height: 0;
  }

  .sheet-poster {
    width: 96px;
  }

  .sheet-art.is-poster .sheet-art-content {
    right: calc(clamp(20px, 4.4vw, 48px) + 96px + 16px);
  }

  .sheet-actions .btn {
    flex: 1 1 140px;
  }

  .sheet-related .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .episode {
    grid-template-columns: 50px minmax(0, 1fr) 40px;
    gap: 10px;
    padding: 10px 6px 10px 12px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .footer-col,
  .footer-col:first-child {
    padding: 0;
  }

  .footer-col + .footer-col {
    padding-top: 24px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .footer-keys {
    display: none;
  }

  .watch-heading {
    font-size: 12.5px;
  }

  .watch-source {
    padding: 0 12px 0 10px;
    font-size: 11px;
  }

  .watch-keys {
    display: none;
  }
}

@media (max-width: 420px) {
  .bell {
    display: none;
  }

  .profile {
    margin-left: 2px;
  }

  .hero-actions .btn {
    font-size: 14px;
  }

  .watch-top {
    gap: 6px;
  }

  .watch-badge {
    display: none;
  }

  .footer-base {
    flex-direction: column;
  }
}

/* Touch: no hover reveal — tap opens details; chrome stays reachable */
@media (hover: none) {
  .row-arrow {
    display: none;
  }

  .row-more {
    opacity: 1;
    transform: none;
  }

  .card-actions {
    display: none;
  }

  .watch.idle .watch-ui {
    opacity: 1;
  }

  .watch.idle .watch-bottom button {
    pointer-events: auto;
  }

  .watch.idle {
    cursor: auto;
  }
}

/* ============================================================
   Reduced motion — instant states, no grain/Ken Burns/parallax
   ============================================================ */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }

  .film-grain,
  .hero-img,
  .hero-scroll i::after,
  .skeleton-line::after,
  .skeleton-cards i::after {
    animation: none !important;
  }

  .hero-img {
    scale: 1.04;
    translate: none;
  }

  .hero-art {
    transform: none !important;
  }

  .hero-content,
  .hero-side,
  .hero-scroll {
    opacity: 1 !important;
  }

  .rows .row .card {
    opacity: 1;
    transform: none;
  }

  /* Loading still needs to read as loading — keep the ring turning, slowly */
  .ring {
    animation: spin 1.8s linear infinite !important;
  }
}
