:root {
  --blue-950: #071b7a;
  --blue-900: #0a278f;
  --blue-800: #1238b6;
  --blue-700: #1658da;
  --blue-600: #1687f5;
  --sky-500: #25c6ff;
  --sky-300: #8be8ff;
  --ink: #08206f;
  --muted: #45609a;
  --white: #ffffff;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.84);
  --pink: #ff4d91;
  --yellow: #ffcc25;
  --green: #4ecb67;
  --purple: #7e42e5;
  --shadow-lg: 0 24px 55px rgba(7, 39, 129, 0.22), 0 7px 17px rgba(31, 109, 206, 0.15);
  --shadow-md: 0 15px 35px rgba(7, 39, 129, 0.18), 0 4px 10px rgba(31, 109, 206, 0.13);
  --shadow-sm: 0 8px 18px rgba(7, 39, 129, 0.15);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, #0a9cff 0%, #42d2ff 36%, #d7f7ff 71%, #f4fcff 100%);
}

body.dialog-open {
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

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

button {
  color: inherit;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
label:has(input:focus-visible) {
  outline: 4px solid rgba(255, 204, 37, 0.92);
  outline-offset: 4px;
}

.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 9999;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue-950);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: none;
}

/* --------------------------------------------------------------------------
   Animated background — visible, playful and still restrained.

   app.js creates a fresh mix of bubbles and bokeh whenever the page opens.
   Bubbles carry a very light rotating rainbow rim; bokeh stays white and
   ice-blue so the interface remains calm and readable.
   -------------------------------------------------------------------------- */
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.ambient-wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 10% 22%, rgba(255, 255, 255, 0.25), transparent 29%),
    radial-gradient(circle at 88% 27%, rgba(199, 239, 255, 0.24), transparent 31%),
    radial-gradient(circle at 50% 82%, rgba(123, 207, 255, 0.14), transparent 43%),
    linear-gradient(180deg, rgba(5, 91, 244, 0.10), transparent 48%);
}

.bokeh-layer,
.bubble-layer {
  position: absolute;
  inset: -8vh -5vw;
  overflow: hidden;
  contain: layout paint style;
}

.bokeh-layer {
  z-index: 1;
}

.bubble-layer {
  z-index: 2;
}

.bokeh-orb,
.ambient-bubble {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

/* Soft white/light-blue bokeh. A few receive a tiny cross-glint so the
   shimmer remains visible against both the pale and deep-blue areas. */
.bokeh-orb {
  opacity: var(--opacity-low);
  background:
    radial-gradient(circle at 31% 28%, rgba(255, 255, 255, 1) 0 5%, rgba(255, 255, 255, 0.68) 7%, transparent 20%),
    radial-gradient(circle at 50% 50%, var(--bokeh-core) 0 17%, var(--bokeh-edge) 37%, rgba(230, 249, 255, 0.14) 56%, transparent 76%);
  border: 1px solid rgba(239, 252, 255, 0.22);
  box-shadow:
    0 0 calc(var(--halo) * 0.48) rgba(255, 255, 255, 0.42),
    0 0 var(--halo) var(--bokeh-glow),
    0 0 calc(var(--halo) * 1.75) rgba(130, 225, 255, 0.12);
  filter: blur(var(--blur));
  mix-blend-mode: screen;
  transform: translate3d(0, 10px, 0) scale(0.84);
  animation:
    bokeh-drift var(--drift-duration) ease-in-out var(--delay) infinite alternate,
    bokeh-glimmer var(--glimmer-duration) ease-in-out var(--glimmer-delay) infinite;
}

.bokeh-orb::after {
  content: "";
  position: absolute;
  inset: 24%;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: inherit;
  box-shadow: inset 0 0 calc(var(--size) * 0.14) rgba(255, 255, 255, 0.38);
}

.bokeh-orb.is-glint::before,
.bokeh-orb.is-glint::after {
  content: "";
  position: absolute;
  inset: auto;
  left: 50%;
  top: 50%;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.96), rgba(187, 239, 255, 0.88), transparent);
  box-shadow: 0 0 calc(var(--size) * 0.20) rgba(255, 255, 255, 0.72);
  transform-origin: center;
}

.bokeh-orb.is-glint::before {
  width: 128%;
  height: clamp(1px, calc(var(--size) * 0.035), 2px);
  transform: translate(-50%, -50%) rotate(var(--glint-angle));
}

.bokeh-orb.is-glint::after {
  width: 82%;
  height: clamp(1px, calc(var(--size) * 0.028), 2px);
  transform: translate(-50%, -50%) rotate(calc(var(--glint-angle) + 90deg));
}

/* Soap bubbles have a white glass edge plus a restrained rotating rainbow
   filament. The colour is deliberately light so it never competes with the
   logo or video thumbnails. */
.ambient-bubble {
  opacity: var(--opacity-low);
  border: clamp(1.2px, calc(var(--size) / 48), 2.6px) solid rgba(255, 255, 255, 0.76);
  background:
    radial-gradient(circle at 27% 22%, rgba(255, 255, 255, 0.98) 0 5%, rgba(255, 255, 255, 0.35) 9%, transparent 24%),
    radial-gradient(circle at 72% 75%, rgba(170, 122, 255, 0.15), transparent 36%),
    radial-gradient(circle at 31% 72%, rgba(255, 205, 112, 0.10), transparent 31%),
    radial-gradient(circle at 47% 50%, rgba(127, 237, 255, 0.10), rgba(255, 255, 255, 0.025) 54%, transparent 72%);
  box-shadow:
    inset calc(var(--size) * 0.08) calc(var(--size) * 0.08) calc(var(--size) * 0.18) rgba(255, 255, 255, 0.28),
    inset calc(var(--size) * -0.07) calc(var(--size) * -0.07) calc(var(--size) * 0.16) rgba(54, 74, 220, 0.14),
    0 0 calc(var(--size) * 0.22) rgba(255, 255, 255, 0.22),
    0 0 calc(var(--size) * 0.34) rgba(117, 223, 255, 0.13),
    0 0 calc(var(--size) * 0.47) rgba(255, 158, 219, 0.075),
    0 calc(var(--size) * 0.11) calc(var(--size) * 0.35) rgba(18, 84, 183, 0.10);
  mix-blend-mode: screen;
  transform: translate3d(0, 18px, 0) scale(0.92) rotate(-2deg);
  animation:
    bubble-bob var(--drift-duration) ease-in-out var(--delay) infinite alternate,
    bubble-shimmer var(--glimmer-duration) ease-in-out var(--glimmer-delay) infinite;
}

.ambient-bubble::before {
  content: "";
  position: absolute;
  width: 23%;
  height: 12%;
  top: 15%;
  left: 18%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 calc(var(--size) * 0.08) rgba(255, 255, 255, 0.58);
  filter: blur(0.4px);
  transform: rotate(-28deg);
}

.ambient-bubble::after {
  content: "";
  position: absolute;
  inset: -3px;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(
    from 18deg,
    rgba(255, 132, 198, 0.72),
    rgba(255, 228, 126, 0.66),
    rgba(126, 244, 219, 0.64),
    rgba(112, 214, 255, 0.72),
    rgba(190, 150, 255, 0.66),
    rgba(255, 132, 198, 0.72)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: var(--rainbow-opacity);
  filter: blur(0.45px) hue-rotate(var(--rainbow-hue));
  transform: rotate(var(--tilt));
  animation: bubble-rainbow-turn var(--ring-duration) linear var(--ring-delay) infinite;
}

@keyframes bokeh-drift {
  0% { transform: translate3d(0, 10px, 0) scale(0.84); }
  48% { transform: translate3d(var(--mid-x), var(--mid-y), 0) scale(1.13); }
  100% { transform: translate3d(var(--drift-x), var(--drift-y), 0) scale(0.93); }
}

@keyframes bokeh-glimmer {
  0%, 100% { opacity: var(--opacity-low); filter: blur(var(--blur)) brightness(0.92); }
  27% { opacity: var(--opacity-mid); }
  48% { opacity: var(--opacity-high); filter: blur(var(--blur)) brightness(1.28); }
  72% { opacity: calc(var(--opacity-mid) * 0.84); }
}

@keyframes bubble-bob {
  0% { transform: translate3d(0, 18px, 0) scale(0.92) rotate(-2deg); }
  52% { transform: translate3d(var(--mid-x), var(--mid-y), 0) scale(1.035) rotate(2deg); }
  100% { transform: translate3d(var(--drift-x), var(--drift-y), 0) scale(0.96) rotate(-1deg); }
}

@keyframes bubble-shimmer {
  0%, 100% { opacity: var(--opacity-low); }
  44% { opacity: var(--opacity-high); }
  74% { opacity: var(--opacity-mid); }
}

@keyframes bubble-rainbow-turn {
  from { transform: rotate(var(--tilt)); }
  to { transform: rotate(calc(var(--tilt) + 360deg)); }
}

body.reduce-motion .bokeh-orb,
body.reduce-motion .ambient-bubble {
  animation: none !important;
  transform: none !important;
  opacity: 0.34 !important;
}

body.reduce-motion .ambient-bubble::after {
  animation: none !important;
}

.site-header,
main,
.site-footer,
.mobile-bottom-nav {
  position: relative;
  z-index: 2;
}

.section-width {
  width: min(1500px, calc(100% - 64px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: max(14px, env(safe-area-inset-top)) 0 10px;
  pointer-events: none;
}

.nav-shell {
  width: min(1380px, calc(100% - 64px));
  min-height: 72px;
  margin-inline: auto;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 290px) auto;
  align-items: center;
  gap: 14px;
  border: 2px solid rgba(13, 48, 169, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 15px 30px rgba(1, 33, 138, 0.24), inset 0 1px 0 rgba(255,255,255,.85);
  backdrop-filter: blur(16px) saturate(1.1);
  pointer-events: auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.nav-link {
  min-height: 52px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  color: var(--blue-900);
  font-weight: 900;
  white-space: nowrap;
  transition: transform 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-link:hover {
  transform: translateY(-2px);
  background: rgba(34, 134, 248, 0.10);
}

.nav-link.is-active {
  color: white;
  background: linear-gradient(180deg, #173fca, #092893);
  box-shadow: 0 8px 16px rgba(10, 42, 156, 0.28);
}

.nav-link svg,
.parent-nav-button svg,
.nav-search svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.nav-link svg,
.parent-nav-button svg {
  fill: currentColor;
}

.nav-link .icon-cut,
.parent-nav-button .icon-cut {
  fill: white;
}

.nav-search {
  height: 52px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid rgba(21, 61, 183, 0.35);
  border-radius: 999px;
  color: var(--blue-900);
  background: rgba(255,255,255,.82);
}

.nav-search svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex: 0 0 auto;
}

.nav-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--blue-900);
  background: transparent;
  font-weight: 800;
}

.nav-search input::placeholder {
  color: #6d7eb1;
}

.parent-nav-button {
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 2px solid rgba(21, 61, 183, 0.35);
  border-radius: 999px;
  color: var(--blue-900);
  background: white;
  box-shadow: 0 5px 12px rgba(9,40,147,.12);
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.parent-nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 18px rgba(9,40,147,.18);
}

.mobile-brand,
.menu-button {
  display: none;
}

/* Hero */
.hero {
  min-height: 565px;
  padding: 10px 0 18px;
  display: grid;
  grid-template-columns: minmax(420px, .92fr) minmax(600px, 1.18fr);
  align-items: center;
  gap: clamp(28px, 4vw, 68px);
}

.hero-copy {
  text-align: center;
}

.hero-logo {
  width: min(650px, 100%);
  height: auto;
  margin: -12px auto -12px;
  object-fit: contain;
  filter: drop-shadow(0 18px 23px rgba(5, 46, 140, 0.16));
}

.hero-text h1 {
  margin: 0 0 8px;
  color: var(--blue-950);
  font-size: clamp(25px, 2.1vw, 37px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 1000;
  text-shadow: 0 2px 0 rgba(255,255,255,.68);
}

.hero-text p {
  margin: 0 auto;
  max-width: 690px;
  color: var(--blue-950);
  font-size: clamp(17px, 1.3vw, 23px);
  line-height: 1.35;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255,255,255,.75);
}

.hero-pill {
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  margin: 13px auto 0;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(180deg, #194bdb, #0b2c9e);
  box-shadow: 0 9px 20px rgba(8,45,157,.26), inset 0 1px 0 rgba(255,255,255,.22);
  font-size: clamp(16px, 1.2vw, 20px);
  font-weight: 1000;
  transition: transform 180ms ease;
}

.hero-pill:hover {
  transform: translateY(-2px) scale(1.01);
}

.player-column {
  min-width: 0;
}

.video-shell {
  position: relative;
  padding: 8px;
  border: 3px solid var(--blue-900);
  border-radius: 30px;
  background: white;
  box-shadow: 0 20px 35px rgba(1,43,153,.28), 0 8px 0 rgba(255,255,255,.42);
  overflow: hidden;
}

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: var(--blue-950);
  object-fit: cover;
}

.sound-prompt {
  position: absolute;
  left: 26px;
  top: 24px;
  min-height: 44px;
  padding: 9px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 999px;
  color: white;
  background: rgba(6,26,104,.82);
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
  backdrop-filter: blur(9px);
  font-size: 14px;
  font-weight: 900;
  transition: transform 180ms ease, opacity 180ms ease;
}

.sound-prompt:hover {
  transform: translateY(-2px);
}

.sound-prompt[hidden] {
  display: none;
}

.sound-prompt svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.7;
}

.player-status {
  position: absolute;
  right: 24px;
  top: 24px;
  padding: 8px 13px;
  border-radius: 999px;
  color: white;
  background: rgba(6,26,104,.78);
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
  backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.now-playing-card {
  margin: 12px 13px 0;
  padding: 13px 15px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  border-radius: 18px;
  color: var(--blue-950);
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.now-playing-card span {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.now-playing-card h2 {
  margin: 3px 0 2px;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.15;
}

.now-playing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
}

.file-preview-button {
  min-height: 44px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid rgba(18,56,182,.22);
  border-radius: 999px;
  color: var(--blue-900);
  background: white;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
  white-space: nowrap;
}

.file-preview-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Panels */
.featured-panel,
.trust-panel {
  border: 2px solid rgba(30, 96, 224, 0.35);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px) saturate(1.08);
}

.featured-panel {
  padding: 12px 18px 17px;
  border-radius: 28px;
}

.panel-heading {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-950);
  font-size: clamp(20px, 1.7vw, 27px);
  line-height: 1;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-all-button,
.round-arrow {
  min-height: 38px;
  border: 2px solid rgba(18,56,182,.30);
  color: var(--blue-900);
  background: white;
  box-shadow: 0 5px 12px rgba(9,43,151,.10);
  font-weight: 1000;
}

.view-all-button {
  padding: 7px 16px;
  border-radius: 999px;
}

.round-arrow {
  width: 40px;
  border-radius: 50%;
  font-size: 27px;
  line-height: 1;
}

.featured-track {
  padding: 5px 1px 2px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(205px, 1fr);
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

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

.featured-card {
  position: relative;
  min-width: 0;
  scroll-snap-align: start;
}

.featured-open {
  width: 100%;
  padding: 0;
  text-align: left;
  color: var(--blue-950);
  background: transparent;
}

.featured-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--blue-800);
  border-radius: 17px;
  background: #7fe4ff;
  box-shadow: 0 7px 13px rgba(10,50,160,.17);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.featured-open:hover .featured-thumb {
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(10,50,160,.23);
}

.featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration-badge,
.demo-badge {
  position: absolute;
  z-index: 2;
  border-radius: 7px;
  color: white;
  background: rgba(6,26,104,.92);
  font-size: 12px;
  font-weight: 1000;
}

.duration-badge {
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
}

.demo-badge {
  left: 6px;
  top: 6px;
  padding: 4px 7px;
}

.featured-title-row {
  margin-top: 7px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.featured-title-row::before {
  content: "🌈";
  flex: 0 0 auto;
  font-size: 13px;
}

.featured-title-row strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.trust-panel {
  margin-top: 14px;
  min-height: 128px;
  padding: 13px 22px;
  display: grid;
  grid-template-columns: 205px minmax(280px, 1.25fr) minmax(390px, .95fr) auto;
  align-items: center;
  gap: 22px;
  border-radius: 28px;
}

.trust-family {
  width: 100%;
  max-height: 115px;
  object-fit: contain;
  object-position: center;
}

.trust-copy h2 {
  margin: 0 0 6px;
  color: var(--blue-900);
  font-size: clamp(20px, 1.6vw, 28px);
  line-height: 1.08;
}

.trust-copy p {
  margin: 0;
  color: var(--blue-950);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}

.trust-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.trust-features > div {
  min-width: 0;
  text-align: center;
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  box-shadow: inset 0 3px 0 rgba(255,255,255,.28), 0 6px 12px rgba(16,55,160,.16);
  font-weight: 1000;
}

.feature-blue { background: linear-gradient(180deg, #3fb7ff, #1563df); }
.feature-pink { background: linear-gradient(180deg, #ff6aa8, #ea2d72); font-size: 24px; }
.feature-green { background: linear-gradient(180deg, #68d967, #2ca847); font-size: 12px; }
.feature-gold { background: linear-gradient(180deg, #ffc93f, #f29700); font-size: 21px; }

.trust-features strong {
  color: var(--blue-950);
  font-size: 12px;
  line-height: 1.15;
}

.parents-cta,
.primary-button,
.install-button {
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #8e48ea, #1239bb 72%);
  box-shadow: 0 10px 20px rgba(47,40,176,.26), inset 0 1px 0 rgba(255,255,255,.24);
  font-weight: 1000;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.parents-cta {
  min-width: 220px;
  min-height: 56px;
  padding: 12px 20px;
  font-size: 16px;
}

.parents-cta:hover,
.primary-button:hover,
.install-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(47,40,176,.32);
}

/* Library */
.library-section {
  margin-top: 34px;
  padding: 33px 34px 38px;
  border: 2px solid rgba(30,96,224,.24);
  border-radius: 36px;
  background: linear-gradient(150deg, rgba(10,51,177,.96), rgba(17,113,229,.94));
  box-shadow: var(--shadow-lg);
}

.section-heading-large {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.section-heading-large .eyebrow,
.eyebrow {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.section-heading-large h2 {
  margin: 4px 0 0;
  color: white;
  font-size: clamp(28px, 3vw, 46px);
  line-height: 1.02;
  letter-spacing: -.035em;
}

.section-heading-large > p {
  max-width: 460px;
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
}

.filter-chips {
  margin-top: 24px;
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  min-height: 44px;
  padding: 8px 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,.30);
  border-radius: 999px;
  color: white;
  background: rgba(255,255,255,.10);
  font-weight: 900;
}

.filter-chip.is-active {
  color: var(--blue-900);
  background: white;
  box-shadow: 0 8px 15px rgba(0,25,110,.20);
}

.library-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.library-card {
  position: relative;
  border-radius: 22px;
  background: white;
  box-shadow: 0 13px 25px rgba(0,25,105,.22);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.library-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 30px rgba(0,25,105,.28);
}

.library-open {
  width: 100%;
  padding: 0;
  color: var(--blue-950);
  text-align: left;
  background: transparent;
}

.library-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.library-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  background: rgba(7,27,122,.72);
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.library-card:hover .play-bubble,
.library-open:focus-visible .play-bubble {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}

.library-copy {
  padding: 14px 16px 17px;
}

.library-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.library-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--blue-800);
  background: #e9f5ff;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}

.library-copy h3 {
  margin: 9px 0 5px;
  font-size: 18px;
  line-height: 1.15;
}

.library-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.favorite-button {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.88);
  border-radius: 50%;
  color: white;
  background: rgba(7,27,122,.72);
  box-shadow: 0 6px 12px rgba(0,0,0,.18);
  font-size: 22px;
  line-height: 1;
}

.favorite-button[aria-pressed="true"] {
  color: #ffdf3e;
  background: var(--blue-950);
}

.empty-state {
  margin: 24px 0 0;
  padding: 24px;
  border-radius: 18px;
  color: white;
  background: rgba(255,255,255,.12);
  text-align: center;
  font-weight: 900;
}

/* Learning */
.learning-section {
  margin-top: 36px;
  padding: 68px 0 72px;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.76));
  border-block: 1px solid rgba(255,255,255,.56);
}

.section-heading-large.centered {
  align-items: center;
  text-align: left;
}

.section-heading-large.centered h2 {
  color: var(--blue-950);
}

.section-heading-large.centered > p {
  color: var(--muted);
}

.learning-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.learning-card {
  min-height: 290px;
  padding: 28px;
  border: 2px solid rgba(255,255,255,.72);
  border-radius: 30px;
  box-shadow: var(--shadow-md);
}

.learning-pink { background: linear-gradient(145deg, #fff0f7, #ffd0e5); }
.learning-aqua { background: linear-gradient(145deg, #e7fbff, #b9efff); }
.learning-yellow { background: linear-gradient(145deg, #fffbe9, #ffe69b); }

.learning-emoji {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 9px 18px rgba(11,52,164,.13);
  font-size: 38px;
}

.learning-card h3 {
  margin: 18px 0 8px;
  font-size: 26px;
  line-height: 1.1;
}

.learning-card p {
  margin: 0 0 19px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}

.learning-card button {
  padding: 0;
  color: var(--blue-800);
  background: transparent;
  font-weight: 1000;
}

/* About */
.about-section {
  padding: 55px 0 70px;
}

.about-card {
  padding: 34px 44px;
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: center;
  gap: 42px;
  border: 2px solid rgba(18,56,182,.20);
  border-radius: 36px;
  background: rgba(255,255,255,.90);
  box-shadow: var(--shadow-lg);
}

.about-card img {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  object-fit: contain;
}

.about-card h2 {
  margin: 5px 0 10px;
  font-size: clamp(29px, 3vw, 46px);
  line-height: 1.03;
}

.about-card p {
  max-width: 810px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 700;
}

.secondary-button {
  min-height: 48px;
  padding: 10px 18px;
  border: 2px solid rgba(18,56,182,.24);
  border-radius: 999px;
  color: var(--blue-900);
  background: white;
  box-shadow: var(--shadow-sm);
  font-weight: 1000;
}

/* Footer */
.site-footer {
  padding: 28px 0 calc(30px + var(--safe-bottom));
  color: white;
  background: linear-gradient(180deg, #123bb9, #071b7a);
}

.footer-inner {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.footer-inner > img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.footer-inner p {
  margin: 0;
  line-height: 1.35;
}

.footer-inner nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-weight: 900;
}

.footer-inner nav button {
  padding: 0;
  color: white;
  background: transparent;
  font-weight: 900;
}

.footer-inner small {
  text-align: right;
  opacity: .8;
}

/* Dialog */
.parent-dialog {
  width: min(650px, calc(100% - 30px));
  max-height: min(850px, calc(100dvh - 30px));
  margin: auto;
  padding: 28px;
  overflow: auto;
  border: 3px solid var(--blue-800);
  border-radius: 32px;
  color: var(--blue-950);
  background: #f7fcff;
  box-shadow: 0 35px 80px rgba(0,20,100,.42);
}

.parent-dialog::backdrop {
  background: rgba(4,20,83,.56);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  right: 17px;
  top: 15px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--blue-900);
  background: white;
  box-shadow: var(--shadow-sm);
  font-size: 30px;
  line-height: 1;
}

.dialog-logo-wrap {
  width: 105px;
  height: 105px;
  margin-bottom: 6px;
}

.dialog-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.parent-dialog h2 {
  margin: 4px 0 7px;
  font-size: 36px;
}

.dialog-intro {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 700;
}

.setting-row {
  padding: 16px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 15px;
  border-top: 1px solid #d5e5f5;
}

.setting-row strong,
.local-test-card strong {
  display: block;
  font-size: 16px;
}

.setting-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.switch {
  position: relative;
  width: 56px;
  height: 32px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #b9c8de;
  cursor: pointer;
  transition: background 180ms ease;
}

.switch span::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 8px rgba(0,0,0,.2);
  transition: transform 180ms ease;
}

.switch input:checked + span {
  background: var(--blue-700);
}

.switch input:checked + span::after {
  transform: translateX(24px);
}

.local-test-card {
  margin: 14px 0 18px;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  border: 2px solid #d7e8f7;
  border-radius: 22px;
  background: white;
}

.local-test-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #e5f5ff;
  font-size: 29px;
}

.local-test-card p {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.primary-button,
.install-button {
  min-height: 49px;
  padding: 11px 20px;
}

.primary-button.compact {
  min-height: 42px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
}

.local-file-status {
  min-height: 18px;
  margin-bottom: 0 !important;
  color: var(--blue-700) !important;
}

.install-button,
.dialog-done {
  width: 100%;
  margin-top: 8px;
}

.dialog-done {
  border-radius: 999px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  z-index: 1000;
  max-width: min(500px, calc(100% - 32px));
  padding: 13px 18px;
  border: 2px solid rgba(255,255,255,.74);
  border-radius: 999px;
  color: white;
  background: rgba(7,27,122,.94);
  box-shadow: 0 15px 35px rgba(0,20,100,.30);
  font-weight: 900;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

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

.mobile-bottom-nav {
  display: none;
}

/* Tablet */
@media (max-width: 1180px) {
  html { scroll-padding-top: 96px; }

  .section-width {
    width: min(100% - 36px, 980px);
  }

  .site-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .nav-shell {
    width: min(100% - 28px, 990px);
    min-height: 66px;
    grid-template-columns: auto 1fr auto;
    border-radius: 25px;
  }

  .mobile-brand {
    width: 56px;
    height: 56px;
    display: block;
  }

  .mobile-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .primary-nav {
    justify-content: center;
  }

  .nav-link {
    min-height: 46px;
    padding: 0 11px;
    gap: 6px;
    font-size: 13px;
  }

  .nav-link svg {
    width: 19px;
    height: 19px;
  }

  .nav-search {
    display: none;
  }

  .parent-nav-button {
    min-height: 46px;
    padding: 0 13px;
    font-size: 13px;
  }

  .hero {
    min-height: 0;
    padding-top: 12px;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .player-column {
    order: 1;
    width: min(100%, 900px);
    margin-inline: auto;
  }

  .hero-copy {
    order: 2;
    width: min(100%, 760px);
    margin-inline: auto;
  }

  .hero-logo {
    width: min(620px, 88%);
    margin-top: -28px;
    margin-bottom: -24px;
  }

  .desktop-break { display: none; }

  .trust-panel {
    grid-template-columns: 150px 1fr;
    gap: 15px 22px;
  }

  .trust-family {
    grid-row: span 2;
  }

  .trust-features {
    grid-column: 2;
  }

  .parents-cta {
    grid-column: 1 / -1;
    width: min(100%, 330px);
    justify-self: center;
  }

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

  .footer-inner {
    grid-template-columns: auto auto 1fr;
  }

  .footer-inner small {
    grid-column: 1 / -1;
    text-align: center;
  }
}

/* Mobile */
@media (max-width: 760px) {
  :root {
    --radius-xl: 25px;
  }

  html {
    scroll-padding-top: 84px;
  }

  body {
    padding-bottom: calc(78px + var(--safe-bottom));
  }

  .section-width {
    width: calc(100% - 24px);
  }

  .site-header {
    padding: max(8px, env(safe-area-inset-top)) 0 4px;
  }

  .nav-shell {
    width: calc(100% - 18px);
    min-height: 62px;
    padding: 5px 8px;
    grid-template-columns: auto 1fr auto;
    border-radius: 23px;
  }

  .mobile-brand {
    width: 52px;
    height: 52px;
  }

  .menu-button {
    width: 44px;
    height: 44px;
    padding: 11px;
    display: grid;
    align-content: center;
    gap: 5px;
    justify-self: end;
    border-radius: 50%;
    color: white;
    background: var(--blue-800);
    box-shadow: 0 7px 13px rgba(9,44,156,.22);
  }

  .menu-button span:not(.sr-only) {
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  .primary-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    top: calc(79px + env(safe-area-inset-top));
    z-index: 60;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    border: 2px solid rgba(18,56,182,.25);
    border-radius: 24px;
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(.98);
    transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
  }

  .primary-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link {
    min-height: 50px;
    justify-content: flex-start;
    padding: 0 13px;
    font-size: 14px;
  }

  .parent-nav-button,
  .nav-search {
    display: none;
  }

  .hero {
    padding-top: 8px;
    gap: 12px;
  }

  .video-shell {
    padding: 5px;
    border-width: 2px;
    border-radius: 21px;
  }

  .video-shell video {
    border-radius: 14px;
  }

  .sound-prompt {
    left: 13px;
    top: 12px;
    min-height: 38px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .sound-prompt svg {
    width: 17px;
    height: 17px;
  }

  .player-status {
    right: 12px;
    top: 12px;
    padding: 6px 9px;
    font-size: 10px;
  }

  .now-playing-card {
    margin: 8px 4px 0;
    padding: 10px 11px;
    gap: 10px;
    border-radius: 15px;
  }

  .now-playing-card span,
  .now-playing-card p {
    display: none;
  }

  .now-playing-card h2,
  .now-playing-card h3 {
    margin: 0;
    font-size: 14px;
  }

  .file-preview-button {
    min-height: 38px;
    padding: 7px 10px;
  }

  .file-preview-button span {
    display: none;
  }

  .hero-logo {
    width: min(100%, 470px);
    margin: -10px auto -4px;
  }

  .hero-text h1 {
    font-size: 23px;
  }

  .hero-text p {
    font-size: 15px;
    line-height: 1.35;
  }

  .hero-pill {
    min-height: 38px;
    padding: 7px 14px;
    font-size: 14px;
  }

  .featured-panel {
    padding: 10px 10px 13px;
    border-radius: 22px;
  }

  .panel-heading h2 {
    font-size: 18px;
  }

  .round-arrow {
    display: none;
  }

  .view-all-button {
    min-height: 34px;
    padding: 5px 12px;
    font-size: 12px;
  }

  .featured-track {
    grid-auto-columns: 71%;
    gap: 10px;
  }

  .featured-title-row strong {
    font-size: 12px;
  }

  .trust-panel {
    min-height: 0;
    padding: 18px;
    grid-template-columns: 92px 1fr;
    gap: 11px 14px;
    border-radius: 22px;
  }

  .trust-family {
    max-height: 95px;
  }

  .trust-copy h2 {
    font-size: 18px;
  }

  .trust-copy p {
    font-size: 12px;
  }

  .trust-features {
    grid-column: 1 / -1;
    gap: 6px;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    font-size: 14px;
  }

  .trust-features strong {
    font-size: 10px;
  }

  .parents-cta {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
  }

  .library-section {
    margin-top: 24px;
    padding: 25px 14px 28px;
    border-radius: 26px;
  }

  .section-heading-large,
  .section-heading-large.centered {
    display: block;
    text-align: left;
  }

  .section-heading-large h2 {
    font-size: 31px;
  }

  .section-heading-large > p {
    margin-top: 8px;
    font-size: 14px;
  }

  .filter-chips {
    margin-top: 17px;
  }

  .filter-chip {
    min-height: 40px;
    padding: 7px 13px;
    font-size: 12px;
  }

  .library-grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }

  .library-card {
    border-radius: 16px;
  }

  .library-copy {
    padding: 10px 11px 13px;
  }

  .library-copy h3 {
    margin-top: 7px;
    font-size: 14px;
  }

  .library-copy p {
    display: none;
  }

  .library-meta span {
    padding: 3px 6px;
    font-size: 9px;
  }

  .favorite-button {
    right: 7px;
    top: 7px;
    width: 34px;
    height: 34px;
    font-size: 19px;
  }

  .play-bubble {
    width: 42px;
    height: 42px;
    opacity: .85;
  }

  .learning-section {
    margin-top: 26px;
    padding: 44px 0;
  }

  .learning-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .learning-card {
    min-height: 0;
    padding: 22px;
    border-radius: 24px;
  }

  .learning-emoji {
    width: 58px;
    height: 58px;
    font-size: 31px;
  }

  .learning-card h3 {
    font-size: 23px;
  }

  .about-section {
    padding: 34px 0 45px;
  }

  .about-card {
    padding: 23px;
    grid-template-columns: 95px 1fr;
    gap: 16px;
    border-radius: 26px;
  }

  .about-card img {
    width: 95px;
  }

  .about-card h2 {
    font-size: 25px;
  }

  .about-card p {
    grid-column: 1 / -1;
    margin-bottom: 15px;
    font-size: 14px;
  }

  .about-card .secondary-button {
    grid-column: 1 / -1;
  }

  .site-footer {
    padding-bottom: calc(96px + var(--safe-bottom));
  }

  .footer-inner {
    grid-template-columns: auto 1fr;
    gap: 10px 13px;
  }

  .footer-inner > img {
    width: 60px;
    height: 60px;
  }

  .footer-inner nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 17px;
    font-size: 13px;
  }

  .footer-inner small {
    text-align: left;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(7px + var(--safe-bottom));
    z-index: 70;
    min-height: 65px;
    padding: 6px 7px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 2px solid rgba(255,255,255,.73);
    border-radius: 22px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 18px 45px rgba(0,24,109,.30);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-width: 0;
    padding: 4px 2px;
    display: grid;
    place-items: center;
    gap: 2px;
    border-radius: 14px;
    color: var(--blue-800);
    background: transparent;
    font-weight: 1000;
  }

  .mobile-bottom-nav .is-active {
    color: white;
    background: var(--blue-800);
  }

  .mobile-bottom-nav span {
    font-size: 19px;
    line-height: 1;
  }

  .mobile-bottom-nav small {
    min-width: 0;
    font-size: 9px;
    line-height: 1;
  }

  .parent-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    padding: 21px 18px calc(22px + var(--safe-bottom));
    border-radius: 25px;
  }

  .dialog-logo-wrap {
    width: 85px;
    height: 85px;
  }

  .parent-dialog h2 {
    font-size: 30px;
  }

  .local-test-card {
    grid-template-columns: 45px 1fr;
    padding: 14px;
  }

  .local-test-icon {
    width: 45px;
    height: 45px;
    font-size: 24px;
  }

  .toast {
    bottom: calc(88px + var(--safe-bottom));
    border-radius: 18px;
  }
}

@media (max-width: 420px) {
  .hero-logo {
    margin-top: -6px;
    margin-bottom: 0;
  }

  .hero-text h1 {
    font-size: 20px;
  }

  .featured-track {
    grid-auto-columns: 78%;
  }

  .trust-panel {
    grid-template-columns: 78px 1fr;
    padding: 14px;
  }

  .trust-features strong {
    font-size: 9px;
  }

  .library-grid {
    grid-template-columns: 1fr;
  }

  .library-copy p {
    display: block;
  }

  .about-card {
    grid-template-columns: 78px 1fr;
  }

  .about-card img {
    width: 78px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .bokeh-orb,
  .ambient-bubble {
    animation: none !important;
    transform: none !important;
    opacity: .25 !important;
  }
}

/* ================================================================
   Grown-up authentication and server-saved favourites
   ================================================================ */
.parent-account-card {
  margin: 14px 0 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 2px solid rgba(18, 56, 182, 0.18);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #eef8ff);
  box-shadow: 0 10px 24px rgba(16, 57, 164, 0.08);
}

.parent-account-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(145deg, #ffd84a, #ff8f2e 50%, #ff5ca4);
  box-shadow: 0 8px 18px rgba(255, 111, 71, 0.24);
  font-size: 27px;
  text-shadow: 0 2px 0 rgba(92, 43, 0, 0.17);
}

.parent-account-card strong {
  display: block;
  color: var(--blue-950);
  font-size: 16px;
}

.parent-account-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.secondary-button.compact {
  min-height: 42px;
  padding: 9px 16px;
  white-space: nowrap;
  font-size: 13px;
}

.auth-dialog {
  width: min(620px, calc(100% - 30px));
  max-height: min(900px, calc(100dvh - 28px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 3px solid var(--blue-800);
  border-radius: 32px;
  color: var(--blue-950);
  background: #f7fcff;
  box-shadow: 0 35px 90px rgba(0, 20, 100, 0.48);
}

.auth-dialog::backdrop {
  background: rgba(4, 20, 83, 0.62);
  backdrop-filter: blur(9px);
}

.auth-dialog-shell {
  padding: 26px 28px 28px;
}

.auth-close {
  position: sticky;
  z-index: 3;
  top: 14px;
  float: right;
  width: 44px;
  height: 44px;
  margin: 14px 14px -58px 0;
  border-radius: 50%;
  color: var(--blue-900);
  background: white;
  box-shadow: var(--shadow-sm);
  font-size: 30px;
  line-height: 1;
}

.auth-brand {
  min-height: 112px;
  padding-right: 48px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
}

.auth-brand img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.auth-brand h2 {
  margin: 5px 0 0;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.03;
}

.auth-reason {
  margin: 4px 0 18px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.5;
}





.auth-tabs {
  margin-bottom: 15px;
  padding: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  border-radius: 18px;
  background: #dcecff;
}

.auth-tabs button {
  min-height: 45px;
  border-radius: 14px;
  color: var(--blue-800);
  background: transparent;
  font-weight: 1000;
}

.auth-tabs button.is-active {
  color: white;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  box-shadow: 0 7px 15px rgba(18, 56, 182, 0.22);
}





.auth-divider {
  margin: 17px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: #6f7f9f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: #cfdeee;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form > label:not(.adult-confirmation) {
  display: grid;
  gap: 6px;
  color: var(--blue-950);
  font-size: 13px;
  font-weight: 900;
}

.auth-form label > span small,
.auth-form label > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 2px solid #cadcf0;
  border-radius: 15px;
  color: var(--blue-950);
  background: white;
  outline: none;
  font: inherit;
  font-weight: 750;
}

.auth-form input:focus {
  border-color: #4f83ff;
  box-shadow: 0 0 0 4px rgba(79, 131, 255, 0.14);
}

.adult-confirmation {
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  border: 1px solid #d4e2f1;
  border-radius: 14px;
  color: #425273;
  background: #f4f9ff;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 750;
}

.adult-confirmation input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--blue-700);
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
  justify-content: center;
}

.auth-account-view {
  padding: 22px;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 2px solid #d2e4f6;
  border-radius: 23px;
  text-align: center;
  background: white;
}

.auth-account-view[hidden] {
  display: none;
}

.signed-in-badge {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #27ce83, #0f9c65);
  box-shadow: 0 10px 24px rgba(21, 174, 111, 0.24);
  font-size: 30px;
  font-weight: 1000;
}

.auth-account-view strong {
  max-width: 100%;
  color: var(--blue-950);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.auth-account-view > span {
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 900;
}

.auth-account-view p {
  max-width: 430px;
  margin: 5px 0 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
}

.auth-status {
  margin: 15px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 850;
}

.auth-status[data-type="info"] {
  color: #164c8c;
  background: #e7f4ff;
}

.auth-status[data-type="success"] {
  color: #08603d;
  background: #ddf9ed;
}

.auth-status[data-type="warning"] {
  color: #6b4300;
  background: #fff4cf;
}

.auth-status[data-type="error"] {
  color: #8c1832;
  background: #ffe3eb;
}

.auth-privacy-note {
  margin: 15px 3px 0;
  color: #65728b;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 700;
  text-align: center;
}

.auth-privacy-note a {
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.favorite-button.is-busy {
  opacity: 0.62;
  pointer-events: none;
  animation: favourite-pulse 800ms ease-in-out infinite alternate;
}

@keyframes favourite-pulse {
  to { transform: scale(0.9); }
}

@media (max-width: 720px) {
  .parent-account-card {
    grid-template-columns: 45px minmax(0, 1fr);
    padding: 14px;
  }

  .parent-account-icon {
    width: 45px;
    height: 45px;
    border-radius: 15px;
    font-size: 23px;
  }

  .parent-account-card .secondary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .auth-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 25px;
  }

  .auth-dialog-shell {
    padding: 20px 18px calc(24px + var(--safe-bottom));
  }

  .auth-close {
    top: 9px;
    margin: 9px 9px -53px 0;
  }

  .auth-brand {
    min-height: 86px;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .auth-brand img {
    width: 72px;
    height: 72px;
  }

  .auth-brand h2 {
    font-size: 27px;
  }

  .auth-reason {
    font-size: 13px;
  }
}

/* Self-hosted account note */
.self-hosted-auth-note {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0 20px;
  padding: 13px 15px;
  border: 2px solid rgba(28, 72, 187, 0.18);
  border-radius: 18px;
  color: #17357d;
  background: linear-gradient(135deg, rgba(227, 246, 255, 0.96), rgba(244, 237, 255, 0.94));
}
.self-hosted-auth-note > span { font-size: 1.45rem; }
.self-hosted-auth-note p { margin: 0; line-height: 1.35; }

/* ---------- Dynamic R2 catalogue, playlists and first-party analytics ---------- */
[hidden] {
  display: none !important;
}

.public-playlists-section {
  position: relative;
  z-index: 2;
  padding-block: clamp(28px, 5vw, 64px);
}

.public-playlist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(15px, 2.3vw, 26px);
}

.public-playlist-card {
  min-width: 0;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 18px 42px rgba(17, 55, 156, 0.13);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.public-playlist-open {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.public-playlist-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dcecff;
}

.public-playlist-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.public-playlist-open:hover .public-playlist-cover > img,
.public-playlist-open:focus-visible .public-playlist-cover > img {
  transform: scale(1.04);
}

.playlist-stack {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: row-reverse;
}

.playlist-stack img {
  width: clamp(45px, 5vw, 72px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-left: -15px;
  border: 3px solid #fff;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(5, 30, 110, 0.2);
}

.playlist-count {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgba(7, 31, 131, 0.88);
  font-size: 0.77rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.playlist-play-icon {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #fff;
  background: rgba(16, 49, 166, 0.88);
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 25px rgba(6, 30, 116, 0.28);
}

.public-playlist-copy {
  display: block;
  padding: 17px 19px 20px;
}

.public-playlist-copy strong,
.public-playlist-copy small {
  display: block;
}

.public-playlist-copy strong {
  color: #0c2d9d;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.public-playlist-copy small {
  margin-top: 5px;
  color: #5f6f98;
  line-height: 1.45;
}

.playlist-dialog {
  width: min(820px, calc(100% - 24px));
  max-height: calc(100dvh - 30px);
  padding: clamp(22px, 4vw, 38px);
  overflow: auto;
  border: 0;
  border-radius: 30px;
  color: #12245f;
  background: linear-gradient(155deg, #fff, #f0f8ff);
  box-shadow: 0 30px 90px rgba(4, 22, 89, 0.34);
}

.playlist-dialog::backdrop {
  background: rgba(5, 21, 81, 0.66);
  backdrop-filter: blur(7px);
}

.playlist-dialog-close {
  position: sticky;
  top: 0;
  z-index: 3;
  float: right;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #1238b6;
  background: #e9f1ff;
  font-size: 1.55rem;
}

.playlist-dialog-header {
  padding-right: 50px;
}

.playlist-dialog-header h2 {
  margin: 5px 0 7px;
  color: #09298f;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.playlist-dialog-header p {
  color: #62719a;
}

.playlist-play-all {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0 16px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #1238b6, #684edb);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(18, 56, 182, 0.22);
}

.playlist-dialog-list {
  display: grid;
  gap: 10px;
}

.playlist-dialog-video {
  display: grid;
  grid-template-columns: 38px 132px minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 2px solid #e1eaff;
  border-radius: 18px;
  color: inherit;
  text-align: left;
  background: #fff;
}

.playlist-dialog-video:hover,
.playlist-dialog-video:focus-visible {
  border-color: #74a5ff;
  transform: translateY(-1px);
}

.playlist-dialog-video img {
  width: 132px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #e7f1ff;
}

.playlist-dialog-video strong,
.playlist-dialog-video small {
  display: block;
}

.playlist-dialog-video strong {
  color: #1238b6;
}

.playlist-dialog-video small {
  margin-top: 4px;
  color: #65749a;
}

.playlist-dialog-index,
.playlist-dialog-play {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #1238b6;
  background: #edf4ff;
  font-weight: 900;
}

.analytics-consent {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px));
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: min(1060px, calc(100% - 28px));
  margin-inline: auto;
  padding: 18px 20px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  color: #10265f;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 70px rgba(4, 24, 99, 0.28);
  backdrop-filter: blur(18px);
}

.analytics-consent strong {
  display: block;
  margin-bottom: 4px;
  color: #092b9b;
  font-size: 1.05rem;
}

.analytics-consent p {
  margin: 0;
  max-width: 680px;
  color: #617098;
  font-size: 0.88rem;
  line-height: 1.45;
}

.analytics-consent-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: min(360px, 100%);
}

.analytics-consent-actions a {
  color: #1238b6;
  font-size: 0.8rem;
  font-weight: 900;
}

@media (max-width: 900px) {
  .public-playlist-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-consent {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .analytics-consent-actions {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 620px) {
  .public-playlist-grid {
    display: flex;
    gap: 13px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }

  .public-playlist-card {
    flex: 0 0 min(86vw, 340px);
    scroll-snap-align: start;
  }

  .playlist-dialog-video {
    grid-template-columns: 30px 92px minmax(0, 1fr);
    gap: 8px;
  }

  .playlist-dialog-video img {
    width: 92px;
  }

  .playlist-dialog-play {
    display: none;
  }

  .analytics-consent {
    bottom: calc(76px + env(safe-area-inset-bottom));
    padding: 15px;
    border-radius: 20px;
  }

  .analytics-consent-actions > button {
    flex: 1 1 130px;
  }
}

/* ========================================================================== 
   Featured hero carousel — v1.3.0
   The first three published Featured videos (ordered in Admin) preview here.
   The active card stays centred and colourful; adjacent cards remain visible
   in a softer monochrome state. Native controls take over for full playback.
   ========================================================================== */
.featured-hero-card {
  position: relative;
  min-width: 0;
  padding: clamp(13px, 1.3vw, 19px);
  border: 2px solid rgba(25, 77, 202, 0.42);
  border-radius: clamp(25px, 2.2vw, 34px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(237, 248, 255, 0.92));
  box-shadow:
    0 26px 60px rgba(4, 39, 137, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px) saturate(1.08);
  overflow: hidden;
}

.featured-hero-card::before {
  content: "";
  position: absolute;
  inset: -35% 54% 64% -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83, 207, 255, 0.20), transparent 68%);
  pointer-events: none;
}

.featured-hero-card::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -28%;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 66, 229, 0.11), transparent 69%);
  pointer-events: none;
}

.featured-hero-heading,
.featured-video-shell,
.featured-selector-shell,
.featured-preview-help,
.featured-now-playing {
  position: relative;
  z-index: 1;
}

.featured-hero-heading {
  margin: 0 4px 11px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.featured-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6d43c5;
  font-size: clamp(10px, 0.76vw, 12px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured-hero-kicker > span {
  color: var(--yellow);
  filter: drop-shadow(0 2px 2px rgba(125, 75, 0, 0.15));
}

.featured-hero-heading h2 {
  margin: 4px 0 0;
  color: var(--blue-950);
  font-size: clamp(22px, 2vw, 31px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.featured-preview-counter {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(18, 56, 182, 0.19);
  border-radius: 999px;
  color: var(--blue-800);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 15px rgba(13, 50, 150, 0.10);
  font-size: clamp(10px, 0.78vw, 12px);
  font-weight: 1000;
  white-space: nowrap;
}

.featured-video-shell {
  padding: clamp(5px, 0.55vw, 8px);
  border-color: #092a9e;
  background: linear-gradient(145deg, #ffffff, #dceeff);
  box-shadow:
    0 20px 42px rgba(4, 37, 135, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.88) inset;
  isolation: isolate;
}

.featured-video-shell::before {
  content: "";
  position: absolute;
  inset: clamp(5px, 0.55vw, 8px);
  z-index: 2;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(3, 16, 78, 0.03) 36%, rgba(3, 16, 78, 0.67) 100%);
  opacity: 1;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.featured-video-shell.is-full-playback::before {
  opacity: 0;
}

.featured-preview-backdrop {
  position: absolute;
  inset: -18px;
  z-index: -1;
  background-position: center;
  background-size: cover;
  filter: blur(28px) saturate(1.25);
  opacity: 0.44;
  transform: scale(1.08);
  transition: opacity 300ms ease, transform 420ms ease;
}

.featured-video-shell video {
  position: relative;
  z-index: 1;
  min-height: 0;
  opacity: 1;
  transform: translateX(0) scale(1);
  transition: opacity 260ms ease, transform 360ms cubic-bezier(.2, .8, .2, 1);
}

.featured-video-shell.is-switching video {
  opacity: 0.10;
  transform: translateX(2.2%) scale(0.985);
}

.featured-video-shell.is-switching.is-moving-backward video {
  transform: translateX(-2.2%) scale(0.985);
}

.featured-video-shell.is-switching .featured-preview-backdrop {
  opacity: 0.18;
  transform: scale(1.13);
}

.featured-main-action {
  position: absolute;
  inset: clamp(5px, 0.55vw, 8px);
  z-index: 4;
  width: auto;
  min-height: 0;
  padding: clamp(18px, 3vw, 34px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  border-radius: 20px;
  color: white;
  text-align: left;
  background: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

.featured-main-action[hidden] {
  display: none;
}

.featured-main-action-inner {
  max-width: min(84%, 520px);
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 16px);
  pointer-events: none;
  transition: transform 180ms ease;
}

.featured-main-action:hover .featured-main-action-inner,
.featured-main-action:focus-visible .featured-main-action-inner {
  transform: translateY(-3px);
}

.featured-play-disc {
  flex: 0 0 auto;
  width: clamp(50px, 5.2vw, 72px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  color: var(--blue-900);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 13px 28px rgba(3, 18, 76, 0.34),
    inset 0 -4px 0 rgba(96, 177, 255, 0.18);
  font-size: clamp(20px, 2.4vw, 31px);
}

.featured-main-copy {
  min-width: 0;
  padding: 9px 13px 10px;
  border: 1px solid rgba(255, 255, 255, 0.40);
  border-radius: 17px;
  background: rgba(4, 25, 105, 0.68);
  box-shadow: 0 10px 28px rgba(2, 17, 71, 0.24);
  backdrop-filter: blur(12px);
}

.featured-main-copy strong,
.featured-main-copy small {
  display: block;
}

.featured-main-copy strong {
  overflow: hidden;
  font-size: clamp(15px, 1.35vw, 21px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-main-copy small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(10px, 0.78vw, 12px);
  font-weight: 850;
}

.featured-video-shell .player-status {
  z-index: 6;
}

.featured-preview-meter {
  position: absolute;
  left: clamp(12px, 1.2vw, 19px);
  right: clamp(12px, 1.2vw, 19px);
  bottom: clamp(10px, 1vw, 16px);
  z-index: 7;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 1px 7px rgba(4, 19, 77, 0.22);
  pointer-events: none;
}

.featured-preview-meter[hidden] {
  display: none;
}

.featured-preview-meter > span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fff, #8ce9ff 46%, #ffda43 100%);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.92);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 120ms linear;
}

.featured-selector-shell {
  margin-top: clamp(11px, 1.15vw, 16px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: clamp(7px, 0.85vw, 12px);
}

.featured-selector-track {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.22fr) minmax(0, 0.82fr);
  align-items: center;
  gap: clamp(7px, 0.9vw, 13px);
}

.featured-selector-track[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
  max-width: 390px;
  margin-inline: auto;
}

.featured-selector-track[data-count="2"] {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.18fr);
}

.featured-selector-arrow {
  width: 48px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(18, 56, 182, 0.28);
  border-radius: 50%;
  color: var(--blue-900);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(9, 43, 151, 0.17);
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
  transition: transform 170ms ease, color 170ms ease, background 170ms ease, opacity 170ms ease;
  touch-action: manipulation;
}

.featured-selector-arrow:hover,
.featured-selector-arrow:focus-visible {
  color: white;
  background: var(--blue-800);
  transform: scale(1.07);
}

.featured-selector-arrow:disabled {
  opacity: 0.32;
  cursor: default;
  transform: none;
}

.featured-selector-card {
  position: relative;
  min-width: 0;
  width: 100%;
  padding: clamp(5px, 0.55vw, 8px);
  display: grid;
  grid-template-columns: minmax(68px, 0.72fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(6px, 0.72vw, 10px);
  overflow: hidden;
  border: 2px solid rgba(31, 66, 151, 0.16);
  border-radius: clamp(14px, 1.35vw, 19px);
  color: #52607f;
  text-align: left;
  background: rgba(244, 247, 252, 0.86);
  box-shadow: 0 7px 16px rgba(24, 50, 113, 0.10);
  opacity: 0.62;
  filter: grayscale(1) saturate(0.18);
  transform: scale(0.94);
  transition:
    opacity 300ms ease,
    filter 300ms ease,
    transform 330ms cubic-bezier(.2, .85, .2, 1),
    border-color 250ms ease,
    box-shadow 250ms ease,
    background 250ms ease;
  touch-action: manipulation;
}

.featured-selector-card[data-position="left"] {
  transform-origin: right center;
}

.featured-selector-card[data-position="right"] {
  transform-origin: left center;
}

.featured-selector-card:hover,
.featured-selector-card:focus-visible {
  opacity: 0.86;
  transform: scale(0.97) translateY(-2px);
  border-color: rgba(18, 56, 182, 0.36);
}

.featured-selector-card.is-active {
  z-index: 2;
  min-height: clamp(82px, 7.3vw, 108px);
  padding: clamp(7px, 0.72vw, 10px);
  border-color: rgba(18, 56, 182, 0.80);
  color: var(--blue-950);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(226, 246, 255, 0.98));
  box-shadow:
    0 15px 30px rgba(4, 44, 156, 0.23),
    0 0 0 3px rgba(255, 204, 37, 0.20);
  opacity: 1;
  filter: none;
  transform: scale(1.035);
}

.featured-selector-card.is-active:hover,
.featured-selector-card.is-active:focus-visible {
  transform: scale(1.055) translateY(-2px);
}

.featured-selector-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: clamp(9px, 0.95vw, 13px);
  background: #dbe8f5;
  box-shadow: inset 0 0 0 1px rgba(6, 33, 116, 0.08);
}

.featured-selector-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-selector-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(27px, 2.6vw, 39px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding-left: 2px;
  border: 2px solid rgba(255, 255, 255, 0.90);
  border-radius: 50%;
  color: var(--blue-900);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 5px 13px rgba(3, 25, 96, 0.28);
  font-size: clamp(10px, 1vw, 14px);
  transform: translate(-50%, -50%);
}

.featured-selector-card:not(.is-active) .featured-selector-play {
  opacity: 0.72;
}

.featured-selector-copy {
  min-width: 0;
}

.featured-selector-copy small,
.featured-selector-copy strong {
  display: block;
}

.featured-selector-copy small {
  margin-bottom: 3px;
  color: #75819d;
  font-size: clamp(8px, 0.66vw, 10px);
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured-selector-copy strong {
  overflow: hidden;
  font-size: clamp(10px, 0.9vw, 14px);
  line-height: 1.2;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.featured-selector-card.is-active .featured-selector-copy small {
  color: #6c45c5;
}

.featured-selector-card.is-active .featured-selector-copy strong {
  color: var(--blue-950);
  font-size: clamp(12px, 1.02vw, 16px);
}

.featured-preview-help {
  margin: 10px 7px 0;
  color: #52658f;
  text-align: center;
  font-size: clamp(10px, 0.76vw, 12px);
  line-height: 1.35;
  font-weight: 800;
}

.featured-now-playing {
  margin-inline: 2px;
  background: rgba(255, 255, 255, 0.88);
}

.now-playing-card h3 {
  margin: 3px 0 2px;
  color: var(--blue-950);
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.15;
}

.featured-hero-card.is-full-playback .featured-preview-help {
  color: var(--blue-700);
}

/* Tablet and small laptop */
@media (max-width: 1180px) {
  .featured-hero-card {
    width: min(100%, 900px);
    margin-inline: auto;
  }

  .featured-selector-track {
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.26fr) minmax(0, 0.78fr);
  }

  .featured-selector-card {
    min-height: 76px;
  }

  .featured-selector-card.is-active {
    min-height: 96px;
  }
}

/* Phones and portrait tablets */
@media (max-width: 760px) {
  .featured-hero-card {
    padding: 10px;
    border-radius: 23px;
  }

  .featured-hero-heading {
    margin: 1px 2px 8px;
    align-items: center;
  }

  .featured-hero-kicker {
    display: none;
  }

  .featured-hero-heading h2 {
    margin: 0;
    font-size: clamp(20px, 6vw, 25px);
  }

  .featured-preview-counter {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 9px;
  }

  .featured-video-shell::before,
  .featured-main-action {
    border-radius: 14px;
  }

  .featured-main-action {
    padding: 13px;
  }

  .featured-main-action-inner {
    max-width: 96%;
    gap: 8px;
  }

  .featured-play-disc {
    width: 48px;
    border-width: 2px;
    font-size: 19px;
  }

  .featured-main-copy {
    max-width: calc(100% - 58px);
    padding: 7px 9px 8px;
    border-radius: 12px;
  }

  .featured-main-copy strong {
    font-size: 13px;
  }

  .featured-main-copy small {
    font-size: 9px;
  }

  .featured-preview-meter {
    left: 10px;
    right: 10px;
    bottom: 8px;
    height: 3px;
  }

  .featured-selector-shell {
    margin-top: 9px;
    grid-template-columns: 39px minmax(0, 1fr) 39px;
    gap: 5px;
  }

  .featured-selector-arrow {
    width: 39px;
    min-height: 39px;
    font-size: 25px;
  }

  .featured-selector-track {
    grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr) minmax(0, 0.68fr);
    gap: 5px;
  }

  .featured-selector-card,
  .featured-selector-card.is-active {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    transform: scale(0.93);
  }

  .featured-selector-card.is-active {
    transform: scale(1.02);
  }

  .featured-selector-card:hover,
  .featured-selector-card:focus-visible {
    transform: scale(0.96);
  }

  .featured-selector-card.is-active:hover,
  .featured-selector-card.is-active:focus-visible {
    transform: scale(1.04);
  }

  .featured-selector-thumb {
    width: 100%;
    border-radius: 8px;
  }

  .featured-selector-copy {
    padding: 0 2px 2px;
    text-align: center;
  }

  .featured-selector-copy small {
    display: none;
  }

  .featured-selector-copy strong {
    font-size: clamp(8px, 2.6vw, 11px);
    line-height: 1.12;
    -webkit-line-clamp: 2;
  }

  .featured-selector-card:not(.is-active) .featured-selector-copy strong {
    opacity: 0.84;
  }

  .featured-selector-card.is-active .featured-selector-copy strong {
    font-size: clamp(10px, 3vw, 12px);
  }

  .featured-selector-play {
    width: 27px;
    font-size: 10px;
  }

  .featured-preview-help {
    margin: 8px 4px 0;
    font-size: 9px;
  }

  .featured-now-playing {
    margin-top: 9px;
  }

  .now-playing-card h3 {
    margin: 0;
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .featured-selector-shell {
    grid-template-columns: 35px minmax(0, 1fr) 35px;
    gap: 4px;
  }

  .featured-selector-arrow {
    width: 35px;
    min-height: 35px;
    font-size: 23px;
  }

  .featured-selector-track {
    gap: 4px;
  }

  .featured-selector-card {
    padding: 3px;
  }

  .featured-preview-help {
    max-width: 290px;
    margin-inline: auto;
  }
}

/* Ten-foot / television interfaces and large desktop displays. */
@media (min-width: 1600px) {
  .featured-hero-card {
    padding: 20px;
  }

  .featured-selector-shell {
    grid-template-columns: 58px minmax(0, 1fr) 58px;
  }

  .featured-selector-arrow {
    width: 58px;
    font-size: 37px;
  }

  .featured-selector-card {
    min-height: 94px;
  }

  .featured-selector-card.is-active {
    min-height: 124px;
  }

  .featured-selector-card:focus-visible,
  .featured-main-action:focus-visible,
  .featured-selector-arrow:focus-visible {
    outline-width: 6px;
    outline-offset: 6px;
  }
}

body.reduce-motion .featured-video-shell video,
body.reduce-motion .featured-preview-backdrop,
body.reduce-motion .featured-selector-card,
body.reduce-motion .featured-main-action-inner {
  transition: none !important;
}

@media (max-width: 760px) {
  .featured-main-copy strong {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    text-overflow: clip;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* ========================================================================
   Video-first public layout and dedicated full-video viewer — v1.6.0
   ======================================================================== */

/* The public page is intentionally video-first: Featured, then All Videos. */
.hero + .library-section {
  margin-top: 12px;
}

.library-section + .trust-panel {
  margin-top: 22px;
}

.trust-panel + .games-section {
  margin-top: 22px;
}

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

.filter-chip.is-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(255, 255, 255, 0.34);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  cursor: default;
  opacity: 1;
}

.filter-chip.is-coming-soon:disabled {
  opacity: 1;
}

.coming-soon-label {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--blue-950);
  background: linear-gradient(180deg, #fff6a7, #ffcf35);
  box-shadow: 0 4px 10px rgba(5, 32, 118, 0.20);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Dedicated full-video modal. The Featured hero remains a preview carousel. */
.video-viewer-dialog {
  width: min(1180px, calc(100vw - 30px));
  max-width: none;
  max-height: calc(100dvh - 26px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 30px;
  color: var(--blue-950);
  background:
    radial-gradient(circle at 8% 4%, rgba(137, 231, 255, 0.34), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(224, 245, 255, 0.98));
  box-shadow: 0 38px 100px rgba(0, 12, 74, 0.52), 0 0 0 2px rgba(255, 255, 255, 0.68);
  overscroll-behavior: contain;
}

.video-viewer-dialog::backdrop {
  background: rgba(2, 12, 57, 0.78);
  backdrop-filter: blur(14px) saturate(0.86);
}

.video-viewer-shell {
  min-height: 100%;
  padding: 16px;
}

.video-viewer-header {
  min-height: 58px;
  padding: 2px 2px 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.video-viewer-heading-copy {
  min-width: 0;
}

.video-viewer-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.video-viewer-heading-copy h2 {
  max-width: 900px;
  margin: 0;
  overflow: hidden;
  color: var(--blue-950);
  font-size: clamp(22px, 2.3vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-viewer-close {
  width: 48px;
  min-width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(18, 56, 182, 0.18);
  border-radius: 50%;
  color: var(--blue-950);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 9px 20px rgba(5, 33, 122, 0.16);
  font-size: 32px;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease;
}

.video-viewer-close:hover,
.video-viewer-close:focus-visible {
  transform: scale(1.06);
  background: white;
}

.video-viewer-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 3px solid var(--blue-900);
  border-radius: 24px;
  background: #020817;
  box-shadow: 0 22px 45px rgba(4, 26, 104, 0.30);
}

.video-viewer-stage video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: #020817;
}

.video-viewer-loading {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: white;
  background: rgba(4, 17, 75, 0.78);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(9px);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.video-viewer-loading[hidden] {
  display: none;
}

.video-viewer-fullscreen {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 4;
  min-height: 44px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  color: white;
  background: rgba(3, 17, 78, 0.78);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(9px);
  font-size: 12px;
  font-weight: 1000;
  transition: transform 160ms ease, background 160ms ease;
}

.video-viewer-fullscreen:hover,
.video-viewer-fullscreen:focus-visible {
  transform: translateY(-2px);
  background: rgba(12, 49, 166, 0.92);
}

.video-viewer-fullscreen svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-viewer-details {
  margin-top: 14px;
  padding: clamp(16px, 2.1vw, 26px);
  border: 2px solid rgba(18, 56, 182, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 13px 30px rgba(5, 37, 132, 0.12);
}

.video-viewer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-viewer-meta span {
  min-height: 31px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(18, 56, 182, 0.18);
  border-radius: 999px;
  color: var(--blue-900);
  background: linear-gradient(180deg, #ffffff, #eaf8ff);
  font-size: 11px;
  font-weight: 1000;
}

.video-viewer-description-block {
  margin-top: 15px;
}

.video-viewer-description-block h3 {
  margin: 0 0 7px;
  color: var(--blue-950);
  font-size: 17px;
}

.video-viewer-description {
  margin: 0;
  overflow: hidden;
  color: #40598f;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.video-viewer-description.is-expanded {
  display: block;
  overflow: visible;
  -webkit-line-clamp: initial;
}

.video-viewer-description-toggle {
  margin-top: 8px;
  padding: 0;
  color: var(--blue-800);
  background: transparent;
  font-size: 13px;
  font-weight: 1000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.video-viewer-actions {
  margin-top: 18px;
  padding-top: 15px;
  display: grid;
  grid-template-columns: minmax(130px, auto) minmax(90px, 1fr) minmax(130px, auto);
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(18, 56, 182, 0.13);
}

.video-viewer-nav-button {
  min-height: 48px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid rgba(18, 56, 182, 0.20);
  border-radius: 999px;
  color: var(--blue-900);
  background: white;
  box-shadow: 0 7px 15px rgba(5, 37, 132, 0.10);
  font-size: 13px;
  font-weight: 1000;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.video-viewer-nav-button span {
  font-size: 25px;
  line-height: 0.7;
}

.video-viewer-nav-button:hover:not(:disabled),
.video-viewer-nav-button:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 11px 21px rgba(5, 37, 132, 0.17);
}

.video-viewer-nav-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.video-viewer-status {
  color: #5a6c98;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.video-viewer-stage:fullscreen,
.video-viewer-stage:-webkit-full-screen,
.video-viewer-stage video:fullscreen,
.video-viewer-stage video:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: black;
}

@media (max-width: 760px) {
  .hero + .library-section {
    margin-top: 8px;
  }

  .filter-chip.is-coming-soon {
    gap: 6px;
  }

  .coming-soon-label {
    padding: 3px 6px;
    font-size: 8px;
  }

  .video-viewer-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }

  .video-viewer-shell {
    padding: max(10px, env(safe-area-inset-top)) 10px calc(12px + env(safe-area-inset-bottom));
  }

  .video-viewer-header {
    min-height: 52px;
    padding: 0 0 9px 3px;
  }

  .video-viewer-heading-copy h2 {
    max-width: calc(100vw - 88px);
    font-size: clamp(19px, 5.6vw, 25px);
  }

  .video-viewer-close {
    width: 43px;
    min-width: 43px;
    height: 43px;
    font-size: 28px;
  }

  .video-viewer-stage {
    border-width: 2px;
    border-radius: 17px;
  }

  .video-viewer-fullscreen {
    right: 9px;
    top: 9px;
    min-height: 39px;
    padding: 7px 10px;
  }

  .video-viewer-fullscreen span {
    display: none;
  }

  .video-viewer-details {
    margin-top: 10px;
    padding: 14px;
    border-radius: 19px;
  }

  .video-viewer-meta {
    gap: 6px;
  }

  .video-viewer-meta span {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 9px;
  }

  .video-viewer-description {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .video-viewer-actions {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .video-viewer-status {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .video-viewer-nav-button {
    grid-row: 2;
    min-height: 45px;
  }
}

/* Larger ten-foot interfaces: generous focus targets and readable labels. */
@media (min-width: 1600px) {
  .video-viewer-dialog {
    width: min(1420px, calc(100vw - 80px));
  }

  .video-viewer-shell {
    padding: 24px;
  }

  .video-viewer-header {
    min-height: 76px;
  }

  .video-viewer-heading-copy h2 {
    font-size: 42px;
  }

  .video-viewer-close {
    width: 62px;
    min-width: 62px;
    height: 62px;
    font-size: 40px;
  }

  .video-viewer-fullscreen,
  .video-viewer-nav-button {
    min-height: 58px;
    font-size: 16px;
  }

  .video-viewer-fullscreen:focus-visible,
  .video-viewer-nav-button:focus-visible,
  .video-viewer-close:focus-visible,
  .video-viewer-description-toggle:focus-visible {
    outline-width: 6px;
    outline-offset: 6px;
  }
}

body.reduce-motion .video-viewer-dialog,
body.reduce-motion .video-viewer-nav-button,
body.reduce-motion .video-viewer-close,
body.reduce-motion .video-viewer-fullscreen {
  transition: none !important;
}

/* ========================================================================
   Video-first public UI refinements — 1.6.0
   ======================================================================== */

/* The main preview visibly exits in the navigation direction. The incoming
   preview is then positioned outside the opposite edge and slides into place.
   This makes automatic ten-second rotation understandable without being
   visually harsh for young viewers. */
.featured-video-shell.is-switching {
  overflow: hidden;
}

.featured-video-shell.is-switching.is-slide-out:not(.is-moving-backward) video {
  opacity: 0;
  transform: translateX(-18%) scale(0.965);
}

.featured-video-shell.is-switching.is-slide-out.is-moving-backward video {
  opacity: 0;
  transform: translateX(18%) scale(0.965);
}

.featured-video-shell.is-switching.is-slide-in:not(.is-moving-backward) video {
  opacity: 0;
  transform: translateX(18%) scale(0.965);
  transition: none;
}

.featured-video-shell.is-switching.is-slide-in.is-moving-backward video {
  opacity: 0;
  transform: translateX(-18%) scale(0.965);
  transition: none;
}

.featured-video-shell.is-switching.is-slide-out:not(.is-moving-backward) .featured-preview-backdrop {
  opacity: 0.12;
  transform: translateX(-5%) scale(1.15);
}

.featured-video-shell.is-switching.is-slide-out.is-moving-backward .featured-preview-backdrop {
  opacity: 0.12;
  transform: translateX(5%) scale(1.15);
}

.featured-selector-track.is-shifting-forward {
  animation: featured-rail-forward 520ms cubic-bezier(.2, .82, .2, 1) both;
}

.featured-selector-track.is-shifting-backward {
  animation: featured-rail-backward 520ms cubic-bezier(.2, .82, .2, 1) both;
}

@keyframes featured-rail-forward {
  0% { opacity: .52; transform: translateX(8%); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes featured-rail-backward {
  0% { opacity: .52; transform: translateX(-8%); }
  100% { opacity: 1; transform: translateX(0); }
}

/* All Videos intentionally keeps catalogue cards simple: thumbnail, duration
   and title only. The complete description lives in the expandable player
   modal after the viewer deliberately opens a video. */
.video-library-home .library-copy {
  min-height: 62px;
  padding: 14px 16px 16px;
  display: flex;
  align-items: center;
}

.video-library-home .library-copy h3 {
  width: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--blue-950);
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-library-home .library-open {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.video-library-home .library-image {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .video-library-home .library-copy {
    min-height: 52px;
    padding: 10px 11px 12px;
  }

  .video-library-home .library-copy h3 {
    margin: 0;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-selector-track.is-shifting-forward,
  .featured-selector-track.is-shifting-backward {
    animation: none;
  }
}

body.reduce-motion .featured-selector-track.is-shifting-forward,
body.reduce-motion .featured-selector-track.is-shifting-backward {
  animation: none;
}


/* Cloudflare Stream adaptive player */
.video-stream-player {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  background: #02091f;
}

.video-stream-player[hidden],
#video-modal-player[hidden] {
  display: none !important;
}

.video-viewer-stage.is-adaptive-stream .video-viewer-loading {
  pointer-events: none;
}

@media (max-width: 760px) {
  .video-stream-player {
    min-height: min(56.25vw, 330px);
  }
}

/* ========================================================================
   Instant-start adaptive playback — 2.0.2

   The chosen poster stays visible while Cloudflare performs manifest and
   first-segment negotiation. The live iframe is already loading underneath,
   but its internal initialisation screen is never exposed to the viewer.
   ======================================================================== */
.video-viewer-poster {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border: 0;
  background: #020817;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  user-select: none;
  transition: opacity 150ms ease, visibility 150ms ease;
}

.video-viewer-poster[hidden] { display: none !important; }

.video-stream-player {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transition: opacity 150ms ease;
}

.video-stream-player.is-preparing,
.video-stream-player.is-primed {
  opacity: 0;
  pointer-events: none;
}

.video-stream-player.is-ready {
  opacity: 1;
  pointer-events: auto;
}

.video-viewer-stage.is-stream-preparing .video-viewer-poster { display: block; }

.video-viewer-stage.is-stream-ready .video-viewer-poster {
  opacity: 0;
  visibility: hidden;
}

.video-viewer-stage.is-stream-preparing .video-viewer-fullscreen {
  opacity: 0;
  pointer-events: none;
}

.video-viewer-stage.is-stream-ready .video-viewer-fullscreen {
  opacity: 1;
  pointer-events: auto;
}

.video-viewer-stage.is-stream-preparing .video-viewer-loading {
  z-index: 6;
  background: rgba(4, 17, 75, 0.66);
}

@media (prefers-reduced-motion: reduce) {
  .video-viewer-poster,
  .video-stream-player { transition: none; }
}
