/* Esconde-Esconde na Fazenda — visual próprio do jogo (o comum está em base.css). Prefixo esc-.
   Nada pisca: o único brilho é lento (2 s) e para com "menos movimento". */
:root { --tema: #a5c46a; --tema-escuro: #6f8f3a; --laranja: #f07c18; }

/* ---------- telas de escolher ---------- */
.esc-escolha {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; align-content: center; justify-content: center;
  overflow-y: auto; touch-action: pan-y;
}
.esc-opcao {
  position: relative; min-width: var(--alvo); min-height: var(--alvo); 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; padding: 6px; overflow: hidden;
}
.esc-opcao:active { transform: translateY(3px); }
.esc-legenda { font-size: clamp(16px, 2.1vw, 22px); font-weight: bold; color: var(--azul); line-height: 1.15; }
.esc-icone { font-size: clamp(26px, 5vh, 44px); line-height: 1; }
.esc-figuras { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: clamp(34px, 22vh, 150px); }
.esc-figuras img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }

.esc-modo { flex: 1 1 0; max-width: 360px; height: min(100%, 330px); border: 5px solid var(--tema); }

.esc-cenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(var(--alvo), 1fr); }
.esc-cenario { height: 100%; width: 100%; padding: 0; justify-content: flex-end; border: 5px solid var(--branco); }
.esc-mini { position: absolute; inset: 0; }
.esc-mini svg { width: 100%; height: 100%; display: block; }
.esc-cenario .esc-mini svg { transform: scale(1.02); }
.esc-cenario .esc-legenda { position: relative; margin: 0 0 6px; padding: 2px 12px; background: rgba(255, 253, 247, 0.92); border-radius: 999px; }
.esc-estrela { position: absolute; top: 4px; right: 8px; font-size: 26px; text-shadow: 0 0 4px #fff; }

.esc-linha { flex-wrap: nowrap; }
.esc-linha .esc-opcao { flex: 1 1 0; max-width: 220px; height: min(100%, 250px); }
.esc-quantos.preferido { outline: 5px solid var(--laranja); outline-offset: -5px; }
.esc-numerao { font-size: clamp(30px, 8vh, 64px); font-weight: bold; color: var(--laranja); line-height: 1; }
.esc-quantos .esc-figuras { height: auto; flex-wrap: wrap; width: 100%; }
.esc-quantos .esc-figuras img { height: clamp(30px, 15vh, 86px); max-width: 46%; }
.esc-figuras.esc-arbusto { height: clamp(60px, 40vh, 220px); width: 80%; }
.esc-arbusto svg { height: 100%; width: 100%; }
.esc-modo .esc-icone { font-size: clamp(30px, 7vh, 56px); }
.esc-quem img { height: 86%; width: 100%; object-fit: contain; }

/* ---------- a cena ---------- */
.esc-jogo { display: flex; gap: 8px; align-items: stretch; }
.esc-janela {
  scroll-behavior: smooth;
  flex: 1 1 auto; min-width: 0; display: flex; overflow: auto; touch-action: pan-x pan-y; border-radius: 18px;
  overscroll-behavior: contain;
}
.esc-cena {
  position: relative; flex: none; margin: auto; border-radius: 18px; overflow: hidden; box-shadow: var(--sombra);
  border: 4px solid var(--branco); container-type: size; background: #9fdcff;
}
.esc-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.esc-camada { position: absolute; inset: 0; }
.esc-lugar {
  position: absolute; padding: 0; border: 0; border-radius: 14px; background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.esc-lugar:focus-visible { outline: 4px solid var(--azul); outline-offset: -4px; }
.esc-lugar.mexe { animation: esc-toque 0.6s ease-out; }
.esc-lugar.olhando { background: rgba(255, 255, 255, 0.32); }
.esc-lugar.esc-brilha { outline: 4px dashed #ffd54f; outline-offset: -4px; animation: esc-brilho 2s ease-in-out infinite; }
.esc-lugar.achado { cursor: default; }
.esc-escondendo .esc-lugar:not(.achado) { cursor: copy; }
.esc-contando .esc-lugar { cursor: default; }

/* o amigo achado sai do esconderijo (sobe um pouco, sem girar e sem espelhar) */
.esc-amigo { transition: transform 0.5s ease-out; }
.esc-amigo.saiu { transform: translateY(var(--saida, 0px)); }
.esc-amigo.saiu.de-lado { transform: translateX(var(--lado, 0px)); }

/* termômetro do quente e frio */
.esc-termo {
  position: absolute; width: 5%; aspect-ratio: 24 / 60; translate: -50% 0; pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); animation: entra 0.25s ease-out;
}
.esc-termo svg { width: 100%; height: 100%; display: block; }
.faixa-frio .esc-termo-nivel { fill: #4a90d9; }
.faixa-morno .esc-termo-nivel { fill: #ffd54f; }
.faixa-quente .esc-termo-nivel { fill: #ff9f3a; }
.faixa-pelando .esc-termo-nivel { fill: #e53935; }

/* o Gemalino procurando (só anda para os lados; inclinar é o sinal de "pensando") */
.esc-gema {
  position: absolute; width: auto; pointer-events: none; z-index: 2;
  transition: left 0.7s ease-in-out, top 0.7s ease-in-out; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.2));
}
.esc-gema.pensando { rotate: -7deg; }
.esc-gema[hidden] { display: none; }
.esc-gema-lado.pensando { rotate: -7deg; }
.esc-gema-lado { width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }

/* a contagem: o número bem grande */
.esc-numero {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 3; pointer-events: none;
  min-width: 1.3em; text-align: center; font-size: 58cqh; font-weight: bold; line-height: 1.05; color: var(--laranja);
  background: rgba(255, 253, 247, 0.9); border-radius: 0.3em; padding: 0 0.15em; box-shadow: var(--sombra);
}
.esc-numero:empty { display: none; }
.esc-numero.pula { animation: esc-pula 0.3s ease-out; }

/* a coluna da direita */
.esc-lado {
  flex: 0 0 calc(var(--alvo) + 8px); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; position: relative; z-index: 2; min-height: 0;
}
.esc-rostos { display: flex; flex-direction: column; gap: 4px; align-items: center; height: 100%; justify-content: center; }
.esc-rosto {
  position: relative; flex: 0 1 60px; min-height: 30px; aspect-ratio: 1; border-radius: 50%; background: var(--branco);
  box-shadow: var(--sombra); display: grid; place-items: center; overflow: hidden; border: 3px solid #d7dde2;
}
.esc-rosto img { width: 84%; height: 84%; object-fit: contain; filter: grayscale(1); opacity: 0.45; }
.esc-rosto.achado { border-color: var(--tema-escuro); }
.esc-rosto.achado img { filter: none; opacity: 1; }
.esc-interrogacao { position: absolute; font-size: 26px; font-weight: bold; color: var(--azul); }
.esc-boneco {
  width: calc(var(--alvo) + 6px); height: calc(var(--alvo) + 6px); border-radius: 22px; background: var(--branco);
  box-shadow: var(--sombra); display: grid; place-items: center; cursor: grab; border: 4px dashed var(--laranja);
}
.esc-boneco img { width: 88%; height: 88%; object-fit: contain; pointer-events: none; }
.esc-boneco.arrastando { cursor: grabbing; z-index: 20; box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25); }
.esc-boneco:focus-visible { outline: 4px solid var(--azul); outline-offset: 3px; }
.esc-fim { display: flex; flex-direction: column; gap: 12px; align-items: center; }

@keyframes esc-pula { from { scale: 0.7; } to { scale: 1; } }
@keyframes esc-toque { from { background: rgba(255, 255, 255, 0.55); } to { background: rgba(255, 255, 255, 0); } }
@keyframes esc-brilho { 0%, 100% { box-shadow: inset 0 0 0 0 rgba(255, 213, 79, 0); } 50% { box-shadow: inset 0 0 26px 6px rgba(255, 213, 79, 0.75); } }

@media (prefers-reduced-motion: reduce) {
  .esc-lugar.esc-brilha { box-shadow: inset 0 0 22px 4px rgba(255, 213, 79, 0.7); }
}
@media (prefers-reduced-motion: reduce) { .esc-janela { scroll-behavior: auto; } }
.sem-movimento .esc-janela { scroll-behavior: auto; }
.sem-movimento .esc-lugar.esc-brilha { box-shadow: inset 0 0 22px 4px rgba(255, 213, 79, 0.7); }
