/* Colheita Antes da Chuva — visual próprio do jogo (o comum está em base.css). */
:root { --tema: #e8455a; --tema-escuro: #b3263a; }

.cc-jogo svg, .cc-menu svg, .cc-fim svg { display: block; width: 100%; height: 100%; pointer-events: none; }

/* 1. escolher o tamanho: três botões com 3, 4 ou 5 de cada colheita */
.cc-menu { align-items: center; gap: 2.2vw; }
.cc-nivel {
  position: relative; flex: 1 1 0; max-width: 340px; height: min(100%, 430px); min-width: var(--alvo); min-height: var(--alvo);
  border: 0; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra); padding: 12px;
}
.cc-nivel:active { transform: translateY(3px); }
.cc-amostra { display: flex; flex-direction: column; justify-content: center; gap: 5%; width: 100%; height: 100%; }
.cc-amostra-linha { display: flex; justify-content: center; gap: 3%; height: 27%; }
.cc-amostra-linha i { flex: 0 1 17%; height: 100%; }
.cc-estrela { position: absolute; top: 2px; right: 8px; font-size: 30px; }

/* 2. o tabuleiro: campo (céu, canteiros, turma) à esquerda; celeiro e dado à direita */
.cc-jogo { gap: 10px; }
.cc-campo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cc-lado { flex: 0 0 clamp(190px, 27%, 320px); min-height: 0; display: flex; flex-direction: column; gap: 8px; }

/* o caminho da nuvem */
.cc-ceu {
  position: relative; flex: 0 0 clamp(62px, 15%, 108px); border-radius: var(--raio); overflow: hidden;
  background: linear-gradient(#8fd0f5, #cdeeff); box-shadow: inset 0 0 0 4px var(--branco);
}
.cc-casas { position: absolute; inset: 0; display: flex; align-items: center; }
.cc-casa { flex: 1 1 0; height: 100%; display: grid; place-items: center; }
.cc-casa::before { content: ""; width: min(44%, 34px); aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.8); }
.cc-casa.cc-passada::before { background: rgba(255, 255, 255, 0.3); }
.cc-chegada::before { display: none; }
.cc-chegada svg { width: auto; height: 82%; max-width: 100%; }
.cc-nuvem { position: absolute; top: 4%; height: 92%; aspect-ratio: 1; transform: translateX(-50%); transition: left 0.6s ease-in-out; }

/* os canteiros (a criança toca num deles quando ajuda em outro canteiro) */
.cc-canteiros { flex: 1 1 0; min-height: var(--alvo); display: flex; gap: 8px; }
.cc-canteiro {
  flex: 1 1 0; min-width: var(--alvo); border: 5px solid var(--branco); border-radius: var(--raio); box-shadow: var(--sombra);
  padding: 6px; display: grid; place-items: center;
}
.cc-vagas { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4px; width: 100%; max-width: 360px; }
.cc-canteiro.cc-de-morango { background: repeating-linear-gradient(#a8d98a 0 26px, #93cc72 26px 32px); }
.cc-canteiro.cc-de-ovo { background: radial-gradient(ellipse at center, #f8e3a1 0 58%, #e5bd62 59% 100%); }
.cc-canteiro.cc-de-cenoura { background: repeating-linear-gradient(#b88252 0 26px, #a26f42 26px 32px); }
.cc-vaga {
  flex: 0 0 30%; max-width: 104px; aspect-ratio: 1;
  background: radial-gradient(ellipse 36% 15% at 50% 80%, rgba(60, 35, 10, 0.3) 96%, transparent);
}
.cc-vaga:not(.cc-cheia) svg { visibility: hidden; }
.cc-vaga.cc-cheia { background: none; }
.cc-canteiro.cc-vazio { filter: saturate(0.6); }
.cc-chama { box-shadow: 0 0 0 6px var(--amarelo), var(--sombra); animation: cc-pulsa 1.6s ease-in-out infinite; }

/* a turma (só quando a tela é alta) */
.cc-turma { flex: 0 0 clamp(70px, 14%, 100px); display: flex; justify-content: center; gap: 2%; }
.cc-membro {
  position: relative; flex: 0 0 auto; height: 100%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 253, 247, 0.75); font-size: 40px; line-height: 1; opacity: 0.8;
}
.cc-membro img, .cc-retrato img, .cc-fim-amigo img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.cc-membro.cc-da-vez { opacity: 1; background: var(--amarelo); transform: scale(1.1); }
.cc-torcida { margin-left: 3%; opacity: 1; background: rgba(255, 213, 79, 0.45); }

/* o celeiro, com uma prateleira para cada colheita */
.cc-celeiro { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; }
.cc-telhado { flex: 0 0 auto; }
.cc-telhado { position: relative; aspect-ratio: 200 / 48; max-height: 30%; }
.cc-telhado svg { position: absolute; inset: 0; }
.cc-celeiro-corpo {
  flex: 1 1 0; min-height: 0; margin: -2px 7% 0; padding: 6px; display: flex; flex-direction: column; gap: 5px;
  background: #d9534a; border: 4px solid #6b2a1c; border-top: 0; border-radius: 0 0 12px 12px;
}
.cc-prateleira {
  flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 3%; padding: 2px 4px;
  background: #fff3d6; border-radius: 8px; border-bottom: 4px solid #b98a4a;
}
.cc-lugar { flex: 0 1 18%; height: 100%; max-height: 84px; opacity: 0.2; filter: grayscale(1); }
.cc-lugar.cc-cheia { opacity: 1; filter: none; }
.cc-novo { animation: entra 0.45s ease-out; }

/* quem joga agora e o dado das cores */
.cc-mesa { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 8px; }
.cc-vez { width: clamp(72px, 36%, 116px); height: clamp(90px, 14vh, 126px); }
.cc-retrato { position: relative; width: 100%; height: 100%; display: grid; place-items: center; font-size: 56px; line-height: 1; }
.cc-dado {
  position: relative; flex: 0 0 auto; width: clamp(96px, 14vh, 126px); height: clamp(96px, 14vh, 126px); padding: 0;
  border: 5px solid var(--branco); border-radius: 22%; background: var(--branco); box-shadow: var(--sombra);
}
.cc-dado[data-face="vermelho"] { background: radial-gradient(circle, #fff 0 58%, #e8364f 59%); }
.cc-dado[data-face="branco"] { background: #ffffff; border-color: #d8c8a8; }
.cc-dado[data-face="laranja"] { background: radial-gradient(circle, #fff 0 58%, #f58a1f 59%); }
.cc-dado[data-face="sol"] { background: radial-gradient(circle, #fffbe6 0 58%, #8fd0f5 59%); }
.cc-dado[data-face="nuvem"] { background: #6f8aa3; }
.cc-dado svg { position: absolute; inset: 13%; width: 74%; height: 74%; }
.cc-dado.cc-rolando { animation: cc-rola 0.55s linear; }
.cc-dado:active { transform: translateY(3px); }

/* 3. o fim: colheita feita (sol e cestas cheias) ou a turma abrigada no celeiro (chuva) */
.cc-fim { gap: 12px; }
.cc-fim-cena {
  position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center;
  border-radius: var(--raio); overflow: hidden; box-shadow: inset 0 0 0 5px var(--branco);
  background: linear-gradient(#bfe6fb, #e8f8ff 62%, #9ed67a 62%, #7cc35a);
}
.cc-fim-cena.cc-fim-chuva { background: linear-gradient(#a9bccd, #d9e5ee 62%, #86c268 62%, #6fb352); }
.cc-titulo { position: relative; z-index: 2; margin: 10px 0 0; font-size: clamp(24px, 4vw, 46px); color: var(--azul); text-shadow: 0 2px 0 #fff; }
.cc-fim-ceu { position: absolute; top: 3%; left: 3%; right: 3%; height: 36%; display: flex; justify-content: space-between; }
.cc-fim-nuvem, .cc-fim-sol { height: 100%; aspect-ratio: 1; }
.cc-fim-nuvem { animation: cc-flutua 3.2s ease-in-out infinite alternate; }
.cc-fim-sol { margin-left: auto; }
.cc-abrigo { margin-top: auto; width: min(94%, 780px); height: 64%; display: flex; flex-direction: column; }
.cc-fim-turma { flex: 1 1 0; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 1.5%; padding: 0 3% 2%; }
.cc-fim-chuva .cc-fim-turma {
  margin: -2px 7% 0; padding-top: 2%; background: linear-gradient(#b8443c, #d9534a); border: 4px solid #6b2a1c; border-top: 0; border-bottom: 0;
}
.cc-fim .cc-telhado { flex: 0 0 30%; aspect-ratio: auto; max-height: none; }
.cc-fim-chuva .cc-abrigo { width: min(88%, 640px); height: 56%; }
.cc-fim-amigo { position: relative; flex: 0 1 19%; height: 100%; }
.cc-fim-amigo img { object-position: bottom; }
.cc-fim-amigo[data-quem="saltitao"] { height: 84%; }
.cc-fim-amigo[data-quem="bia"] { height: 50%; }
.cc-fim-amigo[data-quem="galinha"] { height: 92%; }
.cc-fim-amigo[data-quem="tobias"] { height: 70%; }
.cc-fim-cesta { position: relative; flex: 0 1 9%; height: 46%; }
/* a colheita fica dentro da cesta: desenhada antes, a frente da cesta cobre a parte de baixo */
.cc-fim-cesta svg:first-child { position: absolute; top: 30%; left: 22%; width: 56%; height: 42%; }
.cc-fim-cesta svg:last-child { position: absolute; bottom: 0; left: 0; width: 100%; height: 66%; }
.cc-fim-botoes { flex: 0 0 var(--alvo); display: flex; flex-direction: column; justify-content: center; gap: 14px; }

@keyframes cc-pulsa { 50% { box-shadow: 0 0 0 12px rgba(255, 213, 79, 0.55), var(--sombra); } }
@keyframes cc-rola { from { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(0.9); } to { transform: rotate(360deg) scale(1); } }
@keyframes cc-flutua { to { transform: translateY(6px); } }

/* celular deitado: sem a fileira da turma (quem joga aparece ao lado do dado) */
@media (max-height: 460px) {
  .cc-turma { display: none; }
  .cc-jogo, .cc-campo, .cc-lado { gap: 6px; }
  .cc-canteiro { border-width: 4px; }
  .cc-celeiro-corpo { padding: 4px; gap: 3px; }
  .cc-prateleira { border-bottom-width: 3px; }
  .cc-titulo { margin-top: 4px; font-size: 24px; }
  .cc-nivel { padding: 8px; }
  .cc-telhado { max-height: 24%; }
}

/* canteiros estreitos: duas colheitas por linha, para cada uma ficar maior */
@media (max-width: 700px) {
  .cc-vaga { flex-basis: 42%; }
}

/* nome escrito em cada cartão de escolha (qualidade: toda escolha mostra o nome; o adulto lê, a criança ouve) */
.rotulo-escolha { display: block; max-width: 100%; font-weight: 700; font-size: clamp(12px, 1.5vw, 16px); line-height: 1.15;
  color: #1f3b57; text-align: center; pointer-events: none; overflow-wrap: anywhere; }
.cc-nivel { display: flex; flex-direction: column; }
.cc-nivel .cc-amostra { flex: 1 1 auto; min-height: 0; height: auto; }
.cc-nivel .rotulo-escolha { flex: 0 0 auto; margin-top: 4px; }
