/* Ponto de Pronto — identidade visual
   Coral (Pontinho) + verde-água + amarelo-sol sobre fundo creme */
:root {
  --coral: #FF6B4A;
  --coral-escuro: #E5532F;
  --agua: #1FB5A8;
  --agua-escuro: #138F85;
  --sol: #FFC93C;
  --tinta: #26315C;
  --creme: #FFF7EC;
  --branco: #ffffff;
  --certo: #2EB872;
  --errado: #F0576B;
  --sombra: 0 6px 0 rgba(38, 49, 92, .12);
  --raio: 22px;
  --fonte: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font-family: var(--fonte);
  color: var(--tinta);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 201, 60, .35) 0 60px, transparent 61px),
    radial-gradient(circle at 92% 22%, rgba(31, 181, 168, .25) 0 44px, transparent 45px),
    radial-gradient(circle at 80% 92%, rgba(255, 107, 74, .18) 0 70px, transparent 71px),
    var(--creme);
  background-attachment: fixed;
  font-size: 18px;
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}

button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; }

.escondido { display: none !important; }

/* ---------- Telas ---------- */
.tela {
  display: none;
  max-width: 640px;
  margin: 0 auto;
  min-height: 100%;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  flex-direction: column;
  gap: 16px;
}
.tela.ativa { display: flex; animation: entrar .35s ease; }

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

/* ---------- Marca ---------- */
.topo-inicio { text-align: center; padding-top: 12px; }
.marca {
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  margin: 8px 0 4px;
  color: var(--coral);
  letter-spacing: -.5px;
}
.marca span { color: var(--agua); font-size: .6em; vertical-align: middle; }
.slogan { margin: 0; font-weight: 700; opacity: .75; }

.mascote { width: 64px; height: 64px; flex-shrink: 0; object-fit: contain; }
.mascote-grande { width: 140px; height: 140px; }
.mascote-pequeno { width: 52px; height: 52px; }
.pulando { animation: pular 1.8s ease-in-out infinite; }
@keyframes pular {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Cartões e formulários ---------- */
.cartao {
  background: var(--branco);
  border-radius: var(--raio);
  padding: 20px;
  box-shadow: var(--sombra);
}
.cartao h2 { margin: 0 0 12px; text-align: center; }

.rotulo { display: block; font-weight: 800; font-size: 1.2rem; margin: 4px 0 8px; }

input {
  width: 100%;
  font-size: 1.3rem;
  padding: 12px 16px;
  border: 3px solid #E7E2D8;
  border-radius: 16px;
  outline: none;
  background: var(--creme);
}
input:focus { border-color: var(--agua); }

.anos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 20px; }
.anos button {
  font-size: 1.4rem;
  font-weight: 800;
  padding: 10px 0;
  border: 3px solid #E7E2D8;
  border-radius: 16px;
  background: var(--branco);
}
.anos button.escolhido { background: var(--sol); border-color: var(--sol); transform: translateY(-2px); }

.responsaveis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.responsaveis button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 6px;
  border: 3px solid #E7E2D8; border-radius: 16px;
  background: var(--branco);
  font-size: .85rem; font-weight: 800;
}
.responsaveis button span { font-size: 1.7rem; line-height: 1; }
.responsaveis button.escolhido { background: var(--sol); border-color: var(--sol); transform: translateY(-2px); }
#resp-nome { margin-bottom: 16px; }
.resp-linha { display: block; font-size: .9rem; font-weight: 700; opacity: .8; }

.lista-jogadores { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.jogador {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 12px 16px;
  background: var(--creme);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: left;
}
.jogador small { margin-left: auto; font-weight: 700; opacity: .7; }

/* ---------- Foto da criança (avatar) ---------- */
.avatar {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
  color: var(--branco); font-weight: 800; font-size: 1.3rem;
  border: 3px solid var(--branco);
  box-shadow: var(--sombra);
  background: var(--agua) center / cover no-repeat;
}
label.avatar { cursor: pointer; }
.avatar-grande { width: 112px; height: 112px; font-size: 2.6rem; border-width: 5px; }
.avatar-vazio {
  background-color: var(--creme);
  border: 4px dashed var(--agua);
  box-shadow: none;
}
.foto-escolha { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 8px; }
.foto-dica { margin: 4px 0 0; font-weight: 700; text-align: center; }
.foto-dica small { opacity: .6; }
.link-pequeno { font-size: .9rem; padding: 0; display: block; }
.dupla { display: flex; justify-content: center; align-items: flex-end; gap: 4px; }

/* ---------- Botões ---------- */
.botao {
  border: none;
  border-radius: 18px;
  padding: 14px 22px;
  font-size: 1.2rem;
  font-weight: 800;
  background: var(--coral);
  color: var(--branco);
  box-shadow: 0 5px 0 var(--coral-escuro);
  transition: transform .1s, box-shadow .1s;
}
.botao:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--coral-escuro); }
.botao.grande { width: 100%; font-size: 1.4rem; padding: 16px; }
.botao.secundario { background: var(--branco); color: var(--tinta); box-shadow: 0 5px 0 #E7E2D8; }
.botao:disabled { opacity: .4; pointer-events: none; }

.link {
  background: none; border: none;
  font-weight: 800; font-size: 1.1rem;
  color: var(--agua-escuro);
  padding: 8px; align-self: center;
}

/* ---------- Barra superior ---------- */
.barra { display: flex; align-items: center; gap: 12px; }
.barra-titulo { margin: 0; flex: 1; text-align: center; }
.voltar {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 50%; border: none;
  background: var(--branco); box-shadow: var(--sombra);
  font-size: 1.3rem; font-weight: 800;
}
.ola { flex: 1; font-size: 1.15rem; }
.selo {
  display: inline-block;
  background: var(--agua); color: var(--branco);
  border-radius: 99px; padding: 2px 12px;
  font-size: .9rem; font-weight: 800;
}
.estrelas-total {
  background: var(--branco); border-radius: 99px;
  padding: 6px 14px; font-weight: 800; box-shadow: var(--sombra);
  white-space: nowrap;
}

/* ---------- Balão do mascote ---------- */
.balao { display: flex; align-items: center; gap: 12px; }
.balao p {
  position: relative; margin: 0;
  background: var(--branco); border-radius: 18px;
  padding: 12px 16px; font-weight: 800; font-size: 1.25rem;
  box-shadow: var(--sombra);
}

/* ---------- Matérias ---------- */
.materias { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.materia {
  border: none; border-radius: var(--raio);
  padding: 18px 12px; min-height: 140px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--branco); font-size: 1.2rem; font-weight: 800;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .15);
  transition: transform .15s;
}
.materia:active { transform: scale(.96); }
.materia .icone { font-size: 2.6rem; line-height: 1; }
.materia .icone-img { width: 84px; height: 72px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .18)); }
.materia.misturado .icone-img { width: 60px; height: 60px; }
.materia small { font-weight: 700; opacity: .9; font-size: .85rem; }
.materia.misturado { grid-column: 1 / -1; min-height: 90px; flex-direction: row; gap: 12px; }

/* ---------- Quiz ---------- */
.progresso { flex: 1; display: flex; gap: 6px; justify-content: center; }
.progresso i {
  width: 14px; height: 14px; border-radius: 50%;
  background: #E7E2D8; display: block;
}
.progresso i.certo { background: var(--certo); }
.progresso i.errado { background: var(--errado); }
.progresso i.atual { outline: 3px solid var(--sol); outline-offset: 2px; }

.pergunta-caixa {
  background: var(--branco); border-radius: var(--raio);
  padding: 16px 18px 20px; box-shadow: var(--sombra); text-align: center;
}
.pergunta-topo { display: flex; justify-content: space-between; align-items: center; }
.ouvir {
  border: none; border-radius: 99px; padding: 6px 14px;
  background: var(--sol); font-weight: 800; font-size: 1rem;
}
.topo-botoes { display: flex; gap: 6px; }
.ajuda {
  border: none; border-radius: 99px; padding: 6px 12px;
  background: #8C6CE0; color: var(--branco); font-weight: 800; font-size: 1rem;
  animation: pular 1.6s ease-in-out infinite;
}
.opcao.eliminada { opacity: .25; text-decoration: line-through; transform: scale(.97); }
.ouvir.falando { animation: pular .6s ease-in-out infinite; }
.pergunta-emoji { font-size: 3.2rem; line-height: 1.2; margin-top: 8px; min-height: 0; }
.pergunta-emoji:empty { display: none; }
.pergunta-texto { font-size: clamp(1.35rem, 5vw, 1.7rem); margin: 8px 0 0; line-height: 1.25; }

.opcoes { display: grid; gap: 12px; }
.opcao {
  display: flex; align-items: center; gap: 14px;
  width: 100%; border: 3px solid transparent;
  border-radius: 18px; padding: 12px 16px;
  background: var(--branco); box-shadow: var(--sombra);
  font-size: 1.3rem; font-weight: 700; text-align: left;
  transition: transform .1s;
}
.opcao:active { transform: scale(.98); }
.opcao .letra {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  color: var(--branco); font-weight: 800;
}
.opcao:nth-child(1) .letra { background: var(--coral); }
.opcao:nth-child(2) .letra { background: var(--agua); }
.opcao:nth-child(3) .letra { background: #8C6CE0; }
.opcao:nth-child(4) .letra { background: #F29A2E; }
.opcao[disabled] { cursor: default; }
.opcao.certa { border-color: var(--certo); background: #E6F8EE; }
.opcao.certa .letra { background: var(--certo); }
.opcao.errada { border-color: var(--errado); background: #FDECEE; animation: tremer .35s; }
.opcao.errada .letra { background: var(--errado); }
.opcao.apagada { opacity: .5; }
@keyframes tremer {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.retorno {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--raio); padding: 14px 16px;
  background: #E6F8EE; animation: entrar .3s ease;
}
.retorno.errou { background: #FFF1D6; }
.retorno p { margin: 0; }
.retorno-titulo { font-weight: 800; font-size: 1.3rem; }
.retorno .bncc { margin-top: 4px; font-size: .75rem; font-weight: 700; opacity: .55; }
.retorno .bncc:empty { display: none; }

.navegacao { display: flex; gap: 12px; margin-top: auto; }
.navegacao .botao { flex: 1; }

/* ---------- Resultado ---------- */
.resultado-topo { text-align: center; }
.resultado-topo h2 { font-size: 2rem; margin: 8px 0 0; color: var(--coral); }
.resultado-estrelas { font-size: 2.2rem; margin: 4px 0; letter-spacing: 4px; }
.revisao-item { border-top: 2px dashed #E7E2D8; padding: 12px 0; }
.revisao-item:first-of-type { border-top: none; }
.revisao-item p { margin: 4px 0; }
.revisao-item .certa-txt { color: var(--certo); font-weight: 800; }
.revisao-item .errada-txt { color: var(--errado); font-weight: 700; text-decoration: line-through; }
.acoes { display: flex; flex-direction: column; gap: 12px; }

/* ---------- Ranking ---------- */
.nota { margin: 0; text-align: center; opacity: .75; font-weight: 700; }
.ranking { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ranking li {
  display: flex; align-items: center; gap: 12px;
  background: var(--branco); border-radius: 18px;
  padding: 12px 16px; box-shadow: var(--sombra);
  font-size: 1.2rem; font-weight: 700;
}
.ranking .posicao { font-size: 1.6rem; width: 36px; text-align: center; }
.ranking .pontos { margin-left: auto; font-weight: 800; }

/* ---------- Missão (tabuleiro) ---------- */
.cartao-missao {
  display: flex; align-items: center; gap: 14px;
  width: 100%; border: none; border-radius: var(--raio);
  padding: 14px 18px; text-align: left;
  background: linear-gradient(120deg, var(--sol), #FFB13C);
  color: var(--tinta);
  box-shadow: 0 6px 0 #E0A21F;
}
.cartao-missao:active { transform: translateY(3px); box-shadow: 0 3px 0 #E0A21F; }
.cartao-missao .icone-mapa { width: 92px; height: auto; margin: -10px -4px -10px -6px; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .18)); transform: rotate(-4deg); }
.titulo-mapa { width: 40px; height: auto; vertical-align: middle; margin-right: 2px; }
.missao-textos { flex: 1; display: flex; flex-direction: column; }
.missao-textos strong { font-size: 1.4rem; line-height: 1.1; }
.missao-textos small { font-weight: 700; font-size: 1rem; }
.missao-selo {
  background: var(--coral); color: var(--branco);
  border-radius: 99px; padding: 4px 12px; font-weight: 800;
  animation: pular 1.4s ease-in-out infinite;
}
.botao-missao { background: var(--agua); box-shadow: 0 5px 0 var(--agua-escuro); }
.botao-missao:active { box-shadow: 0 1px 0 var(--agua-escuro); }

.tabuleiro {
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 201, 60, .18) 0 40px, transparent 41px),
    radial-gradient(circle at 80% 60%, rgba(31, 181, 168, .14) 0 50px, transparent 51px),
    #BFE8D9;
  border-radius: var(--raio);
  box-shadow: var(--sombra), inset 0 0 0 6px #A5DCC8;
  overflow: hidden;
}
.estrada { position: absolute; left: 0; top: 0; }
.mundo-imagem { position: absolute; left: 0; width: 100%; object-fit: fill; pointer-events: none; }
.mundo-nome {
  position: absolute; left: 50%; transform: translateX(-50%);
  background: var(--tinta); color: var(--branco);
  border-radius: 99px; padding: 3px 14px;
  font-weight: 800; font-size: .85rem; white-space: nowrap; z-index: 1;
}
.marco-inicio { position: absolute; }
.placa {
  position: absolute; z-index: 1;
  display: grid; place-items: center;
  font-weight: 800; line-height: 1; text-align: center; white-space: nowrap;
  pointer-events: none;
}
.placa-arco { background: #8A5530; color: #FFF6E2; border-radius: 10px; letter-spacing: 1px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); }
.placa-faixa { background: #EE6A4D; color: var(--branco); border-radius: 8px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.placa-madeira { background: #9C6A3E; color: #FFF3DA; border-radius: 6px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }
.placa-loja { background: #F7E7C6; color: #5C3A1E; border-radius: 3px; }
.casa.redonda { border-radius: 50%; font-size: .95rem; border: 2.5px solid var(--branco); box-shadow: 0 3px 6px rgba(0,0,0,.3); }
.casa.redonda.especial-casa { border: 3px solid var(--cor-borda, var(--sol)); padding: 0; grid-template-rows: 1fr; }
.casa.redonda.especial-casa .num { display: none; }
.casa.redonda .especial { font-size: 1.05rem; align-self: center; }
.casa {
  position: absolute; z-index: 3;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--branco);
  font-weight: 800; font-size: 1.25rem;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .18);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}
.casa.clara { color: var(--tinta); text-shadow: none; }
.casa.feita { filter: saturate(.55) brightness(1.08); }
.casa.feita::after {
  content: "✓"; position: absolute; top: -6px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--certo); color: var(--branco);
  font-size: .7rem; display: grid; place-items: center; text-shadow: none;
}
.casa.especial-casa {
  background: var(--branco);
  border: 3px solid var(--cor-borda, var(--sol));
  color: var(--tinta); text-shadow: none;
  grid-template-rows: 1fr auto; padding: 2px 0;
}
.casa .especial { font-size: 1.5rem; line-height: 1; align-self: end; }
.casa.especial-casa .num { font-size: .7rem; opacity: .7; }
.faixa {
  position: absolute;
  display: grid; place-items: center;
  border-radius: 999px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: .5px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
  border: 4px solid var(--branco);
}
.faixa.partida { background: var(--coral); color: var(--branco); }
.faixa.chegada { background: var(--branco); color: var(--tinta); border-color: var(--sol); }
.enfeite { position: absolute; font-size: 1.7rem; opacity: .85; pointer-events: none; }
.tabuleiro .avatar.peao {
  position: absolute; z-index: 4;
  border-width: 3px; font-size: 1rem;
  box-shadow: 0 6px 10px rgba(38, 49, 92, .35);
  transition: left .28s ease, top .28s ease;
  animation: pular 1.2s ease-in-out infinite;
}

/* ---------- Zoológico ---------- */
.zoologico {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center; padding: 16px;
  background: rgba(38, 49, 92, .5);
}
.zoo-caixa {
  width: min(460px, 100%); max-height: 100%; overflow-y: auto;
  background: linear-gradient(#CFF3EA, #F4F9DC);
  border-radius: 28px; padding: 20px; text-align: center;
  animation: aparecer .35s cubic-bezier(.2, 1.4, .4, 1);
}
.zoo-caixa h2 { margin: 0; color: var(--agua-escuro); }
.zoo-portao { width: 180px; max-width: 60%; height: auto; display: block; margin: 0 auto 4px; filter: drop-shadow(0 6px 8px rgba(38, 49, 92, .25)); }
.zoo-dica { margin: 4px 0 14px; font-weight: 700; }
.zoo-bichos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.zoo-bicho {
  position: relative; border: none; border-radius: 18px;
  background: var(--branco); padding: 10px 2px 6px;
  box-shadow: var(--sombra);
  display: flex; flex-direction: column; align-items: center;
}
.zoo-bicho { touch-action: none; user-select: none; -webkit-user-select: none; }
.zoo-emoji { line-height: 1.1; transition: transform .15s; pointer-events: none; }
.zoo-nome { pointer-events: none; }
.zoo-bicho.acariciando { background: #FFF6DA; }
.zoo-bicho.acariciando .zoo-emoji { transform: scale(1.12) rotate(-4deg); }
.zoo-nome { font-size: .8rem; font-weight: 800; }
.zoo-som {
  position: absolute; bottom: 92%; left: 50%;
  transform: translateX(-50%) scale(0);
  background: var(--sol); color: var(--tinta);
  border-radius: 12px; padding: 2px 8px;
  font-size: .8rem; font-weight: 800; white-space: nowrap;
  pointer-events: none; z-index: 2;
}
.zoo-bicho.feliz .zoo-emoji { animation: carinho .6s ease; }
.zoo-bicho.feliz .zoo-som { animation: falarBalao 1.6s ease forwards; }
@keyframes carinho {
  25% { transform: rotate(-12deg) scale(1.15); }
  50% { transform: rotate(10deg) scale(1.2); }
  75% { transform: rotate(-6deg) scale(1.1); }
}
@keyframes falarBalao {
  0% { transform: translateX(-50%) scale(0); }
  15%, 80% { transform: translateX(-50%) scale(1); }
  100% { transform: translateX(-50%) scale(0); }
}
.confete i.coracao {
  width: auto; height: auto; background: none; border-radius: 0;
  font-size: 1.4rem; line-height: 1;
  animation: subir 1.4s ease-out forwards;
}
@keyframes subir {
  from { transform: translateY(0) scale(.6); opacity: 1; }
  to { transform: translateY(-110px) scale(1.2); opacity: 0; }
}

/* ---------- Animações do cenário ---------- */
.anim { position: absolute; z-index: 2; pointer-events: none; font-size: 18px; line-height: 1; will-change: transform; }
.anim span { display: inline-block; }
.anim-borboleta { font-size: 22px; animation: voarBorboleta ease-in-out infinite alternate; }
.anim-borboleta span { animation: baterAsas .22s ease-in-out infinite; }
@keyframes voarBorboleta {
  0% { transform: translate(0, 0); }
  25% { transform: translate(var(--dx), calc(var(--dy) * -1)); }
  50% { transform: translate(calc(var(--dx) * 1.6), calc(var(--dy) * .4)); }
  75% { transform: translate(calc(var(--dx) * .5), calc(var(--dy) * 1.1)); }
  100% { transform: translate(calc(var(--dx) * -.4), calc(var(--dy) * -.3)); }
}
@keyframes baterAsas { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.35); } }
.anim-nuvem { left: 0; font-size: 34px; opacity: .92; animation: nuvem linear infinite; }
@keyframes nuvem { from { transform: translateX(-70px); } to { transform: translateX(var(--largura)); } }
.anim-passaro { left: 0; font-size: 16px; animation: passaro linear infinite; }
.anim-passaro span { animation: bater .5s ease-in-out infinite; }
@keyframes passaro { from { transform: translateX(var(--largura)); } to { transform: translateX(-40px); } }
@keyframes bater { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.anim-abelha { font-size: 14px; animation: abelha linear infinite; }
@keyframes abelha {
  0% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(14px, -10px) rotate(10deg); }
  50% { transform: translate(0, -18px) rotate(0); }
  75% { transform: translate(-14px, -8px) rotate(-10deg); }
  100% { transform: translate(0, 0) rotate(0); }
}
.anim-brilho { font-size: 13px; animation: brilho ease-in-out infinite; }
@keyframes brilho {
  0%, 100% { transform: scale(0) rotate(0); opacity: 0; }
  50% { transform: scale(1.2) rotate(90deg); opacity: 1; }
}
.anim-peixe { font-size: 16px; animation: peixe ease-in-out infinite; opacity: 0; }
@keyframes peixe {
  0%, 70% { transform: translate(0, 6px) rotate(-30deg); opacity: 0; }
  74% { opacity: 1; }
  82% { transform: translate(10px, -22px) rotate(10deg); opacity: 1; }
  92% { transform: translate(20px, 4px) rotate(60deg); opacity: 1; }
  96%, 100% { transform: translate(22px, 8px) rotate(70deg); opacity: 0; }
}
.anim-folha { font-size: 14px; animation: folha ease-in infinite; }
@keyframes folha {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  50% { transform: translate(18px, 45px) rotate(120deg); }
  100% { transform: translate(-6px, 95px) rotate(260deg); opacity: 0; }
}

/* ---------- Área do responsável ---------- */
.links-rodape { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.centro { text-align: center; }
.convite-emoji { font-size: 3.6rem; line-height: 1.1; }
.cartao p { margin: 8px 0 16px; }
.conta { display: block; font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
#resp-conta { text-align: center; font-size: 1.6rem; margin-bottom: 14px; }
.erro { color: var(--errado); font-weight: 800; margin-top: -6px !important; }
.lista-baus { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.bau-config h3 { margin: 0 0 4px; font-size: 1.2rem; }
.bau-config .aberto { font-size: .85rem; font-weight: 700; color: var(--agua-escuro); margin: 0 0 8px; }
.tipos-bau { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 10px; }
.tipos-bau button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 3px solid #E7E2D8; border-radius: 16px;
  background: var(--branco); padding: 8px 4px;
  font-size: .85rem; font-weight: 800; line-height: 1.1;
}
.tipos-bau button span { font-size: 1.7rem; }
.tipos-bau button.escolhido { background: var(--sol); border-color: var(--sol); }
.bau-config textarea {
  width: 100%; min-height: 70px; resize: vertical;
  font-family: inherit; font-size: 1.05rem;
  padding: 10px 14px; border: 3px solid #E7E2D8; border-radius: 16px;
  background: var(--creme); outline: none;
}
.bau-config textarea:focus { border-color: var(--agua); }
.bau-config .explica { font-size: .9rem; opacity: .75; margin: 0; }
.janela-emoji.chacoalhar { animation: chacoalhar .9s ease; }
@keyframes chacoalhar {
  10%, 50%, 90% { transform: rotate(-12deg) scale(1.1); }
  30%, 70% { transform: rotate(12deg) scale(1.1); }
}

/* ---------- Envio de matérias ---------- */
#resp-materias { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
#resp-materias.escondido { display: none; }
.explica-envio { margin: 0 !important; font-weight: 600; }
.botao-arquivo { text-align: center; cursor: pointer; }
.envio-lista, .materias-proprias { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.envio-lista li { background: var(--creme); border-radius: 12px; padding: 6px 12px; font-weight: 700; font-size: .95rem; }
.envio-status { margin: 0 !important; font-weight: 800; text-align: center; }
.envio-status.erro { color: var(--errado); }
.envio-status.ok { color: var(--certo); }
.titulo-materias-proprias { margin: 8px 0 0; font-size: 1.1rem; }
.materias-proprias li { display: flex; align-items: center; gap: 8px; background: var(--creme); border-radius: 14px; padding: 8px 12px; font-weight: 700; }
.materias-proprias li span { flex: 1; }
.materias-proprias button { border: none; background: none; font-size: 1.2rem; }
.materia.propria { min-height: 100px; }
.materia.propria .icone { font-size: 2.2rem; }
.carregando { display: inline-block; animation: pular .8s ease-in-out infinite; }

/* ---------- Janela (casa especial) ---------- */
.janela {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center; padding: 20px;
  background: rgba(38, 49, 92, .45);
}
.janela-caixa {
  width: min(360px, 100%);
  background: var(--branco); border-radius: 28px;
  padding: 24px; text-align: center;
  animation: aparecer .35s cubic-bezier(.2, 1.4, .4, 1);
}
.janela-caixa h2 { margin: 4px 0; color: var(--coral); }
.janela-caixa p { margin: 0 0 18px; font-weight: 700; }
.janela-emoji { font-size: 4rem; line-height: 1.1; }
.janela-emoji img { width: 200px; max-width: 70%; height: auto; display: block; margin: -70px auto 0; filter: drop-shadow(0 8px 10px rgba(38, 49, 92, .25)); }
.tabuleiro .ilustracao {
  position: absolute; z-index: 2; height: auto;
  pointer-events: none;
  filter: drop-shadow(0 6px 6px rgba(38, 49, 92, .3));
  animation: balancar 3s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.casa.com-imagem .especial { display: none; }
.casa.redonda.especial-casa.com-imagem .num { display: block; font-size: .95rem; opacity: 1; }
.placa-imagem { position: absolute; z-index: 1; height: auto; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(38, 49, 92, .3)); }
@keyframes balancar {
  0%, 100% { transform: rotate(-1.5deg); }
  50% { transform: rotate(1.5deg); }
}
@keyframes aparecer { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Confete ---------- */
.confete { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confete i {
  position: absolute; top: -20px; width: 12px; height: 12px; border-radius: 50%;
  animation: cair 1.6s ease-in forwards;
}
@keyframes cair {
  to { transform: translateY(110vh) rotate(540deg); opacity: .6; }
}

.confete i.doce {
  top: 50%; left: 50%; width: auto; height: auto;
  border-radius: 0; background: none; line-height: 1;
  animation: explodir 1.9s cubic-bezier(.15, .8, .3, 1) forwards;
}
@keyframes explodir {
  0% { transform: translate(-50%, -50%) scale(.2); opacity: 0; }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + 80px)) rotate(var(--giro)) scale(1); opacity: 0; }
}

@media (min-width: 560px) {
  .materias { grid-template-columns: repeat(3, 1fr); }
  .materia.misturado { grid-column: 1 / -1; }
}

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

/* ---------- Casa dos Amigos: esconde-esconde ---------- */
.tabuleiro .ilustracao.brincar-de-novo { pointer-events: auto; cursor: pointer; }
.tabuleiro .ilustracao.negar { animation: negar .45s ease; }
@keyframes negar { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.esconde {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center; padding: 12px;
  background: rgba(38, 49, 92, .5);
}
.esconde-caixa {
  position: relative;
  width: min(520px, 100%); max-height: 100%; overflow-y: auto;
  background: linear-gradient(#FFE9D6, #FFF7EC);
  border-radius: 28px; padding: 16px; text-align: center;
  animation: aparecer .35s cubic-bezier(.2, 1.4, .4, 1);
}
.esconde-caixa h2 { margin: 0; color: var(--coral); }
.esconde-casa { width: 120px; max-width: 40%; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 6px 8px rgba(38, 49, 92, .25)); }
.esconde-dica { margin: 2px 0 10px; font-weight: 800; }
.esconde-cena {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  container-type: inline-size;
  border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(circle at 92% 10%, #FFE15A 0 6%, rgba(255, 225, 90, .35) 6.5% 10%, transparent 10.5%),
    linear-gradient(#BFEAFF 0 30%, #A9E07F 30% 31%, #8FD468 31% 100%);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .7);
  margin-bottom: 12px;
}
.esconde-cena::before {
  content: "☁️"; position: absolute; top: 4%; left: 0;
  font-size: 9cqw; opacity: .95;
  animation: nuvemEsconde 22s linear infinite;
}
.esconde-cena::after {
  content: ""; position: absolute; left: 0; right: 0; top: 48%; height: 3%;
  background: repeating-linear-gradient(90deg, #F2E3C6 0 2.4%, transparent 2.4% 4%);
  opacity: .8;
}
@keyframes nuvemEsconde { from { transform: translateX(-12cqw); } to { transform: translateX(100cqw); } }
.esc-lugar {
  position: absolute; z-index: 1;
  transform: translate(-50%, -50%);
  border: none; background: none; padding: 0;
  width: calc(var(--t) * 20cqw); height: calc(var(--t) * 20cqw);
  display: grid; place-items: center;
  cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.esc-objeto {
  position: relative; z-index: 2;
  font-size: calc(var(--t) * 15cqw); line-height: 1;
  filter: drop-shadow(0 4px 3px rgba(38, 49, 92, .25));
  transition: transform .15s;
  pointer-events: none;
}
.esc-lugar:active .esc-objeto { transform: scale(.92); }
.esc-amigo {
  position: absolute; z-index: 1; left: 50%; bottom: 30%;
  font-size: 11cqw; line-height: 1;
  transform: translate(-50%, 40%) scale(.2); opacity: 0;
  pointer-events: none;
}
.esc-lugar.achado { z-index: 3; }
.esc-lugar.achado .esc-amigo { z-index: 3; animation: sairDoEsconderijo .7s cubic-bezier(.2, 1.5, .4, 1) forwards; }
@keyframes sairDoEsconderijo {
  from { transform: translate(-50%, 40%) scale(.2); opacity: 0; }
  to { transform: translate(-50%, -55%) scale(1); opacity: 1; }
}
.esc-balao {
  position: absolute; z-index: 4; left: 50%; top: -30%;
  background: var(--sol); color: var(--tinta);
  border-radius: 12px; padding: 1px 8px;
  font-size: max(.75rem, 3.4cqw); font-weight: 800; white-space: nowrap;
  transform: translateX(-50%) scale(0); pointer-events: none;
}
.esc-lugar.achado .esc-balao { animation: balaoAmigo .5s .35s ease forwards; }
@keyframes balaoAmigo { to { transform: translateX(-50%) scale(1); } }
.esc-lugar.vazio .esc-objeto { animation: negar .45s ease; }
.esc-lugar.risada .esc-objeto { animation: risada .9s ease; }
@keyframes risada {
  15%, 45%, 75% { transform: rotate(-6deg) scale(1.04); }
  30%, 60%, 90% { transform: rotate(6deg) scale(1.04); }
}
.esconde-botoes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.esconde-fim {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(255, 247, 236, .92); border-radius: 28px;
  animation: aparecer .35s cubic-bezier(.2, 1.4, .4, 1);
}
.esconde-fim.escondido { display: none; }
.esconde-fim-titulo { font-size: 1.6rem; font-weight: 800; color: var(--coral); margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .esconde-cena::before, .esc-lugar.risada .esc-objeto { animation: none; }
}

/* ---------- Botão de andar: fica no canto de baixo, à direita ---------- */
.botao-andar {
  position: fixed; z-index: 15;
  right: max(16px, calc((100vw - 640px) / 2 + 16px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 6px;
  border: none; border-radius: 999px;
  padding: 10px 12px 10px 14px;
  background: var(--coral); color: var(--branco);
  font: inherit; font-size: 1.05rem; font-weight: 800;
  box-shadow: 0 5px 0 #D9472A, 0 10px 18px rgba(38, 49, 92, .3);
  cursor: pointer; touch-action: manipulation;
  animation: chamarAndar 1.6s ease-in-out infinite;
}
.botao-andar:active { transform: translateY(3px); box-shadow: 0 2px 0 #D9472A, 0 6px 10px rgba(38, 49, 92, .3); }
.botao-andar:disabled { opacity: .6; animation: none; }
.andar-pes { font-size: 1.2rem; }
.andar-num {
  min-width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sol); color: var(--tinta); font-size: .95rem;
}
@keyframes chamarAndar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .botao-andar { animation: none; } }

/* ---------- Casa dos Bichinhos: dar comida ---------- */
.bich-caixa { background: linear-gradient(#DDF3FF, #FFF7EC); }
.bich-caixa h2 { color: var(--agua-escuro); }
.bich-bichos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 10px; margin: 26px 0 12px; }
.bich-alvo {
  position: relative;
  background: var(--branco); border-radius: 20px; padding: 12px 4px 8px;
  box-shadow: var(--sombra);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .15s, box-shadow .15s, background .2s;
  user-select: none; -webkit-user-select: none;
}
.bich-alvo.perto { transform: scale(1.08); box-shadow: 0 0 0 4px var(--sol), var(--sombra); }
.bich-emoji { font-size: 2.6rem; line-height: 1.1; pointer-events: none; }
.bich-nome { font-size: .8rem; font-weight: 800; pointer-events: none; }
.bich-barriga { width: 70%; height: 8px; border-radius: 99px; background: #EEE7DA; overflow: hidden; pointer-events: none; }
.bich-barriga i { display: block; height: 100%; width: 0; background: var(--verde, #2EB872); border-radius: 99px; transition: width .6s ease; }
.bich-alvo.cheio { background: #F1FFF2; }
.bich-alvo.comendo .bich-emoji { animation: comer .65s ease infinite; }
@keyframes comer {
  20%, 60% { transform: scale(1.15, .9); }
  40%, 80% { transform: scale(.95, 1.1); }
}
.bich-alvo.recusa .bich-emoji { animation: negar .45s ease; }
.bich-balao {
  position: absolute; bottom: 92%; left: 50%; z-index: 3;
  transform: translateX(-50%) scale(0);
  background: var(--sol); color: var(--tinta);
  border-radius: 12px; padding: 2px 8px; max-width: 130px;
  font-size: .72rem; font-weight: 800; line-height: 1.2;
  pointer-events: none; width: max-content;
}
.bich-balao.mostrar { animation: falarBalao 2s ease forwards; }
.bich-prato { background: #FFE6C9; border-radius: 22px; padding: 8px 10px 12px; margin-bottom: 12px; }
.bich-prato-titulo { display: block; font-weight: 800; font-size: .85rem; margin-bottom: 6px; }
.bich-comidas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.bich-comida {
  width: 58px; height: 58px; border: none; border-radius: 50%;
  background: var(--branco); box-shadow: 0 4px 0 #E7D3B8;
  font-size: 2rem; line-height: 1; display: grid; place-items: center;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform .15s, opacity .2s;
}
.bich-comida img { width: 44px; height: 44px; object-fit: contain; pointer-events: none; }
.bich-comida.arrastando { opacity: .35; }
.bich-comida.escolhida { box-shadow: 0 0 0 4px var(--coral), 0 4px 0 #E7D3B8; transform: scale(1.1); }
.bich-comida.usada { opacity: .25; transform: scale(.8); cursor: default; pointer-events: none; }
.bich-fantasma {
  position: fixed; z-index: 40; pointer-events: none;
  width: 64px; height: 64px; object-fit: contain;
  transform: translate(-50%, -60%) scale(1.15);
  filter: drop-shadow(0 6px 6px rgba(38, 49, 92, .35));
}

.bich-no-prato {
  position: absolute; right: 4px; top: 10px; z-index: 2;
  width: 42px; height: 42px; object-fit: contain; pointer-events: none;
  animation: chegarPrato .35s cubic-bezier(.2, 1.5, .4, 1);
}
.bich-no-prato.mordeu { animation: mordeu .3s ease; }
.bich-no-prato.sumir { animation: sumirPrato .5s ease forwards; }
@keyframes chegarPrato { from { transform: scale(1.6); } to { transform: scale(1); } }
@keyframes mordeu { 40% { transform: scale(.82) rotate(-8deg); } }
@keyframes sumirPrato { to { transform: scale(.4); opacity: 0; } }
.zoo-emoji { width: 64px; height: 64px; object-fit: contain; -webkit-user-drag: none; }

/* Enquanto come, o bichinho cresce até quase o tamanho do quadrado; depois volta ao normal */
.bich-corpo {
  position: relative; z-index: 1; display: inline-block;
  transition: transform .35s cubic-bezier(.2, 1.3, .4, 1);
  transform-origin: 50% 40%;
  pointer-events: none;
}
.bich-alvo.comendo { z-index: 2; }
.bich-alvo.comendo .bich-corpo { transform: translateY(16px) scale(2.1); }
.bich-alvo.comendo .bich-nome, .bich-alvo.comendo .bich-barriga { opacity: .25; }
.bich-nome, .bich-barriga { transition: opacity .3s; }
.bich-no-prato { z-index: 3; }

/* ---------- Plano Família (conta do responsável) ---------- */
.conta-cartao h2 { margin-top: 0; }
.conta-explica { margin: 0 0 12px; }
.conta-spam {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 14px;
  background: #FFF4D6; border: 2px solid #F5C451; font-size: .95rem;
}
.conta-form { display: flex; flex-direction: column; gap: 8px; }
.conta-form input[type="email"], .conta-codigo {
  font: inherit; font-size: 1.1rem; padding: 12px 14px;
  border: 3px solid #EEE3D2; border-radius: 16px; background: var(--creme);
}
.conta-codigo { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-weight: 800; }
.conta-aceite { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 4px 0 6px; }
.conta-aceite input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--coral); }
.conta-aceite a { color: var(--coral); font-weight: 800; }
.conta-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.link {
  border: none; background: none; padding: 6px 0; font: inherit; font-weight: 800;
  color: var(--coral); text-decoration: underline; cursor: pointer;
}
.conta-email { margin: 0 0 6px; font-size: .9rem; opacity: .8; word-break: break-all; }
.conta-linha { margin: 0 0 6px; font-weight: 800; }
.conta-linha.vencida { color: #D9472A; }
.conta-subtitulo { margin: 16px 0 6px; font-size: 1rem; }
.conta-aparelhos { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.conta-aparelhos li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--creme); border-radius: 14px; padding: 8px 12px; font-size: .9rem;
}
.conta-este { font-size: .8rem; font-weight: 800; color: var(--agua-escuro, #12877D); }
.conta-sair { font-size: .9rem; }
.conta-carregando { opacity: .7; }
.conta-assinar { margin-top: 10px; }
.conta-planos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plano {
  position: relative; border: 3px solid #EEE3D2; border-radius: 18px; background: var(--branco);
  padding: 14px 8px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; align-items: center;
}
.plano strong { font-size: 1.1rem; }
.plano span { font-size: .9rem; }
.plano em {
  position: absolute; top: -12px; right: 8px; font-style: normal; font-size: .7rem; font-weight: 800;
  background: var(--sol); border-radius: 10px; padding: 2px 8px;
}
.plano.destaque { border-color: var(--coral); }
.plano:disabled { opacity: .6; }
.conta-nota { font-size: .8rem; opacity: .8; margin: 8px 0 0; }

/* ---------- A criança envia a matéria da escola ---------- */
.cartao-enviar {
  display: flex; align-items: center; gap: 14px;
  width: 100%; border: none; border-radius: var(--raio);
  padding: 14px 18px; margin-top: 12px; text-align: left;
  background: linear-gradient(120deg, #7FD8CF, var(--agua));
  color: var(--tinta);
  box-shadow: 0 6px 0 #17958A;
  cursor: pointer;
}
.cartao-enviar:active { transform: translateY(3px); box-shadow: 0 3px 0 #17958A; }
.enviar-icone { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .15)); }
.envio-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0; }
.envio-botoes .botao-arquivo { margin: 0; text-align: center; }
.mascote-mini { width: 56px; height: auto; flex: none; }
#tela-enviar .balao { display: flex; align-items: center; gap: 10px; }
/* Na tela da criança: sem textos de adulto e sem apagar matérias (isso fica com o responsável) */
.envio-crianca .explica-envio, .envio-crianca h2 { display: none; }
.envio-crianca .materias-proprias button { display: none; }
.envio-botoes .botao-arquivo { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; font-size: 1rem; line-height: 1.2; }

/* ---------- Tela inicial: Modo Prova e trilha ---------- */
.etiqueta { margin: 0 0 4px; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--agua-escuro, #12877D); }
.modo-prova h2 { margin: 0 0 12px; font-size: 1.5rem; line-height: 1.15; text-align: left; }
.modo-prova h2 span { color: var(--coral); }
.passos-prova { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: passo; }
.passos-prova li {
  position: relative; counter-increment: passo;
  background: var(--creme); border-radius: 16px; padding: 12px 6px 10px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
}
.passos-prova li::before {
  content: counter(passo); position: absolute; top: -8px; left: -4px;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--coral); color: var(--branco); font-size: .75rem; font-weight: 800;
}
.passo-icone { font-size: 1.8rem; line-height: 1.1; }
.passos-prova strong { font-size: .85rem; line-height: 1.1; }
.passos-prova small { font-size: .7rem; line-height: 1.15; opacity: .75; }
.cartao-trilha {
  position: relative; display: block; width: 100%; height: 170px; margin: 0 0 16px; padding: 0;
  border: none; border-radius: var(--raio); overflow: hidden; cursor: pointer;
  box-shadow: 0 6px 0 rgba(38, 49, 92, .12); background: #8FD468;
}
.cartao-trilha img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 88%; display: block; }
.cartao-trilha .trilha-texto {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 12px; text-align: left;
  background: linear-gradient(transparent, rgba(255, 247, 236, .95) 55%);
  display: flex; flex-direction: column; color: var(--tinta);
}
.trilha-texto strong { font-size: 1.15rem; }
.trilha-texto small { font-weight: 700; opacity: .8; }
.jogador-textos { display: flex; flex-direction: column; min-width: 0; }
.jogador-textos .jogador-prova { margin: 0; font-size: .8rem; font-weight: 700; color: var(--agua-escuro, #12877D); opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#jogadores-salvos.chamar { animation: chamarAtencao .9s ease 2; }
@keyframes chamarAtencao { 30% { box-shadow: 0 0 0 5px var(--sol); } 60% { box-shadow: 0 0 0 0 var(--sol); } }

/* ---------- Tela de matérias: Minhas provas ---------- */
.minhas-provas h2 { margin: 0 0 10px; text-align: left; font-size: 1.3rem; }
.lista-provas { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.provas-vazio { margin: 0 0 4px; font-weight: 700; opacity: .8; }
.prova {
  display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left;
  border: 3px solid #F6D9C4; border-radius: 18px; background: var(--creme);
  padding: 12px 14px; font: inherit; color: var(--tinta); cursor: pointer;
}
.prova.pronta { border-color: #7FD8A4; background: #F1FFF4; }
.prova-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prova-topo strong { font-size: 1.1rem; line-height: 1.15; }
.prova-treinar { flex: none; background: var(--coral); color: var(--branco); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: .85rem; }
.prova-barra { display: block; height: 12px; border-radius: 99px; background: #EEE3D2; overflow: hidden; }
.prova-barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--sol), #2EB872); transition: width .6s ease; }
.prova-rodape { display: flex; justify-content: space-between; gap: 8px; }
.prova-rodape small { font-weight: 700; font-size: .8rem; }
.minhas-provas .cartao-enviar { margin-top: 10px; }
.titulo-treino { margin: 18px 0 8px; font-size: 1.1rem; }
.minhas-provas .cartao-enviar .missao-textos strong { font-size: 1.15rem; }
.minhas-provas .cartao-enviar .missao-textos small { font-size: .85rem; }
.prova-rodape .prova-selo { white-space: nowrap; }

/* ---------- Agenda de provas e trabalhos ---------- */
.agenda-cabeca { display: flex; justify-content: space-between; align-items: center; }
.agenda-cabeca h2 { margin: 0; font-size: 1.3rem; }
.agenda-anotar { width: 100%; margin-top: 10px; }
.agenda-lista { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ag-item {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  background: var(--creme); border-radius: 16px; padding: 10px 12px; border-left: 6px solid var(--coral);
}
.ag-item.trabalho { border-left-color: var(--agua); }
.ag-data { display: flex; flex-direction: column; align-items: center; min-width: 62px; background: var(--branco); border-radius: 12px; padding: 6px 4px; }
.ag-data strong { font-size: 1rem; line-height: 1.1; }
.ag-data small { font-size: .7rem; font-weight: 700; opacity: .75; }
.ag-data.perto { background: var(--sol); }
.ag-textos { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-textos strong { line-height: 1.2; }
.ag-textos small { font-size: .85rem; opacity: .8; }
.ag-treinar {
  align-self: flex-start; margin-top: 4px; border: none; border-radius: 999px; padding: 4px 10px;
  background: var(--coral); color: var(--branco); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer;
}
.ag-acoes { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ag-botao {
  border: 2px solid #EEE3D2; background: var(--branco); border-radius: 999px; padding: 6px 12px;
  font: inherit; font-size: .85rem; font-weight: 800; color: var(--tinta); text-decoration: none; cursor: pointer;
}
.ag-apagar { margin-left: auto; border: none; background: none; font-size: 1.1rem; cursor: pointer; }
.agenda-form h2 { margin-top: 0; }
.agenda-form input[type="date"], .agenda-form select {
  font: inherit; font-size: 1.1rem; width: 100%; padding: 12px 14px; box-sizing: border-box;
  border: 3px solid #EEE3D2; border-radius: 16px; background: var(--creme); margin-bottom: 8px;
}
.agenda-tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.agenda-tipos button {
  border: 3px solid #EEE3D2; background: var(--creme); border-radius: 16px; padding: 12px;
  font: inherit; font-size: 1.05rem; font-weight: 800; cursor: pointer;
}
.agenda-tipos button.escolhido { border-color: var(--coral); background: #FFE9E2; }
.agenda-passados { margin-top: 12px; }
.agenda-passados summary { cursor: pointer; font-weight: 800; opacity: .75; }

/* ---------- Instalar o app: um pontinho no canto ---------- */
#tela-inicio { position: relative; }
.instalar-app { position: absolute; top: 10px; right: 10px; z-index: 5; }
.instalar-app.escondido { display: none; }
/* mesmo tamanho da bolinha verde do fundo (88px) */
.instalar-ponto {
  width: 88px; height: 88px; border-radius: 50%; border: 4px solid var(--branco);
  background: var(--agua); color: var(--branco); cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  font: inherit; font-size: 2rem; line-height: 1;
  box-shadow: 0 5px 12px rgba(0, 0, 0, .2);
  animation: pular 2.4s ease-in-out infinite;
}
.instalar-ponto small { font-size: .78rem; font-weight: 800; margin-top: 2px; }
.instalar-dica {
  position: absolute; top: 96px; right: 0; width: 230px; margin: 0; padding: 10px 12px;
  background: var(--branco); border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
  font-size: .9rem; font-weight: 700; color: var(--tinta); text-align: left;
}

/* ---------- Tabuada ---------- */
.cartao-tabuada {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px;
  border: none; border-radius: var(--raio); padding: 14px 18px; text-align: left; cursor: pointer;
  background: linear-gradient(120deg, #A98BF0, #8C6CE0); color: var(--branco); font: inherit;
  box-shadow: 0 6px 0 #6E50C2;
}
.cartao-tabuada:active { transform: translateY(3px); box-shadow: 0 3px 0 #6E50C2; }
.tabuada-icone {
  width: 64px; height: 64px; border-radius: 18px; background: var(--branco);
  display: grid; place-items: center; font-size: 2rem; transform: rotate(-4deg);
}
.tabuada-premio { background: var(--sol); color: var(--tinta); border-radius: 99px; padding: 4px 10px; font-weight: 800; white-space: nowrap; }
.tabuada-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.tabuada-ops button {
  border: 3px solid #EEE3D2; background: var(--creme); border-radius: 18px; padding: 12px 6px;
  font: inherit; font-size: 1.8rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabuada-ops button span { font-size: 1rem; font-weight: 800; color: var(--tinta); }
.tabuada-ops button.escolhido { border-color: #8C6CE0; background: #EFE8FF; }
.tabuada-numeros { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.tabuada-num {
  aspect-ratio: 1; border: none; border-radius: 18px; background: #8C6CE0; color: var(--branco);
  font: inherit; cursor: pointer; box-shadow: 0 5px 0 #6E50C2; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tabuada-num strong { font-size: 1.7rem; line-height: 1; }
.tabuada-num small { font-size: .85rem; }
.tabuada-num.feita { background: #B7A3EE; }
.tabuada-num.perfeita { background: var(--verde, #2EB872); box-shadow: 0 5px 0 #1F8F57; }
.tabuada-num:active { transform: translateY(3px); box-shadow: 0 2px 0 #6E50C2; }
#tela-tabuada .nota { margin-top: 18px; }

/* ---------- Coleção de bichinhos (prêmio da casa 25) ---------- */
.missao-botoes { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 16px 10px; }
.missao-botoes .botao { width: 100%; max-width: 420px; }
.botao-colecao {
  border: 3px solid var(--agua); background: var(--branco); color: var(--tinta); border-radius: 999px;
  padding: 6px 16px; font: inherit; font-weight: 800; cursor: pointer;
}
.botao-colecao span { background: var(--agua); color: var(--branco); border-radius: 99px; padding: 0 8px; margin-left: 4px; }
.premio-caixa .link { margin-top: 8px; }
.premio-palco { height: 190px; display: grid; place-items: center; margin-top: -10px; }
.premio-presente { font-size: 6rem; line-height: 1; }
@keyframes bichoRespira {
  0%, 100% { transform: translateY(0) scale(1, 1) rotate(0); }
  25% { transform: translateY(-6px) scale(.98, 1.03) rotate(-3deg); }
  50% { transform: translateY(0) scale(1.03, .97) rotate(0); }
  75% { transform: translateY(-4px) scale(.99, 1.02) rotate(3deg); }
}
@keyframes bichoPulo {
  0% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-34px) scale(1.12) rotate(-8deg); }
  55% { transform: translateY(0) scale(1.08, .9); }
  75% { transform: translateY(-10px) rotate(6deg); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes bichoChega {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.bicho-vivo {
  position: relative; border: none; background: none; padding: 0; cursor: pointer;
  animation: bichoRespira 2.2s ease-in-out infinite; transform-origin: 50% 100%;
}
.bicho-vivo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 6px rgba(38, 49, 92, .22)); pointer-events: none; }
.bicho-vivo.pulo { animation: bichoPulo .7s ease-out, bichoRespira 2.2s ease-in-out .7s infinite; }
.bicho-vivo.chegando { width: 170px; animation: bichoChega .7s cubic-bezier(.2, 1.4, .4, 1), bichoRespira 2.2s ease-in-out .7s infinite; }
.bicho-som {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--branco); border-radius: 12px; padding: 2px 8px; font-size: .8rem; font-weight: 800;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .15); animation: aparecer .25s ease-out; pointer-events: none;
}
.colecao-caixa { width: min(420px, 100%); max-height: 90vh; overflow-y: auto; }
.colecao-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 16px; }
.colecao-item {
  background: var(--creme); border-radius: 18px; padding: 10px 6px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.colecao-item .bicho-vivo { width: 80px; }
.colecao-item small { font-weight: 800; }
.colecao-item.falta small { opacity: .5; font-size: 1.1rem; }
.bicho-sombra { width: 80px; display: block; }
.bicho-sombra img { width: 100%; height: auto; display: block; filter: brightness(0); opacity: .15; }
.colecao-grade { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.colecao-item { padding: 8px 4px 4px; }
.colecao-item .bicho-vivo, .bicho-sombra { width: 100%; height: 70px; }
.colecao-item .bicho-vivo img, .bicho-sombra img { width: 100%; height: 100%; object-fit: contain; }
.colecao-item small { font-size: .78rem; }

/* ---------- Configurações da criança, avisos e voz ---------- */
.ajustes-opcoes, .agenda-avisos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ajustes-opcoes button, .agenda-avisos button {
  flex: 1 1 auto; min-width: 64px; border: 3px solid #EEE3D2; background: var(--creme); border-radius: 14px;
  padding: 10px 8px; font: inherit; font-weight: 800; cursor: pointer; color: var(--tinta);
}
.ajustes-opcoes button.escolhido { border-color: var(--coral); background: #FFE9E2; }
.agenda-avisos button.escolhido { border-color: var(--agua); background: #E0F5F2; }
.agenda-avisos button.escolhido::before { content: "✓ "; }
#resp-ajustes h2 { margin-top: 0; }
.ag-avisos { color: var(--agua); font-weight: 800; }
.tabuada-ops .tabuada-todas { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 10px; }
#botao-ouvir.desligado { opacity: .7; background: #EEE; color: var(--tinta); }
.agenda-avisos button { flex: 1 1 0; min-width: 0; font-size: .92rem; padding: 10px 4px; }

/* Pronto por assunto (matéria de prova) */
.prova-assuntos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.prova-assuntos .assunto { font-size: .78rem; font-weight: 800; border-radius: 99px; padding: 3px 9px; }
.prova-assuntos .assunto.bom { background: #D9F5E5; color: #1F7A4B; }
.prova-assuntos .assunto.medio { background: #FFF1C9; color: #8A6300; }
.prova-assuntos .assunto.fraco { background: #FFE1DA; color: #B03A1E; }
