/* ==========================================================================
   klipa.tv home. Markup: tools/build_home.py. Motion is CSS; home.js only
   fits the stages to their box, runs what is on screen and follows the
   scroll through the story. The TV and phone are drawn here at a fixed
   design size (px) and zoomed to fit (--z); they stay dark in both themes.
   ========================================================================== */

.hx {
  --grad: linear-gradient(100deg, #FF7A3D 0%, #FF3D81 50%, #A78BFA 100%);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --card-bg: linear-gradient(180deg, color-mix(in srgb, var(--text) 4%, transparent), color-mix(in srgb, var(--text) 1%, transparent)), var(--surface);
  overflow-x: clip;
}

/* ---------- reveal on scroll (only once home.js runs) */
.js .hx [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .hx [data-reveal].in { opacity: 1; transform: none; filter: none; }

/* ---------- scroll progress (browsers with scroll-driven animations) */
.hx-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .hx-progress {
    display: block;
    position: fixed;
    inset: 0 0 auto;
    z-index: 70;
    height: 2px;
    background: var(--grad);
    transform-origin: 0 50%;
    animation: hx-progress linear both;
    animation-timeline: scroll(root);
  }
  [dir="rtl"] .hx-progress { transform-origin: 100% 50%; }
}
@keyframes hx-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- type */
.hx h2 {
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
}
:lang(ar) .hx h2, :lang(zh) .hx h2 { line-height: 1.25; letter-spacing: 0; }
.hx-head { max-width: 780px; margin-bottom: clamp(32px, 4.5vw, 56px); }
.hx-head p { margin-top: 16px; color: var(--text-2); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; }
.hx-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; max-width: none; }
.hx-head-row > div { max-width: 720px; }
.hx-sec { position: relative; padding-block: clamp(72px, 10vw, 140px); }

.ic { width: 1em; height: 1em; flex: none; fill: currentColor; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hx-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(24px, 4vw, 56px) 0 clamp(48px, 6vw, 88px);
}

.hx-sky {
  position: absolute;
  inset: calc(-1 * var(--header-h) - 24px) 0 -80px;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hx-sky .aur {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.hx-sky .a1 {
  width: min(70vw, 980px); aspect-ratio: 1;
  left: -18%; top: -36%;
  background: radial-gradient(closest-side, rgba(255, 91, 36, 0.42), rgba(255, 91, 36, 0));
  animation: hx-aur1 24s ease-in-out infinite alternate;
}
.hx-sky .a2 {
  width: min(62vw, 900px); aspect-ratio: 1;
  right: -16%; top: -30%;
  background: radial-gradient(closest-side, rgba(255, 61, 129, 0.30), rgba(255, 61, 129, 0));
  animation: hx-aur2 28s ease-in-out infinite alternate;
}
.hx-sky .a3 {
  width: min(56vw, 820px); aspect-ratio: 1;
  left: 34%; top: 18%;
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.26), rgba(124, 92, 255, 0));
  animation: hx-aur3 32s ease-in-out infinite alternate;
}
@keyframes hx-aur1 { to { transform: translate(12%, 10%) scale(1.12); } }
@keyframes hx-aur2 { to { transform: translate(-10%, 14%) scale(0.92); } }
@keyframes hx-aur3 { to { transform: translate(-14%, -8%) scale(1.15); } }

/* the studio floor: a perspective grid moving toward the viewer */
.hx-sky .floor {
  position: absolute;
  left: -40%;
  right: -40%;
  top: 52%;
  height: 70%;
  background-image:
    linear-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(520px) rotateX(64deg);
  transform-origin: 50% 0;
  -webkit-mask-image: radial-gradient(ellipse 50% 90% at 50% 0%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 50% 90% at 50% 0%, #000 10%, transparent 72%);
  animation: hx-floor 3.2s linear infinite;
}
@keyframes hx-floor { to { background-position: 0 72px, 0 0; } }

.hx-sky .grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="light"] .hx-sky .a1 { opacity: 0.55; }
[data-theme="light"] .hx-sky .a2, [data-theme="light"] .hx-sky .a3 { opacity: 0.45; }
[data-theme="light"] .hx-sky .grain { opacity: 0.04; }

.hx-hero-grid {
  display: grid;
  gap: clamp(32px, 4vw, 48px);
  align-items: center;
}
@media (min-width: 1040px) {
  .hx-hero-grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
}

.hx-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text-2);
  font: 500 13px/1.3 var(--font-body);
}
.hx-pill .dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tally);
}
.hx-pill .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: hx-ping 2s var(--ease-out) infinite;
}
@keyframes hx-ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(3.2); opacity: 0; } }

.hx-title {
  margin-top: 22px;
  font-size: clamp(46px, 7.2vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}
:lang(ar) .hx-title, :lang(zh) .hx-title { line-height: 1.2; letter-spacing: 0; }
:lang(de) .hx-title, :lang(eu) .hx-title, :lang(pl) .hx-title, :lang(fr) .hx-title { font-size: clamp(40px, 5.6vw, 80px); }
.hx-title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(12px);
  animation: hx-word 1.1s var(--ease-out) forwards;
  animation-delay: calc(0.1s + var(--i) * 0.08s);
}
.hx-title .hl {
  padding: 0 0.04em 0.1em;
  margin: 0 -0.04em -0.1em;
  background: linear-gradient(100deg, #FF7A3D 0%, #FF3D81 35%, #A78BFA 55%, #FF3D81 75%, #FF7A3D 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hx-word 1.1s var(--ease-out) forwards, hx-sheen 7s ease-in-out infinite;
  animation-delay: calc(0.1s + var(--i) * 0.08s), 1.6s;
}
@keyframes hx-word { to { opacity: 1; transform: none; filter: none; } }
@keyframes hx-sheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.hx-lede {
  max-width: 30em;
  margin-top: 24px;
  color: var(--text-2);
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
}
.hx-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }
.hx-cta .btn { min-height: 54px; }

.play-badge {
  display: inline-flex;
  flex: none;
  border-radius: 12px;
  transition: transform 0.25s var(--ease-out), filter 0.25s var(--ease-out);
}
.play-badge img { width: auto; height: 54px; }
.play-badge:hover { transform: translateY(-2px); filter: drop-shadow(0 10px 24px rgba(255, 91, 36, 0.35)); }
.play-badge:active { transform: none; }
.play-badge:focus-visible { outline-offset: 4px; border-radius: 12px; }

.hx-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
  font-size: 15px;
}
.hx-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hx-facts .ic { width: 18px; height: 18px; color: var(--tally-text); }

.hx-hero-stage { position: relative; }
@media (min-width: 1040px) { .hx-hero-stage { margin-inline-end: calc(-1 * clamp(0px, 4vw, 48px)); } }

/* ==========================================================================
   Stages: a fixed design size, zoomed to the width of .fit
   ========================================================================== */

.fit { position: relative; width: 100%; aspect-ratio: var(--dw) / var(--dh); }
.hx-hero-stage .fit { --dw: 640; --dh: 540; --z: 0.9; }
.hx-story-stage .fit { --dw: 760; --dh: 580; --z: 0.8; }
@media (max-width: 700px) {
  .hx-hero-stage .fit { --dw: 420; --dh: 560; --z: 0.86; }
  .hx-story-stage .fit { --dw: 420; --dh: 400; --z: 0.86; }
}

.stage {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--dw) * 1px);
  height: calc(var(--dh) * 1px);
  zoom: var(--z);
  color: #F5F3EE;
  font: 400 12px/1.35 var(--font-body);
  letter-spacing: 0;
  text-align: start;
  -webkit-user-select: none;
  user-select: none;
  perspective: 1600px;
}
.stage *, .stage *::before, .stage *::after { box-sizing: border-box; }
.stage img { display: block; max-width: none; }
.stage .ic { width: 16px; height: 16px; }
.stage b { font-weight: 600; }

/* paused while off screen (home.js) */
.scene.is-off, .scene.is-off *, .scene.is-off *::before, .scene.is-off *::after { animation-play-state: paused !important; }

/* ---------- the TV */
.stage .tv { position: absolute; left: 0; top: 24px; width: 560px; perspective: 1400px; }
.stage .tv-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #050507;
  box-shadow:
    0 0 0 7px #0A0B0E,
    0 0 0 8px rgba(255, 255, 255, 0.10),
    0 50px 90px -30px rgba(0, 0, 0, 0.85);
  transform: rotateY(var(--ty, -6deg)) rotateX(var(--tx, 1deg));
  transform-origin: 70% 50%;
  transition: transform 0.8s var(--ease-out);
}
/* ambilight: the picture's own colours glow around the set */
.stage .tv-amb { position: absolute; inset: 6% -4% -2%; z-index: -1; opacity: 0.6; filter: blur(42px) saturate(1.6); transform: rotateY(var(--ty, -6deg)); }
.stage .tv-amb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.stage .tv-amb .c1 { opacity: 1; }
.hs .tv-amb .c1 { animation: hx-ch1 12s infinite; }
.hs .tv-amb .c2 { animation: hx-ch2 12s infinite; }
.hs .tv-amb .c3 { animation: hx-ch3 12s infinite; }
.stage .tv-foot {
  position: absolute;
  left: 18%;
  right: 18%;
  top: calc(100% + 16px);
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 110, 70, 0.35), transparent);
  filter: blur(6px);
}
.stage .tv-sheen {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 38%);
  pointer-events: none;
}
.stage .tv-ch, .stage .mv { position: absolute; inset: 0; margin: 0; }
.stage .tv-pic { width: 100%; height: 100%; object-fit: cover; }
.stage .tv-ch .tv-pic { animation: hx-kb 14s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes hx-kb { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1%, 1%); } }

.stage .tv-bug { position: absolute; top: 14px; left: 14px; opacity: 0.92; }
.stage .tv-bug .pl { width: 44px; height: 28px; border-radius: 6px; }
.stage .tv-banner {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(14, 15, 20, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.stage .tv-banner .pl { width: 48px; height: 32px; }
.stage .tb-t { display: grid; flex: 1; gap: 2px; min-width: 0; }
.stage .tb-t b { font-size: 14px; }
.stage .tb-t > span:not(.bar) { overflow: hidden; color: rgba(245, 243, 238, 0.72); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.stage .tb-t .bar { margin-top: 5px; }
.stage .live {
  padding: 4px 8px;
  border-radius: 6px;
  background: #FF3B30;
  color: #fff;
  font: 700 10px/1 var(--font-body);
  letter-spacing: 0.06em;
}
:lang(ar) .stage .live { letter-spacing: 0; }
.stage .tv-zap {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.10) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 220, 200, 0.6));
  mix-blend-mode: screen;
  pointer-events: none;
}

/* channel tiles */
.stage .pl {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 26px;
  overflow: hidden;
  border-radius: 6px;
  background: #1B1D24;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.stage .pl img { width: 84%; height: 76%; object-fit: contain; }
.stage .pl-light { background: #F4F4F6; }
.stage .pl-cover img { width: 100%; height: 100%; object-fit: cover; }

.stage .bar { display: block; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, 0.16); }
.stage .bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FF7A3D, #FF3D81); }

/* ---------- the phone */
.stage .ph {
  position: absolute;
  left: 450px;
  top: 150px;
  width: 182px;
  height: 376px;
  padding: 6px;
  border-radius: 32px;
  background: linear-gradient(150deg, #34373F 0%, #101115 30%, #08090B 70%, #2A2C33 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 0 1px #000,
    0 40px 70px -18px rgba(0, 0, 0, 0.85),
    -24px 30px 80px -30px rgba(255, 61, 129, 0.35);
  transform: rotateY(var(--py2, 6deg)) rotate(-3deg);
  transition: transform 0.8s var(--ease-out);
  animation: hx-bob 7s ease-in-out infinite alternate;
}
@keyframes hx-bob { to { translate: 0 -10px; } }
.stage .ph-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 26px;
  background: #0C0D11;
  padding: 26px 10px 10px;
}
.stage .ph-screen::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 3;
  width: 52px;
  height: 14px;
  margin-left: -26px;
  border-radius: 10px;
  background: #000;
}
.stage .ph-status {
  position: absolute;
  inset: 8px 16px auto;
  display: flex;
  justify-content: space-between;
  color: rgba(245, 243, 238, 0.85);
  font: 600 9px/14px var(--font-body);
}
.stage .ph-sys { display: inline-flex; align-items: center; gap: 4px; }
.stage .ph-sys .ic { width: 11px; height: 11px; }
.stage .batt { display: inline-block; width: 15px; height: 7px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(245, 243, 238, 0.7); background: linear-gradient(90deg, rgba(245, 243, 238, 0.85) 70%, transparent 70%) 1.5px 1.5px / 11px 4px no-repeat; }
.stage .ph-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 6px 2px 8px; }
.stage .ph-head b { overflow: hidden; font: 700 14px/1.2 var(--font-display); letter-spacing: -0.01em; white-space: nowrap; text-overflow: ellipsis; }
:lang(ar) .stage .ph-head b, :lang(zh) .stage .ph-head b { font-family: var(--font-body); }
.stage .chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  max-width: 50%;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 91, 36, 0.14);
  color: #FF9A6E;
  font-size: 8.5px;
  font-weight: 600;
  white-space: nowrap;
}
.stage .chip .ic { width: 11px; height: 11px; }
.stage .ph-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(245, 243, 238, 0.6);
  font-size: 9.5px;
  white-space: nowrap;
}
.stage .ph-search > span { overflow: hidden; text-overflow: ellipsis; }
.stage .ph-search .ic { width: 14px; height: 14px; }
.stage .ph-list { display: grid; gap: 2px; margin: 8px 0 0; padding: 0; list-style: none; }
.stage .r {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 6px;
  border-radius: 12px;
}
.stage .r::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 91, 36, 0.20), rgba(255, 61, 129, 0.10));
  box-shadow: inset 0 0 0 1px rgba(255, 122, 61, 0.35);
  opacity: 0;
}
.stage .r .pl { position: relative; width: 38px; height: 26px; }
.stage .r-t { position: relative; display: grid; flex: 1; gap: 1px; min-width: 0; }
.stage .r-t b { font-size: 10.5px; }
.stage .r-t > span:not(.bar) { overflow: hidden; color: rgba(245, 243, 238, 0.55); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.stage .r-t .bar { height: 2px; margin-top: 3px; }
.stage .tap {
  position: absolute;
  z-index: 4;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 18%, rgba(255, 255, 255, 0.25) 19% 60%, transparent 61%);
  opacity: 0;
  pointer-events: none;
}
.stage .ph-now {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 16px;
  background: rgba(34, 36, 44, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
}
.stage .ph-now-t { display: grid; flex: 1; min-width: 0; }
.stage .ph-now-t small { overflow: hidden; color: #FF9A6E; font-size: 8px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.stage .ph-now-n { position: relative; height: 15px; }
.stage .ph-now-n b { position: absolute; inset: 0; font-size: 11px; opacity: 0; }
.stage .ph-now-n .n1 { opacity: 1; }
.stage .ph-now-b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #F5F3EE; color: #0C0D11; }
.stage .ph-now-b .ic { width: 15px; height: 15px; }

/* ---------- the beam from the phone to the TV */
.stage .beam { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.stage .beam path { fill: none; stroke-linecap: round; }
.stage .beam-track { stroke: rgba(255, 255, 255, 0.10); stroke-width: 1.5; stroke-dasharray: 2 6; }
.stage .beam-pulse { stroke-width: 3.5; stroke-dasharray: 22 100; stroke-dashoffset: 22; opacity: 0; filter: drop-shadow(0 0 6px rgba(255, 91, 36, 0.9)); }

/* ==========================================================================
   Hero scene: a 12 s loop. La 1 plays; the phone taps DW (1.2 s), the beam
   reaches the TV and it zaps (2 s); then Euronews (5.2 s / 6 s); then La 1
   again (9.2 s / 10 s).
   ========================================================================== */

.hs .ph-list .r1::before { opacity: 1; }
.hs .tv-ch { opacity: 0; }
.hs .tv-ch.c1 { opacity: 1; }
.hs .tv-ch.c1 { animation: hx-ch1 12s infinite; }
.hs .tv-ch.c2 { animation: hx-ch2 12s infinite; }
.hs .tv-ch.c3 { animation: hx-ch3 12s infinite; }
.hs .tv-zap { animation: hx-zap 12s infinite; }
.hs .r1::before { animation: hx-cur1 12s infinite; }
.hs .r3::before { animation: hx-cur3 12s infinite; }
.hs .r4::before { animation: hx-cur4 12s infinite; }
.hs .ph-now-n .n1 { animation: hx-ch1 12s infinite; }
.hs .ph-now-n .n2 { animation: hx-ch2 12s infinite; }
.hs .ph-now-n .n3 { animation: hx-ch3 12s infinite; }
.hs .beam-pulse { animation: hx-beam 12s infinite; }
/* rows are 42 px + 2 px gap from y = 100 in the phone screen */
.hs .t1 { left: 70px; top: 121px; animation: hx-tap1 12s infinite; }
.hs .t3 { left: 92px; top: 209px; animation: hx-tap3 12s infinite; }
.hs .t4 { left: 80px; top: 253px; animation: hx-tap4 12s infinite; }
.hs .tv-banner { animation: hx-banner 12s infinite; }

@keyframes hx-ch1 { 0%, 16.6% { opacity: 1; } 16.7%, 83.2% { opacity: 0; } 83.3%, 100% { opacity: 1; } }
@keyframes hx-ch2 { 0%, 16.6% { opacity: 0; } 16.7%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes hx-ch3 { 0%, 49.9% { opacity: 0; } 50%, 83.2% { opacity: 1; } 83.3%, 100% { opacity: 0; } }
@keyframes hx-zap {
  0%, 16.5% { opacity: 0; } 16.7% { opacity: 0.9; } 18.5% { opacity: 0; }
  49.8% { opacity: 0; } 50% { opacity: 0.9; } 51.8% { opacity: 0; }
  83.1% { opacity: 0; } 83.3% { opacity: 0.9; } 85.1%, 100% { opacity: 0; }
}
@keyframes hx-banner {
  0%, 2% { transform: none; opacity: 1; }
  16.7% { transform: translateY(16px); opacity: 0; } 19%, 49.8% { transform: none; opacity: 1; }
  50% { transform: translateY(16px); opacity: 0; } 52.3%, 83.2% { transform: none; opacity: 1; }
  83.3% { transform: translateY(16px); opacity: 0; } 85.6%, 100% { transform: none; opacity: 1; }
}
@keyframes hx-cur1 { 0%, 10% { opacity: 1; } 11%, 76.5% { opacity: 0; } 77.5%, 100% { opacity: 1; } }
@keyframes hx-cur3 { 0%, 10% { opacity: 0; } 11%, 43.5% { opacity: 1; } 44.5%, 100% { opacity: 0; } }
@keyframes hx-cur4 { 0%, 43.5% { opacity: 0; } 44.5%, 76.5% { opacity: 1; } 77.5%, 100% { opacity: 0; } }
@keyframes hx-tap3 { 0%, 9.5% { opacity: 0; transform: scale(0.3); } 10.2% { opacity: 1; transform: scale(0.6); } 14% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; } }
@keyframes hx-tap4 { 0%, 42.8% { opacity: 0; transform: scale(0.3); } 43.5% { opacity: 1; transform: scale(0.6); } 47.3% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; } }
@keyframes hx-tap1 { 0%, 76.1% { opacity: 0; transform: scale(0.3); } 76.8% { opacity: 1; transform: scale(0.6); } 80.6% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; } }
@keyframes hx-beam {
  0%, 10.9% { opacity: 0; stroke-dashoffset: 22; } 11% { opacity: 1; stroke-dashoffset: 22; } 16.6% { opacity: 1; stroke-dashoffset: -100; } 16.7% { opacity: 0; stroke-dashoffset: -100; }
  44.1% { opacity: 0; stroke-dashoffset: 22; } 44.2% { opacity: 1; stroke-dashoffset: 22; } 49.9% { opacity: 1; stroke-dashoffset: -100; } 50% { opacity: 0; stroke-dashoffset: -100; }
  77.4% { opacity: 0; stroke-dashoffset: 22; } 77.5% { opacity: 1; stroke-dashoffset: 22; } 83.2% { opacity: 1; stroke-dashoffset: -100; } 83.3%, 100% { opacity: 0; stroke-dashoffset: -100; }
}

/* phones: the TV on top, the phone larger in front */
@media (max-width: 700px) {
  .hs .tv { width: 420px; top: 0; }
  .hs .ph { left: 117px; top: 214px; width: 186px; height: 340px; }
  .hs .beam { display: none; }
}

/* ==========================================================================
   Marquee
   ========================================================================== */

.hx-mq {
  position: relative;
  direction: ltr;
  overflow: hidden;
  padding-block: 22px;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.mq-track {
  display: flex;
  gap: 12px;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: hx-mq 46s linear infinite;
}
.hx-mq:hover .mq-track { animation-play-state: paused; }
.mq-track li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.mq-track .ic { width: 18px; height: 18px; color: var(--tally-text); }
@keyframes hx-mq { to { transform: translateX(-50%); } }

/* ==========================================================================
   Story: four chapters on one sticky stage
   ========================================================================== */

.hx-story { position: relative; padding-block: clamp(40px, 6vw, 80px); }
.hx-story-grid { display: grid; }
.hx-steps { display: grid; }
.hx-step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92vh;
  padding-block: 40px;
  transition: opacity 0.5s var(--ease-out);
}
.hx-step-n {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text-2);
  font: 600 13px/1 var(--font-mono);
  letter-spacing: 0.06em;
}
.hx-step-n .ic {
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
}
.hx-step h2 { max-width: 12em; }
.hx-step-s { max-width: 30em; margin-top: 18px; color: var(--text-2); font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; }
.hx-step-note { display: flex; gap: 8px; max-width: 34em; margin-top: 14px; color: var(--text-3); font-size: 15px; }
.hx-step-note::before { content: ""; flex: none; width: 3px; border-radius: 3px; background: var(--grad); }
.js .hx-step:not([aria-current]) { opacity: 0.22; }

.hx-story-stage { position: relative; }

@media (min-width: 1040px) {
  .hx-story-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; }
  .hx-story-stage .fit { position: sticky; top: max(calc(var(--header-h) + 24px), calc(50vh - (min(100vw, 1264px) - 112px) * 0.229)); }
}
@media (max-width: 1039px) {
  .hx-story-stage {
    order: -1;
    position: sticky;
    top: calc(var(--header-h) + 8px);
    z-index: 2;
    padding-bottom: 18px;
    background: linear-gradient(var(--bg) 82%, transparent);
  }
  .hx-story-stage .fit { max-width: 640px; margin-inline: auto; }
  .hx-step { min-height: 62vh; justify-content: flex-start; padding-top: 8px; }
  .hx-step:last-child { min-height: 48vh; }
  .hx-step h2 { font-size: clamp(32px, 8.4vw, 44px); }
  .hx-step-s { margin-top: 12px; font-size: 17px; }
}

/* chapter layers */
.st .L, .st .P {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  transition: opacity 0.55s var(--ease-out), transform 0.7s var(--ease-out), visibility 0s linear 0.55s;
}
.st .P { inset: 26px 10px 10px; transform: translateY(10px); }
.st[data-ch="pair"] :is(.L-pair, .L-grid, .P-pair),
.st[data-ch="remote"] :is(.L-play, .P-remote),
.st[data-ch="guide"] :is(.L-guide, .P-guide),
.st[data-ch="two"] :is(.L-two, .P-two) {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.st[data-ch="pair"] .L-grid { opacity: 0; }

.st .tv { width: 680px; top: 12px; }
.st .ph { left: 548px; top: 162px; width: 196px; height: 404px; }
.st .tv-screen { --ty: -5deg; }

/* --- pair (8 s): the phone types the TV code and sends a playlist */
.st .L-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
  padding: 0 172px 0 48px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 91, 36, 0.20), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(124, 92, 255, 0.18), transparent 60%),
    #0B0C10;
}
.st .tp-copy { display: grid; gap: 8px; }
.st .tp-h { font: 800 30px/1.05 var(--font-display); letter-spacing: -0.02em; }
:lang(ar) .st .tp-h, :lang(zh) .st .tp-h { font-family: var(--font-body); letter-spacing: 0; }
.st .tp-s { max-width: 30em; color: rgba(245, 243, 238, 0.62); font-size: 12px; }
.st .tp-hint { margin-top: 10px; color: rgba(245, 243, 238, 0.75); font-size: 12px; }
.st .tp-code { font: 700 46px/1 var(--font-mono); letter-spacing: 0.06em; background: linear-gradient(100deg, #FFD3BF, #FF7A3D 40%, #FF3D81); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st .tp-wait { position: relative; display: flex; align-items: center; gap: 8px; height: 18px; margin-top: 6px; color: rgba(245, 243, 238, 0.7); font-size: 12px; }
.st .tp-wait .w2 { position: absolute; left: 24px; opacity: 0; }
[dir="rtl"] .st .tp-wait .w2 { left: auto; right: 24px; }
.st .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.18); border-top-color: #FF7A3D; animation: hx-spin 0.9s linear infinite; }
@keyframes hx-spin { to { transform: rotate(1turn); } }
.st .tp-qr { display: grid; justify-items: center; gap: 10px; }
.st .tp-qr img { width: 150px; height: 150px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06), 0 20px 40px -10px rgba(0, 0, 0, 0.6); }
.st .tp-qr small { color: rgba(245, 243, 238, 0.6); font-size: 11px; }

.st .L-grid {
  padding: 34px 40px;
  background: radial-gradient(100% 80% at 50% 0%, rgba(255, 91, 36, 0.14), transparent 60%), #0B0C10;
}
.st .gr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.st .g {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.st .g .pl { width: 92px; height: 54px; border-radius: 10px; }
.st .g b { font-size: 12px; }
.st .g1 { box-shadow: inset 0 0 0 2px #FF7A3D, 0 10px 30px -10px rgba(255, 91, 36, 0.6); transform: scale(1.04); }
.st .toast {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(30, 32, 40, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transform: translateX(-50%);
}
.st .toast .ic { color: #3DDC97; }

.st .P-pair { display: flex; flex-direction: column; gap: 6px; }
.st .P .ph-head { margin: 4px 2px 0; }
.st .ph-sub { color: rgba(245, 243, 238, 0.55); font-size: 9px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.st .ph-label { margin-top: 4px; color: rgba(245, 243, 238, 0.7); font-size: 9px; font-weight: 600; }
.st .digits { display: flex; align-items: center; gap: 4px; }
.st .digits .d {
  display: grid;
  place-items: center;
  width: 22px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  font: 700 14px/1 var(--font-mono);
  font-style: normal;
}
.st .digits .dash { color: rgba(245, 243, 238, 0.4); font: 700 14px/1 var(--font-mono); }
.st .digits .caret { display: none; }
.st .ph-pl {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}
.st .ph-pl > .ic { width: 22px; height: 22px; padding: 3px; border-radius: 7px; background: rgba(255, 91, 36, 0.18); color: #FF9A6E; }
.st .ph-pl span { display: grid; flex: 1; min-width: 0; }
.st .ph-pl b { font-size: 10.5px; }
.st .ph-pl small { color: rgba(245, 243, 238, 0.55); font-size: 8.5px; }
.st .ph-pl .ok { width: 16px; height: 16px; padding: 0; background: none; color: #FF7A3D; }
.st .ph-btn, .st .ph-sent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  margin-top: auto;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.st .ph-btn { background: linear-gradient(100deg, #FF7A3D, #FF3D81); color: #fff; }
.st .ph-sent { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(61, 220, 151, 0.16); color: #7CF0BE; opacity: 0; }
.st .ph-btn .ic, .st .ph-sent .ic { width: 14px; height: 14px; }
.st .P-pair .tb { left: 82px; top: 339px; }

.st[data-ch="pair"] .d1 { animation: hx-d1 8s infinite; }
.st[data-ch="pair"] .d2 { animation: hx-d2 8s infinite; }
.st[data-ch="pair"] .d3, .st[data-ch="pair"] .dash { animation: hx-d3 8s infinite; }
.st[data-ch="pair"] .d5 { animation: hx-d5 8s infinite; }
.st[data-ch="pair"] .d6 { animation: hx-d6 8s infinite; }
.st[data-ch="pair"] .d7 { animation: hx-d7 8s infinite; }
.st[data-ch="pair"] .ph-btn { animation: hx-press 8s infinite; }
.st[data-ch="pair"] .P-pair .tb { animation: hx-tapb 8s infinite; }
.st[data-ch="pair"] .ph-sent { animation: hx-sent 8s infinite; }
.st[data-ch="pair"] .beam-pulse { animation: hx-beam-pair 8s infinite; }
.st[data-ch="pair"] .tp-wait .w1 { animation: hx-w1 8s infinite; }
.st[data-ch="pair"] .tp-wait .w2 { animation: hx-w2 8s infinite; }
.st[data-ch="pair"] .L-pair { animation: hx-lpair 8s infinite; }
.st[data-ch="pair"] .L-grid { animation: hx-lgrid 8s infinite; }
.st[data-ch="pair"] .g { animation: hx-gpop 8s infinite; }
.st[data-ch="pair"] .g2 { animation-delay: 0.05s; }
.st[data-ch="pair"] .g3 { animation-delay: 0.1s; }
.st[data-ch="pair"] .g4 { animation-delay: 0.15s; }
.st[data-ch="pair"] .g5 { animation-delay: 0.2s; }
.st[data-ch="pair"] .g6 { animation-delay: 0.25s; }
.st[data-ch="pair"] .g7 { animation-delay: 0.3s; }
.st[data-ch="pair"] .g8 { animation-delay: 0.35s; }
.st[data-ch="pair"] .toast { animation: hx-toast 8s infinite; }

@keyframes hx-d1 { 0%, 7% { opacity: 0; transform: translateY(5px); } 9%, 92% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes hx-d2 { 0%, 13% { opacity: 0; transform: translateY(5px); } 15%, 92% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes hx-d3 { 0%, 19% { opacity: 0; transform: translateY(5px); } 21%, 92% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes hx-d5 { 0%, 26% { opacity: 0; transform: translateY(5px); } 28%, 92% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes hx-d6 { 0%, 32% { opacity: 0; transform: translateY(5px); } 34%, 92% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes hx-d7 { 0%, 38% { opacity: 0; transform: translateY(5px); } 40%, 92% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes hx-press { 0%, 45% { transform: none; filter: none; } 47% { transform: scale(0.95); filter: brightness(1.25); } 50%, 56% { transform: none; filter: none; opacity: 1; } 58%, 92% { opacity: 0; } 95%, 100% { opacity: 1; } }
@keyframes hx-tapb { 0%, 45% { opacity: 0; transform: scale(0.3); } 46% { opacity: 1; transform: scale(0.6); } 51% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; } }
@keyframes hx-sent { 0%, 56% { opacity: 0; transform: translateY(6px); } 59%, 92% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@keyframes hx-beam-pair { 0%, 47.9% { opacity: 0; stroke-dashoffset: 22; } 48% { opacity: 1; stroke-dashoffset: 22; } 55.9% { opacity: 1; stroke-dashoffset: -100; } 56%, 100% { opacity: 0; stroke-dashoffset: -100; } }
@keyframes hx-w1 { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes hx-w2 { 0%, 55% { opacity: 0; } 56%, 100% { opacity: 1; } }
@keyframes hx-lpair { 0%, 65% { opacity: 1; } 68%, 95% { opacity: 0; } 98%, 100% { opacity: 1; } }
@keyframes hx-lgrid { 0%, 65% { opacity: 0; } 68%, 95% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes hx-gpop { 0%, 66% { opacity: 0; transform: translateY(10px) scale(0.94); } 72%, 100% { opacity: 1; transform: none; } }
@keyframes hx-toast { 0%, 71% { opacity: 0; transform: translate(-50%, 12px); } 74%, 92% { opacity: 1; transform: translate(-50%, 0); } 95%, 100% { opacity: 0; transform: translate(-50%, 0); } }

/* --- remote (7 s): search, filter, tap, the TV zaps */
.st .P-remote .ph-search .typed {
  display: inline-block;
  width: 0;
  overflow: hidden;
  color: #F5F3EE;
  font: 600 10px/1 var(--font-mono);
  white-space: nowrap;
}
.st .P-remote .ph-search .caret { width: 1px; height: 12px; background: #FF7A3D; }
.st .P-remote .ph-ph { position: absolute; left: 30px; right: 10px; }
[dir="rtl"] .st .P-remote .ph-ph { left: 10px; right: 30px; }
.st .P-remote .typed { width: 4.2ch; }
.st .P-remote .ph-ph { opacity: 0; }
.st .P-remote .q-eun::before { opacity: 1; }
.st .P-remote .r:not(.q-eun) { display: none; }
.st .L-play .p1 { opacity: 0; }
.st .P-remote .ph-now-n .n1 { opacity: 0; }
.st .P-remote .ph-now-n .n2 { opacity: 1; }
.st .L-play .tv-zap { animation: none; }

.st[data-ch="remote"] .P-remote .r:not(.q-eun) { display: flex; max-height: 0; opacity: 0; overflow: hidden; animation: hx-collapse 7s infinite; }
.st[data-ch="remote"] .P-remote .typed { animation: hx-type 7s steps(4, end) infinite; }
.st[data-ch="remote"] .P-remote .ph-ph { animation: hx-ph 7s infinite; }
.st[data-ch="remote"] .P-remote .q-eun::before { animation: hx-cur-eun 7s infinite; }
.st[data-ch="remote"] .P-remote .tq { left: 80px; top: 88px; animation: hx-tapq 7s infinite; }
.st[data-ch="remote"] .beam-pulse { animation: hx-beam-rem 7s infinite; }
.st[data-ch="remote"] .L-play .p1 { animation: hx-p1 7s infinite; }
.st[data-ch="remote"] .L-play .p2 { animation: hx-p2 7s infinite; }
.st[data-ch="remote"] .L-play .tv-zap { animation: hx-zap-rem 7s infinite; }
.st[data-ch="remote"] .P-remote .ph-now-n .n1 { animation: hx-p1 7s infinite; }
.st[data-ch="remote"] .P-remote .ph-now-n .n2 { animation: hx-p2 7s infinite; }

@keyframes hx-type { 0%, 10% { width: 0; } 30%, 92% { width: 4.2ch; } 96%, 100% { width: 0; } }
@keyframes hx-ph { 0%, 9% { opacity: 1; } 10%, 95% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes hx-collapse {
  0%, 32% { max-height: 42px; opacity: 1; margin-block: 0; }
  40%, 92% { max-height: 0; opacity: 0; margin-block: -1px; }
  98%, 100% { max-height: 42px; opacity: 1; }
}
@keyframes hx-cur-eun { 0%, 46% { opacity: 0; } 48%, 94% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes hx-tapq { 0%, 45% { opacity: 0; transform: scale(0.3); } 46% { opacity: 1; transform: scale(0.6); } 51% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; } }
@keyframes hx-beam-rem { 0%, 47.9% { opacity: 0; stroke-dashoffset: 22; } 48% { opacity: 1; stroke-dashoffset: 22; } 55.9% { opacity: 1; stroke-dashoffset: -100; } 56%, 100% { opacity: 0; stroke-dashoffset: -100; } }
@keyframes hx-p1 { 0%, 55.9% { opacity: 1; } 56%, 99.4% { opacity: 0; } 99.5%, 100% { opacity: 1; } }
@keyframes hx-p2 { 0%, 55.9% { opacity: 0; } 56%, 99.4% { opacity: 1; } 99.5%, 100% { opacity: 0; } }
@keyframes hx-zap-rem { 0%, 55.8% { opacity: 0; } 56% { opacity: 0.9; } 58.5% { opacity: 0; } 99.3% { opacity: 0; } 99.5% { opacity: 0.7; } 100% { opacity: 0; } }

/* --- guide (8 s): the focus walks the grid, the now line breathes */
.st .L-guide {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 18px 20px 0;
  background: linear-gradient(#0D0E13, #0A0B0E);
}
.st .eg-hero { display: flex; align-items: center; gap: 14px; }
.st .eg-pic { width: 150px; height: 84px; border-radius: 10px; object-fit: cover; }
.st .eg-t { display: grid; flex: 1; gap: 3px; }
.st .eg-t small { color: #FF9A6E; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; }
:lang(ar) .st .eg-t small { letter-spacing: 0; }
.st .eg-t b { font: 800 22px/1.1 var(--font-display); letter-spacing: -0.01em; }
.st .eg-t span { color: rgba(245, 243, 238, 0.6); font: 500 11px/1 var(--font-mono); }
.st .eg-bell { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 91, 36, 0.16); color: #FF9A6E; }
.st .eg-bell .ic { width: 18px; height: 18px; transform-origin: 50% 10%; }
.st .eg { position: relative; overflow: hidden; }
.st .eg-ruler { position: relative; height: 22px; color: rgba(245, 243, 238, 0.45); font: 500 10px/22px var(--font-mono); }
.st .eg-ruler span { position: absolute; top: 0; }
.st .eg-row { display: flex; align-items: center; gap: 8px; height: 34px; margin-bottom: 4px; }
.st .eg-row .pl { width: 48px; height: 30px; border-radius: 7px; }
.st .eg-track { position: relative; flex: 1; height: 100%; }
.st .pg {
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  align-content: center;
  overflow: hidden;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.st .pg b { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; }
.st .pg small { color: rgba(245, 243, 238, 0.45); font: 500 8.5px/1.2 var(--font-mono); }
.st .pg.on { background: linear-gradient(90deg, rgba(255, 91, 36, 0.22), rgba(255, 61, 129, 0.14)); }
.st .eg-now { position: absolute; top: 18px; bottom: 0; width: 2px; margin-left: -1px; background: #FF3D81; box-shadow: 0 0 12px #FF3D81; }
.st .eg-now::before { content: ""; position: absolute; top: -2px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #FF3D81; }
.st .eg-focus {
  position: absolute;
  left: var(--x1);
  top: var(--y1);
  width: var(--w1);
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 0 0 2px #FF7A3D, 0 0 24px rgba(255, 91, 36, 0.5);
  pointer-events: none;
}
.st[data-ch="guide"] .eg-focus { animation: hx-focus 8s var(--ease-out) infinite; }
.st[data-ch="guide"] .eg-now { animation: hx-breathe 2.4s ease-in-out infinite; }
.st[data-ch="guide"] .eg-bell .ic { animation: hx-ring 8s ease-in-out infinite; }
@keyframes hx-focus {
  0%, 20% { left: var(--x1); top: var(--y1); width: var(--w1); }
  25%, 45% { left: var(--x2); top: var(--y2); width: var(--w2); }
  50%, 70% { left: var(--x3); top: var(--y3); width: var(--w3); }
  75%, 95% { left: var(--x4); top: var(--y4); width: var(--w4); }
  100% { left: var(--x1); top: var(--y1); width: var(--w1); }
}
@keyframes hx-breathe { 50% { opacity: 0.55; } }
@keyframes hx-ring { 0%, 8%, 100% { transform: none; } 2% { transform: rotate(14deg); } 4% { transform: rotate(-12deg); } 6% { transform: rotate(8deg); } }

.st .P-guide .ph-head .ic { width: 16px; height: 16px; opacity: 0.7; }
.st .days { display: flex; gap: 6px; margin-top: 4px; }
.st .days span { padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: rgba(245, 243, 238, 0.7); font-size: 9px; font-weight: 600; }
.st .days .on { background: #F5F3EE; color: #0C0D11; }
.st .P-guide .r { height: 52px; align-items: flex-start; padding-top: 8px; }
.st .P-guide .r-t > span:not(.bar) { margin-top: 2px; }

/* --- two at once (6 s): the sound moves from one picture to the other */
.st .L-two {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: radial-gradient(80% 60% at 50% 50%, #15161C, #07080A);
}
.st .L-two .mv { position: relative; flex: 1; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; }
.st .mv-a {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(14, 15, 20, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  opacity: 0;
}
.st .mv::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px #FF7A3D;
  opacity: 0;
}
.st .mv1 .mv-a, .st .mv1::after { opacity: 1; }
.st .P-two { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.st .P-two .mv { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; }
.st .P-two .mv-a { width: 22px; height: 22px; right: 6px; bottom: 6px; }
.st .P-two .mv-a .ic { width: 12px; height: 12px; }
.st .P-two .tv-bug { top: 6px; left: 6px; }
.st .P-two .tv-bug .pl { width: 30px; height: 20px; }
.st .P-two .tt { left: 90px; top: 150px; }

.st[data-ch="two"] .mv1 .mv-a, .st[data-ch="two"] .mv1::after { animation: hx-aud1 6s infinite; }
.st[data-ch="two"] .mv2 .mv-a, .st[data-ch="two"] .mv2::after { animation: hx-aud2 6s infinite; }
.st[data-ch="two"] .P-two .tt { animation: hx-tapt 6s infinite; }
@keyframes hx-aud1 { 0%, 46% { opacity: 1; } 49%, 96% { opacity: 0; } 99%, 100% { opacity: 1; } }
@keyframes hx-aud2 { 0%, 46% { opacity: 0; } 49%, 96% { opacity: 1; } 99%, 100% { opacity: 0; } }
@keyframes hx-tapt {
  0%, 43% { opacity: 0; transform: scale(0.3); top: 150px; } 44% { opacity: 1; transform: scale(0.6); top: 150px; } 49% { opacity: 0; transform: scale(1.5); top: 150px; }
  49.1%, 93% { opacity: 0; transform: scale(0.3); top: 60px; } 94% { opacity: 1; transform: scale(0.6); top: 60px; } 99%, 100% { opacity: 0; transform: scale(1.5); top: 60px; }
}

@media (max-width: 700px) {
  .st .tv { width: 420px; top: 0; }
  .st .ph { left: 250px; top: 92px; width: 162px; height: 304px; border-radius: 28px; }
  .st .ph-screen { border-radius: 22px; }
  .st .beam { display: none; }
  .st .L-pair { display: block; padding: 22px 24px; }
  .st .tp-copy { max-width: 220px; gap: 4px; }
  .st .tp-qr { position: absolute; top: 18px; right: 22px; }
  .st .tp-h { font-size: 20px; }
  .st .tp-s { display: none; }
  .st .tp-hint { margin-top: 2px; font-size: 10px; }
  .st .tp-code { font-size: 30px; }
  .st .tp-qr img { width: 70px; height: 70px; padding: 6px; border-radius: 10px; }
  .st .tp-qr small { display: none; }
  .st .L-grid { padding: 18px; }
  .st .gr { gap: 8px; }
  .st .g { padding: 10px 4px 8px; gap: 4px; }
  .st .g .pl { width: 60px; height: 36px; }
  .st .g b { font-size: 9px; }
  .st .toast { bottom: 10px; padding: 7px 12px; font-size: 10px; }
  .st .L-guide { padding: 10px 10px 0; gap: 8px; }
  .st .eg-hero { display: none; }
  .st .eg { zoom: 0.62; }
}

/* ==========================================================================
   Cards (bring, rest, tools)
   ========================================================================== */

.hx-cards { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .hx-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  background: var(--card-bg);
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent) inset;
}
.card h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
:lang(ar) .card h3, :lang(zh) .card h3 { font-family: var(--font-body); letter-spacing: 0; }
.card p { margin-top: 8px; color: var(--text-2); font-size: 16px; line-height: 1.5; }
.card .h-ic { width: 22px; height: 22px; color: var(--tally-text); }

/* spotlight that follows the pointer (home.js sets --mx/--my) */
.spot::before, .spot::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  pointer-events: none;
}
.spot::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--text) 7%, transparent), transparent 45%); }
.spot::after {
  z-index: 1;
  padding: 1px;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 122, 61, 0.9), rgba(255, 61, 129, 0.5) 30%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* --- bring your playlist */
.hx-bring .card { display: flex; flex-direction: column; padding: 14px 14px 26px; }
.hx-bring .card h3, .hx-bring .card p { padding-inline: 14px; }
.hx-bring .card h3 { margin-top: 22px; }
.bv {
  position: relative;
  display: grid;
  align-content: center;
  gap: 10px;
  height: 200px;
  padding: 20px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 91, 36, 0.16), transparent 60%),
    radial-gradient(100% 80% at 100% 100%, rgba(124, 92, 255, 0.14), transparent 60%),
    #0C0D11;
  color: #F5F3EE;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.bv .field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  color: rgba(245, 243, 238, 0.6);
}
.bv .field .ic { width: 18px; height: 18px; }
.bv .typed {
  display: inline-block;
  overflow: hidden;
  color: #F5F3EE;
  font: 500 13px/1 var(--font-mono);
  white-space: nowrap;
}
.bv .caret { width: 2px; height: 16px; margin-left: -6px; background: #FF7A3D; animation: hx-blink 1s steps(1) infinite; }
@keyframes hx-blink { 50% { opacity: 0; } }
.bv .pill-ok {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(61, 220, 151, 0.14);
  color: #7CF0BE;
  font-size: 13px;
  font-weight: 600;
}
.bv .pill-ok .ic { width: 16px; height: 16px; }
.bring-link .typed { animation: hx-type-url 7s steps(33, end) infinite; }
.bring-link .pill-ok { animation: hx-ok 7s var(--ease-out) infinite; }
@keyframes hx-type-url { 0%, 6% { width: 0; } 50%, 94% { width: 33ch; } 100% { width: 0; } }
@keyframes hx-ok { 0%, 52% { opacity: 0; transform: translateY(8px) scale(0.96); } 57%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }

.bring-xtream .f1 .typed { animation: hx-type-x1 7s steps(23, end) infinite; }
.bring-xtream .f2 .typed { animation: hx-type-x2 7s steps(4, end) infinite; }
.bring-xtream .f3 .typed { animation: hx-type-x3 7s steps(8, end) infinite; }
.bring-xtream .field { transition: box-shadow 0.3s; }
.bring-xtream .f1 { animation: hx-fx1 7s infinite; }
.bring-xtream .f2 { animation: hx-fx2 7s infinite; }
.bring-xtream .f3 { animation: hx-fx3 7s infinite; }
@keyframes hx-type-x1 { 0%, 4% { width: 0; } 34%, 94% { width: 23ch; } 100% { width: 0; } }
@keyframes hx-type-x2 { 0%, 38% { width: 0; } 48%, 94% { width: 4ch; } 100% { width: 0; } }
@keyframes hx-type-x3 { 0%, 52% { width: 0; } 66%, 94% { width: 8ch; } 100% { width: 0; } }
@keyframes hx-fx1 { 0%, 3% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); } 4%, 35% { box-shadow: inset 0 0 0 1.5px #FF7A3D; } 37%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); } }
@keyframes hx-fx2 { 0%, 37% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); } 38%, 49% { box-shadow: inset 0 0 0 1.5px #FF7A3D; } 51%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); } }
@keyframes hx-fx3 { 0%, 51% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); } 52%, 67% { box-shadow: inset 0 0 0 1.5px #FF7A3D; } 69%, 100% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); } }

.bring-file .bv { padding: 14px; }
.bv .code { height: 100%; overflow: hidden; border-radius: 12px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.bv .code-h { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.bv .code-h i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.bv .code-h i:first-child { background: #FF5F57; }
.bv .code-h i:nth-child(2) { background: #FEBC2E; }
.bv .code-h i:nth-child(3) { background: #28C840; }
.bv .code-h b { margin-left: 8px; color: rgba(245, 243, 238, 0.6); font: 500 11px/1 var(--font-mono); }
.bv .code-b { height: calc(100% - 30px); overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); mask-image: linear-gradient(transparent, #000 20%, #000 80%, transparent); }
.bv .code-scroll { display: grid; padding: 8px 12px; font: 500 11.5px/22px var(--font-mono); white-space: nowrap; animation: hx-scroll 12s linear infinite; }
.bv .code-scroll span { overflow: hidden; text-overflow: ellipsis; }
.bv .code-scroll i { font-style: normal; }
.bv .code-scroll .k { color: #FF8A5B; }
.bv .code-scroll .a { color: #C4B5FD; }
.bv .code-scroll .s { color: #7CF0BE; }
.bv .code-scroll .u { color: rgba(245, 243, 238, 0.55); }
@keyframes hx-scroll { to { transform: translateY(-50%); } }

/* --- the rest: a bento */
.hx-bento { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .hx-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) {
  .hx-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rc-cast, .rc-pip, .rc-profiles, .rc-hdr, .rc-themes { grid-column: span 2; }
}
@media (min-width: 640px) and (max-width: 1039px) { .rc-cast { grid-column: span 2; } }
.rc { display: flex; flex-direction: column; padding: 14px 14px 24px; }
.rc h3 { margin-top: 20px; padding-inline: 12px; font-size: 20px; }
.rc p { margin-top: 6px; padding-inline: 12px; font-size: 15px; }
.fv {
  position: relative;
  height: 168px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 91, 36, 0.14), transparent 60%),
    #0C0D11;
  color: #F5F3EE;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.fv img { display: block; }

.fv-cast { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 0 20px; }
.fv-cast img { width: 100%; height: 100%; object-fit: cover; }
.fv-cast .cs-phone { flex: none; width: 44px; aspect-ratio: 9 / 19; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 14px 30px rgba(0, 0, 0, 0.6); }
.fv-cast .cs-beam { flex: none; display: grid; place-items: center; color: #FF7A3D; }
.fv-cast .cs-beam .ic { width: 34px; height: 34px; filter: drop-shadow(0 4px 14px rgba(255, 122, 61, 0.6)); animation: hx-beam 4s ease-in-out infinite; }
.fv-cast .cs-tv { flex: 0 1 260px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #000; box-shadow: 0 0 0 3px #1B1C22, 0 0 0 4px rgba(255, 255, 255, 0.14), 0 22px 44px -14px rgba(255, 91, 36, 0.5); }
.fv-cast .cs-tv img { animation: hx-cast-tv 4s var(--ease-out) infinite; }
@keyframes hx-beam { 0%, 100% { opacity: 0.35; transform: scale(0.9); } 25%, 75% { opacity: 1; transform: scale(1); } }
@keyframes hx-cast-tv { 0%, 18% { opacity: 0; transform: scale(1.06); } 34%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(1.06); } }

.fv-live .lv-bg { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.fv-live .lv-key { position: absolute; inset: 0; display: grid; place-items: center; width: 64px; height: 64px; margin: auto; border-radius: 50%; background: rgba(245, 243, 238, 0.94); color: #0C0D11; box-shadow: 0 16px 34px -10px rgba(0, 0, 0, 0.7); animation: hx-lv-key 4s var(--ease-out) infinite; }
.fv-live .lv-key .ic { width: 32px; height: 32px; }
.fv-live .lv-chip { position: absolute; bottom: 12px; inset-inline-start: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(12, 13, 17, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); font: 600 12px/1 var(--font-mono); }
.fv-live .lv-chip i { width: 7px; height: 7px; border-radius: 50%; background: #FF5B24; box-shadow: 0 0 10px rgba(255, 91, 36, 0.9); }
@keyframes hx-lv-key { 0%, 100% { transform: scale(1); } 10% { transform: scale(0.88); } 22% { transform: scale(1.04); } 32% { transform: scale(1); } }

.fv-start { display: grid; align-content: center; justify-items: center; gap: 16px; padding: 0 20px; }
.fv-start .st-key { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(145deg, #A78BFA, #FF3D81); box-shadow: 0 16px 34px -12px rgba(167, 139, 250, 0.7); color: #fff; }
.fv-start .st-key .ic { width: 30px; height: 30px; animation: hx-st-key 5s var(--ease-out) infinite; }
.fv-start .st-bar { position: relative; width: 100%; max-width: 220px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.10); }
.fv-start .st-bar i { position: absolute; inset-block: 0; left: 0; border-radius: inherit; background: linear-gradient(90deg, #FF7A3D, #FF3D81); animation: hx-st-bar 5s var(--ease-out) infinite; }
.fv-start .st-bar i::after { content: ""; position: absolute; top: 50%; right: -6px; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 61, 129, 0.35); }
.fv-start .st-t { display: flex; justify-content: space-between; width: 100%; max-width: 220px; color: rgba(245, 243, 238, 0.55); font: 600 11px/1 var(--font-mono); }
.fv-start .st-t b { font-weight: inherit; }
@keyframes hx-st-bar { 0%, 30% { width: 62%; } 38% { width: 0%; } 92% { width: 30%; } 100% { width: 62%; } }
@keyframes hx-st-key { 0%, 28% { transform: none; } 38% { transform: rotate(-360deg); } 100% { transform: rotate(-360deg); } }

.fv-pip .pip-bg { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.fv-pip .pip-w {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 30%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 14px 30px rgba(0, 0, 0, 0.6);
  animation: hx-pip 10s var(--ease-out) infinite;
}
.fv-pip .pip-w img { width: 100%; height: 100%; object-fit: cover; }
.fv-pip { container-type: size; }
@keyframes hx-pip {
  0%, 20% { translate: 0 0; }
  25%, 45% { translate: calc(70cqw - 28px) 0; }
  50%, 70% { translate: calc(70cqw - 28px) calc(100cqh - 28px - 16.875cqw); }
  75%, 95% { translate: 0 calc(100cqh - 28px - 16.875cqw); }
  100% { translate: 0 0; }
}

.fv-fav { display: grid; place-items: center; }
.fv-fav .heart { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 61, 129, 0.35), transparent 70%); color: #FF3D81; animation: hx-heart 2.4s var(--ease-out) infinite; }
.fv-fav .heart .ic { width: 46px; height: 46px; filter: drop-shadow(0 6px 18px rgba(255, 61, 129, 0.6)); }
@keyframes hx-heart { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.22); } 24% { transform: scale(0.96); } 36% { transform: scale(1.08); } 50% { transform: scale(1); } }
.fv-fav .spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #FF7A3D; opacity: 0; animation: hx-spark 2.4s ease-out infinite; }
.fv-fav .s1 { left: 34%; top: 30%; --dx: -26px; --dy: -22px; }
.fv-fav .s2 { left: 62%; top: 28%; --dx: 26px; --dy: -24px; background: #A78BFA; }
.fv-fav .s3 { left: 50%; top: 72%; --dx: 4px; --dy: 28px; background: #FF3D81; }
@keyframes hx-spark { 0%, 8% { opacity: 0; transform: none; } 14% { opacity: 1; } 40%, 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.4); } }

.fv-search { display: grid; align-content: center; justify-items: center; gap: 14px; padding: 0 18px; }
.fv-search .sbar { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 240px; height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: rgba(245, 243, 238, 0.6); }
.fv-search .sbar .ic { width: 18px; height: 18px; }
.fv-search .typed { display: inline-block; width: 0; overflow: hidden; color: #F5F3EE; font: 500 13px/1 var(--font-mono); white-space: nowrap; animation: hx-type-s 6s steps(6, end) infinite; }
.fv-search .caret { width: 2px; height: 16px; background: #FF7A3D; animation: hx-blink 1s steps(1) infinite; }
.fv-search .hits { display: grid; gap: 6px; width: 100%; max-width: 240px; }
.fv-search .hits i { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.10); transform-origin: 0 50%; animation: hx-hit 6s var(--ease-out) infinite; }
.fv-search .hits i:nth-child(2) { width: 78%; animation-delay: 0.08s; }
.fv-search .hits i:nth-child(3) { width: 56%; animation-delay: 0.16s; }
@keyframes hx-type-s { 0%, 8% { width: 0; } 34%, 90% { width: 6ch; } 100% { width: 0; } }
@keyframes hx-hit { 0%, 34% { transform: scaleX(0.15); opacity: 0.3; } 44%, 90% { transform: none; opacity: 1; background: linear-gradient(90deg, rgba(255, 122, 61, 0.55), rgba(255, 255, 255, 0.12)); } 100% { transform: scaleX(0.15); opacity: 0.3; } }

.fv-remind { display: grid; place-items: center; align-content: center; gap: 12px; }
.fv-remind .bell { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 22px; background: linear-gradient(145deg, #FF7A3D, #FF3D81); box-shadow: 0 18px 40px -12px rgba(255, 61, 129, 0.7); color: #fff; }
.fv-remind .bell .ic { width: 38px; height: 38px; transform-origin: 50% 12%; animation: hx-ring 3.2s ease-in-out infinite; }
.fv-remind .when { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font: 600 13px/1 var(--font-mono); }

.fv-vod { display: flex; align-items: center; justify-content: center; perspective: 600px; }
.fv-vod .poster { position: absolute; width: 74px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 10px; box-shadow: 0 16px 30px -8px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.12); animation: hx-fan 5s var(--ease-out) infinite; }
.fv-vod .poster img { width: 100%; height: 100%; object-fit: cover; }
.fv-vod .p1 { --r: -14deg; --x: -62px; --y: 8px; }
.fv-vod .p2 { --r: 0deg; --x: 0px; --y: -4px; z-index: 2; }
.fv-vod .p3 { --r: 14deg; --x: 62px; --y: 8px; }
@keyframes hx-fan { 0%, 100% { transform: translateX(calc(var(--x) * 0.3)) rotate(calc(var(--r) * 0.3)); } 40%, 70% { transform: translateX(var(--x)) translateY(var(--y)) rotate(var(--r)); } }

.fv-prof { display: grid; align-content: center; justify-items: center; gap: 22px; padding: 0 20px; }
.fv-prof .seg { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 440px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); }
.fv-prof .sg { position: relative; z-index: 1; overflow: hidden; padding: 9px 6px; color: rgba(245, 243, 238, 0.6); font-size: 13px; font-weight: 600; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.fv-prof .seg-k { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 999px; background: linear-gradient(100deg, #FF7A3D, #FF3D81); box-shadow: 0 8px 20px -6px rgba(255, 61, 129, 0.6); animation: hx-seg 7.5s var(--ease-out) infinite; }
[dir="rtl"] .fv-prof .seg-k { left: auto; right: 4px; animation-name: hx-seg-rtl; }
.fv-prof .sg1 { animation: hx-sg1 7.5s infinite; }
.fv-prof .sg2 { animation: hx-sg2 7.5s infinite; }
.fv-prof .sg3 { animation: hx-sg3 7.5s infinite; }
.fv-prof .buf { width: 100%; max-width: 440px; height: 6px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, 0.08); }
.fv-prof .buf i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #A78BFA, #FF3D81); animation: hx-buf 7.5s var(--ease-out) infinite; }
@keyframes hx-seg { 0%, 28% { translate: 0 0; } 33%, 61% { translate: 100% 0; } 66%, 94% { translate: 200% 0; } 100% { translate: 0 0; } }
@keyframes hx-seg-rtl { 0%, 28% { translate: 0 0; } 33%, 61% { translate: -100% 0; } 66%, 94% { translate: -200% 0; } 100% { translate: 0 0; } }
@keyframes hx-sg1 { 0%, 28%, 100% { color: #fff; } 33%, 94% { color: rgba(245, 243, 238, 0.6); } }
@keyframes hx-sg2 { 0%, 28%, 66%, 100% { color: rgba(245, 243, 238, 0.6); } 33%, 61% { color: #fff; } }
@keyframes hx-sg3 { 0%, 61%, 100% { color: rgba(245, 243, 238, 0.6); } 66%, 94% { color: #fff; } }
@keyframes hx-buf { 0%, 28% { width: 22%; } 33%, 61% { width: 52%; } 66%, 94% { width: 88%; } 100% { width: 22%; } }

.fv-hdr { display: flex; align-items: center; justify-content: center; gap: 18px; }
.fv-hdr b {
  font: 800 76px/1 var(--font-display);
  letter-spacing: -0.04em;
  background: linear-gradient(100deg, #FFFFFF 0%, #FFD3BF 25%, #FF7A3D 45%, #FF3D81 60%, #A78BFA 80%, #FFFFFF 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hx-sheen 5s ease-in-out infinite;
}
.fv-hdr .hdr { font-size: 40px; padding: 8px 12px; border-radius: 12px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); animation-delay: -1.2s; }

.fv-themes { display: flex; align-items: center; justify-content: center; gap: 16px; }
.fv-themes .th { width: 64px; height: 112px; border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 16px 30px -12px rgba(0, 0, 0, 0.7); animation: hx-th 8s var(--ease-out) infinite; }
.fv-themes .th::after { content: ""; display: block; width: 60%; height: 8px; margin: 18px auto 0; border-radius: 4px; background: currentColor; opacity: 0.6; }
.fv-themes .th1 { background: #F7F6F2; color: #1A1C22; }
.fv-themes .th2 { background: #1A1C22; color: #F5F3EE; animation-delay: 0.15s; }
.fv-themes .th3 { background: #000; color: #FF7A3D; animation-delay: 0.3s; }
.fv-themes .th4 { background: linear-gradient(90deg, #F7F6F2 50%, #1A1C22 50%); color: #888; animation-delay: 0.45s; }
@keyframes hx-th { 0%, 100% { transform: translateY(0); } 12% { transform: translateY(-10px); } 24% { transform: translateY(0); } }

/* --- tools */
@media (min-width: 720px) { .hx-cards-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .hx-cards-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hx-cards-tools > li { display: flex; }
.tl {
  display: flex;
  flex: 1;
  align-items: flex-start;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  color: var(--text);
  transition: transform 0.35s var(--ease-out);
}
.tl:hover { transform: translateY(-3px); }
.tl-ic {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 122, 61, 0.22), rgba(255, 61, 129, 0.14));
  box-shadow: inset 0 0 0 1px rgba(255, 122, 61, 0.30);
  color: var(--tally-text);
}
.tl-ic .ic { width: 24px; height: 24px; }
.tl-t { display: grid; flex: 1; gap: 4px; min-width: 0; }
.tl-t b { font-size: 17px; font-weight: 600; }
.tl-t span { color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.tl-go { width: 20px; height: 20px; margin-top: 2px; color: var(--text-3); transition: transform 0.35s var(--ease-out), color 0.2s; }
[dir="rtl"] .tl-go { transform: scaleX(-1); }
.tl:hover .tl-go { color: var(--tally-text); transform: translateX(4px); }
[dir="rtl"] .tl:hover .tl-go { transform: scaleX(-1) translateX(4px); }

/* --- FAQ */
.hx-faq-grid { display: grid; gap: 24px; }
@media (min-width: 1000px) {
  .hx-faq-grid { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 64px; align-items: start; }
  .hx-faq-grid .hx-head { position: sticky; top: calc(var(--header-h) + 40px); }
}
.hx .faq-list { max-width: none; }

/* --- the end */
.hx-end {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(96px, 14vw, 180px);
  text-align: center;
}
.hx-end-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: min(1100px, 140vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 91, 36, 0.32), rgba(255, 61, 129, 0.24), rgba(124, 92, 255, 0.26), rgba(255, 91, 36, 0.32));
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent 72%);
  mask-image: radial-gradient(closest-side, #000, transparent 72%);
  transform: translate(-50%, -50%);
  animation: hx-turn 24s linear infinite;
}
@keyframes hx-turn { to { transform: translate(-50%, -50%) rotate(1turn); } }
.hx-end-icon { display: inline-block; animation: hx-float 6s ease-in-out infinite alternate; }
.hx-end-icon img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 30px 60px -20px rgba(255, 91, 36, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.10); }
@keyframes hx-float { to { transform: translateY(-12px) rotate(-3deg); } }
.hx-end h2 { max-width: 13em; margin: 32px auto 0; font-size: clamp(40px, 6.4vw, 88px); }
.hx-end p { max-width: 34em; margin: 18px auto 0; color: var(--text-2); font-size: clamp(17px, 1.5vw, 20px); }
.hx-end .hx-cta { justify-content: center; margin-top: 36px; }
.hx-end .play-badge img { height: 62px; }
.hx-devices { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 32px 0 0; padding: 0; list-style: none; }
.hx-devices li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  font-size: 15px;
}
.hx-devices .ic { width: 18px; height: 18px; color: var(--tally-text); }

/* the home has its own calls to action: no floating bar here */
.is-home .wb-cta { display: none !important; }

/* ==========================================================================
   Reduced motion: everything rests on its first frame; content shows
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .js .hx [data-reveal] { opacity: 1; transform: none; filter: none; }
  .hx-title .w { opacity: 1; transform: none; filter: none; }
  .hx-progress, .hx-sky .floor { display: none; }
  .js .hx-step:not([aria-current]) { opacity: 1; }
}
