html, body {
  margin: 0; height: 100%; background: #000; overflow: hidden;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  touch-action: none; cursor: none;
}
#frame { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#screen {
  position: relative; width: 960px; height: 640px; flex: none;
  transform-origin: 50% 50%; overflow: hidden; background: #000;
}
#view, #view2d { position: absolute; inset: 0; width: 960px; height: 640px; display: block; }
#view2d { display: none; }

#scan {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .55;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.55) 3px, rgba(0,0,0,0) 4px);
}
#grain {
  position: absolute; inset: 0; width: 960px; height: 640px; pointer-events: none;
  mix-blend-mode: screen; opacity: .16; image-rendering: pixelated;
}
#clip { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }

/* touch controls: only shown on coarse pointers */
#touch { position: absolute; inset: 0; display: none; }
.touch #touch { display: block; }
/* invisible hit areas; the keycaps themselves are drawn inside the canvas */
.tbtn { position: absolute; width: 120px; height: 120px; border-radius: 50%; }
#tz { right: 142px; bottom: 32px; }
#tx { right: 22px; bottom: 112px; }
