/* ==========================================================================
   Arnav Movies — design system
   Dark, glassy, rounded. Every color is a token so themes stay one edit away.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #050507;
  --bg-2: #0b0b0f;
  --surface: rgba(28, 28, 32, 0.55);
  --surface-strong: rgba(36, 36, 42, 0.78);
  --surface-solid: #16161a;
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --highlight: rgba(255, 255, 255, 0.07);
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.66);
  --text-3: rgba(235, 235, 245, 0.42);
  --accent: #ffb340;
  --accent-2: #ff7a45;
  --accent-grad: linear-gradient(135deg, #ffd66b 0%, #ffb340 45%, #ff7a45 100%);
  --chart-bar: #cf7a12;
  --chart-grid: rgba(255, 255, 255, 0.08);
  --focus: #64a8ff;
  --danger: #ff6961;
  --amb-1: 255, 179, 64;
  --amb-2: 90, 110, 255;

  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --pill: 999px;

  --blur: saturate(180%) blur(28px);
  --shadow-1: 0 1px 0 var(--highlight) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 1px 0 var(--highlight) inset, 0 30px 80px -20px rgba(0, 0, 0, 0.85);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --nav-h: 64px;
  --tab-h: 0px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  min-height: 100svh;
  overflow-x: clip; /* clip, not hidden: hidden would make body a scroll container and break position: sticky */
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 12px; }
::selection { background: rgba(255, 179, 64, 0.35); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ambient light ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }
.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.32;
  transition: background 1.4s var(--ease);
}
.ambient::before { top: -35vmax; left: -20vmax; background: radial-gradient(circle, rgba(var(--amb-1), 0.9), transparent 65%); animation: drift 28s ease-in-out infinite alternate; }
.ambient::after { bottom: -45vmax; right: -25vmax; background: radial-gradient(circle, rgba(var(--amb-2), 0.7), transparent 65%); animation: drift 34s ease-in-out infinite alternate-reverse; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* ---------- glass primitive ---------- */
.glass {
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 0.5px solid var(--hairline);
  box-shadow: var(--shadow-1);
}

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 24px));
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 16px;
  border-radius: var(--pill);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), top 0.4s var(--ease);
}
.topbar.is-top { background: rgba(20, 20, 24, 0.25); box-shadow: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 19px; margin-right: auto; }
.brand__mark { width: 28px; height: 28px; border-radius: 9px; background: var(--accent-grad); display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgba(255, 150, 60, 0.7); }
.brand__mark svg { width: 16px; height: 16px; color: #1a1205; }
.nav { display: flex; gap: 2px; position: relative; }
.nav a {
  position: relative;
  z-index: 1;
  padding: 8px 16px;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.25s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--text); }
.nav__pill { position: absolute; z-index: 0; top: 0; height: 100%; border-radius: var(--pill); background: rgba(255, 255, 255, 0.12); box-shadow: 0 1px 0 rgba(255,255,255,.08) inset; transition: transform 0.5s var(--spring), width 0.5s var(--spring), opacity 0.3s; }
.topbar__actions { display: flex; gap: 6px; margin-left: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text); transition: background 0.2s, transform 0.2s var(--spring); }
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 14px; border-radius: var(--pill); background: rgba(255,255,255,.07); color: var(--text-2); font-size: 14px; transition: background .2s; }
.search-trigger:hover { background: rgba(255,255,255,.12); color: var(--text); }
.search-trigger svg { width: 17px; height: 17px; }
.kbd { font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 0.5px solid var(--hairline-strong); color: var(--text-3); font-family: inherit; }

/* ---------- bottom tab bar (mobile) ---------- */
.tabbar { display: none; }

/* ---------- main / views ---------- */
main { min-height: 100svh; outline: none; }
.view { padding-top: calc(var(--nav-h) + 28px); padding-bottom: 80px; animation: viewIn 0.6s var(--ease) both; }
.view--flush { padding-top: 0; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }
.container { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.page-title { font-size: clamp(34px, 5vw, 56px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin: 6px 0 0; }
.page-sub { color: var(--text-2); margin: 10px 0 0; max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--pill);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.25s var(--spring), background 0.25s, box-shadow 0.25s, opacity .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: scale(0.96); }
.btn--primary { background: #fff; color: #000; box-shadow: 0 10px 30px -10px rgba(255, 255, 255, 0.45); }
.btn--primary:hover { transform: translateY(-1px) scale(1.02); }
.btn--glass { background: rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 0.5px solid var(--hairline-strong); }
.btn--glass:hover { background: rgba(255, 255, 255, 0.22); }
.btn--round { width: 48px; padding: 0; }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--sm.btn--round { width: 38px; }
.btn.is-on { background: rgba(255, 179, 64, 0.2); border-color: rgba(255, 179, 64, 0.5); color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.chips .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 6px; border: 0.5px solid var(--hairline-strong); color: var(--text-2); text-transform: uppercase; }
.badge--free { color: #0b1a0e; background: #7ee2a0; border: 0; }
.badge svg { width: 12px; height: 12px; }

/* pills / segmented */
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; margin: 0 -2px; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid var(--hairline);
  transition: all 0.25s var(--ease);
}
.pill:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.pill.is-active { background: #fff; color: #000; border-color: transparent; }
.segmented { position: relative; display: inline-flex; padding: 4px; border-radius: var(--pill); background: rgba(255,255,255,.07); border: .5px solid var(--hairline); }
.segmented button { position: relative; z-index: 1; height: 36px; padding: 0 18px; border-radius: var(--pill); font-size: 14px; font-weight: 600; color: var(--text-2); transition: color .25s; }
.segmented button.is-active { color: #000; }
.segmented__thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: var(--pill); background: #fff; transition: transform .5s var(--spring), width .5s var(--spring); }
.select { height: 36px; padding: 0 34px 0 14px; border-radius: var(--pill); background: rgba(255,255,255,.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center; border: .5px solid var(--hairline); appearance: none; font-size: 14px; font-weight: 500; }
.select option { background: var(--surface-solid); }

/* ---------- hero ---------- */
.hero { position: relative; height: min(88svh, 900px); min-height: 560px; overflow: hidden; isolation: isolate; }
.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.1s var(--ease), visibility 1.1s; }
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__bg { position: absolute; inset: -8%; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(42px) saturate(160%) brightness(0.62); transform: scale(1.15); }
.hero__slide.is-active .hero__bg img { animation: kenburns 16s ease-out both; }
@keyframes kenburns { from { transform: scale(1.3) translateY(2%); } to { transform: scale(1.12) translateY(-2%); } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(5,5,7,.92) 0%, rgba(5,5,7,.55) 45%, rgba(5,5,7,.1) 75%), linear-gradient(0deg, var(--bg) 0%, rgba(5,5,7,0) 38%); }
.hero__inner { position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: 48px; padding-top: calc(var(--nav-h) + 24px); padding-bottom: 96px; }
.hero__content > * { opacity: 0; transform: translateY(18px); }
.hero__slide.is-active .hero__content > * { animation: rise 0.9s var(--ease) forwards; }
.hero__slide.is-active .hero__content > *:nth-child(2) { animation-delay: 0.08s; }
.hero__slide.is-active .hero__content > *:nth-child(3) { animation-delay: 0.16s; }
.hero__slide.is-active .hero__content > *:nth-child(4) { animation-delay: 0.24s; }
.hero__slide.is-active .hero__content > *:nth-child(5) { animation-delay: 0.32s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em; }
.hero__eyebrow svg { width: 15px; height: 15px; color: var(--accent); }
.hero__title { font-size: clamp(42px, 7vw, 96px); line-height: 0.95; letter-spacing: -0.045em; font-weight: 800; margin: 14px 0 16px; text-wrap: balance;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.72)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__overview { color: var(--text-2); font-size: clamp(15px, 1.3vw, 18px); max-width: 56ch; margin: 18px 0 28px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__poster { justify-self: center; perspective: 1200px; width: min(360px, 100%); }
.tilt { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 2 / 3; box-shadow: 0 50px 100px -30px rgba(0,0,0,.9), 0 0 0 .5px var(--hairline-strong);
  transform: rotateY(-8deg) rotateX(4deg); transition: transform .6s var(--ease); transform-style: preserve-3d; background: var(--surface-solid); }
.tilt img { width: 100%; height: 100%; object-fit: cover; }
.tilt__glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,.28), transparent 50%); mix-blend-mode: soft-light; pointer-events: none; }
.hero__slide.is-active .hero__poster .tilt { animation: floatIn 1.2s var(--ease) both; }
@keyframes floatIn { from { opacity: 0; transform: rotateY(-22deg) rotateX(8deg) translateY(30px) scale(.94); } }
.hero__dots { position: absolute; z-index: 3; bottom: 40px; left: var(--gutter); display: flex; gap: 8px; }
.hero__dot { position: relative; width: 28px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.22); overflow: hidden; transition: width .5s var(--ease); }
.hero__dot.is-active { width: 56px; }
.hero__dot i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.hero__dot.is-active i { animation: progress var(--dur, 9s) linear forwards; }
.hero.is-paused .hero__dot.is-active i { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }
.hero__arrows { position: absolute; z-index: 3; bottom: 28px; right: var(--gutter); display: flex; gap: 10px; }

/* ---------- rows / carousels ---------- */
.rows { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 52px); }
.hero + .rows { margin-top: -40px; }
.row__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.row__title { font-size: clamp(19px, 2vw, 24px); font-weight: 700; letter-spacing: -0.025em; margin: 0; display: flex; align-items: center; gap: 10px; }
.row__title small { font-size: 13px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.row__more { font-size: 14px; color: var(--text-2); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; transition: color .2s; }
.row__more:hover { color: var(--accent); }
.row__more svg { width: 14px; height: 14px; }
.row__wrap { position: relative; }
.row__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--card-w, 186px);
  gap: var(--card-gap, 16px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  padding: 8px var(--gutter) 22px;
  margin: -8px 0 -22px;
  scrollbar-width: none;
}
.row__track::-webkit-scrollbar { display: none; }
.row__track > * { scroll-snap-align: start; }
.row--wide .row__track { --card-w: 330px; }
.row--rank .row__track { --card-w: 250px; }
.row--tiles .row__track { --card-w: 260px; }
.row__nav { position: absolute; z-index: 4; top: 0; bottom: 14px; width: calc(var(--gutter) + 8px); display: grid; place-items: center; opacity: 0; transition: opacity .3s; color: #fff; }
.row__nav span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.row__nav svg { width: 22px; height: 22px; }
.row__nav--prev { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.row__nav--next { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.row__wrap:hover .row__nav:not([disabled]) { opacity: 1; }
.row__nav[disabled] { pointer-events: none; }

/* ---------- cards ---------- */
.card { position: relative; display: block; border-radius: var(--r-md); outline-offset: 4px; -webkit-tap-highlight-color: transparent; }
.card__media {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(135deg, #1c1c22, #121216);
  box-shadow: 0 0 0 .5px var(--hairline), 0 18px 40px -22px rgba(0,0,0,.9);
  isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
/* Images are positioned so they paint above the absolutely-positioned title fallback (in-flow
   content paints beneath positioned siblings regardless of DOM order). */
.card__media > img:not(.card__logo) { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease), transform .8s var(--ease); }
.card__media img.is-loaded { opacity: 1; }
.card__media::after { z-index: 3; }
.card__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.16) 50%, transparent 65%); background-size: 250% 100%; background-position: 120% 0; opacity: 0; transition: opacity .3s, background-position .9s var(--ease); pointer-events: none; }
.card:hover .card__media, .card:focus-visible .card__media { transform: translateY(-6px) scale(1.035); box-shadow: 0 0 0 .5px var(--hairline-strong), 0 30px 60px -24px rgba(0,0,0,.95); }
.card:hover .card__media::after { opacity: 1; background-position: -40% 0; }
.card:hover .card__media img { transform: scale(1.04); }
.card:active .card__media { transform: scale(.97); }
.card__fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; color: var(--text-2);
  background: radial-gradient(120% 80% at 0% 0%, rgba(var(--amb-1), .25), transparent), radial-gradient(120% 80% at 100% 100%, rgba(var(--amb-2), .25), transparent), #141418; }
.card__badge { position: absolute; top: 10px; left: 10px; z-index: 4; }
.card__play { position: absolute; right: 10px; bottom: 10px; z-index: 4; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #000; opacity: 0; transform: scale(.8) translateY(6px); transition: all .35s var(--spring); }
.card__play svg { width: 16px; height: 16px; margin-left: 2px; }
.card:hover .card__play { opacity: 1; transform: none; }
.card__meta { padding: 10px 4px 0; }
.card__title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card--wide .card__media { aspect-ratio: 16 / 9; }
.card__progress { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); overflow: hidden; z-index: 4; }
.card__progress i { display: block; height: 100%; background: var(--accent-grad); border-radius: 4px; }
.card--wide .card__media::before { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(0deg, rgba(0,0,0,.65), transparent 55%); pointer-events: none; }
.card__overlay-title { position: absolute; z-index: 3; left: 14px; right: 14px; bottom: 24px; font-weight: 700; letter-spacing: -0.02em; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.card--rank { display: grid; grid-template-columns: 110px 1fr; align-items: end; }
.card--rank .rank { font-size: 168px; line-height: .78; font-weight: 900; letter-spacing: -0.08em; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.28); margin-right: -18px; user-select: none; transition: -webkit-text-stroke-color .3s; }
.card--rank:hover .rank { -webkit-text-stroke-color: var(--accent); }
.card--rank .card__meta { display: none; }

/* collection tiles */
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 150px; padding: 18px; border-radius: var(--r-lg); overflow: hidden; isolation: isolate;
  background: var(--tile, linear-gradient(135deg, #2b2b36, #15151b)); box-shadow: 0 0 0 .5px var(--hairline-strong) inset; transition: transform .5s var(--ease); }
.tile:hover { transform: translateY(-4px) scale(1.02); }
.tile__img { position: absolute; z-index: -1; right: -14px; top: -10px; width: 46%; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; transform: rotate(10deg); box-shadow: -10px 20px 40px rgba(0,0,0,.5); transition: transform .6s var(--ease); }
.tile:hover .tile__img { transform: rotate(4deg) translateY(4px) scale(1.04); }
.tile__img img { width: 100%; height: 100%; object-fit: cover; }
.tile strong { font-size: 19px; letter-spacing: -0.02em; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.tile span { font-size: 13px; color: rgba(255,255,255,.75); }

/* grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-w, 172px), 1fr)); gap: 28px 18px; }
.grid--wide { --card-w: 280px; }

/* skeletons */
.skel { position: relative; overflow: hidden; background: rgba(255,255,255,.05); border-radius: var(--r-md); }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel--poster { aspect-ratio: 2 / 3; }
.skel--wide { aspect-ratio: 16 / 9; }
.skel--line { height: 12px; margin-top: 10px; width: 70%; border-radius: 6px; }

/* ---------- mood bar ---------- */
.moods { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 4px var(--gutter); margin: 0 calc(var(--gutter) * -1); }
.moods::-webkit-scrollbar { display: none; }
.mood { flex: none; display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 8px; border-radius: var(--pill); font-weight: 600; font-size: 14px; transition: transform .3s var(--spring), background .3s; }
.mood:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); }
.mood i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 17px; background: rgba(255,255,255,.1); }
.mood--surprise { background: var(--accent-grad); color: #1a1205; border: 0; box-shadow: 0 12px 30px -12px rgba(255,150,60,.7); }
.mood--surprise i { background: rgba(0,0,0,.12); }
.mood--surprise svg { width: 18px; height: 18px; }

/* ---------- detail ---------- */
.detail { position: relative; isolation: isolate; }
.detail__backdrop { position: absolute; inset: 0 0 auto; height: min(92svh, 860px); z-index: -1; overflow: hidden; }
.detail__backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(var(--bd-blur, 48px)) saturate(150%) brightness(.55); transform: scale(1.2); }
.detail__backdrop--sharp img { filter: saturate(115%) brightness(.6); transform: none; }
.detail__backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 2%, rgba(5,5,7,.4) 50%, rgba(5,5,7,.65)), linear-gradient(90deg, rgba(5,5,7,.85), transparent 70%); }
.detail__hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: end; padding-top: calc(var(--nav-h) + 72px); }
.detail__poster .tilt { transform: none; }
.detail__title { font-size: clamp(36px, 5.5vw, 76px); line-height: .98; letter-spacing: -0.04em; font-weight: 800; margin: 10px 0 14px; text-wrap: balance; }
.detail__tagline { color: var(--text-2); font-size: 17px; margin: 0 0 14px; }
.detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.detail__body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: clamp(36px, 5vw, 64px); }
.prose { color: var(--text-2); font-size: 17px; line-height: 1.65; margin: 0; }
.panel { border-radius: var(--r-lg); padding: 22px; }
.facts { display: grid; gap: 16px; margin: 0; }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 15px; color: var(--text); }
.facts dd a { text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; }
.facts dd a:hover { color: var(--accent); }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 4px; border-radius: var(--pill); background: rgba(255,255,255,.07); border: .5px solid var(--hairline); font-size: 14px; }
.person__av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: linear-gradient(135deg, rgba(var(--amb-1), .55), rgba(var(--amb-2), .55)); overflow: hidden; }
.person__av img { width: 100%; height: 100%; object-fit: cover; }
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* cast scroller for shows */
.cast { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
.cast::-webkit-scrollbar { display: none; }
.cast__item { text-align: center; }
.cast__img { width: 96px; height: 96px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.06); box-shadow: 0 0 0 .5px var(--hairline-strong); }
.cast__img img { width: 100%; height: 100%; object-fit: cover; }
.cast__name { font-size: 13px; font-weight: 600; line-height: 1.25; }
.cast__role { font-size: 12px; color: var(--text-3); line-height: 1.25; margin-top: 2px; }

/* episodes */
.episodes { display: grid; gap: 12px; }
.ep { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; padding: 12px; border-radius: var(--r-md); transition: background .25s; }
.ep:hover { background: rgba(255,255,255,.05); }
.ep__img { aspect-ratio: 16/9; border-radius: var(--r-sm); overflow: hidden; background: rgba(255,255,255,.05); }
.ep__img img { width: 100%; height: 100%; object-fit: cover; }
.ep__num { font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: .04em; }
.ep__title { font-weight: 650; margin: 2px 0 6px; letter-spacing: -0.01em; }
.ep__text { font-size: 14px; color: var(--text-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.watch-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-md); background: rgba(255,255,255,.06); border: .5px solid var(--hairline); transition: background .2s; }
.watch-card:hover { background: rgba(255,255,255,.1); }
.watch-card__logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--accent-grad); color: #1a1205; flex: none; }
.watch-card small { display: block; color: var(--text-3); font-size: 12px; }
.countdown { display: flex; gap: 10px; margin-top: 10px; }
.countdown div { flex: 1; text-align: center; padding: 10px 4px; border-radius: var(--r-sm); background: rgba(255,255,255,.06); }
.countdown b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.countdown span { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { border-radius: var(--r-lg); padding: 20px; }
.stat__label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.stat__value { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.04em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat__note { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.chart { border-radius: var(--r-lg); padding: 22px 22px 16px; margin-top: 14px; }
.chart__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.chart__title { font-weight: 650; }
.chart__sub { font-size: 13px; color: var(--text-3); }
.bars { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 2px; height: 160px; margin-top: 20px; padding-bottom: 26px; border-bottom: 1px solid var(--chart-grid); }
.bars__grid { position: absolute; inset: 0 0 26px; pointer-events: none; }
.bars__grid span { position: absolute; left: 0; right: 0; border-top: 1px solid var(--chart-grid); font-size: 11px; color: var(--text-3); }
.bar { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; outline: none; }
.bar i { width: min(24px, 60%); min-height: 2px; height: var(--h); background: var(--chart-bar); border-radius: 4px 4px 0 0; transition: height .9s var(--ease), filter .2s; }
.bar:hover i, .bar:focus-visible i { filter: brightness(1.2); }
.bar b { position: absolute; bottom: -24px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.bar__tip { position: absolute; bottom: calc(var(--h) + 10px); left: 50%; transform: translate(-50%, 4px); white-space: nowrap; font-size: 12px; padding: 6px 10px; border-radius: 10px; background: var(--surface-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: .5px solid var(--hairline-strong); opacity: 0; pointer-events: none; transition: all .2s; z-index: 2; }
.bar:hover .bar__tip, .bar:focus-visible .bar__tip { opacity: 1; transform: translate(-50%, 0); }
.bar__tip strong { color: var(--text); }

.empty { text-align: center; padding: 56px 20px; border-radius: var(--r-xl); }
.empty__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.empty__icon svg { width: 28px; height: 28px; color: var(--text-2); }
.empty h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.02em; }
.empty p { margin: 0 auto 20px; color: var(--text-2); max-width: 44ch; }

/* ---------- search palette ---------- */
.palette { position: fixed; inset: 0; z-index: 100; display: grid; justify-items: center; align-items: start; padding: 10vh 16px 16px; visibility: hidden; }
.palette.is-open { visibility: visible; }
.palette__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .35s var(--ease); }
.palette.is-open .palette__scrim { opacity: 1; }
.palette__box { position: relative; width: min(720px, 100%); max-height: 76vh; display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface-strong); overflow: hidden; box-shadow: var(--shadow-2), 0 0 0 .5px var(--hairline-strong);
  opacity: 0; transform: scale(.96) translateY(-10px); transition: transform .45s var(--spring), opacity .3s var(--ease); }
.palette.is-open .palette__box { opacity: 1; transform: none; }
.palette__field { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 64px; border-bottom: .5px solid var(--hairline); }
.palette__field svg { width: 22px; height: 22px; color: var(--text-2); flex: none; }
.palette__field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 19px; letter-spacing: -0.01em; }
.palette__field input::placeholder { color: var(--text-3); }
.palette__field input::-webkit-search-cancel-button { display: none; }
.palette__results { overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.palette__group { padding: 14px 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); display: flex; justify-content: space-between; }
.result { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 10px; border-radius: var(--r-sm); }
.result.is-selected, .result:hover { background: rgba(255,255,255,.09); }
.result__img { width: 44px; height: 62px; border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.06); }
.result__img img { width: 100%; height: 100%; object-fit: cover; }
.result__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result__sub { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result mark { background: none; color: var(--accent); }
.palette__hint { display: flex; gap: 16px; padding: 10px 18px; border-top: .5px solid var(--hairline); font-size: 12px; color: var(--text-3); }
.palette__empty { padding: 30px 16px; text-align: center; color: var(--text-3); }
.palette__suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 10px 14px; }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 200; background: #000; display: grid; place-items: center; opacity: 0; transition: opacity .4s var(--ease); cursor: none; }
.player.is-open { opacity: 1; }
.player.show-ui { cursor: default; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; transition: opacity .35s var(--ease); pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.65), transparent 22%, transparent 68%, rgba(0,0,0,.8)); }
.player.show-ui .player__ui, .player.is-paused .player__ui { opacity: 1; pointer-events: auto; }
.player__top { display: flex; align-items: center; gap: 14px; padding: max(18px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
.player__title { min-width: 0; }
.player__title strong { display: block; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__title span { font-size: 13px; color: var(--text-2); }
.player__center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: clamp(24px, 6vw, 64px); }
.p-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: .5px solid rgba(255,255,255,.15); transition: transform .2s var(--spring), background .2s; }
.p-btn:hover { background: rgba(255,255,255,.22); }
.p-btn:active { transform: scale(.9); }
.p-btn svg { width: 22px; height: 22px; }
.p-btn--big { width: 84px; height: 84px; }
.p-btn--big svg { width: 34px; height: 34px; }
.p-btn--ghost { background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; width: 44px; height: 44px; }
.player__bottom { padding: 0 max(20px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.player__bar { display: flex; align-items: center; gap: 14px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.scrub { position: relative; flex: 1; height: 28px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.scrub__track { position: relative; width: 100%; height: 5px; border-radius: 5px; background: rgba(255,255,255,.22); overflow: hidden; transition: height .2s var(--ease); }
.scrub:hover .scrub__track, .scrub.is-drag .scrub__track { height: 9px; }
.scrub__buf, .scrub__fill { position: absolute; inset: 0 auto 0 0; width: 0; }
.scrub__buf { background: rgba(255,255,255,.28); }
.scrub__fill { background: #fff; }
.scrub__tip { position: absolute; bottom: 30px; transform: translateX(-50%); padding: 4px 8px; border-radius: 8px; background: var(--surface-strong); font-size: 12px; color: #fff; opacity: 0; transition: opacity .2s; pointer-events: none; }
.scrub:hover .scrub__tip, .scrub.is-drag .scrub__tip { opacity: 1; }
.player__controls { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.player__controls .spacer { flex: 1; }
.speed { height: 34px; padding: 0 12px; border-radius: var(--pill); background: rgba(255,255,255,.1); font-size: 13px; font-weight: 600; }
.vol { display: flex; align-items: center; }
.vol input { width: 0; opacity: 0; transition: width .3s var(--ease), opacity .3s; accent-color: #fff; }
.vol:hover input, .vol:focus-within input { width: 90px; opacity: 1; }
.player__toast { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.9); padding: 14px 20px; border-radius: var(--r-md); background: rgba(20,20,24,.7); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); font-weight: 700; font-size: 17px; opacity: 0; transition: all .3s var(--spring); pointer-events: none; }
.player__toast.is-on { opacity: 1; transform: translate(-50%, -50%); }
.player__spinner { position: absolute; width: 54px; height: 54px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .9s linear infinite; opacity: 0; transition: opacity .3s; pointer-events: none; }
.player.is-loading .player__spinner { opacity: 1; }
.player__error { position: absolute; inset: 0; display: none; place-items: center; text-align: center; padding: 24px; }
.player.is-error .player__error { display: grid; }
.player__tap { position: absolute; top: 0; bottom: 0; width: 34%; display: grid; place-items: center; font-weight: 700; opacity: 0; transition: opacity .25s; pointer-events: none; }
.player__tap--l { left: 0; background: radial-gradient(circle at 0% 50%, rgba(255,255,255,.18), transparent 70%); }
.player__tap--r { right: 0; background: radial-gradient(circle at 100% 50%, rgba(255,255,255,.18), transparent 70%); }
.player__tap.is-on { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 300; left: 50%; bottom: calc(24px + var(--tab-h) + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--pill); font-size: 14px; font-weight: 500; animation: toastIn .5s var(--spring) both; }
.toast svg { width: 18px; height: 18px; color: var(--accent); }
.toast.is-out { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.96); } }

/* ---------- footer ---------- */
.footer { padding: 40px var(--gutter) 60px; color: var(--text-3); font-size: 13px; border-top: .5px solid var(--hairline); margin-top: 40px; }
.footer__inner { max-width: 1480px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); }

.load-more { display: flex; justify-content: center; padding: 32px 0; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.15); border-top-color: var(--text); animation: spin .9s linear infinite; }

/* view transitions */
@supports (view-transition-name: none) {
  ::view-transition-old(root) { animation: vtOut .28s var(--ease) both; }
  ::view-transition-new(root) { animation: vtIn .45s var(--ease) both; }
  @keyframes vtOut { to { opacity: 0; transform: scale(.985); } }
  @keyframes vtIn { from { opacity: 0; transform: scale(1.01); } }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero__poster { display: none; }
  .detail__body { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --nav-h: 56px; --tab-h: 74px; --r-lg: 24px; }
  body { font-size: 15px; }
  .topbar { top: 0; width: 100%; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0 16px; border-radius: 0; border-width: 0 0 .5px; }
  .topbar.is-top { background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: transparent; }
  .nav, .search-trigger { display: none; }
  .tabbar {
    position: fixed;
    z-index: 60;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: 64px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-radius: 26px;
    padding: 0 6px;
  }
  .tabbar a, .tabbar button { display: grid; place-items: center; align-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--text-3); transition: color .2s, transform .2s var(--spring); }
  .tabbar a:active, .tabbar button:active { transform: scale(.9); }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar .is-active { color: var(--text); }
  .tabbar .is-active svg { color: var(--accent); }

  .hero { height: auto; min-height: 0; }
  .hero__slides { position: relative; height: calc(700px + env(safe-area-inset-top)); }
  .hero__inner { display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 22px; padding-top: calc(var(--nav-h) + 14px + env(safe-area-inset-top)); padding-bottom: 72px; }
  .hero__poster { display: block; flex: none; order: -1; width: 150px; margin: 0 auto; }
  .hero__poster .tilt { transform: none; border-radius: 18px; }
  .hero__content { text-align: center; }
  .hero__title { font-size: 40px; margin: 8px 0 10px; }
  .hero__content .chips { justify-content: center; }
  .hero__eyebrow { justify-content: center; }
  .hero__overview { -webkit-line-clamp: 2; margin: 12px auto 20px; font-size: 14.5px; }
  .hero__actions { justify-content: center; }
  .hero__actions .btn { height: 46px; }
  .hero__actions .btn--primary { flex: 1; max-width: 220px; }
  .hero::after { background: linear-gradient(0deg, var(--bg) 4%, rgba(5,5,7,.55) 45%, rgba(5,5,7,.35)); }
  .hero__dots { left: 50%; transform: translateX(-50%); bottom: 34px; }
  .hero__arrows { display: none; }
  .hero + .rows { margin-top: 0; }

  .row__track { --card-w: 132px; --card-gap: 12px; }
  .row--wide .row__track { --card-w: 260px; }
  .row--rank .row__track { --card-w: 200px; }
  .row--tiles .row__track { --card-w: 200px; }
  .card--rank { grid-template-columns: 84px 1fr; }
  .card--rank .rank { font-size: 128px; }
  .card__play { display: none; }
  .row__nav { display: none; }
  .tile { height: 120px; padding: 14px; }
  .tile strong { font-size: 16px; }

  .grid { --card-w: 104px; gap: 20px 12px; }
  .grid--wide { --card-w: 220px; }

  .detail__hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding-top: calc(var(--nav-h) + 40px); }
  .detail__poster { width: 190px; }
  .detail__info { width: 100%; }
  .detail__info .chips, .detail__actions { justify-content: center; }
  .detail__actions .btn--primary { flex: 1; max-width: 260px; }
  .prose { font-size: 15.5px; }
  .ep { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 8px; }

  .palette { padding: 0; align-items: stretch; }
  .palette__box { width: 100%; max-height: none; height: 100%; border-radius: 0; padding-top: env(safe-area-inset-top); }
  .palette__hint { display: none; }

  .player__center { gap: 32px; }
  .p-btn--big { width: 72px; height: 72px; }
  .vol { display: none; }
  .stat { padding: 16px; }
}

@media (hover: none) {
  .card:hover .card__media { transform: none; }
  .row__nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .bar i { background: CanvasText; }
}

/* ==========================================================================
   v2 — TMDB art, trailers, previews, player upgrades, people, anime, status
   ========================================================================== */
:root { --series-1: #3987e5; --series-2: #d95926; }

/* hero with sharp backdrops, logo art and muted trailers */
.hero__slide--wide .hero__bg { inset: 0; }
.hero__slide--wide .hero__bg img { filter: saturate(108%) brightness(.8); transform: none; object-position: center 22%; }
.hero__slide--wide.is-active .hero__bg img { animation: kenburnsWide 20s ease-out both; }
@keyframes kenburnsWide { from { transform: scale(1.09); } to { transform: scale(1.01); } }
.hero__video { position: absolute; inset: 0; z-index: -1; opacity: 0; overflow: hidden; pointer-events: none; transition: opacity 1.2s var(--ease); }
.hero.is-trailer .hero__slide.is-active .hero__video { opacity: 1; }
.hero__video iframe { position: absolute; top: 50%; left: 50%; width: max(100%, calc(100svh * 16 / 9)); height: max(100%, calc(100vw * 9 / 16)); transform: translate(-50%, -50%) scale(1.18); border: 0; }
.hero__title.has-logo { background: none; color: inherit; margin: 10px 0 18px; }
.hero__logo { display: block; max-width: min(480px, 86%); max-height: 170px; width: auto; height: auto; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 10px 36px rgba(0,0,0,.65)); }
.hero__slide.is-active .hero__logo, .detail__logo { animation: logoIn 1.5s var(--ease) both; }
@keyframes logoIn { from { opacity: 0; clip-path: inset(0 100% 0 0); filter: blur(12px) drop-shadow(0 10px 36px rgba(0,0,0,.65)); transform: translateY(10px) scale(.97); } 60% { opacity: 1; } to { clip-path: inset(0 0 0 0); } }
.hero__mute { position: absolute; z-index: 4; right: var(--gutter); bottom: 92px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.hero__mute svg { width: 20px; height: 20px; }
.hero__mute[hidden] { display: none; }

/* score badges */
.scores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.score { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px; background: rgba(255,255,255,.08); border: .5px solid var(--hairline-strong); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.score small { font-size: 11px; color: var(--text-3); font-weight: 600; }
.score em { font-style: normal; color: #ffd60a; }
.score--rt i { width: 12px; height: 12px; border-radius: 50%; background: #fa320a; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.score--rt.is-rotten i { background: #0ac855; border-radius: 40% 60% 55% 45%; }
.score--mc b { min-width: 22px; height: 20px; padding: 0 4px; border-radius: 5px; display: grid; place-items: center; color: #fff; background: #54a72a; font-size: 12px; }
.score--mc.is-mixed b { background: #ffcc33; color: #111; }
.score--mc.is-bad b { background: #e6332a; }
.chips .score { height: 24px; font-size: 12px; padding: 0 8px; }

/* cards: hover preview, logo art, taller rank numerals */
.card__preview { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s var(--ease); pointer-events: none; background: #000; }
.card__preview.is-on { opacity: 1; }
.card__media img.card__logo { position: absolute; z-index: 3; left: 14px; bottom: 22px; width: auto; height: auto; max-width: 62%; max-height: 42%; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 14px rgba(0,0,0,.7)); }
.card--wide .card__badge, .card--wide .card__play { z-index: 3; }
.card--rank .rank { font-size: 210px; background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.18) 62%, rgba(255,255,255,0) 92%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.32); will-change: transform; transition: -webkit-text-stroke-color .3s, filter .3s; }
.card--rank:hover .rank { -webkit-text-stroke-color: var(--accent); filter: drop-shadow(0 0 22px rgba(255,179,64,.35)); }
.row--rank .row__track { --card-w: 280px; padding-top: 22px; }

/* trailer modal */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 24px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; transition: opacity .4s var(--ease); }
.modal.is-open .modal__scrim { opacity: 1; }
.modal__box { position: relative; width: min(1120px, 100%); border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-2), 0 0 0 .5px var(--hairline-strong); transform: scale(.94) translateY(24px); opacity: 0; transition: transform .55s var(--spring), opacity .35s var(--ease); }
.modal.is-open .modal__box { transform: none; opacity: 1; }
.modal__video { aspect-ratio: 16 / 9; }
.modal__video iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.modal__grab { display: none; }

/* splash */
.splash { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: var(--bg); transition: opacity .6s var(--ease), visibility .6s; }
.splash.is-done { opacity: 0; visibility: hidden; }
.splash__inner { display: grid; justify-items: center; gap: 18px; }
.splash__mark { width: 76px; height: 76px; border-radius: 24px; background: var(--accent-grad); display: grid; place-items: center; box-shadow: 0 24px 70px -12px rgba(255,150,60,.65); animation: breathe 1.8s ease-in-out infinite; }
.splash__mark svg { width: 38px; height: 38px; color: #1a1205; }
.splash__word { font-size: 30px; font-weight: 800; letter-spacing: -.035em; background: linear-gradient(90deg, rgba(255,255,255,.3) 0%, #fff 50%, rgba(255,255,255,.3) 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmerText 1.5s linear infinite; }
@keyframes shimmerText { from { background-position: 110% 0; } to { background-position: -110% 0; } }
@keyframes breathe { 50% { transform: scale(1.06); box-shadow: 0 30px 90px -10px rgba(255,150,60,.8); } }

/* shared-element poster morph */
::view-transition-group(poster-morph) { animation-duration: .62s; animation-timing-function: cubic-bezier(.22, 1, .36, 1); z-index: 20; }
::view-transition-old(poster-morph), ::view-transition-new(poster-morph) { animation-duration: .62s; height: 100%; object-fit: cover; border-radius: 20px; overflow: hidden; }

/* detail logo + people */
.detail__title.has-logo { margin: 14px 0 18px; line-height: 0; }
.detail__logo { max-width: min(520px, 100%); max-height: 180px; width: auto; height: auto; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); }
.detail[style*="transform"] { overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); background: var(--bg); }
a.cast__item { transition: transform .3s var(--spring); }
a.cast__item:hover { transform: translateY(-3px); }
a.cast__item:hover .cast__img { box-shadow: 0 0 0 2px var(--accent); }
.cast__img span { display: grid; place-items: center; height: 100%; font-weight: 700; color: var(--text-2); background: linear-gradient(135deg, rgba(var(--amb-1), .35), rgba(var(--amb-2), .35)); }

.providers__group { margin-bottom: 12px; }
.providers__group small { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 6px; font-weight: 600; }
.providers__logos { display: flex; flex-wrap: wrap; gap: 8px; }
.providers__logos img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 0 0 .5px var(--hairline-strong); transition: transform .25s var(--spring); }
.providers__logos a:hover img { transform: scale(1.08); }
.watch-card__logo img { border-radius: 6px; }

.person-hero { display: flex; gap: clamp(20px, 4vw, 48px); align-items: center; }
.person-hero__photo { width: clamp(120px, 18vw, 200px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; font-size: 48px; font-weight: 800; background: linear-gradient(135deg, rgba(var(--amb-1), .5), rgba(var(--amb-2), .5)); box-shadow: 0 0 0 .5px var(--hairline-strong), 0 30px 80px -30px rgba(var(--amb-1), .7); animation: floatIn 1s var(--ease) both; }
.person-hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.person-hero__body .links { margin-top: 16px; align-items: center; }
.filmo { margin-bottom: 26px; }
.filmo h3 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; padding-left: 12px; }
.filmo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.filmo a { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; transition: background .2s; }
.filmo a:hover { background: rgba(255,255,255,.06); }
.filmo__year { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 14px; }
.filmo__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filmo__roles { color: var(--text-3); font-size: 13px; white-space: nowrap; }
.filmo__ext svg { width: 14px; height: 14px; color: var(--text-3); }

/* status dashboard */
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.gbars { position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); align-items: end; gap: 2px; height: 180px; margin-top: 22px; padding-bottom: 26px; border-bottom: 1px solid var(--chart-grid); }
.gbar { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; outline: none; cursor: default; }
.gbar i { width: min(14px, 40%); min-height: 2px; height: var(--h); border-radius: 4px 4px 0 0; transition: height .9s var(--ease), filter .2s; }
.gbar:hover i, .gbar:focus-visible i { filter: brightness(1.2); }
.gbar b { position: absolute; bottom: -24px; font-size: 11px; color: var(--text-3); white-space: nowrap; font-weight: 500; }
.gbar .bar__tip { bottom: auto; top: 0; }
.gbar:hover .bar__tip, .gbar:focus-visible .bar__tip { opacity: 1; transform: translate(-50%, 0); }
.table-view { margin-top: 18px; font-size: 13px; color: var(--text-2); }
.table-view summary { cursor: pointer; width: max-content; }
.table-view table, .table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.table th, .table td, .table-view th, .table-view td { text-align: left; padding: 8px 6px; border-bottom: .5px solid var(--hairline); font-variant-numeric: tabular-nums; }
.table th, .table-view th { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.table a { text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; }
.dead-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dead-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); }
.dead-list small { color: var(--text-3); white-space: nowrap; }

/* player v2 */
.player__bg { position: absolute; inset: -10%; opacity: 0; transition: opacity .7s var(--ease); pointer-events: none; }
.player__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(70px) saturate(170%) brightness(.42); }
.player--cinema .player__bg { opacity: 1; }
.player__stage { position: absolute; inset: 0; display: grid; place-items: center; background: #000; transition: inset .6s var(--spring), width .6s var(--spring), border-radius .6s var(--ease), box-shadow .6s var(--ease), transform .6s var(--spring); }
.player--cinema .player__stage { inset: auto; left: 50%; top: 50%; width: min(92vw, calc(76vh * 16 / 9)); aspect-ratio: 16 / 9; transform: translate(-50%, -54%); border-radius: 28px; overflow: hidden;
  box-shadow: 0 0 0 .5px rgba(255,255,255,.14), 0 40px 120px -20px rgba(var(--amb-1), .55), 0 0 220px -40px rgba(var(--amb-2), .55); }
.player__top .spacer { flex: 1; }
.skip-pill { position: absolute; right: max(20px, env(safe-area-inset-right)); bottom: 118px; height: 46px; padding: 0 18px; border-radius: 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; animation: rise .4s var(--ease); }
.skip-pill svg { width: 16px; height: 16px; }
.skip-pill[hidden] { display: none; }
.scrub__ticks { position: absolute; inset: 0; pointer-events: none; }
.scrub__ticks i { position: absolute; top: 50%; width: 2px; height: 9px; transform: translate(-1px, -50%); background: rgba(0,0,0,.6); border-radius: 1px; }
.scrub__tip { display: grid; justify-items: center; gap: 6px; padding: 6px; border-radius: 14px; border: .5px solid var(--hairline-strong); background: rgba(20,20,24,.85); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.scrub__thumb { width: 160px; aspect-ratio: 16 / 9; border-radius: 9px; background: #111 center / cover no-repeat; }
.scrub__thumb[hidden] { display: none; }
.player__panel { position: absolute; z-index: 5; right: max(20px, env(safe-area-inset-right)); bottom: 104px; width: min(340px, calc(100vw - 32px)); max-height: 62vh; overflow: auto; padding: 14px; border-radius: 22px; background: rgba(28,28,32,.86); animation: rise .35s var(--ease); }
.player__panel[hidden] { display: none; }
.panel__title { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 6px 4px 8px; }
.panel__title:not(:first-child) { margin-top: 18px; }
.panel__opt { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 11px 12px; border-radius: 12px; font-size: 15px; text-align: left; }
.panel__opt:hover { background: rgba(255,255,255,.08); }
.panel__opt.is-on { font-weight: 650; }
.panel__opt svg { width: 18px; height: 18px; color: var(--accent); }
.panel__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.panel__chips .pill { height: 32px; font-size: 13px; padding: 0 12px; }
.panel__range { display: grid; gap: 4px; margin: 12px 4px 0; font-size: 13px; color: var(--text-2); }
.panel__range input { width: 100%; accent-color: #fff; }
.panel__toggle { display: flex; justify-content: space-between; align-items: center; margin: 16px 4px 4px; font-size: 14px; }
.panel__toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.panel__note { font-size: 13px; color: var(--text-3); margin: 8px 4px 0; }
.scenes { position: absolute; z-index: 5; left: 16px; right: 16px; bottom: 104px; padding: 12px 14px 14px; border-radius: 22px; background: rgba(20,20,24,.86); animation: rise .4s var(--ease); }
.scenes[hidden] { display: none; }
.scenes__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.scenes__strip { display: grid; grid-auto-flow: column; grid-auto-columns: 184px; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.scenes__strip::-webkit-scrollbar { display: none; }
.scene { display: grid; gap: 6px; text-align: left; border-radius: 12px; }
.scene img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 .5px var(--hairline-strong); transition: transform .3s var(--spring); }
.scene:hover img { transform: scale(1.04); }
.scene span { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.upnext { position: absolute; z-index: 5; right: max(20px, env(safe-area-inset-right)); bottom: 118px; width: min(400px, calc(100vw - 32px)); display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 14px; padding: 12px; border-radius: 20px; background: rgba(28,28,32,.88); animation: rise .5s var(--ease); }
.upnext[hidden] { display: none; }
.upnext__img { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #111; }
.upnext__img img { width: 100%; height: 100%; object-fit: cover; }
.upnext small { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.upnext strong { margin: 2px 0 10px; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upnext__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.player__casting { position: absolute; inset: 0; display: none; place-items: center; text-align: center; background: rgba(0,0,0,.6); }
.player__casting div { display: grid; justify-items: center; gap: 8px; }
.player__casting svg { width: 46px; height: 46px; color: var(--accent); }
.player__casting span { color: var(--text-2); font-size: 14px; }
.player.is-casting .player__casting { display: grid; }
.player video::cue { background: rgba(0,0,0,.62); color: #fff; font-family: var(--font); font-size: clamp(16px, 2.3vw, 30px); line-height: 1.35; }

@media (max-width: 760px) {
  .hero__slide--wide .hero__bg { inset: 0 0 auto; height: 64%; }
  .hero__slide--wide .hero__bg img { object-position: center top; }
  .hero__logo { max-width: 80vw; max-height: 118px; object-position: center bottom; margin: 0 auto; }
  .hero__mute { display: none; }
  .detail__logo { object-position: center bottom; margin: 0 auto; max-height: 130px; }
  .modal { padding: 0; align-items: end; }
  .modal__box { border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal__grab { display: block; height: 5px; width: 40px; border-radius: 3px; background: rgba(255,255,255,.35); margin: 8px auto; }
  .player--cinema .player__stage { width: 100vw; border-radius: 0; transform: translate(-50%, -50%); }
  .upnext { grid-template-columns: 100px minmax(0, 1fr); left: 12px; right: 12px; width: auto; bottom: 124px; }
  .player__panel { left: 12px; right: 12px; width: auto; bottom: 112px; }
  .skip-pill { bottom: 124px; }
  .scenes__strip { grid-auto-columns: 140px; }
  .scrub__thumb { width: 124px; }
  .person-hero { flex-direction: column; text-align: center; }
  .person-hero .chips, .person-hero .links { justify-content: center; }
  .filmo a { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; }
  .filmo__roles { display: none; }
  .card--rank .rank { font-size: 150px; }
  .row--rank .row__track { --card-w: 214px; }
  .gbar b { font-size: 10px; }
}

@media (max-width: 760px) {
  .detail__info .scores, .hero__content .chips { justify-content: center; }
}

@media (min-width: 761px) {
  .hero__dots { bottom: 84px; }
  .hero__arrows { bottom: 72px; }
  .hero__mute { bottom: 128px; }
}

@media (max-width: 760px) {
  .hero__slide--wide .hero__bg { -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%); mask-image: linear-gradient(180deg, #000 58%, transparent 100%); }
  .hero__actions { flex-wrap: nowrap; gap: 10px; }
  .hero__actions .btn--trailer { width: 46px; padding: 0; }
  .hero__actions .btn--trailer .btn__label { display: none; }
  .hero__actions .btn--round { flex: none; }
}

/* ==========================================================================
   v3 — hover cards, Shorts, seasons, series, subtitles, restoration, polish
   ========================================================================== */
html { scrollbar-color: rgba(255,255,255,.16) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* polish: cards */
.card__fallback { font-size: 15px; line-height: 1.3; letter-spacing: -0.01em; color: rgba(235,235,245,.5);
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.01)), radial-gradient(120% 90% at 0% 0%, rgba(var(--amb-1), .18), transparent 60%), #111115; }
.card:hover .card__media, .card:focus-visible .card__media { box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 30px 60px -24px rgba(0,0,0,.95), 0 0 46px -14px rgba(var(--amb-1), .45); }
.card:focus-visible { outline: none; }
.card:focus-visible .card__media { outline: 2px solid var(--focus); outline-offset: 3px; }
.card__title { font-size: 14.5px; }
.row__title { letter-spacing: -0.03em; }
.row__head { padding-right: 4px; }
.skel { background: linear-gradient(110deg, rgba(255,255,255,.045), rgba(255,255,255,.07) 40%, rgba(255,255,255,.045) 60%); }
.topbar__search { display: none; }
.cert { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; border: 1px solid rgba(255,255,255,.4); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--text); }
.footer { background: linear-gradient(180deg, transparent, rgba(255,255,255,.015)); }
.footer__inner > div { max-width: 62ch; line-height: 1.6; }

/* best-scene card art: the low-res still becomes a soft backdrop behind a crisp poster */
.card--scene .card__media > img:not(.card__inset):not(.card__logo) { filter: blur(1.4px) saturate(1.15) brightness(.78); transform: scale(1.08); }
.card--scene .card__media .card__inset { position: absolute; z-index: 3; left: 12px; top: 12px; height: calc(100% - 24px); width: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 12px 30px -8px rgba(0,0,0,.8), 0 0 0 .5px rgba(255,255,255,.2); opacity: 1; }
.card--scene .card__overlay-title { left: 40%; bottom: 20px; font-size: 15px; line-height: 1.25; }

/* Ken Burns */
.kb { position: absolute; inset: 0; overflow: hidden; }
.kb__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s var(--ease); transform-origin: var(--ko, center); }
.kb__img.is-on { opacity: 1; animation: kbPan 9s ease-out both; }
.kb__img--soft { filter: blur(1.5px) saturate(1.1); }
@keyframes kbPan { from { transform: scale(1.16) translate(var(--kx, 0), var(--ky, 0)); } to { transform: scale(1.02) translate(0, 0); } }
.detail__backdrop.kb .kb__img { filter: saturate(110%) brightness(.62); }
.detail__backdrop.kb .kb__img--soft { filter: blur(2px) saturate(1.1) brightness(.55); }

/* hover cards */
.hcard { position: fixed; z-index: 90; border-radius: 22px; overflow: hidden; background: rgba(22,22,26,.92); box-shadow: 0 40px 100px -20px rgba(0,0,0,.9), 0 0 0 .5px rgba(255,255,255,.14), 0 0 70px -20px rgba(var(--amb-1), .4); }
.hcard__media { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.hcard__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .8s var(--ease); }
.hcard__layer { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); }
.hcard.is-live .hcard__layer { opacity: 1; }
.hcard__layer iframe { position: absolute; top: 50%; left: 50%; width: 140%; height: 140%; transform: translate(-50%, -50%); border: 0; pointer-events: none; }
.hcard__layer video { width: 100%; height: 100%; object-fit: cover; }
.hcard__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(22,22,26,.95), transparent 45%); pointer-events: none; }
.hcard__logo { position: absolute; z-index: 2; left: 16px; bottom: 12px; max-width: 58%; max-height: 38%; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 16px rgba(0,0,0,.8)); }
.hcard__body { padding: 12px 16px 16px; }
.hcard__actions { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.hcard__actions .spacer { flex: 1; }
.hcard__actions [hidden] { display: none; }
.hcard__title { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; margin-bottom: 6px; }
.hcard__title:empty { display: none; }
.hcard .chips { font-size: 12.5px; }
.hcard__blurb { margin: 8px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hcard__blurb:empty { display: none; }

/* seasons */
:root[data-season] { --accent: var(--season-accent); }
:root[data-season="halloween"] .hero__eyebrow svg, :root[data-season] .eyebrow { color: var(--season-accent); }
:root[data-season="halloween"] .ambient::before { opacity: .42; }
.season-particles { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

/* Shorts */
body.is-shorts .footer, body.is-shorts .topbar { opacity: 0; pointer-events: none; }
.shorts { position: fixed; inset: 0; z-index: 40; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; background: #000; scrollbar-width: none; }
.shorts::-webkit-scrollbar { display: none; }
.short { position: relative; height: 100svh; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.short__bg { position: absolute; inset: -10%; z-index: -1; }
.short__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(50px) saturate(160%) brightness(.4); }
.short__frame { position: relative; width: min(100vw, 520px); aspect-ratio: 4 / 3; background: #000; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 100px -20px rgba(0,0,0,.9), 0 0 0 .5px rgba(255,255,255,.12); cursor: pointer; }
.short__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(2px) brightness(.7); transition: opacity .6s; }
.short__video, .short__video video { position: absolute; inset: 0; width: 100%; height: 100%; }
.short__video video { object-fit: contain; background: #000; opacity: 0; transition: opacity .5s; }
.short.is-playing .short__video video { opacity: 1; }
.short.is-playing .short__poster, .short.is-playing .short__spinner { opacity: 0; }
.short__spinner { position: absolute; top: 50%; left: 50%; margin: -14px 0 0 -14px; transition: opacity .3s; }
.short__meta { position: absolute; left: max(20px, env(safe-area-inset-left)); right: 96px; bottom: calc(110px + env(safe-area-inset-bottom)); }
.short__meta h2 { margin: 6px 0 4px; font-size: clamp(22px, 4vw, 32px); letter-spacing: -0.03em; line-height: 1.1; text-shadow: 0 2px 20px rgba(0,0,0,.7); }
.short__meta p { margin: 0 0 14px; color: var(--text-2); font-size: 14px; }
.short__rail { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: calc(110px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.short__act { display: grid; justify-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-2); }
.short__act svg { width: 26px; height: 26px; padding: 11px; box-sizing: content-box; border-radius: 50%; background: rgba(255,255,255,.12); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: #fff; transition: transform .25s var(--spring), background .2s; }
.short__act:active svg { transform: scale(.88); }
.short__act.is-on svg { background: rgba(255,179,64,.3); color: var(--accent); }
.short__progress { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 86px); height: 3px; background: rgba(255,255,255,.15); }
.short__progress i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.shorts__hint { position: fixed; z-index: 45; top: calc(20px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; animation: hintBob 2.2s ease-in-out infinite; }
.shorts__hint svg { width: 16px; height: 16px; }
.shorts__hint[hidden] { display: none; }
@keyframes hintBob { 50% { transform: translate(-50%, 6px); } }
@media (min-width: 761px) {
  .short__frame { width: min(64vw, 900px); aspect-ratio: 16 / 10; }
  .short__meta { left: max(32px, calc(50% - min(32vw, 450px))); bottom: 48px; right: auto; max-width: 460px; }
  .short__rail { right: max(32px, calc(50% - min(32vw, 450px) - 80px)); bottom: 48px; }
  .short__progress { bottom: 0; }
}

/* series */
.detail__body--wide { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.series-progress { height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 18px; max-width: 360px; }
.series-progress i { display: block; height: 100%; background: var(--accent-grad); }
.series-progress__label { display: block; margin-top: 6px; color: var(--text-3); font-size: 12.5px; }
.pill small { opacity: .55; margin-left: 4px; font-size: 11px; }
.ep--play { width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; border: .5px solid transparent; }
.ep--play.is-next { background: rgba(255,255,255,.05); border-color: var(--hairline); }
.ep__img { position: relative; }
.ep__playicon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.85); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #000; opacity: 0; transition: all .3s var(--spring); }
.ep__playicon svg { width: 16px; height: 16px; }
.ep--play:hover .ep__playicon, .ep--play:focus-visible .ep__playicon { opacity: 1; transform: translate(-50%, -50%); }
.ep__bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.25); overflow: hidden; }
.ep__bar i { display: block; height: 100%; background: var(--accent-grad); }

/* player: launch, restoration canvas, custom cues, recap, panel extras */
.player.is-launching { transition: none; opacity: 1; }
.player__launch { position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity .8s var(--ease); }
.player__launch img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); }
.player.is-started .player__launch { opacity: 0; }
.player__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__canvas[hidden] { display: none; }
.player video.is-hidden { opacity: 0; }
.player__cues { position: absolute; z-index: 3; left: 6%; right: 6%; bottom: 8%; display: flex; flex-direction: column; align-items: center; gap: .15em; text-align: center; pointer-events: none;
  font-family: var(--sub-font, var(--font)); color: var(--sub-color, #fff); font-size: calc(clamp(16px, 2.3vw, 30px) * var(--sub-scale, 1)); line-height: 1.32; font-weight: 500; transition: bottom .35s var(--ease); }
.player.show-ui .player__cues, .player.is-paused .player__cues { bottom: 20%; }
.cue { max-width: 100%; padding: .08em .38em; border-radius: .22em; white-space: pre-line; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
[data-back="box"] .cue { background: rgba(0,0,0,.68); }
[data-back="shadow"] .cue { text-shadow: 0 0 3px #000, 0 2px 8px #000, 0 0 1px #000; }
.cue.is-pending { opacity: .62; font-style: italic; }
.player__cues[data-status]:not([data-status=""])::before { content: attr(data-status); order: -1; font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--text-2); padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.55); margin-bottom: 6px; }
.recap { position: absolute; z-index: 6; left: max(20px, env(safe-area-inset-left)); bottom: 118px; width: min(440px, calc(100vw - 40px)); padding: 16px; border-radius: 22px; background: rgba(24,24,28,.86); animation: rise .5s var(--ease); overflow: hidden; }
.recap[hidden] { display: none; }
.recap__head small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.recap__head strong { display: block; font-size: 17px; letter-spacing: -0.02em; margin-top: 2px; }
.recap__head span { font-size: 12.5px; color: var(--text-3); }
.recap__scenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.recap__scenes:empty { display: none; }
.recap__scenes img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.recap__lines { margin-top: 10px; }
.recap__lines p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); font-style: italic; line-height: 1.45; }
.recap__actions { display: flex; gap: 8px; margin-top: 14px; }
.recap__timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent-grad); transform-origin: left; animation: recapTimer 10s linear forwards; }
@keyframes recapTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.panel__loading { display: grid; place-items: center; padding: 20px; }
.panel__opt small { font-size: 11px; color: var(--text-3); font-weight: 500; margin-left: 6px; }
.panel__select select { width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(255,255,255,.08); border: .5px solid var(--hairline-strong); color: var(--text); font-size: 14px; }
.panel__select option { background: var(--surface-solid); }
.panel__row { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; gap: 8px; margin: 8px 4px; font-size: 13px; color: var(--text-2); }
.swatch { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255,255,255,.12); transition: transform .2s var(--spring); }
.swatch.is-active { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 4px #fff; }
.sub-preview { margin: 12px 4px 4px; padding: 18px 12px; border-radius: 14px; text-align: center; background: linear-gradient(135deg, #3a3a40, #1b1b1f); font-family: var(--sub-font, var(--font)); color: var(--sub-color, #fff); font-size: calc(17px * var(--sub-scale, 1)); line-height: 1.3; }

@media (max-width: 760px) {
  .topbar__search { display: grid; margin-left: auto; }
  .topbar__actions { margin-left: 0; }
  .card--scene .card__overlay-title { font-size: 13.5px; }
  .recap { bottom: 124px; left: 12px; right: 12px; width: auto; }
  .panel__row { grid-template-columns: 1fr; }
  .detail__body--wide { max-width: none; }
}
@media (hover: none) {
  .ep__playicon { opacity: .9; transform: translate(-50%, -50%); width: 32px; height: 32px; }
}

/* soft fade behind the floating top bar once the page scrolls */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 92px; z-index: 45; pointer-events: none; background: linear-gradient(180deg, rgba(5,5,7,.94), rgba(5,5,7,.62) 55%, rgba(5,5,7,0)); opacity: 0; transition: opacity .35s var(--ease); }
:root:has(.topbar:not(.is-top)) body::before { opacity: 1; }
body.is-shorts::before { display: none; }
@media (max-width: 760px) { body::before { display: none; } }

@media (max-width: 760px) {
  .detail .prose { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
  .detail .prose.is-open { display: block; -webkit-line-clamp: unset; }
  .detail .prose:not(.is-open)::after { content: ""; }
}

/* ========================================================================== v4 · Arnav Movies */

/* Brand */
.brand__name { font-weight: 600; }
.brand__name b { font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Poster-matched page tint: theme.js re-sets the accent tokens; this is the wash behind everything. */
body::before { content: ""; position: fixed; inset: -20vh -10vw auto; height: 90vh; z-index: -3; pointer-events: none;
  background: radial-gradient(60% 60% at 30% 0%, rgba(var(--tint-rgb, 255, 179, 64), .16), transparent 70%); }
.btn--primary, .pill.is-active, .mood--surprise, .card__progress i { transition: background .8s var(--ease), color .3s; }

/* Hero parallax depth: backdrop, poster and copy drift at different rates. */
.hero { --px: 0; --py: 0; --sy: 0; }
.hero__bg { transform: translate3d(calc(var(--px) * -28px), calc(var(--py) * -18px + var(--sy) * .35px), 0); transition: transform .9s var(--ease); will-change: transform; }
.hero__poster { transform: translate3d(calc(var(--px) * 22px), calc(var(--py) * 14px + var(--sy) * -.08px), 0); transition: transform .7s var(--ease); }
.hero__content { transform: translate3d(calc(var(--px) * -8px), calc(var(--sy) * .12px), 0); opacity: calc(1 - var(--sy) / 900); transition: transform .7s var(--ease); }
@media (prefers-reduced-motion: reduce) { .hero__bg, .hero__poster, .hero__content { transform: none; opacity: 1; } }

/* Horizontal scroll buttons for every strip on desktop */
.hs { position: relative; min-width: 0; }
.hs__btn { position: absolute; z-index: 3; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(30,30,34,.72); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: .5px solid var(--hairline-strong); box-shadow: 0 8px 24px -8px rgba(0,0,0,.7);
  opacity: 0; pointer-events: none; transform: scale(.85); transition: opacity .25s var(--ease), transform .35s var(--spring), background .2s; }
.hs__btn svg { width: 16px; height: 16px; }
.hs__btn--prev { left: -6px; }
.hs__btn--next { right: -6px; }
.hs.is-overflow:hover .hs__btn:not([disabled]) { opacity: 1; pointer-events: auto; transform: none; }
.hs__btn:hover { background: rgba(60,60,66,.9); }
.hs__btn:active { transform: scale(.92); }
.hs.is-overflow .pills, .hs.is-overflow .moods { -webkit-mask: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
@media (hover: none), (pointer: coarse) { .hs__btn { display: none; } }

/* Source tabs on Movies */
.pills--sources { padding: 5px; gap: 4px; border-radius: 999px; background: rgba(255,255,255,.06); border: .5px solid var(--hairline); width: max-content; max-width: 100%; }
.pill--source { border: 0; background: none; }
.pill--source.is-active { background: rgba(255,255,255,.95); color: #000; box-shadow: 0 6px 18px -8px rgba(0,0,0,.6); }
.select[hidden], .pills[hidden] { display: none; }

/* Dual subtitles: the stack moves as one, the learner line sits smaller underneath */
.player__subs { position: absolute; z-index: 3; left: 6%; right: 6%; bottom: 8%; display: flex; flex-direction: column; align-items: center; gap: .35em; pointer-events: none; transition: bottom .35s var(--ease); }
.player.show-ui .player__subs, .player.is-paused .player__subs { bottom: 20%; }
.player__subs .player__cues { position: static; left: auto; right: auto; bottom: auto; width: 100%; transition: none; }
.player__subs .player__cues--second { font-size: calc(clamp(13px, 1.75vw, 23px) * var(--sub-scale, 1)); color: #ffe39a; }
.player__subs .player__cues--second:empty { display: none; }

/* Sleep: the picture fades to black, not just the sound */
.player__sleep { position: absolute; inset: 0; z-index: 4; background: #000; opacity: 0; pointer-events: none; transition: opacity 1s linear; }

/* Smart Speed chip */
.smart-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--accent); }
.smart-chip svg { width: 14px; height: 14px; }
.smart-chip[hidden] { display: none; }

/* Trivia in the up-next card */
.upnext__trivia { margin-top: 10px; padding-top: 10px; border-top: .5px solid var(--hairline-strong); font-size: 13px; line-height: 1.45; color: var(--text-2); max-width: 340px; animation: rise .5s var(--ease); }
.upnext__trivia small { display: flex; align-items: center; gap: 5px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.upnext__trivia[hidden] { display: none; }

/* Search: what's said */
.result--quote .result__img { aspect-ratio: 2 / 3; }
.result__quote { font-size: 14px; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-style: italic; }
.result__quote mark { background: rgba(var(--tint-rgb, 255, 179, 64), .22); color: var(--accent); font-style: normal; border-radius: 3px; padding: 0 2px; }

/* Keyboard shortcut sheet */
.modal--sheet .modal__box.shortcuts { width: min(860px, 100%); max-height: min(86vh, 760px); overflow: auto; padding: 22px 26px 26px; background: rgba(28,28,32,.84); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%); }
.shortcuts__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 20px; letter-spacing: -.02em; }
.shortcuts__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px 32px; }
.shortcuts h3 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 12px 0 6px; }
.shortcuts dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: .5px solid var(--hairline); font-size: 14px; }
.shortcuts dt { display: flex; align-items: center; gap: 6px; flex: none; }
.shortcuts dt span { font-size: 11px; color: var(--text-3); }
.shortcuts dd { color: var(--text-2); text-align: right; }
kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 7px; font: 600 12px/1 var(--font); color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06)); border: .5px solid var(--hairline-strong); box-shadow: 0 2px 0 rgba(0,0,0,.45); }

/* Settings (My List) and iOS-style switches everywhere */
.settings { border-radius: var(--r-lg); padding: 4px 18px; max-width: 640px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border: 0; border-bottom: .5px solid var(--hairline); width: 100%; text-align: left; color: inherit; font: inherit; background: none; cursor: pointer; }
.setting:last-child { border-bottom: 0; }
.setting strong { display: block; font-size: 15px; font-weight: 600; }
.setting small { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.setting--btn svg { width: 18px; height: 18px; color: var(--text-3); }
input[type="checkbox"][switch], .panel__toggle input[type="checkbox"][switch] { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 48px; height: 29px; border-radius: 999px; margin: 0;
  background: rgba(120,120,128,.36); cursor: pointer; transition: background .3s var(--ease); }
input[type="checkbox"][switch]::before { content: ""; position: absolute; top: 2px; left: 2px; width: 25px; height: 25px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.3); transition: transform .35s var(--spring); }
input[type="checkbox"][switch]:checked { background: #34c759; }
input[type="checkbox"][switch]:checked::before { transform: translateX(19px); }
input[type="checkbox"][switch]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* NASA watch page */
.detail__hero--wide .detail__info { max-width: 760px; }

/* Polish */
::selection { background: rgba(var(--tint-rgb, 255, 179, 64), .35); }
:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 3px; }
.card:hover .card__media { box-shadow: 0 22px 50px -18px rgba(var(--tint-rgb, 0, 0, 0), .55), 0 0 0 .5px var(--hairline-strong); }
.page-title { text-wrap: balance; }
.prose, .hero__overview, .page-sub { text-wrap: pretty; }
.upnext__trivia small svg { width: 12px; height: 12px; }
.upnext__trivia p { margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: none) { .setting[data-shortcuts] { display: none; } .setting:nth-last-child(2) { border-bottom: 0; } }

/* ========================================================================== v5 */

/* ---------- Rails: headings line up with the first card at every width ---------- */
.row__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 16px; row-gap: 3px; margin-bottom: 14px; }
.row__title { grid-column: 1; grid-row: 1; display: block; line-height: 1.2; text-wrap: balance; }
.row__more { grid-column: 2; grid-row: 1; white-space: nowrap; }
.row__sub { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--text-3); text-wrap: pretty; }
.row__track { --edge: max(var(--gutter), calc((100% - 1480px) / 2 + var(--gutter))); padding-inline: var(--edge); scroll-padding-inline: var(--edge); }
.section-title { display: flex; align-items: center; gap: 10px; line-height: 1.2; }
.section-title svg { width: 20px; height: 20px; color: var(--accent); }

/* ---------- Player: transport on the bar ---------- */
.player__controls { gap: 2px; }
.player__controls .p-btn--ghost { width: 44px; height: 44px; border-radius: 12px; }
.player__controls .p-btn--ghost:hover { background: rgba(255,255,255,.12); }
.p-btn--play { width: 50px !important; }
.p-btn--play svg { width: 28px; height: 28px; }
.player__controls .vol { margin-left: 4px; }
.player__top [data-act="mini"] svg { width: 24px; height: 24px; }
.player__subs { bottom: calc(8% + var(--sub-lift, 0%)); }
.player.show-ui .player__subs, .player.is-paused .player__subs { bottom: calc(20% + var(--sub-lift, 0%)); }
@media (max-width: 600px) {
  .player__controls [data-act="cinema"], .player__controls [data-act="pip"] { display: none; }
  .player__controls .p-btn--ghost { width: 40px; height: 40px; }
  .p-btn--play { width: 46px !important; }
}

/* Scrubber preview: scene thumbnail, time and the line being spoken */
.scrub__tip.has-line { width: 252px; }
.scrub__tip.has-line .scrub__thumb { width: 240px; }
.scrub__line { margin: 0; max-width: 240px; padding: 0 4px 2px; font-family: var(--sub-font, var(--font)); font-size: 12.5px; line-height: 1.38; color: #fff; text-align: center;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scrub__line[hidden] { display: none; }
.scrub__line::before { content: "“"; color: var(--accent); }
.scrub__line::after { content: "”"; color: var(--accent); }
@media (max-width: 600px) { .scrub__tip.has-line { width: 200px; } .scrub__tip.has-line .scrub__thumb { width: 188px; } .scrub__line { max-width: 188px; } }

/* ---------- Cinema curtain ---------- */
.player__curtain { position: absolute; inset: 0; pointer-events: none; overflow: hidden; visibility: visible; transition: visibility 0s; }
.curtain { position: absolute; top: -1%; bottom: 0; width: 51%; transition: transform 2.5s cubic-bezier(.68, 0, .2, 1), filter 2.5s ease, opacity .25s ease;
  background:
    radial-gradient(140% 55% at 50% 108%, rgba(0,0,0,.6), transparent 62%),
    linear-gradient(180deg, rgba(0,0,0,.5) 0%, transparent 15%, transparent 80%, rgba(0,0,0,.35) 100%),
    repeating-linear-gradient(90deg, #32040a 0, #5d0b15 12px, #8f1424 23px, #b81e31 29px, #cc2a3c 31px, #a8192c 36px, #6d0e1a 50px, #32040a 64px);
  box-shadow: inset 0 0 90px rgba(0,0,0,.6); will-change: transform; }
.curtain--l { left: 0; transform-origin: 0 40%; border-right: 1px solid rgba(0,0,0,.7); }
.curtain--r { right: 0; transform-origin: 100% 40%; border-left: 1px solid rgba(0,0,0,.7); }
.curtain::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,190,180,.09) 47%, transparent 60%); background-size: 320% 100%; animation: sheen 7s ease-in-out infinite alternate; }
.curtain::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px;
  background: linear-gradient(180deg, #8a5b16 0 3px, transparent 3px), repeating-linear-gradient(90deg, #f5cf74 0 2px, #a36f1f 2px 5px);
  -webkit-mask: linear-gradient(#000 60%, transparent); mask: linear-gradient(#000 60%, transparent); opacity: .9; }
.curtain__valance { position: absolute; top: 0; left: 0; right: 0; height: 12%; min-height: 54px; z-index: 2; transition: transform 1.7s .35s cubic-bezier(.6, 0, .2, 1);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 30%, rgba(0,0,0,.35)),
    repeating-linear-gradient(90deg, #4a0710 0, #7a0f1d 18px, #a0182a 26px, #7a0f1d 34px, #4a0710 52px);
  -webkit-mask: radial-gradient(52% 120% at 50% 0, #000 98%, transparent) 0 100% / 9.0909% 46% repeat-x, linear-gradient(#000 0 0) 0 0 / 100% 56% no-repeat;
  mask: radial-gradient(52% 120% at 50% 0, #000 98%, transparent) 0 100% / 9.0909% 46% repeat-x, linear-gradient(#000 0 0) 0 0 / 100% 56% no-repeat;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
.curtain__valance::after { content: ""; position: absolute; left: 0; right: 0; top: 54%; height: 3px; background: linear-gradient(90deg, #a87420, #f6d27a, #a87420); box-shadow: 0 1px 0 rgba(0,0,0,.5); }
.player__marquee { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 0 8%; text-align: center; transition: opacity .7s ease, transform 1.4s var(--ease); }
.player__marquee::before { content: ""; position: absolute; left: 50%; top: 52%; z-index: -1; width: min(80vw, 820px); aspect-ratio: 2 / 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255,214,150,.30), rgba(255,180,90,.08) 60%, transparent); animation: spot 4s ease-in-out infinite alternate; }
.player__marquee small { font: 600 11.5px/1 var(--font); letter-spacing: .34em; text-transform: uppercase; color: #f3d38f; padding: 7px 14px; border: .5px solid rgba(243,211,143,.45); border-radius: 999px; background: rgba(40,4,8,.35); }
.player__marquee span { max-width: 16ch; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-style: italic; font-weight: 600; font-size: clamp(30px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -.01em; text-wrap: balance;
  background: linear-gradient(180deg, #fff7dc 0%, #f4cd77 46%, #b67d24 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(50,6,4,.85)) drop-shadow(0 0 26px rgba(255,190,90,.35)); }
.player__marquee em { font: 500 12px/1 var(--font); font-style: normal; letter-spacing: .3em; color: rgba(243,211,143,.75); }
/* Parting: each side gathers toward its edge, the valance lifts, then the drapes fade off the picture. */
.player.is-curtain-open .curtain { transition: transform 2.5s cubic-bezier(.68, 0, .2, 1), filter 2.5s ease, opacity .8s 2.1s ease; opacity: 0; filter: brightness(.55); }
.player.is-curtain-open .curtain--l { transform: translateX(-4%) scaleX(.12) skewY(-1.5deg); }
.player.is-curtain-open .curtain--r { transform: translateX(4%) scaleX(.12) skewY(1.5deg); }
.player.is-curtain-open .curtain__valance { transform: translateY(-110%); }
.player.is-curtain-open .player__marquee { opacity: 0; transform: scale(.94) translateY(-2%); }
.player.is-curtain-open .player__curtain { visibility: hidden; transition: visibility 0s 3s; }
/* Falling at the end of the picture */
.player.is-curtain-closing .curtain { transition: transform 2.2s cubic-bezier(.4, 0, .2, 1), filter 2.2s ease, opacity .2s; }
.player.is-curtain-closing .curtain__valance { transition-delay: 0s; }
.player.is-curtain-closing .player__marquee { opacity: 0; }
.player.no-curtain .player__curtain, .player.is-error .player__curtain, .player.is-casting .player__curtain, .player--mini .player__curtain { display: none; }
@keyframes sheen { from { background-position: 0 0; } to { background-position: 100% 0; } }
@keyframes spot { from { opacity: .75; transform: translate(-50%, -50%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } }

/* ---------- Mini player ---------- */
.player__mini { display: none; }
.player.player--mini { inset: auto max(18px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) auto; width: min(380px, calc(100vw - 36px)); display: block; z-index: 90; opacity: 1;
  border-radius: 18px; overflow: hidden; cursor: default; background: rgba(18,18,22,.92); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 30px 80px -24px rgba(0,0,0,.95), 0 0 0 .5px var(--hairline-strong); animation: none; }
.player--mini .player__bg, .player--mini .player__ui, .player--mini .player__subs, .player--mini .player__tap, .player--mini .player__toast, .player--mini .player__sleep { display: none; }
.player--mini .player__stage { position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 9; cursor: pointer; transform: none; border-radius: 0; box-shadow: none; left: auto; top: auto; }
.player--mini video, .player--mini .player__canvas { object-fit: cover; }
.player--mini .player__spinner { transform: translate(-50%, -50%) scale(.6); }
.player--mini .player__error { padding: 10px; font-size: 12px; }
.player--mini .player__error h3 { font-size: 14px; margin: 0 0 4px; }
.player--mini .player__error p { display: none; }
.player--mini .player__mini { display: flex; align-items: center; gap: 2px; padding: 6px 6px 8px 12px; position: relative; }
.mini__body { flex: 1; min-width: 0; display: grid; text-align: left; color: inherit; font: inherit; cursor: pointer; padding: 4px 0; }
.mini__body strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini__body span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__mini .p-btn--ghost { width: 40px; height: 40px; border-radius: 12px; }
.player__mini .p-btn--ghost:hover { background: rgba(255,255,255,.1); }
.player__mini .p-btn--ghost svg { width: 20px; height: 20px; }
.mini__progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(255,255,255,.12); }
.mini__progress b { display: block; height: 100%; width: 0; background: var(--accent-grad); }
@media (max-width: 760px) {
  .player.player--mini { left: 10px; right: 10px; width: auto; bottom: calc(var(--tab-h) + 8px + env(safe-area-inset-bottom)); display: flex; align-items: stretch; border-radius: 16px; }
  .player--mini .player__stage { width: 116px; flex: none; aspect-ratio: 16 / 9; }
  .player--mini .player__mini { flex: 1; min-width: 0; padding: 4px 4px 4px 10px; }
  .player--mini .player__mini [data-act="expand"].p-btn--ghost { display: none; }
  .mini__progress { top: auto; bottom: 0; }
}
body.has-mini .toasts { bottom: calc(var(--tab-h, 0px) + 100px); }

/* ---------- Shorts: close ---------- */
.shorts__close { position: fixed; z-index: 46; top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; transition: transform .2s var(--spring), background .2s; }
.shorts__close:hover { background: rgba(255,255,255,.2); }
.shorts__close:active { transform: scale(.9); }
.shorts__close svg { width: 22px; height: 22px; }

/* ---------- Episodes in their own scrollable box ---------- */
.ep-box { display: flex; flex-direction: column; max-height: min(74vh, 780px); border-radius: var(--r-lg); overflow: hidden; }
.ep-box__head { flex: none; padding: 10px 12px; border-bottom: .5px solid var(--hairline); background: rgba(255,255,255,.03); }
.ep-box__head .pills { margin: 0; }
.ep-box .episodes { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; gap: 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; outline: none; }
.ep-box .episodes::-webkit-scrollbar { width: 8px; }
.ep-box .episodes::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 8px; }

/* ---------- Title page: themes ---------- */
.themes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.theme-chip { height: 32px; padding: 0 13px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); background: rgba(255,255,255,.06); border: .5px solid var(--hairline-strong); transition: background .2s, color .2s; }
.theme-chip::before { content: "#"; color: var(--accent); margin-right: 2px; }
.theme-chip:hover { background: rgba(255,255,255,.12); color: var(--text); }

/* ---------- Search: voice ---------- */
.palette__mic svg { width: 20px; height: 20px; }
.palette__mic.is-listening { color: #fff; background: #ff3b30; box-shadow: 0 0 0 6px rgba(255,59,48,.25); animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 50% { box-shadow: 0 0 0 11px rgba(255,59,48,.08); } }
.palette__voice { display: flex; align-items: center; gap: 12px; padding: 10px 18px; font-size: 14px; color: var(--text-2); border-bottom: .5px solid var(--hairline); }
.palette__voice[hidden] { display: none; }
.palette__wave { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.palette__wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--accent); animation: wave .9s ease-in-out infinite; }
.palette__wave i:nth-child(2) { animation-delay: .1s; } .palette__wave i:nth-child(3) { animation-delay: .2s; } .palette__wave i:nth-child(4) { animation-delay: .3s; } .palette__wave i:nth-child(5) { animation-delay: .4s; }
@keyframes wave { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------- Space ---------- */
.space__top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.live { border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.live__frame { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(120% 120% at 70% 20%, #1d2b64 0%, #0b1026 45%, #000 100%); display: grid; place-items: center; overflow: hidden; }
.live__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.live__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live__play { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #000; background: #fff; box-shadow: 0 18px 50px -10px rgba(0,0,0,.8); transition: transform .3s var(--spring); }
.live__play:hover { transform: scale(1.08); }
.live__play svg { width: 30px; height: 30px; margin-left: 4px; }
.live__frame.is-on .live__play, .live__frame.is-on .live__badge { display: none; }
.live__badge { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .04em; background: rgba(0,0,0,.6); }
.live__badge i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 0 rgba(255,59,48,.6); animation: livePulse 1.6s infinite; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 9px rgba(255,59,48,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); } }
.live__meta { display: grid; gap: 4px; padding: 14px 18px 18px; }
.live__meta strong { font-size: 16px; }
.live__meta span { font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.next { position: relative; border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; min-height: 320px; }
.next__img { position: absolute; inset: 0; z-index: -1; }
.next__img img { width: 100%; height: 100%; object-fit: cover; opacity: .35; filter: saturate(120%); }
.next__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,14,.3), rgba(10,10,14,.92) 70%); }
.next__body { display: grid; gap: 8px; padding: 22px; margin-top: auto; }
.next__name { margin: 0; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.02em; line-height: 1.12; }
.next__sub { margin: 0; color: var(--text-2); font-size: 14px; }
.next__when { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.next__when svg { width: 15px; height: 15px; flex: none; }
.next__about { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.next__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.next__loading, .next__empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 24px; color: var(--text-2); }
.next__empty svg { width: 34px; height: 34px; color: var(--accent); }
.clock { display: flex; align-items: flex-end; gap: 10px; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.clock__sign { font-size: 18px; font-weight: 700; color: var(--accent); padding-bottom: 20px; }
.clock div { display: grid; justify-items: center; min-width: 58px; padding: 8px 6px 7px; border-radius: 14px; background: rgba(255,255,255,.07); border: .5px solid var(--hairline-strong); }
.clock b { font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.clock small { margin-top: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.status { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: none; color: #fff; background: rgba(255,255,255,.14); }
.status--go { background: rgba(52,199,89,.22); color: #6ee28b; }
.status--tbc { background: rgba(255,204,0,.18); color: #ffd84d; }
.status--hold { background: rgba(255,59,48,.2); color: #ff8a80; }
.status--live { background: #ff3b30; }
.launches { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.launch { display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; }
.launch__img { position: relative; aspect-ratio: 16 / 8; background: linear-gradient(135deg, #10172e, #05060b); }
.launch__img img { width: 100%; height: 100%; object-fit: cover; }
.launch__img .status { position: absolute; top: 10px; left: 10px; }
.launch__body { display: grid; gap: 3px; padding: 12px 14px 14px; }
.launch__body strong { font-size: 15px; line-height: 1.25; }
.launch__body span { font-size: 13px; color: var(--text-2); }
.launch__when { color: var(--text-3) !important; }
.launch__count { margin-top: 4px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent) !important; font-size: 15px !important; }
.launch__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.launch__link svg { width: 14px; height: 14px; }
@media (max-width: 900px) { .space__top { grid-template-columns: minmax(0, 1fr); } .clock div { min-width: 52px; } }

/* ---------- Newsreel timeline ---------- */
.years { position: sticky; top: calc(var(--nav-h, 64px) + 20px); z-index: 20; margin: 0 var(--gutter) 28px; padding: 6px; border-radius: 999px; max-width: 1480px; }
@media (min-width: 1600px) { .years { margin-inline: auto; } }
.years__track { flex-wrap: nowrap; }
.years .pill { font-variant-numeric: tabular-nums; }
.tl-year { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 28px; padding: 30px 0; border-top: .5px solid var(--hairline); scroll-margin-top: calc(var(--nav-h, 64px) + 80px); min-height: 360px; }
.tl-year__label span { position: sticky; top: calc(var(--nav-h, 64px) + 104px); display: block; font-size: clamp(40px, 4.6vw, 64px); font-weight: 800; letter-spacing: -.05em; line-height: .9;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,.35)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-year__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 32px; align-items: start; }
.tl-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.tl-head svg { width: 16px; height: 16px; color: var(--accent); }
.tl-head small { font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.tl-list { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1.5px solid rgba(255,255,255,.12); display: grid; gap: 14px; }
.tl-list li { position: relative; }
.tl-list li::before { content: ""; position: absolute; left: -24px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.tl-list time { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--accent); margin-bottom: 2px; }
.tl-list p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.tl-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.tl-more:hover { color: var(--accent); }
.tl-more svg { width: 13px; height: 13px; }
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tl-events .skel--line { margin-bottom: 10px; }
.tl-reels { display: grid; gap: 12px; }
@media (max-width: 1000px) { .tl-year__body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .tl-year { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 22px 0; }
  .tl-year__label span { position: static; font-size: 48px; }
  .years { top: calc(var(--nav-h, 56px) + 6px); }
}

/* ---------- Settings ---------- */
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--nav-h, 64px) + 20px); display: grid; gap: 2px; padding: 10px; border-radius: var(--r-lg); }
.settings-nav a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 12px; font-size: 14.5px; font-weight: 500; color: var(--text-2); }
.settings-nav a:hover { background: rgba(255,255,255,.07); color: var(--text); }
.settings-nav svg { width: 18px; height: 18px; color: var(--accent); }
.settings-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; margin-bottom: 6px; border-radius: 12px; background: rgba(255,255,255,.07); }
.settings-search svg { width: 16px; height: 16px; color: var(--text-3); }
.settings-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; }
.settings-groups { display: grid; gap: 34px; min-width: 0; }
.settings-group { scroll-margin-top: calc(var(--nav-h, 64px) + 20px); }
.settings-group[hidden], .setting[hidden] { display: none; }
.settings-group .settings { max-width: none; }
.setting--stack { flex-wrap: wrap; }
.setting--stack > span { flex: 1 1 260px; }
.seg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.06); border: .5px solid var(--hairline); }
.seg--wrap { max-width: 520px; }
.seg__opt { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--text-2); transition: background .2s, color .2s; }
.seg__opt svg { width: 14px; height: 14px; }
.seg__opt:hover { color: var(--text); }
.seg__opt.is-active { background: rgba(255,255,255,.92); color: #000; box-shadow: 0 4px 14px -6px rgba(0,0,0,.6); }
.seg .swatch { margin: 2px 3px; }
.swatch--lg { width: 30px; height: 30px; }
.substyle { display: grid; gap: 10px; flex: 1 1 100%; }
.substyle .sub-preview { margin: 4px 0 0; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
.data-actions label { cursor: pointer; }
.btn--danger { color: #ff8a80; }
.settings-empty { color: var(--text-2); }
.settings-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); max-width: 640px; transition: background .2s; }
.settings-card:hover { background: rgba(255,255,255,.1); }
.settings-card > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.settings-card small { color: var(--text-2); font-size: 13px; }
.settings-card > svg { width: 18px; height: 18px; color: var(--text-3); }
.settings-card__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-grad); color: #1a1205; flex: none; }
.settings-card__icon svg { width: 22px; height: 22px; }
.topbar__settings svg { width: 21px; height: 21px; }
@media (max-width: 860px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; border-radius: 18px; }
  .settings-nav a { flex: none; }
  .settings-search { flex: 1 0 180px; margin: 0; }
}

/* ---------- Appearance switches ---------- */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
html.solid .glass, html.solid .topbar, html.solid .tabbar, html.solid .palette__box, html.solid .modal__box.shortcuts { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background-color: #1b1b20 !important; }
html.no-grain .grain { display: none; }
html[data-size="compact"] body { zoom: .92; }
html[data-size="large"] body { zoom: 1.1; }
.live__badge i.is-soon { background: #ffcc00; animation: none; } .live__badge i.is-off { background: #8e8e93; animation: none; }
.launch__img .status { background: rgba(0,0,0,.66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.years.glass { background: rgba(16,16,20,.9); }
.settings-search { min-width: 0; } .settings-search input { width: 100%; }
.player__curtain { z-index: 2; } .player__spinner, .player__toast, .player__tap { z-index: 3; } .player__ui { z-index: 4; }
.curtain { background:
    radial-gradient(140% 55% at 50% 108%, rgba(0,0,0,.6), transparent 62%),
    linear-gradient(180deg, rgba(0,0,0,.5) 0%, transparent 15%, transparent 80%, rgba(0,0,0,.35) 100%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.22) 0 37px, transparent 37px 91px, rgba(255,255,255,.035) 91px 103px, transparent 103px 157px),
    repeating-linear-gradient(90deg, #32040a 0, #5d0b15 12px, #8f1424 23px, #b81e31 29px, #cc2a3c 31px, #a8192c 36px, #6d0e1a 50px, #32040a 64px); }
.curtain--l { box-shadow: inset -60px 0 120px -40px rgba(255,120,110,.16), inset 0 0 90px rgba(0,0,0,.6); }
.curtain--r { box-shadow: inset 60px 0 120px -40px rgba(255,120,110,.16), inset 0 0 90px rgba(0,0,0,.6); }
.player--mini .player__mini { width: 100%; box-sizing: border-box; justify-self: stretch; } .player.player--mini { place-items: stretch; }
/* Hero controls line up with the content column on wide screens, too */
@media (min-width: 761px) {
  .hero__dots { left: max(var(--gutter), calc((100% - 1480px) / 2 + var(--gutter))); }
  .hero__arrows { right: max(var(--gutter), calc((100% - 1480px) / 2 + var(--gutter))); }
}
.hs.is-overflow.at-start .pills, .hs.is-overflow.at-start .moods { -webkit-mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.hs.is-overflow.at-end .pills, .hs.is-overflow.at-end .moods { -webkit-mask: linear-gradient(90deg, transparent, #000 28px); mask: linear-gradient(90deg, transparent, #000 28px); }
.hs.is-overflow.at-start.at-end .pills, .hs.is-overflow.at-start.at-end .moods { -webkit-mask: none; mask: none; }
.player:not(.is-curtain-open):not(.no-curtain):not(.player--mini) .player__spinner { margin-top: min(46vh, 300px); width: 34px; height: 34px; border-width: 2px; }
