body.screensaver-active {
  overflow: hidden;
}
.tv-screen {
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  overflow: hidden;
  background: #061b46;
  color: #f7f4eb;
  isolation: isolate;
  cursor: none;
  box-sizing: border-box;
  --tv-tint: #f5d94e;
}
.tv-screen::backdrop {
  background: #03060c;
}
.tv-screen {
  background: #03060c;
}
.tv-picture {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: clamp(18px, 4vw, 68px);
  background: #062683;
  animation: tv-on 0.28s ease-out both;
}
.tv-raster {
  position: absolute;
  inset: -2px;
  transform: translate3d(var(--tv-x, 0px), var(--tv-y, 0px), 0)
    skewX(var(--tv-skew, 0deg));
  transform-origin: center;
  will-change: transform;
}
.tv-bars {
  position: absolute;
  inset: 0;
  background: #0b0c10;
}
.tv-bars i {
  display: block;
  height: 66.667%;
  background: linear-gradient(
    90deg,
    #d1d0d5 0 14.2857%,
    #ded42a 14.2857% 28.5714%,
    #33c8d1 28.5714% 42.8571%,
    #39c147 42.8571% 57.1428%,
    #c640bb 57.1428% 71.4285%,
    #cb3438 71.4285% 85.7142%,
    #2949c8 85.7142%
  );
}
.tv-bars i:nth-child(2) {
  height: 8.333%;
  background: linear-gradient(
    90deg,
    #2949c8 0 14.2857%,
    #0b0c10 14.2857% 28.5714%,
    #c640bb 28.5714% 42.8571%,
    #0b0c10 42.8571% 57.1428%,
    #33c8d1 57.1428% 71.4285%,
    #0b0c10 71.4285% 85.7142%,
    #d1d0d5 85.7142%
  );
}
.tv-bars i:nth-child(3) {
  height: 25%;
  background: linear-gradient(
    90deg,
    #092647 0 17.85%,
    #d1d0d5 17.85% 35.71%,
    #29133e 35.71% 53.57%,
    #0b0c10 53.57% 71.43%,
    #060609 71.43% 78.57%,
    #0b0c10 78.57% 85.71%,
    #1b1c20 85.71% 92.85%,
    #0b0c10 92.85%
  );
}
.tv-ident {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.tv-test-disc {
  width: min(78vh, 68vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: clamp(5px, 1vw, 16px) solid #111318;
  overflow: hidden;
  background: repeating-linear-gradient(90deg, #e8e3d8 0 3%, #101218 3% 6%);
  box-shadow: 0 0 0 2px #d1d0c477;
  position: relative;
}
.tv-test-grid {
  position: absolute;
  inset: 18% 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 24px, #e8e3d860 24px 25px),
    repeating-linear-gradient(90deg, #111a29 0 24px, #e8e3d860 24px 25px);
}
.tv-station {
  position: absolute;
  width: min(76vw, 1100px);
  padding: clamp(20px, 3.2vw, 50px) clamp(22px, 4vw, 62px);
  background: #0b0e16;
  display: grid;
  justify-items: center;
  gap: clamp(18px, 2.3vw, 34px);
  border-block: 2px solid #ddd8c6;
  box-shadow:
    0 7px 0 #080b10,
    0 -7px 0 #080b10;
}
.tv-station img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(0.94) drop-shadow(-0.6px 0 #ee446955)
    drop-shadow(0.8px 0 #54cdf255);
}
.tv-station span {
  font:
    500 clamp(9px, 1vw, 13px)/1.3 Satoshi,
    Arial,
    sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ddd8c6;
}
.tv-screen:not([data-channel="ident"]) .tv-ident,
.tv-screen:not([data-channel="ident"]) .tv-bars {
  display: none;
}
.tv-logo {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(-1px 0 #ed44654d) drop-shadow(1px 0 #42ebff66)
    drop-shadow(0 0 10px #88baff44);
  will-change: transform;
}
.tv-screen[data-channel="dvd"] .tv-logo {
  display: block;
}
.tv-orbit {
  display: none;
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse at 25% 30%, #385eff52, transparent 45%),
    radial-gradient(ellipse at 80% 85%, #922c7b65, transparent 44%),
    repeating-linear-gradient(0deg, transparent 0 79px, #a1c1ff08 80px 81px);
  animation: tv-field 18s ease-in-out infinite alternate;
}
.tv-screen[data-channel="dvd"] .tv-orbit {
  display: block;
}
.tv-osd {
  position: absolute;
  inset: clamp(24px, 4vw, 62px) clamp(24px, 4vw, 62px) auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  z-index: 7;
  color: #dbf6b6;
  text-shadow:
    2px 2px 0 #061629,
    0 0 9px #baff7740;
  font:
    700 clamp(13px, 2vw, 27px)/1.2 "Courier New",
    monospace;
  letter-spacing: 0.055em;
}
.tv-signal {
  position: absolute;
  inset: auto clamp(24px, 4vw, 62px) clamp(44px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  z-index: 3;
  color: #e0e6e6;
  text-shadow: 1px 1px 2px #001127;
  font:
    400 clamp(9px, 0.9vw, 12px)/1.4 "Courier New",
    monospace;
  letter-spacing: 0.15em;
}
.tv-noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  opacity: 0.12;
  pointer-events: none;
  image-rendering: pixelated;
  mix-blend-mode: soft-light;
}
.tv-screen[data-channel="dvd"] .tv-noise {
  opacity: 0.21;
}
.tv-screen[data-tuning="true"] .tv-noise {
  opacity: var(--tv-snow, 0.3);
  mix-blend-mode: normal;
}
.tv-screen[data-phase="detune"] .tv-raster {
  opacity: 0.38;
}
.tv-screen[data-phase="snow"] .tv-raster {
  opacity: 0;
}
.tv-screen[data-phase="lock"] .tv-raster {
  opacity: 1;
}
.tv-glass {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, transparent 0 2px, #00000030 2px 3px),
    radial-gradient(
      ellipse at center,
      transparent 35%,
      #02061150 78%,
      #01030adc 110%
    );
  box-shadow:
    inset 0 0 0 clamp(7px, 1.15vw, 18px) #03060cdd,
    inset 0 0 70px 8px #02060c;
  border-radius: clamp(18px, 4vw, 68px);
}
.tv-hint {
  position: absolute;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 20px;
  right: 20px;
  margin: 0;
  text-align: center;
  font:
    400 10px/1.5 Satoshi,
    Arial,
    sans-serif;
  letter-spacing: 0.035em;
  color: #eeeade;
  text-shadow: 0 1px 3px #000;
  z-index: 7;
  pointer-events: none;
  animation: tv-hint-fade 1s 4s both;
}
.tv-touch-hint {
  display: none;
}
@media (max-width: 720px), (pointer: coarse) {
  .tv-hint {
    animation: none;
    font-size: 12px;
    opacity: 0.8;
    bottom: max(20px, env(safe-area-inset-bottom));
  }
  .tv-desktop-hint {
    display: none;
  }
  .tv-touch-hint {
    display: inline;
  }
}
.tv-dismiss {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  z-index: 8;
  cursor: none;
  touch-action: none;
}
.tv-dismiss:active:not(:disabled) {
  transform: none;
}
.tv-dismiss:focus {
  outline: none;
}
.tv-dismiss:focus-visible {
  outline: 1px solid #ffffff40;
  outline-offset: -8px;
}
.tv-blip {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  pointer-events: none;
  overflow: hidden;
  animation: tv-off 0.28s ease-out both;
  background: radial-gradient(ellipse, #304049 0%, #111b24 48%, #03060c 90%);
  transform-origin: center;
}
.tv-blip canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.14;
  image-rendering: pixelated;
}
.tv-blip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    #d3e2de99 0%,
    #7797a738 18%,
    transparent 66%
  );
  animation: tv-phosphor 0.28s ease-out both;
}
@keyframes tv-on {
  from {
    opacity: 0.65;
    transform: scale(1.008);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes tv-off {
  0% {
    clip-path: inset(0);
    opacity: 0.8;
  }
  28% {
    clip-path: inset(34% 3%);
    opacity: 0.82;
  }
  57% {
    clip-path: inset(49.75% 13%);
    opacity: 0.7;
  }
  78% {
    clip-path: inset(49.8% 47%);
    opacity: 0.48;
  }
  100% {
    clip-path: inset(50%);
    opacity: 0;
  }
}
@keyframes tv-phosphor {
  0% {
    transform: scaleY(1);
  }
  57% {
    transform: scaleY(0.035);
  }
  100% {
    transform: scale(0.01, 0.005);
  }
}
@keyframes tv-field {
  to {
    transform: translate3d(8%, 5%, 0);
  }
}
@keyframes tv-hint-fade {
  to {
    opacity: 0;
  }
}
@media (max-width: 720px) {
  .tv-station {
    width: 86vw;
    gap: 24px;
    padding: 27px 19px;
  }
  .tv-test-disc {
    width: 87vw;
  }
  .tv-station span {
    font-size: 9px;
    letter-spacing: 0.14em;
  }
  .tv-osd {
    inset: 30px 24px auto;
    font-size: 13px;
  }
  .tv-signal {
    inset: auto 24px 50px;
    font-size: 9px;
    letter-spacing: 0.05em;
  }
  .tv-picture,
  .tv-glass {
    border-radius: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tv-picture,
  .tv-orbit,
  .tv-hint {
    animation: none;
  }
  .tv-raster {
    transform: none;
    will-change: auto;
  }
  .tv-logo {
    will-change: auto;
  }
  .tv-hint {
    opacity: 0.8;
  }
  .tv-noise {
    opacity: 0.06;
  }
  .tv-blip {
    display: none;
  }
}
