:root { color-scheme: dark; --fg: #c8c8ff; --line: #303070; }
html, body { margin: 0; height: 100%; background: #000; color: var(--fg); overflow: hidden;
  font: 14px/1.4 system-ui, sans-serif; }
#stage { position: fixed; inset: 0; display: grid; place-items: center; }
/* Both the start screen and the game draw at 640x480; scale to fit, keeping
   4:3 and crisp pixels. */
#front, #canvas { grid-area: 1 / 1; width: min(100vw, calc(100vh * 4 / 3)); height: min(100vh, calc(100vw * 3 / 4));
  image-rendering: pixelated; outline: none; background: #000; }
#front[hidden], #canvas[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.corner { position: fixed; top: 10px; right: 10px; width: 34px; height: 34px; font-size: 18px; line-height: 1;
  color: var(--fg); background: rgba(10, 10, 38, .7); border: 1px solid var(--line); border-radius: 4px;
  cursor: pointer; opacity: 0; transition: opacity .3s; }
body.pointer .corner, .corner:focus-visible { opacity: 1; }
