/* Gemalino e a IA — visual das fases 2 a 9 (a base fica em estilo.css). */
[hidden] { display: none !important; }

/* medidor "o que o Bip aprendeu" e botão da caixa do Bip */
.medidor {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 6px;
  background: var(--branco); border-radius: 999px; box-shadow: var(--sombra); font-size: clamp(14px, 1.7vw, 18px); font-weight: bold;
}
.medidor-bip { flex: 0 0 40px; height: 40px; display: grid; place-items: center; }
.medidor-bip svg { height: 100%; width: auto; }
.medidor-barra { flex: 1; min-width: 60px; height: 18px; background: #dfe8ee; border-radius: 999px; overflow: hidden; }
.medidor-barra i { display: block; height: 100%; width: 0; background: var(--menta-escura); border-radius: 999px; transition: width 0.5s; }
.medidor-texto { white-space: nowrap; }
.botao-caixa {
  min-height: var(--alvo); padding: 0 20px; border: 0; border-radius: 999px; background: var(--menta);
  font-size: clamp(15px, 1.8vw, 19px); font-weight: bold; box-shadow: var(--sombra); white-space: nowrap;
}
.caixa-conteudo p { font-size: 19px; line-height: 1.35; margin: 0 0 10px; }
.caixa-vazia { color: #50606f; }
.caixa-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.caixa-coluna { background: #eef7fb; border-radius: 16px; padding: 8px 10px; min-height: 80px; }
.caixa-coluna h3, .caixa-coluna h4 { margin: 0 0 6px; font-size: 17px; color: var(--azul); }
.caixa-minis { display: flex; flex-wrap: wrap; gap: 4px; }
.caixa-minis .f1-mini { background: #fff; }

/* fase 2 */
.f2, .f3 { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.f2-topo { display: flex; align-items: center; gap: 10px; }
.f2-area { flex: 1; }
.f2-cesta-a { background: #e57373; }
.f2-cesta-b { background: #66bb6a; }
.botao-tentar { align-self: center; }
.f2-prova { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2vw; min-height: 0; }
.f2-prova-bip { flex: 0 1 150px; height: 70%; display: grid; place-items: center; }
.f2-prova-bip svg { height: 100%; width: auto; max-width: 100%; }
.f2-cartao {
  flex: 0 1 200px; align-self: stretch; max-height: 280px; margin: auto 0; background: var(--branco); border-radius: var(--raio);
  box-shadow: var(--sombra); border: 5px solid transparent; padding: 8px; display: flex; flex-direction: column; align-items: center; min-height: 0;
}
.f2-cartao-figura { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.f2-cartao-figura svg { height: 100%; width: auto; max-width: 100%; }
.f2-palpite { margin: 4px 0 0; font-size: clamp(16px, 2vw, 21px); font-weight: bold; }
.f2-cartao.certo { border-color: var(--vivo); }
.f2-cartao.errado { border-color: #ffb74d; background: #fff6e5; }

/* fase 3 */
.f3-meio { flex: 1; display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; min-height: 0; }
.f3-bip {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 4px; min-height: 0; padding: 8px;
  background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); border: 5px solid transparent;
}
.f3-bip.errado { border-color: #ffb74d; }
.f3-bip.certo { border-color: var(--vivo); }
.f3-bip-figura, .f3-pequeno { min-height: 0; display: grid; place-items: center; }
.f3-bip-figura svg, .f3-pequeno svg { height: 100%; width: auto; max-width: 100%; max-height: 190px; }
.f3-palpite { grid-column: 1 / -1; margin: 0; text-align: center; font-weight: bold; font-size: clamp(16px, 2vw, 21px); min-height: 1.3em; }
.f3-caixa { background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); padding: 8px 12px; min-height: 0; overflow: auto; }
.f3-caixa h3 { margin: 0 0 6px; color: var(--azul); font-size: 18px; }
.f3-acao { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: var(--alvo); }
.f3-exemplo {
  width: 92px; height: 92px; border: 4px solid var(--menta-escura); border-radius: 18px; background: var(--branco); box-shadow: var(--sombra); padding: 4px;
}
.f3-exemplo svg { width: 100%; height: 100%; }
.f3-exemplo.usado { opacity: 0.35; }

/* fase 4 */
.f4 { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; gap: 10px; min-height: 0; }
.f4-frase {
  margin: 0; min-height: 64px; width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); padding: 8px 14px; font-size: clamp(20px, 2.8vw, 30px); font-weight: bold;
}
.f4-palavra { background: #e6fbf4; border-radius: 10px; padding: 2px 8px; }
.f4-reticencias { background: none; color: var(--menta-escura); }
.f4-opcoes { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.f4-palpite {
  min-height: var(--alvo); min-width: 190px; border: 0; border-radius: 18px; background: var(--amarelo); color: var(--azul); box-shadow: var(--sombra);
  padding: 8px 16px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; font-size: clamp(18px, 2.3vw, 24px); font-weight: bold;
}
.f4-barra { height: 14px; background: rgba(255, 255, 255, 0.7); border-radius: 999px; overflow: hidden; }
.f4-barra i { display: block; height: 100%; background: var(--azul); border-radius: 999px; }
.f4-rodape { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; min-height: var(--alvo); }
.f4-contagem-linha { display: flex; gap: 12px; align-items: center; font-size: 20px; padding: 3px 0; }
.f4-contagem-palavra { flex: 0 0 150px; font-weight: bold; }
.f4-bolinhas { color: var(--menta-escura); letter-spacing: 2px; }

/* fases 5 e 7 */
.f5, .f7 { flex: 1; display: grid; grid-template-columns: minmax(110px, 0.6fr) 2fr; gap: 14px; align-items: center; min-height: 0; }
.f5-bip, .f7-bip { height: 100%; min-height: 0; display: grid; place-items: center; }
.f5-bip svg, .f7-bip svg { height: 100%; max-height: 300px; width: auto; max-width: 100%; }
.f5-direita, .f7-conversa { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 0; height: 100%; }
.f5-fala, .f7-pergunta {
  margin: 0; background: #e6fbf4; border: 4px solid var(--menta-escura); border-radius: var(--raio); padding: 8px 18px;
  font-size: clamp(20px, 2.8vw, 30px); font-weight: bold; text-align: center;
}
.f5-livro { display: flex; align-items: center; gap: 12px; background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); padding: 8px 16px; min-height: 0; }
.f5-livro-figura { flex: 0 0 auto; height: clamp(70px, 20vh, 150px); display: grid; place-items: center; }
.f5-livro-figura img, .f5-livro-figura svg { height: 100%; width: auto; }
.f5-livro-texto { font-size: clamp(17px, 2.2vw, 23px); }
.f5-livro-texto p { margin: 2px 0 0; }
.f5-botoes, .f7-botoes, .f9-botoes { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; min-height: var(--alvo); }
.f5-seguir, .f9-seguir { min-width: 110px; font-size: 30px; }
.f7-resposta { margin: 0; align-self: flex-end; background: var(--amarelo); border-radius: var(--raio); padding: 6px 18px; font-size: clamp(18px, 2.3vw, 24px); font-weight: bold; }
.f7-segredo { background: #ffe1e1; }

/* fase 6 */
.f6 { flex: 1; display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; min-height: 0; }
.f6-quadros { position: relative; min-height: 0; display: grid; place-items: center; }
.f6-moldura { max-width: 100%; max-height: 100%; aspect-ratio: 16 / 9; border: 8px solid #c89b6d; border-radius: 14px; background: #fff; box-shadow: var(--sombra); overflow: hidden; }
.f6-canvas, .f6-queria canvas { width: 100%; height: 100%; display: block; }
.f6-queria {
  position: absolute; top: 6px; right: 6px; width: 34%; background: var(--branco); border-radius: 12px; padding: 4px 6px 6px; box-shadow: var(--sombra);
  font-size: 13px; font-weight: bold; text-align: center;
}
.f6-queria canvas { border-radius: 8px; height: auto; }
.f6-painel { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 0; }
.f6-blocos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f6-bloco {
  min-height: var(--alvo); border: 4px dashed var(--menta-escura); border-radius: 18px; background: var(--branco); padding: 4px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.f6-bloco.escolhido { border-style: solid; background: #e6fbf4; }
.f6-bloco-titulo { font-size: 14px; color: #50606f; font-weight: bold; }
.f6-bloco-valor { font-size: clamp(17px, 2vw, 22px); font-weight: bold; }
.f6-acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.f6-vago { align-self: center; }
.f6-escolhas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.f6-escolha {
  width: 150px; min-height: 130px; border: 4px solid var(--menta-escura); border-radius: 18px; background: #fff; padding: 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 18px; font-weight: bold;
}
.f6-escolha-figura { height: 84px; width: 100%; display: grid; place-items: center; }
.f6-escolha-figura img, .f6-escolha-figura svg { max-height: 84px; max-width: 100%; width: auto; height: 100%; border-radius: 8px; }
.f6-emoji { font-size: 56px; }

/* fase 8 */
.f8 { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 0; }
.f8-pergunta { margin: 0; font-size: clamp(18px, 2.4vw, 26px); font-weight: bold; background: var(--branco); padding: 4px 18px; border-radius: 999px; }
.f8-dupla { flex: 1; min-height: 0; display: flex; gap: 4vw; justify-content: center; align-items: stretch; width: 100%; }
.f8-figura {
  flex: 0 1 320px; min-height: 0; border: 6px solid #fff; border-radius: var(--raio); background: #fdfbf3; box-shadow: var(--sombra); padding: 8px;
  display: grid; place-items: center;
}
.f8-figura svg { height: 100%; width: auto; max-width: 100%; }
.f8-figura .detalhe { display: none; }
.f8-figura.revelado { border-color: #ff7043; }
.f8-figura.revelado .detalhe { display: inline; }

/* fase 9 */
.f9 { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 0; }
.f9-cartao {
  width: min(100%, 760px); background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); border: 6px solid transparent;
  padding: 10px 22px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center;
}
.f9-cartao.bom { border-color: var(--vivo); }
.f9-cartao.nao { border-color: #ffb74d; }
.f9-icone { font-size: clamp(44px, 9vh, 72px); grid-row: span 2; }
.f9-texto { margin: 0; font-size: clamp(19px, 2.6vw, 28px); font-weight: bold; }
.f9-explica { margin: 0; font-size: clamp(17px, 2.2vw, 23px); grid-column: 2; }
.f9-cartaz { flex: 1; min-height: 0; display: flex; align-items: center; gap: 2vw; }
.f9-cartaz-figuras { display: flex; align-items: flex-end; height: min(48vh, 320px); }
.f9-cartaz-figuras img { height: 100%; width: auto; }
.f9-cartaz-figuras svg { height: 55%; width: auto; }
.f9-cartaz-lista { background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); padding: 8px 18px; max-width: 640px; }
.f9-cartaz-lista h2 { margin: 0 0 4px; color: var(--azul); font-size: clamp(19px, 2.4vw, 26px); }
.f9-cartaz-lista ol { list-style: none; margin: 0; padding: 0; }
.f9-cartaz-lista li { display: flex; gap: 10px; align-items: center; font-size: clamp(14px, 1.8vw, 19px); padding: 3px 0; }
.f9-regra-icone { font-size: 1.5em; }

@media (max-height: 460px) {
  .f2, .f3 { gap: 5px; }
  .medidor-bip { flex-basis: 30px; height: 30px; }
  .botao-caixa { padding: 0 14px; }
  .f3-exemplo { width: 80px; height: 80px; }
  .f3-caixa h3 { display: none; }
  .f4 { gap: 4px; }
  .f4-frase { min-height: 48px; font-size: 20px; padding: 4px 10px; }
  .f5-fala, .f7-pergunta { font-size: 19px; padding: 4px 12px; }
  .f5-livro { padding: 4px 10px; }
  .f5-livro-figura { height: 56px; }
  .f5-direita, .f7-conversa { gap: 5px; }
  .f6-queria { font-size: 11px; }
  .f6-painel { gap: 6px; }
  .f9 { gap: 6px; }
  .f9-cartao { padding: 6px 14px; }
  .f9-cartaz-figuras { height: 44vh; }
  .caixa-conteudo p { font-size: 16px; }
  .f6-escolha { width: 120px; min-height: 100px; }
  .f6-escolha-figura { height: 60px; }
  .f6-escolha-figura img, .f6-escolha-figura svg { max-height: 60px; }
}

/* ajustes */
.f3 > .medidor { flex: 0 0 auto; }
.caixa-conteudo > p:first-child { margin-right: 84px; }
.f6-acoes { flex-wrap: nowrap; }
.f6-acoes .botao-acao { min-width: 0; flex: 1 1 0; padding: 0 12px; white-space: nowrap; }
.f5-livro { max-width: 100%; }
.f5-livro-figura { height: auto; }
.f5-livro-figura img, .f5-livro-figura svg { height: clamp(64px, 20vh, 150px); width: auto; max-width: 30vw; object-fit: contain; }
.f5-livro-texto { flex: 1 1 auto; min-width: 0; }
.f6-queria { width: 28%; }
@media (max-height: 460px) {
  .f5-livro-figura img, .f5-livro-figura svg { height: 60px; }
}
.f7-botoes .f7-contar { min-width: 124px; padding: 0 14px; }
@media (max-height: 460px) {
  .f7-botoes { gap: 6px; }
  .f7-segredo { font-size: 17px; }
}

.f6-moldura { position: relative; }
.f6-queria { top: 4px; right: 4px; }
