/* Escolinha do Gemalino: fazenda (lugares), pausa, área dos adultos e módulos.
   Cores e medidas (--alvo, --topo, --sombra...) vêm de estilo.css. */

@keyframes pulo {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-18%) scale(1.05, 0.95); }
  55% { transform: translateY(0) scale(1.08, 0.92); }
  75% { transform: translateY(-6%); }
}
@keyframes balancando {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}
.btn-redondo[hidden] { display: none; }
/* o balão começa depois dos 4 botões redondos do topo */
.balao { left: calc(var(--btn) * 4 + 56px); transform: none; max-width: min(calc(100cqw - var(--btn) * 4 - 76px), 640px); }
.arrastando { position: fixed !important; z-index: 30; pointer-events: none; transform: scale(1.12); }

/* ---------- início ---------- */
.titulo-inicio {
  position: absolute;
  left: 0;
  right: 0;
  top: max(16px, 4cqh);
  margin: 0;
  text-align: center;
  font-size: clamp(26px, 6cqmin, 54px);
  font-weight: 900;
  color: var(--azul-marinho);
  text-shadow: 0 2px 0 #fff;
}
.credito-inicio {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(14px, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  font-size: clamp(14px, 2.4cqmin, 20px);
  font-weight: 700;
}

/* ---------- a fazenda ---------- */
.turma-escolinha { width: min(36cqw, 70cqh); }
.turma-escolinha .gemalino-menu { left: 0; height: 86%; }
.lugares {
  --lg: clamp(var(--alvo), 20cqmin, 190px);
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  top: var(--topo);
  bottom: max(16px, env(safe-area-inset-bottom));
  left: calc(min(36cqw, 70cqh) + var(--alvo) + 30px);
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: clamp(10px, 2cqmin, 22px);
  z-index: 5;
}
.lugar {
  width: var(--lg);
  height: var(--lg);
  border-radius: 28px;
  background: var(--branco);
  box-shadow: var(--sombra), inset 0 -8px 0 #dfe8f0;
  padding: 10px;
  display: grid;
  grid-template: 100% / 100%;
  place-items: center;
  overflow: hidden;
  animation: balancar 3s ease-in-out infinite;
}
.lugar:nth-child(2n) { animation-delay: 0.5s; }
.lugar-figura { width: 100%; height: 100%; display: grid; place-items: center; }
.lugar-figura svg { width: 100%; height: 100%; }

/* ---------- pausa para descansar ---------- */
.pausa {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: linear-gradient(#26346b, #3d5aa8);
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2cqh;
  padding: 16px;
  text-align: center;
}
.pausa[hidden] { display: none; }
.pausa-gemalino { height: min(46cqh, 340px); animation: acenar 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
.pausa-texto { margin: 0; font-size: clamp(22px, 5cqmin, 40px); font-weight: 900; max-width: 760px; }
.pausa-nota { margin: 0; font-size: 16px; opacity: 0.85; }
/* na pausa só o cadeado continua de pé (os adultos escolhem continuar); os outros ficam apagados */
body:has(.pausa:not([hidden])) .barra { z-index: 46; }
body:has(.pausa:not([hidden])) .barra .botao-barra:not(#botao-pais) { opacity: 0.3; pointer-events: none; }

/* ---------- área dos adultos ---------- */
.pais-conta p { font-size: 22px; }
.conta-opcoes { display: flex; gap: 12px; margin: 12px 0 16px; }
.conta-opcao {
  flex: 1;
  min-height: 64px;
  border-radius: 14px;
  background: var(--azul-claro);
  font-size: 26px;
  font-weight: 900;
}
.pais-cancelar { min-height: 52px; border-radius: 14px; background: #eee; padding: 0 16px; font-weight: 700; }
.painel-caixa select { width: 100%; min-height: 44px; font-size: 17px; margin-top: 4px; }
.pais-modulo { border-top: 1px solid #dde3ee; padding: 8px 0; }
.pais-modulo p { margin: 4px 0; font-size: 15px; line-height: 1.35; }
.pais-modulo label.linha { font-size: 18px; }
.pais-conteudo[hidden], .pais-conta[hidden] { display: none; }
.painel-acoes button[hidden] { display: none; }

/* ---------- área dos módulos ---------- */
.modulo {
  position: absolute;
  left: 16px; /* a barra da criança fica fora do palco: sem coluna reservada */
  right: 16px;
  top: var(--topo);
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modulo > * { max-width: 100%; max-height: 100%; }
.atividades {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: clamp(12px, 2.5cqmin, 26px);
}
.btn-atividade {
  position: relative;
  width: clamp(110px, 24cqmin, 210px);
  height: clamp(110px, 24cqmin, 210px);
  border-radius: 28px;
  background: var(--branco);
  box-shadow: var(--sombra), inset 0 -8px 0 #dfe8f0;
  display: grid;
  grid-template: 100% / 100%;
  place-items: center;
  overflow: hidden;
  padding: 10px;
  animation: balancar 3s ease-in-out infinite;
}
.btn-atividade:nth-child(2n) { animation-delay: 0.4s; }
.btn-atividade > * { grid-area: 1 / 1; }
.ic-letras { font-size: clamp(22px, 5cqmin, 44px); font-weight: 900; color: #e8590c; letter-spacing: 2px; text-align: center; line-height: 1.1; }
.atv-amigos img { height: 90%; justify-self: start; }
.ic-letra-grande { justify-self: end; align-self: end; font-size: clamp(40px, 9cqmin, 84px); font-weight: 900; color: var(--azul-marinho); line-height: 1; }
.ic-tracar { font-size: clamp(60px, 15cqmin, 140px); font-weight: 900; color: transparent; -webkit-text-stroke: 4px #2f9e44; line-height: 1; }
.ic-dedo { justify-self: end; align-self: end; font-size: clamp(32px, 7cqmin, 60px); }
.ic-ouvido { justify-self: start; align-self: start; font-size: clamp(36px, 8cqmin, 70px); }
.ic-mini { width: 60%; justify-self: end; align-self: end; }
.ic-mini svg { width: 100%; height: auto; display: block; }
.ic-silabas { font-size: clamp(24px, 5.5cqmin, 48px); font-weight: 900; color: #1971c2; }
.ic-silabas b { color: #e8590c; margin: 0 4px; }

/* ---------- Letrinhas: vogais ---------- */
.vogais { display: flex; align-items: center; gap: clamp(12px, 3cqw, 40px); height: 100%; }
.fila-letras { display: flex; flex-direction: column; gap: 10px; }
.btn-letra {
  width: var(--alvo);
  height: var(--alvo);
  border-radius: 20px;
  background: var(--branco);
  box-shadow: var(--sombra);
  font-size: 44px;
  font-weight: 900;
  color: #e8590c;
}
.btn-letra.atual { background: var(--amarelo); }
.cartao-letra {
  height: min(100%, 64cqh);
  aspect-ratio: 1.5;
  max-width: 58cqw;
  border-radius: 32px;
  background: var(--branco);
  box-shadow: var(--sombra);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 4%;
}
.cartao-letra.entrou { animation: pulo 0.6s ease-out; }
.letra-grande { font-size: min(40cqh, 22cqw); font-weight: 900; color: #e8590c; line-height: 1; text-align: center; }
.figura { display: grid; place-items: center; height: 100%; }
.figura svg { width: 100%; max-height: 100%; }
.btn-proxima {
  width: clamp(var(--alvo), 12cqmin, 120px);
  height: clamp(var(--alvo), 12cqmin, 120px);
  border-radius: 50%;
  background: var(--amarelo);
  box-shadow: var(--sombra);
  font-size: clamp(36px, 6cqmin, 56px);
  flex-shrink: 0;
}

/* ---------- Letrinhas: a letra do meu amigo ---------- */
.amigos-letras { display: flex; gap: clamp(10px, 2.5cqw, 30px); align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.cartao-amigo {
  position: relative;
  width: clamp(140px, 19cqw, 240px);
  height: min(60cqh, 320px);
  min-height: 180px;
  border-radius: 28px;
  background: var(--branco);
  box-shadow: var(--sombra);
  display: grid;
  grid-template: 1fr auto / 100%;
  justify-items: center;
  padding: 10px;
  overflow: hidden;
}
.cartao-amigo img { height: 100%; max-width: 100%; object-fit: contain; min-height: 0; }
.letra-amigo { font-size: clamp(48px, 10cqmin, 92px); font-weight: 900; color: var(--azul-marinho); line-height: 1; }
.cartao-amigo.pulando { animation: pulo 0.7s ease-out; }

/* ---------- Letrinhas: traçar ---------- */
.tracar { display: flex; align-items: center; gap: clamp(12px, 3cqw, 40px); height: 100%; }
.folha {
  position: relative;
  height: 100%;
  aspect-ratio: 100 / 120;
  max-width: 60cqw;
  background: #fffdf4;
  border-radius: 24px;
  box-shadow: var(--sombra);
  touch-action: none;
  background-image: repeating-linear-gradient(transparent 0 calc(25% - 2px), #ffe3a3 calc(25% - 2px) 25%);
}
.tracado, .brilho { position: absolute; inset: 0; width: 100%; height: 100%; }
.brilho { pointer-events: none; transition: opacity 0.7s; }
.brilho.apagando { opacity: 0; }
.tracado .guia { fill: none; stroke: #d7dde8; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0.1 6; }
.tracado .feito { fill: none; stroke: #2f9e44; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset 0.1s; }
.tracado .ponto-inicio { fill: #adb5bd; }
.tracado .ponto-inicio.da-vez { fill: #2f9e44; animation: chamar-ponto 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.tracado .seta { fill: #adb5bd; }
.tracado .seta.da-vez { fill: #e8590c; }
.tracado .num-traco { font-size: 9px; font-weight: 900; fill: #adb5bd; font-family: var(--fonte); }
.tracado .num-traco.da-vez { fill: #e8590c; }
@keyframes chamar-ponto { 50% { transform: scale(1.5); } }
.folha.pronta { box-shadow: 0 0 0 6px var(--amarelo), var(--sombra); }
.tracar-lado { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Letrinhas: som inicial ---------- */
.som-inicial { display: flex; align-items: center; gap: clamp(12px, 3cqw, 40px); }
.btn-ouvir {
  width: clamp(var(--alvo), 14cqmin, 130px);
  height: clamp(var(--alvo), 14cqmin, 130px);
  border-radius: 50%;
  background: var(--amarelo);
  box-shadow: var(--sombra);
  font-size: clamp(40px, 7cqmin, 64px);
  flex-shrink: 0;
}
.figuras-som { display: flex; gap: clamp(12px, 2.5cqw, 30px); }
.btn-figura {
  width: clamp(110px, 22cqmin, 220px);
  height: clamp(110px, 22cqmin, 220px);
  border-radius: 28px;
  background: var(--branco);
  box-shadow: var(--sombra);
  padding: 14px;
}
.btn-figura svg { width: 100%; height: 100%; }
.btn-figura.certa { box-shadow: 0 0 0 6px #69db7c, var(--sombra); animation: pulo 0.7s ease-out; }
.balancando { animation: balancando 0.5s ease-in-out; }

/* ---------- Letrinhas: sílabas ---------- */
.silabas { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 18px 3cqw; align-items: center; }
.figura-silaba {
  grid-row: 1 / 3;
  width: clamp(130px, 26cqmin, 260px);
  aspect-ratio: 1;
  border-radius: 28px;
  background: var(--branco);
  box-shadow: var(--sombra);
  padding: 16px;
  opacity: 0.45;
  filter: grayscale(0.7);
  transition: opacity 0.4s, filter 0.4s;
}
.figura-silaba.revelada { opacity: 1; filter: none; animation: pulo 0.8s ease-out; }
.figura-silaba svg { width: 100%; height: 100%; }
.vagas-silaba, .pecas-silaba { display: flex; gap: 14px; }
.vaga-silaba {
  width: clamp(var(--alvo), 16cqmin, 150px);
  height: clamp(var(--alvo), 13cqmin, 120px);
  border-radius: 20px;
  border: 5px dashed #9cc3e6;
  display: grid;
  place-items: center;
  font-size: clamp(34px, 7cqmin, 64px);
  font-weight: 900;
  color: #1971c2;
}
.vaga-silaba.cheia { border-style: solid; border-color: #69db7c; background: #ebfbee; animation: pulo 0.5s ease-out; }
.peca-silaba {
  width: clamp(var(--alvo), 16cqmin, 150px);
  height: clamp(var(--alvo), 13cqmin, 120px);
  border-radius: 20px;
  background: var(--amarelo);
  box-shadow: var(--sombra);
  font-size: clamp(34px, 7cqmin, 64px);
  font-weight: 900;
  color: var(--azul-marinho);
}
.peca-silaba.usada { visibility: hidden; }
.peca-silaba.chamando { animation: pulo 0.8s ease-out 2; }

/* ---------- Números ---------- */
.ic-mini-grande { width: 62%; justify-self: start; align-self: start; }
.ic-mini-grande svg { width: 100%; height: auto; display: block; }
.ic-num { justify-self: end; align-self: end; font-size: clamp(26px, 6cqmin, 54px); font-weight: 900; color: #1971c2; }
.ic-amigo-esq { height: 80%; justify-self: start; align-self: end; }
.ic-amigo-dir { height: 62%; justify-self: end; align-self: end; }
.ic-dividir { display: flex; width: 90%; }
.ic-dividir svg { width: 50%; height: auto; }

.grupo { display: grid; grid-template-columns: repeat(5, auto); gap: 10px; justify-content: center; }
.grupo-poucos { grid-template-columns: repeat(3, auto); }
.objeto { position: relative; display: grid; place-items: center; width: clamp(48px, 9cqmin, 80px); height: clamp(48px, 9cqmin, 80px); }
.objeto svg { width: 100%; height: 100%; }
button.objeto {
  width: clamp(var(--alvo), 13cqmin, 120px);
  height: clamp(var(--alvo), 13cqmin, 120px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--sombra);
  padding: 10px;
}
button.objeto.contado { background: #fff3bf; box-shadow: 0 0 0 5px var(--amarelo), var(--sombra); animation: pulo 0.5s ease-out; }
button.objeto.contado::after {
  content: attr(data-n);
  position: absolute;
  right: -6px;
  top: -8px;
  min-width: 36px;
  height: 36px;
  border-radius: 18px;
  background: #1971c2;
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  display: grid;
  place-items: center;
}
.contar { display: flex; align-items: center; gap: clamp(16px, 4cqw, 60px); }
.numero-grande { min-width: 1ch; font-size: min(34cqh, 18cqw); font-weight: 900; color: #1971c2; line-height: 1; text-shadow: 0 4px 0 #fff; }
.numero-grande.entrou { animation: pulo 0.4s ease-out; }

.ligar { display: flex; align-items: center; gap: clamp(16px, 4cqw, 60px); }
.ligar .grupo { background: rgba(255, 255, 255, 0.7); border-radius: 26px; padding: 16px; }
.numeros-opcoes { display: flex; flex-direction: column; gap: 14px; }
.btn-numero {
  width: clamp(var(--alvo), 16cqmin, 140px);
  height: clamp(var(--alvo), 16cqmin, 140px);
  border-radius: 26px;
  background: var(--branco);
  box-shadow: var(--sombra);
  font-size: clamp(46px, 10cqmin, 90px);
  font-weight: 900;
  color: #e8590c;
}
.btn-numero.certa { box-shadow: 0 0 0 6px #69db7c, var(--sombra); animation: pulo 0.7s ease-out; }

.mais-menos { display: flex; gap: clamp(16px, 4cqw, 60px); align-items: stretch; }
.cartao-mais-menos {
  width: clamp(200px, 34cqw, 400px);
  border-radius: 28px;
  background: var(--branco);
  box-shadow: var(--sombra);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.cartao-mais-menos img { height: min(26cqh, 200px); }
.cartao-mais-menos .objeto { width: clamp(40px, 7cqmin, 64px); height: clamp(40px, 7cqmin, 64px); }
.cartao-mais-menos.certa { box-shadow: 0 0 0 6px #69db7c, var(--sombra); }

.dividir { display: flex; flex-direction: column; align-items: center; gap: 2cqh; width: 100%; }
.pratos { display: flex; gap: clamp(20px, 8cqw, 120px); }
.prato-amigo { position: relative; display: flex; flex-direction: column; align-items: center; width: clamp(200px, 30cqw, 340px); }
.prato-amigo img { height: min(24cqh, 190px); }
.prato-desenho { width: 100%; margin-top: -8px; }
.prato-desenho svg { width: 100%; height: auto; display: block; }
.prato-amigo.recebeu { animation: pulo 0.5s ease-out; }
.morangos-no-prato { position: absolute; bottom: 8%; left: 10%; right: 10%; display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; }
.morangos-no-prato .morango-solto { width: var(--alvo); height: var(--alvo); background: none; box-shadow: none; }
.tigela-morangos { display: flex; gap: 12px; min-height: var(--alvo); padding: 8px 16px; border-radius: 30px; background: rgba(255, 255, 255, 0.6); }
.morango-solto {
  width: clamp(var(--alvo), 12cqmin, 110px);
  height: clamp(var(--alvo), 12cqmin, 110px);
  border-radius: 22px;
  background: var(--branco);
  box-shadow: var(--sombra);
  padding: 8px;
  touch-action: none;
}
.morango-solto svg { width: 100%; height: 100%; }

/* ---------- celular em pé: a tela se rearruma ---------- */
@media (orientation: portrait) {
  .balao { top: calc(var(--topo) + 4px); left: 12px; right: 12px; transform: none; max-width: none; }
  .turma-escolinha { width: 100cqw; height: 40cqh; left: 0; }
  .turma-escolinha .gemalino-menu { left: 50%; transform: translateX(-50%); height: 90%; }
  .lugares { left: 16px; right: 16px; top: calc(var(--topo) + 80px); bottom: 42cqh; --lg: clamp(var(--alvo), 26cqw, 160px); }
  .modulo { left: 16px; top: calc(var(--topo) + 90px); bottom: calc(var(--alvo) + 20px); }
  .vogais, .tracar, .som-inicial { flex-direction: column; height: auto; }
  .fila-letras { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .cartao-letra { height: auto; width: 100%; max-width: none; }
  .letra-grande { font-size: 30cqw; }
  .folha { height: auto; width: min(100%, calc((100cqh - var(--topo) - 300px) / 1.2)); max-width: none; }
  .tracar-lado { flex-direction: row; }
  .figuras-som { flex-direction: row; gap: 10px; }
  .btn-figura { width: calc((100cqw - 64px) / 3); height: calc((100cqw - 64px) / 3); min-width: var(--alvo); min-height: var(--alvo); padding: 8px; }
  .silabas { grid-template-columns: auto; justify-items: center; }
  .figura-silaba { grid-row: auto; }
  .cartao-amigo { width: 40cqw; height: 30cqh; }
  .contar, .ligar { flex-direction: column; }
  .grupo, .grupo-muitos { grid-template-columns: repeat(3, auto); gap: 8px; }
  button.objeto { width: 90px; height: 90px; padding: 6px; }
  .numeros-opcoes { flex-direction: row; }
  .numero-grande { font-size: 16cqh; }
  .mais-menos { flex-direction: column; }
  .cartao-mais-menos { width: 100%; flex-direction: row; justify-content: center; }
  .cartao-mais-menos img { height: 16cqh; }
  .prato-amigo { width: 44cqw; }
  .prato-amigo img { height: 14cqh; }
  .morangos-no-prato .morango-solto { width: 90px; height: 90px; }
  .morangos-no-prato { bottom: -30%; }
  .tigela-morangos { flex-wrap: wrap; justify-content: center; }
}

/* ---------- celular deitado (telas baixas) ---------- */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --btn: 90px; --topo: 100px; }
  .balao { max-width: 40cqw; font-size: 16px; padding: 8px 14px; }
  .lugares { --lg: 110px; top: 100px; }
  .modulo { top: 100px; bottom: 6px; }
  .btn-atividade { width: 120px; height: 120px; }
  .fila-letras { gap: 4px; }
  .btn-letra { width: 90px; height: 54px; font-size: 32px; }
  .btn-letra { min-height: var(--alvo); height: var(--alvo); }
  .fila-letras { display: grid; grid-template-columns: repeat(2, 90px); }
  .cartao-amigo { height: 260px; min-height: 0; width: 150px; }
  .btn-figura { width: 150px; height: 150px; }
  .figura-silaba { width: 150px; }
  button.objeto { width: 90px; height: 90px; padding: 6px; }
  .grupo { gap: 6px; }
  .ligar .grupo { padding: 8px; }
  .ligar .objeto { width: 38px; height: 38px; }
  .numeros-opcoes { gap: 8px; }
  .btn-numero { width: 90px; height: 90px; }
  .numeros-opcoes { flex-direction: row; }
  .ligar { flex-direction: column; gap: 10px; }
  .cartao-mais-menos { flex-direction: row; padding: 8px; }
  .cartao-mais-menos img { height: 150px; }
  .cartao-mais-menos .objeto { width: 34px; height: 34px; }
  .dividir { flex-direction: row; gap: 12px; }
  .pratos { gap: 12px; }
  .prato-amigo { width: 190px; }
  .prato-amigo img { height: 120px; }
  .tigela-morangos { display: grid; grid-template-columns: repeat(2, 90px); gap: 6px; padding: 6px; }
  .tigela-morangos .morango-solto { width: 90px; height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .gemalino-danca.dancando { animation: danca 1.2s ease-in-out infinite !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Revisão de design: no computador e no tablet deitado, tudo maior ---------- */
@media (orientation: landscape) and (min-height: 501px) {
  .btn-atividade { width: clamp(110px, 28cqmin, 240px); height: clamp(110px, 28cqmin, 240px); }
  .btn-ouvir { width: clamp(var(--alvo), 18cqmin, 160px); height: clamp(var(--alvo), 18cqmin, 160px); font-size: clamp(44px, 9cqmin, 80px); }
  .btn-figura { width: clamp(130px, 30cqmin, 280px); height: clamp(130px, 30cqmin, 280px); }
  .figura-silaba { width: clamp(150px, 36cqmin, 320px); }
  .vaga-silaba, .peca-silaba { width: clamp(var(--alvo), 20cqmin, 180px); height: clamp(var(--alvo), 16cqmin, 140px); font-size: clamp(40px, 9cqmin, 80px); }
  button.objeto { width: clamp(var(--alvo), 16cqmin, 140px); height: clamp(var(--alvo), 16cqmin, 140px); }
  .ligar .objeto { width: clamp(48px, 11cqmin, 96px); height: clamp(48px, 11cqmin, 96px); }
  .btn-numero { width: clamp(var(--alvo), 18cqmin, 160px); height: clamp(var(--alvo), 18cqmin, 160px); }
  .cartao-mais-menos .objeto { width: clamp(40px, 8cqmin, 72px); height: clamp(40px, 8cqmin, 72px); }
}

/* ---------- Emoções ---------- */
.lugar-img { width: 100%; height: 100%; object-fit: contain; }
.ic-emo { width: 92%; height: 92%; object-fit: contain; }
.ic-cena { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.ic-bolinha { width: 56%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d0ebff, #74c0fc); box-shadow: 0 0 0 8px rgba(116, 192, 252, 0.3); }
.ic-coracao { justify-self: end; align-self: end; font-size: clamp(30px, 6cqmin, 54px); }
.ic-espelho { font-size: clamp(60px, 14cqmin, 130px); }

.cartao-emocao {
  height: min(100%, 58cqh);
  aspect-ratio: 0.9;
  border-radius: 32px;
  background: radial-gradient(circle at 50% 40%, #fff 0 40%, color-mix(in srgb, var(--cor) 45%, #fff));
  box-shadow: var(--sombra), inset 0 0 0 8px var(--cor);
  display: grid;
  place-items: center;
  padding: 6%;
  flex-shrink: 1;
  min-height: 0;
}
.cartao-emocao img { width: 100%; height: 100%; object-fit: contain; }
.cartao-emocao.entrou { animation: pulo 0.6s ease-out; }

.fila-emocoes { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(10px, 2cqmin, 20px); }
.btn-emocao {
  width: clamp(var(--alvo), 15cqmin, 140px);
  height: clamp(calc(var(--alvo) + 24px), 19cqmin, 172px);
  border-radius: 26px;
  background: var(--branco);
  box-shadow: var(--sombra), inset 0 -6px 0 var(--cor);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
}
.btn-emocao svg { width: 78%; height: auto; }
.btn-emocao span { font-size: clamp(15px, 2.4cqmin, 22px); font-weight: 800; }
.btn-emocao.certa { box-shadow: 0 0 0 6px #69db7c, var(--sombra); animation: pulo 0.7s ease-out; }

.emocoes-rosto, .emocoes-ajuda, .emocoes-espelho { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 4cqw, 60px); height: 100%; width: 100%; }
.emocoes-rosto .fila-emocoes { max-width: 46cqw; }
.emocoes-situacao { display: flex; flex-direction: column; align-items: center; gap: 2cqh; height: 100%; width: 100%; }
.cena-emocao { flex: 1 1 auto; min-height: 0; max-width: 100%; object-fit: contain; border-radius: 24px; border: 6px solid var(--branco); box-shadow: var(--sombra); }

.palco-ajuda { width: clamp(140px, 24cqmin, 240px); aspect-ratio: 1; display: grid; place-items: center; }
.opcoes-ajuda { display: flex; flex-direction: column; gap: 14px; }
.btn-ajuda {
  width: clamp(var(--alvo), 16cqmin, 140px);
  height: clamp(var(--alvo), 16cqmin, 140px);
  border-radius: 50%;
  background: var(--branco);
  box-shadow: var(--sombra);
  font-size: clamp(44px, 9cqmin, 80px);
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
}
.btn-ajuda img { width: 100%; height: 100%; object-fit: contain; }
.btn-ajuda .ic-bolinha { width: 70%; }
.bolinha-respirar {
  width: 40%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e7f5ff, #4dabf7);
  box-shadow: 0 0 0 14px rgba(77, 171, 247, 0.25);
  transition: transform 4s ease-in-out;
}
.bolinha-respirar.crescendo { transform: scale(2.2); }
.bolinha-respirar.diminuindo { transform: scale(1); }
.cena-ajuda { display: grid; place-items: center; animation: pulo 0.8s ease-out; }
.ajuda-grande { font-size: clamp(90px, 20cqmin, 180px); line-height: 1; }
.coracoes { font-size: clamp(28px, 5cqmin, 48px); animation: pulo 1s ease-out infinite; }
.ajuda-galinha { height: clamp(140px, 26cqmin, 260px); }

.espelho-lado { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.selo-adulto { font-size: clamp(40px, 8cqmin, 72px); background: var(--branco); border-radius: 24px; padding: 8px 16px; box-shadow: var(--sombra); }

@media (orientation: portrait) {
  .emocoes-rosto, .emocoes-ajuda, .emocoes-espelho { flex-direction: column; gap: 14px; }
  .emocoes-rosto .fila-emocoes { max-width: none; }
  .cartao-emocao { height: 36cqh; }
  .btn-emocao { width: calc((100cqw - 64px) / 3); }
  .opcoes-ajuda { flex-direction: row; }
  .palco-ajuda { width: 30cqw; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .cartao-emocao { height: 100%; }
  .btn-emocao { width: 96px; height: 118px; }
  .btn-emocao svg { width: 60%; }
  .emocoes-rosto .fila-emocoes { max-width: 52cqw; }
  .emocoes-situacao { flex-direction: row; }
  .emocoes-situacao .fila-emocoes { display: grid; grid-template-columns: repeat(3, 96px); }
  .cena-emocao { max-height: 100%; max-width: 44cqw; }
  .palco-ajuda { width: 140px; }
  .btn-ajuda { width: 90px; height: 90px; }
  .opcoes-ajuda { flex-direction: row; }
  .emocoes-ajuda { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .bolinha-respirar { transition-duration: 4s !important; }
}

/* ===== Diretriz "nada invade a tela" (CLAUDE.md, seção 12): celular deitado baixo (750 x 351) =====
   O balão fica à esquerda e com até 2 linhas (a seta de voltar ocupa o canto de cima à direita) e as atividades
   começam logo abaixo dele; as vogais passam para 3 colunas e o cartão do amigo cabe na altura que sobra. */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --topo: 68px; }
  .balao { top: 8px; left: 12px; transform: none; max-width: calc(100cqw - var(--alvo) - 44px); font-size: 15px; padding: 4px 12px 4px 4px; }
  .lugares { top: 68px; }
  .modulo { top: 68px; bottom: 6px; }
  .fila-letras { grid-template-columns: repeat(3, 90px); }
  /* vogais: letras (3 colunas) + cartão da letra + setinha cabem na largura, sem empurrar a setinha para fora */
  .cartao-letra { width: calc(100cqw - 4 * var(--alvo) - 8px - 6cqw - 12px); height: auto; max-width: none; }
  /* amigos: os 5 cartões cabem em UMA fileira (antes quebrava e a de baixo passava do rodapé) */
  .amigos-letras { flex-wrap: nowrap; gap: 8px; padding-top: 34px; } /* abaixo da seta de voltar (canto de cima à direita) */
  .cartao-amigo { flex: 1 1 0; min-width: 0; max-width: 150px; width: auto; height: min(260px, calc(100cqh - 112px)); }
}
