* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(155, 188, 15, 0.14), transparent 32%),
    linear-gradient(180deg, #182820 0%, #081820 100%);
  color: #d8f7a7;
  font-family: "MS Gothic", "Osaka-Mono", "Courier New", monospace;
}

.game-shell {
  width: min(100vw, 880px);
  max-height: 100svh;
  padding: clamp(10px, 3vw, 24px);
  touch-action: none;
}

h1 {
  margin: 0 0 12px;
  color: #d8f7a7;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(155, 188, 15, 0.45);
}

h1 span {
  color: #88c070;
  font-size: 14px;
}

.orientation-hint {
  display: none;
  margin: -4px 0 10px;
  color: #d8f7a7;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

canvas {
  display: block;
  width: min(800px, calc(100vw - 24px), calc((100svh - 96px) * 4 / 3));
  height: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100svh - 96px);
  aspect-ratio: 4 / 3;
  background: #9bbc0f;
  border: 8px solid #346856;
  border-radius: 8px;
  box-shadow:
    0 0 0 4px #081820,
    0 18px 48px rgba(0, 0, 0, 0.55),
    inset 0 0 34px rgba(8, 24, 32, 0.42);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  user-select: none;
}

@media (orientation: portrait) and (max-width: 820px) {
  .orientation-hint {
    display: block;
  }

  h1 {
    margin-bottom: 8px;
    font-size: 18px;
  }

  h1 span {
    display: block;
    margin-top: 2px;
    font-size: 11px;
  }

  canvas {
    width: min(calc(100vw - 20px), calc((100svh - 108px) * 4 / 3));
    max-height: calc(100svh - 108px);
  }
}
