* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --primaria: #1565c0;
  --primaria-escura: #0b2e66;
  --amarelo: #f7df1c;
  --azul: #0095d9;
  --azul-claro: #3cc8e8;
  --verde: #2e9e5b;
  --vermelho: #e53935;
  --texto: #13294b;
  --branco: #ffffff;
  --sombra: 0 6px 0 rgba(11, 46, 102, 0.25);
}

html, body { min-height: 100%; }

body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--texto);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.7), transparent 40%),
    linear-gradient(120deg, #fff6c7 0%, #d6ecff 35%, #b8d8ff 70%, #cfe2ff 100%);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button { font-family: 'Fredoka', 'Nunito', sans-serif; cursor: pointer; border: none; }

/* ---------- Moldura de enfeites ---------- */
.moldura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.enfeite {
  position: absolute;
  filter: drop-shadow(0 3px 0 rgba(11, 46, 102, 0.2));
  animation: boiar 6s ease-in-out infinite;
}

@keyframes boiar {
  50% { transform: translateY(-6px) rotate(var(--giro, 0deg)); }
}

/* ---------- Estrutura ---------- */
.app {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) clamp(14px, 4vw, 40px) 70px;
}

.topo {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 6px 0 4px;
}

.logo { height: clamp(78px, 13vw, 120px); }

.btn-icone {
  position: absolute;
  right: 0;
  top: 10px;
  width: 46px;
  height: 46px;
  font-size: 20px;
  border-radius: 50%;
  background: var(--branco);
  box-shadow: var(--sombra);
}

.tela { display: none; }
.tela.ativa { display: block; animation: entrar 0.35s ease; }

@keyframes entrar {
  from { opacity: 0; transform: translateY(12px); }
}

/* ---------- Títulos ---------- */
.titulo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  text-align: center;
  line-height: 1.02;
  font-size: clamp(38px, 8vw, 78px);
  margin: 6px 0 10px;
  letter-spacing: 0.01em;
}

.titulo span {
  display: inline-block;
  -webkit-text-stroke: 0.09em var(--primaria-escura);
  paint-order: stroke fill;
  text-shadow: 0 0.07em 0 var(--primaria-escura);
  margin: 0 0.1em;
}

.cor-amarelo { color: var(--amarelo); }
.cor-azul { color: var(--azul-claro); }
.cor-vermelho { color: var(--vermelho); }

.subtitulo {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4.5vw, 40px);
  text-align: center;
  color: var(--primaria);
  margin: 6px 0 16px;
}

/* ---------- Botões ---------- */
.btn-grande {
  display: block;
  margin: 18px auto 0;
  padding: 16px 44px;
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 700;
  color: var(--branco);
  background: linear-gradient(180deg, #2f86e0, var(--primaria));
  border-radius: 999px;
  box-shadow: 0 7px 0 var(--primaria-escura);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-grande:hover { transform: translateY(-2px); }
.btn-grande:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--primaria-escura); }

.btn-sec {
  display: block;
  margin: 14px auto 0;
  padding: 11px 24px;
  font-size: 18px;
  font-weight: 600;
  color: var(--primaria);
  background: var(--branco);
  border-radius: 999px;
  box-shadow: var(--sombra);
}

.btn-pequeno { margin: 0; padding: 8px 16px; font-size: 15px; }

.linha-botoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 18px;
  margin-top: 6px;
}

.linha-botoes .btn-grande, .linha-botoes .btn-sec { margin: 10px 0 0; }

/* ---------- Davi e balão ---------- */
.cena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.davi-area { width: clamp(110px, 18vw, 170px); flex-shrink: 0; }
.davi-area.grande { width: clamp(150px, 26vw, 240px); }
.davi { width: 100%; height: auto; display: block; }

.davi-oi .davi-aceno { transform-origin: 156px 150px; animation: acenar 0.9s ease-in-out infinite; }
@keyframes acenar { 50% { transform: rotate(-14deg); } }

.davi-area.pula .davi { animation: pular 0.5s ease; }
@keyframes pular { 40% { transform: translateY(-16px) scale(1.04); } }

.davi-area.balanca .davi { animation: balancar 0.5s ease; }
@keyframes balancar { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }

.balao {
  position: relative;
  max-width: 440px;
  padding: 16px 20px;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.45;
  font-weight: 700;
  background: var(--branco);
  border: 4px solid var(--primaria);
  border-radius: 24px;
  box-shadow: var(--sombra);
}

.balao b { color: var(--primaria); }

.balao-esq::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 40%;
  border: 12px solid transparent;
  border-right: 16px solid var(--primaria);
}

.balao-rotulo {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  color: var(--primaria-escura);
  background: var(--amarelo);
  border-radius: 999px;
}

.balao.certo { border-color: var(--verde); }
.balao.errado { border-color: var(--vermelho); }

/* ---------- Missões ---------- */
.grade-missoes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.missao {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px 14px;
  background: var(--branco);
  border-radius: 22px;
  border-bottom: 7px solid var(--c);
  box-shadow: var(--sombra);
  transition: transform 0.15s;
  color: var(--texto);
}

.missao:hover { transform: translateY(-4px) rotate(-1deg); }
.missao-icone { font-size: 44px; line-height: 1; }
.missao-titulo { font-size: 22px; font-weight: 700; color: var(--c); }
.missao-estrelas { font-size: 20px; letter-spacing: 2px; }
.missao-estrelas .apagada { filter: grayscale(1); opacity: 0.3; }

.total-estrelas {
  margin-top: 16px;
  text-align: center;
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  color: var(--primaria);
}

/* ---------- Cartões ---------- */
.cartao {
  padding: clamp(16px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 30px;
  box-shadow: 0 8px 0 rgba(11, 46, 102, 0.18);
  backdrop-filter: blur(4px);
}

.regra-topo { display: flex; justify-content: center; align-items: center; gap: 12px; }
.regra-icone { font-size: 46px; }
.regra-topo .subtitulo { margin: 0; color: var(--c, var(--primaria)); }
.cena-regra { margin: 14px 0 6px; }

/* ---------- Pergunta ---------- */
.barra {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.barra-titulo {
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--primaria);
}

.progresso { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.progresso i { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); border: 3px solid var(--primaria); }
.progresso i.feita { background: var(--verde); border-color: var(--verde); }
.progresso i.atual { background: var(--amarelo); }

.jogo-grade {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 18px;
  align-items: start;
}

.cena-jogo { flex-direction: column; gap: 10px; }
.cena-jogo .davi-area { width: clamp(110px, 16vw, 160px); }
.balao-cima::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  margin-left: -12px;
  border: 12px solid transparent;
  border-bottom: 16px solid var(--primaria);
}
.balao-cima.certo::before { border-bottom-color: var(--verde); }
.balao-cima.errado::before { border-bottom-color: var(--vermelho); }

.cartao-pergunta { text-align: center; }

.figura { font-size: clamp(80px, 14vw, 130px); line-height: 1.1; }

/* figura do cartaz: cartão branco com borda na cor da missão */
.figura img {
  display: block;
  width: clamp(130px, 22vw, 190px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 6px;
  background: #fff;
  border: 4px solid var(--c, var(--primaria));
  border-radius: 22px;
  box-shadow: 0 6px 0 rgba(11, 46, 102, 0.18);
  object-fit: contain;
  animation: entrar 0.35s ease;
}

.btn-ouvir {
  margin: 6px auto 12px;
  padding: 8px 18px;
  font-size: 17px;
  font-weight: 600;
  color: var(--azul);
  background: #e6f6fd;
  border: 3px solid var(--azul);
  border-radius: 999px;
}

.enunciado { font-size: 20px; font-weight: 800; margin-bottom: 10px; }

.palavra {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 20px;
}

.letra {
  min-width: clamp(40px, 7vw, 58px);
  height: clamp(54px, 9vw, 72px);
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(30px, 5.5vw, 46px);
  font-weight: 700;
  color: var(--primaria-escura);
  background: var(--branco);
  border-radius: 14px;
  box-shadow: 0 4px 0 rgba(11, 46, 102, 0.2);
}

.letra.lacuna {
  color: var(--primaria);
  background: #fff8c9;
  border: 4px dashed var(--primaria);
  animation: piscar 1.2s ease-in-out infinite;
}

.letra.lacuna.preenchida {
  color: var(--branco);
  background: var(--verde);
  border: 4px solid var(--verde);
  animation: pular 0.5s ease;
}

@keyframes piscar { 50% { background: #fff1a0; } }

.opcoes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.opcao {
  min-width: 120px;
  padding: 16px 26px;
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 700;
  color: var(--branco);
  background: var(--c, var(--azul));
  border-radius: 22px;
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.1s;
}

.opcao:hover:not(:disabled) { transform: translateY(-3px); }
.opcao:active:not(:disabled) { transform: translateY(4px); }
.opcao.palavra-op { font-size: clamp(22px, 3.8vw, 30px); text-transform: uppercase; }
.opcao.certa { background: var(--verde); box-shadow: 0 7px 0 #1d6b3d; }
.opcao.errada { background: #a9b4c4; box-shadow: none; animation: tremer 0.4s ease; }
.opcao.monstro { background: var(--vermelho); text-decoration: line-through; }
.opcao:disabled { cursor: default; }

@keyframes tremer {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.btn-proxima { margin-top: 22px; }

/* ---------- Fim ---------- */
.cartao-fim { text-align: center; position: relative; z-index: 1; }
.estrelas-fim { font-size: clamp(50px, 10vw, 80px); letter-spacing: 6px; }
.estrelas-fim span { display: inline-block; animation: estrela 0.6s ease backwards; }
.estrelas-fim span:nth-child(2) { animation-delay: 0.2s; }
.estrelas-fim span:nth-child(3) { animation-delay: 0.4s; }
.estrelas-fim .apagada { filter: grayscale(1); opacity: 0.25; }
@keyframes estrela { from { transform: scale(0) rotate(-90deg); } }
.fim-texto { font-size: 20px; font-weight: 800; margin: 8px 0 12px; }
.cartao-fim .davi-area { margin: 0 auto; }

.confete { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.confete span { position: absolute; top: -40px; font-size: 26px; animation: cair linear forwards; }
@keyframes cair { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- Rodapé ---------- */
.credito {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 16px max(14px, env(safe-area-inset-bottom));
  font-size: 14px;
  color: var(--primaria-escura);
  opacity: 0.8;
}

/* ---------- Celular ---------- */
@media (max-width: 720px) {
  .enfeite { opacity: 0.45; }
  .enfeite svg { width: 24px; height: auto; }
  .cena { flex-direction: column; }
  .balao-esq::before {
    left: 50%; top: -20px; margin-left: -12px;
    border: 12px solid transparent; border-bottom: 16px solid var(--primaria);
  }
  .jogo-grade { grid-template-columns: 1fr; }
  .cena-jogo { flex-direction: row; align-items: center; }
  .cena-jogo .davi-area { width: 92px; }
  .balao-cima { font-size: 16px; padding: 10px 14px; }
  .balao-cima::before {
    top: 50%; left: -18px; margin: -12px 0 0;
    border: 12px solid transparent; border-right: 16px solid var(--primaria);
  }
  .balao-cima.certo::before { border-right-color: var(--verde); border-bottom-color: transparent; }
  .balao-cima.errado::before { border-right-color: var(--vermelho); border-bottom-color: transparent; }
  .barra-titulo { font-size: 18px; }
  .progresso { width: 100%; margin-left: 0; }
  .progresso i { width: 13px; height: 13px; }
  .opcao { min-width: 100px; padding: 14px 18px; }
  .btn-icone { width: 40px; height: 40px; font-size: 17px; }
}

/* Celular em pé: tudo mais compacto para caber na tela */
@media (max-width: 720px) {
  .app { padding-bottom: 36px; }
  .logo { height: 70px; }
  .titulo { font-size: clamp(30px, 10vw, 44px); margin: 2px 0 6px; }
  .davi-area.grande { width: 128px; }
  .balao { font-size: 16px; padding: 12px 14px; border-width: 3px; }
  .btn-grande { padding: 13px 34px; font-size: 22px; margin-top: 12px; }
  .subtitulo { font-size: 26px; margin: 2px 0 10px; }
  .grade-missoes { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .missao { padding: 12px 6px 10px; border-radius: 18px; gap: 4px; }
  .missao-icone { font-size: 34px; }
  .missao-titulo { font-size: 17px; }
  .missao-estrelas { font-size: 15px; }
  .cartao { padding: 14px; border-radius: 24px; }
  .regra-icone { font-size: 36px; }
  .figura { font-size: 64px; }
  .figura img { width: 118px; border-width: 3px; border-radius: 18px; }
  .btn-ouvir { margin: 2px auto 8px; padding: 6px 14px; font-size: 15px; }
  .enunciado { font-size: 17px; margin-bottom: 6px; }
  .palavra { gap: 4px; margin: 4px 0 14px; }
  .letra { min-width: 34px; height: 46px; font-size: 28px; border-radius: 11px; }
  .opcao { padding: 12px 16px; font-size: 28px; border-radius: 18px; }
  .opcao.palavra-op { font-size: 22px; }
  .btn-proxima { margin-top: 14px; }
  .cena-jogo .davi-area { width: 78px; }
  .estrelas-fim { font-size: 52px; }
  .fim-texto { font-size: 17px; }
}

/* Celular deitado (tela baixa) */
@media (max-height: 500px) {
  .enfeite { opacity: 0.45; }
  .enfeite svg { width: 24px; height: auto; }
  .app { padding-top: 4px; padding-bottom: 30px; }
  .logo { height: 52px; }
  .btn-icone { top: 2px; width: 38px; height: 38px; font-size: 16px; }
  .titulo { font-size: clamp(26px, 6vw, 40px); margin: 0 0 4px; }
  .davi-area.grande { width: 104px; }
  .balao { font-size: 15px; padding: 10px 14px; }
  .btn-grande { padding: 10px 30px; font-size: 20px; margin-top: 8px; }
  .subtitulo { font-size: 24px; margin: 0 0 8px; }
  .grade-missoes { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .missao { padding: 8px 6px; }
  .missao-icone { font-size: 28px; }
  .missao-titulo { font-size: 16px; }
  .barra { margin-bottom: 8px; }
  .jogo-grade { grid-template-columns: 200px 1fr; gap: 12px; }
  .cena-jogo .davi-area { width: 84px; }
  .cartao { padding: 10px 14px; }
  .figura { font-size: 50px; }
  .figura img { width: 84px; padding: 3px; border-width: 3px; border-radius: 14px; }
  .btn-ouvir { margin: 0 auto 4px; padding: 4px 12px; font-size: 14px; }
  .enunciado { font-size: 16px; margin-bottom: 4px; }
  .palavra { margin: 2px 0 8px; }
  .letra { min-width: 32px; height: 42px; font-size: 26px; }
  .opcao { padding: 8px 18px; font-size: 24px; }
  .btn-proxima { margin-top: 8px; }
  .credito { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Instalar app e privacidade ---------- */
.btn-instalar { border: 3px solid var(--primaria); }
.link-privacidade { margin-top: 12px; text-align: center; font-size: 13px; }
.link-privacidade a { color: var(--primaria-escura); opacity: 0.75; }
.passos { max-width: 520px; margin: 0 auto; padding-left: 26px; font-size: 18px; line-height: 1.7; font-weight: 700; }
.passos b { color: var(--primaria); }

/* ---------- Entrada (nome e senha) ---------- */
.titulo-menor { font-size: clamp(30px, 6vw, 56px); }
.slogan {
  display: table;
  margin: -2px auto 14px;
  padding: 6px 18px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: clamp(16px, 2.6vw, 22px);
  text-align: center;
  color: var(--primaria-escura);
  background: var(--amarelo);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--vermelho);
}
.cartao-login {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.cartao-login .davi-area { width: 110px; margin: 0 auto -6px; }
.campo { display: flex; flex-direction: column; gap: 4px; font-family: 'Fredoka', sans-serif; font-size: 18px; font-weight: 600; color: var(--primaria); }
.campo input {
  font: 700 20px 'Nunito', sans-serif;
  padding: 12px 16px;
  color: var(--texto);
  background: #fff;
  border: 3px solid #a9c4e6;
  border-radius: 16px;
  outline: none;
}
.campo input:focus { border-color: var(--primaria); box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.15); }
.erro-login { min-height: 1.3em; color: var(--vermelho); font-weight: 800; text-align: center; }
.cartao-login .btn-grande { margin-top: 2px; }
.professor-ajuda { font-weight: 700; line-height: 1.5; text-align: center; }
.aviso-ok { color: var(--verde); }
.envio-email { margin: -4px auto 12px; padding: 8px 14px; max-width: 560px; text-align: center; font-weight: 800; border-radius: 14px; background: #e6f6fd; color: var(--primaria-escura); }
.envio-email.ok { background: #eaf8ef; color: #1d6b3d; }
.envio-email.erro { background: #fdecea; color: #b42318; }

/* ---------- Missão "Todas as palavras" e progresso em barra ---------- */
.missao-todas { background: linear-gradient(160deg, #fff7d6, #ffe58a); }
.etiqueta-missao {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--c);
  border-radius: 999px;
}
.progresso-barra { flex: 1; min-width: 120px; height: 14px; background: rgba(255, 255, 255, 0.85); border: 3px solid var(--primaria); border-radius: 999px; overflow: hidden; }
.progresso-barra b { display: block; height: 100%; background: var(--verde); transition: width 0.3s; }
.progresso-num { font-family: 'Fredoka', sans-serif; font-weight: 700; color: var(--primaria); min-width: 54px; text-align: right; }
.progresso:has(.progresso-barra) { flex: 1; align-items: center; gap: 10px; flex-wrap: nowrap; }

/* ---------- Relatório ---------- */
.relatorio { margin-top: 16px; }
.relatorio-titulo { font-family: 'Fredoka', sans-serif; font-size: 26px; color: var(--primaria); text-align: center; }
.relatorio-info { margin: 6px 0 12px; text-align: center; line-height: 1.6; }
.graficos { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 4px 0 14px; }
.grafico { width: 100%; max-width: 300px; height: auto; border: 2px solid #dce9f8; border-radius: 16px; }
.grafico + .grafico { max-width: 440px; }
.grafico-largo, .grafico + .grafico.grafico-largo { max-width: 640px; }
.relatorio-sub { margin: 16px 0 8px; font-family: 'Fredoka', sans-serif; font-size: 20px; color: var(--primaria-escura); }
.relatorio-ok { padding: 14px; text-align: center; font-size: 19px; font-weight: 800; color: var(--verde); background: #eaf8ef; border-radius: 16px; }
.dificuldade { margin-bottom: 10px; padding: 12px 14px; background: #fff; border-left: 7px solid var(--c); border-radius: 14px; box-shadow: 0 3px 0 rgba(11, 46, 102, 0.12); }
.dificuldade h4 { font-family: 'Fredoka', sans-serif; font-size: 19px; color: var(--c); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qtd-erros { font-size: 14px; color: #fff; background: var(--c); padding: 2px 10px; border-radius: 999px; }
.dica-regra { margin-top: 4px; font-size: 16px; line-height: 1.5; }
.dica-regra b { color: var(--primaria); }
.tabela-revisar { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; font-size: 17px; }
.tabela-revisar th { padding: 8px 12px; text-align: left; color: #fff; background: var(--primaria); font-family: 'Fredoka', sans-serif; }
.tabela-revisar td { padding: 8px 12px; border-top: 1px solid #dce9f8; font-weight: 800; }
.tabela-revisar td.certo { color: var(--verde); }
.tabela-revisar td.escreveu { color: var(--vermelho); text-decoration: line-through; text-decoration-thickness: 2px; }
.cartao-fim .davi-area { width: clamp(110px, 18vw, 150px); }

@media (max-width: 720px) {
  .relatorio-titulo { font-size: 22px; }
  .tabela-revisar { font-size: 15px; }
  .dica-regra { font-size: 15px; }
  .campo input { font-size: 18px; }
}

/* impressão (alternativa ao PDF): só o relatório */
@media print {
  .moldura, .topo, .credito, .linha-botoes, .cartao-fim, .confete { display: none !important; }
  body { background: #fff; }
  .tela { display: none !important; }
  #tela-fim { display: block !important; }
  .relatorio { box-shadow: none; }
}

.credito { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.credito-projeto { color: var(--primaria); font-weight: 800; }

/* ---------- Plenix, o mascote ---------- */
.plenix {
  position: relative;
  width: 100%;
  aspect-ratio: 234 / 370;
}

.plenix-corpo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 96%;            /* gira apoiado nos pés */
  user-select: none;
  -webkit-user-drag: none;
}

/* acenando: balança suave */
.plenix-oi .plenix-corpo { animation: px-oi 2.2s ease-in-out infinite; }
@keyframes px-oi {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(3deg) translateY(-3px); }
}

/* pensando: inclina devagar, de um lado para o outro */
.plenix-pensando .plenix-corpo { animation: px-pensando 3s ease-in-out infinite; }
@keyframes px-pensando {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
.px-duvida {
  position: absolute;
  top: 6%;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 3vw, 30px);
  color: #f0a500;
  -webkit-text-stroke: 1.5px #0b2e66;
  paint-order: stroke fill;
  opacity: 0;
  animation: px-duvida 2.4s ease-in-out infinite;
}
.px-duvida.d1 { right: -4%; animation-delay: 0s; }
.px-duvida.d2 { right: 12%; top: -2%; animation-delay: 0.8s; font-size: clamp(14px, 2.4vw, 24px); }
.px-duvida.d3 { left: -2%; animation-delay: 1.6s; }
@keyframes px-duvida {
  0% { opacity: 0; transform: translateY(10px) scale(0.6); }
  25% { opacity: 1; }
  80% { opacity: 1; transform: translateY(-14px) scale(1) rotate(10deg); }
  100% { opacity: 0; transform: translateY(-20px) scale(1); }
}

/* acertou: pula e comemora */
.plenix-acertou .plenix-corpo { animation: px-pulo 0.7s cubic-bezier(.3, 1.6, .5, 1) 2; }
@keyframes px-pulo {
  0% { transform: translateY(0) scale(1, 1); }
  20% { transform: translateY(0) scale(1.06, 0.92); }
  50% { transform: translateY(-14%) scale(0.96, 1.05) rotate(-4deg); }
  80% { transform: translateY(0) scale(1.04, 0.96); }
  100% { transform: translateY(0) scale(1, 1); }
}
.px-brilho {
  position: absolute;
  left: 45%;
  top: 30%;
  font-size: clamp(16px, 2.6vw, 26px);
  opacity: 0;
  animation: px-estouro 1.1s ease-out forwards;
}
.px-brilho.b0 { --dx: -150%; --dy: -160%; }
.px-brilho.b1 { --dx: 140%; --dy: -190%; animation-delay: 0.1s; }
.px-brilho.b2 { --dx: 180%; --dy: -40%; animation-delay: 0.2s; }
.px-brilho.b3 { --dx: -190%; --dy: -30%; animation-delay: 0.15s; }
.px-brilho.b4 { --dx: 30%; --dy: -260%; animation-delay: 0.05s; }
.px-brilho.b5 { --dx: -60%; --dy: -250%; animation-delay: 0.25s; }
@keyframes px-estouro {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.3) rotate(160deg); }
}

/* triste: cabisbaixo e mais apagado, com uma lágrima */
.plenix-triste .plenix-corpo { animation: px-triste 0.6s ease forwards, px-suspiro 2.6s ease-in-out 0.6s infinite; }
@keyframes px-triste {
  to { transform: rotate(-5deg) translateY(4%) scale(0.96); filter: saturate(0.55) brightness(0.9); }
}
@keyframes px-suspiro {
  0%, 100% { transform: rotate(-5deg) translateY(4%) scale(0.96); filter: saturate(0.55) brightness(0.9); }
  50% { transform: rotate(-3deg) translateY(5%) scale(0.95); filter: saturate(0.55) brightness(0.9); }
}
.px-lagrima {
  position: absolute;
  left: 34%;
  top: 22%;
  width: 7%;
  aspect-ratio: 0.75;
  background: #5bc0ff;
  border: 2px solid #1d6fa8;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform: rotate(0deg);
  opacity: 0;
  animation: px-lagrima 1.6s ease-in 0.4s infinite;
}
@keyframes px-lagrima {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(260%) scale(1); }
}

/* festa: fim da missão */
.plenix-festa .plenix-corpo { animation: px-pulo 0.8s cubic-bezier(.3, 1.6, .5, 1) infinite; }
.plenix-festa .px-brilho { animation: px-estouro 1.4s ease-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .plenix-corpo, .px-duvida, .px-brilho, .px-lagrima { animation: none !important; }
}

/* ---------- Botãozinho do WhatsApp (tela inicial) ---------- */
.btn-whats {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 14px auto 0;
  padding: 8px 16px 8px 12px;
  font-family: 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: #25d366;
  border-radius: 999px;
  box-shadow: 0 4px 0 #128c4a;
  transition: transform 0.1s;
}
.btn-whats:hover { transform: translateY(-2px); }
.btn-whats:active { transform: translateY(3px); box-shadow: 0 1px 0 #128c4a; }

/* ---------- Plenix em pixel art (folha de sprites 4x4, quadros de 40x50) ---------- */
.plenix { aspect-ratio: 4 / 5; }
.plenix-corpo { display: none; }                 /* imagem antiga (recorte) não é mais usada */
.px-duvida, .px-lagrima { display: none; }
.plenix .plenix-sprite {
  width: 100%;
  height: 100%;
  background: url(assets/plenix/plenix_spritesheet_1x.png) 0 0 / 400% 400% no-repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 5px 0 rgba(11, 46, 102, 0.18));
}
/* cada estado é uma linha da folha; os 4 quadros passam em "degraus" */
.plenix-oi .plenix-sprite       { background-position-y: 0%;       animation: px-quadros 0.6s steps(4) infinite; }
.plenix-acertou .plenix-sprite,
.plenix-festa .plenix-sprite    { background-position-y: 33.333%;  animation: px-quadros 0.56s steps(4) infinite; }
.plenix-triste .plenix-sprite   { background-position-y: 66.667%;  animation: px-quadros 1.04s steps(4) infinite; }
.plenix-pensando .plenix-sprite { background-position-y: 100%;     animation: px-quadros 1.28s steps(4) infinite; }
@keyframes px-quadros {
  from { background-position-x: 0%; }
  to { background-position-x: 133.333%; }
}
@media (prefers-reduced-motion: reduce) {
  .plenix .plenix-sprite { animation: none !important; }
}

/* ---------- Escolha do jogo (tela inicial) ---------- */
.escolha-jogos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  max-width: 640px;
  margin: 18px auto 0;
}
.jogo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 14px 14px;
  color: var(--branco);
  background: var(--c);
  border-radius: 26px;
  box-shadow: 0 7px 0 var(--primaria-escura);
  transition: transform 0.1s, box-shadow 0.1s;
}
.jogo-card:hover { transform: translateY(-3px) rotate(-1deg); }
.jogo-card:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--primaria-escura); }
.jogo-card-icone { font-size: 42px; line-height: 1; }
.jogo-card-nome { font-family: 'Fredoka', sans-serif; font-size: clamp(22px, 3.4vw, 28px); font-weight: 700; }
.jogo-card-texto { font-weight: 800; font-size: 15px; opacity: 0.92; }

/* ---------- Chuva de Erros: menu ---------- */
.cartao-chuva { max-width: 760px; margin: 0 auto; }
.chuva-pergunta { font-family: 'Fredoka', sans-serif; font-size: 22px; color: var(--primaria); text-align: center; margin: 4px 0 10px; }
.chuva-modos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.chuva-modo, .chuva-cat {
  padding: 12px 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--texto);
  background: var(--branco);
  border: 3px solid #a9c4e6;
  border-radius: 18px;
  transition: transform 0.1s;
}
.chuva-modo.ativo, .chuva-cat.ativo { color: var(--branco); background: var(--c, var(--primaria)); border-color: var(--primaria-escura); transform: scale(1.03); }
.chuva-categorias { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.chuva-cat { font-size: 16px; padding: 10px 8px; }

/* ---------- Chuva de Erros: jogo ---------- */
.chuva-placar { margin-left: auto; font-family: 'Fredoka', sans-serif; font-size: 22px; font-weight: 700; color: var(--primaria-escura); }
.chuva-combo { color: var(--vermelho); }
.chuva-arena {
  position: relative;
  height: min(68vh, 620px);
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(180deg, #cfe5ff 0%, #eaf4ff 70%, #fff6c7 100%);
  border: 4px solid var(--primaria);
  box-shadow: var(--sombra);
  touch-action: manipulation;
  user-select: none;
}
.chuva-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; justify-content: space-between;
  padding: 6px 14px;
  font-weight: 800; color: var(--primaria-escura);
  background: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}
.chuva-contagem {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka', sans-serif; font-size: clamp(60px, 14vw, 120px); font-weight: 700;
  color: var(--amarelo);
  -webkit-text-stroke: 0.06em var(--primaria-escura); paint-order: stroke fill;
  pointer-events: none;
}
.chuva-contagem:empty { display: none; }
.gota {
  position: absolute; top: 0; left: 0; z-index: 1;
  padding: 8px 16px;
  font: 800 clamp(18px, 2.6vw, 24px) 'Nunito', sans-serif;
  color: var(--texto);
  white-space: nowrap;
  background: var(--branco);
  border: 3px solid var(--primaria);
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(11, 46, 102, 0.25);
  will-change: transform, opacity;
}
.gota::before { content: '💧'; font-size: 0.8em; margin-right: 4px; }
.gota.pegou { background: var(--verde); border-color: #1d6b3d; color: var(--branco); animation: gota-pegou 0.35s ease-out forwards; }
.gota.errou { background: var(--vermelho); border-color: #8e1b1b; color: var(--branco); animation: gota-errou 0.4s ease-out forwards; }
.gota.escapou { border-color: var(--vermelho); color: var(--vermelho); }
.gota.pegou::before, .gota.errou::before { content: none; }
@keyframes gota-pegou { 0% { scale: 1; } 40% { scale: 1.25; } 100% { scale: 0.4; opacity: 0; } }
@keyframes gota-errou { 0%, 100% { translate: 0; } 20%, 60% { translate: -8px; } 40%, 80% { translate: 8px; } 100% { opacity: 0; } }
.ponto-voando {
  position: absolute; z-index: 2; pointer-events: none;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 22px;
  animation: ponto-sobe 0.7s ease-out forwards;
}
@keyframes ponto-sobe { to { transform: translateY(-40px); opacity: 0; } }
.chuva-arena.tremer { animation: tremer 0.3s ease; }

@media (max-width: 720px) {
  .chuva-modos { grid-template-columns: 1fr; }
  .chuva-arena { height: 62vh; }
  .chuva-placar { font-size: 18px; }
}

/* ---------- Chuva de Matemática ---------- */
.mat-ops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mat-ops .chuva-modo { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mat-op-sinal { font-family: 'Fredoka', sans-serif; font-size: 34px; font-weight: 700; line-height: 1; }
.mat-arena { height: min(48vh, 430px); }
.conta-caindo {
  position: absolute; top: 0; left: 50%; z-index: 1;
  padding: 10px 26px;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(30px, 6vw, 46px);
  color: var(--primaria-escura); white-space: nowrap;
  background: var(--branco);
  border: 4px solid var(--primaria);
  border-radius: 24px;
  box-shadow: 0 5px 0 rgba(11, 46, 102, 0.25);
  will-change: transform;
}
.conta-caindo.acertou { background: var(--verde); border-color: #1d6b3d; color: var(--branco); animation: gota-pegou 0.9s ease-out forwards; }
.conta-caindo.errou { background: #fdecea; border-color: var(--vermelho); color: #b42318; }
.mat-respostas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.mat-resposta {
  padding: 14px 6px;
  font-family: 'Fredoka', sans-serif; font-size: clamp(26px, 4.5vw, 36px); font-weight: 700;
  color: var(--branco);
  background: var(--primaria);
  border-radius: 20px;
  box-shadow: 0 6px 0 var(--primaria-escura);
  transition: transform 0.1s;
}
.mat-resposta:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--primaria-escura); }
.mat-resposta:disabled { cursor: default; }
.mat-resposta.certa { background: var(--verde); box-shadow: 0 6px 0 #1d6b3d; }
.mat-resposta.errada { background: var(--vermelho); box-shadow: 0 6px 0 #8e1b1b; animation: tremer 0.4s ease; }
.mat-resposta.apagada { opacity: 0.45; }

/* ---------- Tiro Certo ---------- */
.tiro-hud { display: flex; justify-content: space-between; align-items: center; margin: -4px 4px 8px; font-weight: 800; color: var(--primaria-escura); }
.tiro-municao { display: flex; gap: 4px; min-height: 32px; align-items: center; }
.tiro-municao img { width: 15px; height: 24px; image-rendering: pixelated; }
.tiro-municao img.gasta { opacity: 0.2; filter: grayscale(1); }
.tiro-arena {
  position: relative;
  width: 100%; max-width: 560px; aspect-ratio: 1; margin: 0 auto;
  border-radius: 26px; overflow: hidden;
  border: 4px solid var(--primaria-escura);
  background: #0c1a36;
  box-shadow: var(--sombra);
}
.tiro-arena canvas { width: 100%; height: 100%; display: block; }
.tiro-pergunta { margin: 12px 0 0; text-align: center; font-family: 'Fredoka', sans-serif; font-size: 20px; font-weight: 700; color: var(--primaria); }
#tiro-opcoes { max-width: 560px; margin-left: auto; margin-right: auto; }
#tiro-opcoes .mat-resposta { background: #0a8fc2; box-shadow: 0 6px 0 var(--primaria-escura); }
#tiro-opcoes .mat-resposta.certa { background: var(--verde); box-shadow: 0 6px 0 #1d6b3d; }
#tiro-opcoes .mat-resposta.errada { background: var(--vermelho); box-shadow: 0 6px 0 #8e1b1b; }

@media (max-width: 720px) {
  .mat-ops { grid-template-columns: repeat(2, 1fr); }
  .mat-arena { height: 42vh; }
  .mat-respostas { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* =====================================================================
   Visual "flat" de aplicativo (Pedagogia Gamificada): barra superior turquesa,
   fundo claro, cartões brancos com sombra leve e detalhes em amarelo.
   Este bloco vem por último e redefine as cores e os componentes de cima.
   ===================================================================== */
:root {
  --primaria: #1fa2b0;
  --primaria-escura: #137784;
  --amarelo: #f9c62b;
  --azul: #1fa2b0;
  --azul-claro: #5fc9d3;
  --texto: #22364a;
  --cinza-texto: #5b6b7b;
  --fundo: #eef4f6;
  --sombra: 0 2px 10px rgba(19, 60, 80, 0.10);
}

body { background: var(--fundo); }
.moldura { display: none; }

/* barra superior turquesa de ponta a ponta */
.app { padding-top: 0; }
.topo {
  margin: 0 calc(-1 * clamp(14px, 4vw, 40px)) 18px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: var(--primaria);
  box-shadow: 0 2px 8px rgba(19, 60, 80, 0.18);
}
.logo { height: clamp(64px, 10vw, 84px); }
.btn-icone { top: 50%; right: 16px; transform: translateY(-50%); box-shadow: none; }

/* títulos sem contorno 3D */
.titulo { font-size: clamp(30px, 6.5vw, 54px); margin: 4px 0 8px; }
.titulo-menor { font-size: clamp(26px, 5.5vw, 44px); }
.titulo span { -webkit-text-stroke: 0; text-shadow: none; }
.cor-amarelo { color: var(--primaria-escura); }
.cor-azul { color: var(--primaria); }
.cor-vermelho { color: var(--primaria); }
.subtitulo { color: var(--primaria-escura); }
.slogan { color: var(--texto); background: var(--amarelo); border-radius: 8px; box-shadow: none; }

/* botões chapados */
.btn-grande {
  color: var(--texto);
  background: var(--amarelo);
  border-radius: 12px;
  box-shadow: 0 3px 0 #d9a514;
}
.btn-grande:hover { transform: none; filter: brightness(1.04); }
.btn-grande:active { transform: translateY(2px); box-shadow: 0 1px 0 #d9a514; }
.btn-sec {
  color: var(--primaria-escura);
  background: var(--branco);
  border: 2px solid var(--primaria);
  border-radius: 12px;
  box-shadow: none;
}

/* cartões brancos */
.cartao { background: var(--branco); border-radius: 16px; box-shadow: var(--sombra); backdrop-filter: none; }
.balao { border: 0; border-left: 6px solid var(--primaria); border-radius: 14px; box-shadow: var(--sombra); }
.balao b { color: var(--primaria-escura); }
.balao-esq::before { border-right-color: var(--branco); }
.balao-cima::before { border-bottom-color: var(--branco); }
.balao.certo { border-left-color: var(--verde); }
.balao.errado { border-left-color: var(--vermelho); }
.balao-cima.errado::before { border-bottom-color: var(--branco); }
.balao-rotulo { color: var(--texto); border-radius: 6px; }

/* cartões dos jogos na tela inicial: branco, faixa colorida e ícone em círculo */
.jogo-card {
  color: var(--texto);
  background: var(--branco);
  border-top: 6px solid var(--c);
  border-radius: 16px;
  box-shadow: var(--sombra);
}
.jogo-card:hover { transform: translateY(-2px); }
.jogo-card:active { transform: translateY(1px); box-shadow: none; }
.jogo-card-icone {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; margin-bottom: 4px;
  font-size: 34px;
  background: color-mix(in srgb, var(--c) 16%, white);
  border-radius: 50%;
}
.jogo-card-nome { color: var(--texto); }
.jogo-card-texto { color: var(--cinza-texto); opacity: 1; font-weight: 700; }

/* missões */
.missao { border-bottom: 0; border-top: 6px solid var(--c); border-radius: 16px; box-shadow: var(--sombra); }
.missao:hover { transform: translateY(-2px); }
.missao-todas { background: linear-gradient(160deg, #fffaf0, #fff1c2); }

/* barra do jogo turquesa */
.barra { padding: 8px 10px; background: var(--primaria); border-radius: 14px; }
.barra-titulo, .chuva-placar { color: var(--branco); }
.barra .btn-sec { border-color: var(--branco); }
.chuva-combo { color: var(--amarelo); }
.progresso i { border-color: var(--branco); }

/* respostas */
.opcao { border-radius: 14px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
.opcao.certa { box-shadow: 0 3px 0 #1d6b3d; }
.mat-resposta, #tiro-opcoes .mat-resposta { background: var(--primaria); border-radius: 14px; box-shadow: 0 3px 0 var(--primaria-escura); }
.mat-resposta:active { transform: translateY(2px); box-shadow: none; }
.mat-resposta.certa, #tiro-opcoes .mat-resposta.certa { background: var(--verde); box-shadow: 0 3px 0 #1d6b3d; }
.mat-resposta.errada, #tiro-opcoes .mat-resposta.errada { background: var(--vermelho); box-shadow: 0 3px 0 #8e1b1b; }
.chuva-modo, .chuva-cat { border-radius: 12px; border-color: #cfe3e7; }
.chuva-modo.ativo, .chuva-cat.ativo { border-color: transparent; }

/* campos, arenas e relatório */
.campo input { border-color: #cfe3e7; border-radius: 12px; }
.chuva-arena { border: 0; border-radius: 16px; box-shadow: var(--sombra); background: linear-gradient(180deg, #d6f1f4 0%, #f2fbfc 75%, #fff8dc 100%); }
.tiro-arena { border: 0; border-radius: 16px; box-shadow: var(--sombra); }
.gota { border-color: var(--primaria); border-radius: 12px; }
.conta-caindo { border-color: var(--primaria); border-radius: 16px; }
.grafico { border-color: #dbeef1; }
.tabela-revisar th { background: var(--primaria); }
.dificuldade { border-radius: 12px; }
.credito { color: var(--cinza-texto); }
.balao::before { display: none; }
@media (max-width: 720px) {
  .escolha-jogos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .jogo-card { padding: 12px 8px; }
  .jogo-card-icone { width: 52px; height: 52px; font-size: 28px; }
  .jogo-card-nome { font-size: 18px; }
  .jogo-card-texto { font-size: 13px; }
}

/* ---------- Filtro dos jogos por tema (tela inicial) ---------- */
.filtro-temas { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 18px auto 0; }
.filtro-tema {
  padding: 8px 18px;
  font-size: 17px; font-weight: 600;
  color: var(--primaria-escura);
  background: var(--branco);
  border: 2px solid var(--primaria);
  border-radius: 999px;
}
.filtro-tema.ativo { color: var(--branco); background: var(--primaria); }
.filtro-temas + .escolha-jogos { margin-top: 12px; }

/* ---------- Peso Certo ---------- */
.peso-niveis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 8px; }
.peso-niveis .chuva-modo { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.peso-niveis small { font-size: 14px; font-weight: 700; opacity: 0.85; }
.peso-vidas { font-size: 22px; letter-spacing: 2px; }
.peso-arena {
  position: relative;
  width: 100%; max-width: 560px; aspect-ratio: 4 / 3; margin: 0 auto;
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, #e3f6f8 0%, #f7fcfd 70%, #fff3cf 100%);
  box-shadow: var(--sombra);
  transition: box-shadow 0.2s;
}
.peso-arena canvas { width: 100%; height: 100%; display: block; }
.peso-arena.erro { box-shadow: 0 0 0 5px var(--vermelho), var(--sombra); animation: tremer 0.4s ease; }
.peso-arena.certo { box-shadow: 0 0 0 5px var(--verde), var(--sombra); }
.peso-arena.alvo-drop { box-shadow: 0 0 0 5px var(--amarelo), var(--sombra); }
.peso-msg { min-height: 1.6em; margin: 10px 0 0; text-align: center; font-family: 'Fredoka', sans-serif; font-size: 20px; font-weight: 700; color: var(--primaria-escura); }
.peso-msg.certo { color: #1d6b3d; }
.peso-msg.erro { color: #b42318; }
#btn-peso-proximo { margin-top: 8px; }
.peso-rotulo { margin: 14px 0 6px; font-family: 'Fredoka', sans-serif; font-size: 17px; color: var(--primaria-escura); }
.peso-rotulo small { font-family: 'Nunito', sans-serif; font-size: 13px; color: var(--cinza-texto); }
.peso-lista { display: flex; flex-wrap: wrap; gap: 8px; min-height: 64px; padding: 8px; background: var(--branco); border-radius: 14px; box-shadow: var(--sombra); }
.peso-prato { min-height: 54px; background: #f6fbfc; }
.peso-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px;
  width: 74px; padding: 6px 4px 4px;
  font-family: 'Fredoka', sans-serif; font-size: 16px; font-weight: 700; color: var(--texto);
  background: var(--branco);
  border: 2px solid #cfe3e7; border-radius: 12px;
  touch-action: none; user-select: none;
}
.peso-btn:active { transform: scale(0.96); }
.peso-btn .peso-sprite {
  width: 36px; height: 39px;
  background: url(assets/balanca/pesos.png) 0 0 / 700% 100% no-repeat;
  image-rendering: pixelated;
}
.peso-prato .peso-btn { width: 64px; font-size: 14px; }
.peso-fantasma { position: fixed; z-index: 50; pointer-events: none; opacity: 0.9; transform: translate(-50%, -50%) scale(1.1); }
.peso-tabela { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(19, 60, 80, 0.45); }
.peso-tabela-cartao { max-width: 560px; text-align: center; line-height: 1.5; }
.escada { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; margin: 6px 0 12px; }
.escada span { padding: 6px 10px; font-family: 'Fredoka', sans-serif; font-size: 20px; font-weight: 700; color: var(--branco); background: var(--primaria); border-radius: 8px; }
.escada i { font-style: normal; font-size: 12px; font-weight: 800; color: var(--cinza-texto); }
.peso-tabela-cartao .exemplos { margin-top: 8px; font-weight: 800; color: var(--primaria-escura); }
@media (max-width: 720px) {
  .peso-niveis { grid-template-columns: 1fr; }
  .peso-btn { width: 66px; font-size: 14px; }
}

/* ---------- Área do professor: e-mail por jogo ---------- */
.emails-jogos { padding: 10px 12px; background: #f6fbfc; border: 2px solid #dbeef1; border-radius: 12px; }
.emails-jogos summary { cursor: pointer; font-family: 'Fredoka', sans-serif; font-size: 17px; font-weight: 600; color: var(--primaria-escura); }
.emails-jogos .professor-ajuda { margin: 6px 0 4px; font-size: 14px; color: var(--cinza-texto); }
.campo-jogo { margin-top: 8px; font-size: 15px; }
.campo-jogo input { font-size: 16px; padding: 9px 12px; }

/* prateleiras rotuladas do Peso Certo (os pesos ficam em pé, sem número) */
#peso-estoque { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; align-items: end; padding: 12px; }
.prateleira { display: flex; flex-direction: column; align-items: stretch; }
.prateleira.vazia { opacity: 0.45; }
.prateleira-pesos { display: flex; justify-content: center; align-items: flex-end; gap: 2px; min-height: 48px; padding: 0 6px; }
.prateleira-tabua {
  position: relative; height: 12px;
  background: linear-gradient(180deg, #d99a52 0%, #b07434 60%, #7d4f22 100%);
  border-radius: 3px; box-shadow: 0 3px 0 rgba(79, 50, 20, 0.35);
}
.prateleira-placa {
  position: absolute; left: 50%; top: 7px; transform: translateX(-50%);
  padding: 1px 10px;
  font-family: 'Fredoka', sans-serif; font-size: 15px; font-weight: 700; white-space: nowrap;
  color: var(--texto); background: #fff8e1;
  border: 2px solid #b07434; border-radius: 6px;
}
.prateleira + .prateleira, #peso-estoque .prateleira { margin-bottom: 18px; }
.peso-btn.so-peso { width: auto; padding: 0 1px; background: transparent; border: 0; border-radius: 6px; }
.peso-btn.so-peso:hover { background: rgba(31, 162, 176, 0.12); }
.peso-btn.so-peso { min-width: 34px; min-height: 46px; justify-content: flex-end; }

/* níveis do Jogo de Ortografia */
#grade-missoes { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: 760px; margin: 0 auto; }
.missao-descricao { font-size: 15px; font-weight: 700; color: var(--cinza-texto); text-align: center; }

/* ---------- Questionário da aula ---------- */
.quiz-status { min-height: 1.4em; margin: 0 0 8px; text-align: center; font-weight: 800; color: var(--cinza-texto); }
.lista-quiz { display: flex; flex-direction: column; gap: 10px; }
.quiz-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  text-align: left; color: var(--texto);
  background: var(--branco);
  border: 2px solid #dbeef1; border-left: 6px solid #7b4fc9; border-radius: 12px;
}
button.quiz-item:hover { border-color: #7b4fc9; }
.quiz-item-nome { flex: 1; font-family: 'Fredoka', sans-serif; font-size: 19px; font-weight: 600; }
.quiz-item-qtd { font-size: 14px; font-weight: 700; color: var(--cinza-texto); white-space: nowrap; }
.quiz-excluir { padding: 6px 10px; font-size: 15px; font-weight: 700; color: #b42318; background: #fdecea; border-radius: 8px; }
.quiz-cartao { max-width: 720px; margin: 0 auto; }
.quiz-pergunta { margin: 4px 0 16px; font-family: 'Fredoka', sans-serif; font-size: clamp(22px, 3.6vw, 30px); font-weight: 600; line-height: 1.3; color: var(--texto); text-align: center; }
.quiz-opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-opcao {
  padding: 14px 12px; min-height: 64px;
  font-size: clamp(17px, 2.4vw, 21px); font-weight: 700; line-height: 1.25;
  color: var(--texto); background: var(--branco);
  border: 3px solid #cfe3e7; border-radius: 14px;
  box-shadow: 0 3px 0 #cfe3e7;
}
.quiz-opcao:hover:not(:disabled) { border-color: var(--primaria); }
.quiz-opcao:disabled { cursor: default; }
.quiz-opcao.certa { color: var(--branco); background: var(--verde); border-color: #1d6b3d; box-shadow: 0 3px 0 #1d6b3d; }
.quiz-opcao.errada { color: var(--branco); background: var(--vermelho); border-color: #8e1b1b; box-shadow: 0 3px 0 #8e1b1b; animation: tremer 0.4s ease; }
.quiz-opcao.apagada { opacity: 0.45; }
#btn-quiz-proxima { margin-top: 6px; }
.quiz-bloco { padding: 10px; margin-top: 10px; background: var(--branco); border: 2px solid #dbeef1; border-radius: 12px; }
.quiz-bloco-topo { display: flex; justify-content: space-between; align-items: center; font-weight: 800; color: var(--primaria-escura); }
.quiz-bloco input { width: 100%; margin-top: 6px; padding: 8px 10px; font: 700 15px 'Nunito', sans-serif; color: var(--texto); border: 2px solid #cfe3e7; border-radius: 10px; }
.quiz-bloco input.certa { border-color: var(--verde); background: #f0faf3; }
.quiz-bloco input.errada { border-color: #f3b6b0; background: #fff7f6; }
.quiz-tirar { padding: 2px 8px; font-size: 14px; color: #b42318; background: transparent; }
@media (max-width: 720px) {
  .quiz-opcoes { grid-template-columns: 1fr; }
}

/* escolha do professor na entrada e aviso na tela inicial */
#login-professor { font: 700 18px 'Nunito', sans-serif; padding: 11px 14px; color: var(--texto); background: #fff; border: 3px solid #cfe3e7; border-radius: 12px; }
.relatorio-para { margin: 10px auto 0; text-align: center; font-weight: 800; color: var(--primaria-escura); }
.escolha-prof-cartao { width: 100%; max-width: 420px; }
.btn-modelo { display: block; width: fit-content; margin: 2px auto 6px; text-align: center; text-decoration: none; }
.quiz-link { padding: 6px 10px; font-size: 15px; font-weight: 700; color: var(--primaria-escura); background: #e3f6f8; border-radius: 8px; }
#lista-quiz-prof .quiz-item { flex-wrap: wrap; }

/* arte de capa de um jogo (cartão da tela inicial e tela de instruções) */
.jogo-card.com-capa { padding-top: 0; overflow: hidden; }
.jogo-card-capa { width: calc(100% + 28px); max-width: none; height: auto; margin: 0 -14px 6px; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 12%; display: block; }
.capa-jogo { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto 12px; border-radius: 18px; box-shadow: var(--sombra); }
@media (max-width: 720px) {
  .jogo-card-capa { width: calc(100% + 16px); margin: 0 -8px 6px; }
}
.jogo-card { justify-content: center; }
.jogo-card.com-capa { justify-content: flex-start; }
.cadastro-email { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 10px 12px; background: #f6fbfc; border: 2px solid #dbeef1; border-radius: 12px; }
.cadastro-email .btn-grande { margin-top: 4px; }
#lista-emails-prof .quiz-item { flex-wrap: wrap; }

/* menu da Área do professor */
.menu-professor { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; max-width: 620px; margin: 0 auto; }
.prof-voltar { align-self: flex-start; margin: 0 0 4px; }
.menu-inicio { margin-top: 18px; }
.menu-inicio .jogo-card { padding-top: 22px; padding-bottom: 20px; }
.menu-inicio .jogo-card-icone { width: 76px; height: 76px; font-size: 42px; }
@media (max-width: 720px) {
  .menu-inicio { grid-template-columns: 1fr 1fr; }
}
.jogo-card-capa.larga { aspect-ratio: 16 / 9; object-position: center top; }
.capa-jogo.larga { max-width: 520px; }
.jogo-card-capa.inteira { aspect-ratio: auto; }   /* arte bem larga: aparece inteira, sem cortar as pontas */
a.jogo-card { text-decoration: none; text-align: center; }   /* cartão que é link (jogo externo) */
.credito-link { color: var(--primaria); font-weight: 800; text-decoration: none; }   /* site da Pedagogia Gamificada */
.credito-link:hover { text-decoration: underline; }
#aviso-link { overflow-wrap: anywhere; }   /* o link copiado quebra a linha em vez de vazar */
.btn-manual { text-decoration: none; text-align: center; font-family: 'Fredoka', 'Nunito', sans-serif; }   /* link para o manual.html com cara de botão */

/* menu suspenso do topo, ao lado da marca */
.menu-app { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); z-index: 50; }
.btn-menu {
  padding: 9px 16px; border-radius: 999px; background: var(--branco); color: var(--primaria-escura);
  font-size: 18px; font-weight: 600; box-shadow: 0 2px 6px rgba(19, 60, 80, 0.18);
}
.menu-app-lista {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 260px; padding: 8px;
  background: var(--branco); border-radius: 16px; box-shadow: 0 10px 30px rgba(19, 41, 75, 0.25);
}
.menu-item {
  display: block; width: 100%; padding: 12px 14px; border-radius: 10px; background: none; text-align: left;
  font-family: 'Fredoka', 'Nunito', sans-serif; font-size: 18px; font-weight: 600; color: var(--texto); text-decoration: none;
}
.menu-item[hidden] { display: none; }
.menu-item:hover, .menu-item:focus-visible { background: #eef4f6; }
.btn-video { display: block; width: fit-content; margin: 18px auto 0; }
@media (max-width: 480px) {
  .menu-app { left: 10px; }
  .btn-menu { padding: 8px 12px; font-size: 20px; }
  .btn-menu span { display: none; }   /* no celular fica só o ☰ */
}
#aviso-link-jogo { overflow-wrap: anywhere; }   /* o link copiado quebra a linha em vez de vazar */

/* ---------- Jogo do Reflexo ---------- */
/* palco escuro para o brilho das lâmpadas aparecer */
.luz-palco {
  display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 3vh, 26px);
  padding: clamp(18px, 4vw, 34px) clamp(10px, 3vw, 28px); border-radius: 22px;
  background: radial-gradient(ellipse at 50% 0%, #2b3f57 0%, #142233 70%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.luz-palco.tremer { animation: luz-tremer 0.18s linear 2; }
@keyframes luz-tremer {
  0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); }
}
.luz-lampadas, .luz-botoes { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 3vw, 28px); width: 100%; max-width: 560px; }

/* lâmpada: vidro colorido em cima e a rosca embaixo; apagada fica escura, acesa brilha */
.lampada { display: flex; flex-direction: column; align-items: center; }
.lampada .vidro {
  width: clamp(54px, 15vw, 96px); aspect-ratio: 1; border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), var(--cor) 45%, color-mix(in srgb, var(--cor) 60%, #000) 100%);
  filter: brightness(0.42) saturate(0.6);
  transition: filter 0.08s, box-shadow 0.08s, transform 0.08s;
}
.lampada .rosca {
  width: clamp(26px, 7vw, 44px); height: clamp(18px, 4.5vw, 28px); margin-top: -4px; border-radius: 0 0 8px 8px;
  background: repeating-linear-gradient(180deg, #cfd6de 0 4px, #8b96a3 4px 7px);
}
.lampada.acesa .vidro {
  filter: brightness(1.25) saturate(1.2);
  box-shadow: 0 0 22px 8px var(--cor), 0 0 60px 18px color-mix(in srgb, var(--cor) 55%, transparent);
  transform: scale(1.08);
}

.luz-msg { min-height: 1.6em; margin: 0; text-align: center; font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600;
  font-size: clamp(18px, 4.4vw, 24px); color: #fff; }
.luz-msg.ok { color: #7ee2a2; }
.luz-msg.erro { color: #ff8a80; }

/* botão de fliperama: aro escuro e a cúpula colorida; ao tocar, amassa e volta (squash and stretch) */
.luz-botao {
  aspect-ratio: 1; width: 100%; max-width: 110px; justify-self: center; padding: clamp(6px, 1.6vw, 10px); border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #3a3f47, #0d1117 70%); box-shadow: 0 6px 0 #05080c, 0 10px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.06s;
}
.luz-botao span {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.6), var(--cor) 42%, color-mix(in srgb, var(--cor) 65%, #000) 100%);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.25);
}
.luz-botao:active span, .luz-botao.apertado span { filter: brightness(1.35); }
.luz-botao.apertado { animation: luz-apertar 0.22s ease-out; }
@keyframes luz-apertar {
  0% { transform: scale(1, 1); } 35% { transform: translateY(5px) scale(1.08, 0.86); } 70% { transform: scale(0.97, 1.04); } 100% { transform: scale(1, 1); }
}
.luz-palco.bloqueado .luz-botao, .luz-palco.bloqueado .bola, .luz-palco.bloqueado .copo { pointer-events: none; }
.luz-palco.bloqueado .luz-botao, .luz-palco.bloqueado .fila-bolas { opacity: 0.55; }
.luz-palco [hidden] { display: none !important; }
.relatorio-resumo { margin: 8px 0 0; padding-left: 20px; text-align: left; }   /* destaques do Jogo do Reflexo */

/* Jogo do Reflexo Nível 2: copos e filas de bolinhas */
.luz-copos, .luz-bolas { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 3vw, 28px); width: 100%; max-width: 560px; }
.copo { position: relative; justify-self: center; width: clamp(56px, 16vw, 92px); aspect-ratio: 0.9; cursor: pointer; transition: transform 0.1s; }
.copo-corpo {
  position: absolute; inset: 0; clip-path: polygon(4% 0, 96% 0, 80% 100%, 20% 100%);
  background: linear-gradient(90deg, color-mix(in srgb, var(--cor) 60%, #000) 0%, var(--cor) 30%, color-mix(in srgb, var(--cor) 55%, #fff) 50%, var(--cor) 70%, color-mix(in srgb, var(--cor) 60%, #000) 100%);
}
.copo::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10%; border-radius: 50%; background: color-mix(in srgb, var(--cor) 45%, #000); z-index: 1; }
.copo-bolas { position: absolute; left: 22%; right: 22%; bottom: 10%; display: flex; flex-wrap: wrap-reverse; justify-content: center; gap: 2px; z-index: 2; }
.copo-bolas i { width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, var(--cor) 50%); box-shadow: 0 1px 2px #0006; }
.copo.alvo { transform: scale(1.12); filter: drop-shadow(0 0 12px #fff); }
.copo.caiu { animation: copo-caiu 0.25s ease-out; }
@keyframes copo-caiu { 0% { transform: scale(1, 1); } 40% { transform: translateY(4px) scale(1.1, 0.88); } 100% { transform: scale(1, 1); } }

.fila-bolas { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bola {
  display: block; width: clamp(38px, 11vw, 60px); aspect-ratio: 1; padding: 0; border-radius: 50%; touch-action: none; cursor: grab;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.7), var(--cor) 45%, color-mix(in srgb, var(--cor) 60%, #000) 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.45);
}
.bola-espera { opacity: 0.75; transform: scale(0.88); cursor: default; }
.bola.pega { opacity: 0.25; }
.bola.selecionada { outline: 4px solid #fff; outline-offset: 3px; transform: scale(1.1); }
.bola-fantasma { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; }
.fila-bolas.andou .bola { animation: fila-andou 0.25s ease-out; }
@keyframes fila-andou { from { transform: translateY(60%); opacity: 0.2; } to { transform: none; opacity: 1; } }
.fila-bolas.andou .bola-espera { animation-name: fila-andou-espera; }
@keyframes fila-andou-espera { from { transform: translateY(60%) scale(0.88); opacity: 0; } to { transform: scale(0.88); opacity: 0.75; } }

/* =====================================================================
   Encaixe na tela: a barra do topo fica sempre visível; jogo em andamento
   não rola (a tela do jogo tem a altura visível, calculada no jogo.js em
   --livre); nas telas de entrada o Começar fica sempre à vista embaixo.
   ===================================================================== */
.topo { position: sticky; top: 0; z-index: 40; }
.btn-logo { display: block; padding: 0; background: none; border-radius: 50%; line-height: 0; }
.btn-logo:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 3px; }

/* jogo em andamento: sem rodapé e sem rolagem; a área do jogo pega o espaço que sobra */
body.em-jogo .credito { display: none; }
body.em-jogo .app { padding-bottom: 0; }
.tela-jogo.ativa { display: flex; flex-direction: column; height: var(--livre, calc(100dvh - 96px)); overflow-y: auto; }   /* só rola por dentro se não couber de jeito nenhum */
.tela-jogo.ativa > * { flex-shrink: 0; }
.tela-jogo > .barra { margin-bottom: 6px; }
.tela-jogo > .tiro-hud { margin-top: 0; margin-bottom: 6px; }
.tela-jogo > .chuva-arena, .tela-jogo > .mat-arena { flex: 1 1 0; min-height: 140px; height: auto; }
.tela-jogo .mat-respostas { margin-top: 10px; }
.tela-jogo .mat-resposta { min-height: 48px; }
.tela-jogo .tiro-arena, .tela-jogo .peso-arena { max-width: 100%; }
.tela-jogo .tiro-pergunta { margin-top: 8px; font-size: clamp(16px, 2.6dvh, 20px); }
.tela-jogo > .luz-palco { flex: 1 1 auto; min-height: 0; justify-content: space-evenly; }
.tela-jogo > .jogo-grade, .tela-jogo > .cartao { min-height: 0; }

/* Jogo do Reflexo: lâmpadas, botões, copos e bolinhas encolhem em telas baixas */
.lampada .vidro { width: clamp(42px, min(15vw, 9dvh), 96px); }
.lampada .rosca { width: clamp(20px, min(7vw, 4dvh), 44px); height: clamp(12px, min(4.5vw, 2.6dvh), 28px); }
.luz-botao { max-width: min(110px, 13dvh); }
.copo { width: clamp(44px, min(16vw, 9.5dvh), 92px); }
.bola { width: clamp(32px, min(11vw, 6.2dvh), 60px); }
.fila-bolas { gap: clamp(4px, 1dvh, 8px); }

/* Peso Certo: as listas de pesos ficam numa linha que corre para o lado, para sobrar altura para a balança */
.tela-jogo .peso-lista { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; }
.tela-jogo #peso-estoque { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(140px, 1fr); }
.tela-jogo .peso-rotulo { margin: 6px 0 4px; }
.tela-jogo .peso-msg { margin-top: 6px; font-size: clamp(15px, 2.4dvh, 20px); }
/* botões grandes dentro do jogo (Testar, Próxima) um pouco mais baixos */
.tela-jogo .btn-grande { margin-top: 6px; padding-top: 10px; padding-bottom: 10px; font-size: clamp(18px, 2.8dvh, 24px); }
.tela-jogo .peso-rotulo small { display: none; }

/* telas de entrada dos jogos: capa menor em telas baixas e Começar sempre à vista */
.capa-jogo { width: auto; max-width: min(100%, 360px); max-height: min(30dvh, 300px); }
.capa-jogo.larga { max-width: min(100%, 520px); }
.acoes-menu {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px;
  margin: 10px calc(-1 * clamp(14px, 4vw, 40px)) 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(238, 244, 246, 0) 0%, var(--fundo) 28%);
}
.acoes-menu .btn-grande, .acoes-menu .btn-sec { margin: 0; }

/* telas baixas (celular pequeno ou deitado): topo e mascote menores */
@media (max-height: 760px) {
  .topo { padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: 6px; margin-bottom: 10px; }
  .logo { height: 52px; }
  .btn-icone { width: 42px; height: 42px; }
  .cena-regra { margin: 8px 0 4px; }
  .cena-regra .davi-area { width: 72px; }
  .cena-regra { flex-direction: row; align-items: center; gap: 8px; }
  .cena-regra .balao::before { display: none; }
  .cena-regra .balao { font-size: 15px; padding: 10px 14px; }
  .subtitulo { margin-bottom: 6px; }
}
@media (max-height: 560px) {
  .logo { height: 40px; }
  .cena-regra .davi-area { display: none; }
  .capa-jogo { max-height: 24dvh; }
}

/* alvo de toque: no mínimo 44 px */
.btn-pequeno, .btn-menu, .menu-item, .quiz-link, .quiz-excluir, .filtro-tema { min-height: 44px; }

/* tela inicial em telas baixas: Plenix ao lado do balão e cartões mais baixos, para caber sem rolar */
@media (max-height: 1100px) {
  #tela-inicio .titulo { font-size: clamp(24px, 4.2dvh, 34px); margin: 0 0 4px; }
  #tela-inicio .slogan { margin: 0 auto 4px; font-size: 15px; }
  #tela-inicio .cena { flex-direction: row; align-items: center; gap: 8px; margin: 4px 0; }
  #tela-inicio .davi-area.grande { width: clamp(64px, 11dvh, 110px); }
  #tela-inicio .balao { font-size: 14px; padding: 10px 12px; }
  #tela-inicio .balao::before { display: none; }
  .menu-inicio { margin-top: 8px; }
  .menu-inicio .jogo-card { padding-top: 12px; padding-bottom: 12px; }
  .menu-inicio .jogo-card-icone { width: 54px; height: 54px; font-size: 30px; }
  .btn-video { margin-top: 10px; }
  .credito { padding-top: 0; }
  #tela-inicio .btn-whats { margin-top: 8px; }
}
@media (max-height: 760px) {
  #tela-inicio .menu-inicio .jogo-card-texto { display: none; }   /* o título e o ícone bastam em tela baixa */
  #tela-inicio .balao { font-size: 13px; }
  #tela-inicio .link-privacidade { margin: 6px 0 0; }
}

/* aviso para virar o celular (só aparece quando o jogo não cabe com o aparelho deitado) */
.aviso-girar { display: none; }
body.girar .aviso-girar {
  position: fixed; inset: 0; z-index: 35; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;   /* abaixo da barra do topo (z 40): o menu continua acessível */
  padding: 24px; text-align: center; background: rgba(19, 41, 75, 0.94); color: #fff; font-size: 18px;
}
body.girar .aviso-girar b { font-family: 'Fredoka', 'Nunito', sans-serif; font-size: 28px; }
.aviso-girar-icone { font-size: 64px; animation: girar-celular 1.6s ease-in-out infinite; }
@keyframes girar-celular { 0%, 30% { transform: rotate(-90deg); } 60%, 100% { transform: rotate(0deg); } }

/* ---------- Barra de navegação inferior (fixa) ---------- */
.barra-inferior {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 6px clamp(6px, 3vw, 24px) max(6px, env(safe-area-inset-bottom));
  background: var(--branco); border-top: 1px solid #ece6f5; box-shadow: 0 -4px 16px rgba(19, 41, 75, 0.08);
}
.barra-inferior[hidden] { display: none; }
.aba {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 6px 4px; border-radius: 22px; background: none;
  font-family: 'Nunito', system-ui, sans-serif; font-size: 13px; font-weight: 800; color: #3b3a4a;
  transition: background 0.15s, color 0.15s;
}
.aba svg { width: 24px; height: 24px; }
.aba.ativa { background: #efe7fb; color: #c2185b; }
.aba:focus-visible { outline: 3px solid #c2185b; outline-offset: 2px; }
@media (hover: hover) { .aba:not(.ativa):hover { background: #f6f2fc; } }
/* espaço para a barra não cobrir o fim da página */
body.com-barra .credito { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
body.com-barra .acoes-menu { bottom: calc(70px + env(safe-area-inset-bottom)); }

/* Jogo de Ortografia em telas baixas: Plenix menor, figura acompanha a altura e a barra não quebra em 2 linhas */
@media (max-height: 760px) {
  .tela-jogo .cena-jogo .davi-area { width: clamp(52px, 9dvh, 84px); }
  .tela-jogo .balao-cima { font-size: 14px; padding: 8px 12px; }
  .tela-jogo .cartao-pergunta { padding-top: 10px; padding-bottom: 10px; }
  .tela-jogo .figura img { width: clamp(56px, 10dvh, 118px); }
  .tela-jogo .jogo-grade { gap: 8px; }
  .tela-jogo .barra { padding-top: 4px; padding-bottom: 4px; }
  .tela-jogo .figura { font-size: clamp(44px, 9dvh, 64px); }
  .tela-jogo .btn-ouvir { padding-top: 4px; padding-bottom: 4px; }
  #tela-pergunta .barra-titulo { font-size: 16px; }
}

/* ---------- Rotina Certa: pilha de passos que se arrastam ---------- */
.rotina-tarefa { margin: 2px 0 8px; text-align: center; font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: clamp(20px, 3.4dvh, 28px); color: var(--primaria-escura); }
.rotina-pilha { position: relative; width: 100%; max-width: 560px; margin: 0 auto; touch-action: none; }
.rotina-pilha.tremer { animation: luz-tremer 0.16s linear 2; }
.passo-rotina {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: 10px; min-height: 44px; height: clamp(44px, 7.2dvh, 60px); padding: 0 12px;
  border-radius: 14px; background: var(--branco); border: 2px solid #d6e6ea; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.12);
  font-family: 'Nunito', system-ui, sans-serif; font-weight: 800; font-size: clamp(14px, 2.3dvh, 18px); color: var(--texto); text-align: left;
  cursor: grab; user-select: none; touch-action: none;
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2), background 0.2s, border-color 0.2s, box-shadow 0.15s;
}
.passo-num {
  flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: #eef4f6; color: var(--primaria-escura); font-family: 'Fredoka', sans-serif; font-size: 16px;
}
.passo-icone { flex: 0 0 auto; font-size: clamp(20px, 3.4dvh, 28px); }
.passo-texto { flex: 1; line-height: 1.15; }
.passo-alca { flex: 0 0 auto; color: #9aaab5; font-size: 22px; }
/* antecipação: ao pegar, o botão levanta, cresce e fica por cima; sem transição para seguir o dedo sem atraso */
.passo-rotina.arrastando { z-index: 5; transition: none; cursor: grabbing; border-color: var(--primaria); box-shadow: 0 14px 24px rgba(19, 41, 75, 0.25); }
/* finalização: ao soltar, encaixa com um quique */
.passo-rotina.encaixou { animation: passo-encaixe 0.26s ease-out; }
@keyframes passo-encaixe { 40% { filter: brightness(1.05); box-shadow: 0 2px 0 rgba(19, 41, 75, 0.12); } }
.passo-rotina.selecionado { border-color: var(--primaria); background: #e6f7f9; }
.passo-rotina.preso { cursor: default; border-color: #2e9e5b; background: #e9f7ef; }
.passo-rotina.preso .passo-num { background: #2e9e5b; color: #fff; }
.passo-rotina.preso .passo-alca { visibility: hidden; }
.passo-rotina.errado { border-color: #e53935; background: #fdecea; }
.passo-rotina.festa { animation: passo-festa 0.4s ease-out; }
@keyframes passo-festa { 40% { filter: brightness(1.08) saturate(1.2); } }
.rotina-msg { min-height: 1.4em; margin: 10px 0 4px; text-align: center; font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: clamp(15px, 2.4dvh, 19px); color: var(--primaria-escura); }
.rotina-msg.ok { color: #1d6b3d; }
.rotina-msg.erro { color: #b42318; }
#btn-rotina-testar:disabled { opacity: 0.5; }

/* ---------- Fichas Coloridas ---------- */
.fichas-rival { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 6px; padding: 6px 10px;
  border-radius: 12px; background: #eef4f6; font-weight: 800; color: var(--primaria-escura); }
.fichas-rival-pts { margin-left: 4px; font-size: 14px; color: var(--cinza-texto); }
.fichas-mini { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 13px;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), var(--cor) 55%); text-shadow: 0 1px 1px #0006; }
.fichas-mesa { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.fichas-cartela {
  flex: 0 0 auto; display: grid; place-items: center; width: clamp(54px, 9dvh, 76px); aspect-ratio: 0.72; border-radius: 12px;
  background: linear-gradient(160deg, #fffdf5, #fff1c2); border: 3px solid #e0a100; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.15);
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(28px, 5dvh, 40px); color: #b26a00;
}
.fichas-cartela.virou { animation: cartela-virar 0.45s ease-out; }
@keyframes cartela-virar { 0% { transform: rotateY(90deg) scale(0.9); } 60% { transform: rotateY(-12deg) scale(1.05); } 100% { transform: none; } }
.fichas-msg { flex: 1; margin: 0; font-size: clamp(14px, 2.3dvh, 17px); font-weight: 700; color: var(--texto); line-height: 1.3; }
.fichas-msg.ok { color: #1d6b3d; }
.fichas-msg.erro { color: #b42318; }
.fichas-bandeja { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: space-evenly; gap: 6px;
  padding: 8px; border-radius: 16px; background: linear-gradient(180deg, #e7f3e9, #d5ead9); box-shadow: inset 0 0 0 2px #b9dcc0; }
.fichas-bandeja.tremer { animation: luz-tremer 0.16s linear 2; }
.fichas-linha { display: flex; align-items: center; gap: 8px; min-height: clamp(40px, 7dvh, 56px); }
.fichas-rotulo { flex: 0 0 92px; font-size: 12px; font-weight: 800; color: var(--primaria-escura); text-transform: capitalize; white-space: nowrap; }
/* linha sem fichas: uma vaga tracejada da cor mostra onde a ficha nova vai cair */
.ficha-vaga { display: grid; place-items: center; width: clamp(36px, 6.2dvh, 50px); aspect-ratio: 1; border-radius: 50%;
  border: 3px dashed color-mix(in srgb, var(--cor) 55%, transparent); color: color-mix(in srgb, var(--cor) 70%, transparent);
  font-family: 'Fredoka', sans-serif; font-weight: 700; }
.fichas-pilha { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.ficha {
  width: clamp(36px, 6.2dvh, 50px); aspect-ratio: 1; padding: 0; border-radius: 50%; color: #fff;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(15px, 2.4dvh, 19px); text-shadow: 0 1px 2px #0007;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.6), var(--cor) 50%, color-mix(in srgb, var(--cor) 65%, #000) 100%);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--cor) 50%, #000), inset 0 0 0 3px rgba(255, 255, 255, 0.35);
  transition: transform 0.12s;
}
.ficha.escolhida { transform: translateY(-6px) scale(1.12); outline: 3px solid #fff; outline-offset: 2px; }
.ficha.caiu { animation: ficha-cair 0.3s ease-out; }
@keyframes ficha-cair { 0% { transform: translateY(-40px); opacity: 0; } 70% { transform: translateY(3px) scale(1.06, 0.9); } 100% { transform: none; opacity: 1; } }
.ficha.juntando { animation: ficha-juntar 0.32s ease-in forwards; }
@keyframes ficha-juntar { to { transform: scale(0.3); opacity: 0; } }
.ficha.nasceu { animation: ficha-nascer 0.4s ease-out; }
@keyframes ficha-nascer { 0% { transform: scale(0.2); } 60% { transform: scale(1.25, 0.9); } 100% { transform: none; } }
.fichas-pergunta { margin-top: 6px; text-align: center; }
.fichas-pergunta p { margin: 0 0 6px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 18px; color: var(--primaria-escura); }
.fichas-opcoes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fichas-botoes { display: flex; justify-content: center; }
.fichas-botoes .btn-grande:disabled { opacity: 0.5; }

/* ---------- Somando as Cores ---------- */
/* capa do cartão: uma tabelinha de cores com a conta por cima */
.cores-capa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 14px 18px 30px; position: relative;
  background: linear-gradient(160deg, #fbf7ff, #efe4fb); box-sizing: border-box; }
.cores-capa i { border-radius: 8px; background: var(--cor); border: 2px solid #13294b; }
.cores-capa b { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 2px 12px; white-space: nowrap;
  font-family: 'Fredoka', sans-serif; font-size: 18px; color: var(--primaria-escura); background: #fff; border: 2px solid #13294b; border-radius: 10px; }

/* legenda: bolinhas com o valor de cada cor */
.cores-legenda { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 1.4dvh, 12px); margin: 0 0 6px; }
.cores-bola { display: grid; place-items: center; width: min(clamp(38px, 6.4dvh, 54px), 12.5vw); aspect-ratio: 1; border-radius: 50%; color: #fff;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(17px, 2.8dvh, 23px); text-shadow: 0 1px 2px #000a;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.6), var(--cor) 50%, color-mix(in srgb, var(--cor) 65%, #000) 100%);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--cor) 50%, #000), inset 0 0 0 3px rgba(255, 255, 255, 0.35);
  animation: cores-nascer 0.38s ease-out both; }

/* a tabela: cabeçalhos brancos (letras e números) e casas coloridas */
.cores-quadro { margin: 0 auto; width: 100%; max-width: 520px; }
.cores-quadro.tremer { animation: cores-tremer 0.16s linear; }
.cores-grade { display: grid; grid-template-columns: repeat(calc(var(--lado, 4) + 1), 1fr);
  grid-template-rows: repeat(calc(var(--lado, 4) + 1), 1fr); gap: clamp(4px, 1vw, 8px); aspect-ratio: 1; }
.cores-cab, .cores-casa { border-radius: 18%; border: 2.5px solid #13294b; transition: opacity 0.2s, background 0.2s, transform 0.15s; }
.cores-cab { display: grid; place-items: center; background: #fff; color: var(--texto);
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(16px, 3.4dvh, 28px); }
.cores-canto { border-color: #c7d3dc; }
.cores-casa { background: var(--cor); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18), inset 0 3px 0 rgba(255, 255, 255, 0.25);
  animation: cores-nascer 0.34s ease-out both; }
/* dica: a linha e a coluna da casa acendem, o resto fica mais apagado */
.cores-cab.guia { background: var(--amarelo); transform: scale(1.06); }
.cores-grade:has(.guia) .cores-casa:not(.guia) { opacity: 0.35; }
.cores-casa.alvo { animation: cores-alvo 0.6s ease-out; outline: 4px solid #fff; outline-offset: -2px; position: relative; z-index: 1; }

/* a conta: as casas são botões (tocar acende a linha e a coluna) */
.cores-conta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 4px;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: min(clamp(22px, 3.6dvh, 30px), 6vw); color: var(--primaria-escura); }
.cores-conta { flex-wrap: nowrap; gap: min(8px, 1.5vw); }
.cores-coord { min-width: 2.4em; padding: 4px min(10px, 2vw); border: 2.5px solid #13294b; border-radius: 12px; background: #fff; cursor: pointer;
  font: inherit; color: var(--texto); box-shadow: 0 3px 0 rgba(19, 41, 75, 0.25); }
.cores-coord:active { transform: translateY(2px); box-shadow: none; }
.cores-coord:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }
.cores-res { min-width: 1.8em; padding: 4px 10px; text-align: center; border-radius: 12px; background: #efe4fb; }
.cores-conta.acertou .cores-res { background: var(--verde); color: #fff; animation: cores-quique 0.45s ease-out; }
.cores-conta.errou .cores-res { background: var(--vermelho); color: #fff; animation: tremer 0.3s ease; }
.cores-msg { min-height: 2.7em; margin: 0; text-align: center; font-size: clamp(13px, 2.2dvh, 16px); font-weight: 700; line-height: 1.35; color: var(--texto); }
.cores-msg.ok { color: #1d6b3d; }
.cores-msg.erro { color: #b42318; }
.cores-mini { display: inline-block; width: 0.95em; height: 0.95em; vertical-align: -0.12em; border-radius: 4px; background: var(--cor); border: 1.5px solid #13294b; }
.tela-jogo .cores-msg + .mat-respostas { margin-top: 4px; grid-template-columns: repeat(4, 1fr); gap: 8px; }   /* 4 numa linha: sobra mais altura para a tabela */

/* antecipação e quique: nasce pequena, passa do ponto achatada e assenta */
@keyframes cores-nascer { 0% { transform: scale(0.2); opacity: 0; } 65% { transform: scale(1.12, 0.9); opacity: 1; } 100% { transform: none; } }
@keyframes cores-alvo { 0% { transform: scale(1); } 30% { transform: scale(0.88); } 65% { transform: scale(1.18, 1.08); } 100% { transform: none; } }
@keyframes cores-quique { 0% { transform: scale(0.7); } 55% { transform: scale(1.2, 0.88); } 80% { transform: scale(0.96, 1.05); } 100% { transform: none; } }
@keyframes cores-tremer { 25% { transform: translateX(-5px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) {
  .cores-bola, .cores-casa, .cores-casa.alvo, .cores-conta .cores-res, .cores-quadro.tremer { animation: none; }
}

/* ---------- Esquerda e Direita ---------- */
/* capa do cartão: a mesa com os 4 buracos, as 2 bolas e as setas */
.lados-capa { display: grid; grid-template-columns: 1fr 1.3fr 1fr; grid-template-rows: 1fr 1fr 1fr; place-items: center; padding: 12px 34px;
  box-sizing: border-box; background: radial-gradient(ellipse at 50% 40%, #2fa37c, #11704f); }
.lados-capa i { width: 54%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #04261a 55%, #0a4a33 75%); box-shadow: 0 0 0 4px #c9f2df55; }
.lados-capa b { width: 40%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.65), var(--cor) 55%, color-mix(in srgb, var(--cor) 60%, #000) 100%); }
.lados-capa em { font-style: normal; font-size: 30px; color: #fff; text-shadow: 0 2px 0 #0005; white-space: nowrap; }
.lados-teclas { display: block; margin-top: 6px; color: var(--cinza-texto); }
@media (hover: none) { .lados-teclas { display: none; } }   /* no celular e no tablet não tem teclado */

/* a mesa: feltro verde com borda de madeira */
.lados-mesa { position: relative; margin: 4px auto 0; width: 100%; max-width: 440px; aspect-ratio: 0.66; touch-action: none; user-select: none;
  border-radius: 22px; border: 8px solid #b0743a; box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 45%, #2fa37c, #127252 75%);
  box-shadow: inset 0 0 0 2px #0003, inset 0 10px 24px #0004, 0 6px 0 #7a4c22; }
.lados-mesa.tremer { animation: cores-tremer 0.16s linear; }
.lados-letra { position: absolute; top: 50%; transform: translate(-50%, -50%); font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: clamp(16px, 2.8dvh, 22px); color: #ffffffcc; pointer-events: none; }
.lados-e { left: 6%; }
.lados-d { left: 94%; }
.lados-buraco { position: absolute; width: 27%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; transform: translate(-50%, -50%); cursor: pointer;
  background: radial-gradient(circle at 50% 42%, #03200f 52%, #0b5038 72%, #1b8a63 100%);
  box-shadow: 0 0 0 4px #ffffff30, inset 0 6px 10px #000a; }
.lados-buraco[data-lado="E"] { left: 20%; }
.lados-buraco[data-lado="D"] { left: 80%; }
.lados-buraco[data-dir="cima"] { top: 14%; }
.lados-buraco[data-dir="baixo"] { top: 86%; }
.lados-buraco:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 3px; }
.lados-buraco.certo { animation: lados-anel-certo 0.6s ease-out; }
.lados-buraco.errado { animation: lados-anel-errado 0.6s ease-out; }
@keyframes lados-anel-certo { 30% { box-shadow: 0 0 0 9px #7dffb0, inset 0 6px 10px #000a; } 100% { box-shadow: 0 0 0 4px #ffffff30, inset 0 6px 10px #000a; } }
@keyframes lados-anel-errado { 30% { box-shadow: 0 0 0 9px #ff6b6b, inset 0 6px 10px #000a; } 100% { box-shadow: 0 0 0 4px #ffffff30, inset 0 6px 10px #000a; } }
.lados-bola { position: absolute; top: 50%; width: 15%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.7), var(--cor) 52%, color-mix(in srgb, var(--cor) 60%, #000) 100%);
  box-shadow: 0 5px 6px #0006; }
#lados-bola-E { left: 20%; --cor: #1e64d2; }
#lados-bola-D { left: 80%; --cor: #e53935; }

/* as setas no meio da mesa */
.lados-setas { position: absolute; left: 50%; top: 50%; width: 42%; transform: translate(-50%, -50%); display: flex; justify-content: center; gap: 6%; pointer-events: none; }
.lados-seta { position: relative; width: 47%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 16px; background: #fffffff0;
  box-shadow: 0 4px 0 #0004; animation: lados-seta-nascer 0.3s ease-out both; }
.lados-seta + .lados-seta { animation-delay: 60ms; }
.lados-seta svg { width: 82%; height: 82%; fill: var(--primaria-escura); transform: rotate(var(--giro)); }
.lados-setas.dupla .lados-seta svg { fill: #0a8f6a; }
.lados-seta small { position: absolute; bottom: -1.5em; font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(13px, 2.2dvh, 16px); color: #fff; }
@keyframes lados-seta-nascer { 0% { transform: scale(0.3); opacity: 0; } 65% { transform: scale(1.12, 0.92); opacity: 1; } 100% { transform: none; } }
.lados-tempo { position: absolute; left: 30%; width: 40%; top: 66%; height: 8px; border-radius: 99px; background: #0004; overflow: hidden; pointer-events: none; }
.lados-tempo i { display: block; height: 100%; width: 0; background: var(--amarelo); border-radius: 99px; }
.lados-contagem { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(48px, 10dvh, 90px); color: #fff; text-shadow: 0 4px 0 #0005; }
.lados-contagem:empty { display: none; }
@media (prefers-reduced-motion: reduce) {
  .lados-seta, .lados-buraco.certo, .lados-buraco.errado, .lados-mesa.tremer { animation: none; }
}

/* ---------- Setas e Cores ---------- */
/* capa do cartão: a legenda (setas coloridas) e, embaixo, uma faixa de cores */
.setas-capa { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 6px; padding: 14px 18px;
  background: linear-gradient(160deg, #fbf7ff, #efe4fb); box-sizing: border-box; }
.setas-capa .setas-chave { width: 19%; animation: none; }
.setas-capa b { display: flex; gap: 4px; padding: 4px; background: #fff; border: 2px solid #13294b; border-radius: 10px; }
.setas-capa b i { width: 30px; aspect-ratio: 1; border-radius: 6px; background: var(--cor); border: 2px solid #13294b; }

/* legenda: um quadrado colorido para cada seta (como na folha de atividades) */
.setas-legenda { display: flex; flex-wrap: wrap; justify-content: center; gap: min(clamp(6px, 1.4dvh, 12px), 2vw); margin: 2px 0 8px; }
.setas-chave { display: grid; place-items: center; width: min(clamp(40px, 7dvh, 60px), 12vw); aspect-ratio: 1; box-sizing: border-box;
  border-radius: 18%; border: 2.5px solid #13294b; background: var(--cor);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18), inset 0 3px 0 rgba(255, 255, 255, 0.28), 0 3px 0 rgba(19, 41, 75, 0.25);
  animation: cores-nascer 0.38s ease-out both; }
.setas-chave svg { width: 70%; height: 70%; fill: #fff; transform: rotate(var(--giro)); filter: drop-shadow(0 2px 0 #0004); }
/* as cores mudaram: cada quadrado vira como uma carta (achata, passa do ponto e assenta) */
.setas-legenda.mudou .setas-chave { animation: setas-virar 0.6s ease-out both; }
@keyframes setas-virar { 0% { transform: scaleX(1); } 35% { transform: scaleX(0.05) scaleY(1.08); } 70% { transform: scale(1.14, 0.9); } 100% { transform: none; } }

/* a fila de setas: casas brancas com setas pretas; ao responder, cada casa ganha a sua cor */
.setas-fila { display: flex; flex-wrap: nowrap; justify-content: center; gap: min(8px, 1.6vw); margin: 6px auto 4px; }
.setas-casa { display: grid; place-items: center; width: min(clamp(48px, 9dvh, 76px), 13.5vw); aspect-ratio: 1; box-sizing: border-box;
  border-radius: 14%; border: 2.5px solid #13294b; background: #fff; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.25);
  transition: background 0.2s; animation: lados-seta-nascer 0.3s ease-out both; }
.setas-casa svg { width: 74%; height: 74%; fill: var(--texto); transform: rotate(var(--giro)); transition: fill 0.2s; }
.setas-casa.pintada { background: var(--cor); animation: cores-quique 0.45s ease-out both; }
.setas-casa.pintada svg { fill: #fff; }
.setas-fila.tremer { animation: cores-tremer 0.16s linear; }
.cores-msg.aviso { color: #7a3fa3; }

/* as faixas de cores para escolher */
.setas-respostas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 6px; }
.setas-respostas.largas { grid-template-columns: 1fr; gap: 8px; }
.setas-opcao { display: flex; justify-content: center; gap: min(6px, 1.2vw); padding: 8px; border: 2.5px solid #13294b; border-radius: 14px;
  background: #fff; cursor: pointer; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.25); animation: cores-nascer 0.34s ease-out both; }
.setas-opcao i { width: min(clamp(30px, 5.6dvh, 46px), 11vw); aspect-ratio: 1; border-radius: 6px; background: var(--cor); border: 2px solid #13294b;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.setas-opcao:active { transform: translateY(3px); box-shadow: none; }
.setas-opcao:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }
.setas-opcao:disabled { cursor: default; }
.setas-opcao.certa { background: #dff5e7; border-color: var(--verde); box-shadow: 0 4px 0 #1d6b3d; animation: cores-quique 0.45s ease-out; }
.setas-opcao.errada { background: #fde4e4; border-color: var(--vermelho); box-shadow: 0 4px 0 #8e1b1b; animation: tremer 0.4s ease; }
.setas-opcao.apagada { opacity: 0.45; }
@media (prefers-reduced-motion: reduce) {
  .setas-chave, .setas-legenda.mudou .setas-chave, .setas-casa, .setas-casa.pintada, .setas-fila.tremer, .setas-opcao, .setas-opcao.certa, .setas-opcao.errada { animation: none; }
}

/* ---------- De Lado e de Cima ---------- */
/* capa do cartão: a pirâmide de lado, uma seta e o alvo visto de cima */
.vistas-capa { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px;
  background: linear-gradient(160deg, #f3f8ff, #dcebff); box-sizing: border-box; }
.vistas-capa svg { width: 38%; height: auto; overflow: visible; }
.vistas-capa svg :is(rect, path, circle) { stroke: #13294b; stroke-width: 2.5; }
.vistas-capa b { font-size: 26px; color: var(--primaria-escura); }

/* a figura da pergunta, num quadro com o rótulo da vista */
.vistas-quadro { position: relative; margin: 4px auto 0; width: 100%; max-width: 420px; padding: 26px 12px 12px; box-sizing: border-box;
  border: 2.5px solid #13294b; border-radius: 20px; background: linear-gradient(170deg, #ffffff, #eef5ff); box-shadow: 0 4px 0 rgba(19, 41, 75, 0.2); }
.vistas-rotulo { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 3px 14px; white-space: nowrap;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: clamp(14px, 2.4dvh, 17px); color: #fff;
  background: var(--primaria-escura); border: 2.5px solid #13294b; border-radius: 99px; }
.vistas-figura { display: grid; place-items: center; }
.vistas-figura.lado .vistas-svg { width: min(clamp(150px, 30dvh, 260px), 62vw); }
.vistas-figura.cima .vistas-svg { width: min(clamp(110px, 22dvh, 190px), 46vw); }
.vistas-figura.virou { animation: setas-virar 0.6s ease-out; }
.vistas-figura.tremer { animation: cores-tremer 0.16s linear; }
.vistas-pergunta { margin: 8px 0 4px; text-align: center; font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: clamp(16px, 2.8dvh, 20px); color: var(--primaria-escura); }

/* desenhos: contorno escuro; as peças caem e quicam ao empilhar e os anéis abrem do centro */
.vistas-svg { display: block; height: auto; overflow: visible; }
.vistas-svg :is(rect, path, circle) { stroke: #13294b; stroke-width: 2.5; }
.vistas-svg.lado rect { filter: drop-shadow(0 -2px 0 rgba(255, 255, 255, 0.35)); }
.vistas-peca { transform-box: fill-box; transform-origin: 50% 100%; animation: vistas-cair 0.42s cubic-bezier(0.3, 0.7, 0.4, 1.25) both; }
.vistas-anel { transform-box: fill-box; transform-origin: center; animation: vistas-abrir 0.4s ease-out both; }
.vistas-svg.parado .vistas-peca, .vistas-svg.parado .vistas-anel { animation: none; }
@keyframes vistas-cair { 0% { transform: translateY(-40px); opacity: 0; } 55% { transform: translateY(0) scale(1.08, 0.82); opacity: 1; }
  78% { transform: scale(0.96, 1.06); } 100% { transform: none; } }
@keyframes vistas-abrir { 0% { transform: scale(0); } 65% { transform: scale(1.1); } 100% { transform: none; } }

/* as opções */
.vistas-respostas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.vistas-respostas.n4 { grid-template-columns: repeat(4, 1fr); }
.vistas-opcao { display: grid; place-items: center; padding: 10px 8px; border: 2.5px solid #13294b; border-radius: 16px; background: #fff;
  cursor: pointer; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.25); animation: cores-nascer 0.34s ease-out both; }
.vistas-opcao .vistas-svg { width: 100%; max-width: 110px; }
.vistas-respostas.lado .vistas-opcao .vistas-svg { max-width: 130px; }
.vistas-opcao:active { transform: translateY(3px); box-shadow: none; }
.vistas-opcao:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }
.vistas-opcao:disabled { cursor: default; }
.vistas-opcao.certa { background: #dff5e7; border-color: var(--verde); box-shadow: 0 4px 0 #1d6b3d; animation: cores-quique 0.45s ease-out; }
.vistas-opcao.errada { background: #fde4e4; border-color: var(--vermelho); box-shadow: 0 4px 0 #8e1b1b; animation: tremer 0.4s ease; }
.vistas-opcao.apagada { opacity: 0.45; }
@media (max-width: 520px) { .vistas-respostas.n4 { grid-template-columns: repeat(2, 1fr); } .vistas-opcao .vistas-svg { max-width: 92px; } }
@media (prefers-reduced-motion: reduce) {
  .vistas-peca, .vistas-anel, .vistas-figura.virou, .vistas-figura.tremer, .vistas-opcao, .vistas-opcao.certa, .vistas-opcao.errada { animation: none; }
}

/* ---------- Memória dos Dinossauros ---------- */
/* o cenário: céu, chão de grama e moitas; os dinossauros ficam em pé no chão */
.dinos-palco { position: relative; margin: 4px auto 0; width: 100%; max-width: 560px; height: clamp(150px, 27dvh, 240px); overflow: hidden;
  border: 2.5px solid #13294b; border-radius: 20px; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.2);
  background:
    radial-gradient(ellipse 13% 16% at 8% 80%, #4f9d3a 98%, transparent 100%),
    radial-gradient(ellipse 15% 18% at 93% 82%, #4f9d3a 98%, transparent 100%),
    linear-gradient(#bfe8ff, #eaf8ff 64%, #8fd06a 64%, #73bd52); }
.dinos-palco.tremer { animation: cores-tremer 0.16s linear; }
.dinos-fila { position: absolute; left: 3%; right: 3%; bottom: 7%; height: 78%; display: flex; align-items: flex-end; justify-content: center; gap: 1.5%; }
.dinos-fila .dino, .dinos-oculto { flex: 0 1 calc(94% / var(--n, 1)); max-width: 130px; min-width: 0; }
.dino { display: block; height: auto; overflow: visible; transform-origin: 50% 100%; }
.dinos-fila .dino { filter: drop-shadow(0 4px 0 rgba(19, 41, 75, 0.18)); }
/* entra: sobe do mato achatado e assenta (antecipação, comprime e estica, continuidade) e depois respira */
.dino.entra, .dino.volta { animation: dinos-entra 0.45s cubic-bezier(0.3, 0.7, 0.4, 1.3) both, dinos-respira 1.1s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * 110ms), calc(var(--i) * 110ms + 450ms); }
.dino.sai { animation: dinos-sai 0.42s ease-in both; }
@keyframes dinos-entra { 0% { transform: translateY(60%) scale(0.7, 1.25); opacity: 0; } 55% { transform: translateY(0) scale(1.14, 0.86); opacity: 1; }
  80% { transform: scale(0.96, 1.05); } 100% { transform: none; } }
@keyframes dinos-respira { to { transform: scale(1.03, 0.97); } }
@keyframes dinos-sai { 0% { transform: none; } 30% { transform: scale(1.12, 0.82); } 100% { transform: translateY(110%) scale(0.9, 1.1); opacity: 0; } }
/* escondidos: uma moita com ponto de interrogação no lugar de cada dinossauro */
.dinos-oculto { display: grid; place-items: center; aspect-ratio: 1.2; margin-bottom: 2%; border-radius: 50% 50% 18% 18%;
  border: 2.5px solid #13294b; background: radial-gradient(circle at 40% 35%, #7bcf5a, #3f8f2c 75%); color: #fff;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(18px, 4dvh, 34px); text-shadow: 0 2px 0 #0005;
  animation: cores-nascer 0.34s ease-out both; animation-delay: calc(var(--i) * 70ms); }
/* barra do tempo em que a fila fica à mostra */
.dinos-tempo { position: absolute; top: 10px; left: 20%; width: 60%; height: 9px; border-radius: 99px; background: rgba(19, 41, 75, 0.2); overflow: hidden; }
.dinos-tempo i { display: block; height: 100%; width: 100%; border-radius: 99px; background: var(--amarelo); }
@keyframes dinos-tempo { from { width: 100%; } to { width: 0; } }

/* as filas para escolher */
.dinos-respostas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 4px; }
.dinos-respostas.largas { grid-template-columns: 1fr; gap: 8px; }
.dinos-opcao { display: flex; justify-content: center; align-items: flex-end; gap: 2px; padding: 6px 8px; border: 2.5px solid #13294b; border-radius: 16px;
  background: linear-gradient(#ffffff 70%, #e6f5dc); cursor: pointer; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.25); animation: cores-nascer 0.34s ease-out both; }
.dinos-opcao .dino { flex: 0 1 84px; min-width: 0; }
.dinos-opcao:active { transform: translateY(3px); box-shadow: none; }
.dinos-opcao:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }
.dinos-opcao:disabled { cursor: default; }
.dinos-opcao.certa { background: #dff5e7; border-color: var(--verde); box-shadow: 0 4px 0 #1d6b3d; animation: cores-quique 0.45s ease-out; }
.dinos-opcao.errada { background: #fde4e4; border-color: var(--vermelho); box-shadow: 0 4px 0 #8e1b1b; animation: tremer 0.4s ease; }
.dinos-opcao.apagada { opacity: 0.45; }

/* tela deitada ou larga: as filas em 2 colunas e o cenário mais baixo, para caber sem pedir para virar */
@media (min-width: 640px) { .dinos-respostas.largas { grid-template-columns: repeat(2, 1fr); } }
@media (orientation: landscape) and (max-height: 560px) {
  /* celular deitado: o cenário à esquerda e a pergunta com as filas à direita */
  #tela-dinos.ativa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: auto auto 1fr auto;
    column-gap: 12px; align-content: start; }
  #tela-dinos > .barra { grid-column: 1 / -1; }
  #tela-dinos > .dinos-palco { grid-column: 1; grid-row: 2 / span 2; height: auto; min-height: 150px; margin: 0; }
  #tela-dinos > #dinos-msg { grid-column: 1; grid-row: 4; min-height: 0; }
  #tela-dinos > .vistas-pergunta { grid-column: 2; grid-row: 2; margin: 0 0 4px; font-size: 16px; }
  #tela-dinos > .dinos-respostas { grid-column: 2; grid-row: 3 / span 2; align-content: start; }
  .dinos-respostas, .dinos-respostas.largas { grid-template-columns: 1fr; gap: 5px; margin: 0; }
  .dinos-opcao { padding: 3px 6px; }
  .dinos-opcao .dino { flex-basis: 44px; }
}

/* capa do cartão: três dinossauros no cenário */
.dinos-capa { display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 10px 10px 8px; box-sizing: border-box;
  background: linear-gradient(#bfe8ff, #eaf8ff 66%, #8fd06a 66%, #73bd52); }
.dinos-capa .dino { width: 31%; }
@media (prefers-reduced-motion: reduce) {
  .dino.entra, .dino.volta, .dino.sai, .dinos-oculto, .dinos-palco.tremer, .dinos-opcao, .dinos-opcao.certa, .dinos-opcao.errada { animation: none; }
}

/* ---------- Atenção à Forma ---------- */
/* a carta: papel branco com os símbolos; chega girando e sai voando quando fica vazia */
.simbolos-mesa { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 2px 0 8px; }
.simbolos-carta { display: grid; place-items: center; padding: 6px; border: 3px solid #13294b; border-radius: 14px;
  background: linear-gradient(160deg, #ffffff, #f4f1ea); box-shadow: 0 5px 0 rgba(19, 41, 75, 0.2); }
.simb-figura { display: block; width: min(clamp(120px, 27dvh, 230px), 58vw); height: auto; overflow: visible; }
/* as peças da figura: o g de fora posiciona (atributo transform) e o de dentro anima */
.simb-parte > g { transform-box: fill-box; transform-origin: center; }
.simbolos-carta.chega .simb-parte > g { animation: cores-nascer 0.34s ease-out both; animation-delay: calc(0.3s + var(--i) * 60ms); }
.simbolos-carta.chega { animation: simb-chega 0.5s cubic-bezier(0.3, 0.7, 0.4, 1.25) both; }
.simbolos-carta.vai { animation: simb-vai 0.55s ease-in both; }
.simbolos-carta .simb-parte.sai > g { animation: simb-sai 0.35s ease-out forwards; }
@keyframes simb-chega { 0% { transform: translateY(-50px) rotate(-10deg) scale(0.8); opacity: 0; } 65% { transform: rotate(2deg) scale(1.05, 0.95); opacity: 1; }
  100% { transform: none; } }
@keyframes simb-vai { 0% { transform: none; } 20% { transform: translateX(-6%) rotate(-3deg); } 100% { transform: translateX(130%) rotate(16deg); opacity: 0; } }
@keyframes simb-sai { 0% { transform: scale(1); } 40% { transform: scale(1.3, 0.75); } 100% { transform: scale(0.92); opacity: 0.12; } }   /* fica a sombra da peça */
/* barra do tempo da carta: esvazia e fica vermelha no fim */
.simb-tempo { width: min(clamp(120px, 27dvh, 230px), 58vw); height: 9px; border-radius: 99px; background: rgba(19, 41, 75, 0.18); overflow: hidden; }
.simb-tempo i { display: block; height: 100%; width: 100%; border-radius: 99px; background: var(--amarelo); }
@keyframes simb-tempo { 0% { width: 100%; } 70% { background: var(--amarelo); } 100% { width: 0; background: var(--vermelho); } }
/* a peça que voa do tabuleiro até a carta */
.simb-voando { position: fixed; z-index: 60; margin: 0; pointer-events: none; overflow: visible; }

/* o tabuleiro: a placa verde de pinos, com as peças espalhadas */
.simbolos-tabuleiro { display: grid; grid-template-columns: repeat(var(--colunas, 4), minmax(0, 1fr)); gap: clamp(6px, 1.4dvh, 10px);
  width: 100%; max-width: 480px; margin: 0 auto; padding: clamp(8px, 1.6dvh, 14px); box-sizing: border-box;
  border: 3px solid #13294b; border-radius: 18px; box-shadow: inset 0 0 0 6px #5be064, 0 5px 0 #1e8a28; align-content: center;
  background: radial-gradient(circle, rgba(0, 60, 10, 0.22) 1.6px, transparent 2.2px) 0 0 / 12px 12px, #3fcf4b; }
.simb-peca { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-height: 12dvh; width: 100%; padding: 0; justify-self: center;
  border: 2.5px solid #13294b; border-radius: 16px; background: rgba(255, 255, 255, 0.9); cursor: pointer;
  box-shadow: 0 4px 0 rgba(19, 41, 75, 0.3); animation: cores-nascer 0.34s ease-out both; }
.simb-peca .simb { width: 72%; height: 72%; overflow: visible; transform: rotate(var(--giro, 0deg)); }
.simb-peca:active { transform: translateY(3px); box-shadow: none; }
.simb-peca:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }
.simb-peca.achou { background: #dff5e7; border-color: var(--verde); box-shadow: 0 4px 0 #1d6b3d; cursor: default; }
.simb-peca.achou .simb { opacity: 0.18; }
.simb-peca.achou::after { content: '✓'; position: absolute; font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(22px, 4dvh, 34px);
  color: #1d6b3d; animation: cores-quique 0.45s ease-out both; }
.simb-peca.errou { animation: simb-errou 0.5s ease-out; }
@keyframes simb-errou { 0%, 100% { transform: none; background: rgba(255, 255, 255, 0.9); } 15% { transform: translateX(-5px); background: #ffd2d2; }
  35% { transform: translateX(4px); } 55% { transform: translateX(-2px); background: #ffd2d2; } }

/* capa do cartão: a carta em cima do tabuleiro verde */
.simbolos-capa { display: grid; place-items: center; padding: 16px; box-sizing: border-box;
  background: radial-gradient(circle, rgba(0, 60, 10, 0.22) 1.6px, transparent 2.2px) 0 0 / 12px 12px, #3fcf4b; }
.simbolos-capa .simbolos-carta { padding: 4px; transform: rotate(-4deg); }
.simbolos-capa .simb-figura { width: 104px; }

/* celular deitado: a carta à esquerda e o tabuleiro à direita */
@media (orientation: landscape) and (max-height: 560px) {
  #tela-simbolos.ativa { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); grid-template-rows: auto 1fr auto; column-gap: 12px; align-content: start; }
  #tela-simbolos > .barra { grid-column: 1 / -1; }
  #tela-simbolos > .simbolos-mesa { grid-column: 1; grid-row: 2; margin: 0; }
  .simb-figura, .simb-tempo { width: min(42dvh, 34vw); }
  #simbolos-msg { font-size: 13px; }
  #tela-simbolos > #simbolos-msg { grid-column: 1; grid-row: 3; min-height: 0; }
  #tela-simbolos > .simbolos-tabuleiro { grid-column: 2; grid-row: 2 / span 2; max-width: none; }
  .simb-peca { max-height: 17dvh; }
}
@media (prefers-reduced-motion: reduce) {
  .simbolos-carta.chega, .simbolos-carta.vai, .simbolos-carta .simb-parte.sai > g, .simbolos-carta.chega .simb-parte > g, .simb-peca, .simb-peca.errou, .simb-peca.achou::after { animation: none; }
  .simbolos-carta .simb-parte.sai > g { opacity: 0.12; }
}

/* ---------- Tetris da Tabuada ---------- */
/* o pote: a arena clara da Chuva de Matemática, com o canvas das bolas ocupando tudo */
.tab-pote { position: relative; overflow: hidden; touch-action: none; border: 3px solid #13294b; }
.tela-jogo > .tab-pote { flex: 1 1 0; min-height: 150px; height: auto; }
.tab-pote canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.tab-lado { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

/* a conta montada: número, operação, número = resultado */
.tab-conta { display: flex; align-items: center; justify-content: center; gap: min(10px, 2vw); padding: 6px 10px; border: 2.5px solid #13294b; border-radius: 16px;
  background: #fff; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.2); font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(22px, 4dvh, 30px); }
.tab-num { min-width: 1.2em; text-align: center; color: var(--primaria-escura); }
.tab-sinal { min-width: 1em; text-align: center; color: var(--vermelho); }
.tab-igual { color: var(--cinza-texto); }
.tab-res { min-width: 1.8em; padding: 0 8px; text-align: center; border-radius: 10px; background: #fff3c4; color: #9a6b00; transition: background 0.2s; }
.tab-conta.pronta .tab-res { background: var(--amarelo); color: var(--texto); animation: cores-quique 0.4s ease-out; }
.tab-conta.errou { animation: cores-tremer 0.16s linear 2; }
.tab-limpar { margin-left: auto; font-size: 14px; }

/* o teclado: números à esquerda (5 + 4) e operações numa coluna à direita */
.tab-teclado { display: grid; grid-template-columns: 1fr minmax(52px, 18%); gap: 8px; height: clamp(104px, 21dvh, 170px); }
.tab-nums { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; }
.tab-linha { display: flex; gap: 8px; }
.tab-linha .tab-tecla { flex: 1; }
.tab-ops { display: grid; grid-template-rows: repeat(4, 1fr); gap: 6px; }
.tab-tecla { display: grid; place-items: center; min-width: 0; padding: 0; border: 2.5px solid #13294b; border-radius: 14px; cursor: pointer;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(20px, 3.4dvh, 28px); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  background: var(--primaria); box-shadow: 0 4px 0 var(--primaria-escura); transition: transform 0.08s, box-shadow 0.08s; }
.tab-tecla.op { background: var(--vermelho); box-shadow: 0 4px 0 #8e1b1b; font-size: clamp(18px, 3dvh, 24px); }
.tab-tecla:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--primaria-escura); }
.tab-tecla.escolhida { background: var(--amarelo); color: var(--texto); text-shadow: none; box-shadow: 0 4px 0 #d9a514; transform: translateY(-2px) scale(1.04); }
.tab-tecla:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }
#tab-msg { min-height: 1.4em; }

/* capa do cartão: bolas empilhadas e a conta */
.tab-capa { position: relative; display: block; background: linear-gradient(180deg, #d6f1f4 0%, #f2fbfc 75%, #fff8dc 100%); }
.tab-capa i { position: absolute; display: grid; place-items: center; width: 21%; aspect-ratio: 1; box-sizing: border-box; border-radius: 16%; border: 2.5px solid #13294b;
  font-style: normal; font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 20px; color: #fff; -webkit-text-stroke: 1px #13294b;
  background: linear-gradient(#fff 0, var(--cor) 20%, var(--cor) 100%); }
.tab-capa i.g { width: 42%; font-size: 30px; }   /* o quadrado grande (2 x 2) */
.tab-capa b { position: absolute; right: 6%; top: 8%; padding: 2px 10px; font-family: 'Fredoka', sans-serif; font-size: 18px; color: var(--texto);
  background: var(--amarelo); border: 2px solid #13294b; border-radius: 10px; }

/* celular deitado: o pote à esquerda e a conta com o teclado à direita */
@media (orientation: landscape) and (max-height: 560px) {
  #tela-tabuada.ativa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 12px; }
  #tela-tabuada > .barra { grid-column: 1 / -1; }
  #tela-tabuada > .tab-pote { grid-column: 1; grid-row: 2; min-height: 0; }
  #tela-tabuada > .tab-lado { grid-column: 2; grid-row: 2; margin: 0; }
  .tab-teclado { flex: 1 1 auto; height: auto; min-height: 120px; }
  #tab-msg { font-size: 13px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tab-conta.pronta .tab-res, .tab-conta.errou { animation: none; }
}

/* ---------- Classes de Palavras ---------- */
/* a frase: um cartão com as palavras; as sublinhadas são para classificar, as cinzas já vêm prontas */
.classes-frase { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 8px 6px; margin: 4px 0 6px; padding: 16px 12px;
  border: 3px solid #13294b; border-radius: 18px; background: linear-gradient(170deg, #ffffff, #f4f8ff); box-shadow: 0 5px 0 rgba(19, 41, 75, 0.18); }
.classes-frase.perfeita { animation: classes-brilho 0.8s ease-out; }
@keyframes classes-brilho { 0% { box-shadow: 0 5px 0 rgba(19, 41, 75, 0.18), 0 0 0 0 rgba(46, 158, 91, 0.6); } 60% { box-shadow: 0 5px 0 rgba(19, 41, 75, 0.18), 0 0 0 12px rgba(46, 158, 91, 0); } }
.classes-palavra { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 8px 3px; border: 2.5px solid transparent; border-radius: 12px;
  background: transparent; cursor: pointer; font-family: 'Fredoka', sans-serif; color: var(--texto); }
.classes-frase.chega .classes-palavra { animation: cores-nascer 0.32s ease-out both; animation-delay: calc(var(--i) * 45ms); }
.classes-texto { font-weight: 600; font-size: clamp(24px, 4.4dvh, 36px); line-height: 1.1; }
.classes-tag { min-height: 1.2em; max-width: 9.5em; text-align: center; line-height: 1.15; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 12px; text-transform: lowercase; color: var(--cinza-texto); }
.classes-pont { align-self: flex-start; margin-left: -6px; padding-top: 4px; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: clamp(24px, 4.4dvh, 36px); color: var(--texto); }
/* para classificar: sublinhado tracejado; a escolhida fica amarela */
.classes-palavra.alvo .classes-texto { text-decoration: underline dashed 3px var(--primaria); text-underline-offset: 6px; }
.classes-palavra.alvo .classes-tag { color: var(--primaria); }
.classes-palavra.escolhida { border-color: #13294b; background: var(--amarelo); box-shadow: 0 3px 0 #d9a514; transform: translateY(-2px); }
.classes-palavra.escolhida .classes-texto { text-decoration-color: #13294b; }
/* já vem pronta (classe que ainda não entrou na etapa) */
.classes-palavra.pronta { cursor: default; opacity: 0.6; }
.classes-palavra.pronta .classes-texto { font-weight: 500; }
/* acertou (verde) ou o jogo mostrou a classe (laranja); a etiqueta ganha a cor da classe */
.classes-palavra.certa, .classes-palavra.revelada { cursor: default; border-color: var(--verde); background: #dff5e7; animation: cores-quique 0.45s ease-out; }
.classes-palavra.revelada { border-color: #f57c00; background: #fff1dc; }
.classes-palavra.certa .classes-tag, .classes-palavra.revelada .classes-tag { color: #fff; padding: 0 6px; border-radius: 6px; background: var(--cor); }
.classes-palavra.treme { animation: simb-errou 0.5s ease-out; }
.classes-msg { min-height: 2.8em; }

/* os botões das classes: cada um com a cor da sua classe */
.classes-botoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin-top: 2px; }
.classes-botao { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 6px 8px; border: 2.5px solid #13294b; border-radius: 14px;
  cursor: pointer; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: clamp(15px, 2.4dvh, 18px); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  background: var(--cor); box-shadow: 0 4px 0 color-mix(in srgb, var(--cor) 55%, #000); animation: cores-nascer 0.3s ease-out both; }
.classes-botao span { font-size: 1.1em; text-shadow: none; }
.classes-botao:active { transform: translateY(3px); box-shadow: none; }
.classes-botao:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }
/* celular: sem o ícone e com letra menor, para os nomes longos (substantivo, preposição) caberem */
@media (max-width: 440px) { .classes-botao { gap: 0; padding: 6px 3px; font-size: 15px; } .classes-botao span { display: none; } }

/* capa do cartão: "O carro é verde." com as classes */
.classes-capa { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 6px 4px; padding: 12px; box-sizing: border-box;
  background: linear-gradient(170deg, #ffffff, #e8f1ff); }
.classes-capa span { display: inline-flex; flex-direction: column; align-items: center; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 24px; color: var(--texto); }
.classes-capa small { margin-top: 2px; padding: 0 5px; border-radius: 6px; background: var(--cor); color: #fff; font-family: 'Nunito', sans-serif; font-size: 11px; font-weight: 800; }

/* celular deitado: a frase à esquerda e os botões à direita */
@media (orientation: landscape) and (max-height: 560px) {
  #tela-classes.ativa { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 12px; align-content: start; }
  #tela-classes > .barra { grid-column: 1 / -1; }
  #tela-classes > .classes-frase { grid-column: 1; grid-row: 2; }
  #tela-classes > .classes-msg { grid-column: 1; grid-row: 3; font-size: 13px; }
  #tela-classes > .classes-botoes { grid-column: 2; grid-row: 2 / span 2; align-content: start; grid-template-columns: repeat(2, 1fr); }
  .classes-botao { min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .classes-frase.chega .classes-palavra, .classes-palavra.certa, .classes-palavra.revelada, .classes-palavra.treme, .classes-botao, .classes-frase.perfeita { animation: none; }
}

/* ---------- Jogo dos Gráficos ---------- */
/* a frase com os dados */
.graficos-enunciado { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 2px 0 8px; padding: 10px 14px;
  border: 3px solid #13294b; border-radius: 18px; background: linear-gradient(170deg, #ffffff, #f4f8ff); box-shadow: 0 4px 0 rgba(19, 41, 75, 0.18); text-align: center; }
.graficos-tipo { padding: 2px 12px; border-radius: 99px; background: var(--primaria-escura); color: #fff; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 14px; }
.graficos-pergunta { margin: 0; font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: clamp(18px, 3dvh, 23px); line-height: 1.25; color: var(--texto); }
.graficos-instrucao { font-weight: 800; color: var(--cinza-texto); }

/* os três gráficos para escolher */
.graficos-opcoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .graficos-opcoes { grid-template-columns: 1fr; } }
.graficos-opcao { position: relative; display: flex; flex-direction: column; align-items: center; padding: 8px 6px 6px; border: 3px solid #13294b; border-radius: 16px;
  background: #fff; cursor: pointer; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.22); animation: cores-nascer 0.34s ease-out both; }
.graficos-opcao:active { transform: translateY(3px); box-shadow: none; }
.graficos-opcao:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }
.graficos-opcao:disabled { cursor: default; }
.graficos-letra { position: absolute; top: 6px; right: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 2.5px solid #13294b; background: var(--amarelo); font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 15px; color: var(--texto); }
.graficos-opcao.certa { border-color: var(--verde); background: #eaf8ef; box-shadow: 0 4px 0 #1d6b3d; animation: cores-quique 0.45s ease-out; }
.graficos-opcao.errada { border-color: var(--vermelho); background: #fdecec; box-shadow: 0 4px 0 #8e1b1b; animation: simb-errou 0.5s ease-out; }
.graficos-opcao.apagada { opacity: 0.45; }
.graficos-nota { min-height: 0; padding: 0 4px; font-weight: 800; font-size: 13px; line-height: 1.25; text-align: center; }
.graficos-opcao.certa .graficos-nota { color: #1d6b3d; }
.graficos-opcao.errada .graficos-nota { color: #b42318; }
.graficos-msg { min-height: 2.6em; }
.graficos-proxima { display: block; margin: 4px auto 8px; }

/* os desenhos: contorno escuro; as colunas e barras crescem e assentam, a linha é traçada e as fatias abrem */
.gr-svg { display: block; width: 100%; max-width: 420px; height: auto; overflow: visible; font-family: 'Fredoka', 'Nunito', sans-serif; }
.gr-eixo-titulo { font-size: 11px; font-weight: 700; fill: var(--primaria-escura); }
.gr-num { font-size: 11px; font-weight: 700; fill: #13294b; text-anchor: end; }   /* números da escala bem visíveis */
.gr-num.meio { text-anchor: middle; }
.gr-rotulo { font-size: 11px; font-weight: 600; fill: #13294b; text-anchor: middle; }
.gr-rotulo.longo { font-size: 9px; }
.gr-rotulo.fim { text-anchor: end; }
.gr-valor { font-size: 12px; font-weight: 700; fill: #13294b; text-anchor: middle; }
.gr-valor.inicio { text-anchor: start; }
.gr-legenda { font-size: 12px; font-weight: 600; fill: #13294b; }
.gr-grade { stroke: #8fa3b5; stroke-width: 1.3; stroke-dasharray: 5 3; }   /* linhas-guia mais escuras, tracejadas, para seguir até o valor */
.gr-grade.meia { stroke: #c3d1dd; stroke-width: 1; stroke-dasharray: 2 4; }   /* meio do intervalo: mais clarinha, sem número */
.gr-base { stroke: #13294b; stroke-width: 2; }
.gr-coluna, .gr-barra { stroke: #13294b; stroke-width: 2; transform-box: fill-box; }
.gr-coluna { transform-origin: 50% 100%; animation: gr-crescer-y 0.5s cubic-bezier(0.3, 0.7, 0.4, 1.2) both; animation-delay: calc(var(--i) * 80ms); }
.gr-barra { transform-origin: 0 50%; animation: gr-crescer-x 0.5s cubic-bezier(0.3, 0.7, 0.4, 1.2) both; animation-delay: calc(var(--i) * 80ms); }
.gr-linha { fill: none; stroke: #1e64d2; stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: gr-tracar 0.7s ease-out 0.1s forwards; }
.gr-ponto { fill: #fff; stroke: #1e64d2; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: cores-nascer 0.3s ease-out both; animation-delay: calc(0.2s + var(--i) * 90ms); }
.gr-fatia { stroke: #fff; stroke-width: 2; transform-box: view-box; transform-origin: 92px 104px; animation: gr-abrir 0.45s cubic-bezier(0.3, 0.7, 0.4, 1.2) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes gr-crescer-y { 0% { transform: scaleY(0); } 70% { transform: scaleY(1.06); } 100% { transform: none; } }
@keyframes gr-crescer-x { 0% { transform: scaleX(0); } 70% { transform: scaleX(1.05); } 100% { transform: none; } }
@keyframes gr-tracar { to { stroke-dashoffset: 0; } }
@keyframes gr-abrir { 0% { transform: scale(0.3) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.04); opacity: 1; } 100% { transform: none; } }

/* capa do cartão: pizza, barras, colunas e linha, como no cartaz dos tipos de gráficos */
.graficos-capa { display: grid; place-items: center; padding: 10px; box-sizing: border-box; background: linear-gradient(170deg, #ffffff, #fff8d6); }
.graficos-capa svg { width: 92%; height: auto; }
@media (prefers-reduced-motion: reduce) {
  .gr-coluna, .gr-barra, .gr-ponto, .gr-fatia, .graficos-opcao, .graficos-opcao.certa, .graficos-opcao.errada { animation: none; }
  .gr-linha { animation: none; stroke-dashoffset: 0; }
}

/* menu de categorias da lista de jogos */
.filtro-temas { align-items: center; gap: 10px; }
.filtro-rotulo { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 17px; color: var(--primaria-escura); }
.filtro-menu {
  appearance: none; -webkit-appearance: none; min-height: 48px; max-width: 100%; padding: 10px 44px 10px 16px;
  border: 2px solid var(--primaria); border-radius: 999px; color: var(--primaria-escura); cursor: pointer;
  font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; font-size: 18px;
  background: var(--branco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='22' height='22' fill='none' stroke='%23137784' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  box-shadow: 0 3px 0 rgba(19, 41, 75, 0.1);
}
.filtro-menu:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }

/* ---------- Esperando a planilha: reloginho animado ao lado do texto ---------- */
.carregando { display: flex; align-items: center; justify-content: center; gap: 10px; }
.carregando[hidden] { display: none; }
.erro-login.carregando, .quiz-status.carregando { color: var(--primaria-escura); }
.carregando::before { content: ''; flex: none; width: 24px; height: 24px; box-sizing: border-box; border-radius: 50%;
  border: 3px solid var(--primaria-escura); box-shadow: 0 2px 0 rgba(19, 41, 75, 0.2);
  background: radial-gradient(circle, var(--primaria-escura) 0 2.5px, transparent 3px),
    linear-gradient(var(--primaria-escura), var(--primaria-escura)) 50% 2px / 3px 8px no-repeat, var(--amarelo);
  animation: relogio-girar 1.2s linear infinite; }
@keyframes relogio-girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .carregando::before { animation-duration: 4s; } }

/* "Novo questionário": botão amarelo (a cor da logo) no alto do painel; aberto, mostra o formulário embaixo */
#novo-questionario { margin: 4px 0 12px; }
#novo-questionario:not([open]) { padding: 0; border: 0; background: none; }
#novo-questionario > summary { display: flex; align-items: center; justify-content: center; gap: 8px; list-style: none;
  padding: 12px 18px; border-radius: 12px; background: var(--amarelo); color: var(--texto); box-shadow: 0 3px 0 #d9a514;
  font-size: 19px; transition: filter 0.15s, transform 0.1s; }
#novo-questionario > summary::-webkit-details-marker { display: none; }
#novo-questionario > summary::after { content: '▾'; font-size: 16px; transition: transform 0.2s; }
#novo-questionario[open] > summary { margin: -10px -12px 8px; }
#novo-questionario[open] > summary::after { transform: rotate(180deg); }
#novo-questionario > summary:hover { filter: brightness(1.04); }
#novo-questionario > summary:active { transform: translateY(2px); box-shadow: 0 1px 0 #d9a514; }
#novo-questionario > summary:focus-visible { outline: 3px solid var(--primaria-escura); outline-offset: 2px; }

/* e-mails dos relatórios: o cadastro fica em cima e a lista dos cadastrados embaixo */
#form-novo-email { margin-bottom: 14px; }

/* ---------- Palavra Escondida ---------- */
.escondida-dica { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px; padding: 8px 12px;
  border-radius: 14px; background: #f3edfc; color: var(--texto); font-weight: 700; font-size: clamp(15px, 2.4dvh, 18px); text-align: left; }
.escondida-figura { font-size: clamp(32px, 6dvh, 48px); line-height: 1; }
.escondida-grade {
  flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 9), 1fr); align-content: center; gap: clamp(3px, 0.8vw, 6px);
  padding: 10px; border-radius: 16px; background: var(--branco); box-shadow: var(--sombra); touch-action: none; user-select: none;
}
.escondida-grade.tremer { animation: luz-tremer 0.16s linear 2; }
/* filas separadas por um respiro maior, para ler fila por fila */
.letra-escondida {
  aspect-ratio: 1; min-width: 0; padding: 0; border-radius: 8px; background: #eef4f6; color: var(--texto);
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(16px, min(5.2vw, 3.6dvh), 30px); line-height: 1;
  transition: transform 0.08s, background 0.12s;
}
.letra-escondida.marcada { background: #ffe082; color: #5d4300; transform: scale(1.06); }
.letra-escondida.achada { background: #2e9e5b; color: #fff; animation: letra-achada 0.4s ease-out; }
.letra-escondida.mostrada { background: #e53935; color: #fff; }
@keyframes letra-achada { 40% { transform: translateY(-4px) scale(1.12); } }
.escondida-msg { min-height: 1.4em; margin: 8px 0 2px; text-align: center; font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: clamp(15px, 2.4dvh, 19px); color: var(--primaria-escura); }
.escondida-msg.ok { color: #1d6b3d; }
.escondida-msg.erro { color: #b42318; }
#btn-escondida-limpar { margin-top: 4px; }

/* Palavra Escondida: pilha de 10 vagas numa fila só */
#escondida-grade { --cols: 10; flex: 0 0 auto; grid-template-columns: repeat(10, 1fr); padding: 10px 8px; }
.vaga-escondida { aspect-ratio: 1; border-radius: 8px; border: 2px dashed #d6e6ea; }
.letra-escondida.entrou { animation: letra-entrou 0.35s ease-out; }
@keyframes letra-entrou { 0% { transform: translateX(30px) scale(0.6); opacity: 0; } 70% { transform: translateX(-2px) scale(1.06); } 100% { transform: none; opacity: 1; } }
.letra-escondida.achada { animation: letra-sai 0.38s ease-in forwards; }
@keyframes letra-sai { 0% { transform: none; } 40% { transform: translateY(-6px) scale(1.15); } 100% { transform: translateY(-30px) scale(0.6); opacity: 0; } }
#escondida-grade.quase-cheia { box-shadow: 0 0 0 3px #f6b26b, var(--sombra); }
.escondida-ritmo { height: 6px; margin: 6px 4px 0; border-radius: 999px; background: #e3edf0; overflow: hidden; }
.escondida-ritmo span { display: block; height: 100%; width: 0; background: var(--primaria); border-radius: 999px; }
.escondida-ritmo span.andando { animation: ritmo-andando 2s linear forwards; }
@keyframes ritmo-andando { from { width: 0; } to { width: 100%; } }
.tela-jogo > .escondida-dica { flex: 0 0 auto; }
#tela-escondida .escondida-dica { margin-top: auto; }   /* o bloco do jogo fica no meio do espaço que sobra */
#tela-escondida #btn-escondida-limpar { margin-bottom: auto; }

/* ---------- Copie Certo ---------- */
.copia-area { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2.5vw, 20px); }
.copia-lado { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.copia-rotulo { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 14px; color: var(--primaria-escura); }
.copia-modelo, .copia-quadro { display: grid; grid-template-columns: repeat(4, 1fr); background: #13294b; gap: 2px; border: 2px solid #13294b; border-radius: 6px; }
.copia-modelo { width: clamp(78px, min(24vw, 15dvh), 140px); }
.copia-quadro { width: min(64vw, 40dvh, 380px); touch-action: none; }
.casa-modelo, .casa-copia { position: relative; aspect-ratio: 1; background: #fff; padding: 0; border-radius: 0; overflow: hidden; }
.casa-copia { cursor: pointer; transition: background 0.15s; }
.casa-copia.alvo { background: #fff3c4; }
.casa-copia.presa { background: #e3f6ea; cursor: default; }
.casa-copia.errada { background: #fde0de; box-shadow: inset 0 0 0 3px #e53935; }
.casa-copia.encaixou .peca-copia { animation: peca-encaixe 0.25s ease-out; }
.casa-copia.festa .peca-copia { animation: peca-festa 0.45s ease-out; }
@keyframes peca-encaixe { 0% { transform: scale(1.25); } 60% { transform: scale(0.92); } 100% { transform: none; } }
@keyframes peca-festa { 40% { filter: brightness(1.25); transform: scale(1.06); } }
.copia-quadro.tremer { animation: luz-tremer 0.16s linear 2; }
/* a peça: um quadradinho colorido; os triângulos são metade dele, cortada na diagonal */
.peca-copia { position: absolute; inset: 0; background: var(--cor); }
.peca-copia.forma-a { clip-path: polygon(0 0, 100% 0, 0 100%); }
.peca-copia.forma-b { clip-path: polygon(0 0, 100% 0, 100% 100%); }
.peca-copia.forma-c { clip-path: polygon(0 0, 100% 100%, 0 100%); }
.peca-copia.forma-d { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.copia-msg { min-height: 1.3em; margin: 6px 0 4px; text-align: center; font-weight: 700; font-size: clamp(14px, 2.2dvh, 17px); color: var(--primaria-escura); }
.copia-msg.ok { color: #1d6b3d; }
.copia-msg.erro { color: #b42318; }
.copia-cores { display: flex; justify-content: center; gap: 10px; margin-bottom: 6px; }
.copia-cores[hidden] { display: none; }
.pote-copia { width: 40px; height: 40px; border-radius: 50%; background: var(--cor); border: 3px solid #fff; box-shadow: 0 0 0 2px #c9d6dc; padding: 0; }
.pote-copia.ativo { box-shadow: 0 0 0 3px #13294b; transform: scale(1.12); }
.copia-pecas { display: flex; justify-content: center; gap: clamp(8px, 2.5vw, 16px); margin-bottom: 6px; }
.peca-btn { position: relative; width: clamp(46px, min(13vw, 7.5dvh), 64px); aspect-ratio: 1; padding: 0; border-radius: 8px;
  background: #fff; border: 2px solid #c9d6dc; overflow: hidden; touch-action: none; cursor: grab; }
.peca-btn .peca-copia { inset: 6px; }
.peca-btn.escolhida { border-color: #13294b; box-shadow: 0 0 0 3px #ffd54f; }
.fantasma-copia { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; }
.fantasma-copia .peca-copia { inset: 0; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3)); }
.copia-botoes { display: flex; justify-content: center; align-items: center; gap: 10px; }
.copia-botoes .btn-grande, .copia-botoes .btn-sec { margin: 0; }
#btn-copia-conferir:disabled { opacity: 0.5; }

/* ---------- Barquinhos ---------- */
.barcos-mar {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: space-evenly; gap: 6px;
  padding: 10px 8px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #d9f1ff 0%, #bfe6fb 40%, #5fb6e8 41%, #2f8fd0 100%);
  box-shadow: var(--sombra);
}
.barcos-fileira { display: flex; justify-content: center; align-items: flex-end; gap: clamp(2px, 1vw, 8px); }
.barco { width: min(calc((100% - 8px * var(--por-fileira, 5)) / var(--por-fileira, 5)), 92px); height: auto; transition: transform 0.6s, opacity 0.6s; }
.barco.espelho { transform: scaleX(-1); }   /* barco virado para a esquerda */
/* a água balança os barcos (nos níveis mais difíceis) */
.barcos-mar.balanca .barco { animation: barco-balanca 2.2s ease-in-out infinite; animation-delay: var(--atraso, 0s); }
.barcos-mar.balanca .barco.espelho { animation-name: barco-balanca-espelho; }
@keyframes barco-balanca { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-4px); } }
@keyframes barco-balanca-espelho { 0%, 100% { transform: scaleX(-1) rotate(-5deg) translateY(0); } 50% { transform: scaleX(-1) rotate(5deg) translateY(-4px); } }
/* memória: os barcos afundam */
.barcos-mar.afundou .barco { opacity: 0; transform: translateY(60%); animation: none; }
.barcos-mar.afundou .barco.espelho { transform: scaleX(-1) translateY(60%); }
.barcos-legenda { margin: 6px 0 0; text-align: center; font-size: 14px; font-weight: 700; color: var(--cinza-texto); }
.barcos-msg { min-height: 1.3em; margin: 4px 0; text-align: center; font-weight: 700; font-size: clamp(14px, 2.3dvh, 18px); color: var(--primaria-escura); }
.barcos-msg.ok { color: #1d6b3d; }
.barcos-msg.erro { color: #b42318; }
.barcos-opcoes { margin-top: 4px; }
.barcos-opcao { font-family: 'Fredoka', sans-serif; font-size: clamp(20px, 3.4dvh, 28px); letter-spacing: 1px; }
.barcos-opcao.certa { background: var(--verde); box-shadow: 0 6px 0 #1d6b3d; }
.barcos-opcao.errada { background: var(--vermelho); box-shadow: 0 6px 0 #8e1b1b; }
/* placa no alto: esquerda e direita, como no caderno */
.barcos-placa { display: flex; justify-content: space-between; margin: 0 4px 6px; font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: clamp(17px, 2.8dvh, 22px); color: var(--texto); }
.barcos-placa span { padding: 4px 12px; border-radius: 999px; background: #fff3e0; border: 2px solid #f57c00; }
.barcos-placa b { color: #e65100; }
/* janelinha que ensina esquerda e direita (aparece depois de 2 erros seguidos) */
.barcos-ajuda { position: fixed; inset: 0; z-index: 35; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(19, 41, 75, 0.55); }
.barcos-ajuda[hidden] { display: none; }
.barcos-ajuda-cartao { width: min(100%, 440px); max-height: 100%; overflow: auto; animation: entrar 0.3s ease; }
.barcos-ajuda-linha { display: flex; align-items: center; gap: 12px; margin: 8px 0; padding: 8px; border-radius: 14px; background: #eef7fd; }
.barcos-ajuda-linha p { margin: 0; text-align: left; font-size: 15px; }
.barcos-ajuda-linha b { font-family: 'Fredoka', sans-serif; font-size: 20px; color: #e65100; }
.barcos-ajuda-linha .barco { flex: 0 0 auto; width: 88px; }
/* os barcos da janelinha "andam" para o seu lado */
.barcos-ajuda-linha.esquerda .barco { animation: barco-vai-esquerda 1.6s ease-in-out infinite; }
.barcos-ajuda-linha.direita .barco { animation: barco-vai-direita 1.6s ease-in-out infinite; }
@keyframes barco-vai-esquerda { 0%, 100% { transform: scaleX(-1) translateX(-6px); } 50% { transform: scaleX(-1) translateX(6px); } }
@keyframes barco-vai-direita { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
.barcos-ajuda-dica { margin: 10px 0; padding: 8px 10px; border-radius: 12px; background: #fff8d6; font-size: 15px; text-align: left; }

/* ---------- Giro Imaginário ---------- */
.giro-palco { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; background: var(--branco); box-shadow: var(--sombra); }
.giro-modelo { flex: 0 0 auto; width: clamp(96px, min(30vw, 18dvh), 170px); }
.giro-modelo .figura-giro { transform: rotate(var(--giro, 0deg)); transition: transform 0.45s cubic-bezier(0.3, 1.3, 0.5, 1); }
.figura-giro { display: block; width: 100%; height: auto; }
.giro-comando { flex: 1; margin: 0; font-size: clamp(15px, 2.4dvh, 19px); font-weight: 700; color: var(--texto); line-height: 1.35; }
.giro-comando b { color: #1565c0; }
.giro-setas { display: inline-block; font-size: 1.25em; color: #e65100; letter-spacing: 1px; }
.giro-msg { min-height: 1.3em; margin: 8px 0 6px; text-align: center; font-weight: 700; font-size: clamp(14px, 2.2dvh, 17px); color: var(--primaria-escura); }
.giro-msg.ok { color: #1d6b3d; }
.giro-msg.erro { color: #b42318; }
.giro-opcoes { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(8px, 2.5vw, 16px);
  align-content: center; justify-items: center; }
.giro-opcao { width: min(100%, 22dvh, 190px); aspect-ratio: 1; padding: 10px; border-radius: 16px; background: var(--branco);
  border: 3px solid #d6e6ea; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.12); transition: transform 0.1s; }
.giro-opcao:active { transform: scale(0.96); }
.giro-opcao.certa { border-color: #2e9e5b; box-shadow: 0 0 0 4px #b7e4c7; }
.giro-opcao.errada { border-color: #e53935; box-shadow: 0 0 0 4px #f8c4c2; }
.giro-opcao:disabled { cursor: default; }
@media (min-width: 720px) { .giro-opcoes { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Jogo da Hora ---------- */
.hora-pergunta { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--branco); box-shadow: var(--sombra); }
.hora-pergunta p { flex: 1; margin: 0; font-weight: 800; font-size: clamp(16px, 2.6dvh, 20px); color: var(--texto); }
.hora-alvo.analogico { flex: 0 0 auto; width: clamp(110px, min(34vw, 20dvh), 180px); }
.hora-alvo.digital { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 14px;
  border-radius: 14px; border: 3px solid #1e88e5; background: #f4f9ff; }
.relogio { display: block; width: 100%; height: auto; }
.relogio-digital { font-family: 'Fredoka', monospace; font-weight: 700; font-size: clamp(30px, 6dvh, 46px); letter-spacing: 2px; color: #13294b; line-height: 1.1; }
.hora-periodo { font-size: 13px; font-weight: 700; color: var(--cinza-texto); white-space: nowrap; }
.hora-msg { min-height: 1.3em; margin: 8px 0 6px; text-align: center; font-weight: 700; font-size: clamp(14px, 2.2dvh, 17px); color: var(--primaria-escura); }
.hora-msg.ok { color: #1d6b3d; }
.hora-msg.erro { color: #b42318; }
.hora-opcoes { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(8px, 2.5vw, 16px); align-content: center; justify-items: center; }
.hora-opcao { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; padding: 8px;
  border-radius: 16px; background: var(--branco); border: 3px solid #d6e6ea; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.12); }
.de-relogios .hora-opcao { width: min(100%, 22dvh, 180px); aspect-ratio: 1; }
.de-digitais .hora-opcao { min-height: 72px; }
.de-digitais .relogio-digital { font-size: clamp(26px, 4.6dvh, 38px); }
.hora-opcao.certa { border-color: #2e9e5b; box-shadow: 0 0 0 4px #b7e4c7; }
.hora-opcao.errada { border-color: #e53935; box-shadow: 0 0 0 4px #f8c4c2; }
.hora-ajuda-exemplos { display: flex; justify-content: center; gap: 16px; margin: 6px 0; }
#hora-ajuda { padding-top: 76px; }
.hora-ajuda-exemplos div { display: flex; flex-direction: column; align-items: center; width: min(90px, 13dvh); font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 20px; }
#hora-tempo { white-space: nowrap; }

/* ---------- Somando Imagens ---------- */
.somando-conta { display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1.6vw, 10px); padding: 10px 8px; border-radius: 16px; background: var(--branco); box-shadow: var(--sombra); }
.grade-som { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; background: #13294b; border-radius: 4px; width: clamp(56px, min(24vw, 13dvh), 110px); aspect-ratio: 1; }
.figuras-3 .grade-som { width: clamp(48px, min(16vw, 10dvh), 96px); }
.casa-som { background: var(--cor, #fff); }
.grade-som.pergunta { position: relative; background: #1e88e5; box-shadow: 0 0 0 3px #bbdefb; }
.grade-som.pergunta::after { content: '?'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Fredoka', sans-serif;
  font-weight: 700; font-size: 2em; color: rgba(30, 136, 229, 0.55); pointer-events: none; }
.grade-som.pergunta.revelada::after { content: ''; }
.op-som { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: clamp(22px, 4dvh, 32px); color: #13294b; }
.somando-msg { min-height: 1.3em; margin: 8px 0 6px; text-align: center; font-weight: 700; font-size: clamp(14px, 2.2dvh, 17px); color: var(--primaria-escura); }
.somando-msg.ok { color: #1d6b3d; }
.somando-msg.erro { color: #b42318; }
.somando-opcoes { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(8px, 2.5vw, 16px); align-content: center; justify-items: center; }
.somando-opcao { width: min(100%, 21dvh, 170px); aspect-ratio: 1; padding: 10px; border-radius: 16px; background: var(--branco);
  border: 3px solid #d6e6ea; box-shadow: 0 4px 0 rgba(19, 41, 75, 0.12); transition: transform 0.1s; }
.somando-opcao:active { transform: scale(0.96); }
.somando-opcao .grade-som { width: 100%; }
.somando-opcao.certa { border-color: #2e9e5b; box-shadow: 0 0 0 4px #b7e4c7; }
.somando-opcao.errada { border-color: #e53935; box-shadow: 0 0 0 4px #f8c4c2; }
.somando-opcao:disabled { cursor: default; }
#somando-tempo { white-space: nowrap; }
#somando-ajuda { padding-top: 76px; }
.somando-exemplo { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.somando-exemplo .grade-som { width: 64px; }

/* Palavra Escondida: linhas de letras (cada linha esconde uma palavra) */
#escondida-grade { display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(5px, 1.2dvh, 10px); padding: 10px 6px; flex: 0 0 auto; min-height: 0; margin: auto 0; }
.linha-escondida { display: grid; grid-template-columns: 1.5fr repeat(10, 1fr); gap: clamp(2px, 0.7vw, 5px); align-items: center; }
.linha-escondida.vazia { aspect-ratio: 11.5 / 1; border-radius: 10px; border: 2px dashed #e3edf0; }
.linha-escondida.entrou { animation: linha-entrou 0.35s ease-out; }
@keyframes linha-entrou { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
.linha-escondida.saindo { animation: linha-sai 0.4s ease-in forwards; }
@keyframes linha-sai { 40% { transform: scale(1.03); } 100% { transform: translateX(40px); opacity: 0; } }
.linha-escondida.vai-cair .letra-escondida { background: #fde0de; }
.linha-escondida .letra-escondida { font-size: clamp(15px, min(4.6vw, 3.4dvh), 28px); border-radius: 6px; }
.dica-linha { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 26px; border-radius: 8px; background: #f3edfc; }
.dica-figura { font-size: clamp(18px, min(5.4vw, 3.8dvh), 30px); line-height: 1; }
.dica-letra { display: flex; flex-direction: column; align-items: center; font-family: 'Fredoka', sans-serif; font-weight: 700;
  font-size: clamp(14px, min(4.4vw, 3dvh), 24px); line-height: 1; color: #5b3aa0; }
.dica-letra small { font-size: 9px; font-weight: 600; }
#tela-escondida #btn-escondida-limpar { margin: 4px auto auto; }
