@font-face {
  font-family: 'Fredoka';
  src: url('/public/assets/fonts/fredoka.woff2') format('woff2');
  font-weight: 300 700;
  font-display: block;
}
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-user-select: none; -moz-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden; overscroll-behavior: none;
  background: #12301F;
  font-family: 'Fredoka', system-ui, sans-serif;
}
body { position: fixed; inset: 0; }
#game {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  touch-action: none; overflow: hidden;
}
#game canvas { display: block; touch-action: none; }

/* Overlay de orientación (solo en vertical en pantallas táctiles/chicas) */
#rotate, #boot-error {
  position: fixed; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #2E9D5B 0%, #1E7A46 45%, #12301F 100%);
  color: #fff; text-align: center; padding: 24px;
}
#boot-error:not([hidden]) { display: flex; }
@media (orientation: portrait) and (max-width: 1024px) {
  #rotate { display: flex; }
}
.rot-card { max-width: 320px; }
.rot-card h2 { font-size: 28px; font-weight: 700; margin: 24px 0 8px; letter-spacing: .5px; }
.rot-card p  { font-size: 18px; margin: 0; line-height: 1.4; color: #E8F5EC; }
.rot-card button {
  margin-top: 20px; min-height: 56px; padding: 0 28px; font: 700 20px 'Fredoka', sans-serif;
  background: #FFC107; color: #1A1F2B; border: 0; border-radius: 16px; box-shadow: 0 6px 0 #B8860B;
}
.rot-phone {
  width: 70px; height: 120px; margin: 0 auto; border: 6px solid #FFC107; border-radius: 14px;
  position: relative; animation: girar 2.2s ease-in-out infinite;
}
.rot-screen { position: absolute; inset: 8px 4px; background: rgba(255,255,255,.25); border-radius: 4px; }
@keyframes girar {
  0%, 20% { transform: rotate(0deg); }
  50%, 80% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .rot-phone { animation: none; transform: rotate(-90deg); } }
