/* The analogue effect is confined to the glass; monitor hardware is untouched. */
.screen-surface > .crt-signal {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.screen-surface[data-signal] > .crt-signal { display: block; }
.screen-surface[data-signal] > iframe,
.screen-surface[data-signal] > .screen-boot {
  transform: scale(var(--crt-image-x, 1), var(--crt-image-y, 1));
  transform-origin: 50% 50%;
  transition: none;
  filter: grayscale(1) contrast(1.08);
  pointer-events: none !important;
}
.screen-surface[data-signal].is-loaded > iframe,
.screen-surface[data-signal]:not(.is-loaded) > .screen-boot {
  opacity: var(--crt-image-opacity, 0);
}
.screen-surface[data-signal] > .screen-glass {
  opacity: var(--crt-glass-opacity, 0);
}
.screen-surface[data-signal] > .screen-start {
  visibility: hidden;
  pointer-events: none !important;
}
.screen-surface[data-signal-reduced='true'] > iframe,
.screen-surface[data-signal-reduced='true'] > .screen-boot { filter: none; }

/* Override the WebGL renderer's broad #scene canvas rule for this small canvas. */
#scene .screen-surface canvas.crt-signal-noise,
.screen-surface canvas.crt-signal-noise {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: var(--crt-noise-opacity, 0);
  transform: scaleY(var(--crt-image-y, 1));
  transform-origin: 50% 50%;
  image-rendering: pixelated;
}
.crt-signal-line {
  position: absolute;
  top: calc(50% - 2px);
  left: 3%;
  width: 94%;
  height: 4px;
  border-radius: 50%;
  background: #d9e2d6;
  box-shadow: 0 0 7px 3px #d2e0cc5e;
  opacity: var(--crt-line-opacity, 0);
  transform: scaleX(var(--crt-line-x, 1));
  transform-origin: 50% 50%;
}
.crt-signal-dot {
  position: absolute;
  top: calc(50% - 4px);
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dbe4d8;
  box-shadow: 0 0 8px 4px #c9d8c24d;
  opacity: var(--crt-dot-opacity, 0);
}
