/* =============================================
   TV WALL - the hero showpiece. A wall of TVs fixed in 3D, one big screen that plays,
   the others standing at an angle. Pick one (click, tap, or rest the mouse on it) and it
   flies to the middle while the old one takes its place. Remote / thumb bar change channel.
   Replaces the ring (hero.js stops when #heroStage is gone).
   ============================================= */

/* the copy comes in right after the TVs switch on */
.hero-line:nth-child(1) > span { animation-delay: 0.9s; }
.hero-line:nth-child(2) > span { animation-delay: 1.05s; }
.hero-line:nth-child(3) > span { animation-delay: 1.2s; }
.clip { animation-delay: 1.55s; }
.hero-sub { animation-delay: 1.7s; }
.hero-cta { animation-delay: 1.6s; }
.hero-ticker { animation-delay: 1.5s; }

/* slot values are registered so the browser can animate a TV from one slot to another */
@property --x { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --y { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --z { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --ry { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --w { syntax: '<length>'; inherits: false; initial-value: 120px; }
@property --bz { syntax: '<length>'; inherits: false; initial-value: 9px; }
@property --bzb { syntax: '<length>'; inherits: false; initial-value: 21px; }

.tv-stage { position: relative; order: -1; container-type: inline-size; -webkit-tap-highlight-color: transparent; }
@media (min-width: 961px) { .tv-stage { order: 1; height: 690px; perspective: 1300px; perspective-origin: 50% 36%; } }
@media (max-width: 960px) { .tv-stage { max-width: 440px; width: 100%; margin-inline: auto; } }

.tv-word {
  position: absolute; inset-inline: 0; top: -6px; z-index: 0; pointer-events: none; display: none; direction: ltr; text-align: center;
  font-family: 'Archivo', 'Heebo', sans-serif; font-stretch: 125%; font-weight: 900; font-size: 16.2cqw; line-height: 0.84; letter-spacing: -0.02em;
  color: rgba(147, 51, 234, 0.2); -webkit-text-stroke: 1.5px rgba(214, 196, 255, 0.55);
}
.tv-word span { display: block; }
.tv-word span:first-child { text-align: start; font-size: 0.3em; line-height: 1.55; padding-inline-start: 1.5%; letter-spacing: 0.08em; -webkit-text-stroke-width: 1px; }
@media (min-width: 961px) { .tv-word { display: block; animation: tvFade 1.2s var(--ease-out) 0.2s both; } }
@keyframes tvFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- the wall (3D) ---------- */
.tv-wall { pointer-events: none; position: relative; transform-style: preserve-3d; height: 470px; transform: rotateX(var(--wx, 0deg)) rotateY(var(--wy, 0deg)); will-change: transform; }
@media (min-width: 961px) { .tv-wall { position: absolute; inset: 70px 0 0; height: auto; } }
@media (max-width: 960px) { .tv-wall { animation: tvSway 9s ease-in-out infinite alternate; } }
@keyframes tvSway { from { transform: rotateY(-5deg) rotateX(1deg); } to { transform: rotateY(5deg) rotateX(-1deg); } }

.tv {
  position: absolute; left: 50%; top: 50%; width: var(--w); padding: var(--bz) var(--bz) var(--bzb); border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(150deg, #5a4a78 0%, #1d1532 36%, #0e0919 60%, #3b2f57 100%);
  box-shadow: 0 34px 60px -26px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.42), inset 0 -2px 3px rgba(0, 0, 0, 0.6);
  transform: translate3d(calc(var(--x) * 1px), calc(var(--y) * 1px), calc(var(--z) * 1px)) translate(-50%, -50%) rotateY(var(--ry));
  color: #fff; text-align: start; scale: 1; filter: brightness(0.92); pointer-events: auto;
  transition: --x 0.95s var(--ease-expo), --y 0.95s var(--ease-expo), --z 0.95s var(--ease-expo), --ry 0.95s var(--ease-expo), --w 0.95s var(--ease-expo), --bz 0.95s var(--ease-expo), --bzb 0.95s var(--ease-expo), scale 0.45s var(--ease-expo), filter 0.4s, box-shadow 0.6s;
}
.tv.is-main { filter: none; }
.tv.boot { animation: tvBoot 0.75s var(--ease-expo) both; animation-delay: calc(var(--k, 0) * 150ms + 150ms); }
.tv.boot .tv-screen { animation: crtOn 0.8s var(--ease-expo) both; animation-delay: calc(var(--k, 0) * 150ms + 320ms); }
@keyframes tvBoot { 0% { opacity: 0; scale: 0.6; } 100% { opacity: 1; scale: 1; } }
@keyframes crtOn { 0% { transform: scale(1, 0.006); filter: brightness(5); } 45% { transform: scale(1, 0.006); filter: brightness(5); } 100% { transform: none; filter: none; } }

.tv-screen { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #05030a; box-shadow: 0 0 0 2px #000, 0 0 0 3px rgba(255, 255, 255, 0.16), 0 0 0 5px rgba(0, 0, 0, 0.55), inset 0 0 28px rgba(0, 0, 0, 0.85); }
.tv-screen video, .tv-screen img.tv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-screen video { opacity: 0; transition: opacity 0.4s; }
.tv.vid-on .tv-screen video { opacity: 1; }
.tv-scan { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px); opacity: 0.3; mix-blend-mode: multiply; }
.tv-gloss { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(125deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 30%); }
.tv-gloss::after { content: ''; position: absolute; inset: -30%; translate: -130% 0; background: linear-gradient(112deg, transparent 40%, rgba(255, 255, 255, 0.3) 50%, transparent 60%); animation: rfGlint 7s cubic-bezier(0.4, 0, 0.2, 1) infinite; animation-delay: calc(var(--k, 0) * 0.9s); }
.tv-led { position: absolute; right: 16px; bottom: calc(var(--bzb) / 2 - 3px); width: 6px; height: 6px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 7px 2px rgba(255, 77, 109, 0.85); transition: background-color 0.4s, box-shadow 0.4s; }
.tv.is-main .tv-led { background: #6dff9a; box-shadow: 0 0 8px 2px rgba(109, 255, 154, 0.9); }
.tv-grille { position: absolute; left: 16px; bottom: calc(var(--bzb) / 2 - 3px); width: 34%; height: 6px; background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0 1px, transparent 1.4px) 0 50% / 6px 100% repeat-x; }
.tv-brand { position: absolute; left: 50%; bottom: calc(var(--bzb) / 2 - 7px); translate: -50% 0; font-family: 'Archivo', 'Heebo', sans-serif; font-stretch: 125%; font-weight: 900; font-size: 0.6rem; letter-spacing: 0.3em; color: rgba(255, 255, 255, 0.5); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8); pointer-events: none; direction: ltr; opacity: 0; transition: opacity 0.5s; }
.tv.is-main .tv-brand { opacity: 1; }

/* channel static + CRT collapse when a TV arrives in the middle */
.tv-static {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; mix-blend-mode: screen; animation: tvNoise 0.18s steps(4) infinite;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes tvNoise { to { background-position: -80px 40px; } }
.tv.is-switching .tv-static { opacity: 0.85; }
.tv.is-switching .tv-screen { animation: crtFlick 0.55s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes crtFlick { 0% { filter: brightness(1); transform: none; } 30% { filter: brightness(3); transform: scaleY(0.05); } 52% { filter: brightness(4); transform: scaleY(0.04); } 100% { filter: none; transform: none; } }

/* the on-screen display and the "tap me" - only the middle TV has them */
.tv-osd { position: absolute; left: 12px; top: 10px; z-index: 5; pointer-events: none; font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; letter-spacing: 2px; color: #7dff9a; text-shadow: 0 0 8px rgba(125, 255, 154, 0.9), 0 1px 0 #000; opacity: 0; transition: opacity 0.4s; direction: ltr; }
.tv.is-main.show-osd .tv-osd { opacity: 1; }
.tv-label { position: absolute; left: 0; right: 0; bottom: 62px; z-index: 5; padding: 0 14px; text-align: center; font-weight: 800; font-size: 0.95rem; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); pointer-events: none; opacity: 0; transition: opacity 0.4s 0.3s; }
.tv.is-main .tv-label { opacity: 1; }
.tv-hit { position: absolute; inset: 0; z-index: 6; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 14px; border: 0; background: none; cursor: pointer; font: inherit; color: #fff; appearance: none; -webkit-appearance: none; }
.tv-hit:focus-visible { outline: 3px solid var(--lav); outline-offset: -3px; }
.tv-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 18px 7px 8px; border-radius: 999px; font-weight: 800; font-size: 0.9rem; white-space: nowrap; opacity: 0; translate: 0 8px;
  background: rgba(14, 8, 26, 0.72); border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 26px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease-expo), background-color 0.3s, opacity 0.5s 0.35s, translate 0.6s var(--ease-expo) 0.35s;
}
.tv.is-main .tv-pill { opacity: 1; translate: 0 0; }
.tv-pill i { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.7), var(--accent) 72%); animation: tvPulse 1.9s ease-out infinite; }
.tv-pill i svg { width: 14px; height: 14px; margin-inline-start: 2px; }
@keyframes tvPulse { 0% { box-shadow: 0 0 0 0 rgba(199, 166, 255, 0.75); } 70%, 100% { box-shadow: 0 0 0 16px rgba(199, 166, 255, 0); } }
@media (hover: hover) and (pointer: fine) { .tv.is-main:hover .tv-screen video, .tv.is-main:hover .tv-screen img { transform: scale(1.05); } .tv-screen video, .tv-screen img.tv-img { transition: transform 1.4s var(--ease-expo), opacity 0.4s; } .tv.is-main:hover .tv-pill { transform: translateY(-4px) scale(1.04); background: rgba(147, 51, 234, 0.85); } }
/* the small TVs: a play mark, and they lean towards you when you rest on them */
.tv-mini { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; pointer-events: none; transition: opacity 0.4s; }
.tv-mini i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(14, 8, 26, 0.6); border: 1px solid rgba(255, 255, 255, 0.45); }
.tv-mini svg { width: 12px; height: 12px; margin-inline-start: 2px; }
.tv.is-main .tv-mini { opacity: 0; }
.tv:not(.is-main) .tv-hit { padding: 0; }
.tv:not(.is-main) .tv-screen::after { content: ''; position: absolute; inset: 0; z-index: 1; background: rgba(8, 5, 16, 0.2); transition: background-color 0.4s; }
@media (hover: hover) and (pointer: fine) {
  .tv:not(.is-main):hover { filter: brightness(1.18); scale: 1.08; }
  .tv:not(.is-main):hover .tv-screen::after { background: rgba(8, 5, 16, 0); }
}
.tv:not(.is-main) { cursor: pointer; }

/* the one in the middle */
.tv.is-main { z-index: 5; box-shadow: 0 40px 70px -26px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 70px rgba(147, 51, 234, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.42), inset 0 -2px 3px rgba(0, 0, 0, 0.6); }
.tv.is-main::after { content: ''; position: absolute; left: 50%; top: 100%; width: 34%; height: 22px; translate: -50% -2px; background: linear-gradient(180deg, #2a2142, #120c20); clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); }
.tv.is-main::before { content: ''; position: absolute; left: 50%; top: calc(100% + 18px); width: 62%; height: 9px; translate: -50% 0; border-radius: 50%; background: radial-gradient(ellipse, rgba(147, 51, 234, 0.6), transparent 70%); filter: blur(4px); }

/* slots - desktop */
.slot-m { --w: 292px; --x: 0; --y: 0; --z: 0; --ry: 0deg; --bz: 14px; --bzb: 34px; }
.slot-1 { --w: 118px; --x: -232; --y: -146; --z: -90; --ry: 24deg; --bz: 8px; --bzb: 19px; }
.slot-2 { --w: 118px; --x: -248; --y: 112; --z: -130; --ry: 26deg; --bz: 8px; --bzb: 19px; }
.slot-3 { --w: 118px; --x: 232; --y: -146; --z: -90; --ry: -24deg; --bz: 8px; --bzb: 19px; }
.slot-4 { --w: 118px; --x: 248; --y: 112; --z: -130; --ry: -26deg; --bz: 8px; --bzb: 19px; }
.slot-5, .slot-6 { display: none; }

/* ---------- the remote (desktop) ---------- */
.tv-remote {
  position: relative; z-index: 6; display: flex; flex-direction: column; gap: 9px; padding: 14px 12px 14px; border-radius: 30px; width: 124px; color: #fff;
  background: linear-gradient(160deg, #3a2f56, #140d24 55%, #251b3d); border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 6px rgba(0, 0, 0, 0.5);
  animation: tvBootR 0.8s var(--ease-expo) 1.2s both;
}
@keyframes tvBootR { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@media (min-width: 961px) { .tv-remote { position: absolute; right: calc(-14px - var(--dx, 0px)); bottom: calc(-6px - var(--dy, 0px)); transform: translateZ(80px) rotate(-6deg); transform-origin: 50% 100%; cursor: grab; transition: scale 0.25s var(--ease-expo), box-shadow 0.25s, rotate 0.25s; } .tv-remote.is-held { cursor: grabbing; scale: 1.07; rotate: 3deg; box-shadow: 0 60px 70px -20px rgba(0, 0, 0, 0.95), 0 0 0 2px rgba(199, 166, 255, 0.6), 0 0 40px rgba(147, 51, 234, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45); user-select: none; } .tv-stage.remote-moved { z-index: 40; } }
.rm-top { display: flex; align-items: center; justify-content: space-between; }
.rm-power { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9aae, #e0213f 70%); box-shadow: 0 0 8px rgba(255, 77, 109, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6); border: 0; padding: 0; }
.rm-lcd { flex: 1; margin-inline-start: 8px; padding: 4px 7px; border-radius: 8px; background: #0b1a12; border: 1px solid rgba(125, 255, 154, 0.3); box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8); direction: ltr; }
.rm-lcd b { display: block; font-family: 'Bebas Neue', sans-serif; font-size: 1.05rem; letter-spacing: 1.5px; color: #7dff9a; text-shadow: 0 0 6px rgba(125, 255, 154, 0.8); line-height: 1; }
.rm-btn { appearance: none; -webkit-appearance: none; border: 0; padding: 0; display: grid; place-items: center; cursor: pointer; color: #fff; font-weight: 800; font-family: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05)); border: 1px solid rgba(255, 255, 255, 0.22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s, background-color 0.25s; -webkit-tap-highlight-color: transparent; }
.rm-btn:active { transform: scale(0.92) translateY(1px); }
.rm-btn:focus-visible { outline: 3px solid var(--lav); outline-offset: 2px; }
.rm-pad { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.rm-pad .rm-btn { height: 30px; border-radius: 10px; }
.rm-pad .rm-btn svg { width: 15px; height: 15px; }
.rm-ok { grid-column: 1 / -1; height: 34px !important; border-radius: 17px !important; font-size: 0.86rem; background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.6), var(--accent) 70%) !important; animation: tvPulse 2.2s ease-out infinite; }
.rm-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rm-keys .rm-btn { height: 24px; border-radius: 8px; font-size: 0.76rem; font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.5px; }
.rm-keys .rm-btn.is-on { background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.6), var(--accent) 75%); border-color: rgba(255, 255, 255, 0.6); }
.rm-hint { font-size: 0.7rem; font-weight: 700; text-align: center; color: rgba(246, 242, 255, 0.7); line-height: 1.25; }

/* ---------- phones: smaller screens with air around them; neighbours peeking in at an angle ---------- */
@media (max-width: 960px) {
  .tv-wall { height: 450px; }
  .slot-m { --w: min(240px, 64cqw); --x: 0; --y: -4; --z: 0; --ry: 0deg; --bz: 11px; --bzb: 27px; }
  .slot-1 { --w: 88px; --x: -150; --y: -22; --z: -120; --ry: 32deg; --bz: 6px; --bzb: 14px; }
  .slot-3 { --w: 88px; --x: 150; --y: -22; --z: -120; --ry: -32deg; --bz: 6px; --bzb: 14px; }
  .slot-2, .slot-4, .slot-5, .slot-6 { display: none; }
  .tv-stage { perspective: 1000px; perspective-origin: 50% 40%; }
  .tv-remote { display: none; }
  .tv-pill { font-size: 0.95rem; padding: 7px 18px 7px 7px; }
  .tv-pill i { width: 36px; height: 36px; }
  .tv-label { bottom: 64px; font-size: 1rem; }
  .tv-osd { font-size: 1.5rem; }
  .tv.is-main { animation: neonGlow 2.8s ease-in-out infinite; }
  .tv.is-main.boot { animation: tvBoot 0.75s var(--ease-expo) both, neonGlow 2.8s ease-in-out 1.2s infinite; animation-delay: calc(var(--k, 0) * 150ms + 150ms), 1.2s; }
}
@keyframes neonGlow {
  0%, 100% { box-shadow: 0 40px 70px -26px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(147, 51, 234, 0.7), 0 0 54px rgba(147, 51, 234, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.42); }
  50% { box-shadow: 0 40px 70px -26px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 77, 109, 0.75), 0 0 64px rgba(255, 77, 109, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.42); }
}
@media (max-width: 400px) { .tv-wall { height: 432px; } }

/* ---------- the thumb remote (phones): fixed at the bottom of the screen, two arrows and a watch button ---------- */
.tv-thumb { display: none; }
@media (max-width: 960px) {
  .tv-thumb {
    position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 860; width: min(86vw, 350px); translate: -50% 140%; opacity: 0; pointer-events: none;
    display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; gap: 9px; align-items: center; padding: 19px 9px 9px; border-radius: 28px; color: #fff;
    background: linear-gradient(160deg, rgba(58, 47, 86, 0.96), rgba(20, 13, 36, 0.97) 55%, rgba(37, 27, 61, 0.96)); border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -6px 34px rgba(147, 51, 234, 0.36), 0 20px 36px -10px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 6px rgba(0, 0, 0, 0.5);
    transition: translate 0.7s var(--ease-expo), opacity 0.4s;
  }
  .tv-thumb.on { translate: -50% 0; opacity: 1; pointer-events: auto; }
  .th-dots { position: absolute; left: 0; right: 0; top: 7px; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
  .th-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.26); transition: background-color 0.3s, transform 0.4s var(--ease-expo), box-shadow 0.3s; }
  .th-dots i.is-on { background: #7dff9a; transform: scale(1.5); box-shadow: 0 0 7px rgba(125, 255, 154, 0.9); }
  .th-arrow { height: 50px; border-radius: 18px; }
  .th-arrow svg { width: 24px; height: 24px; }
  .tv-thumb.hint .th-arrow { animation: thNudge 1.3s ease-in-out 0.4s 3; }
  .tv-thumb.hint .th-next { animation-name: thNudgeL; }
  .th-watch {
    height: 50px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 8px;
    background: radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.55), var(--accent) 66%) !important; border-color: rgba(255, 255, 255, 0.5); animation: tvPulse 2.2s ease-out infinite;
  }
  .th-watch small { font-family: 'Bebas Neue', sans-serif; font-size: 0.85rem; letter-spacing: 1.5px; color: #d9ffe5; text-shadow: 0 0 6px rgba(125, 255, 154, 0.9); line-height: 1; direction: ltr; }
  .th-watch span { font-size: 0.92rem; font-weight: 800; line-height: 1; white-space: nowrap; }
}
@keyframes thNudge { 0%, 100% { translate: 0 0; } 50% { translate: 7px 0; } }
@keyframes thNudgeL { 0%, 100% { translate: 0 0; } 50% { translate: -7px 0; } }

@media (prefers-reduced-motion: reduce) {
  .tv, .tv.boot, .tv.boot .tv-screen, .tv-remote, .tv-gloss::after, .tv-pill i, .rm-ok, .tv-wall, .tv-thumb.hint .th-arrow, .th-watch, .tv.is-main { animation: none !important; transition: none !important; }
  .tv.is-switching .tv-screen { animation: none; }
}

/* ---------- resting the mouse on a small TV: it tunes in (the picture starts playing), a ring fills while it is about to take the middle, its name appears ---------- */
@property --p { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.tv-charge {
  position: absolute; inset: -3px; z-index: 8; border-radius: 25px; padding: 3px; pointer-events: none; opacity: 0;
  background: conic-gradient(from -90deg, #d9c2ff var(--p), rgba(217, 194, 255, 0) 0);
  -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);
  filter: drop-shadow(0 0 8px rgba(199, 166, 255, 0.9));
}
.tv.is-charging .tv-charge { opacity: 1; animation: tvCharge 0.42s linear forwards; }
@keyframes tvCharge { from { --p: 0deg; } to { --p: 360deg; } }
.tv-cap {
  position: absolute; left: 50%; top: calc(100% + 12px); z-index: 9; translate: -50% 6px; opacity: 0; pointer-events: none; white-space: nowrap; padding: 5px 14px 6px; border-radius: 999px; font-size: 0.8rem; font-weight: 800;
  background: linear-gradient(135deg, rgba(120, 70, 190, 0.95), rgba(60, 25, 110, 0.95)); border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 24px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s, translate 0.5s var(--ease-expo);
}
.tv.is-charging .tv-cap { opacity: 1; translate: -50% 0; }
.tv.is-main .tv-cap, .tv.is-main .tv-charge { display: none; }
.tv.is-charging { filter: brightness(1.25); scale: 1.1; box-shadow: 0 34px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(217, 194, 255, 0.7), 0 0 46px rgba(147, 51, 234, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.tv.is-charging .tv-screen::after { background: rgba(8, 5, 16, 0); }
.tv.is-charging .tv-mini { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .tv.is-charging .tv-charge { animation: none; --p: 360deg; } }

/* ---------- watching right on the big TV: the picture plays with sound, a few quiet controls, the neighbours dim ---------- */
.tv-ctl { position: absolute; inset: 0; z-index: 9; pointer-events: none; opacity: 0; transition: opacity 0.35s; }
.tv-ctl button { pointer-events: auto; }
.tv.is-watching .tv-ctl { opacity: 1; }
.tv.is-watching .tv-pill, .tv.is-watching .tv-osd, .tv.is-watching .tv-label, .tv.is-watching .tv-mini { opacity: 0 !important; }
.tv.is-watching .tv-hit { cursor: pointer; }
.tv-ctl .ctl-x { position: absolute; top: 10px; inset-inline-end: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(10, 6, 20, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: pointer; transition: background-color 0.25s, scale 0.25s; }
.tv-ctl .ctl-x svg { width: 16px; height: 16px; }
.tv-ctl .ctl-x:hover { background: rgba(147, 51, 234, 0.85); scale: 1.08; }
.ctl-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 999px; direction: ltr; background: linear-gradient(180deg, rgba(20, 12, 36, 0.5), rgba(8, 4, 16, 0.78)); border: 1px solid rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); opacity: 0; translate: 0 8px; transition: opacity 0.3s, translate 0.45s var(--ease-expo); }
.tv.is-watching .ctl-bar { opacity: 1; translate: 0 0; }
.tv.is-watching:not(:hover):not(.is-paused):not(.is-ended) .ctl-bar { opacity: 0.0; }
@media (hover: none), (max-width: 960px) { .tv.is-watching:not(.is-paused):not(.is-ended) .ctl-bar { opacity: 1; } }
.ctl-bar button { width: 26px; height: 26px; flex: none; display: grid; place-items: center; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; border-radius: 50%; transition: background-color 0.2s, color 0.2s; }
.ctl-bar button:hover { background: rgba(255, 255, 255, 0.16); color: #e7d6ff; }
.ctl-bar svg { width: 15px; height: 15px; }
.ctl-seek { --p: 0%; position: relative; flex: 1; height: 18px; cursor: pointer; display: flex; align-items: center; }
.ctl-seek::before { content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); }
.ctl-seek i { position: relative; display: block; width: var(--p); height: 4px; border-radius: 4px; background: linear-gradient(90deg, #a855f7, #d9c2ff); box-shadow: 0 0 10px rgba(168, 85, 247, 0.9); }
.ctl-seek i::after { content: ''; position: absolute; right: -5px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px rgba(199, 166, 255, 0.9); }
.ctl-end { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(8, 4, 16, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s; }
.tv.is-ended .ctl-end { opacity: 1; visibility: visible; }
.ctl-end b { font-weight: 900; font-size: 1.35rem; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.ctl-end button { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 999px; font: inherit; font-weight: 800; font-size: 0.95rem; color: #fff; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.1); transition: background-color 0.25s, scale 0.25s; }
.ctl-end button svg { width: 16px; height: 16px; }
.ctl-end .ctl-next { background: linear-gradient(135deg, #a855f7, #6d28d9); border-color: rgba(255, 255, 255, 0.5); }
.ctl-end button:hover { scale: 1.05; }
.tv.is-paused:not(.is-ended) .tv-ctl::after { content: ''; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(10, 6, 20, 0.55) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 6.2v11.6L18.6 12z'/></svg>") center / 30px no-repeat; border: 1px solid rgba(255, 255, 255, 0.4); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.has-watch .tv:not(.is-main) { opacity: 0.32; filter: blur(1.5px) saturate(0.7); transition: opacity 0.6s, filter 0.6s; pointer-events: auto; }
.tv.is-watching .tv-screen { box-shadow: 0 0 0 2px #000, 0 0 0 3px rgba(255, 255, 255, 0.2), 0 0 60px rgba(168, 85, 247, 0.55), inset 0 0 28px rgba(0, 0, 0, 0.6); }
.tv.is-watching .tv-gloss, .tv.is-watching .tv-scan { opacity: 0.12; }
.tv.is-watching:hover .tv-screen video { transform: none !important; }
.tv.is-watching .tv-screen video { object-fit: contain; background: #000; }
