/* TeroxStreaming 3.0: top bar, sliding hero cards, poster rows, full-bleed show page.
   Loads after style.css and only overrides it; delete the <link> in index.html to get 2.0 back. */

:root {
  --bg: #111219;
  --bg-deep: #0c0d12;
  --raised: #1b1d27;
  --raised-2: #232633;
  --line: #262a36;
  --text: #f4f5f8;
  --text-2: #a8adbd;
  --text-3: #737a8c;
  --ui: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif;
  --top-h: 68px;
}

body {
  font-family: var(--ui);
}

/* ------------------------------------------------------------ top bar */

@media (min-width: 761px) {
  :root {
    --nav-w: 0px;
    /* content sits in a centered column up to 1680 px wide */
    --gutter: max(clamp(16px, 4vw, 56px), calc((100vw - 1680px) / 2));
  }

  .nav {
    inset: 0 0 auto 0;
    width: auto;
    height: var(--top-h);
    flex-direction: row;
    align-items: center;
    padding: 0 var(--gutter);
    border-right: 0;
    background: linear-gradient(to bottom, rgba(12, 13, 18, 0.9), rgba(12, 13, 18, 0));
    transition: background 0.25s;
  }

  .nav.is-solid {
    background: rgba(12, 13, 18, 0.96);
    backdrop-filter: blur(12px);
  }

  .nav-brand {
    font-family: var(--ui);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0;
  }

  .nav-links {
    flex: 1;
    flex-direction: row;
    justify-content: center;
    width: auto;
    gap: 2px;
  }

  .nav-end {
    flex-direction: row;
    width: auto;
    margin: 0;
    gap: 2px;
  }

  .nav-link {
    flex-direction: row;
    width: auto;
    gap: 7px;
    padding: 8px 11px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #c4c8d2;
    white-space: nowrap;  /* "Source test" wrapped onto two lines at 1600 px */
  }

  .nav-link svg {
    width: 16px;
    height: 16px;
  }

  .nav-link:hover,
  .nav-link.active {
    color: #fff;
  }

  .nav-link.active::before {
    left: 11px;
    right: 11px;
    top: auto;
    bottom: 0;
    width: auto;
    height: 2px;
    border-radius: 2px;
    background: #fff;
  }

  /* 2.0 set the tools apart with a line above Order; in a row that's a thin divider before it */
  .nav-link[data-route="order"] {
    margin: 0 0 0 14px;
  }

  .nav-link[data-route="order"]::after {
    top: 10px;
    bottom: 10px;
    left: -8px;
    right: auto;
    width: 1px;
    height: auto;
  }

  /* gear + avatar only, like the reference */
  .nav-end .nav-link > span:not(.avatar) {
    display: none;
  }

  .page {
    margin-left: 0;
  }

  .page-head {
    padding-top: calc(var(--top-h) + 32px);
  }
}

@media (min-width: 761px) and (max-width: 1250px) {
  .nav-extra {
    display: none;
  }
}

/* -------------------------------------------------------------- pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  font-family: var(--ui);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
}

.pill svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.pill-white {
  background: #fff;
  color: #0c0d12;
}

.pill-white:hover {
  background: #e4e5ea;
}

.pill-glass {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.pill-glass:hover {
  background: rgba(255, 255, 255, 0.2);
}

.pill-sm {
  height: 38px;
  padding: 0 16px;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.pill-sm svg {
  width: 16px;
  height: 16px;
}

.pill:disabled {
  opacity: 0.6;
}

.pill-circle {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  transition: background 0.15s, border-color 0.15s;
}

.pill-circle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
}

.pill-circle svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ------------------------------------------------- title logo + facts */

.logo3-main {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(54px, 6vw, 108px);
  line-height: 0.86;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
}

.logo3-art {
  display: block;
  width: clamp(260px, 26vw, 460px);
  max-height: clamp(110px, 13vw, 220px);
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 4px 22px rgba(0, 0, 0, 0.5));
}

.logo3-sub {
  font-weight: 800;
  font-size: clamp(20px, 1.9vw, 32px);
  margin-top: 6px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.hero3 .hero-meta,
.title3 .hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin-top: 20px;
  font-size: 14.5px;
  font-weight: 600;
  color: #dadde5;
}

.hero3 .hero-meta > span + span::before,
.title3 .hero-meta > span + span::before {
  content: "\00b7";
  margin: 0 10px;
  opacity: 0.7;
}

.hero3 .rating,
.title3 .rating {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 800;
  background: none;
  color: #fff;
}

.hero3 .hero-desc,
.title3 .hero-desc {
  margin-top: 16px;
  max-width: 34em;
  font-size: 17px;
  line-height: 1.55;
  color: #e6e8ee;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero3 .hero-actions,
.title3 .hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

/* ------------------------------------------------------ home carousel */

/* the current slide's art colour (set on <html> by setTint): tints the hero shading, card glow and poster hover.
   It switches instantly: easing it re-styled the whole page every frame and made the slide change lag. */
@property --tint {
  syntax: "<color>";
  inherits: true;
  initial-value: #2b3150;
}

/* ambience: the banner's colour washes down the whole site instead of flat grey, drifting slowly (dark theme only).
   Two layers (--amb-a / --amb-b, set by setTint) crossfade with opacity only, which the GPU does without repainting. */
:root:not([data-theme="light"]) body::before,
:root:not([data-theme="light"]) body::after {
  --al: var(--amb-a-l, #2b3150);
  --ac: var(--amb-a-c, #2b3150);
  --ar: var(--amb-a-r, #2b3150);
  content: "";
  position: fixed;
  inset: -12%;
  z-index: -1;
  pointer-events: none;
  background:
    /* left side = the picture's left edge colour, right side = its right edge, the top middle = its middle */
    radial-gradient(38% 55% at 4% 22%, color-mix(in srgb, var(--al) 30%, transparent), transparent 72%),
    radial-gradient(38% 55% at 96% 22%, color-mix(in srgb, var(--ar) 30%, transparent), transparent 72%),
    radial-gradient(42% 38% at 50% 6%, color-mix(in srgb, var(--ac) 20%, transparent), transparent 72%),
    linear-gradient(90deg, color-mix(in srgb, var(--al) 7%, transparent), color-mix(in srgb, var(--ac) 4%, transparent) 50%, color-mix(in srgb, var(--ar) 7%, transparent));
  animation: ambience-drift 38s ease-in-out infinite alternate;
  transition: opacity 1.4s ease;
  will-change: transform, opacity;
}

:root:not([data-theme="light"]) body::after {
  --al: var(--amb-b-l, #2b3150);
  --ac: var(--amb-b-c, #2b3150);
  --ar: var(--amb-b-r, #2b3150);
  opacity: 0;
}

:root.amb-b:not([data-theme="light"]) body::before { opacity: 0; }
:root.amb-b:not([data-theme="light"]) body::after { opacity: 1; }

@keyframes ambience-drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.06); }
}

.hero.hero3 {
  display: block;
  min-height: 0;
  padding: calc(var(--top-h) + 14px) 0 34px;
  margin-bottom: -34px;  /* room for the card's glow without pushing the rows down */
  overflow: hidden;
}

.hero-track {
  position: relative;
  height: clamp(380px, 37vw, 700px);
}

.hero-slide {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-radius: 18px;
  overflow: hidden;
  background: var(--raised);
  cursor: pointer;
  transition: transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.85s;
  will-change: transform;
}

/* side cards are darkened by this overlay, not a filter: a filter over the zooming art repainted the
   whole card every frame (the laggy swipe); fading an overlay is free for the GPU */
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #05060a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s;
}

.hero-slide.is-prev::before,
.hero-slide.is-next::before {
  opacity: 0.5;
}

.hero-slide.is-prev:hover::before,
.hero-slide.is-next:hover::before {
  opacity: 0.28;
}

/* the middle card glows in its own colour */
.hero-slide.is-current {
  cursor: default;
  z-index: 2;
  box-shadow:
    0 26px 70px -28px color-mix(in srgb, var(--tint) 75%, transparent),
    0 0 0 1px color-mix(in srgb, var(--tint) 28%, transparent);
}

/* side cards peek in, a little smaller and darker; brighter on hover so they read as clickable */
/* scaled from the centre like every other state: a left/right transform-origin snapped to the centre
   the moment a peek became the middle card, so it jerked sideways mid-slide (the 3% makes up for it) */
.hero-slide.is-prev {
  transform: translateX(calc(-97% - 22px)) scale(0.94);
}

.hero-slide.is-next {
  transform: translateX(calc(97% + 22px)) scale(0.94);
}

.hero-slide.is-far-left {
  transform: translateX(calc(-200% - 44px)) scale(0.94);
  opacity: 0;
}

.hero-slide.is-far-right {
  transform: translateX(calc(200% + 44px)) scale(0.94);
  opacity: 0;
}

/* slow zoom on the middle card's art + clip; eases back while it peeks, so it never snaps */
.hero-slide-art,
.hero-slide > video.clip {
  transform-origin: 62% 40%;
  /* the zoom waits until the slide has stopped moving (0.85 s), so the two never run at once */
  transition: transform 14s cubic-bezier(0.2, 0.6, 0.3, 1) 0.85s, opacity 0.6s ease;
  will-change: transform;  /* own GPU layer: the zoom never repaints */
}

/* no zoom on the middle card (the user: "it just starts, no frame zooming") */

.hero-slide-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--tint) 16%, rgba(10, 11, 16, 0.88)) 0%,
    color-mix(in srgb, var(--tint) 14%, rgba(10, 11, 16, 0.6)) 32%,
    rgba(10, 11, 16, 0) 66%);
  pointer-events: none;
}

.hero-slide .hero-body {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 660px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(24px, 4vw, 64px);
  transition: opacity 0.4s;
}

/* Windows "Animation effects" is OFF on the user's PC (see the season hero note): keep the hero + ambience moving */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-theme="light"]) body::before,
  :root:not([data-theme="light"]) body::after { animation-duration: 38s !important; transition-duration: 1.4s !important; }
  .hero-slide, .hero-slide::before { transition-duration: 0.85s !important; }
  .hero-slide .hero-body { transition-duration: 0.4s !important; }
  .hero-slide-art, .hero-slide > video.clip { transition-duration: 14s, 0.6s !important; }
}

.hero-slide:not(.is-current) .hero-body {
  opacity: 0;
  pointer-events: none;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.hero-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
  transition: width 0.3s, background 0.3s;
}

.hero-dots button[aria-current="true"] {
  width: 34px;
  background: #fff;
}

/* ------------------------------------------------------------- rows */

.row {
  margin-top: 46px;
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.row-title {
  font-family: var(--display);
  font-size: clamp(28px, 1.8vw, 38px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: none;
}

.row-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-all {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 30px;
  padding: 0 9px 0 14px;
  margin-right: 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}

.row-all:hover {
  background: color-mix(in srgb, var(--text) 14%, transparent);
  color: var(--text);
}

.row-all svg {
  width: 14px;
  height: 14px;
}

.strip-posters {
  grid-auto-columns: clamp(130px, 10.3vw, 174px);
}

.strip-posters .card-text {
  display: none;
}

.poster .card-media {
  border-radius: 10px;
}

/* poster hover: lifts, grows, tilts toward the mouse (--rx/--ry from app.js), glows in the banner colour */
.strip-posters {
  padding-top: 16px;
  padding-bottom: 22px;
  margin-top: -12px;
  margin-bottom: -18px;
}

/* spring: a small overshoot on the way up, like Apple TV's posters */
/* leaving: plain ease-out, no overshoot (the spring swung the poster past flat, so it sat crooked, then snapped back) */
.card.poster .card-media {
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s, filter 0.4s;
  will-change: transform;  /* one GPU layer the whole time: no re-raster jump when the transition ends */
}

.card.poster:hover .card-media,
.card.poster:focus-visible .card-media {
  transition-timing-function: cubic-bezier(0.34, 1.45, 0.55, 1), ease, ease;
  transform: perspective(700px) translateY(-8px) scale(1.08) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow:
    0 30px 60px -14px color-mix(in srgb, var(--tint) 70%, rgba(0, 0, 0, 0.7)),
    0 0 0 2px color-mix(in srgb, var(--tint) 45%, #fff);
  filter: brightness(1.08) saturate(1.08);
  z-index: 2;
}

/* shine: a soft light that follows the mouse (--mx/--my from app.js) */
.card.poster .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 20%), rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 55%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card.poster:hover .card-media::after {
  opacity: 1;
}

/* info panel: name, years and Play slide up from the bottom after a beat */
.card-reveal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 44px 12px 12px;
  background: linear-gradient(to top, rgba(6, 7, 11, 0.94), rgba(6, 7, 11, 0.7) 55%, transparent);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.card.poster:hover .card-reveal,
.card.poster:focus-visible .card-reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s 0.35s, transform 0.45s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto;
}

.card-reveal-name {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  padding-right: 40px;
}

.card-reveal-sub {
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  padding-right: 40px;
}

.card-reveal-play {
  position: absolute;
  right: 10px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  transition: transform 0.2s;
}

.card-reveal-play:hover {
  transform: scale(1.12);
}

.card-reveal-play svg {
  width: 15px;
  height: 15px;
  margin-left: 2px;
}

/* ----------------------------------------- short rows (fitRow in app.js) */

.strip > .card.feature {
  display: none;
}

.strip.is-short {
  display: flex;
  overflow: visible;  /* nothing to scroll; lets the hover lift show at the edges */
}

.strip.is-short > .card {
  flex: 0 0 var(--pw);
  width: var(--pw);
}

.strip-posters.is-short > .card.feature {
  display: block;
  flex-basis: calc(var(--pw) * 2.6667);
  width: calc(var(--pw) * 2.6667);
}

.strip-posters.is-short > .card.feature + .card {
  display: none;  /* the feature card already shows this title */
}

/* two titles share (feature + one poster + gap) evenly: Movies row, Books + Instructions */
.strip-posters.is-short > .card.feature.feature-half {
  display: block;
  flex-basis: calc(var(--pw) * 1.8333 + var(--pg, 16px) / 2);
  width: calc(var(--pw) * 1.8333 + var(--pg, 16px) / 2);
}

.strip-posters.is-short > .feature-half + .feature-half + .card,
.strip-posters.is-short > .feature-half + .feature-half + .card + .card {
  display: none;  /* the two half cards already show these titles */
}

.card.feature {
  position: relative;
}

.card.feature .card-media {
  height: calc(var(--pw) * 1.5);
  border-radius: 10px;
  transition: transform 0.55s cubic-bezier(0.34, 1.45, 0.55, 1), box-shadow 0.4s;
}

.card.feature:hover .card-media {
  transform: translateY(-6px);
  box-shadow:
    0 30px 60px -16px color-mix(in srgb, var(--tint) 65%, rgba(0, 0, 0, 0.7)),
    0 0 0 2px color-mix(in srgb, var(--tint) 40%, #fff);
}

.card.feature .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 9, 14, 0.9) 0%, rgba(8, 9, 14, 0.55) 38%, transparent 70%),
    linear-gradient(to top, rgba(8, 9, 14, 0.75), transparent 45%);
}

.feature-art,
.feature-blur,
.feature-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-art {
  object-position: center 30%;
  transition: transform 6s cubic-bezier(0.2, 0.6, 0.3, 1);
}

.card.feature:hover .feature-art {
  transform: scale(1.06);
}

.feature-blur {
  filter: blur(26px) brightness(0.6) saturate(1.3);
  transform: scale(1.25);
}

.card.feature .feature-cover {  /* beats .card-media img { width: 100% } */
  left: auto;
  right: 4%;
  width: 48%;
  object-fit: contain;
  object-position: right center;
  padding: 7% 0;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.6));
}

.feature-body {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  max-width: 62%;
  padding: clamp(16px, 1.4vw, 26px);
  pointer-events: none;
}

.feature-body .feature-play {
  pointer-events: auto;
}

.card.feature .logo3-art {
  width: min(100%, 280px);
  max-height: calc(var(--pw) * 0.42);
}

.card.feature .logo3-main {
  font-size: clamp(26px, 2.1vw, 40px);
}

.card.feature .logo3-sub {
  font-size: clamp(13px, 0.95vw, 17px);
  margin-top: 3px;
}

.feature-meta {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.feature-play {
  margin-top: 14px;
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
}

.feature-play svg {
  width: 14px;
  height: 14px;
}

/* two short rows side by side */
@media (min-width: 1100px) {
  .row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
    padding: 0 var(--gutter);
  }

  .row-pair > .row .row-head,
  .row-pair > .row .strip {
    padding-left: 0;
    padding-right: 0;
    scroll-padding: 0;
  }
}

/* one episode in Continue watching: a big resume panel instead of a lone small card */
.card-resume {
  display: none;
}

@media (min-width: 761px) {
  .strip-wide.is-single {
    grid-auto-columns: 100%;
  }

  .strip-wide.is-single > .card.wide {
    display: grid;
    grid-template-columns: minmax(0, 640px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(20px, 2.4vw, 44px);
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(100deg, color-mix(in srgb, var(--tint) 16%, rgba(255, 255, 255, 0.03)), rgba(255, 255, 255, 0.02) 70%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 22%, rgba(255, 255, 255, 0.06));
  }

  .strip-wide.is-single .card-text {
    padding: 0;
  }

  .strip-wide.is-single .card-name {
    font-family: var(--display);
    font-size: clamp(28px, 2.2vw, 44px);
    font-weight: 800;
    line-height: 1.05;
  }

  .strip-wide.is-single .card-sub {
    margin-top: 8px;
    font-size: 15px;
  }

  .strip-wide.is-single .card-resume {
    display: inline-flex;
    margin-top: 20px;
  }
}

/* Windows "Animation effects" is OFF on the user's PC: keep the hover motion */
@media (prefers-reduced-motion: reduce) {
  .card.poster .card-media::after,
  .card.feature .card-media { transition-duration: 0.3s, 0.4s !important; }
  .card-reveal { transition-duration: 0.25s !important; }
  .card.poster:hover .card-reveal { transition-duration: 0.35s, 0.45s !important; }
  .feature-art { transition-duration: 6s !important; }
}

/* ------------------------------------------------------- animations */

/* page transition: each page fades in (opacity only, see handleRoute) */
main.page-in {
  animation: page-in 0.45s ease-out backwards;
}

@keyframes page-in {
  from { opacity: 0; }
}

/* rows rise in the first time they scroll into view, then their cards follow one by one (rise() in app.js) */
.rise:not(.is-in) {
  opacity: 0;
}

.rise.is-in {
  animation: rise-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.rise.is-in .strip > * {
  animation: rise-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 45ms + 120ms);
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px); }
}

/* banner text: logo, info, description and buttons slide in one after another on every slide change */
.hero-slide.is-current .hero-body > * {
  animation: hero-in 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.hero-slide.is-current .hero-body > :nth-child(1) { animation-delay: 0.25s; }
.hero-slide.is-current .hero-body > :nth-child(2) { animation-delay: 0.38s; }
.hero-slide.is-current .hero-body > :nth-child(3) { animation-delay: 0.48s; }
.hero-slide.is-current .hero-body > :nth-child(4) { animation-delay: 0.58s; }

@keyframes hero-in {
  from { opacity: 0; transform: translateX(-28px); filter: blur(8px); }  /* blur-in: apple style */
}

/* Windows "Animation effects" is OFF on the user's PC: keep these running anyway (same as the hero) */
@media (prefers-reduced-motion: reduce) {
  main.page-in { animation-duration: 0.45s !important; }
  .rise.is-in { animation-duration: 0.7s !important; }
  .rise.is-in .strip > * { animation-duration: 0.6s !important; }
  .hero-slide.is-current .hero-body > * { animation-duration: 0.75s !important; }
  .card.poster .card-media { transition-duration: 0.55s, 0.4s, 0.4s !important; }
}

/* -------------------------------------------------------- show page */

.title3-hero {
  position: relative;
  isolation: isolate;
  min-height: min(90vh, 960px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--top-h) + 40px) var(--gutter) 44px;
}

/* fixed: the art stays behind the tabs and episodes too, like the reference */
.title3-art {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.title3-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #0e0f15;
  opacity: var(--scroll-dim, 0);
  pointer-events: none;
}

.title3-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.title3-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(17, 18, 25, 0.75) 0%, rgba(17, 18, 25, 0.35) 30%, transparent 55%),
    linear-gradient(to right, rgba(17, 18, 25, 0.92) 0%, rgba(17, 18, 25, 0.6) 34%, transparent 70%);
}

.title3 .hero-body {
  position: relative;
  max-width: 720px;
}

.chip3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.chip3 svg {
  width: 16px;
  height: 16px;
}

.chip3:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* above the fixed art (the hero is positioned, so its art would otherwise cover these and eat the clicks) */
.tabs3,
.tab3-panel {
  position: relative;
  z-index: 1;
}

.tabs3 {
  display: flex;
  gap: 34px;
  margin: 0 var(--gutter);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tabs3 button {
  padding: 14px 2px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8d93a3;
}

.tabs3 button:hover {
  color: #d5d8e0;
}

.tabs3 button[aria-selected="true"] {
  color: #fff;
  box-shadow: inset 0 -3px 0 #fff;
}

.tab3-panel {
  padding: 28px var(--gutter) 0;
}

.tab3-panel .grid {
  padding: 0;
}

.season3-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin: 0 0 26px;
  padding: 0;
  border: 0;
  background: none;
}

.season3-bar .season-stats {
  margin-left: auto;
  display: flex;
  gap: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f7586;
}

.season3-bar .season-actions {
  display: flex;
  gap: 10px;
}

.pills3 {
  display: flex;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}

.pills3::-webkit-scrollbar {
  display: none;
}

.pills3 button {
  flex: none;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 11, 16, 0.35);
  color: #e6e8ee;
  font: 700 14px var(--ui);
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pills3 button:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.pills3 button[aria-selected="true"] {
  background: #fff;
  border-color: #fff;
  color: #0c0d12;
}

.season3-bar .season-stats,
.season3-bar .season-actions {
  flex: none;
}

.select3 select {
  appearance: none;
  height: 46px;
  padding: 0 46px 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 18px;
  color: #fff;
  font: 700 15px var(--ui);
  cursor: pointer;
}

.select3 select option {
  background: var(--raised);
  color: #fff;
}

.select3-label {
  font-weight: 800;
  font-size: 17px;
}

.title3 .chapter-title {
  margin: 30px 0 14px;
}

.title3 .episodes,
.season3-bar {
  max-width: none;  /* 2.0 capped these at 1180 px */
}

.title3 .episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 36px 18px;
  padding: 0;
}

/* like the reference: full description, no More button, no "Watched" text (the ✓ says it) */
.title3 .desc-more,
.title3 .episode-state {
  display: none;
}

.title3 .episode-desc {
  -webkit-line-clamp: 3 !important;
}

.season3-bar .season-stats {
  color: rgba(255, 255, 255, 0.28);
}

.title3 .episode {
  display: block;
  position: relative;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.title3 .episode:hover {
  background: none;
}

.title3 .episode + .episode {
  border: 0;
}

.title3 .episode-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--raised);
}

.title3 .episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.title3 .episode:hover .episode-thumb img {
  transform: scale(1.04);
}

.title3 .episode-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.title3 .episode-title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.title3 .episode-title::before {
  content: none;
}

.title3 .episode-len {
  font-size: 14px;
  color: var(--text-2);
}

.title3 .watch-toggle {
  position: static;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.6);
  background: none;
}

.title3 .watch-toggle svg {
  width: 14px;
  height: 14px;
}

.title3 .watch-toggle[aria-pressed="true"] {
  background: #fff;
  border-color: #fff;
  color: #111219;
}

.title3 .episode-desc {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.title3 .episode-desc.open {
  -webkit-line-clamp: unset;
}

.details3 {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px 24px;
  max-width: 900px;
}

.details3 dt {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: 3px;
}

.details3 dd {
  margin: 0;
  line-height: 1.55;
}

/* ------------------------------------------------------- season hero */

.sh3 {
  position: relative;
  isolation: isolate;
  height: clamp(600px, 44vw, 720px);
  margin-bottom: 34px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--raised);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.sh3-art {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.sh3-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 6s ease-out;
}

.sh3-art img.shown {
  opacity: 1;
  transform: scale(1);
}

.sh3-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 11, 16, 0.92) 0%, rgba(10, 11, 16, 0.65) 34%, rgba(10, 11, 16, 0.05) 70%),
    linear-gradient(to top, rgba(10, 11, 16, 0.9) 0%, rgba(10, 11, 16, 0) 45%);
}

.sh3-body {
  position: absolute;
  left: clamp(24px, 3.5vw, 56px);
  top: clamp(28px, 3.6vw, 56px);
  max-width: min(620px, 55%);
}

.sh3-title {
  margin: 0;
  font: 800 clamp(36px, 3.5vw, 58px) / 1.02 var(--ui);
  letter-spacing: -0.03em;
  color: #fff;
}

.sh3-title span {
  display: block;
}

.sh3 .sh3-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin-top: 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: #dadde5;
}

.sh3 .sh3-meta > span + span::before {
  content: "\00b7";
  margin: 0 10px;
  opacity: 0.7;
}

.sh3 .rating {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 800;
}

.sh3-desc {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: #e2e4ea;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sh3-desc.open {
  -webkit-line-clamp: unset;
}

.sh3-more {
  margin-top: 4px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.85;
}

.sh3-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.sh3-arrows {
  position: absolute;
  left: clamp(24px, 3.5vw, 56px);
  bottom: 262px;
  display: flex;
  gap: 8px;
}

.sh3-arrows button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(10, 11, 16, 0.3);
  color: #fff;
}

.sh3-arrows button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
}

.sh3-arrows svg {
  width: 18px;
  height: 18px;
}

.sh3-posters {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 250px;
  padding: 0 40px 22px clamp(24px, 3.5vw, 56px);
  overflow-x: auto;
  scrollbar-width: none;
}

.sh3-posters::-webkit-scrollbar {
  display: none;
}

.sh3-poster {
  position: relative;
  flex: none;
  width: 124px;
  aspect-ratio: 2 / 3;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(160deg, #2a2d3a, #15161e);
  opacity: 0.72;
  transition: width 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.25s, transform 0.25s, box-shadow 0.35s;
}

.sh3-poster img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sh3-poster span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  color: #fff;
}

.sh3-poster:hover {
  opacity: 1;
  transform: translateY(-4px);
}

/* the picked poster grows in place (transform, not width) so the row never shifts */
.sh3-poster[aria-selected="true"] {
  opacity: 1;
  transform: scale(1.2);
  transform-origin: center bottom;  /* 1.2x of 124 px adds ~12 px a side: fits in the 14 px gap */
  box-shadow: 0 0 0 2px #fff, 0 16px 34px rgba(0, 0, 0, 0.55);
  z-index: 1;
}

/* the season hero as the whole top of the show page */
.title3-hero.has-seasons {
  min-height: max(100vh, 860px);
  align-items: flex-start;
  padding: calc(var(--top-h) + 44px) var(--gutter) 330px;
}

.title3-hero.has-seasons .sh3-body {
  position: relative;
  left: auto;
  top: auto;
  max-width: 720px;
}

.title3-hero.has-seasons .sh3-arrows {
  left: var(--gutter);
  bottom: 284px;
}

.title3-hero.has-seasons .sh3-posters {
  padding: 0 var(--gutter) 26px;
  height: 262px;
}

.title3-art .sh3-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 6s ease-out;
}

.title3-art .sh3-img.shown {
  opacity: 1;
  transform: none;
}

.logo3-small .logo3-art {
  width: clamp(190px, 15vw, 280px);
  max-height: 96px;
}

.logo3-small .logo3-main {
  font-size: clamp(30px, 2.6vw, 44px);
}

.logo3-small .logo3-sub {
  font-size: clamp(14px, 1.1vw, 18px);
}

.title3 .sh3-title {
  margin-top: 22px;
}

/* text slides in line by line when a season is picked */
@keyframes sh3-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* like the mockup: each title line rises out of a mask, then the rest fades up one after another */
@keyframes sh3-rise {
  from { transform: translateY(108%); }
  to { transform: none; }
}

@keyframes sh3-slide {
  from { opacity: 0; transform: translateX(70px); }
  to { opacity: 1; transform: none; }
}

.sh3-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.sh3-line > span {
  display: block;
}

.sh3-anim .sh3-line > span {
  animation: sh3-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.sh3-anim .sh3-line:nth-child(2) > span { animation-delay: 0.12s; }

.sh3-anim > :not(.sh3-title):not(.logo3) {
  animation: sh3-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* body children: logo, title, facts, description, buttons, chip */
.sh3-anim > :nth-child(3) { animation-delay: 0.25s; }
.sh3-anim > :nth-child(4) { animation-delay: 0.35s; }
.sh3-anim > :nth-child(5) { animation-delay: 0.45s; }
.sh3-anim > :nth-child(6) { animation-delay: 0.55s; }

/* opening sequence (the user's order): logo, season name, facts (rating, runtime, year, genre), description,
   buttons, then the season posters drop from above into their slots one by one */
/* no "to": each poster animates straight to its own resting look (dimmed, or picked = bright + scaled),
   instead of landing bright and then greying out */
@keyframes sh3-drop {
  from { opacity: 0; transform: translateY(-70px); }
}

/* slow and clearly one step at a time (the user asked twice) */
.sh3-intro .sh3-body > .logo3 { animation: sh3-in 0.7s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.sh3-intro .sh3-line > span { animation-duration: 0.8s; animation-delay: 0.7s; }
.sh3-intro .sh3-line:nth-child(2) > span { animation-delay: 0.85s; }
.sh3-intro .sh3-body > :nth-child(3) { animation-duration: 0.7s; animation-delay: 1.4s; }
.sh3-intro .sh3-body > :nth-child(4) { animation-duration: 0.7s; animation-delay: 1.85s; }
.sh3-intro .sh3-body > :nth-child(5) { animation-duration: 0.7s; animation-delay: 2.3s; }
.sh3-intro .sh3-body > :nth-child(6) { animation-duration: 0.7s; animation-delay: 2.5s; }

.sh3-intro .sh3-arrows {
  animation: sh3-in 0.6s 2.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* posters come slowly from above, one by one. "backwards": once landed, their normal styles
   (picked = scaled up) take over */
.sh3-intro .sh3-poster {
  animation: sh3-drop 0.9s cubic-bezier(0.2, 0.8, 0.25, 1) backwards;
  animation-delay: calc(2.9s + min(var(--i), 16) * 0.12s);
}

/* Windows "Animation effects" is OFF on the user's PC, so Chrome reports reduced motion and style.css
   (2.0) cuts every animation to 0.01 ms. The user wants these, so they keep their real length. */
@media (prefers-reduced-motion: reduce) {
  .sh3-intro .sh3-body > .logo3,
  .sh3-intro .sh3-arrows,
  .sh3-anim .sh3-line > span,
  .sh3-anim > :not(.sh3-title):not(.logo3) { animation-duration: 0.7s !important; }
  .sh3-intro .sh3-poster { animation-duration: 0.9s !important; }
  .title3-art .sh3-img { transition-duration: 0.7s !important; }
}

/* season switch: old episodes stay put, dimmed, until the new ones arrive (no page jump) */
.title3 .is-swapping {
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s;
}


@media (max-width: 760px) {
  .sh3 {
    height: auto;
    border-radius: 14px;
  }

  .sh3-body {
    position: relative;
    left: 0;
    top: 0;
    max-width: none;
    padding: 24px 20px 8px;
  }

  .sh3-arrows {
    display: none;
  }

  .sh3-posters {
    position: relative;
    height: auto;
    padding: 12px 20px 20px;
  }

  .sh3-poster { width: 96px; }

  .title3-hero.has-seasons {
    min-height: 0;
    flex-direction: column;
    padding: 40px 0 0;
  }

  .title3-hero.has-seasons .sh3-body {
    padding: 0 20px;
  }

  .title3-hero.has-seasons .sh3-posters {
    height: auto;
    padding: 18px 20px 20px;
  }

  /* The season poster strip scrolls inside the screen instead of widening the page. */
  .title3-hero { overflow-x: clip; }
  .sh3-posters { max-width: 100%; box-sizing: border-box; }
}

/* ------------------------------------------- hover previews + moving hero */

.card-media,
.episode-thumb {
  position: relative;
  overflow: hidden;
}

video.clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

video.clip.shown {
  opacity: 1;
}

/* layers: stills < moving clip < dark gradient (::after) < scroll dimming (::before) */
.title3-art video.clip {
  z-index: 1;
}

.title3-art::after {
  z-index: 2;
}

.title3-art::before {
  z-index: 3 !important;
}

@media (prefers-reduced-motion: reduce) {
  video.clip { transition-duration: 0.6s !important; }
}

/* ---------------------------------------------------------------- X-Ray */

.xray {
  position: absolute;
  top: 150px;  /* below the player's title + description */
  left: 28px;
  bottom: 120px;
  z-index: 6;
  width: min(380px, 34vw);
  overflow-y: auto;
  padding: 18px 18px 20px;
  border-radius: 16px;
  background: rgba(10, 11, 16, 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  scrollbar-width: thin;
  animation: sh3-in 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.xray-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.xray-head b {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.xray-head span {
  font-size: 13px;
  color: var(--text-2);
}

.xray h4 {
  margin: 16px 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.xray-person {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
}

.xray-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.xray-person.is-scene .xray-avatar {
  width: 46px;
  height: 46px;
  background: #fff;
  color: #0c0d12;
  font-size: 18px;
}

.xray-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.xray-who strong {
  font-size: 15px;
}

.xray-who span {
  font-size: 13px;
  color: #d4d7df;
}

.xray-who small {
  font-size: 12px;
  color: var(--text-3);
}

.xray-who p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #c8ccd6;
}

.xray-cast {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.xray-cast .xray-person {
  padding: 5px 0;
}

.xray-trivia {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #c8ccd6;
}

.xray-trivia li + li {
  margin-top: 6px;
}

@media (max-width: 760px) {
  .xray { display: none; }
}

/* ------------------------------------------------------------ subtitles */

/* Netflix-style: no box, clean semi-bold white with a soft black outline + shadow so it reads on any scene;
   max two short lines (the server splits long Whisper lines). --cap-size still follows the size setting. */
.player-captions {
  max-width: min(72%, 980px);
  padding: 0;
  border-radius: 0;
  background: none;
  font-family: var(--ui);
  font-weight: 600;
  font-size: calc(var(--cap-size, 22px) * 0.55 + 0.9vw);  /* ~26 px at 1600 wide, ~35 px on the 2560 screen */
  line-height: 1.28;
  letter-spacing: 0.005em;
  color: #fff;
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.95),
    0 0 3px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 10px rgba(0, 0, 0, 0.55);
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------- quotes */

.search-sec-quotes .quote-text {
  font-style: italic;
}

/* ----------------------------------------------------------- coming soon */

.soon-list {
  display: grid;
  gap: 28px;
  padding: 10px var(--gutter) 60px;
}

.soon-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 460px;
  padding: 44px clamp(24px, 4vw, 64px);
  border-radius: 18px;
  overflow: hidden;
  background: var(--raised);
}

.soon-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(1.1);
}

.soon-body {
  flex: 1;
  max-width: 760px;
}

.soon-kicker {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: #0c0d12;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.soon-title {
  margin: 14px 0 0;
  font: 800 clamp(30px, 3vw, 48px) / 1.05 var(--ui);
  letter-spacing: -0.02em;
}

.soon-about {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: #e2e4ea;
}

.soon-count {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.soon-unit {
  display: grid;
  place-items: center;
  min-width: 86px;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.soon-unit b {
  font: 800 34px / 1 var(--ui);
  font-variant-numeric: tabular-nums;
}

.soon-unit span {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}

.soon-count > span {
  font-size: 15px;
  color: var(--text-2);
}

.soon-poster {
  flex: none;
  width: clamp(180px, 16vw, 260px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

@media (max-width: 760px) {
  .soon-card { flex-direction: column; align-items: flex-start; }
  .soon-unit { min-width: 64px; }
  .soon-unit b { font-size: 24px; }
}

/* -------------------------------------------------------------- AI tab */

.ai-page {
  padding-top: var(--top-h);
}

.ai-frame {
  display: block;
  width: 100%;
  height: calc(100vh - var(--top-h));
  border: 0;
  background: var(--bg);
}

.ai-status {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: calc(100vh - var(--top-h) - 80px);
  text-align: center;
  color: var(--text-2);
}

.ai-status strong {
  font-size: 22px;
  color: var(--text);
}

.ai-status .loading {
  min-height: 60px;
}

@media (max-width: 760px) {
  .ai-page {
    padding-top: 0;
  }

  .ai-frame {
    height: calc(100vh - 62px - env(safe-area-inset-bottom));
  }
}

/* ------------------------------------------------- order + stats pages */

/* These have their own narrow max-width. The 3.0 centring gutter (grows with the screen) ate them alive on
   a 2560 px monitor, so they get the normal gutter and are centred as a whole column instead. */
.order-page,
.stats-page {
  --gutter: clamp(16px, 4vw, 56px);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.order-page .order {
  max-width: none;
}

.order-page .page-title,
.stats-page .page-title {
  font-family: var(--ui);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(40px, 4.4vw, 64px);
}

.stat-tile {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* watched episodes were faded to half colour in 2.0; the ✓ already shows it */
.title3 .episode.is-watched .episode-thumb img {
  filter: none;
}

/* ------------------------------------------------------------ phones */

@media (max-width: 760px) {
  .hero.hero3 {
    padding-top: 14px;
  }

  .hero-track {
    height: 118vw;
    max-height: 560px;
  }

  .hero-slide {
    border-radius: 14px;
  }

  .hero-slide::after {
    background: linear-gradient(to top,
      color-mix(in srgb, var(--tint) 16%, rgba(10, 11, 16, 0.92)) 0%,
      color-mix(in srgb, var(--tint) 12%, rgba(10, 11, 16, 0.5)) 45%,
      rgba(10, 11, 16, 0) 75%);
  }

  .hero-slide .hero-body {
    justify-content: flex-end;
    padding: 0 20px 24px;
  }

  .hero3 .hero-desc {
    display: none;
  }

  .pill {
    height: 46px;
    padding: 0 22px;
  }

  .pill-circle {
    width: 46px;
    height: 46px;
  }

  .title3-hero {
    min-height: 82vh;
    padding-top: 40px;
  }

  .title3-art::after {
    background: linear-gradient(to top, var(--bg) 0%, rgba(17, 18, 25, 0.75) 40%, rgba(17, 18, 25, 0.1) 80%);
  }

  .tabs3 {
    gap: 20px;
    overflow-x: auto;
  }

  .tabs3 button {
    font-size: 13px;
    white-space: nowrap;
  }

  /* 2.0's phone layout centred and stacked the episode text */
  .title3 .episode-body {
    padding: 0;
    text-align: left;
  }

  .title3 .episode-top {
    flex-direction: row;
    justify-content: flex-start;
  }

  .title3 .watch-toggle {
    display: grid;
    place-items: center;
  }

  .season3-bar .season-stats {
    margin-left: 0;
    width: 100%;
    order: 3;
  }

  .details3 {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .details3 dd {
    margin-bottom: 12px;
  }
}

/* TMDB / TVmaze: rating + air date under the episode title, average stars in the season hero */
.episode-sub { display: flex; gap: 10px; margin: 2px 0 4px; font-size: 12.5px; color: rgba(255,255,255,.55); }
.episode-rating, .sh3-body .stars { color: #f5c518; font-weight: 600; }

/* season without poster art: a frame from inside it, name on top */
.sh3-poster:has(.is-frame)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.85));
}
.sh3-poster:has(.is-frame) span {
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* stats: Clear stats in the header, a small Clear per person */
.stats-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.stat-clear.is-armed, .stat-user-clear.is-armed { background: #c4302b; border-color: #c4302b; color: #fff; }
.stat-bars .stat-bar { grid-template-columns: minmax(120px, 280px) 1fr 76px 64px; }
.stat-user-clear {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.stat-user-clear:hover { color: #fff; border-color: rgba(255, 255, 255, 0.5); }

/* ================================================= search (3.0) */
.sheet.search {
  background: rgba(9, 10, 15, 0.94);
  backdrop-filter: blur(24px) saturate(1.2);
  --search-gutter: clamp(24px, 3.5vw, 56px);
}
.search .search-bar {
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px var(--search-gutter) 16px;
  border: 0;
  background: linear-gradient(rgba(9, 10, 15, 0.98) 70%, rgba(9, 10, 15, 0));
  z-index: 2;
}
.search .search-bar > svg {
  position: absolute;
  left: calc(var(--search-gutter) + 22px);
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.search .search-bar input {
  height: 58px;
  padding: 0 22px 0 56px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
}
.search .search-bar:focus-within { border: 0; }
.search .search-bar input:focus { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.1); }
.search .search-bar input::placeholder { color: rgba(255, 255, 255, 0.4); }
.search #searchClose { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.search #searchClose:hover { background: rgba(255, 255, 255, 0.16); }

.search .search-results { max-width: 1500px; padding: 4px var(--search-gutter) 80px; }
.search .search-hint { color: rgba(255, 255, 255, 0.45); padding-top: 18px; }

.search-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.search-filter, .search-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.search-filter span { font-size: 12px; opacity: 0.6; }
.search-filter:hover, .search-chip:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.search-filter[aria-selected="true"] { background: #fff; border-color: #fff; color: #0b0c10; }
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.search .search-group { margin-top: 30px; }
.search-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.search .search-group h3 { font-family: inherit; font-size: 20px; font-weight: 800; color: #fff; margin: 0; }
.search-link { background: none; border: 0; color: rgba(255, 255, 255, 0.6); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.search-link:hover { color: #fff; }

.search mark { background: rgba(255, 255, 255, 0.16); color: #fff; border-radius: 3px; padding: 0 2px; }

.search-posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.search-posters .card.poster { width: auto; }

.search-episodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px 20px; }
.search-ep { display: block; color: inherit; text-decoration: none; }
.search-ep-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1c25;
  margin-bottom: 10px;
}
.search-ep-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.search-ep:hover .search-ep-thumb img, .search-ep:focus-visible .search-ep-thumb img { transform: scale(1.05); }
.search-ep:focus-visible { outline: none; }
.search-ep:focus-visible .search-ep-thumb { box-shadow: 0 0 0 2px #fff; }
.search-ep .episode-play { opacity: 0; transition: opacity 0.2s; }
.search-ep:hover .episode-play { opacity: 1; }
.search-ep-meta { font-size: 12.5px; color: rgba(255, 255, 255, 0.55); margin-bottom: 3px; }
.search-ep-title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.search-ep-desc {
  margin: 5px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 4px 24px; }
.search .result { margin: 0; width: auto; padding: 8px 10px; border-radius: 12px; }
.search .result:hover, .search .result:focus-visible { background: rgba(255, 255, 255, 0.07); }
.search .result-thumb { width: 112px; border-radius: 8px; background: #1a1c25; }
.search-sec-books .result-thumb { width: 60px; aspect-ratio: 2 / 3; }
.search .result-path { color: rgba(255, 255, 255, 0.45); }

/* ================================================= music (Spotify-style) */
.music-page { padding: 96px clamp(24px, 3.5vw, 56px) 60px; max-width: 1700px; margin: 0 auto; position: relative; }
.music-head h1 { font-size: clamp(36px, 4vw, 56px); font-weight: 900; margin: 0; letter-spacing: -0.02em; }
.music-head p { color: rgba(255, 255, 255, 0.55); margin: 6px 0 0; }
.music-group { margin-top: 38px; }
.music-group h2 { font-size: 22px; font-weight: 800; margin: 0 0 14px; }
.music-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }

.music-cover { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #2b2f3d, #14151c); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.music-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.music-cover-blank { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.35); }
.music-cover-blank svg { width: 38%; height: 38%; }

.music-card { display: block; padding: 12px; border-radius: 10px; color: inherit; text-decoration: none; transition: background 0.2s; }
.music-card:hover, .music-card:focus-visible { background: rgba(255, 255, 255, 0.07); outline: none; }
.music-card-art { position: relative; margin-bottom: 12px; }
.music-card-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-card-sub { font-size: 13px; color: rgba(255, 255, 255, 0.55); margin-top: 3px; }
.music-card-play {
  position: absolute; right: 8px; bottom: 8px; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: #1ed760; color: #000; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45); opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s;
}
.music-card-play svg { width: 22px; height: 22px; }
.music-card:hover .music-card-play, .music-card:focus-within .music-card-play { opacity: 1; transform: none; }
.music-card-play:hover { transform: scale(1.06) !important; background: #3be477; }

/* album page */
.album-page { isolation: isolate; }
.album-bg { position: absolute; inset: 0 0 auto; height: 520px; background-size: cover; background-position: center; filter: blur(70px) saturate(1.4); opacity: 0.45; z-index: -1; mask-image: linear-gradient(#000 30%, transparent); -webkit-mask-image: linear-gradient(#000 30%, transparent); }
.album-head { display: flex; align-items: flex-end; gap: 28px; padding-top: 24px; }
.album-art { width: clamp(160px, 16vw, 240px); flex: none; box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6); }
.album-kind { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.8); }
.album-info h1 { font-size: clamp(40px, 6vw, 88px); font-weight: 900; letter-spacing: -0.03em; line-height: 1; margin: 8px 0 14px; }
.album-meta { font-size: 14px; color: rgba(255, 255, 255, 0.75); font-weight: 600; }
.album-actions { display: flex; align-items: center; gap: 22px; margin: 28px 0 18px; }
.music-big-play { width: 58px; height: 58px; border: 0; border-radius: 50%; background: #1ed760; color: #000; display: grid; place-items: center; cursor: pointer; transition: transform 0.15s, background 0.15s; }
.music-big-play svg { width: 26px; height: 26px; }
.music-big-play:hover { transform: scale(1.05); background: #3be477; }
.music-shuffle { width: 40px; height: 40px; border: 0; background: none; color: rgba(255, 255, 255, 0.6); cursor: pointer; position: relative; }
.music-shuffle svg { width: 30px; height: 30px; }
.music-shuffle:hover { color: #fff; }
.music-shuffle.is-on, .mbar-btn.is-on, .mbar-btn[data-mode="all"], .mbar-btn[data-mode="one"] { color: #1ed760; }
.music-shuffle.is-on::after, .mbar-btn.is-on::after, .mbar-btn[data-mode="all"]::after, .mbar-btn[data-mode="one"]::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor;
}
.mbar-btn[data-mode="one"]::before { content: "1"; position: absolute; top: 2px; right: 2px; font-size: 9px; font-weight: 800; }

.music-table { display: grid; }
.music-row { display: grid; grid-template-columns: 44px 1fr 80px; align-items: center; gap: 12px; padding: 7px 14px; border-radius: 6px; cursor: pointer; }
.music-row:hover, .music-row:focus-visible { background: rgba(255, 255, 255, 0.08); outline: none; }
.music-row-head { cursor: default; color: rgba(255, 255, 255, 0.55); font-size: 13px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0; margin-bottom: 8px; padding-bottom: 9px; }
.music-row-head:hover { background: none; }
.music-row-head > :last-child, .music-row-time { text-align: right; justify-self: end; }
.music-row-num { position: relative; color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums; text-align: center; height: 20px; }
.music-row-num::before { content: ""; position: absolute; inset: 0; }
.music-row:not(.music-row-head):hover .music-row-num span { visibility: hidden; }
.music-row:not(.music-row-head):hover .music-row-num::before { background: no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M8 5v14l11-7z%22 fill=%22white%22/%3E%3C/svg%3E"); }
.music-row-title { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-row-artist { font-size: 13px; color: rgba(255, 255, 255, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-row-time { font-size: 14px; color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums; }
.music-row.is-current .music-row-title, .music-row.is-current .music-row-num { color: #1ed760; }

/* little equaliser on the playing song */
.music-eq { display: none; position: absolute; inset: 2px 0; justify-content: center; align-items: flex-end; gap: 2px; }
.music-eq b { width: 3px; background: #1ed760; border-radius: 1px; animation: music-eq 0.9s ease-in-out infinite; }
.music-eq b:nth-child(2) { animation-delay: -0.3s; }
.music-eq b:nth-child(3) { animation-delay: -0.6s; }
@keyframes music-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.music-row.is-playing .music-eq { display: flex; }
.music-row.is-playing .music-row-num span { visibility: hidden; }
.music-row.is-playing:hover .music-eq { display: none; }
@media (prefers-reduced-motion: reduce) { .music-eq b { animation-duration: 1.4s !important; animation-iteration-count: infinite !important; } }

/* the bar */
body.has-mbar { padding-bottom: 92px; }
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: 84px;
  display: grid; grid-template-columns: minmax(180px, 1fr) minmax(320px, 2fr) minmax(140px, 1fr); align-items: center; gap: 16px;
  padding: 0 18px; background: rgba(8, 9, 13, 0.96); border-top: 1px solid rgba(255, 255, 255, 0.08); backdrop-filter: blur(18px);
}
.mbar[hidden] { display: none; }
body.player-open .mbar { display: none; }
.mbar-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mbar-cover { width: 56px; flex: none; }
.mbar-cover .music-cover { border-radius: 5px; box-shadow: none; }
.mbar-text { min-width: 0; }
.mbar-title { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar-artist { font-size: 12.5px; color: rgba(255, 255, 255, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar-mid { display: grid; justify-items: center; gap: 6px; }
.mbar-controls { display: flex; align-items: center; gap: 14px; }
.mbar-btn { position: relative; width: 34px; height: 34px; border: 0; background: none; color: rgba(255, 255, 255, 0.7); display: grid; place-items: center; cursor: pointer; }
.mbar-btn svg { width: 20px; height: 20px; }
.mbar-btn:hover { color: #fff; }
.mbar-play { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #000; }
.mbar-play:hover { color: #000; transform: scale(1.06); }
.mbar-progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 640px; }
.mbar-time { font-size: 11.5px; color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.mbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.mbar-close { margin-left: 6px; }
.mbar-close:hover { color: #fff; }
.mbar-vol-icon { color: rgba(255, 255, 255, 0.7); display: grid; }
.mbar-vol-icon svg { width: 20px; height: 20px; }
.mbar-range { -webkit-appearance: none; appearance: none; flex: 1; height: 4px; border-radius: 2px; cursor: pointer;
  background: linear-gradient(to right, #fff var(--fill, 0%), rgba(255, 255, 255, 0.25) var(--fill, 0%)); }
.mbar-vol { flex: none; width: 110px; }
.mbar-range:hover { background: linear-gradient(to right, #1ed760 var(--fill, 0%), rgba(255, 255, 255, 0.25) var(--fill, 0%)); }
.mbar-range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; opacity: 0; }
.mbar-range:hover::-webkit-slider-thumb { opacity: 1; }
@media (max-width: 760px) {
  .mbar { grid-template-columns: 1fr auto auto; }
  .mbar-progress, .mbar-right > :not(.mbar-close) { display: none; }  /* the X stays on phones */
  .album-head { flex-direction: column; align-items: flex-start; }
}

/* Remote: QR code to open it on a phone */
.remote-qr { display: flex; align-items: center; gap: 20px; margin: 18px 0 8px; padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.04); max-width: 620px; }
.remote-qr-code { flex: none; background: #fff; padding: 10px; border-radius: 10px; line-height: 0; }
.remote-qr p { margin: 4px 0 8px; color: rgba(255,255,255,.6); font-size: 14px; }
.remote-qr code { font-size: 13px; color: #e8b64c; word-break: break-all; }
@media (max-width: 700px) { .remote-qr { display: none; } }

/* Phones: the player's control row must fit 393 px (iPhone 15). The phone's own buttons set the volume, the mute button stays. */
@media (max-width: 480px) {
  .volume-slider { display: none; }
}

/* ------------------------------------------------------------ remote (rm2) */

/* Phones get a Remote tab in the bottom bar. */
@media (max-width: 760px) {
  .nav-link.nav-extra[data-route="remote"] { display: flex; }
}

.rm2 { max-width: 640px; margin: 0 auto; padding: 8px var(--gutter, 20px) 40px; }
.rm2-head { margin: 12px 0 18px; }
.rm2-head .page-lede { margin-top: 4px; }

.rm2-screens { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter, 20px)) 16px; padding: 2px var(--gutter, 20px); }
.rm2-screens::-webkit-scrollbar { display: none; }
.rm2-screen { flex: none; display: flex; align-items: center; gap: 10px; max-width: 280px; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--raised); color: var(--text); text-align: left; font: inherit; cursor: pointer; position: relative; }
.rm2-screen.is-on { border-color: rgba(255, 255, 255, 0.55); background: var(--raised-2); }
.rm2-screen-icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, 0.07); }
.rm2-screen-icon svg { width: 20px; height: 20px; }
.rm2-screen-text { display: grid; min-width: 0; }
.rm2-screen-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm2-screen-text span { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm2-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.rm2-dot.is-live { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18); }

.rm2-card { border: 1px solid var(--line); border-radius: 20px; background: var(--raised); overflow: hidden; }
.rm2-art { position: relative; aspect-ratio: 16 / 9; background: var(--bg-deep); }
.rm2-art-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rm2-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 13, 18, 0.95), rgba(12, 13, 18, 0.1) 60%); }
.rm2-art-text { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; display: grid; gap: 2px; }
.rm2-art-text span { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }
.rm2-art-text strong { font-size: 20px; line-height: 1.2; }

.rm2-scrub { padding: 16px 18px 0; }
.rm2-seek, .rm2-vol { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; touch-action: none; }
.rm2-seek::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: linear-gradient(to right, #fff var(--pct, 0%), rgba(255, 255, 255, 0.18) var(--pct, 0%)); }
.rm2-seek::-moz-range-track { height: 5px; border-radius: 3px; background: linear-gradient(to right, #fff var(--pct, 0%), rgba(255, 255, 255, 0.18) var(--pct, 0%)); }
.rm2-vol::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); }
.rm2-vol::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); }
.rm2-seek::-webkit-slider-thumb, .rm2-vol::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.rm2-vol::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -6px; }
.rm2-seek::-moz-range-thumb, .rm2-vol::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; }
.rm2-times { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: 2px; }

.rm2-keys { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px; }
.rm2-key { width: 56px; height: 56px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 0.12s ease, background 0.15s; }
.rm2-key svg { width: 30px; height: 30px; fill: currentColor; }
.rm2-key:active { transform: scale(0.9); background: rgba(255, 255, 255, 0.08); }
.rm2-key.rm2-small { width: 46px; height: 46px; color: var(--text-2); }
.rm2-key.rm2-small svg { width: 24px; height: 24px; }
.rm2-key.rm2-play { width: 76px; height: 76px; background: #fff; color: #111; }
.rm2-key.rm2-play svg { width: 34px; height: 34px; }
.rm2-key.rm2-play:active { background: #ddd; }

.rm2-row { display: flex; align-items: center; gap: 4px; padding: 0 12px 14px; }
.rm2-row .rm2-vol { flex: 1; min-width: 60px; margin: 0 6px; }

.rm2-section { margin-top: 26px; }
.rm2-section h2 { font-size: 17px; margin: 0 0 10px; }
.rm2-list { display: grid; gap: 8px; }
.rm2-ep { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 1px solid transparent; border-radius: 14px; background: var(--raised); color: var(--text); text-align: left; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rm2-ep:active { background: var(--raised-2); }
.rm2-ep.is-current { border-color: rgba(255, 255, 255, 0.35); cursor: default; }
.rm2-ep-thumb { flex: none; width: 112px; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; background: var(--bg-deep); }
.rm2-ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rm2-ep-text { flex: 1; min-width: 0; display: grid; gap: 3px; }
.rm2-ep-text strong { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm2-ep-text span { font-size: 12px; color: var(--text-2); }
.rm2-ep-go { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.rm2-ep-go svg { width: 16px; height: 16px; fill: currentColor; }

.rm2-idle, .rm2-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 22px; text-align: center; }
.rm2-empty { border: 1px dashed var(--line); border-radius: 20px; }
.rm2-idle p, .rm2-empty p { margin: 0 0 6px; color: var(--text-2); max-width: 340px; }
.rm2-empty-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: rgba(255, 255, 255, 0.07); }
.rm2-empty-icon svg { width: 30px; height: 30px; }
.rm2-hint { color: var(--text-2); text-align: center; margin: 24px 0; }
.rm2-foot { display: flex; justify-content: center; margin-top: 22px; }
.rm2-cast { min-height: 46px; }

/* ------------------------------------------------------------ source test */
/* Replica of the recorded Source Dragons page (renderSource). Durations are !important because the
   user's Windows has animations off, and style.css cuts every transition to 0.01 ms in that case. */
.src-page {
  --s: min(17.5vh, 8.2vw);        /* icon height in the row */
  --line: 51%;                    /* the horizon, from the top */
  --off: calc(var(--s) * 0.13);   /* icons float this far above the line */
  --pick: #fff;
  position: fixed;
  inset: var(--top-h) 0 0 0;
  overflow: hidden;
  background: #000;
  color: #fff;
  cursor: default;
  user-select: none;
  font-family: "Archivo", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}
.src-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 34% 60% at 50% 2%, #0d2c5c 0%, #0a2147 32%, rgba(6, 18, 40, .55) 58%, transparent 78%),
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(10, 30, 70, .5), transparent 70%);
  transition: opacity 1s ease !important;
}
.src-stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #cfe0ff;
}
.src-line {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--line);
  height: 3px;
  margin-top: -1.5px;
  background: linear-gradient(90deg, rgba(190, 215, 70, .55), #e3f27a 30%, #f4ff9c 50%, #e3f27a 70%, rgba(190, 215, 70, .55));
  box-shadow: 0 0 10px 1px rgba(214, 236, 92, .65), 0 0 34px 6px rgba(170, 200, 50, .28);
  transition: opacity 1s ease !important;
}
.src-line::before {  /* the haze rising off the line */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: calc(var(--s) * 0.3);
  background: linear-gradient(to top, rgba(190, 220, 60, .22), transparent);
}
.src-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - var(--line) + var(--off));
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: calc(var(--s) * 0.5);
  transition: opacity .7s ease !important;
}
.src-item {
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  width: var(--s);
  height: var(--s);
  -webkit-tap-highlight-color: transparent;
}
.src-icon,
.src-refl {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom;
}
.src-icon {
  bottom: 0;
  transform-origin: 50% 85%;
  transition: transform .35s ease, filter .35s ease !important;
}
.src-refl {  /* mirrored under the line, fading away from it */
  top: calc(100% + var(--off) * 2);
  transform: scaleY(-1);
  opacity: .34;
  filter: blur(1px) saturate(.9);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  mask-image: linear-gradient(to top, #000 10%, transparent 85%);
  transition: opacity .35s ease !important;
}
.src-item:hover .src-icon,
.src-item:focus-visible .src-icon {
  transform: scale(1.12);
  filter: brightness(1.18) drop-shadow(0 0 calc(var(--s) * 0.09) var(--c)) drop-shadow(0 0 calc(var(--s) * 0.03) var(--c));
}
.src-item:hover .src-refl { opacity: .5; }
.src-item:focus-visible { outline: none; }

/* close-up */
.src-detail {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .38s ease !important;
}
.src-big,
.src-big-refl {
  position: absolute;
  left: 50%;
  height: 50%;
  width: auto;
  max-width: 60vw;
  object-fit: contain;
}
.src-big {
  top: 16%;
  transform: translateX(-50%) scale(.82);
  opacity: 0;
  filter: drop-shadow(0 0 0 transparent);
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1), opacity 1s ease, filter 1.6s ease !important;
}
.src-big-refl {
  top: 66%;
  transform: translateX(-50%) scaleY(-1);
  opacity: 0;
  filter: blur(2px);
  -webkit-mask-image: linear-gradient(to top, #000, transparent 60%);
  mask-image: linear-gradient(to top, #000, transparent 60%);
}
.src-quote {
  position: absolute;
  left: 50%;
  top: 74%;
  width: min(25em, 86vw);
  transform: translateX(-50%);
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: clamp(16px, 3.4vh, 34px);
  line-height: 1.25;
  letter-spacing: -.01em;
  opacity: 0;
  transition: opacity 1s ease .25s !important;
}

/* states */
.src-page.is-leaving .src-row { opacity: 0; pointer-events: none; }
.src-page.is-detail { cursor: pointer; }
.src-page.is-detail .src-row { opacity: 0; pointer-events: none; transition-duration: 0s !important; }
.src-page.is-detail .src-line { opacity: .22; }
.src-page.is-detail .src-glow { opacity: .35; }
.src-page.is-detail .src-detail { opacity: 1; }
.src-page.is-detail .src-big {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  filter: drop-shadow(0 0 calc(var(--s) * 0.16) color-mix(in srgb, var(--pick) 70%, transparent)) brightness(1.08);
}
.src-page.is-detail .src-big-refl { animation: src-refl 1.6s ease forwards !important; }
.src-page.is-detail .src-quote { opacity: 1; }
.src-page.is-closing .src-detail { opacity: 0; }
@keyframes src-refl { 0% { opacity: 0; } 30% { opacity: .28; } 100% { opacity: 0; } }

/* intro: a play button on black, then everything fades in */
.src-play {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease, transform .4s ease !important;
}
.src-play svg { width: 70px; height: 70px; fill: currentColor; }
.src-page.is-intro .src-play { opacity: 1; pointer-events: auto; animation: src-play-in .6s cubic-bezier(.2, .8, .3, 1.2) .5s backwards !important; }
.src-page.is-intro .src-play:hover { transform: scale(1.08); }
@keyframes src-play-in { from { opacity: 0; transform: scale(.2); } }
.src-page .src-row,
.src-page .src-line,
.src-page .src-glow { transition-delay: 0s; }
.src-page.is-intro .src-row,
.src-page.is-intro .src-line,
.src-page.is-intro .src-glow { opacity: 0; pointer-events: none; }
.src-page:not(.is-intro) .src-row { animation: src-fade 1s ease !important; }
@keyframes src-fade { from { opacity: 0; } }

@media (max-width: 760px) {
  .src-page { inset: 0 0 calc(62px + env(safe-area-inset-bottom)) 0; --s: min(11vh, 11vw); }
}

/* ======================================================= top bar 3.1 (2026-11-22)
   Kept from the home revamp (the rest was undone at the user's request): glass pill nav, white active pill,
   plain white brand (the two-colour brand was undone). */

:root {
  --gold: #f4b740;
  --fire: #e8492e;
}

@media (min-width: 761px) {
  .nav-links {
    flex: 0 1 auto;
    margin: 0 auto;
    padding: 5px;
    border-radius: 999px;
    background: rgba(18, 20, 28, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.7);
  }

  .nav-link {
    border-radius: 999px;
    padding: 8px 13px;
    transition: background 0.2s, color 0.2s !important;
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-link.active,
  .nav-link.active:hover {
    background: #fff;
    color: #0c0d12;
  }

  .nav-link.active::before {
    display: none;
  }

  .nav-link.active svg {
    fill: currentColor;
    color: inherit;
  }

  .nav.is-solid {
    background: rgba(12, 13, 18, 0.8);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .nav.is-solid .nav-links {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
  }
}

/* ======================================================= modals 3.1 (2026-11-22)
   Settings + profile restyled after the user's reference ("Your profile" panel): plain bold heading + grey
   subtitle, round close button, small uppercase section labels, pill buttons and pill segmented controls,
   big round avatar grid, stat tiles. Colours mix from --text so the Light theme still works.
   Backups: index.html / v3.css / app.js .before-modal-restyle */

#settingsModal,
#profileModal {
  width: min(580px, calc(100vw - 24px));
  border-radius: 24px;
  border-color: color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.7);
}

:is(#settingsModal, #profileModal) .modal-inner {
  padding: 30px 30px 26px;
  gap: 26px;
}

:is(#settingsModal, #profileModal) .modal-head {
  align-items: flex-start;
  margin: 0;
}

:is(#settingsModal, #profileModal) .modal-head h2 {
  font-family: var(--ui);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.modal-sub {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--text-2);
}

:is(#settingsModal, #profileModal) .modal-head .icon-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

:is(#settingsModal, #profileModal) .modal-head .icon-btn:hover {
  background: color-mix(in srgb, var(--text) 15%, transparent);
}

/* section labels: AVATAR, YOUR STATS, THEME ... */
:is(#settingsModal, #profileModal) .field legend,
.modal-label {
  margin-bottom: 12px;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.modal-label {
  margin-bottom: 4px;
}

:is(#settingsModal, #profileModal) .field > span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

:is(#settingsModal, #profileModal) .field input[type="text"] {
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 16px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border-color: color-mix(in srgb, var(--text) 12%, transparent);
}

:is(#settingsModal, #profileModal) .hint {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
}

/* pill buttons */
:is(#settingsModal, #profileModal) .btn {
  border-radius: 999px;
  font-weight: 700;
}

:is(#settingsModal, #profileModal) .btn-ghost {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

:is(#settingsModal, #profileModal) .btn-ghost:hover {
  background: color-mix(in srgb, var(--text) 13%, transparent);
}

:is(#settingsModal, #profileModal) .btn-primary {
  background: var(--text);
  color: var(--bg);
}

:is(#settingsModal, #profileModal) .btn-primary:hover {
  background: color-mix(in srgb, var(--text) 86%, transparent);
}

/* footer: two equal buttons, like the reference */
.modal-foot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-foot-pair .btn {
  min-height: 50px;
}

/* segmented controls: one pill, the picked option is a white pill */
:is(#settingsModal, #profileModal) .segmented {
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border-color: color-mix(in srgb, var(--text) 10%, transparent);
}

:is(#settingsModal, #profileModal) .segmented button {
  height: 40px;
  border-radius: 999px;
}

:is(#settingsModal, #profileModal) .segmented button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  box-shadow: none;
}

/* accent chips: round pills */
:is(#settingsModal, #profileModal) .swatch-named {
  border-radius: 999px;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border-color: color-mix(in srgb, var(--text) 10%, transparent);
}

:is(#settingsModal, #profileModal) .swatch-named[aria-pressed="true"] {
  background: color-mix(in srgb, var(--c) 18%, transparent);
}

/* profile: big picture with a ring, big round avatar grid */
#profileModal .avatar-lg {
  width: 92px;
  height: 92px;
  flex: none;
  box-shadow: 0 0 0 3px var(--raised), 0 0 0 5px color-mix(in srgb, var(--text) 35%, transparent);
}

#profileModal .avatar-pics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

#profileModal .avatar-pic {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  transition: transform 0.15s !important;
}

#profileModal .avatar-pic:hover {
  transform: scale(1.06);
}

#profileModal .avatar-pic[aria-pressed="true"] {
  box-shadow: 0 0 0 3px var(--raised), 0 0 0 6px var(--text);
}

#profileModal .swatches {
  margin-top: 6px;
}

/* stats: separate tiles, big number over a small label; "Most watched" is a full-width row */
#profileStats {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

#profileStats > div {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 10px;
  border-radius: 16px;
  text-align: center;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
}

#profileStats dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

#profileStats dd {
  font-family: var(--ui);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

#profileStats > div:nth-child(4) {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: space-between;
  padding: 16px 18px;
  text-align: left;
}

#profileStats > div:nth-child(4) dd {
  order: 2;
  font-size: 16px;
  color: var(--accent-text, #8fb4ff);
}

#profileStats > div:nth-child(4) dt {
  order: 1;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 520px) {
  #profileModal .avatar-pics {
    grid-template-columns: repeat(5, 1fr);
  }

  #profileStats {
    grid-template-columns: repeat(2, 1fr);
  }

  #profileStats > div:nth-child(3) {
    grid-column: 1 / -1;
  }
}

/* ------------------------------------------------------------ remote page width fix
   .rm2 had max-width 640 + padding var(--gutter). On 2560 px the gutter is 440 px a side, so the content
   got 0 px and every word wrapped. Fixed padding instead, and room for the fixed top bar. */
.rm2 {
  max-width: 680px;
  padding: 8px 20px 40px;
}

.rm2 .remote-qr {
  max-width: none;
}

@media (min-width: 761px) {
  .rm2 {
    padding-top: calc(var(--top-h) + 28px);
  }

  /* below ~1150 px the nav pill ran into the brand: icons only there */
  @media (max-width: 1150px) {
    .nav-links .nav-link > span {
      display: none;
    }
  }
}

/* ---------------------------------------------- apple motion (2026-11-22)
   Scroll-linked like apple.com: the banner sinks back as you scroll, row titles
   blur in, rows and episode cards scale up into place. Uses the separate
   scale/translate properties so the hover tilt/lift transforms still work.
   Browsers without scroll timelines just show everything still. */
@supports (animation-timeline: view()) {
  /* home banner: shrinks toward its bottom edge and fades while you scroll away */
  .hero3 {
    transform-origin: 50% 100%;
    animation: am-sink linear both;
    animation-timeline: scroll(root);
    animation-range: 0 75vh;
  }

  /* show page: the title block drifts up and fades (the fixed art stays put) */
  .title3-hero > .hero-body {
    animation: am-lift linear both;
    animation-timeline: scroll(root);
    animation-range: 0 55vh;
  }

  /* row titles: blur + rise in as they come up the screen */
  .row-title {
    animation: am-blur-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }

  /* rows: grow from 90% into place */
  .row .strip {
    animation: am-zoom-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }

  /* episode cards: each one rises and grows as it enters */
  .title3 .episode {
    animation: am-card-in linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 22%;
  }
}

@keyframes am-sink {
  to { scale: 0.9; opacity: 0.25; }
}

@keyframes am-lift {
  to { translate: 0 -9vh; scale: 0.96; opacity: 0; }
}

@keyframes am-blur-in {
  from { opacity: 0; translate: 0 28px; filter: blur(10px); }
}

@keyframes am-zoom-in {
  from { scale: 0.9; opacity: 0.35; }
}

@keyframes am-card-in {
  from { opacity: 0; translate: 0 56px; scale: 0.92; }
}

/* Windows "Animation effects" is OFF on the user's PC: style.css squashes every
   animation to 0.01 ms, so give the scroll-linked ones their auto length back */
@media (prefers-reduced-motion: reduce) {
  .hero3,
  .title3-hero > .hero-body,
  .row-title,
  .row .strip,
  .title3 .episode {
    animation-duration: auto !important;
  }
}

/* ------------------------------------------- nav glider + icon moves (2026-11-22)
   One highlight pill glides between the top-bar links as you hover across (app.js
   puts .nav-glider in #navLinks). Icons do a small move on hover, apple style. */
@media (min-width: 761px) {
  .nav-links {
    position: relative;  /* the glider is placed with offsetLeft/Top */
  }

  .nav-links .nav-link {
    z-index: 1;
  }

  .nav-links .nav-link:not(.active):hover {
    background: transparent;  /* the glider is the hover now */
  }

  .nav-glider {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.45s cubic-bezier(0.3, 1.3, 0.5, 1),
      width 0.45s cubic-bezier(0.3, 1.3, 0.5, 1),
      opacity 0.25s ease;
  }

  .nav-glider.is-on {
    opacity: 1;
  }

  .nav-glider.no-move {
    transition: opacity 0.25s ease;
  }
}

@media (hover: hover) {
  .nav-link:hover svg,
  .icon-btn:hover svg,
  .pill-glass:hover svg,
  .pill-circle:hover svg,
  .chip3:hover svg {
    animation: ic-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  #searchBtn:hover svg { animation-name: ic-wiggle; }

  .nav-link[data-route="home"]:hover svg,
  .nav-link[data-route="music"]:hover svg,
  .nav-link[data-route="stats"]:hover svg,
  .nav-link[data-route="section/comics"]:hover svg { animation-name: ic-hop; }

  .nav-link[data-route="coming"]:hover svg,
  #fwdTenBtn:hover svg { animation: ic-spin 0.7s cubic-bezier(0.4, 0, 0.2, 1); }

  #backTenBtn:hover svg { animation: ic-spin-back 0.7s cubic-bezier(0.4, 0, 0.2, 1); }

  /* Play buttons: the arrow nudges forward */
  .pill-white:hover svg { animation: ic-nudge 0.6s ease; }
}

@keyframes ic-pop {
  40% { transform: scale(1.25) rotate(-6deg); }
  70% { transform: scale(0.95); }
}

@keyframes ic-wiggle {
  20% { transform: rotate(-14deg) scale(1.1); }
  45% { transform: rotate(10deg) scale(1.1); }
  70% { transform: rotate(-5deg); }
}

@keyframes ic-hop {
  30% { transform: translateY(-5px); }
  55% { transform: translateY(0); }
  75% { transform: translateY(-2px); }
}

@keyframes ic-spin {
  to { transform: rotate(360deg); }
}

@keyframes ic-spin-back {
  to { transform: rotate(-360deg); }
}

@keyframes ic-nudge {
  35% { transform: translateX(4px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(2px); }
}

/* Windows "Animation effects" is OFF on the user's PC: keep these moving */
@media (prefers-reduced-motion: reduce) {
  .nav-glider { transition-duration: 0.45s, 0.45s, 0.25s !important; }
  .nav-glider.no-move { transition-duration: 0.25s !important; }
  .nav-link:hover svg,
  .icon-btn:hover svg,
  .pill-glass:hover svg,
  .pill-circle:hover svg,
  .chip3:hover svg { animation-duration: 0.55s !important; }
  .nav-link[data-route="coming"]:hover svg,
  #fwdTenBtn:hover svg,
  #backTenBtn:hover svg { animation-duration: 0.7s !important; }
  .pill-white:hover svg { animation-duration: 0.6s !important; }
}

/* ===================================================== polish 6 (2026-11-22) */

/* the scrollbar's space is kept from the first frame: before, the page loaded short (no scrollbar), then the
   rows arrived, the scrollbar appeared and the centred top bar slid ~8 px left */
html {
  scrollbar-gutter: stable;
}

/* full-screen layers (player, reader, modals) lock scrolling: drop the reserved strip so they reach the edge */
html:has(body.no-scroll) {
  scrollbar-gutter: auto;
}

/* Continue watching with several episodes: every card is a small resume panel, like the single-item one */
@media (min-width: 761px) {
  .row-continue .strip-wide:not(.is-single) {
    grid-auto-columns: clamp(440px, 33vw, 660px);
  }

  .row-continue .strip-wide:not(.is-single) > .card.wide {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(14px, 1.3vw, 24px);
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(100deg, color-mix(in srgb, var(--tint) 16%, rgba(255, 255, 255, 0.03)), rgba(255, 255, 255, 0.02) 70%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 22%, rgba(255, 255, 255, 0.06));
  }

  .row-continue .strip-wide:not(.is-single) .card-text {
    padding: 0;
    min-width: 0;
  }

  .row-continue .strip-wide:not(.is-single) .card-name {
    font-family: var(--display);
    font-size: clamp(20px, 1.4vw, 28px);
    font-weight: 800;
    line-height: 1.06;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .row-continue .strip-wide:not(.is-single) .card-sub {
    margin-top: 6px;
  }

  .row-continue .strip-wide:not(.is-single) .card-resume {
    display: inline-flex;
    margin-top: 14px;
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
  }

  .row-continue .strip-wide:not(.is-single) .card-resume svg {
    width: 13px;
    height: 13px;
  }
}

/* 404: the in-app page (notFoundPage) and public/404.html */
.nf {
  min-height: 70vh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 120px 24px 60px;
}

.nf-code {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(110px, 16vw, 240px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, var(--text) 20%, color-mix(in srgb, var(--tint) 55%, transparent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 50px color-mix(in srgb, var(--tint) 60%, transparent));
}

.nf-title {
  margin: 18px 0 0;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 800;
}

.nf-text {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 16px;
}

.nf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

body.nf-standalone {
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #1d2238, var(--bg) 60%);
}

.nf-brand {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
}

/* loading: a thin bar along the top (loadBar in app.js) + a tinted arc in place of the old ring */
.load-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.load-bar.is-on { opacity: 1; transition-delay: 0.12s; }
.load-bar.is-done { opacity: 0; transition-delay: 0.2s; }

.load-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tint) 70%, #fff), #fff);
  box-shadow: 0 0 12px color-mix(in srgb, var(--tint) 80%, #fff), 0 0 4px #fff;
}

.load-bar.is-going span { width: 85%; transition: width 6s cubic-bezier(0.1, 0.7, 0.2, 1); }
.load-bar.is-done span { width: 100%; transition: width 0.2s ease-out; }

.spinner,
.loading::after,
.player-spinner span {
  border: 0;
  background: conic-gradient(from 0deg, transparent 0 12%, color-mix(in srgb, var(--tint) 45%, rgba(255, 255, 255, 0.35)) 55%, #fff 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: spin 0.8s linear infinite;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tint) 70%, transparent));
}

.loading::after { width: 40px; height: 40px; }

/* content shield (app.js): black + a note while a screenshot or recording could be happening */
body.shielded #viewerBody > *,
body.shielded #playerStage > video {
  visibility: hidden !important;
}

body.shielded #viewerBody,
body.shielded #playerStage {
  background: #000 !important;
}

body.shielded #viewerBody::after,
body.shielded #playerStage::after {
  content: "Paused · protected content";
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: #000;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
  letter-spacing: 0.04em;
}

#viewerBody { position: relative; }

#viewerOpen { display: none !important; }  /* "Open file" handed out the raw file */

html:not(.dev) img, html:not(.dev) video { -webkit-user-drag: none; }

@media print {
  html:not(.dev) body { display: none !important; }  /* .dev = the owner's devices (app.js DEV) */
}

/* the middle banner card's glow follows the playing clip (live tint loop in app.js) */
@property --glow {
  syntax: "<color>";
  inherits: true;
  initial-value: #2b3150;
}

.hero-slide.is-current.is-live {
  box-shadow:
    0 26px 70px -28px color-mix(in srgb, var(--glow) 75%, transparent),
    0 0 0 1px color-mix(in srgb, var(--glow) 28%, transparent);
  transition: transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.85s, --glow 1.4s linear;
}

@media (prefers-reduced-motion: reduce) {
  .load-bar, .load-bar.is-on, .load-bar.is-done { transition-duration: 0.3s !important; }
  .load-bar.is-going span { transition-duration: 6s !important; }
  .load-bar.is-done span { transition-duration: 0.2s !important; }
  .spinner, .loading::after, .player-spinner span { animation-duration: 0.8s !important; }
  .hero-slide.is-current.is-live { transition-duration: 0.85s, 0.85s, 1.4s !important; }
}

/* error page (errorPage in app.js): a soft pulsing dot over the same .nf layout as the 404 */
.nf-pulse {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tint) 55%, #fff);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--tint) 60%, transparent);
  animation: nf-pulse 1.8s ease-out infinite;
  margin-bottom: 8px;
}

@keyframes nf-pulse {
  70% { box-shadow: 0 0 0 26px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .nf-pulse { animation-duration: 1.8s !important; }
}

/* -------------------------------------------------------------- More info page (#/info/<show>): cast + rating grid */

.info-page { position: relative; isolation: isolate; padding: 110px var(--gutter) 70px; }
.info-art {
  position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.22; mask-image: linear-gradient(#000 0%, transparent 85%); -webkit-mask-image: linear-gradient(#000 0%, transparent 85%);
}
.info-head { max-width: 760px; margin-bottom: 44px; }
.info-head .hero-desc { margin: 14px 0 22px; color: var(--text-2); line-height: 1.55; }
.info-section { margin-top: 40px; }
.info-section .row-title { margin: 0 0 18px; }
.info-note { margin: -8px 0 16px; color: var(--text-3); font-size: 14px; }

.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.cast-card {
  display: flex; gap: 16px; padding: 16px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.07);
}
.cast-pics { position: relative; flex: none; width: 116px; height: 150px; }
.cast-actor, .cast-char { position: absolute; object-fit: cover; background: rgba(255, 255, 255, 0.08); }
.cast-actor { inset: 0 auto auto 0; width: 96px; height: 130px; border-radius: 12px; }
/* the character sits on the actor's corner, like a badge */
.cast-char {
  right: 0; bottom: 0; width: 62px; height: 62px; border-radius: 50%; object-position: top;
  border: 3px solid var(--bg); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.cast-actor.is-empty, .cast-char.is-empty {
  display: grid; place-items: center; color: var(--text-3); font: 700 20px var(--ui);
}
.cast-char.is-empty { font-size: 14px; }
.cast-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cast-name { margin: 0; font: 700 17px var(--ui); color: var(--text); }
.cast-as { color: var(--text-2); font-size: 14px; }
.cast-as b { color: var(--text); }
.cast-sub { color: var(--text-3); font-size: 12.5px; }
.cast-bio {
  margin: 4px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.cast-also, .cast-eps { color: var(--text-3); font-size: 12px; margin-top: auto; }
.cast-also + .cast-eps { margin-top: 0; }

/* the grid scrolls sideways inside its box on small screens, never the page */
.rt-wrap { max-width: 100%; overflow-x: auto; padding-bottom: 6px; }
.rt { border-collapse: separate; border-spacing: 4px; font: 600 13px var(--ui); }
.rt th { color: var(--text-2); font-weight: 700; padding: 4px 6px; white-space: nowrap; }
.rt tbody th { text-align: right; color: var(--text-3); }
.rt td {
  min-width: 46px; height: 30px; padding: 0 6px; text-align: center; border-radius: 6px;
  color: #fff; cursor: default; font-variant-numeric: tabular-nums;
}
.rt-a { background: #13723a; }
.rt-b { background: #2f9e4f; }
.rt-c { background: #8fa83a; }
.rt-d { background: #c7742a; }
.rt-e { background: #b8382e; }
.rt-none { background: rgba(255, 255, 255, 0.06); color: var(--text-3) !important; }
.rt-gap { background: none; }
.rt td:not(.rt-gap):hover { outline: 2px solid #fff; outline-offset: -2px; }
@media (max-width: 760px) {
  .info-page { padding-top: 80px; }
  .cast-pics { width: 92px; height: 122px; }
  .cast-actor { width: 76px; height: 104px; }
  .cast-char { width: 50px; height: 50px; }
}


/* ---- missing placeholders + submit + dev menu (2026-11-22) ---- */
.missing-card { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: inherit; width: 100%; display: block; cursor: pointer; }
.missing-card .card-media { border: 1.5px dashed color-mix(in srgb, currentColor 28%, transparent); background: color-mix(in srgb, var(--tint, #888) 8%, transparent); }
.missing-card .poster-fallback span { opacity: .7; }
.missing-card:hover .card-media, .missing-card:focus-visible .card-media { border-color: var(--tint, currentColor); }
.missing-card:focus-visible { outline: 2px solid var(--tint, currentColor); outline-offset: 3px; border-radius: 8px; }
.missing-tag { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; background: rgba(0,0,0,.6); color: #fff; }
.missing-tag.is-sent { background: #1f7a4a; }
.missing-all { margin-left: auto; font-size: 13px; opacity: .7; color: inherit; text-decoration: none; }
a.missing-all:hover { opacity: 1; text-decoration: underline; }
.missing-page .crumbs a[aria-current="page"] { font-weight: 700; text-decoration: underline; }
.submit-modal .field { display: grid; gap: 6px; margin: 0 0 14px; }
.submit-modal input[type="url"], .submit-modal input[type="text"], .submit-modal textarea { width: 100%; box-sizing: border-box; font: inherit; }
.submit-modal input[type="url"] { height: 46px; padding: 0 14px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); color: inherit; }
.submit-modal input[type="url"]:focus-visible { outline: none; border-color: var(--accent); }
.missing-card { align-self: start; }
.submit-status { min-height: 1.4em; margin: 0 0 6px; font-size: 14px; }
.submit-status.is-bad { color: #ff6b6b; }
/* own max-width: the 3.0 screen-wide --gutter would squeeze it to one word per line on 2560 px (like Stats had) */
.dev-page { --gutter: clamp(16px, 4vw, 56px); max-width: 1180px; margin: 0 auto; padding-bottom: 60px; }
.dev-page > .dev-list, .dev-page > .empty { margin-left: var(--gutter); margin-right: var(--gutter); }
.dev-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dev-tab { padding: 6px 14px; border-radius: 99px; color: inherit; text-decoration: none; background: rgba(255,255,255,.06); font-size: 14px; }
.dev-tab[aria-current="page"] { background: var(--tint, #fff); color: #000; font-weight: 600; }
.dev-list { display: grid; gap: 12px; }
.dev-item { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 12px; background: rgba(255,255,255,.05); border-left: 3px solid var(--tint, #888); }
.dev-item.is-added { border-left-color: #2ea56a; }
.dev-item.is-rejected { border-left-color: #b84a4a; opacity: .7; }
.dev-main { flex: 1 1 380px; min-width: 0; }
.dev-main h3 { margin: 0 0 4px; font-size: 17px; }
.dev-meta { margin: 0; font-size: 13px; opacity: .65; }
.dev-note { margin: 8px 0 0; white-space: pre-wrap; }
.dev-links { display: grid; gap: 4px; margin-top: 8px; overflow-wrap: anywhere; }
.dev-links a { color: var(--tint, inherit); }
.dev-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ----------------------------------------- welcome (first visit: landing page + profile + human check) */

.welcome {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: var(--bg-deep);
  animation: welcome-in 0.5s ease both;
}

.welcome.is-out {
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

@keyframes welcome-in { from { opacity: 0; } }

.welcome-wall {
  position: fixed;
  inset: -10vh -10vw;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 14px;
  transform: rotate(-8deg);
  opacity: 0.32;
  animation: welcome-drift 60s linear infinite alternate;
  pointer-events: none;
}

.welcome-wall img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.welcome::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(12, 13, 18, 0.55) 0%, rgba(12, 13, 18, 0.92) 70%),
    linear-gradient(to bottom, rgba(12, 13, 18, 0.6), transparent 30%, transparent 70%, rgba(12, 13, 18, 0.9));
  pointer-events: none;
}

@keyframes welcome-drift { to { transform: rotate(-8deg) translateY(-12vh); } }

.welcome-brand {
  position: fixed;
  top: 22px;
  left: clamp(20px, 4vw, 56px);
  z-index: 2;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.welcome-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(100%, 820px);
  text-align: center;
  animation: welcome-up 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes welcome-up { from { opacity: 0; transform: translateY(24px); } }

.welcome-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 104px);
  line-height: 0.95;
  text-transform: uppercase;
  text-wrap: balance;
}

.welcome-title.is-small { font-size: clamp(36px, 4.5vw, 64px); }

.welcome-sub {
  margin: 0;
  max-width: 560px;
  font-size: clamp(15px, 1.3vw, 19px);
  opacity: 0.75;
  text-wrap: balance;
}

.welcome-go {
  margin-top: 8px;
  padding: 14px 30px;
  font-size: 17px;
}

.welcome-go:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.welcome-profile {
  width: min(100%, 560px);
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 18, 25, 0.82);
  backdrop-filter: blur(14px);
}

.welcome-pics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  width: 100%;
}

.welcome-pics .avatar-pic {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}

.welcome-pics .avatar-pic:hover { transform: scale(1.06); }
.welcome-pics .avatar-pic[aria-pressed="true"] { border-color: #fff; transform: scale(1.08); }

.welcome-name {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raised);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.welcome-name:focus { outline: 2px solid #fff; outline-offset: 1px; }

.welcome-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.welcome-hold {
  position: relative;
  width: 100%;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--raised);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.welcome-hold-fill {
  position: absolute;
  inset: 0;
  transform: scaleX(var(--hold, 0));
  transform-origin: left;
  background: rgba(255, 255, 255, 0.16);
}

.welcome-hold-text { position: relative; }
.welcome-hold.is-done { border-style: solid; border-color: rgba(255, 255, 255, 0.5); cursor: default; }
.welcome-hold.is-done .welcome-hold-fill { background: rgba(255, 255, 255, 0.22); }

.welcome-err {
  min-height: 1.2em;
  margin: 0;
  color: #ff8a80;
  font-size: 14px;
}

.welcome-err:empty { display: none; }

@media (max-width: 760px) {
  .welcome-wall { grid-template-columns: repeat(4, 1fr); }
  .welcome-pics { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-wall, .welcome-step { animation: none; }
}

/* welcome on the cloud copy: account sign-up / log-in */
.welcome-human {
  display: grid;
  justify-items: center;
  width: 100%;
  min-height: 52px;
}

.welcome-swap {
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  opacity: 0.7;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.welcome-swap:hover { opacity: 1; }

/* ----------------------------------------- legal pages (#/legal/...) + site footer */

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--top-h) + 40px) 24px 40px;
  line-height: 1.65;
}

.legal-kicker {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
}

.legal-title {
  margin: 6px 0 4px;
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1;
  text-transform: uppercase;
}

.legal-date { margin: 0 0 28px; font-size: 14px; opacity: 0.6; }
.legal-page h2 { margin: 28px 0 6px; font-size: 19px; }
.legal-page p { margin: 0; opacity: 0.85; }

.site-foot {
  margin: 64px var(--gutter, 24px) 0;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  opacity: 0.75;
}

.legal-page .site-foot { margin: 56px 0 0; }

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 10px;
}

.site-foot a { color: var(--text); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot p { margin: 0; max-width: 760px; }

.welcome-intro .site-foot {
  margin: 36px 0 0;  /* not position: fixed: the step's transform animation would pin it over the button */
  padding: 0;
  border: 0;
  text-align: center;
}

.welcome-intro .site-foot nav { justify-content: center; }
.welcome-intro .site-foot p { margin: 0 auto; }

.welcome-agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  font-size: 14px;
  opacity: 0.85;
  cursor: pointer;
}

.welcome-agree input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: #fff; }
.welcome-agree a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* Dev page: accounts tab */
.dev-account { align-items: center; }
.dev-pic { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.08); flex: none; }
