*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Safe area insets for notched devices */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

#game {
  display: block;
  background: #111;
  touch-action: none;
  /* Letterbox: fit 400:700 ratio within the viewport */
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 400 / 700;
  /* Ensure it never overflows */
  object-fit: contain;
}
