* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  color: #aaa;
  font-family: "Press Start 2P", "Courier New", monospace;
}

/* 320x200 shown at 4:3, the way an EGA monitor stretched it */
.stage {
  position: fixed;
  left: 50%;
  top: calc(50% - 12px);
  width: min(100vw, calc((100dvh - 40px) * 4 / 3));
  aspect-ratio: 4 / 3;
  transform: translate(-50%, -50%);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  outline: none;
}

.home {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  color: #aaa;
  font-size: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.home:hover, .home:focus-visible { color: #ffff55; }

.nojs {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #fff;
  font-size: 12px;
}
