/*
 * La Oca de Toledo · Hotfix móvil v0.7.9.80
 * Alcance: SOLO pantallas móviles. No cambia desktop.
 */
@media (max-width: 820px) {
  html.lot-mobile-hotfix-ready,
  body.lot-mobile-hotfix-ready {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  /* El lanzador deja de quedar atrapado en una caja con altura fija. */
  [data-lot-mobile-hotfix-shell="1"] {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
  }

  [data-lot-mobile-hotfix-card="1"] {
    box-sizing: border-box !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    overflow: visible !important;
    overflow-y: visible !important;
    clip: auto !important;
    transform: none !important;
  }

  /* Cuando comienza la partida, el juego sale del layout de WordPress/Divi. */
  html.lot-mobile-hotfix-game,
  body.lot-mobile-hotfix-game {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  body.lot-mobile-hotfix-game {
    position: fixed !important;
    inset: 0 !important;
  }

  [data-lot-mobile-hotfix-root="1"] {
    --lot-mobile-vh: 100dvh;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: var(--lot-mobile-vh) !important;
    min-height: var(--lot-mobile-vh) !important;
    max-height: var(--lot-mobile-vh) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y pinch-zoom !important;
    transform: none !important;
    translate: none !important;
    contain: none !important;
    background: #05050b;
  }

  [data-lot-mobile-hotfix-root="1"] > * {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }

  /* Evita que un contenedor interno vuelva a cortar la partida verticalmente. */
  [data-lot-mobile-hotfix-root="1"] [style*="overflow: hidden"],
  [data-lot-mobile-hotfix-root="1"] [style*="overflow:hidden"] {
    max-height: none;
  }

  /* Formularios y controles no pueden forzar un ancho superior al viewport. */
  [data-lot-mobile-hotfix-root="1"] img,
  [data-lot-mobile-hotfix-root="1"] canvas,
  [data-lot-mobile-hotfix-root="1"] video,
  [data-lot-mobile-hotfix-root="1"] svg {
    max-width: 100% !important;
  }
}
