/* Mestre Lúdico no app instalado (classe "como-app" vem do js/app.js). No navegador nada muda. */
html.como-app { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
html.como-app body { overscroll-behavior-y: none; padding-top: env(safe-area-inset-top); }
html.como-app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.como-app select, html.como-app textarea { font-size: max(16px, 1em); }
html.como-app button, html.como-app .menu-item, html.como-app .app-aba, html.como-app .chip { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
html.como-app img { -webkit-user-drag: none; }

.app-abas, .app-voltar-aldemar { display: none; }
html.como-app .app-abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--linha);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -6px 20px rgba(35, 37, 58, .06);
}
html.como-app .app-aba {
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; padding: 7px 2px 5px;
  border: 0; border-radius: 14px; background: none; color: #8A8DA3; font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer;
}
html.como-app .app-aba svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
html.como-app .app-aba.ativa { color: var(--laranja-2); background: #FFE9DE; }
html.como-app .app-aba:active { transform: scale(.95); }

html.como-app.app-com-abas .conteudo { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
/* no app o menu do topo vira a aba "Mais" */
html.como-app.app-com-abas .menu-abrir { display: none !important; }
html.como-app.app-com-abas .lateral { z-index: 40; }
html.como-app.app-com-abas .lateral { padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }

html.como-app .barra { position: sticky; top: 0; z-index: 20; gap: 10px; }
html.como-app .app-voltar-aldemar {
  display: inline-flex; align-items: center; gap: 2px; padding: 6px 10px 6px 4px; border-radius: 999px;
  background: #F3F4F8; color: var(--tinta); font-weight: 800; font-size: .86rem; text-decoration: none; flex: 0 0 auto;
}
html.como-app .app-voltar-aldemar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* telas de celular: mais conteúdo por tela */
@media (max-width: 600px) {
  html.como-app .conteudo { padding-left: 12px; padding-right: 12px; }
  html.como-app .grade-bib { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html.como-app .bib-cartao { padding: 6px; border-radius: 16px; }
  html.como-app .bib-corpo-jogo { padding: 6px 0 0; }
  html.como-app .bib-corpo-jogo .acoes { gap: 6px; }
  html.como-app .bib-corpo-jogo .acoes .botao { padding: 8px 6px; font-size: .82rem; min-height: 0; box-shadow: 0 3px 0 var(--laranja-2); }
  html.como-app .bib-corpo-jogo .acoes .botao.secundario { box-shadow: 0 3px 0 var(--linha); }
  html.como-app .bib-corpo-jogo .acoes .botao svg { width: 15px; height: 15px; }
  html.como-app .boas-vindas h2, html.como-app .titulo-secao { font-size: 1.45rem; }
  html.como-app .barra-titulo { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
