/* Golazo Quiz · estilos MOBILE (< 900 px / táctil). Complementa core/style.css
   Principios: una columna, objetivos táctiles ≥ 48 px, safe-areas, sin hover, hoja de acción fija. */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
.m-screen { min-height: 100dvh; }
.m-tap { min-height: 48px; }
.m-tap:active { transform: scale(0.97); }
.mode-btn:hover { transform: none; box-shadow: none; }          /* sin efectos hover en táctil */
.opt:hover:not(:disabled) { transform: none; background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.14); }
.opt:active:not(:disabled) { background: rgba(255,255,255,0.12); border-color: rgba(55,255,139,0.5); }
.node.reachable:hover { transform: none; }
.node.reachable { transform: scale(1.12); }

/* ---- pantalla de juego: rival / tablero / yo + hoja inferior ---- */
.m-game { min-height: 100dvh; padding-bottom: calc(var(--sheet-h, 130px) + env(safe-area-inset-bottom) + 8px); }
.m-board { max-width: min(100%, calc((100dvh - 275px) * 0.625)); margin: 0 auto; border-radius: 14px; }
.m-card .avatar-ring { flex-shrink: 0; }
.m-medal { width: 16px; height: 16px; }
.m-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  margin: 0 auto; max-width: 480px;
  border-radius: 20px 20px 0 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-bottom: none; --sheet-h: 150px;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: max-height 0.25s ease;
  max-height: 40dvh; overflow-y: auto;
}
.m-sheet::before { content: ''; display: block; width: 44px; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.18); margin: -4px auto 10px; }
.m-sheet.m-sheet-tall { max-height: 72dvh; }
.m-game { --sheet-h: 130px; }
.m-q { padding: 0; }
.m-q::before { display: none; }
.q-card.m-q { border-radius: 0; overflow: visible; }
.dice { width: 54px; height: 54px; padding: 8px; border-radius: 12px; }

/* ---- chat a pantalla completa ---- */
.m-fab { right: 12px; bottom: calc(var(--sheet-h, 150px) + env(safe-area-inset-bottom) + 18px); width: 50px; height: 50px; }
body.chat-open .m-fab { display: none; }
.m-chat { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; right: 0; left: 0; }
.m-chat .chat-log { max-height: none; min-height: 0; }
.m-chat .emoji-grid button { min-height: 44px; font-size: 22px; }

/* ---- pantallas apaisadas en móvil: dos columnas compactas ---- */
@media (orientation: landscape) and (max-height: 520px) {
  .m-game { display: grid; grid-template-columns: minmax(0, 46%) 1fr; grid-template-areas: "top sheet" "board sheet" "bottom sheet"; column-gap: 8px; padding-bottom: 8px; }
  .m-game > div:first-child { grid-column: 1 / -1; }
  #hud-top { grid-area: top; } #hud-bottom { grid-area: bottom; } .m-board { grid-area: board; max-width: none; }
  .m-sheet { position: sticky; grid-area: sheet; top: 8px; max-height: calc(100dvh - 16px); border-radius: 16px; align-self: start; }
  .m-sheet::before { display: none; }
  .m-fab { bottom: 12px; }
}
/* pantallas muy pequeñas (≤ 360 px) */
@media (max-width: 360px) {
  .m-screen { padding-left: 10px; padding-right: 10px; }
  .neon-text.text-\[38px\] { font-size: 32px; }
}

/* avisos arriba para no tapar la hoja de acción */
#toast-root { top: calc(env(safe-area-inset-top) + 56px); bottom: auto; }
/* tablets (≥ 700 px): tablero más grande y hoja centrada */
@media (min-width: 700px) and (orientation: portrait) {
  .m-game, .m-sheet { max-width: 640px; }
  .m-board { max-width: min(100%, calc((100dvh - 300px) * 0.625)); }
  .m-screen { max-width: 560px; }
}
