* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #20242b;
  color: #111827;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", YuGothic, "Hiragino Sans", Meiryo, sans-serif;
}

body {
  overflow: hidden;
  touch-action: none;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  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-frame {
  position: relative;
  width: min(100vw - 20px, calc((100vh - 20px) * 640 / 1136));
  max-width: 640px;
  aspect-ratio: 640 / 1136;
  background: #e7f3d4;
  box-shadow: 0 18px 54px rgb(0 0 0 / 0.36);
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
