html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Sized from JS to the largest fit for the viewport. */
#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#screen {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* Extra canvases chapters stack above #screen (see game.addLayer). */
.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  pointer-events: none;
}

#fade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 1;
  pointer-events: none;
}

/* DOM layer above the canvas for things canvas is bad at (e.g. the code editor). */
#overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#overlay > * {
  pointer-events: auto;
}
