* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  /* position:fixed prevents iOS rubber-band scroll */
  position: fixed;
  top: 0;
  left: 0;
}

/*
 * Centre the Phaser canvas on desktop; stretch-fit on mobile.
 * We own the centering via flexbox and tell Phaser Scale.NO_CENTER
 * so its inline-margin injection doesn't fight the flex layout.
 */
#game-container {
  position: fixed;
  inset: 0;                  /* top/right/bottom/left: 0  */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#game-container canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  /* Phaser Scale.FIT resizes the canvas; flex centres it. */
  max-width: 100vw;
  max-height: 100vh;
  touch-action: none;
}
