:root {
  color-scheme: dark;
  --bg: #101018;
  --panel: #1b1b2b;
  --text: #e7f6d5;
  --accent: #f2c14e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, #151522 0%, #0b0b12 100%);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
}

body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.game-shell {
  display: grid;
  gap: 10px;
  justify-items: center;
  width: min(100%, 1280px);
}

canvas {
  display: block;
  /* Largest 16:9 window that fits: grows with viewport height, fills width on
     phones, capped by .game-shell (1280px) so it stays a tidy centred window
     on big monitors rather than sprawling. ~96px is reserved for the hint. */
  width: min(100%, calc((100svh - 96px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #111827;
  border: 4px solid #39395a;
  box-shadow: 0 0 0 4px #08080e, 0 18px 38px rgba(0, 0, 0, 0.45);
  cursor: crosshair;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.hint {
  margin: 0;
  color: #a9b8a0;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 560px) {
  body {
    padding: 10px;
  }

  canvas {
    border-width: 3px;
  }

  .hint {
    font-size: 12px;
  }
}
