.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1198 / 759;
}
.tv-mockup {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}
/* The image includes a transparent shadow: these coordinates are the actual
   display opening (x=98, y=73, width=1002 in the 1198 x 759 source). */
.video-wrapper {
  position: absolute;
  left: 8.18%;
  top: 9.62%;
  width: 83.64%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}
.video-on-tv {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}
.video-on-tv.video-current {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}
.video-on-tv.video-outgoing {
  opacity: 1;
  z-index: 1;
}
.video-on-tv.video-incoming {
  opacity: 0;
  z-index: 2;
  transition: opacity 0.24s linear;
}
.video-on-tv.video-incoming.video-reveal {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .video-on-tv.video-incoming {
    transition: none;
  }
}
.play-pause-btn {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(48px, 6vw, 80px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(229 68 17 / 85%);
  box-shadow: 0 4px 24px rgb(0 0 0 / 15%);
  /* Backdrop filters can shift Gecko's video raster when controls fade.
     Keep the overlay translucent without sampling the video behind it. */
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transition:
    opacity 0.25s,
    background 0.25s;
}
.play-pause-btn::after {
  content: '';
  position: absolute;
  inset: 30% 32%;
  border-left: 7px solid white;
  border-right: 7px solid white;
}
.play-pause-btn.paused::after {
  inset: 28% 28% 28% 38%;
  border: 0;
  background: white;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.play-pause-btn.paused,
.play-pause-btn:focus-visible {
  opacity: 1;
}
@media (hover: hover) and (pointer: fine) {
  .video-wrapper:hover .play-pause-btn {
    opacity: 1;
  }
}
.play-pause-btn:hover {
  background: var(--accent);
}
.play-pause-btn.changing {
  opacity: 0;
  pointer-events: none;
}
.player-status {
  position: absolute;
  z-index: 4;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 8px 12px;
  margin: 0;
  border-radius: 6px;
  background: rgb(0 0 0 / 80%);
  color: white;
  text-align: center;
  font-size: var(--ui-font-size);
  line-height: 1.4;
  pointer-events: none;
}
.player-status[hidden] {
  display: none;
}
