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

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html, body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#game-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

canvas#game {
  display: block;
  /* Width/height/position set from JS via visualViewport */
  position: absolute;
  top: 0;
  left: 0;
  cursor: crosshair;
  /* iOS Safari: disable all browser gesture handling on the game surface
     (pinch-zoom, double-tap-zoom, scroll-intent detection, 300ms tap delay).
     touch-action is NOT inherited from body, so it MUST be set here. */
  touch-action: none;
  -ms-touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
