@font-face {
  font-family: 'Nunito';
  src: url('fontes/nunito.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --marinho: #0f1d44;
  --marinho-2: #1d2f68;
  --verde: #2fd15a;
  --turquesa: #1fc7b6;
  --amarelo: #ffc93c;
  --rosa: #ff7aa8;
  --ceu: #8fd6ff;
  --branco: #ffffff;
  --sombra: 0 6px 0 rgba(15, 29, 68, .25);
  --raio: 28px;
  /* alvo mínimo de toque: público de 3 anos, bem acima dos 44 px de adulto (P-031) */
  --toque: 64px;
  font-family: 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--marinho);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
  color: inherit;
  min-width: var(--toque);
  min-height: var(--toque);
}

img { -webkit-user-drag: none; }

#app {
  position: fixed;
  inset: 0;
  margin: 0 auto;
  max-width: 520px;
  overflow: hidden;
  background: linear-gradient(#8fd6ff, #d8f3ff);
}

.tela {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: max(env(safe-area-inset-top), 12px) 16px max(env(safe-area-inset-bottom), 16px);
  animation: entra .35s ease-out;
}

@keyframes entra { from { opacity: 0; transform: scale(.98); } }

/* ---------- botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--raio);
  background: var(--branco);
  color: var(--marinho);
  font-weight: 900;
  font-size: 28px;
  box-shadow: var(--sombra);
  transition: transform .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(15, 29, 68, .25); }
.btn.redondo { border-radius: 50%; width: var(--toque); height: var(--toque); padding: 0; font-size: 30px; }
.btn.verde { background: var(--verde); color: #fff; }
.btn.amarelo { background: var(--amarelo); }
.btn.marinho { background: var(--marinho-2); color: #fff; }

/* ---------- Aninha ---------- */
/* todas as camadas dividem o mesmo quadro 928x1152 */
.aninha { position: relative; aspect-ratio: 928 / 1152; pointer-events: none; }
.aninha .mexe {
  position: absolute; inset: 0;
  transform-origin: 50% 96%;
  animation: respira 3.4s ease-in-out infinite;
}
.aninha .camada { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.aninha .camada.on { opacity: 1; }
.aninha .rig img { position: absolute; inset: 0; width: 100%; height: 100%; }
.aninha .cabeca { position: absolute; inset: 0; will-change: transform; }
.aninha .cabeca .olhos, .aninha .cabeca .boca { position: absolute; opacity: 0; }
.aninha .cabeca .olhos.on { opacity: 1; }
/* boca: troca suave entre os 5 formatos (a fechada fica sempre por baixo) */
.aninha .cabeca .boca { transition: opacity .06s linear; }
.aninha .cabeca .boca.on, .aninha .cabeca .boca[data-b="fechada"] { opacity: 1; }
.aninha .mexe.pula { animation: pula .7s cubic-bezier(.3, 1.6, .5, 1), respira 3.4s ease-in-out .7s infinite; }
.aninha .mexe.balanca { animation: balanca .6s ease-in-out, respira 3.4s ease-in-out .6s infinite; }
.aninha .mexe.andando { animation: pulinho .36s ease-in-out infinite; }

@keyframes respira {
  0%, 100% { transform: rotate(0) scale(1, 1); }
  25% { transform: rotate(-1.2deg) scale(1.006, 1.012); }
  50% { transform: rotate(0) scale(1.012, 1.02); }
  75% { transform: rotate(1.2deg) scale(1.006, 1.012); }
}
@keyframes pulinho {
  0%, 100% { transform: translateY(0) rotate(-2deg) scale(1.02, .98); }
  50% { transform: translateY(-6%) rotate(2deg) scale(.98, 1.03); }
}
@keyframes pula {
  0% { transform: scale(1, 1); }
  20% { transform: scale(1.08, .9); }
  50% { transform: translateY(-14%) scale(.96, 1.06); }
  80% { transform: scale(1.04, .95); }
  100% { transform: scale(1, 1); }
}
@keyframes balanca { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }

/* ---------- início ---------- */
.inicio {
  align-items: center;
  justify-content: flex-end;
  background: url('arte/quarto-alto.webp') center / cover;
}
.inicio::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(15, 29, 68, .55)); }
.inicio .aninha { width: min(88%, 420px); margin-bottom: 4px; z-index: 1; }
.titulo {
  position: absolute;
  top: max(env(safe-area-inset-top), 18px);
  left: 0; right: 0;
  text-align: center;
  font-weight: 900;
  font-size: clamp(34px, 10vw, 48px);
  line-height: 1;
  color: #fff;
  text-shadow: 0 4px 0 var(--marinho), 0 0 24px rgba(15, 29, 68, .4);
  z-index: 1;
}
.titulo small { display: block; font-size: .42em; color: #fff; }
.titulo b { display: block; font-size: 1.5em; color: var(--amarelo); }
.btn.jogar {
  z-index: 1;
  width: 128px; height: 128px; border-radius: 50%;
  font-size: 60px;
  background: var(--verde); color: #fff;
  animation: pulsa 1.4s ease-in-out infinite;
}
@keyframes pulsa { 50% { transform: scale(1.08); } }
.canto-pais {
  position: absolute;
  top: max(env(safe-area-inset-top), 12px);
  right: 12px;
  z-index: 3;
  width: 48px; height: 48px; min-width: 48px; min-height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  font-size: 22px;
}
/* convite para baixar o app (só no navegador do celular): discreto, para os pais */
.convite-app {
  z-index: 1;
  display: flex; align-items: center;
  margin-top: 14px; max-width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--marinho);
  font-size: 15px; font-weight: 700;
}
/* a faixa empurra tudo 58 px para cima: em tela curta a Aninha encolhe para não cobrir o título */
.inicio:has(.convite-app) .aninha { width: min(88%, 420px, calc((100vh - 310px) * .8)); }
.convite-app button { min-width: 0; min-height: 44px; background: none; }
.convite-abrir { padding: 0 6px 0 16px; white-space: nowrap; }
.convite-fechar { width: 44px; font-size: 16px; opacity: .7; }

/* ---------- perfis / novo perfil ---------- */
.escolha { align-items: center; justify-content: center; gap: 20px; background: linear-gradient(#8fd6ff, #d8f3ff); }
.escolha .aninha { width: min(46vw, 210px, 28vh); }
.grade {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 420px;
}
.grade .btn { height: clamp(68px, 21vw, 96px); min-width: 0; font-size: clamp(36px, 11vw, 52px); }
.grade.idades .btn { font-size: clamp(32px, 10vw, 46px); }
.grade .btn.mais { background: var(--amarelo); }
.perfil-bolha { position: relative; }
.perfil-bolha .estrelas-mini {
  position: absolute; bottom: -6px; right: -6px;
  background: var(--amarelo); border-radius: 14px; padding: 0 8px;
  font-size: 16px; line-height: 28px; box-shadow: var(--sombra);
}

/* ---------- casa (panorama por cômodo) ---------- */
.casa { padding: 0; background: #cfe9f7; }
.sala {
  position: absolute; inset: 0;
  overflow-x: auto; overflow-y: hidden;
  touch-action: pan-x;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.sala::-webkit-scrollbar { display: none; }
.comodo {
  position: relative;
  height: 100%;
  aspect-ratio: 3 / 2;
  background-size: 100% 100%;
}
.item {
  position: absolute;
  /* folga transparente em volta: presente pequeno (prateleira) continua fácil de pegar */
  padding: 14px;
  box-sizing: content-box;
  transform: translate(-50%, calc(-100% + 14px));
  touch-action: none;
  filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .18));
}
.item.parede { filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .15)); }
.item.novo { animation: brilha 1s ease-in-out infinite; }
.item.arrastando { filter: drop-shadow(0 16px 10px rgba(0, 0, 0, .25)); z-index: 999 !important; }
@keyframes brilha { 50% { transform: translate(-50%, calc(-100% + 14px)) scale(1.12); } }
.aninha-lugar, .toque-aninha {
  position: absolute;
  bottom: 4%;
  translate: -50% 0;
  transition-property: left;
  transition-timing-function: linear;
}
.aninha-lugar { height: 58%; z-index: 850; pointer-events: none; }
.aninha-lugar .aninha { height: 100%; }
/* área de toque só do corpo, ABAIXO dos itens: os presentes atrás dela continuam arrastáveis */
.toque-aninha { height: 50%; width: 20vh; min-width: 0; min-height: 0; background: none; z-index: 2; }
.hud {
  position: absolute;
  top: max(env(safe-area-inset-top), 12px);
  left: 12px; right: 12px;
  display: flex; align-items: center; gap: 8px;
  z-index: 900;
  pointer-events: none;
}
.contador {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .9);
  border-radius: 999px;
  padding: 0 12px;
  height: 52px;
  white-space: nowrap;
  font-weight: 900; font-size: 26px; color: var(--marinho);
  box-shadow: var(--sombra);
}
.hud .espaco { flex: 1; }
/* engrenagem é coisa de adulto: menor, e longe do 🎁 da criança */
.hud .engrenagem { width: 48px; height: 48px; min-width: 48px; min-height: 48px; font-size: 22px; margin-left: 10px; }
/* telas estreitas (iPhone SE): a barra toda precisa caber em 288px */
@media (max-width: 359px) {
  .hud .btn.redondo { width: 56px; height: 56px; min-width: 56px; min-height: 56px; font-size: 26px; }
  .contador { height: 48px; font-size: 21px; padding: 0 10px; }
  .hud .engrenagem { width: 40px; height: 40px; min-width: 40px; min-height: 40px; font-size: 18px; margin-left: 4px; }
}
.barra-casa {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px max(env(safe-area-inset-bottom), 12px);
  background: linear-gradient(transparent, rgba(15, 29, 68, .5));
  z-index: 900;
  /* a faixa cobre o chão do cômodo em tela curta (360x640): só os botões pegam
     o toque, o presente entre eles continua arrastável */
  pointer-events: none;
}
.barra-casa > :not(.espaco), .hud > :not(.espaco) { pointer-events: auto; }
.comodo-btn { position: relative; width: 72px; height: 72px; border-radius: 22px; font-size: 36px; padding: 0; background: var(--amarelo); }
.comodo-btn .seta { position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; background: #fff; font-size: 18px; line-height: 30px; box-shadow: var(--sombra); }
.mapa-btn { width: 72px; height: 72px; border-radius: 22px; font-size: 36px; padding: 0; margin-right: auto; }
.jogar-fase { width: 96px; height: 96px; min-width: 96px; border-radius: 50%; font-size: 48px; background: var(--verde); color: #fff; padding: 0 0 0 6px; }
.jogar-fase.chamando { animation: pulsa 1s ease-in-out 4; }
@media (max-width: 359px) {
  .jogar-fase { width: 84px; height: 84px; min-width: 84px; }
}
/* arrumando o presente: o ✓ fecha a fase; cômodo completo: a câmera tira a foto */
.barra-casa .espaco { flex: 1; }
.pronto { width: 96px; height: 96px; min-width: 96px; border-radius: 50%; font-size: 52px; background: var(--verde); color: #fff; padding: 0; animation: surge .4s cubic-bezier(.3, 1.6, .5, 1); }
.pronto[hidden] { display: none; }
.pronto.chamando, .camera.chamando { animation: pulsa 1s ease-in-out 4; }
.camera { width: 72px; height: 72px; min-width: 72px; border-radius: 22px; font-size: 36px; padding: 0; background: var(--amarelo); animation: pulsa 1.4s ease-in-out infinite; }
.camera.grande { width: 104px; height: 104px; min-width: 104px; border-radius: 50%; font-size: 54px; }
@media (max-width: 359px) {
  .pronto { width: 84px; height: 84px; min-width: 84px; }
  .camera { width: 60px; height: 60px; min-width: 60px; font-size: 30px; }
}
.flash { position: absolute; inset: 0; z-index: 1500; background: #fff; pointer-events: none; animation: flash .8s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.polaroid {
  background: #fff; padding: 10px 10px 0; border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  display: flex; flex-direction: column; align-items: center;
  font-size: 28px; line-height: 1; color: var(--marinho);
}
.polaroid b { padding: 10px 0 12px; }
.foto-ov .polaroid { width: min(92vw, 560px, 105vh); rotate: -3deg; animation: revela .9s cubic-bezier(.3, 1.4, .5, 1) backwards; }
@keyframes revela { from { transform: translateY(-40px) scale(.6); opacity: 0; } }
.foto-quadro { position: relative; width: 100%; aspect-ratio: 3 / 2; background-size: 100% 100%; overflow: hidden; border-radius: 2px; }
.foto-quadro img { position: absolute; transform: translate(-50%, -100%); pointer-events: none; }
.foto-quadro .foto-aninha { left: 50%; top: 96%; height: 58%; z-index: 850; }
.ok-foto { width: 96px; height: 96px; border-radius: 50%; font-size: 52px; padding: 0; }
.album .fotos { display: flex; gap: 14px; overflow-x: auto; flex-shrink: 0; padding: 6px 6px 10px; }
.polaroid.mini { width: 190px; flex-shrink: 0; padding: 6px 6px 0; font-size: 22px; min-height: 0; rotate: -2deg; }
.polaroid.mini:nth-child(even) { rotate: 2deg; }
.polaroid.mini b { padding: 6px 0 8px; }

.maozinha {
  position: absolute; z-index: 2000; pointer-events: none;
  font-size: 56px; translate: -30% 0;
  animation: aponta .8s ease-in-out infinite;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .3));
}
@keyframes aponta { 50% { transform: translateY(-16px); } }

.icone-formas { position: relative; width: 64px; height: 64px; }
.icone-formas > span { position: absolute; width: 38px; height: 38px; }
.icone-cartas { display: flex; gap: 4px; }
.icone-cartas span {
  width: 30px; height: 44px; border-radius: 8px;
  background: var(--marinho-2);
  display: grid; place-items: center; color: var(--amarelo); font-size: 20px;
}
.icone-cartas span:nth-child(2) { background: #fff; border: 3px solid var(--marinho-2); transform: rotate(8deg); }
.icone-letra { position: relative; display: grid; place-items: center; width: 64px; height: 64px; }
.icone-letra img { width: 100%; height: 100%; }
.icone-letra b { position: absolute; font-size: 26px; color: var(--marinho); }

/* ---------- mapa de fases ---------- */
.mapa { background: linear-gradient(#bfe9ff, #fff4d6 60%, #d9f7c9); gap: 10px; }
.mapa .topo-jogo { justify-content: space-between; }
.trilha { flex: 1; overflow-y: auto; padding: 8px 0 40px; display: flex; flex-direction: column; gap: 18px; }
.trecho {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: rgba(255, 255, 255, .55); border-radius: 28px; padding: 14px 8px 22px;
  position: relative;
}
.trecho::before { content: ''; position: absolute; top: 64px; bottom: 30px; left: 50%; border-left: 6px dotted rgba(15, 29, 68, .2); }
.trecho h2 { margin: 0; font-size: 26px; color: var(--marinho); }
.trecho.fechado { filter: grayscale(.9); opacity: .6; }
.no {
  position: relative; translate: var(--lado) 0;
  width: 104px; height: 104px; border-radius: 50%;
  background: #fff; box-shadow: var(--sombra);
  display: grid; place-items: center; padding: 10px;
}
.no .no-icone { width: 64px; height: 64px; display: grid; place-items: center; }
.no .no-icone img { width: 100%; height: 100%; object-fit: contain; }
.no .no-estrelas { position: absolute; bottom: -14px; font-size: 20px; color: var(--amarelo); text-shadow: 0 1px 0 var(--marinho); letter-spacing: 1px; }
.no.feito { background: #e6ffe9; }
.no.atual { background: var(--amarelo); animation: pulsa 1.2s ease-in-out infinite; box-shadow: 0 0 0 6px rgba(255, 201, 60, .45), var(--sombra); }
.aninha-mini { position: absolute; width: 70px; top: -18px; left: 78%; animation: aponta 1s ease-in-out infinite; }

/* ---------- fim de fase ---------- */
.overlay.fim { background: rgba(15, 29, 68, .9); justify-content: space-evenly; padding-top: max(env(safe-area-inset-top), 24px); gap: 8px; }
.estrelas-fim { display: flex; gap: 8px; font-size: 64px; color: rgba(255, 255, 255, .25); }
.estrelas-fim span.ganha { color: var(--amarelo); animation: surge .5s cubic-bezier(.3, 1.6, .5, 1) backwards; text-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.fim-aninha { width: min(50vw, 240px, 30vh); }
.fim-conteudo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fim-conteudo .premio-img { width: min(40vw, 170px, 22vh); }
.fim-botoes { display: flex; align-items: center; gap: 22px; }
.fim-botoes .proxima { width: 112px; height: 112px; border-radius: 50%; font-size: 56px; padding-left: 8px; animation: pulsa 1.3s ease-in-out infinite; }
.porta-abriu { display: flex; align-items: center; gap: 6px; font-size: 80px; animation: surge .6s cubic-bezier(.3, 1.6, .5, 1); }

/* ---------- jogo ---------- */
.jogo { background: linear-gradient(#bfe9ff, #f2fbff); gap: 10px; }
.topo-jogo { display: flex; align-items: center; gap: 10px; }
.progresso { flex: 1; display: flex; justify-content: center; gap: 8px; }
.progresso i { width: 18px; height: 18px; border-radius: 50%; background: rgba(15, 29, 68, .15); }
.progresso i.feito { background: var(--verde); }
.progresso i.agora { background: var(--amarelo); transform: scale(1.25); }
.palco {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 0;
  position: relative;
}
.jogo > .aninha { position: absolute; left: -4px; bottom: max(env(safe-area-inset-bottom), 6px); width: 34%; max-width: 160px; z-index: 5; pointer-events: none; }
.jogo .palco { padding-bottom: min(40vw, 200px); }
.opcoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.opcoes .btn { min-width: 92px; height: 92px; font-size: 48px; padding: 0 14px; }
.opcoes .btn .pontinhos { display: block; font-size: 18px; line-height: 1; letter-spacing: 1px; color: var(--marinho-2); }
.opcoes .btn { flex-direction: column; gap: 0; }
.btn.certo { background: var(--verde); color: #fff; animation: pula .6s; }
.btn.errado { animation: treme .4s; }
@keyframes treme { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

.monte {
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center;
  gap: 6px; max-width: 100%;
}
.monte img { width: var(--obj, 64px); height: var(--obj, 64px); object-fit: contain; animation: surge .35s backwards; }
.monte img.contado { filter: drop-shadow(0 0 8px var(--amarelo)); transform: scale(1.12); }
@keyframes surge { from { transform: scale(0); } }
.soma { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.soma .monte { max-width: 42%; }
.soma .monte img { width: 44px; height: 44px; }
.sinal { font-size: 48px; font-weight: 900; color: var(--marinho); }
.conta {
  font-size: clamp(54px, 17vw, 84px);
  font-weight: 900; color: var(--marinho);
  background: #fff; border-radius: var(--raio); padding: 6px 26px;
  box-shadow: var(--sombra);
}
.tempo { width: 80%; height: 14px; border-radius: 7px; background: rgba(15, 29, 68, .12); overflow: hidden; }
.tempo i { display: block; height: 100%; background: var(--turquesa); transform-origin: left; }

/* formas e cores */
.forma { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 0 rgba(15, 29, 68, .2)); }
.peca-lugar { width: 120px; height: 120px; }
.peca { width: 120px; height: 120px; touch-action: none; }
.peca.arrastando { position: fixed; z-index: 999; pointer-events: none; transform: translate(-50%, -50%) scale(1.15); }
.cestos { display: flex; gap: 12px; width: 100%; justify-content: center; }
.cesto {
  width: 92px; height: 104px;
  border-radius: 18px 18px 30px 30px;
  border: 6px solid rgba(0, 0, 0, .12);
  box-shadow: var(--sombra);
}
.cesto.alvo { transform: scale(1.1); }
.cesto:active, .carta:active, .slot-item:active { transform: scale(.94); }
.fila { display: flex; justify-content: center; gap: 6px; width: 100%; }
.fila .slot { flex: 1 1 0; max-width: 60px; aspect-ratio: 1; min-width: 0; }
.fila .slot.vazio {
  border: 4px dashed var(--marinho-2); border-radius: 14px;
  display: grid; place-items: center; font-weight: 900; font-size: 30px; color: var(--marinho-2);
  animation: pulsa 1.2s infinite;
}
.opcoes .btn.forma-btn { width: 92px; padding: 12px; }
/* quatro opções numa linha só (9-10 anos) */
.opcoes:has(> :nth-child(4)) .btn { min-width: 0; width: calc((100% - 36px) / 4); max-width: 92px; height: 84px; font-size: 40px; padding: 0 6px; }

/* memória */
.palco-memoria { justify-content: flex-start; padding-top: 8px; }
.jogo .palco-memoria ~ .aninha { width: 26%; }
.cartas { display: grid; gap: 10px; width: 100%; max-width: 420px; padding-left: 0; }
.cartas[data-colunas="2"] { max-width: min(100%, 44vh); margin: 0 auto; }
.carta { aspect-ratio: 3 / 4; perspective: 600px; min-width: 0; min-height: 0; padding: 0; background: none; }
.carta .gira { position: relative; width: 100%; height: 100%; transition: transform .35s; transform-style: preserve-3d; }
.carta.aberta .gira, .carta.achada .gira { transform: rotateY(180deg); }
.carta .face {
  position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden;
  display: grid; place-items: center; box-shadow: var(--sombra);
}
.carta .verso { background: radial-gradient(circle at 50% 40%, var(--marinho-2), var(--marinho)); color: var(--amarelo); font-size: 34px; }
.carta .frente { background: #fff; transform: rotateY(180deg); padding: 8%; }
.carta .frente img { width: 100%; height: 100%; object-fit: contain; }
.carta.achada .frente { background: #e6ffe9; }

/* ---------- prêmio, confete ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: rgba(15, 29, 68, .72);
  animation: entra .3s;
  padding: 24px;
}
.presente {
  width: 180px; height: 180px; border-radius: 30px;
  background: linear-gradient(90deg, transparent 42%, var(--amarelo) 42% 58%, transparent 58%), var(--rosa);
  box-shadow: var(--sombra);
  font-size: 0;
  animation: balanca 1s ease-in-out infinite;
  display: grid; place-items: start center;
}
.presente::after { content: '🎀'; font-size: 84px; line-height: 1; margin-top: -52px; }
.premio-img { width: min(70%, 260px); animation: surge .5s cubic-bezier(.3, 1.6, .5, 1); filter: drop-shadow(0 0 30px rgba(255, 201, 60, .8)); }
.estrela-grande { font-size: 120px; animation: surge .5s cubic-bezier(.3, 1.6, .5, 1); }
.confete { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1001; }
.confete i {
  position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px;
  animation: cai 1.8s ease-in forwards;
}
@keyframes cai { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- álbum ---------- */
.album { background: linear-gradient(#ffe7a8, #fff6dc); gap: 14px; }
.album .grade { grid-template-columns: repeat(3, 1fr); max-width: none; overflow: auto; padding: 6px; }
.album .slot-item { aspect-ratio: 1; background: #fff; border-radius: 22px; box-shadow: var(--sombra); padding: 10%; min-width: 0; }
.album .slot-item img { width: 100%; height: 100%; object-fit: contain; }
.album .slot-item.falta img { filter: brightness(0); opacity: .14; }

/* ---------- soninho / dormindo ---------- */
.dormindo-tela { align-items: center; justify-content: center; background: radial-gradient(circle at 50% 30%, #2b3d7a, #0b1430); color: #fff; }
.dormindo-tela .aninha { width: min(80%, 360px); animation: respira 4.5s ease-in-out infinite; }
.zzz { position: absolute; top: 18%; right: 20%; font-size: 44px; font-weight: 900; color: #cfe0ff; }
.zzz span { display: inline-block; animation: zz 2.4s ease-in-out infinite; }
.zzz span:nth-child(2) { animation-delay: .4s; font-size: .8em; }
.zzz span:nth-child(3) { animation-delay: .8s; font-size: .6em; }
@keyframes zz { 0% { opacity: 0; transform: translateY(10px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px); } }
.lua { position: absolute; top: 8%; left: 12%; font-size: 64px; }

/* ---------- área dos pais ---------- */
.pais { background: #f4f6fb; color: var(--marinho); overflow: auto; gap: 16px; font-size: 17px; line-height: 1.45; }
.pais h1 { font-size: 26px; margin: 4px 0; }
.pais h2 { font-size: 19px; margin: 0 0 6px; }
.cartao { background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 2px 8px rgba(15, 29, 68, .08); }
.linha { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.linha + .linha { border-top: 1px solid #e3e8f2; }
.linha .grow { flex: 1; }
.pais .btn { font-size: 18px; padding: 0 18px; min-height: 52px; box-shadow: none; border: 2px solid #d5dcea; }
.pais .btn.perigo { color: #c62839; border-color: #f3c3ca; }
.pais .btn.ativo { background: var(--marinho-2); color: #fff; border-color: var(--marinho-2); }
.opcoes-tempo { display: flex; flex-wrap: wrap; gap: 8px; }
.pais a { color: var(--marinho-2); font-weight: 800; }
.portao { background: rgba(244, 246, 251, .97); color: var(--marinho); text-align: center; }
.portao h2 { margin: 0; font-size: 22px; }
.portao p { margin: 0; font-size: 18px; }
.portao .conta-pais { font-size: 34px; font-weight: 900; }
.portao .opcoes { padding-left: 0; }
.selos { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.selo-loja img { display: block; height: 52px; width: auto; }
.aviso-app { margin: 12px 0 0; font-size: 15px; }
.folha-app .aviso-app { max-width: 340px; margin: 0; font-size: 15px; }
.portao .opcoes .btn { font-size: 28px; min-width: 0; width: calc((100% - 36px) / 4); max-width: 96px; height: 72px; padding: 0; }


@media (max-height: 700px) {
  .estrelas-fim { font-size: 48px; }
  .fim-aninha { width: min(40vw, 180px, 26vh); }
  .fim-conteudo .premio-img { width: min(32vw, 130px, 18vh); }
  .fim-botoes .proxima { width: 96px; height: 96px; font-size: 48px; }
  .prato { width: min(46vw, 170px, 26vh); }
  .bandeja .comida { width: 62px; height: 62px; }
  .pedido-item .par img { width: 38px; height: 38px; }
  .palco-lanche ~ .aninha { width: 38%; }
  .mesa .comida { width: 84px; height: 84px; }
}

/* ---------- cozinha: lanche e bolo ---------- */
.jogo-lanche, .jogo-bolo { background: linear-gradient(#fff3d6, #fde6c2); }
.palco-lanche ~ .aninha { width: 52%; max-width: 270px; }
.mesa { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 360px; }
.mesa .comida { width: 96px; height: 96px; }
.comida { width: 84px; height: 84px; padding: 6px; background: #fff; border-radius: 22px; box-shadow: var(--sombra); min-width: 0; min-height: 0; }
.comida img { width: 100%; height: 100%; object-fit: contain; }
.comida.errado, .cartao-passo.errado, .silabas .btn.errado { animation: treme .4s; }
.pedido { display: flex; gap: 18px; }
.pedido-item { display: flex; align-items: center; gap: 4px; background: #fff; border-radius: 20px; padding: 6px 14px 6px 6px; box-shadow: var(--sombra); }
.pedido-item .par { display: flex; }
.pedido-item .par img { width: 44px; height: 44px; }
.pedido-item .par img + img { margin-left: -14px; }
.pedido-item b { font-size: 36px; color: var(--marinho); }
.prato {
  width: min(56vw, 230px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #fff 55%, #e7eef7 56%, #fff 70%);
  box-shadow: var(--sombra);
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 2px; padding: 16%;
}
.prato .no-prato { width: 30%; animation: surge .3s; }
.bandeja { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bandeja .comida { width: 72px; height: 72px; }
.conta-receita { font-size: clamp(44px, 13vw, 64px); }
.passos { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.passo {
  width: min(17vw, 84px); aspect-ratio: 1; border-radius: 16px;
  border: 4px dashed rgba(15, 29, 68, .25); display: grid; place-items: center;
  font-size: 30px; font-weight: 900; color: rgba(15, 29, 68, .6); overflow: hidden;
}
.passo.feito { border: 4px solid var(--verde); }
.passo img { width: 100%; height: 100%; object-fit: cover; }
.cartoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cartao-passo { width: min(28vw, 128px); aspect-ratio: 1; padding: 0; border-radius: 20px; overflow: hidden; box-shadow: var(--sombra); background: #fff; min-width: 0; min-height: 0; }
.cartao-passo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- jardim: letrinhas e esconde ---------- */
.jogo-letrinhas, .jogo-esconde { background: linear-gradient(#c9f0c0, #f1fbe9); }
.flores { gap: 14px; }
.flor { position: relative; width: min(28vw, 120px); aspect-ratio: 1; padding: 0; background: none; display: grid; place-items: center; }
.flor img { position: absolute; inset: 0; width: 100%; height: 100%; }
.flor b { position: relative; font-size: clamp(36px, 11vw, 52px); font-weight: 900; color: var(--marinho); }
.flor.certo { animation: pula .6s; }
.flor.errado { animation: treme .4s; }
.figura { width: min(44vw, 190px); aspect-ratio: 1; background: #fff; border-radius: 32px; box-shadow: var(--sombra); padding: 14px; }
.figura img { width: 100%; height: 100%; object-fit: contain; }
.letras .btn { font-size: 46px; }
.palavra { display: flex; gap: 8px; }
.palavra .vaga {
  min-width: 70px; height: 70px; padding: 0 8px; border-radius: 18px;
  border: 4px dashed rgba(15, 29, 68, .3); display: grid; place-items: center;
  font-size: 32px; font-weight: 900; color: var(--marinho);
}
.palavra .vaga.feito { border: 4px solid var(--verde); background: #fff; animation: surge .3s; }
.silabas .btn { font-size: 32px; min-width: 80px; height: 72px; }
.palco-esconde { padding-bottom: 0 !important; justify-content: flex-start; }
.palco-esconde ~ .aninha { width: 24%; }
.cena-jardim {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 3 / 4; max-height: 100%;
  background: url('arte/jardim-cena.webp') center / cover; border-radius: 24px; overflow: hidden;
  box-shadow: var(--sombra);
}
.bicho {
  position: absolute; padding: 0; background: none; min-width: 0; min-height: 0;
  transform: translate(-50%, -100%) rotate(var(--giro));
  filter: saturate(.9) brightness(.92);
}
.bicho img { width: 100%; display: block; clip-path: inset(0 0 calc(100% - var(--aparece, 100%)) 0); }
.bicho.achado img { clip-path: none; }
.bicho::after { content: ''; position: absolute; inset: -14px; } /* folga de toque */
.bicho.achado { filter: drop-shadow(0 0 10px #fff) drop-shadow(0 0 4px var(--amarelo)); animation: achou .6s cubic-bezier(.3, 1.6, .5, 1) forwards; }
.bicho.dica { animation: tremeBicho .4s 3; }
@keyframes tremeBicho {
  25% { transform: translate(calc(-50% - 8px), -100%) rotate(var(--giro)); }
  75% { transform: translate(calc(-50% + 8px), -100%) rotate(var(--giro)); }
}
@keyframes achou { 50% { transform: translate(-50%, -110%) rotate(0) scale(1.5); } 100% { transform: translate(-50%, -100%) rotate(0) scale(1.25); } }


/* ---------- parquinho: sombras, quebra-cabeça, ligue os pontos ---------- */
.jogo-sombras, .jogo-quebra, .jogo-pontos { background: linear-gradient(#c8ecff, #e9fbe0); }
.sombra-modelo {
  width: min(40vw, 160px, 22vh); aspect-ratio: 1; padding: 6%;
  background: #fff; border-radius: 30px; box-shadow: var(--sombra); animation: surge .4s cubic-bezier(.3, 1.6, .5, 1);
}
.sombra-modelo img, .sombra img { width: 100%; height: 100%; object-fit: contain; display: block; }
.opcoes.sombras { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 14px; }
.sombra {
  width: min(38vw, 150px, 21vh); aspect-ratio: 1; padding: 10%; min-width: 0; min-height: 0;
  background: #fff7d6; border-radius: 26px; box-shadow: var(--sombra);
}
.sombras-3 .sombra, .sombras-4 .sombra { width: min(36vw, 132px, 17vh); }
/* a sombra é o próprio desenho apagado; achada, ela ganha cor */
.sombra img { filter: brightness(0); opacity: .78; transition: filter .5s, opacity .5s; }
.sombra.espelho img { transform: scaleX(-1); }
.sombra.achou { background: #e6ffe9; animation: pula .6s; }
.sombra.achou img { filter: none; opacity: 1; }
.sombra.errado { animation: treme .4s; }
.icone-sombra img { filter: brightness(0); opacity: .75; }
.quebra {
  display: grid; grid-template-columns: repeat(var(--lado), 1fr); gap: 4px;
  width: min(100%, 380px, 48vh); aspect-ratio: 1; padding: 4px;
  background: #fff; border-radius: 22px; box-shadow: var(--sombra); transition: gap .3s, padding .3s;
}
.peca-q { aspect-ratio: 1; border-radius: 10px; padding: 0; min-width: 0; min-height: 0; background-repeat: no-repeat; }
.peca-q.escolhida { outline: 5px solid var(--amarelo); outline-offset: -5px; transform: scale(.94); }
.peca-q.no-lugar { box-shadow: inset 0 0 0 3px rgba(47, 209, 90, .8); }
.quebra.montado { gap: 0; padding: 0; overflow: hidden; }
.quebra.montado .peca-q { border-radius: 0; box-shadow: none; }
.pontos-quadro {
  position: relative; width: min(100%, 380px, 50vh); aspect-ratio: 1;
  background: #fff; border-radius: 26px; box-shadow: var(--sombra);
}
.pontos-quadro .revela { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; opacity: 0; transition: opacity .6s; }
.pontos-quadro.revelado .revela { opacity: 1; animation: pula .7s .3s; }
.pontos-quadro .linhas { position: absolute; inset: 0; width: 100%; height: 100%; }
.linhas .guia { fill: none; stroke: rgba(15, 29, 68, .12); stroke-width: 1; stroke-dasharray: 2 2; }
.linhas .traco { fill: none; stroke: var(--marinho-2); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.pontos-quadro.revelado .linhas { opacity: .25; transition: opacity .6s; }
.ponto {
  position: absolute; translate: -50% -50%;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  background: #fff; border: 3px solid var(--marinho-2); color: var(--marinho); font-weight: 900; font-size: 17px;
}
.ponto::after { content: ''; position: absolute; inset: -10px; } /* folga de toque */
.ponto.proximo { background: var(--amarelo); animation: pulsa 1s ease-in-out infinite; }
.ponto.feito { background: var(--verde); color: #fff; border-color: var(--verde); }
.ponto.errado { animation: treme .4s; }
.jogo-pontos .palco { padding-bottom: min(34vw, 170px); }
.icone-quebra { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 56px; height: 56px; }
.icone-quebra i { border-radius: 6px; background: var(--ceu); }
.icone-quebra i:nth-child(2), .icone-quebra i:nth-child(3) { background: var(--rosa); }
.icone-pontos { font-size: 22px; font-weight: 900; color: var(--marinho-2); }

/* ---------- cidade: caminho do sinal, internet segura ---------- */
.jogo-sinal, .jogo-seguranca { background: linear-gradient(#d7e9ff, #f5efe6); }
.grade-sinal {
  display: grid; gap: 4px; align-items: center;
  grid-template-columns: minmax(0, .55fr) repeat(var(--col), minmax(0, 1fr)) minmax(0, .55fr);
  width: min(100%, 440px);
}
.grade-sinal .ponta img { width: 100%; }
.cabo, .grama { aspect-ratio: 1; border-radius: 16px; }
.grama { background: rgba(47, 209, 90, .18); }
.cabo { padding: 0; min-width: 0; min-height: 0; background: #fff; box-shadow: var(--sombra); }
.cabo svg { width: 100%; height: 100%; transform: rotate(calc(var(--giro) * 90deg)); transition: transform .2s ease-out; }
.cabo .fio { fill: #9aa7bd; stroke: #9aa7bd; }
.cabo .curva-fio, .cabo path.fio { fill: none; }
.cabo.certa .fio { fill: #8fd6ff; stroke: #8fd6ff; }
.cabo.certa path.fio { fill: none; }
.grade-sinal.ligado .cabo .fio { fill: var(--verde); stroke: var(--verde); filter: drop-shadow(0 0 4px var(--amarelo)); }
.grade-sinal.ligado .cabo path.fio { fill: none; }
.grade-sinal.ligado .ponta { animation: pula .7s; }
.situacao { width: min(70vw, 300px, 38vh); aspect-ratio: 1; border-radius: 28px; overflow: hidden; box-shadow: var(--sombra); }
.situacao img { width: 100%; height: 100%; object-fit: cover; }
.sim-nao { display: flex; gap: 22px; }
.sim-nao .btn { width: 104px; height: 104px; border-radius: 50%; font-size: 52px; }
.sim-nao .sim { background: #e5f9e8; }
.sim-nao .nao { background: #ffe1e4; }
.sim-nao .btn.certo { background: var(--verde); }
.icone-seguro { font-size: 40px; }
@media (max-height: 700px) {
  .situacao { width: min(60vw, 230px, 32vh); }
  .sim-nao .btn { width: 88px; height: 88px; font-size: 44px; }
}

/* ---------- celular deitado ---------- */
#girar {
  display: none;
  position: fixed; inset: 0; z-index: 2000;
  background: var(--marinho); color: #fff;
  flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 24px;
}
.girar-icone { font-size: 72px; animation: gira 2s ease-in-out infinite; }
@keyframes gira { 50% { transform: rotate(-90deg); } }
@media (orientation: landscape) and (max-height: 520px) {
  #girar { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  .item.novo { outline: 4px dashed var(--amarelo); outline-offset: 2px; }
  .bicho.dica { outline: 4px dashed var(--amarelo); border-radius: 12px; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
