/* Ache Escondido — visual próprio (prefixo ae-). Nada pisca rápido; o brilho da dica é lento. */
:root { --tema: #7cc35a; --tema-escuro: #3f8a2c; }

/* ---------- mapa ---------- */
.palco.ae-menu { align-items: center; gap: 14px; }
.ae-mapa {
  flex: 1; height: 100%; overflow-y: auto; display: grid; gap: 14px; align-content: start;
  grid-template-columns: repeat(4, 1fr); padding: 4px;
}
.ae-lugar {
  position: relative; min-height: 150px; border: 0; border-radius: var(--raio); padding: 8px;
  background: var(--branco); box-shadow: var(--sombra); display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.ae-lugar .ae-mini { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; }
.ae-lugar strong { font-size: 22px; color: var(--azul); }
.ae-estrelas { font-size: 24px; color: #e0a400; letter-spacing: 2px; }
.ae-fechado .ae-mini { filter: grayscale(1) opacity(0.5); }
.ae-brilho-cena { position: absolute; top: 10px; right: 12px; font-size: 26px; }
.ae-botao-medalhas { align-self: center; font-size: 40px; flex: 0 0 auto; }

/* ---------- níveis ---------- */
.palco.ae-niveis { align-items: center; gap: 3vw; }
.ae-nivel {
  width: min(28vw, 260px); min-height: 170px; border: 0; border-radius: var(--raio); background: var(--branco);
  box-shadow: var(--sombra); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 19px;
}
.ae-nivel strong { font-size: 28px; color: var(--azul); }
.ae-pontos { color: var(--tema-escuro); font-size: 22px; letter-spacing: 3px; }
.ae-nivel-medio .ae-pontos { color: #e0a400; }
.ae-nivel-dificil .ae-pontos { color: #d6453d; }

/* ---------- cena ---------- */
.palco.ae-palco-cena {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto; gap: 8px;
}
.ae-caixa-cena { grid-column: 1; grid-row: 1; min-height: 0; min-width: 0; display: flex; align-items: center; justify-content: center; }
.ae-cena {
  max-width: 100%; max-height: 100%; width: 100%; height: 100%; border-radius: 18px; background: #d9f2ff;
  box-shadow: var(--sombra); touch-action: none; cursor: pointer;
}
.ae-cena.ae-com-zoom { cursor: grab; outline: 6px solid var(--amarelo); }
.ae-botoes { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.ae-botoes .botao-redondo { font-size: 38px; }
.ae-lupa[aria-pressed="true"] { background: var(--amarelo); }
.ae-barra {
  grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: center; gap: 6px; flex-wrap: nowrap;
  background: var(--branco); border-radius: 18px; box-shadow: var(--sombra); padding: 4px 8px; min-height: 76px;
}
.ae-item { flex: 0 1 68px; min-width: 40px; height: 68px; display: grid; place-items: center; cursor: pointer; }
.ae-item svg { width: 100%; height: 100%; }

.ae-objeto { transition: opacity 0.4s; }
.ae-achado { filter: drop-shadow(0 0 10px #fff59d); }
.ae-achou { fill: none; stroke: #ffd54f; stroke-width: 12; opacity: 0.9; animation: ae-anel 1.2s ease-out forwards; }
.ae-dica-brilho { fill: #fff59d; stroke: #ffd54f; stroke-width: 10; opacity: 0.35; pointer-events: none; animation: ae-respira 2.4s ease-in-out infinite; }
.ae-toque { fill: #ffffff; opacity: 0.5; pointer-events: none; animation: ae-some 0.7s ease-out forwards; }
.ae-brilhos { pointer-events: none; }
@keyframes ae-anel { from { stroke-width: 20; opacity: 1; } to { stroke-width: 6; opacity: 0.6; } }
@keyframes ae-respira { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.6; } }
@keyframes ae-some { to { opacity: 0; } }

/* ---------- medalhas ---------- */
.palco.ae-medalhas { align-items: center; }
.ae-grade-medalhas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; width: 100%; max-height: 100%; overflow-y: auto; padding: 4px; }
.ae-medalha {
  min-height: 110px; border: 0; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 17px; opacity: 0.6;
}
.ae-medalha.ae-ganha { opacity: 1; background: #fff4c2; }
.ae-medalha-icone { font-size: 40px; }

/* ---------- fim ---------- */
.palco.ae-fim { flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; overflow: hidden; }
.ae-fim h2 { margin: 0; font-size: clamp(28px, 4vw, 44px); color: var(--azul); }
.ae-fim-estrelas { font-size: clamp(40px, 7vw, 72px); color: #e0a400; letter-spacing: 6px; line-height: 1; }
.ae-fim-medalhas { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 19px; }
.ae-fim-medalhas span { background: #fff4c2; border-radius: 999px; padding: 4px 14px; }
.ae-torcida { display: flex; gap: 12px; }
.ae-torcida img { height: clamp(60px, 14vh, 130px); width: auto; }
.ae-fim-botoes { display: flex; gap: 14px; }
.ae-confete { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ae-confete span {
  position: absolute; top: -20px; width: 12px; height: 18px; border-radius: 3px; opacity: 0.9;
  animation: ae-cai 4.5s linear forwards;
}
@keyframes ae-cai { to { transform: translateY(110vh) rotate(540deg); opacity: 0.6; } }

@media (prefers-reduced-motion: reduce) {
  .ae-dica-brilho { animation: none; opacity: 0.45; }
  .ae-achou, .ae-toque { animation: none; }
  .ae-confete { display: none; }
}

/* ---------- tela baixa (celular deitado) ---------- */
@media (max-height: 500px) {
  .ae-barra { min-height: 54px; padding: 2px 6px; }
  .ae-item { height: 50px; flex-basis: 50px; min-width: 32px; }
  .ae-mapa { gap: 8px; }
  .ae-lugar { min-height: 0; padding: 4px; gap: 0; }
  .ae-lugar .ae-mini { width: auto; height: 58px; }
  .ae-lugar strong { font-size: 15px; line-height: 1.1; }
  .ae-estrelas { font-size: 16px; }
  .ae-nivel { min-height: 140px; }
  .ae-torcida { display: none; }
  .ae-medalha { min-height: 92px; font-size: 14px; }
  .ae-medalha-icone { font-size: 28px; }
  .ae-grade-medalhas { gap: 8px; }
}

/* nome escrito no botão das medalhas */
.ae-botao-medalhas { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; border-radius: 22px; width: auto; padding: 4px 10px; }
.rotulo-botao { display: block; font-size: 13px; font-weight: 700; color: #1f3b57; pointer-events: none; }
.ae-botao-medalhas { min-width: var(--alvo); min-height: var(--alvo); } /* com o nome escrito, não pode ficar menor que o alvo */
