/* FLUO design tokens */
:root {
  color-scheme: dark;

  /* neutrals — true black/gray */
  --bg: #0b0b0b;
  --surface: #141414;
  --surface-2: #1e1e1e;
  --elevated: #252525;
  --border: rgb(255 255 255 / 7%);
  --border-strong: rgb(255 255 255 / 12%);

  --text: #f5f5f5;
  --text-muted: rgb(255 255 255 / 62%);
  --text-faint: rgb(255 255 255 / 38%);

  /* accent ramp */
  --accent-300: #bba6ff;
  --accent-400: #a186ff;
  --accent-500: #8a66fb;
  --accent-600: #6c4ae9;
  --accent-700: #5c38cc;

  --accent: var(--accent-400);
  --accent-text: var(--accent-300);
  --on-accent: #0e0c16;
  --accent-subtle: rgb(161 134 255 / 13%);

  --danger: #ff6b6b;
  --danger-text: #ff8585;
  --star: #e8b45a;

  --scrim: rgb(0 0 0 / 52%);

  /* materials — neutral glass over 11,11,11 */
  --mat-header-bg: rgb(11 11 11 / 72%);
  --mat-dock-bg: rgb(11 11 11 / 66%);
  --mat-thin-bg: rgb(22 22 22 / 55%);
  --mat-sheet-bg: rgb(20 20 20 / 88%);
  --mat-blur: blur(24px) saturate(1.6);

  /* type scale */
  --fs-display: clamp(30px, 8.4vw, 38px);
  --fs-title1: 27px;
  --fs-title2: 22px;
  --fs-headline: 17px;
  --fs-body: 16px;
  --fs-subhead: 15px;
  --fs-foot: 13px;
  --fs-caption: 12px;
  --fs-micro: 11px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-full: 999px;

  /* spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* gutters + chrome metrics */
  --gutter: 16px;
  --header-h: 52px;
  --dock-h: 58px;

  /* safe areas (single consumers live in shell.css) */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);

  /* z ladder */
  --z-content: 1;
  --z-grain: 4;
  --z-header: 100;
  --z-dock: 200;
  --z-details: 300;
  --z-player: 600;
  /* sheets/popovers/toast float ABOVE the player (quality picker, resume toast) */
  --z-sheet-bd: 650;
  --z-sheet: 660;
  --z-popover: 670;
  --z-toast: 700;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-switch: cubic-bezier(0.3, 1.2, 0.4, 1);

  --dur-fast: 110ms;
  --dur-med: 180ms;
  --dur-nav: 110ms;
  --dur-spring: 300ms;
  --dur-sheet: 380ms;

  --ring: var(--accent-300);

  /* generated-art hues consumed by components.css patterns */
  --h: 220;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f2efea;
  --elevated: #ffffff;
  --border: rgb(28 25 23 / 8%);
  --border-strong: rgb(28 25 23 / 16%);

  --text: #1b1a20;
  --text-muted: #55525d;
  --text-faint: #726e7a;

  --accent: var(--accent-600);
  --accent-text: #5846c8;
  --on-accent: #ffffff;
  --accent-subtle: rgb(108 74 233 / 10%);
  --ring: var(--accent-600);

  --danger: #be3434;
  --danger-text: #b02e2e;
  --star: #b07818;

  --scrim: rgb(28 25 23 / 44%);

  /* dock goes warm-white glass; header STAYS dark glass in both themes */
  --mat-dock-bg: rgb(252 250 247 / 78%);
  --mat-thin-bg: rgb(255 255 255 / 66%);
  --mat-sheet-bg: rgb(255 255 255 / 92%);
}

/* base: reset-lite, shell grid, scroll architecture, overscroll material */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  height: 100%;
  background: var(--bg);
  overscroll-behavior: none;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-subhead);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
input,
textarea { user-select: text; -webkit-user-select: text; }

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
}
button, a, input, [role="switch"], [role="button"] { touch-action: manipulation; }
::selection { background: rgb(161 134 255 / 32%); }
:root[data-theme="light"] ::selection { background: rgb(108 74 233 / 18%); }
input { caret-color: var(--accent); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

.num { font-variant-numeric: tabular-nums lining-nums; }
.micro {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.skip-link {
  position: fixed;
  top: -48px;
  left: 12px;
  z-index: 999;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--elevated);
  transition: top 120ms var(--ease-out);
}
.skip-link:focus-visible { top: 12px; }

/* ---- shell ---- */
#app {
  position: relative;
  z-index: var(--z-content);
  display: grid;
  height: 100vh;
  height: 100dvh;
  grid-template-areas: "hdr" "stage" "dock";
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
}
#app > #hdr { grid-area: hdr; }
#app > #stage { grid-area: stage; }
#app > #dock { grid-area: dock; }
@supports not (height: 100dvh) {
  #app { height: -webkit-fill-available; }
}

/* ---- background / overscroll material (non-scrolling layer) ---- */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
.bg-hero {
  display: none;
}
#bg[data-route="home"] .bg-hero,#bg[data-route="details"] .bg-hero{display:none;opacity:0}
.bg-ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 44% at 50% -6%, rgb(255 255 255 / 3.5%), transparent 62%),
    radial-gradient(130% 40% at 50% 108%, rgb(0 0 0 / 28%), transparent 60%);
}
:root[data-theme="light"] .bg-ambient {
  background:
    radial-gradient(120% 44% at 50% -6%, rgb(108 74 233 / 7%), transparent 62%),
    radial-gradient(130% 40% at 50% 108%, rgb(28 25 23 / 6%), transparent 60%);
}
.grain {
  position: absolute;
  inset: 0;
  z-index: var(--z-grain);
  background-image: url("/grain.svg");
  background-size: 180px 180px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}
:root[data-theme="light"] .grain { opacity: 0.03; mix-blend-mode: multiply; }

/* ---- stage + views (each view owns its scroller) ---- */
#stage { position: relative; min-height: 0; }
.view {
  position: absolute;
  inset: 0;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.view.is-active { visibility: visible; }
.vscroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  scrollbar-width: none;
}
.vscroll::-webkit-scrollbar { display: none; }

/* page transitions: quick fade — less overlay */
.scroll-end { height: calc(var(--dock-h) + var(--sab) + 28px); }
@keyframes view-in {
  from { opacity: 0; translate: 0 4px; }
  to { opacity: 1; translate: 0 0; }
}
.view.is-active > .vscroll { animation: view-in var(--dur-nav) var(--ease-out); }
.view.is-exiting { visibility: visible; pointer-events: none; }
.view.is-exiting > .vscroll {
  animation: none;
  opacity: 0;
  transition: opacity 80ms var(--ease-in);
}

/* reduced motion (system or in-app) collapses everything */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
:root[data-motion="reduce"] *,
:root[data-motion="reduce"] *::before,
:root[data-motion="reduce"] *::after {
  animation-duration: 1ms !important;
  transition-duration: 1ms !important;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  background: var(--bg);
  padding: 24px;
}

/* shell: header, dock, sidebar, brand, icon buttons */
#hdr {
  position: relative;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(var(--header-h) + var(--sat));
  padding: var(--sat) 8px 0;
  background: transparent;
  transition: background-color 220ms var(--ease-io), box-shadow 220ms var(--ease-io);
}
:root[data-scrolled] #hdr {
  background: var(--mat-header-bg);
  -webkit-backdrop-filter: var(--mat-blur);
  backdrop-filter: var(--mat-blur);
  box-shadow: inset 0 -0.5px 0 var(--border);
}
/* while over cinematic artwork (home top), header chrome is light-on-dark
   in BOTH themes so it reads against the art and matches the status bar */
:root[data-route="home"]:not([data-scrolled]) #hdr {
  background: linear-gradient(180deg, rgb(8 8 12 / 44%), transparent);
}
:root[data-route="home"]:not([data-scrolled]) #hdr .brand span,
:root[data-route="home"]:not([data-scrolled]) #hdr .icon-btn { color: rgb(255 255 255 / 88%); }
@media (min-width: 900px) {
  :root[data-route="home"]:not([data-scrolled]) #hdr {
    background: linear-gradient(180deg, rgb(8 8 12 / 30%), transparent);
  }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
}
.brand svg { color: var(--accent); }
.brand span {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.hdr-actions { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { color: var(--text); }
.pressable:active { transform: scale(0.94); opacity: 0.85; }

/* ---- mobile dock ---- */
#dock {
  position: relative;
  z-index: var(--z-dock);
  padding-bottom: var(--sab);
  background: var(--mat-dock-bg);
  -webkit-backdrop-filter: var(--mat-blur);
  backdrop-filter: var(--mat-blur);
  box-shadow: inset 0 0.5px 0 var(--border);
}
.dock-inner { position: relative; height: var(--dock-h); }
.dock-links { position: absolute; inset: 0 8px; display: flex; }
.dock-pill {
  position: absolute;
  top: 9px;
  left: 8px;
  width: 56px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--accent-subtle);
  transform: translateX(0);
  transition: transform var(--dur-spring) var(--ease-spring), width var(--dur-spring) var(--ease-spring);
}
.dock-link {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 590;
  letter-spacing: 0.01em;
  transition: color 180ms var(--ease-out);
}
.dock-link svg { width: 23px; height: 23px; }
.dock-link[aria-current="page"] { color: var(--text); }
.dock-link[aria-current="page"] .dl-ico { animation: dock-pop 260ms var(--ease-spring); }
@keyframes dock-pop {
  0% { scale: 1; }
  45% { scale: 1.12; }
  100% { scale: 1; }
}

/* ---- desktop sidebar ---- */
#side { display: none; }

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
    --header-h: 60px;
  }
  #app {
    grid-template-areas: "side hdr" "side stage";
    grid-template-columns: 232px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  #dock { display: none; }
  /* sidebar owns branding on desktop */
  #hdr .brand { display: none; }
  #hdr {
    justify-content: flex-end;
    padding: 0 var(--gutter) 0 24px;
    min-height: var(--header-h);
  }
  :root[data-scrolled] #hdr {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  #side {
    display: flex;
    flex-direction: column;
    grid-area: side;
    padding: 18px 16px 20px;
    border-right: 0.5px solid var(--border);
  }
  #side .brand { margin: 4px 6px 22px; }
  .side-group { display: flex; flex-direction: column; gap: 2px; }
  .side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    color: var(--text-muted);
    font-size: var(--fs-subhead);
    font-weight: 500;
    transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  }
  .side-link:hover { background: rgb(255 255 255 / 4%); color: var(--text); }
  :root[data-theme="light"] .side-link:hover { background: rgb(28 25 23 / 4%); }
  .side-link svg { width: 20px; height: 20px; }
  .side-link[aria-current="page"] {
    background: var(--surface-2);
    color: var(--text);
  }
  .side-link[aria-current="page"] svg { color: var(--accent); }
  .side-foot { margin-top: auto; padding: 0 12px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 48px; }
}

/* components: buttons, pills, cards, generated art, rails, grids, switch, sheet, dialog, toast */

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--r-md);
  font-size: var(--fs-headline);
  font-weight: 600;
  transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.glass {
  background: var(--mat-thin-bg);
  -webkit-backdrop-filter: var(--mat-blur);
  backdrop-filter: var(--mat-blur);
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
  color: var(--text);
}
.btn.ghost { color: var(--accent-text); }
.btn.ghost:hover { background: var(--accent-subtle); }
.btn.danger-fill { background: var(--danger); color: #fff; }
.btn.lg { height: 50px; }
.btn.icon { width: 50px; padding: 0; }

/* ---- pills / chips ---- */
.pill-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.pill-row::-webkit-scrollbar { display: none; }
/* Home sheet uses no page padding — remove bleed that gets clipped by .vscroll */
.sheet-seam .pill-row,
#home-pills .pill-row {
  margin-inline: 0;
}
.pill {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-full);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  color: var(--text-muted);
  font-size: var(--fs-caption);
  font-weight: 500;
  transition: background-color 180ms var(--ease-io), color 180ms var(--ease-io),
    box-shadow 180ms var(--ease-io), transform var(--dur-fast) var(--ease-out);
}
.pill:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--text-faint); }
.pill:active { transform: scale(0.96); }
.pill[aria-pressed="true"],
.pill[aria-selected="true"] {
  background: var(--text);
  color: var(--bg);
  box-shadow: none;
}

/* segmented (Movies | Series) */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--r-full);
  background: var(--surface-2);
}
.seg button {
  height: 32px;
  padding: 0 16px;
  border-radius: var(--r-full);
  color: var(--text-muted);
  font-size: var(--fs-caption);
  font-weight: 600;
  transition: background-color 180ms var(--ease-io), color 180ms var(--ease-io);
}
.seg button[aria-selected="true"] { background: var(--text); color: var(--bg); }

/* ---- generated artwork ---- */
.card-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(90% 60% at 70% 18%, hsl(var(--h) 70% 58% / 34%), transparent 58%),
    linear-gradient(158deg, hsl(var(--h) 44% 22%) 0%, hsl(var(--h) 46% 13%) 62%, hsl(var(--h) 40% 9%) 100%);
}
.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 46%, rgb(0 0 0 / 46%) 100%),
    radial-gradient(120% 120% at 50% 38%, transparent 56%, rgb(0 0 0 / 38%) 100%);
}
.p-dunes .art-fx {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 46% at 30% 112%, hsl(var(--h) 38% 26% / 90%) 0 34%, transparent 36%),
    radial-gradient(130% 52% at 78% 118%, hsl(var(--h) 34% 19% / 90%) 0 40%, transparent 42%);
}
.p-waves .art-fx {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(168deg, hsl(var(--h) 50% 30% / 30%) 0 12px, transparent 12px 34px);
}
.p-rings .art-fx {
  position: absolute; inset: 0;
  background: repeating-radial-gradient(circle at 62% 34%, transparent 0 14px, hsl(var(--h) 80% 70% / 16%) 14px 16px);
}
.p-grid .art-fx {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, hsl(var(--h) 70% 66% / 10%) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(90deg, hsl(var(--h) 70% 66% / 10%) 0 1px, transparent 1px 18px);
}
.p-static .art-fx {
  position: absolute; inset: 0;
  background: repeating-conic-gradient(from 0deg at 50% 42%, hsl(var(--h) 60% 62% / 12%) 0deg 1.4deg, transparent 1.4deg 3deg);
}
.p-bloom .art-fx {
  position: absolute; inset: 0;
  background:
    radial-gradient(46% 40% at 30% 30%, hsl(var(--h) 82% 68% / 40%), transparent 70%),
    radial-gradient(40% 36% at 74% 58%, hsl(calc(var(--h) + 40) 70% 62% / 30%), transparent 70%),
    radial-gradient(30% 30% at 56% 22%, hsl(calc(var(--h) - 30) 70% 60% / 26%), transparent 70%);
}
.p-stripes .art-fx {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, hsl(var(--h) 48% 26% / 85%) 0 24px, hsl(var(--h) 42% 14% / 85%) 24px 52px);
}
.p-shards .art-fx {
  position: absolute; inset: 0;
  background: linear-gradient(64deg, transparent 0 44%, hsl(var(--h) 60% 40% / 80%) 44.2% 56%, hsl(var(--h) 85% 70% / 55%) 56.2% 58.4%, transparent 58.6%);
}
.p-orbit .art-fx {
  position: absolute; inset: 0;
  background:
    radial-gradient(26% 26% at 62% 38%, hsl(var(--h) 80% 66% / 85%) 0 38%, transparent 40%),
    radial-gradient(58% 20% at 62% 38%, transparent 0 46%, hsl(var(--h) 70% 60% / 40%) 47% 49%, transparent 50%);
}
.p-aurora .art-fx {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, hsl(calc(var(--h) + 20) 80% 64% / 20%) 0 8%, transparent 8% 18%),
    radial-gradient(80% 34% at 50% 0%, hsl(var(--h) 82% 66% / 34%), transparent 70%);
}

/* ---- cards ---- */
.card {
  position: relative;
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 0.5px var(--border);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.card.poster { aspect-ratio: 2 / 3; }
.card.wide { aspect-ratio: 16 / 9; }
@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: inset 0 0 0 0.5px var(--border-strong), 0 10px 26px rgb(0 0 0 / 40%);
  }
  :root[data-theme="light"] .card:hover { box-shadow: inset 0 0 0 0.5px var(--border-strong), 0 10px 24px rgb(28 25 23 / 14%); }
}
.card:active { transform: scale(0.965); transition-duration: var(--dur-fast); }
.card-title {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 6px rgb(0 0 0 / 45%);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.card-heart {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  color: #fff;
  background: rgb(10 10 16 / 45%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0.92;
  transition: transform var(--dur-fast) var(--ease-spring), color var(--dur-fast) var(--ease-out);
}
.card-heart svg { width: 16px; height: 16px; }
.card-heart:active { transform: scale(0.88); }
.card-heart[aria-pressed="true"] { color: var(--accent-400); }
:root[data-theme="light"] .card-heart[aria-pressed="true"] { color: var(--accent-600); }
@media (hover: hover) {
  .card-heart { opacity: 0; }
  .card:hover .card-heart, .card-heart:focus-visible { opacity: 0.92; }
}
.card-prog {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 3px;
  border-radius: var(--r-full);
  background: rgb(255 255 255 / 22%);
  overflow: hidden;
}
.card-prog i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--pct) * 1%);
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--accent-500), var(--accent-400));
}
.card-left {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-size: var(--fs-caption);
  color: rgb(255 255 255 / 78%);
  text-shadow: 0 1px 4px rgb(0 0 0 / 60%);
}
.top10-item { display: flex; align-items: flex-end; flex: 0 0 auto; }
.top10-num {
  width: 44px;
  margin-right: -16px;
  font-size: 84px;
  line-height: 0.78;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px rgb(255 255 255 / 32%);
}
:root[data-theme="light"] .top10-num { -webkit-text-stroke: 2px rgb(28 25 23 / 26%); }
.top10-item .card.poster { width: 118px; }

/* ---- rails ---- */
.rail-wrap { margin-top: var(--sp-6); }
.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 var(--gutter);
  margin-bottom: var(--sp-3);
}
.rail-head h2 { font-size: var(--fs-headline); font-weight: 650; letter-spacing: -0.005em; }
.rail-head .see-all { font-size: var(--fs-caption); font-weight: 600; color: var(--accent-text); }

.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px var(--gutter) 14px;
  margin-inline: calc(var(--gutter) * -1);
  scroll-snap-type: x proximity;
  scroll-padding-inline-start: var(--gutter);
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.sheet-seam .rail {
  margin-inline: 0;
}
.rail > * { flex: 0 0 auto; scroll-snap-align: start; }
.rail .card.poster { width: 118px; }
.rail .card.wide { width: 246px; }
@media (min-width: 900px) {
  .rail { padding-bottom: 18px; }
  .rail .card.poster { width: 172px; }
  .rail .card.wide { width: 320px; }
  .top10-item .card.poster { width: 150px; }
  .top10-num { font-size: 108px; }
}

/* ---- grids ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(106px, 1fr));
  gap: 16px 12px;
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 22px 20px; }
}

/* ---- page scaffold ---- */
.page { padding: 4px var(--gutter) calc(var(--dock-h) + var(--sab) + 28px); }
/* grid rows already clear header+safe-area; just breathe */
.view:not(#v-home) .page { padding-top: 12px; }
.page-head { margin: 10px 0 16px; }
.page-head h1 { font-size: var(--fs-title2); font-weight: 700; letter-spacing: -0.012em; }
.page-head .sub { margin-top: 2px; font-size: var(--fs-foot); color: var(--text-muted); }
.count-line { margin: 14px 0 12px; font-size: var(--fs-caption); color: var(--text-muted); }

/* ---- search field ---- */
.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: inset 0 0 0 0.5px var(--border-strong);
  transition: box-shadow 180ms var(--ease-io);
}
.search-field:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 3px var(--accent-subtle);
}
.search-field svg { width: 18px; height: 18px; color: var(--text-faint); flex: 0 0 auto; }
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 16px;
  outline: none;
}
.search-field input::placeholder { color: var(--text-faint); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-clear {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  color: var(--text-faint);
}
.search-clear:hover { color: var(--text); }

/* ---- switch ---- */
.switch {
  position: relative;
  width: 51px;
  height: 31px;
  flex: 0 0 auto;
  border-radius: var(--r-full);
  background: rgb(120 120 128 / 32%);
  transition: background-color 200ms var(--ease-io);
}
:root[data-theme="light"] .switch { background: #e9e9eb; }
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: var(--r-full);
  background: #fff;
  box-shadow: 0 3px 8px rgb(0 0 0 / 18%), 0 1px 1px rgb(0 0 0 / 16%);
  transition: transform var(--dur-spring) var(--ease-switch);
}
.switch[aria-checked="true"] { background: var(--accent-600); }
:root[data-theme="light"] .switch[aria-checked="true"] { background: var(--accent-600); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:active::after { scale: 1.12; }

/* ---- bottom sheet ---- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-sheet-bd);
  background: var(--scrim);
  opacity: 0;
  border: 0;
  padding: 0;
  transition: opacity 240ms var(--ease-io);
}
.sheet-backdrop.is-on { opacity: 1; }
.sheet-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sheet);
  max-height: 86dvh;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--mat-sheet-bg);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  backdrop-filter: blur(40px) saturate(1.5);
  box-shadow: 0 24px 64px rgb(0 0 0 / 55%), inset 0 0.5px 0 var(--border);
  padding-bottom: calc(var(--sab) + 20px);
  transform: translate3d(0, 105%, 0);
  visibility: hidden;
}
:root[data-theme="light"] .sheet-panel { box-shadow: 0 24px 56px rgb(28 25 23 / 22%), inset 0 0.5px 0 var(--border); }
.sheet-panel.is-open { transform: translate3d(0, 0, 0); visibility: visible; transition: transform var(--dur-sheet) var(--ease-sheet); }
.sheet-panel.is-settling { visibility: visible; transition: transform 320ms var(--ease-in), height 320ms var(--ease-sheet); }
.sheet-panel.is-dragging { transition: none; visibility: visible; }
.sheet-grab {
  display: grid;
  place-items: center;
  height: 34px;
  touch-action: none;
  cursor: grab;
}
.sheet-grab i {
  width: 36px;
  height: 5px;
  border-radius: var(--r-full);
  background: var(--border-strong);
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 20px 10px;
}
.sheet-head h2 { font-size: var(--fs-headline); font-weight: 650; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; max-height: 62dvh; }
.sheet-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 0 22px;
  text-align: left;
  font-size: var(--fs-subhead);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.sheet-opt:hover { background: rgb(255 255 255 / 4%); }
:root[data-theme="light"] .sheet-opt:hover { background: rgb(28 25 23 / 4%); }
.sheet-opt:active { background: var(--accent-subtle); }
.sheet-opt .so-check { margin-left: auto; color: var(--accent); opacity: 0; }
.sheet-opt[aria-selected="true"] .so-check { opacity: 1; }
.sheet-opt .so-sub { display: block; font-size: var(--fs-caption); color: var(--text-muted); }

/* ---- popover (desktop pickers) ---- */
.pop-bd {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-popover) - 1);
  background: none;
  border: 0;
}
.pop {
  position: fixed;
  z-index: var(--z-popover);
  min-width: 220px;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--elevated);
  box-shadow: 0 4px 12px rgb(0 0 0 / 40%), 0 16px 40px rgb(0 0 0 / 50%), inset 0 0 0 0.5px var(--border);
  animation: view-in 150ms var(--ease-out);
}
:root[data-theme="light"] .pop { box-shadow: 0 4px 10px rgb(28 25 23 / 10%), 0 16px 36px rgb(28 25 23 / 14%), inset 0 0 0 0.5px var(--border); }
.pop .sheet-opt { border-radius: var(--r-xs); min-height: 44px; padding: 0 12px; }

/* ---- confirm dialog ---- */
#dlg { border: 0; padding: 0; background: none; }
#dlg::backdrop { background: var(--scrim); }
.dlg-card {
  width: min(330px, calc(100vw - 48px));
  padding: 22px 20px 16px;
  border-radius: var(--r-lg);
  background: var(--elevated);
  box-shadow: 0 24px 64px rgb(0 0 0 / 60%), inset 0 0 0 0.5px var(--border);
}
:root[data-theme="light"] .dlg-card { box-shadow: 0 24px 56px rgb(28 25 23 / 20%), inset 0 0 0 0.5px var(--border); }
.dlg-card h2 { font-size: var(--fs-headline); font-weight: 650; text-align: center; }
.dlg-card p { margin: 8px 0 18px; font-size: var(--fs-foot); color: var(--text-muted); text-align: center; }
.dlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg-actions .btn { height: 42px; font-size: var(--fs-subhead); }

/* ---- toast ---- */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-h) + var(--sab) + 16px);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: var(--r-full);
  background: var(--elevated);
  box-shadow: 0 8px 28px rgb(0 0 0 / 45%), inset 0 0 0 0.5px var(--border);
  font-size: var(--fs-foot);
  font-weight: 500;
  opacity: 0;
  translate: -50% 12px;
  visibility: hidden;
  transition: opacity 220ms var(--ease-out), translate 260ms var(--ease-spring), visibility 0s 260ms;
}
#toast.is-on { opacity: 1; translate: -50% 0; visibility: visible; transition-delay: 0s; }
:root[data-motion="reduce"] #toast { translate: -50% 0; }
.toast-act { color: var(--accent-text); font-weight: 650; font-size: var(--fs-foot); }

/* ---- empty states ---- */
.empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 56px 24px;
  text-align: center;
}
.empty-ico {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  border-radius: var(--r-full);
  color: var(--text-faint);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 0.5px var(--border);
}
.empty-ico svg { width: 26px; height: 26px; }
.empty h2 { font-size: var(--fs-headline); font-weight: 650; }
.empty p { max-width: 300px; font-size: var(--fs-foot); color: var(--text-muted); }
.empty-tall { padding-top: 34vh; }
.empty .btn { margin-top: 14px; }

/* features: home hero + rails, browse, search, list, details, settings, player chrome */

/* ---- home ---- */
.hero {
  position: relative;
  height: clamp(430px, 74svh, 640px);
  display: flex;
  align-items: flex-end;
}
.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  padding: 0 var(--gutter) 44px;
}
/* hero copy always lives on cinematic art: light-on-dark in BOTH themes */
.hero-copy h1 { color: #fff; }
.hero .tag { color: rgb(255 255 255 / 92%); background: rgb(16 16 24 / 55%); box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 14%); }
.hero .tag.accent { color: var(--accent-300); background: rgb(161 134 255 / 16%); box-shadow: none; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--mat-thin-bg);
  -webkit-backdrop-filter: var(--mat-blur);
  backdrop-filter: var(--mat-blur);
  box-shadow: inset 0 0 0 0.5px var(--border);
}
.tag.accent { color: var(--accent-text); background: var(--accent-subtle); box-shadow: none; }
.hero-copy h1 {
  font-size: var(--fs-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgb(0 0 0 / 45%);
}
.hero-meta {
  margin-top: 10px;
  font-size: var(--fs-foot);
  color: rgb(255 255 255 / 75%);
}
.hero-meta .dot { margin: 0 7px; opacity: 0.5; }
.hero-desc {
  margin-top: 10px;
  font-size: var(--fs-foot);
  line-height: 1.5;
  color: rgb(255 255 255 / 82%);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.hero-cta { display: flex; gap: 10px; margin-top: 18px; }
.hero-cta .btn.glass { color: #fff; }
.hero-score { display: inline-flex; align-items: center; gap: 4px; }
.hero-score svg { width: 12px; height: 12px; color: var(--star); }
.hero-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--bg));
}
/* architectural seam: dark film above, themed paper below (light mode keeps
   the hero cinematic; the rounded sheet edge IS the design statement) */
.sheet-seam {
  position: relative;
  z-index: 1;
  margin-top: -26px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--bg);
  padding-top: 2px;
}
.home-pills { margin-top: 14px; }

/* ---- browse / search / list shared ---- */
.seg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chip-row { margin-top: 12px; }

/* ---- details ---- */
.dt-back {
  position: fixed;
  top: calc(var(--sat) + 10px);
  left: max(10px, var(--sal));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-full);
  color: #fff;
  background: rgb(10 10 16 / 45%);
  -webkit-backdrop-filter: var(--mat-blur);
  backdrop-filter: var(--mat-blur);
  box-shadow: inset 0 0 0 0.5px var(--border);
}
.dt-back:active { transform: scale(0.92); }
.dt-hero {
  position: relative;
  height: clamp(240px, 52vw, 360px);
  margin-top: calc(var(--sat) * -1);
}
.dt-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(10 10 16 / 55%), transparent 36%), linear-gradient(180deg, transparent 55%, var(--bg) 97%);
}
.dt-body { position: relative; z-index: 1; padding: 0 var(--gutter) 48px; }
.dt-title { font-size: var(--fs-title1); font-weight: 700; letter-spacing: -0.014em; line-height: 1.12; }
.dt-meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: var(--fs-foot); color: var(--text-muted); }
.dt-meta .dot { margin: 0 7px; opacity: 0.5; }
.dt-score { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); }
.dt-score svg { width: 12px; height: 12px; color: var(--star); }
.dt-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dt-actions { display: flex; gap: 10px; margin-top: 18px; }
.dt-actions .btn.primary { flex: 1; }
.dt-desc { margin-top: 18px; font-size: var(--fs-body); line-height: 1.55; color: var(--text-muted); }
.dt-desc.clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.dt-more { margin-top: 6px; }
.dt-cast { margin-top: 14px; font-size: var(--fs-foot); color: var(--text-faint); }
.season-row { margin-top: 22px; }
.ep-list { margin-top: 12px; display: flex; flex-direction: column; }
.ep {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  text-align: left;
  border-radius: var(--r-xs);
}
.ep + .ep { box-shadow: inset 0 0.5px 0 var(--border); }
.ep-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xs);
  overflow: hidden;
}
.ep-thumb .card-prog { left: 6px; right: 6px; bottom: 5px; }
.ep-num { width: 20px; text-align: center; font-size: var(--fs-caption); color: var(--text-faint); flex: 0 0 auto; }
.ep-info { flex: 1; min-width: 0; }
.ep-title { font-size: var(--fs-subhead); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-sub { margin-top: 1px; font-size: var(--fs-caption); color: var(--text-faint); }
.ep-desc {
  margin-top: 3px;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.ep-play {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  color: var(--text-muted);
}
.ep-play:hover { color: var(--text); background: var(--surface-2); }
.ep.watched { opacity: 0.55; }

/* ---- settings ---- */
@media (min-width: 900px) {
  #v-settings .page { max-width: 760px; }
}
.set-group { margin-top: 22px; }
.set-group > .micro { display: block; padding: 0 4px 8px; }
.set-card {
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 0.5px var(--border), 0 1px 2px rgb(28 25 23 / 4%);
  overflow: hidden;
}
.set-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 16px;
  text-align: left;
}
.set-row + .set-row { box-shadow: inset 0 0.5px 0 var(--border); }
.set-row .sr-label { flex: 1; min-width: 0; }
.set-row .sr-label b { display: block; font-size: var(--fs-subhead); font-weight: 550; }
.set-row .sr-label span { display: block; font-size: var(--fs-caption); color: var(--text-muted); margin-top: 1px; }
.set-row .sr-val { font-size: var(--fs-subhead); color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.set-row .sr-val svg { width: 14px; height: 14px; }
.set-row.danger b { color: var(--danger-text); }
button.set-row:active { background: var(--surface-2); }
.about-note { padding: 14px 4px 0; font-size: var(--fs-caption); color: var(--text-faint); line-height: 1.5; }

/* ---- player ---- */
#player {
  position: fixed;
  inset: 0;
  z-index: var(--z-player);
  background: #000;
  display: flex;
  flex-direction: column;
  animation: view-in 180ms var(--ease-out);
}
#player.is-closing { opacity: 0; transition: opacity 150ms var(--ease-in); }
.pv-stage { position: relative; flex: 1; min-height: 0; background: #000; overflow: hidden; }
.pv-stage video { width: 100%; height: 100%; object-fit: contain; }
.pv-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: var(--fs-foot);
}
.pv-chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, rgb(0 0 0 / 55%), transparent 22% 62%, rgb(0 0 0 / 72%));
  opacity: 1;
  transition: opacity 300ms var(--ease-io);
  padding-top: var(--sat);
  padding-bottom: var(--sab);
}
#player.is-hidden .pv-chrome { opacity: 0; pointer-events: none; }
#player.is-hidden { cursor: none; }
.pv-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.pv-top .pv-title { flex: 1; min-width: 0; font-size: var(--fs-subhead); font-weight: 550; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-full);
  color: #fff;
  background: rgb(255 255 255 / 14%);
  -webkit-backdrop-filter: var(--mat-blur);
  backdrop-filter: var(--mat-blur);
  font-size: var(--fs-caption);
  font-weight: 600;
}
.pv-mid { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.pv-big {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: var(--r-full);
  color: #fff;
  background: rgb(20 20 28 / 55%);
  -webkit-backdrop-filter: var(--mat-blur);
  backdrop-filter: var(--mat-blur);
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 22%);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.pv-big:active { transform: scale(0.92); }
.pv-bottom { padding: 6px 16px 12px; }
.pv-scrub { display: flex; align-items: center; gap: 12px; }
.pv-time { font-size: var(--fs-caption); color: rgb(255 255 255 / 70%); flex: 0 0 auto; }
.pv-time.cur { color: #fff; }
input[type="range"].scrub {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 40px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
input[type="range"].scrub::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent-400) var(--fill, 0%), rgb(255 255 255 / 26%) var(--fill, 0%));
}
input[type="range"].scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 40%);
}
input[type="range"].scrub::-moz-range-track { height: 4px; border-radius: 2px; background: rgb(255 255 255 / 26%); }
input[type="range"].scrub::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent-400); }
input[type="range"].scrub::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.pv-transport { display: flex; align-items: center; justify-content: center; gap: 30px; margin-top: 4px; }
.pv-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-full);
  color: rgb(255 255 255 / 85%);
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.pv-btn:hover { color: #fff; }
.pv-btn:active { transform: scale(0.9); }
.pv-btn.main { width: 56px; height: 56px; color: #fff; }
.pv-btn svg { width: 24px; height: 24px; }
.pv-btn.main svg { width: 30px; height: 30px; }
.pv-btn[disabled] { opacity: 0.35; pointer-events: none; }
.pv-next {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 72%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms var(--ease-out);
}
.pv-next.is-on { opacity: 1; visibility: visible; }
.pv-next-card { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 24px; }
.pv-next-card .micro { color: rgb(255 255 255 / 60%); }
.pv-next-card h3 { color: #fff; font-size: var(--fs-title2); font-weight: 700; }
.pv-next-card .count { font-size: var(--fs-foot); color: rgb(255 255 255 / 70%); }
.pv-next-actions { display: flex; gap: 10px; }
.pv-demo {
  position: absolute;
  right: 14px;
  bottom: calc(var(--sab) + 64px);
  z-index: 2;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 55%);
}
@media (hover: none) {
  .pv-btn, .pv-big { color: #fff; }
}

/* details overlay root */
#overlays { position: relative; z-index: var(--z-details); }
.overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-details);
  background: var(--bg);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  animation: view-in 200ms var(--ease-out);
}
.overlay::-webkit-scrollbar { display: none; }
.overlay.is-closing { pointer-events: none; opacity: 0; transition: opacity 150ms var(--ease-in); }
.overlay .page { padding-top: 0; }
