/* Tafel Rush – de game is één pixel-canvas dat het venster vult (letterbox). */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #120c18;
  /* geen tekstselectie / tap-highlight tijdens snel typen of tikken */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#kbd {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  padding: 0;
  font-size: 16px; /* voorkomt automatisch inzoomen op mobiel */
  pointer-events: none;
}

/* De stage vult het zichtbare scherm; de browser centreert de game erin.
   Meten (Renderer.resize) en plaatsen gebeuren zo in hetzelfde vak, ook op
   iPhone waar de schermmaat en "vast op het scherm" anders kunnen uitvallen. */
#stage {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;     /* zichtbare hoogte op mobiel (zonder adresbalk-gedoe) */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #120c18;
}

#game {
  position: relative;
  flex: none;
  display: block;
  outline: none;
  /* de renderer schaalt al met een integer factor; de browser doet de laatste (kleine) stap */
  image-rendering: auto;
  background: #120c18;
}

/* --- "Draai je telefoon": alleen op touchapparaten die rechtop gehouden worden --- */
#rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  background: #120c18;
  color: #ffc93c;
  font: bold 20px/1.3 monospace;
  letter-spacing: 1px;
  text-align: center;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
#rotate small { color: #a8a0c8; font-size: 13px; }
.rotate-phone {
  width: 46px;
  height: 80px;
  border: 5px solid #e8e4ff;
  border-radius: 10px;
  box-shadow: 0 0 0 3px #44307a;
  animation: rotate-hint 2.2s ease-in-out infinite;
}
@keyframes rotate-hint {
  0%, 25% { transform: rotate(0deg); }
  55%, 100% { transform: rotate(-90deg); }
}
@media (orientation: portrait) and (pointer: coarse) {
  #rotate { display: flex; }
}

/* iPhone/iPad: geen "bounce", knijp-zoom of verschoven pagina na het draaien */
body { overscroll-behavior: none; -webkit-touch-callout: none; }
