:root {
  color-scheme: dark;
  font-family: "Courier New", "MS Gothic", monospace;
  background: #0b1516;
  color: #b9d89d;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
}

body {
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 40%, #203836 0, #101e1f 52%, #071011 100%);
}

.game-shell {
  width: min(100%, calc((100vh - 54px) * 16 / 9), 960px);
  text-align: center;
}

.screen-frame {
  border: clamp(5px, 1.2vw, 11px) solid #304846;
  border-radius: 5px;
  padding: clamp(3px, 0.6vw, 6px);
  background: #09100f;
  box-shadow: 0 0 0 2px #080d0d, 0 12px 35px #0009;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #9fbd83;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: pointer;
}

.controls {
  margin: 10px 0 0;
  color: #78998a;
  font-size: clamp(9px, 1.8vw, 13px);
  letter-spacing: 0.08em;
}

@media (orientation: portrait) {
  .game-shell {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen-frame {
    box-shadow: 0 0 0 2px #080d0d;
  }
}
