/* Treehouse+ app styles. Tokens come from media/brand/tokens.css (art builder);
   fallbacks here keep the app on-brand if that file is late. */

:root {
  --ground: #0B1F45;
  --ground-deep: #071735;
  --ground-lift: #14366B;
  --ground-raise: #1C4484;
  --shadow: #06122B;
  --gut: clamp(16px, 4vw, 60px);
  --tgap: clamp(10px, 1.1vw, 18px);
  --nav-h: 68px;
  --ease-pop: cubic-bezier(.3, 1.5, .5, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --accent: var(--orange, #E66135);
  --accent-shade: var(--orange-shade, #B8441F);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--ground);
  color: var(--text, #FFFDF7);
  font-family: var(--font-body, system-ui, sans-serif);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--ground);
  line-height: 1.45;
}
img, video, canvas, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--sunny, #FFC928); outline-offset: 3px; }

.ico { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; flex: none; }
.ico svg { width: 100%; height: 100%; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 300;
  background: var(--sunny, #FFC928); color: var(--ink, #0E2A57);
  font: 700 1rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .06em;
  padding: 12px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }
.noscript { padding: 40px; font-size: 1.2rem; }

/* ---------- wordmark fallback ---------- */
.wordmark { display: inline-flex; align-items: flex-start; gap: .08em; font-family: var(--font-display); font-size: 1.6rem; line-height: 1; color: var(--snow); white-space: nowrap; }
.wordmark__plus {
  display: inline-grid; place-items: center; width: 1em; height: 1em; margin-top: -.15em;
  background: var(--orange); color: var(--snow); border-radius: .22em; font-size: .9em;
  box-shadow: .1em .1em 0 var(--shadow); transform: rotate(-8deg);
}
.wordmark--xl { font-size: clamp(3rem, 9vw, 7rem); }

/* ---------- slab buttons: WOTD lean, hard navy drop ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.slab-btn {
  --bg: var(--sunny, #FFC928); --fg: var(--ink, #0E2A57); --sh: var(--shadow);
  position: relative; display: inline-flex; align-items: center;
  min-height: 52px; padding: 0 1.45em;
  background: var(--bg); color: var(--fg);
  font: 400 1.18rem/1 var(--font-display); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  border-radius: 7px; overflow: hidden;
  transform: skewX(var(--skew, -10deg));
  box-shadow: var(--drop, 6px) var(--drop, 6px) 0 var(--sh);
  transition: transform .18s var(--ease-pop), box-shadow .18s var(--ease-pop), background-color .2s;
}
.slab-btn__in { display: inline-flex; align-items: center; gap: .5em; transform: skewX(var(--unskew, 10deg)); }
.slab-btn__in .ico { width: 1.1em; height: 1.1em; }
.slab-btn::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -30%; width: 14%;
  background: rgba(255, 255, 255, .32); transform: skewX(-20deg) translateX(0);
  transition: transform .5s var(--ease-out); pointer-events: none;
}
.slab-btn:hover, .slab-btn:focus-visible { transform: skewX(var(--skew, -10deg)) translate(-2px, -3px); box-shadow: 9px 10px 0 var(--sh); }
.slab-btn:hover::after, .slab-btn:focus-visible::after { transform: skewX(-20deg) translateX(1100%); }
.slab-btn:active { transform: skewX(var(--skew, -10deg)) translate(5px, 5px); box-shadow: 0 0 0 var(--sh); transition-duration: .06s; }
.slab-btn--ink { --bg: var(--ground-raise); --fg: var(--snow); }
.slab-btn--ink:hover { --bg: #24529b; }
.slab-btn--snow { --bg: var(--snow); --fg: var(--ink); }
.slab-btn--red { --bg: var(--red); --fg: var(--snow); }

/* ---------- title slab (when a show has no logo art) ---------- */
.title-slab {
  display: inline-block; max-width: 100%;
  font: 400 clamp(2rem, 4.6vw, 4.2rem)/1 var(--font-display); color: var(--snow);
  background: var(--hc, var(--accent)); padding: .18em .5em .22em;
  transform: skewX(var(--skew)); box-shadow: var(--drop-lg, 10px) var(--drop-lg, 10px) 0 var(--shadow);
  border-radius: 8px;
}
.title-slab > span { display: inline-flex; align-items: center; gap: .3em; transform: skewX(var(--unskew)); }
.title-slab .ico { width: .8em; height: .8em; color: var(--sunny); }
.title-slab--sm { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.smart.show-logo img { width: 100%; height: 100%; object-fit: contain; object-position: left bottom; }

/* ---------- smart images ---------- */
.smart { position: relative; overflow: hidden; }
.smart picture { display: contents; }
.smart img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.smart.is-loaded img { opacity: 1; }

/* Fallback art: flat colour field, one blob, a cluster of halftone dots. */
.art-fb {
  position: absolute; inset: 0; overflow: hidden;
  background: var(--c);
  display: grid; align-items: end; padding: 9% 9%;
}
.art-fb__blob {
  position: absolute; width: 70%; aspect-ratio: 1; right: -18%; top: -30%;
  background: var(--cs); border-radius: 46% 54% 60% 40% / 52% 40% 60% 48%;
}
.art-fb__dots {
  position: absolute; left: -6%; bottom: -10%; width: 60%; height: 70%;
  background-image: radial-gradient(circle, rgba(255, 253, 247, .28) 34%, transparent 36%);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(circle at 20% 80%, #000 0 30%, transparent 70%);
  mask-image: radial-gradient(circle at 20% 80%, #000 0 30%, transparent 70%);
}
.art-fb__t {
  position: relative; font: 400 clamp(1rem, 1.6vw, 1.5rem)/1.05 var(--font-display); color: var(--snow);
  text-shadow: 3px 3px 0 var(--shadow);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- chips and badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .35em;
  font: 700 .78rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .08em;
  padding: .42em .62em; border-radius: 5px;
}
.chip--dark { background: rgba(6, 18, 43, .86); color: var(--snow); }
.chip--gold { background: var(--sunny); color: var(--ink); box-shadow: 3px 3px 0 var(--shadow); }
.badge {
  display: grid; place-items: center; width: 64px; aspect-ratio: 1; border-radius: 50%;
  background: var(--sunny); color: var(--ink); border: 4px solid var(--snow);
  box-shadow: 4px 4px 0 var(--shadow); font: 400 .95rem/1 var(--font-display); text-align: center;
  transform: rotate(-8deg);
}
.badge--sm { width: 46px; border-width: 3px; font-size: .78rem; }
.badge__in { display: grid; line-height: .95; }
.badge__in small { font-size: .62em; font-family: var(--font-cond); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: clamp(16px, 3vw, 44px);
  padding: 0 var(--gut); padding-top: env(safe-area-inset-top);
  background: linear-gradient(180deg, rgba(7, 23, 53, .85), rgba(7, 23, 53, 0));
  transition: background-color .3s, box-shadow .3s;
}
.nav.is-solid { background: var(--ground-deep); box-shadow: 0 4px 0 var(--shadow); }
.nav__brand {
  --bh: 46px; --bpad: max(0px, calc((44px - var(--bh)) / 2));
  display: block; box-sizing: content-box; height: var(--bh); width: calc(var(--bh) * 2.03); flex: none; text-decoration: none;
  /* a 44 px tap height even when the logo is smaller, with no visible growth */
  padding-block: var(--bpad); margin-block: calc(var(--bpad) * -1);
}
.nav__logoimg { width: 100%; height: 100%; }
.nav__logoimg img { object-fit: contain; }
.nav__links { display: flex; gap: clamp(6px, 1.4vw, 22px); }
.nav__link {
  position: relative; padding: 14px 6px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none;
  font: 700 1.08rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .07em; color: var(--text-dim);
  transition: color .2s;
}
.nav__link:hover { color: var(--snow); }
.nav__link::after {
  content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 5px;
  background: var(--accent); transform: skewX(-20deg) scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease-pop); box-shadow: 2px 2px 0 var(--shadow);
}
.nav__link[aria-current="page"] { color: var(--snow); }
.nav__link[aria-current="page"]::after, .nav__link:hover::after { transform: skewX(-20deg) scaleX(1); }
.nav__me { margin-left: auto; display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-dim); border-radius: 30px; padding: 3px; }
.nav__me:hover { color: var(--snow); }
.nav__swap .ico, .nav__swap { width: 22px; height: 22px; }
body[data-route="profiles"] .nav, body[data-route="watch"] .nav { display: none; }

/* profile avatar chip */
.pav { position: relative; display: inline-block; width: 44px; aspect-ratio: 1; border-radius: 50%; flex: none; }
.pav__bg { position: absolute; inset: 0; border-radius: 50%; background: var(--pc); box-shadow: 3px 3px 0 var(--shadow); }
.pav__img { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; }
.pav__img img { object-fit: cover; object-position: 50% 75%; }
.pav__bg { overflow: hidden; }
.pav__bgimg { position: absolute; inset: 0; }
.pav--sm { width: 38px; }
.pav--nav { width: 42px; border: 3px solid var(--snow); border-radius: 50%; }

/* bottom tab bar on phones */
.tabbar { display: none; }
@media (max-width: 719px) {
  :root { --nav-h: 58px; }
  .nav__links { display: none; }
  .nav__brand { --bh: 38px; }
  .tabbar {
    position: fixed; inset: auto 0 0; z-index: 50; display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--ground-deep); box-shadow: 0 -4px 0 var(--shadow);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar__a {
    display: grid; justify-items: center; gap: 3px; padding: 6px 2px; text-decoration: none; border-radius: 12px;
    font: 700 .72rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint);
  }
  .tabbar__a .ico { width: 26px; height: 26px; }
  .tabbar__a[aria-current="page"] { color: var(--snow); background: var(--ground-lift); }
  .tabbar__a[aria-current="page"] .ico { color: var(--accent); }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  body[data-route="profiles"], body[data-route="watch"] { padding-bottom: 0; }
  body[data-route="profiles"] .tabbar, body[data-route="watch"] .tabbar { display: none; }
}

/* ---------- route transitions ---------- */
@keyframes vt-out { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateY(-10px); } }
::view-transition-old(root) { animation: vt-out .22s ease both; }
::view-transition-new(root) { animation: vt-in .38s var(--ease-out) both; }
html[data-nav-dir="back"]::view-transition-new(root) { animation-name: vt-in-back; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ======================================================================
   Picker
   ====================================================================== */
.picker { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.picker__gl, .hero__gl, .show__gl, .hubpage__gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.picker__gl { z-index: -2; opacity: .9; }
.picker__gl.no-gl, .hero__gl.no-gl, .show__gl.no-gl, .hubpage__gl.no-gl {
  background:
    radial-gradient(circle at 18% 30%, var(--sky) 0 12%, transparent 12.3%),
    radial-gradient(circle at 82% 72%, var(--orange) 0 14%, transparent 14.3%),
    radial-gradient(circle at 70% 18%, var(--pine) 0 8%, transparent 8.3%),
    var(--ground);
}
.picker::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 55% at 50% 52%, rgba(7, 23, 53, .92) 0 40%, rgba(7, 23, 53, .45) 75%, rgba(7, 23, 53, .15));
}
.picker__in { display: grid; justify-items: center; gap: clamp(18px, 3.5vh, 40px); padding: 48px var(--gut) 40px; text-align: center; width: 100%; }
.picker__brand { height: clamp(56px, 9vh, 96px); }
.picker__brand .wordmark { font-size: clamp(2rem, 5vh, 3rem); }
.picker__h { font: 400 clamp(2.3rem, 6vw, 4.6rem)/1 var(--font-display); color: var(--snow); text-shadow: 5px 5px 0 var(--shadow); letter-spacing: .01em; }
.picker__grid {
  --avs: clamp(92px, 13vw, 172px);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(22px, 3.2vw, 48px) clamp(16px, 3vw, 46px);
  max-width: calc(var(--avs) * 6 + 46px * 6);
  padding-top: calc(var(--avs) * .3);
}
.picker__note { font: 600 clamp(.95rem, 1.4vw, 1.1rem)/1.4 var(--font-body); color: var(--text-dim); }

.av { display: grid; justify-items: center; gap: 14px; width: var(--avs); border-radius: 20px; animation: av-in .6s var(--ease-pop) both; animation-delay: calc(var(--i) * 60ms + 120ms); }
@keyframes av-in { from { opacity: 0; transform: translateY(26px) scale(.8); } }
.av:focus-visible { outline: none; }
.av__disc { position: relative; width: var(--avs); aspect-ratio: 1; }
.av__bg {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: var(--pc); box-shadow: 7px 7px 0 var(--shadow);
  transition: transform .4s var(--ease-pop), box-shadow .3s;
}
.av__bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--pcs) 36%, transparent 38%);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(circle at 78% 22%, #000 0 18%, transparent 52%);
  mask-image: radial-gradient(circle at 78% 22%, #000 0 18%, transparent 52%);
}
.av__bg::after {
  content: ""; position: absolute; width: 74%; aspect-ratio: 1; left: -22%; bottom: -30%;
  border-radius: 50%; background: var(--pcs); opacity: .8;
}
.av__bgimg { position: absolute; inset: 0; }
.av__clip { position: absolute; inset: 0; pointer-events: none; }
.av__clip--circle { clip-path: circle(50% at 50% 50%); }
/* Everything above the circle's middle line: the head pops out over the rim. */
.av__clip--top { clip-path: polygon(-60% -120%, 160% -120%, 160% 50%, -60% 50%); opacity: 0; transition: opacity .12s .05s; }
.av__cut { position: absolute; left: 0; right: 0; bottom: 0; height: 125%; transform: translateY(5%) scale(1); transform-origin: 50% 100%; transition: transform .5s var(--ease-pop); }
.av__bg:has(.av__bgimg.is-loaded)::before, .av__bg:has(.av__bgimg.is-loaded)::after { display: none; }
.av__cut img { object-fit: contain; object-position: 50% 100%; }

.av__name {
  font: 400 clamp(1.05rem, 1.7vw, 1.45rem)/1 var(--font-display); color: var(--text-dim);
  padding: .3em .7em; border-radius: 6px; transform: skewX(var(--skew)); transition: background .2s, color .2s, box-shadow .2s;
}
.av:hover .av__cut, .av:focus-visible .av__cut, .av.is-picked .av__cut { transform: translateY(-3%) scale(1.16); }
.av:hover .av__clip--top, .av:focus-visible .av__clip--top, .av.is-picked .av__clip--top { opacity: 1; transition-delay: 0s; }
.av:hover .av__bg, .av:focus-visible .av__bg { box-shadow: 0 0 0 5px var(--snow), 10px 10px 0 5px var(--shadow); }
.av:hover .av__name, .av:focus-visible .av__name, .av.is-picked .av__name { background: var(--pc); color: var(--snow); box-shadow: 4px 4px 0 var(--shadow); }
.av.is-current .av__name::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: .4em; border-radius: 50%; background: var(--sunny); vertical-align: middle; }
.picker.is-picking .av:not(.is-picked) { opacity: 0; transform: scale(.85); transition: opacity .3s, transform .3s; }
.picker.is-picking .av.is-picked { transform: scale(1.18); transition: transform .5s var(--ease-pop); }
.picker.is-picking .picker__h, .picker.is-picking .picker__note { opacity: 0; transition: opacity .3s; }
@media (max-width: 560px) {
  .picker__grid { --avs: 27vw; gap: 26px 5vw; padding-top: 18px; }
}
/* phone held sideways: brand, question and every name on the first screen */
@media (orientation: landscape) and (max-height: 500px) {
  .picker__in { gap: 8px; padding: 10px var(--gut) 12px; }
  .picker__brand { height: clamp(34px, 11vh, 48px); }
  .picker__h { font-size: clamp(1.6rem, 10vh, 2.4rem); text-shadow: 3px 3px 0 var(--shadow); }
  .picker__grid { --avs: min(14vw, 30vh); gap: 8px 3vw; padding-top: calc(var(--avs) * .22); flex-wrap: nowrap; }
  .av { gap: 6px; }
  .av__name { font-size: 1rem; }
  .picker__note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .av { animation: none; }
  .av__cut, .av__bg { transition: none; }
}

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 200; background: radial-gradient(ellipse at 50% 50%, #132450 0%, #09122e 78%) #09122e; display: grid; place-items: center; cursor: pointer; transition: opacity .4s ease; }
.intro.is-out { opacity: 0; pointer-events: none; }
/* cover: the ident's own navy runs to every edge, so no band shows on 16:10 or tall screens */
.intro__v { width: 100%; height: 100%; object-fit: cover; }
.intro__skip {
  position: absolute; right: max(var(--gut), env(safe-area-inset-right)); bottom: calc(28px + env(safe-area-inset-bottom));
  font: 700 1rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .1em;
  background: rgba(255, 253, 247, .14); color: var(--snow); border: 2px solid rgba(255, 253, 247, .5);
  padding: 12px 20px; border-radius: 30px;
}
.intro__skip:hover { background: var(--snow); color: var(--ink); }
.intro__still { position: absolute; inset: 0; display: grid; place-items: center; }
.intro--still .intro__still { animation: still-in .9s ease both; }
@keyframes still-in { from { opacity: 0; } }

/* ======================================================================
   Home: hero
   ====================================================================== */
.hero { position: relative; height: clamp(540px, 80vh, 940px); overflow: hidden; background: var(--ground-deep); }
.hero__track { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s; }
.hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s; z-index: 1; }
.hero__media { position: absolute; inset: 0; }
.hero__media > .smart, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__img img { object-position: 70% 30%; }
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 23, 53, .92) 0%, rgba(7, 23, 53, .66) 30%, rgba(7, 23, 53, 0) 62%),
    linear-gradient(0deg, var(--ground) 0%, rgba(11, 31, 69, 0) 32%);
}
.hero__char {
  position: absolute; right: 7%; bottom: 0; height: 78%; aspect-ratio: .8; pointer-events: none;
  filter: drop-shadow(10px 10px 0 rgba(6, 18, 43, .55));
}
.hero__char img { object-fit: contain; object-position: 50% 100%; }
.hero__slide.is-active .hero__char { animation: char-in .8s var(--ease-pop) .15s both; }
@keyframes char-in { from { transform: translateY(18%) rotate(4deg); opacity: 0; } }
.hero__copy {
  position: absolute; left: var(--gut); bottom: clamp(80px, 14vh, 150px); width: min(560px, 46vw);
  display: grid; gap: 16px; justify-items: start;
}
.hero__slide.is-active .hero__copy > * { animation: copy-in .7s var(--ease-out) both; }
.hero__slide.is-active .hero__copy > :nth-child(2) { animation-delay: .06s; }
.hero__slide.is-active .hero__copy > :nth-child(3) { animation-delay: .12s; }
.hero__slide.is-active .hero__copy > :nth-child(4) { animation-delay: .18s; }
.hero__slide.is-active .hero__copy > :nth-child(5) { animation-delay: .24s; }
@keyframes copy-in { from { opacity: 0; transform: translateX(-24px); } }
.hero__logo { width: min(100%, clamp(400px, 30vw, 600px)); }
.hero__logo .show-logo { max-height: 26vh; }
.hero__logo .title-slab { font-size: clamp(1.9rem, 3.4vw, 3.3rem); }
.hero__logo .show-logo { aspect-ratio: 2.2; width: 100%; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hero__meta li {
  font: 700 .9rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .08em;
  padding: .45em .7em; border-radius: 5px; background: rgba(6, 18, 43, .6); color: var(--snow);
}
.hero__meta li:first-child { background: var(--hc); }
.hero__blurb { font-size: clamp(1rem, 1.25vw, 1.2rem); line-height: 1.45; color: var(--snow); max-width: 40ch; text-shadow: 0 1px 2px rgba(6, 18, 43, .6); }
.greet { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 40px; background: rgba(6, 18, 43, .72); }
.greet__t { font: 400 1.02rem/1.1 var(--font-display); color: var(--snow); }
.hero__dots { position: absolute; z-index: 3; right: var(--gut); bottom: clamp(70px, 15vh, 150px); display: flex; gap: 6px; }
.hero__dot { width: 44px; height: 44px; display: grid; place-items: center; }
.hero__dot span { width: 12px; height: 12px; border-radius: 3px; background: rgba(255, 253, 247, .4); transform: skewX(-14deg); transition: width .4s var(--ease-pop), background .3s; }
.hero__dot[aria-selected="true"] span { width: 30px; background: var(--sunny); box-shadow: 2px 2px 0 var(--shadow); }

.premiere {
  display: inline-grid; gap: 6px; padding: 12px 20px; border-radius: 8px;
  background: var(--red); color: var(--snow); transform: skewX(var(--skew)); box-shadow: var(--drop) var(--drop) 0 var(--shadow);
}
.premiere > * { transform: skewX(var(--unskew)); }
.premiere__k { font: 700 .88rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .08em; }
.premiere__t { font: 400 1.6rem/1 var(--font-display); font-variant-numeric: tabular-nums; }

/* ---------- hubs ---------- */
.home__body { position: relative; z-index: 2; padding-bottom: 60px; }
.home > .home__body { margin-top: clamp(-70px, -7vh, -30px); }
.hubs { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 26px); padding: 0 var(--gut); }
.hub {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius, 14px); overflow: hidden;
  background: var(--hc); text-decoration: none; isolation: isolate;
  box-shadow: var(--drop) var(--drop) 0 var(--shadow);
  transition: transform .3s var(--ease-pop), box-shadow .3s var(--ease-pop);
}
.hub__media { position: absolute; inset: 0; z-index: -1; }
.hub__media > .smart, .hub__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hub__video { opacity: 0; transition: opacity .4s; }
.hub.is-playing .hub__video { opacity: 1; }
.hub::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(6, 18, 43, .7), rgba(6, 18, 43, 0) 60%);
}
.hub::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 3px solid transparent; transition: border-color .2s; pointer-events: none; }
.hub__label {
  position: absolute; left: 12px; bottom: 10px; right: 12px; z-index: 1;
  display: flex; align-items: center; gap: .35em;
  font: 400 clamp(1.05rem, 1.9vw, 1.9rem)/1 var(--font-display); color: var(--snow); text-shadow: 3px 3px 0 var(--shadow);
}
.hub__label .ico { color: var(--sunny); width: .9em; height: .9em; filter: drop-shadow(2px 2px 0 var(--shadow)); }
.hub:hover, .hub:focus-visible { transform: translate(-3px, -4px); box-shadow: 10px 11px 0 var(--shadow); outline: none; }
.hub:hover::after, .hub:focus-visible::after { border-color: var(--snow); }
@media (max-width: 719px) {
  .hubs { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- rows ---------- */
.row { margin-top: clamp(22px, 3vw, 40px); }
.row__title { padding: 0 var(--gut); font: 400 clamp(1.3rem, 2vw, 1.85rem)/1.1 var(--font-display); color: var(--snow); letter-spacing: .01em; }
.row__body { position: relative; }
.row__scroller {
  --n: 2.2;
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - var(--tgap) * (var(--n) - 1)) / (var(--n) + .32));
  gap: var(--tgap);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut);
  padding: 14px var(--gut) 26px;
  scrollbar-width: none;
}
.row__scroller::-webkit-scrollbar { display: none; }
@media (max-width: 479px) { .row__scroller { --n: 1.3; } }
@media (min-width: 560px) { .row__scroller { --n: 3; } }
@media (min-width: 800px) { .row__scroller { --n: 4; } }
@media (min-width: 1100px) { .row__scroller { --n: 5; } }
@media (min-width: 1400px) { .row__scroller { --n: 6; } }
.row__scroller > * { scroll-snap-align: start; min-width: 0; }
.row__arrow {
  position: absolute; z-index: 4; top: 14px; height: calc(100% - 40px - 3.4em);
  width: calc(var(--gut) - 4px); min-width: 44px; display: none; place-items: center; color: var(--snow);
  background: rgba(7, 23, 53, .7); opacity: 0; transition: opacity .2s, background .2s;
}
.row__arrow .ico { width: 30px; height: 30px; transition: transform .2s var(--ease-pop); }
.row__arrow--prev { left: 0; border-radius: 0 10px 10px 0; }
.row__arrow--next { right: 0; border-radius: 10px 0 0 10px; }
.row__arrow:hover { background: rgba(7, 23, 53, .92); }
.row__arrow:hover .ico { transform: scale(1.25); }
@media (hover: hover) and (pointer: fine) {
  .row__arrow { display: grid; }
  .row__body:hover .row__arrow, .row__body:focus-within .row__arrow { opacity: 1; }
}

/* tiles */
.tile { position: relative; display: block; color: inherit; text-decoration: none; outline: none; }
.tile__frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: var(--ground-lift); box-shadow: 5px 5px 0 var(--shadow);
  transition: transform .28s var(--ease-pop), box-shadow .28s var(--ease-pop);
}
.tile__frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 3px solid transparent; transition: border-color .15s; pointer-events: none; }
.tile__art { position: absolute; inset: 0; }
.tile__play {
  position: absolute; left: 10px; bottom: 10px; width: 42px; height: 42px; display: grid; place-items: center;
  background: var(--sunny); color: var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--shadow);
  opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s var(--ease-pop);
}
.tile__play .ico { width: 20px; height: 20px; margin-left: 2px; }
.tile__len { position: absolute; right: 8px; bottom: 8px; }
.tile:hover .tile__frame, .tile:focus-visible .tile__frame { transform: translate(-3px, -4px) scale(1.035); box-shadow: 9px 10px 0 var(--shadow); }
.tile:hover .tile__frame::after, .tile:focus-visible .tile__frame::after { border-color: var(--sunny); }
.tile:hover .tile__play, .tile:focus-visible .tile__play { opacity: 1; transform: scale(1); }
.tile:active .tile__frame { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); transition-duration: .08s; }
.tile__meta { display: grid; gap: 3px; padding: 10px 2px 0; }
.tile__show { font: 700 .76rem/1.1 var(--font-cond); text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.tile__title {
  font: 600 clamp(.88rem, 1vw, 1rem)/1.25 var(--font-body); color: var(--snow);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prog { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: rgba(6, 18, 43, .75); }
.prog__bar { display: block; height: 100%; background: var(--accent); }

/* coming soon */
.tile__frame.is-soon .tile__art { filter: saturate(.7) brightness(.55); }
.tile__soon { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 10px; }
.tile__soon .badge { position: absolute; right: 10px; top: 10px; width: clamp(44px, 4vw, 62px); font-size: clamp(.7rem, .85vw, .95rem); }
.cd { display: inline-grid; gap: 3px; padding: 7px 10px; border-radius: 6px; background: var(--red); box-shadow: 3px 3px 0 var(--shadow); transform: skewX(var(--skew)); }
.cd > * { transform: skewX(var(--unskew)); }
.cd__label { font: 700 .72rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .1em; }
.cd__time { font: 400 1.08rem/1 var(--font-display); font-variant-numeric: tabular-nums; }

/* show tiles with characters standing on them (Netflix Kids) */
.tile--show .tile__frame { background: var(--ground-lift); }
.tile--show .tile__art img { object-position: left center; }
.tile__brand { position: absolute; inset: 0; display: grid; place-items: center; padding: 10% 14%; }
.tile__logo { width: 100%; height: 100%; }
.tile__logo img { object-fit: contain; }
.tile__name { font: 400 clamp(1.05rem, 1.6vw, 1.5rem)/1.05 var(--font-display); color: var(--snow); text-shadow: 3px 3px 0 var(--shadow); text-align: center; }
.tile--show > .chip, .tile--show .tile__frame > .chip { position: absolute; left: 8px; top: 8px; }
.row--shows .row__scroller { padding-top: clamp(64px, 7.5vw, 120px); }
.tile.has-char .tile__frame { z-index: 1; }
.tile__char {
  position: absolute; z-index: 0; right: 6%; bottom: 62%; width: 46%; aspect-ratio: .9; pointer-events: none;
  transition: transform .35s var(--ease-pop); transform-origin: 50% 100%;
  filter: drop-shadow(4px 4px 0 rgba(6, 18, 43, .6));
}
.tile__char img { object-fit: contain; object-position: 50% 100%; }
.tile:hover .tile__char, .tile:focus-visible .tile__char { transform: translate(-3px, -10px) scale(1.08) rotate(-3deg); }

/* ======================================================================
   Hub page
   ====================================================================== */
.hubpage__head { position: relative; height: clamp(300px, 46vh, 520px); overflow: hidden; display: flex; align-items: flex-end; }
.hubpage__media { position: absolute; inset: 0; }
.hubpage__video, .hubpage__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hubpage__scrim { position: absolute; inset: 0; background: linear-gradient(0deg, var(--ground) 2%, rgba(11, 31, 69, .2) 55%, rgba(11, 31, 69, .55)); }
.hubpage__copy { position: relative; padding: 0 var(--gut) clamp(26px, 5vh, 56px); display: grid; gap: 18px; justify-items: start; }
.hubpage__line { font-size: clamp(1rem, 1.3vw, 1.2rem); max-width: 44ch; color: var(--snow); text-shadow: 0 1px 3px rgba(6, 18, 43, .8); }
.hubpage__body { padding-top: 0; }

/* ======================================================================
   Show page
   ====================================================================== */
.show__head { position: relative; min-height: clamp(480px, 78vh, 860px); display: flex; align-items: flex-end; overflow: hidden; }
.show__media { position: absolute; inset: 0; }
.show__media > .smart, .show__media > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.show__banner img { object-position: 70% 30%; }
.show__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 23, 53, .9) 0%, rgba(7, 23, 53, .5) 36%, rgba(7, 23, 53, 0) 62%),
    linear-gradient(0deg, var(--ground) 0%, rgba(11, 31, 69, 0) 40%);
}
.show__copy { position: relative; z-index: 2; padding: calc(var(--nav-h) + 30px) var(--gut) clamp(34px, 6vh, 70px); width: min(640px, 100%); display: grid; gap: 22px; justify-items: start; }
.show__logo { width: min(100%, 480px); }
.show__logo .show-logo { aspect-ratio: 2.2; width: 100%; }
.show__blurb { font-size: clamp(1.02rem, 1.3vw, 1.22rem); max-width: 42ch; color: var(--snow); text-shadow: 0 1px 3px rgba(6, 18, 43, .7); }
/* The greeter stands in the title column, beside (or under) the buttons: never on the banner's people.
   Its bubble sits in the free space above the buttons, to its left. */
.show__act { --gh: clamp(180px, 27vh, 280px); display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; width: 100%; }
.show__act .actions { flex: 0 1 auto; min-width: 0; }
.greeter { position: relative; z-index: 1; flex: none; margin-left: auto; height: var(--gh); aspect-ratio: .72; pointer-events: none; }
.greeter__img { position: absolute; inset: 0; animation: greet-in .9s var(--ease-pop) .1s both; filter: drop-shadow(12px 12px 0 rgba(6, 18, 43, .5)); }
.greeter__img img { object-fit: contain; object-position: 100% 100%; }
.greeter:has(.greeter__img.is-fallback), .greeter:has(.greeter__img:not(.is-loaded)) { visibility: hidden; }
.greeter__bubble {
  position: absolute; right: 78%; top: 0; width: max-content; max-width: 11em;
  background: var(--snow); color: var(--ink); padding: 14px 20px; border-radius: 26px;
  font: 400 clamp(1.05rem, 1.6vw, 1.45rem)/1.15 var(--font-display);
  box-shadow: 6px 6px 0 var(--shadow); animation: bubble-in .6s var(--ease-pop) .75s both;
}
.greeter__bubble::after {
  content: ""; position: absolute; right: 14%; bottom: -16px; width: 26px; height: 22px;
  background: var(--snow); clip-path: polygon(0 0, 100% 0, 85% 100%);
}
@keyframes greet-in { from { transform: translateY(30%); } }
@keyframes bubble-in { from { opacity: 0; transform: scale(.4) rotate(-8deg); } }

.show__eps { max-width: calc(1180px + 2 * var(--gut)); padding: 10px var(--gut) 80px; }
.show__epshead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.show__epshead .row__title { padding: 0; }
.season { position: relative; display: inline-flex; align-items: center; }
.season__select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  font: 400 1.15rem/1 var(--font-display); color: var(--snow);
  background: var(--ground-raise); border: 0; border-radius: 8px; padding: 13px 50px 13px 18px;
  box-shadow: 5px 5px 0 var(--shadow);
}
.season__select:hover { background: #24529b; }
.season__select option { background: var(--ground-lift); color: var(--snow); font-family: var(--font-body); }
.season__chev { position: absolute; right: 14px; width: 22px; height: 22px; pointer-events: none; color: var(--sunny); }
.eps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ep__link {
  display: grid; grid-template-columns: minmax(150px, 280px) 1fr; gap: clamp(14px, 2vw, 26px); align-items: center;
  padding: 12px; border-radius: 14px; text-decoration: none; color: inherit; transition: background .2s;
}
a.ep__link:hover, a.ep__link:focus-visible { background: var(--ground-lift); }
.ep__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--ground-lift); box-shadow: 4px 4px 0 var(--shadow); }
.ep__img { position: absolute; inset: 0; }
.ep__play {
  position: absolute; inset: 0; margin: auto; width: 50px; height: 50px; display: grid; place-items: center;
  background: var(--sunny); color: var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--shadow);
  opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s var(--ease-pop);
}
.ep__play .ico { width: 22px; height: 22px; margin-left: 3px; }
a.ep__link:hover .ep__play, a.ep__link:focus-visible .ep__play { opacity: 1; transform: scale(1); }
.ep__body { display: grid; gap: 6px; min-width: 0; }
.ep__title { font: 400 clamp(1.1rem, 1.6vw, 1.4rem)/1.15 var(--font-display); color: var(--snow); }
.ep__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 700 .85rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); }
.ep__blurb { color: var(--text-dim); font-size: .98rem; max-width: 62ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ep.is-soon .ep__img { filter: saturate(.7) brightness(.6); }
.ep__soon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 700 .9rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .07em; color: var(--sunny); }
.ep__soon .cd__time { color: var(--snow); background: var(--red); padding: 5px 9px; border-radius: 5px; font-size: 1rem; }

@media (max-width: 719px) {
  .hero { height: auto; min-height: 640px; }
  .hero__slide { display: flex; flex-direction: column; justify-content: flex-end; }
  .hero__copy { position: relative; left: auto; bottom: auto; width: auto; padding: 0 var(--gut) 66px; gap: 14px; }
  .hero__scrim { background: linear-gradient(0deg, var(--ground) 8%, rgba(11, 31, 69, .88) 42%, rgba(11, 31, 69, 0) 70%); }
  .hero__char { height: 44%; right: 2%; bottom: auto; top: 64px; }
  .hero__logo { width: min(78%, 330px); }
  .hero__dots { left: 0; right: 0; bottom: 18px; justify-content: center; }
  .hero__blurb { font-size: .98rem; }
  .greet { display: none; }
  .home > .home__body { margin-top: 0; }
  .slab-btn { min-height: 48px; font-size: 1.08rem; }

  .show__head { min-height: 0; flex-direction: column; align-items: stretch; justify-content: flex-end; }
  .show__media { height: 64vw; min-height: 260px; position: relative; inset: auto; }
  .show__scrim { background: linear-gradient(0deg, var(--ground) 0%, var(--ground) 32%, rgba(11, 31, 69, 0) 58%); }
  .show__copy { padding: 0 var(--gut) 26px; margin-top: -60px; }
  /* phones: Play stays on the first screen; the greeter stands just under it, right side */
  .show__act { --gh: 136px; row-gap: 4px; }
  .show__act .actions { flex-basis: 100%; }
  .greeter__bubble { font-size: 1rem; padding: 9px 14px; max-width: 9.5em; }
  .ep__link { grid-template-columns: 132px 1fr; padding: 8px 4px; gap: 12px; align-items: start; }
  .ep__blurb { -webkit-line-clamp: 2; font-size: .92rem; }
  .ep__title { font-size: 1.05rem; }
}

/* ======================================================================
   Watch
   ====================================================================== */
body[data-route="watch"] { background: var(--ground-deep); }
.watch { min-height: 100vh; padding-bottom: 40px; }
.wbar { display: flex; align-items: center; gap: 14px; padding: calc(10px + env(safe-area-inset-top)) var(--gut) 10px; min-height: 66px; }
.wbar__back { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--ground-lift); box-shadow: 3px 3px 0 var(--shadow); flex: none; transition: transform .2s var(--ease-pop), background .2s; }
.wbar__back:hover { background: var(--ground-raise); transform: translateX(-3px); }
.wbar__back .ico { width: 24px; height: 24px; }
.wbar__t { min-width: 0; display: grid; gap: 4px; }
.wbar__show {
  font: 700 .82rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .1em; color: var(--sunny); text-decoration: none;
  /* 44 px tap height without pushing the title down */
  justify-self: start; padding: 16px 0; margin: -16px 0 -12px; position: relative;
}
.wbar__show:hover { text-decoration: underline; }
.wbar__ep { font: 400 clamp(1.1rem, 2vw, 1.5rem)/1.1 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stage { --pw: 100%; display: flex; justify-content: center; align-items: flex-start; gap: 24px; padding: 0 var(--gut); background: var(--ground-deep); }
.stage__col { width: var(--pw); flex: none; transition: width .6s var(--ease-out); min-width: 0; }
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; box-shadow: 8px 8px 0 var(--shadow); }
.player__mount, .player__mount > div, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.stage.is-error .stage__col { display: none; }
.stage.is-error .card, .stage.is-error.is-side .card { flex: 1 1 auto; width: auto; max-width: 720px; max-height: none; opacity: 1; padding: 10px 0 0; }
.card--error .next__thumb { width: min(100%, 520px); }
/* errors stand alone (no player beside them): centre the whole card */
.stage.is-error .card { margin: 0 auto; }
.card__in.card--error { justify-items: center; text-align: center; }
.card--error .card__blurb { margin: 0 auto; }
.card--error .card__acts { justify-content: center; justify-self: center; }

.ctrl {
  margin-top: 16px; display: grid; gap: 6px; padding: 10px 14px 12px; border-radius: 14px;
  background: var(--ground-lift); box-shadow: 5px 5px 0 var(--shadow);
}
.ctrl__seek { display: flex; align-items: center; gap: 12px; }
.ctrl .ctrl__back { display: none; }

/* autoplay blocked: a big Play (or Tap for sound) in our own panel, never on the iframe */
.ctrl__prompt { display: none; }
.stage.needs-tap .ctrl__prompt, .stage.needs-sound .ctrl__prompt { display: flex; justify-content: center; padding: 4px 0 2px; }
.ctrl__start, .ctrl__sound { display: none; }
.stage.needs-tap .ctrl__start, .stage.needs-sound:not(.needs-tap) .ctrl__sound {
  display: inline-flex; align-items: center; justify-content: center; min-height: 56px; width: min(100%, 360px);
  border-radius: 10px; background: var(--sunny); color: var(--ink); transform: skewX(var(--skew));
  box-shadow: var(--drop) var(--drop) 0 var(--shadow); position: relative;
}
/* the button holds still (easy to hit); a ring pulses around it */
.stage.needs-tap .ctrl__start::after, .stage.needs-sound:not(.needs-tap) .ctrl__sound::after {
  content: ""; position: absolute; inset: -5px; border-radius: 13px; border: 3px solid var(--sunny);
  animation: tap-ring 1.6s ease-out infinite; pointer-events: none;
}
.ctrl__sound::after { border-color: var(--snow) !important; }
.ctrl__sound { background: var(--snow) !important; }
.ctrl__start-in { display: inline-flex; align-items: center; gap: 10px; transform: skewX(var(--unskew)); font: 400 1.35rem/1 var(--font-display); }
.ctrl__start-in .ico { width: 26px; height: 26px; }
@keyframes tap-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.12, 1.35); } }
@media (prefers-reduced-motion: reduce) { .ctrl__start::after, .ctrl__sound::after { animation: none !important; } }
/* a Play tap is never silent: while the player wakes up, say so outside the frame */
.ctrl__wait { display: none; }
.stage.is-starting:not(.needs-tap) .ctrl__prompt { display: flex; justify-content: center; padding: 4px 0 2px; }
.stage.is-starting:not(.needs-tap) .ctrl__wait {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font: 400 1.15rem/1 var(--font-display); color: var(--snow);
}
.ctrl__spin { width: 22px; height: 22px; border-radius: 50%; border: 4px solid rgba(255, 253, 247, .25); border-top-color: var(--sunny); animation: spin .8s linear infinite; }
.stage.is-starting .cbtn--big, .stage.is-buffering .cbtn--big { position: relative; }
.stage.is-starting .cbtn--big::after, .stage.is-buffering .cbtn--big::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--snow);
  animation: spin .8s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ctrl__spin, .stage.is-starting .cbtn--big::after, .stage.is-buffering .cbtn--big::after { animation-duration: 2.4s; } }
.ctrl__time { font: 700 .92rem/1 var(--font-cond); letter-spacing: .04em; font-variant-numeric: tabular-nums; color: var(--text-dim); min-width: 3.6ch; }
.ctrl__time--len { text-align: right; }
.seek__wrap { position: relative; flex: 1; height: 44px; display: flex; align-items: center; }
.seek__wrap::before { content: ""; position: absolute; left: 0; right: 0; height: 8px; border-radius: 6px; background: var(--shadow); }
.seek__fill { position: absolute; left: 0; height: 8px; border-radius: 6px; background: var(--accent); width: 0; pointer-events: none; }
.seek { position: relative; width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: none; }
.seek::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.seek::-moz-range-track { height: 44px; background: transparent; }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: 11px; border-radius: 50%; background: var(--snow); border: 4px solid var(--accent); box-shadow: 2px 2px 0 var(--shadow); }
.seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--snow); border: 4px solid var(--accent); }
.ctrl__btns { display: flex; align-items: center; gap: 10px; }
.ctrl__l, .ctrl__r { display: flex; align-items: center; gap: 6px; }
.ctrl__mid { flex: 1; min-width: 0; text-align: center; }
.ctrl__now { font: 400 1.05rem/1.1 var(--font-display); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cbtn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: var(--snow); transition: background .2s, transform .2s var(--ease-pop); }
.cbtn .ico { width: 26px; height: 26px; }
.cbtn:hover { background: var(--ground-raise); transform: scale(1.08); }
.cbtn:active { transform: scale(.92); }
.cbtn--big { width: 58px; height: 58px; background: var(--sunny); color: var(--ink); box-shadow: 3px 3px 0 var(--shadow); }
.cbtn--big:hover { background: var(--sunny); }
.cbtn--big .ico { width: 28px; height: 28px; }

/* side card: never over the iframe; it takes room the player gives up */
.card {
  flex: 0 0 0; width: 0; min-width: 0; overflow: hidden; opacity: 0;
  transition: flex-basis .6s var(--ease-out), opacity .35s ease;
  align-self: center;
}
.stage.has-card.is-side .card { flex: 1 1 0; width: auto; max-width: 480px; opacity: 1; transition: flex-basis .6s var(--ease-out), opacity .45s ease .2s; }
.card__in { display: grid; gap: 16px; justify-items: start; padding: 10px 4px; min-width: 240px; }
.stage.has-card .card__in > * { animation: card-in .55s var(--ease-out) both; }
.stage.has-card .card__in > :nth-child(2) { animation-delay: .27s; }
.stage.has-card .card__in > :nth-child(3) { animation-delay: .34s; }
.stage.has-card .card__in > :nth-child(4) { animation-delay: .41s; }
.stage.has-card .card__in > :first-child { animation-delay: .2s; }
@keyframes card-in { from { opacity: 0; transform: translateX(34px); } }
.card__logo { width: min(100%, 300px); }
.card__logo .show-logo { aspect-ratio: 2.2; }
.card__kicker { font: 700 .95rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .1em; color: var(--sunny); }
.card__title { font: 400 clamp(1.4rem, 2.3vw, 2.2rem)/1.08 var(--font-display); color: var(--snow); }
.card__blurb { color: var(--text-dim); font-size: 1.02rem; max-width: 36ch; }
.card__acts { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: center; margin-top: 4px; }
.next__thumb { display: block; width: min(100%, 320px); aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; position: relative; box-shadow: 5px 5px 0 var(--shadow); }
.next__img { position: absolute; inset: 0; }
/* Snow label on blue; the gold wipe carries its own navy copy of the label and is
   revealed by clipping, so every glyph is high contrast at every moment. */
.next__go {
  position: relative; overflow: hidden; min-height: 52px; padding: 0 22px; border-radius: 7px;
  display: inline-grid; align-items: center;
  background: var(--ground-raise); color: var(--snow); transform: skewX(var(--skew)); box-shadow: var(--drop) var(--drop) 0 var(--shadow);
}
.next__go > * { grid-area: 1 / 1; }
.next__wipe {
  align-self: stretch; display: flex; align-items: center; margin: 0 -22px; padding: 0 22px;
  background: var(--sunny); color: var(--ink); clip-path: inset(0 100% 0 0); pointer-events: none; z-index: 1;
}
.card--next.is-counting .next__wipe { clip-path: inset(0 0 0 0); transition: clip-path var(--secs, 10s) linear; }
.next__lbl { position: relative; display: inline-flex; align-items: center; gap: 8px; transform: skewX(var(--unskew)); font: 400 1.15rem/1 var(--font-display); }
.next__lbl .ico { width: 20px; height: 20px; }
.next__n, .next__n2 { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--snow); font-variant-numeric: tabular-nums; }
.next__cancel { font: 700 1rem/1 var(--font-cond); text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim); padding: 14px 12px; border-radius: 8px; }
.next__cancel:hover { color: var(--snow); background: var(--ground-lift); }

/* stacked layout: the card slides in under the controls */
.stage:not(.is-side) .card--next { grid-template-columns: 116px 1fr; gap: 6px 14px; align-items: center; }
.stage:not(.is-side) .card--next .card__kicker { grid-column: 2; grid-row: 1; align-self: end; }
.stage:not(.is-side) .card--next .next__thumb { grid-column: 1; grid-row: 1 / span 2; width: 116px; box-shadow: 3px 3px 0 var(--shadow); border-radius: 8px; }
.stage:not(.is-side) .card--next .card__title { grid-column: 2; grid-row: 2; align-self: start; font-size: 1.2rem; }
.stage:not(.is-side) .card--next .card__acts { grid-column: 1 / -1; margin-top: 6px; }
.stage:not(.is-side) { flex-direction: column; align-items: center; }
.stage:not(.is-side) .card { width: var(--pw); max-width: 100%; flex: none; max-height: 0; transition: max-height .6s var(--ease-out), opacity .35s; }
.stage.has-card:not(.is-side) .card { max-height: 640px; opacity: 1; padding-top: 18px; }

.stage.is-fs, .stage.is-pseudo-fs { background: var(--ground-deep); padding: 8px max(12px, env(safe-area-inset-left)); align-items: center; justify-content: center; }
.stage.is-pseudo-fs { position: fixed; inset: 0; z-index: 150; overflow-y: auto; }
.stage.is-fs:not(.is-side), .stage.is-pseudo-fs:not(.is-side) { justify-content: flex-start; }
.stage.is-fs:not(.is-side) > :first-child, .stage.is-pseudo-fs:not(.is-side) > :first-child { margin-top: auto; }
.stage.is-fs:not(.is-side) > :last-child, .stage.is-pseudo-fs:not(.is-side) > :last-child { margin-bottom: auto; }
.stage.is-fs .ctrl { margin-top: 8px; }
.stage.is-fs .player { box-shadow: none; }

.watch__more { margin-top: 26px; }

@media (max-width: 719px) {
  .stage { padding: 0; }
  .player { box-shadow: none; }
  .ctrl { margin: 0; border-radius: 0 0 14px 14px; padding: 6px 10px 8px; box-shadow: none; }
  .ctrl__mid { display: none; }
  .ctrl__btns { justify-content: space-between; }
  .card__in { padding: 6px var(--gut) 12px; }
  /* stacked card under the controls: tight, so the title bar never scrolls away */
  .stage.has-card:not(.is-side) { row-gap: 6px; }
  .stage.has-card:not(.is-side) .card { padding-top: 4px; }
  .wbar { min-height: 58px; gap: 10px; }
  .wbar__back { width: 44px; height: 44px; }
}
/* phone held sideways: the player fills the height, one compact control row below
   (back lives in the row since the title bar steps aside) */
@media (orientation: landscape) and (max-height: 500px) {
  .wbar { display: none; }
  /* error and end cards: the title bar (with Back) comes back, compact */
  .watch.has-endcard .wbar { display: flex; min-height: 0; padding-top: calc(4px + env(safe-area-inset-top)); padding-bottom: 4px; padding-left: max(var(--gut), env(safe-area-inset-left)); }
  .watch.has-endcard .wbar__back { width: 44px; height: 44px; }
  .watch.has-endcard .wbar__ep { font-size: 1.1rem; }
  .watch { padding-top: env(safe-area-inset-top); }
  .watch.has-endcard { padding-top: 0; }
  /* error cards sit thumb-left, words-right, so the buttons stay on the first screen */
  .stage.is-error .card, .stage.is-error.is-side .card { padding-top: 6px; }
  .card__in.card--error { grid-template-columns: minmax(150px, 230px) 1fr; gap: 8px 22px; align-items: center; justify-items: start; text-align: left; padding: 4px 0 12px; }
  .card--error .next__thumb { grid-column: 1; grid-row: 1 / span 3; width: 100%; }
  .card--error .card__title, .card--error .card__blurb, .card--error .card__acts { grid-column: 2; }
  .card--error .card__title { align-self: end; }
  .card--error .card__blurb { margin: 0; font-size: .95rem; }
  .card--error .card__acts { justify-content: flex-start; justify-self: start; align-self: start; gap: 12px; }
  .card--error .slab-btn { min-height: 44px; font-size: 1rem; --drop: 4px; }
  .stage { padding-top: 4px; }
  .ctrl { margin-top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; padding: 2px 6px; border-radius: 0 0 12px 12px; box-shadow: none; }
  .ctrl__btns { display: contents; }
  /* a prompt (Tap to play, Tap for sound, Getting it ready) takes the seek bar's
     place in the one row, so it never adds a row or shrinks the player */
  .ctrl__prompt { order: 2; flex: 1 1 140px; min-width: 0; }
  .stage.needs-tap .ctrl__seek, .stage.needs-sound .ctrl__seek, .stage.is-starting .ctrl__seek { display: none; }
  .ctrl__l { order: 1; gap: 2px; }
  .ctrl__seek { order: 2; flex: 1 1 140px; min-width: 0; gap: 8px; }
  .ctrl__r { order: 3; gap: 2px; }
  .ctrl__mid { display: none; }
  .ctrl .ctrl__back { display: grid; }
  .cbtn { width: 44px; height: 44px; }
  .cbtn--big { width: 48px; height: 48px; }
  .stage.has-card.is-side .card { max-height: calc(100vh - 8px); overflow-y: auto; }
  .stage.is-side .card .next__thumb { width: min(100%, 220px); }
  .ctrl__prompt { padding: 4px 0 !important; }
  .stage.needs-tap .ctrl__start, .stage.needs-sound:not(.needs-tap) .ctrl__sound { min-height: 44px; width: auto; max-width: 100%; padding: 0 16px; }
  .ctrl__start-in { font-size: 1.1rem; white-space: nowrap; }
  .ctrl__start-in .ico { width: 22px; height: 22px; }
  .stage.is-starting:not(.needs-tap) .ctrl__wait { font-size: 1rem; white-space: nowrap; }
  .card__in { gap: 10px; }
  .card__title { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stage__col, .card { transition: none !important; }
  .stage.has-card .card__in > * { animation: none; }
  .card--next.is-counting .next__wipe { transition: none; clip-path: inset(0 0 0 0); }
  .hero__slide, .hero__slide.is-active { transition: none; }
  .hero__slide.is-active .hero__copy > *, .hero__slide.is-active .hero__char, .greeter__img, .greeter__bubble { animation: none; }
  .slab-btn, .tile__frame, .hub, .tile__char { transition: none; }
}

/* ---------- 404 / error ---------- */
.lost { min-height: 100vh; display: grid; place-items: center; padding: 100px var(--gut); text-align: center; }
.lost__in { display: grid; gap: 22px; justify-items: center; }
.lost__big { font: 400 clamp(7rem, 22vw, 14rem)/.8 var(--font-display); color: var(--sunny); text-shadow: 10px 10px 0 var(--shadow); transform: rotate(-8deg); }
.lost__p { color: var(--text-dim); font-size: 1.1rem; max-width: 34ch; }

/* Hub art that already carries its title: keep our label for screen readers only. */
.hub:has(.hub__poster.is-loaded:not(.is-fallback)) .hub__label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hub:has(.hub__poster.is-loaded:not(.is-fallback))::before { display: none; }

/* Tablets: keep the greeter clear of the copy column. */
@media (min-width: 720px) and (max-width: 1100px) {
  .show__act { --gh: clamp(170px, 25vh, 230px); }
  .greeter__bubble { font-size: 1.05rem; }
  .show__scrim {
    background:
      linear-gradient(90deg, rgba(7, 23, 53, .94) 0%, rgba(7, 23, 53, .72) 45%, rgba(7, 23, 53, 0) 75%),
      linear-gradient(0deg, var(--ground) 0%, rgba(11, 31, 69, 0) 40%);
  }
}

/* Portrait tablets: the show page stacks like a phone, banner first. */
@media (orientation: portrait) and (min-width: 720px) and (max-width: 1100px) {
  .show__head { min-height: 0; flex-direction: column; align-items: stretch; justify-content: flex-end; }
  .show__media { height: 56vw; position: relative; inset: auto; }
  .show__scrim { background: linear-gradient(0deg, var(--ground) 0%, var(--ground) 30%, rgba(11, 31, 69, 0) 56%); }
  .show__copy { padding: 0 var(--gut) 32px; margin-top: -90px; }
  .show__act { --gh: 210px; }
}

/* Short landscape screens: the hero copy must clear the nav. */
@media (min-width: 720px) and (max-height: 820px) {
  .greet { display: none; }
  .hero__copy { bottom: clamp(70px, 11vh, 110px); gap: 12px; }
  .hero__logo .show-logo { max-height: 23vh; }
}

/* Phones held sideways (any short landscape screen): the first screen holds the
   title logo, the blurb and Play. The bottom tab bar would eat a fifth of the
   height, so its links move up into the nav. */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --nav-h: 52px; --lgut: max(var(--gut), env(safe-area-inset-left)); }
  .tabbar { display: none !important; }
  body { padding-bottom: 0; }
  .nav { gap: 12px; padding-left: var(--lgut); padding-right: max(var(--gut), env(safe-area-inset-right)); }
  .nav__brand { --bh: 34px; }
  .nav__links { display: flex; gap: 2px; }
  .nav__link { font-size: .9rem; padding: 10px 6px; }
  .nav__link::after { bottom: 4px; height: 4px; }

  .hero { height: 100vh; height: 100svh; min-height: 300px; }
  .hero__slide { display: block; }
  .hero__scrim {
    background:
      linear-gradient(90deg, rgba(7, 23, 53, .94) 0%, rgba(7, 23, 53, .72) 40%, rgba(7, 23, 53, 0) 72%),
      linear-gradient(0deg, rgba(11, 31, 69, .9) 0%, rgba(11, 31, 69, 0) 40%);
  }
  .hero__copy {
    position: absolute; left: var(--lgut); right: auto; top: auto; bottom: 14px;
    width: min(62%, 440px); padding: 0; gap: 8px;
  }
  .hero__logo { width: auto; max-width: 100%; }
  .hero__logo .show-logo { height: clamp(54px, 24vh, 112px); max-height: none; width: auto; max-width: 100%; }
  .hero__logo .title-slab { font-size: clamp(1.4rem, 8vh, 2.2rem); }
  .hero__meta li { font-size: .74rem; }
  .hero__blurb, .show__blurb { font-size: .9rem; line-height: 1.35; max-width: 44ch; }
  .hero__blurb { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  /* show pages: the whole blurb, in a slightly wider, tighter column */
  .show__blurb { font-size: .86rem; line-height: 1.3; max-width: 52ch; }
  .hero__dots { left: auto; right: max(var(--gut), env(safe-area-inset-right)); bottom: 6px; justify-content: flex-end; }
  .hero__copy .actions, .show__copy .actions { flex-wrap: nowrap; gap: 10px 14px; }
  .hero__copy .slab-btn, .show__copy .slab-btn { min-height: 44px; font-size: 1rem; padding: 0 1.05em; --drop: 4px; }
  .hero__copy .premiere, .show__copy .premiere { padding: 6px 14px; gap: 3px; --drop: 4px; }
  .premiere__k { font-size: .72rem; }
  .premiere__t { font-size: 1.15rem; }
  .greet { display: none; }
  .home > .home__body { margin-top: 0; }
  .hubs { grid-template-columns: repeat(4, 1fr); }

  .show__head { min-height: 100vh; min-height: 100svh; flex-direction: row; align-items: flex-end; justify-content: flex-start; }
  .show__media { position: absolute; inset: 0; height: auto; min-height: 0; }
  .show__scrim {
    background:
      linear-gradient(90deg, rgba(7, 23, 53, .94) 0%, rgba(7, 23, 53, .7) 42%, rgba(7, 23, 53, 0) 72%),
      linear-gradient(0deg, var(--ground) 0%, rgba(11, 31, 69, 0) 40%);
  }
  .show__copy { margin-top: 0; padding: calc(var(--nav-h) + 6px) 0 14px var(--lgut); width: min(66%, 500px); gap: 8px; }
  .show__logo { width: auto; max-width: 100%; }
  .show__logo .show-logo { height: clamp(54px, 26vh, 120px); width: auto; max-width: 100%; }
  .show__logo .title-slab { font-size: clamp(1.4rem, 8vh, 2.2rem); }
  .show__act { --gh: clamp(72px, 25vh, 108px); flex-wrap: nowrap; }
  .greeter__bubble { font-size: .88rem; padding: 7px 12px; max-width: 13em; border-radius: 18px; }
  .greeter__bubble::after { bottom: -12px; width: 20px; height: 16px; }
}

/* Pause card on phones: compact enough that it always fits beside or under the player. */
.stage:not(.is-side) .card--pause .card__logo { width: auto; max-width: 100%; }
.stage:not(.is-side) .card--pause .card__logo .show-logo { height: 64px; width: auto; max-width: 100%; }
.stage:not(.is-side) .card--pause .title-slab--sm { font-size: 1.3rem; }
.stage:not(.is-side) .card--pause { gap: 10px; }
.stage:not(.is-side) .card--pause .card__title { font-size: 1.25rem; }
.card--pause .card__blurb { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.stage:not(.is-side) .card--pause .card__blurb { -webkit-line-clamp: 2; font-size: .95rem; }
@media (orientation: landscape) and (max-height: 500px) {
  .card--pause { gap: 8px; }
  .card--pause .card__logo { width: auto; max-width: 100%; }
  .card--pause .card__logo .show-logo { height: clamp(40px, 14vh, 60px); width: auto; max-width: 100%; }
  .card--pause .title-slab--sm { font-size: 1.15rem; }
  .card--pause .card__title { font-size: 1.15rem; }
  .card--pause .card__blurb { -webkit-line-clamp: 4; font-size: .86rem; line-height: 1.3; }
  .card--pause .slab-btn { min-height: 44px; font-size: 1rem; --drop: 4px; }
  /* the player shrinks while a card is up: keep the controls on one row */
  .stage.has-card .ctrl__time { display: none; }
  .stage.has-card .ctrl__seek { flex-basis: 40px; }
}
