* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #fff3df;
  color: #271815;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  touch-action: manipulation;
}

body {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 200, 87, 0.38), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(16, 135, 127, 0.2), transparent 26%),
    linear-gradient(180deg, #fff8ea 0%, #ffd8a8 52%, #f6a66f 100%);
}

.game-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

canvas {
  display: block;
  width: min(100%, calc(100vh * 16 / 9));
  height: min(100%, calc(100vw * 9 / 16));
  max-width: 1280px;
  max-height: 720px;
  border: 10px solid rgba(255, 248, 234, 0.84);
  border-radius: 8px;
  background: #fff8ed;
  box-shadow:
    0 28px 90px rgba(85, 42, 17, 0.24),
    0 0 0 1px rgba(78, 41, 29, 0.12);
}

@media (max-aspect-ratio: 4 / 5) {
  canvas {
    width: 100%;
    height: auto;
    max-height: 96vh;
    border-width: 6px;
    border-radius: 8px;
  }
}
