* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #141817;
  color: #f6eed7;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  overflow: hidden;
}

.shell {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 10%, rgba(248, 190, 66, 0.18), transparent 32%),
    linear-gradient(180deg, #202927 0%, #111514 100%);
}

.game-panel {
  position: relative;
  width: min(100%, 1120px);
  aspect-ratio: 16 / 9;
  border: 4px solid #0b0d0c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52), inset 0 0 0 2px #e8aa39;
  background: #111;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.mobile-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: none;
  grid-template-columns: repeat(5, 52px);
  gap: 8px;
  justify-content: space-between;
  pointer-events: none;
}

.mobile-controls button {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 240, 196, 0.7);
  border-radius: 8px;
  background: rgba(20, 24, 23, 0.64);
  color: #fff0c4;
  font: 700 22px/1 Arial, sans-serif;
  pointer-events: auto;
}

@media (max-width: 760px), (pointer: coarse) {
  body {
    overflow: auto;
  }

  .shell {
    align-content: start;
    padding: 8px;
  }

  .game-panel {
    width: 100%;
    margin-top: 8px;
  }

  .mobile-controls {
    display: grid;
  }
}
