* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%;
  height: 100dvh;
  background: #000000;
  overflow: hidden;
  /* Prevent iOS/Chrome from stealing game touches for scrolling,
     pull-to-refresh, or swipe-to-navigate gestures */
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

#game-container {
  width: 100dvw;
  height: 100dvh;
  touch-action: none;
}

/* Belt-and-suspenders: also on the canvas itself */
#game-container canvas {
  touch-action: none;
}

/* ── Portrait splash — mobile entry screen ── */
#portrait-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #10243f;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  padding: 2.5rem 2rem;
}

.ps-logo-cabinet {
  font-family: 'Anton', 'Arial Black', Arial, sans-serif;
  font-size: 3.5rem;
  color: #ffffff;
  line-height: 1;
  letter-spacing: 0.08em;
}

.ps-logo-chaos {
  font-family: 'Anton', 'Arial Black', Arial, sans-serif;
  font-size: 5.5rem;
  color: #F2B22E;
  line-height: 1;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.ps-banner {
  background: #E63329;
  color: #ffffff;
  font-family: 'Anton', 'Arial Black', Arial, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  margin-bottom: 2.5rem;
}

.ps-tagline {
  font-family: 'Nunito', Arial, sans-serif;
  font-weight: 400;
  font-size: 1.2rem;
  color: #aabbcc;
  line-height: 1.6;
  margin-bottom: 3rem;
}

#enter-chaos-btn {
  background: #E63329;
  color: #ffffff;
  font-family: 'Nunito', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#enter-chaos-btn:active {
  background: #c42820;
}

.ps-disclaimer {
  font-family: 'Nunito', Arial, sans-serif;
  font-weight: 400;
  font-size: 0.65rem;
  color: #3a5a7a;
  position: absolute;
  bottom: 1.5rem;
  letter-spacing: 0.02em;
}

/* ── Rotate overlay — shown after ENTER THE CHAOS on portrait mobile ── */
#rotate-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #1a1a2e;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: 'Nunito', Arial, sans-serif;
  text-align: center;
  padding: 2rem;
}

.rotate-top {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 2rem;
  color: #ff6b35;
}

.rotate-bottom {
  font-size: 1.25rem;
  color: #cccccc;
}

/* Mid-game portrait guard — if user rotates back during gameplay */
@media screen and (orientation: portrait) {
  #rotate-overlay { display: flex; }
  #game-container { display: none; }
}
