/* Bichinhos da Horta — o visual próprio do jogo (prefixos bh- para a horta e as telas, bd- para as
   brincadeiras). Nada pisca; as animações são lentas e somem com "menos movimento". */
:root {
  --ceu: #c9ecff;
  --ceu-2: #eef9e4;
  --tema: #9edb7a;
  --bh-terra: #7a4f2c;
  --bh-folha: #4f9a34;
  --bh-cartao: #fffdf7;
  --bh-lado: clamp(var(--alvo), 13vh, 120px);
}

/* ---------- menu ---------- */
.bh-menu { align-items: center; gap: 5vw; }
.bh-menu-gemalino { height: min(86%, 400px); width: auto; }
.bh-menu-botoes { display: flex; flex-direction: column; gap: 14px; }
.bh-menu-botoes button { border: 0; border-radius: 999px; box-shadow: var(--sombra); min-width: 170px; height: clamp(var(--alvo), 18vh, 130px); font-size: clamp(40px, 7vh, 60px); }

/* ---------- horta ---------- */
.bh-palco-horta { flex-direction: column; gap: 8px; }
.bh-campo {
  position: relative; flex: 1; min-height: 0; border-radius: var(--raio); overflow: hidden;
  background: linear-gradient(var(--bh-ceu) 0 42%, var(--bh-grama) 42% 100%);
  transition: background 1.2s;
}
.bh-est-primavera { --bh-ceu: #bfe9ff; --bh-grama: #8fd16a; }
.bh-est-verao { --bh-ceu: #a4d8f5; --bh-grama: #76c254; }
.bh-est-outono { --bh-ceu: #ffe3bd; --bh-grama: #c4b65c; }
.bh-est-inverno { --bh-ceu: #dde8f1; --bh-grama: #a8c79b; }
.bh-campo::before {
  content: ""; position: absolute; top: 8%; right: 5%; width: clamp(34px, 9vh, 70px); aspect-ratio: 1; border-radius: 50%;
  background: #ffd54f; box-shadow: 0 0 0 8px rgba(255, 213, 79, 0.35);
}
.bh-est-inverno::before { background: #fff3c4; box-shadow: none; }
.bh-enfeites { position: absolute; inset: 0; pointer-events: none; }
.bh-nuvem { position: absolute; top: 12%; left: 30%; width: clamp(60px, 14vh, 130px); height: clamp(22px, 5vh, 44px); border-radius: 999px; background: #fff; opacity: 0.9; }
.bh-nuvem::after { content: ""; position: absolute; left: 22%; top: -55%; width: 45%; height: 110%; border-radius: 50%; background: #fff; }
.bh-nuvem-2 { top: 22%; left: 62%; transform: scale(0.75); }
.bh-cerca {
  position: absolute; left: 0; right: 0; top: calc(42% - clamp(14px, 4vh, 34px)); height: clamp(14px, 4vh, 34px);
  background: linear-gradient(#b98a5a 0 0) 0 30% / 100% 4px no-repeat, linear-gradient(#b98a5a 0 0) 0 75% / 100% 4px no-repeat,
    repeating-linear-gradient(90deg, #c99a68 0 8px, transparent 8px 46px);
}
.bh-est-inverno .bh-nuvem { background: #f4f7fa; }
.bh-gemalino { position: absolute; left: 1%; bottom: 46%; height: 34%; max-height: 220px; width: auto; pointer-events: none; }
.bh-canteiros { position: absolute; left: 8px; right: 8px; top: 6%; bottom: 4px; display: flex; gap: 8px; align-items: stretch; }
.bh-canteiro {
  flex: 1; min-width: var(--alvo); min-height: var(--alvo); display: flex; align-items: flex-end; justify-content: center;
  border-radius: 16px; cursor: pointer;
}
.bh-canteiro .bh-desenho { width: 100%; height: 100%; pointer-events: none; }
.bh-canteiro.alvo { background: rgba(255, 255, 255, 0.35); }
.bh-canteiro:focus-visible { outline: 4px solid var(--azul); }
.bh-maduro { animation: bh-brilho 2.4s ease-in-out infinite; }
.bh-planta { transition: transform 0.6s; }

.bh-ferramentas { flex: 0 0 auto; display: flex; gap: 8px; justify-content: center; }
.bh-ferramenta {
  width: var(--bh-lado); height: var(--bh-lado); border: 0; border-radius: 20px; padding: 6px;
  background: var(--bh-cartao); box-shadow: var(--sombra); font-size: clamp(34px, 6vh, 48px); line-height: 1;
}
.bh-ferramenta svg { width: 100%; height: 100%; pointer-events: none; }
.bh-ferramenta.arrastando { position: relative; z-index: 8; box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25); }
.bh-semente, .bh-regador, .bh-adubo { touch-action: none; }

.bh-medida {
  position: absolute; z-index: 3; top: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; padding: 6px;
  background: rgba(255, 253, 247, 0.92); border-radius: var(--raio); box-shadow: var(--sombra);
}
.bh-medida-botao { width: var(--alvo); height: var(--alvo); border: 0; border-radius: 18px; background: #e3f4ff; font-size: 22px; line-height: 1.1; padding: 0 4px; }
.bh-medida-fechar { background: var(--branco); font-size: 30px; }

.bh-chuva { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bh-chuva i { position: absolute; top: -12%; width: 4px; height: 20px; border-radius: 3px; background: #4aa3df; opacity: 0.7; animation: bh-chover 0.9s linear 3; }
.bh-visita { position: absolute; z-index: 2; top: 4%; right: 3%; height: 38%; max-height: 170px; width: auto; pointer-events: none; animation: entra 0.5s ease-out; }

/* ---------- um bichinho aparece ---------- */
.bh-aparecer { align-items: center; gap: 4vw; }
.bh-aparece-figura { height: min(100%, 440px); max-width: 48%; object-fit: contain; animation: bh-surge 0.9s ease-out; }
.bh-aparece-lado { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bh-aparece-nome { margin: 0; font-size: clamp(28px, 6vh, 48px); font-weight: bold; color: var(--azul); text-shadow: 0 3px 0 #fff; }
.bh-aparece-botoes { display: flex; gap: 12px; }
.bh-brincar, .bh-voltar-horta, .bh-pagina-brincar { min-width: 120px; font-size: 38px; }
.bh-depois { width: var(--alvo); min-height: var(--alvo); border: 0; border-radius: 999px; font-size: 36px; box-shadow: var(--sombra); }

/* ---------- brincadeiras ---------- */
.bh-palco-desafio { align-items: center; }
.bd-desafio { display: flex; align-items: center; justify-content: center; gap: 3vw; width: 100%; height: 100%; }
.bd-bichinho { height: min(100%, 380px); max-width: 32%; object-fit: contain; }
.bd-pula { animation: bd-pulo 0.6s ease-out; }
.bd-feliz { animation: bh-surge 0.9s ease-out; }
.bd-area {
  --bd-lado: clamp(var(--alvo), 17vh, 130px);
  display: grid; gap: 8px; grid-template-columns: repeat(3, var(--bd-lado)); grid-auto-rows: var(--bd-lado); align-content: center;
}
.bd-area.bd-contar { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bd-opcao, .bd-item, .bd-numero {
  width: 100%; height: 100%; border: 0; border-radius: 20px; background: var(--bh-cartao); box-shadow: var(--sombra);
  font-size: clamp(36px, 7vh, 54px); padding: 4px;
}
.bd-item svg { width: 100%; height: 100%; pointer-events: none; }
.bd-mostra { animation: bd-mostra 0.8s ease-out; }
.bd-achado { background: #fff1a8; outline: 4px solid #e0a800; outline-offset: -4px; }
.bd-itens { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 420px; }
.bd-contavel { display: inline-block; border-radius: 12px; }
.bd-contavel svg { width: clamp(30px, 8vh, 64px); height: clamp(36px, 10vh, 80px); }
.bd-numeros { display: flex; gap: 10px; }
.bd-numero { width: var(--bd-lado); height: var(--alvo); font-weight: bold; color: var(--azul); }
.bd-area .bh-voltar-horta { grid-column: 1 / -1; justify-self: center; }

/* ---------- caderno ---------- */
.bh-caderno {
  --bh-cartao-lado: clamp(var(--alvo), 27vh, 200px);
  display: grid; grid-template-columns: repeat(3, var(--bh-cartao-lado)); grid-auto-rows: var(--bh-cartao-lado);
  gap: 10px; align-content: center; justify-content: center; overflow: auto;
}
.bh-pagina-botao { position: relative; border: 0; border-radius: 20px; background: var(--bh-cartao); box-shadow: var(--sombra); padding: 6px; }
.bh-pagina-botao img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.bh-falta { background: #eef3e8; }
.bh-falta img { filter: grayscale(1) blur(7px) opacity(0.35); } /* só uma sombra clarinha e borrada */
.bh-interrogacao { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(34px, 7vh, 60px); font-weight: bold; color: #7d8f73; }

.bh-pagina { align-items: center; gap: 2vw; }
.bh-pagina-figura { height: min(100%, 380px); max-width: 30%; object-fit: contain; }
.bh-pagina-texto {
  flex: 1; max-width: 560px; max-height: 100%; overflow: auto; padding: 10px 16px; border-radius: var(--raio);
  background: var(--bh-cartao); box-shadow: var(--sombra); font-size: clamp(15px, 2.6vh, 21px);
}
.bh-pagina-texto h2 { margin: 0 0 4px; color: var(--azul); font-size: 1.5em; }
.bh-pagina-texto h3 { margin: 8px 0 2px; color: var(--bh-folha); font-size: 1em; }
.bh-pagina-texto p { margin: 0; }
.bh-pagina-botoes { display: flex; flex-direction: column; gap: 8px; }
.bh-pagina-botoes button { width: var(--alvo); min-width: var(--alvo); height: var(--alvo); padding: 0; border: 0; border-radius: 999px; font-size: 36px; box-shadow: var(--sombra); }

/* ---------- pouca altura (celular deitado) ---------- */
@media (max-height: 460px) {
  .bh-palco-horta { gap: 6px; }
  .bh-ferramentas { gap: 6px; }
  .bh-pagina-botoes { display: grid; grid-template-columns: repeat(2, var(--alvo)); }
  .bh-pagina-figura { max-width: 20%; }
  .bd-area { gap: 6px; }
  .bd-itens { gap: 3px; }
  .bd-contavel svg { width: 30px; height: 36px; }
  .bh-menu-botoes { flex-direction: row; }
  .bh-gemalino { display: none; }
}
@media (max-width: 700px) {
  .bh-aparece-figura { max-width: 40%; }
  .bd-bichinho { max-width: 24%; }
}

@keyframes bh-brilho { 50% { background: rgba(255, 236, 150, 0.45); } }
@keyframes bh-chover { to { transform: translateY(120vh); } }
@keyframes bh-surge { from { transform: scale(0.4) translateY(30%); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } to { transform: none; } }
@keyframes bd-pulo { 40% { transform: translateY(-14%); } }
@keyframes bd-mostra { 0% { transform: scale(1); background: #ffe56b; } 40% { transform: scale(1.1); background: #ffe56b; } 100% { transform: none; } }

/* botões que levam à horta: o desenho do canteiro é CONTEÚDO do jogo (o lugar), não um ícone de interface;
   o visual é o mesmo do botão de ação da base. */
.bh-botao-lugar {
  min-height: var(--alvo); min-width: 150px; padding: 0 26px; border: 0; border-radius: 999px;
  background: var(--amarelo); color: var(--azul); font-size: clamp(18px, 2.2vw, 22px); font-weight: bold; box-shadow: var(--sombra);
}

/* nome escrito nos botões (qualidade: todo botão de escolha mostra o nome) */
.rotulo-botao { display: block; font-size: clamp(11px, 1.4vw, 14px); font-weight: 700; line-height: 1.1; color: #1f3b57; pointer-events: none; }
.bh-ferramenta { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: auto; min-height: var(--bh-lado); }
.bh-ferramenta svg { flex: 1 1 auto; min-height: 0; height: calc(var(--bh-lado) - 30px); }
.bh-botao-lugar, .bh-menu-caderno, .bh-depois, .bh-pagina-voltar, .bh-pagina-horta { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.bh-botao-lugar, .bh-menu-caderno, .bh-depois, .bh-pagina-voltar, .bh-pagina-horta, .bd-denovo { min-width: var(--alvo); min-height: var(--alvo); } /* com o nome escrito, nunca menor que o alvo */
