/* Tabuleiro "Liga do Sorriso — O jogo da Saúde Bucal".
   As medidas dentro da pista usam "em": o tamanho base acompanha a largura do tabuleiro,
   então tudo encolhe junto em telas menores. */

.jogo {
  position: relative; overflow: hidden; margin-top: 14px; border-radius: 28px;
  border: 3px solid #f1e2ff; box-shadow: 0 0 0 4px #7b3fd1, 0 24px 50px rgba(34, 6, 80, .5);
  background: #cdbcf5 url(app/jogo/fundo.jpg) center top / cover no-repeat;
  color: #3a1470;
}
.pista { position: relative; aspect-ratio: 1536 / 740; container-type: inline-size; font-size: 1.15vw; }
@supports (font-size: 1cqw) { .pista { font-size: 1.22cqw; } }
.estrada { position: absolute; inset: 0; width: 100%; height: 100%; }

.titulo-jogo { position: absolute; left: 1.2%; top: 2%; width: 15.5%; display: grid; justify-items: center; gap: .2em; z-index: 2; }
.titulo-jogo img { width: 100%; height: auto; filter: drop-shadow(0 .4em .5em rgba(34, 6, 80, .45)); }
.titulo-jogo span {
  margin-top: -.9em; padding: .25em 1em; border-radius: 999px; background: linear-gradient(180deg, #7a45dc, #4a1c9c); color: #fff;
  font: 600 1.35em/1.2 var(--fonte-titulo); border: .12em solid #fff; white-space: nowrap;
}
.mascote { position: absolute; left: 43%; top: 52%; width: 19%; height: auto; transform: translate(-50%, -50%); z-index: 2; filter: drop-shadow(0 .8em .8em rgba(34, 6, 80, .4)); pointer-events: none; }
.germe { position: absolute; left: 92%; top: 79%; width: 8.5%; height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 .5em .5em rgba(34, 6, 80, .4)); pointer-events: none; }

/* casas */
.casa {
  position: absolute; transform: translate(-50%, -50%); z-index: 3; display: grid; place-items: center; text-align: center;
  font-family: var(--fonte-titulo); font-weight: 700; border: .13em solid #fff;
  box-shadow: 0 .28em 0 rgba(70, 30, 140, .38), 0 .6em .8em rgba(34, 6, 80, .22);
  transition: box-shadow var(--rapido), filter var(--rapido);
}
.casa.w, .casa.p, .casa.y { width: 5.5%; aspect-ratio: 1; border-radius: 26%; font-size: 2.1em; line-height: 1; }
.casa.w { background: linear-gradient(180deg, #fff, #efe4ff); color: #4a1c9c; }
.casa.p { background: linear-gradient(180deg, #8a55e6, #5a25b8); color: #fff; }
.casa.y { background: linear-gradient(180deg, #ffe680, #ffc21a); color: #4a1c9c; }
.casa.inicio { width: 9.6%; padding: .55em 0; border-radius: 999px; background: linear-gradient(180deg, #8a55e6, #5a25b8); color: #fff; font-size: 1.75em; line-height: 1; }
.casa.ev { width: 10.6%; padding: 1.9em .4em .5em; border-radius: 1.4em; line-height: 1.1; gap: .1em; align-content: center; }
.casa.ev img { position: absolute; top: -1.5em; left: 50%; width: 3.3em; height: 3.3em; transform: translateX(-50%); object-fit: contain; filter: drop-shadow(0 .25em .25em rgba(34, 6, 80, .4)); }
.casa.ev .q { font-size: .86em; font-weight: 600; }
.casa.ev .e { font-size: .84em; }
.casa.ev .n {
  position: absolute; top: -.55em; left: -.55em; min-width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: 50%;
  background: #2b0f57; color: #fff; font-size: .9em; border: .12em solid #fff;
}
.casa.ev.roxo { background: linear-gradient(180deg, #7a45dc, #4a1c9c); color: #fff; }
.casa.ev.roxo .e { color: #ffd84a; }
.casa.ev.amarelo { background: linear-gradient(180deg, #ffe680, #ffc21a); color: #3a1470; }
.casa.ev.amarelo .e { color: #c2185b; }
.casa.ev.azul { background: linear-gradient(180deg, #c4f2ff, #5fcbee); color: #1d2a6b; }
.casa.ev.azul .e { color: #6a1fb8; }
.casa.fim { width: 17%; padding: 1.1em .9em 1.2em; border-radius: 2.2em; background: linear-gradient(180deg, #fff6c9, #ffd23a); color: #3a1470; line-height: 1.15; gap: .4em; border-width: .2em; }
.casa.fim img { position: absolute; top: -5.6em; left: 50%; width: 6.6em; height: 6.6em; transform: translateX(-50%); object-fit: contain; filter: drop-shadow(0 .4em .5em rgba(34, 6, 80, .4)); }
.casa.fim strong { padding: .12em .7em; border-radius: 999px; background: linear-gradient(180deg, #7a45dc, #4a1c9c); color: #fff; font-size: 2.2em; border: .08em solid #fff; margin-top: -.9em; }
.casa.fim span { font-size: 1.15em; font-weight: 600; }
.casa.ativa { box-shadow: 0 0 0 .3em var(--destaque), 0 0 1.6em rgba(255, 207, 51, .95); filter: brightness(1.06); }

/* peões */
.pista .peao {
  position: absolute; width: 5.4%; height: auto; margin: 0; transform: translate(-50%, -96%); z-index: 6; pointer-events: none;
  transition: left .26s ease, top .26s ease; filter: drop-shadow(0 .35em .3em rgba(34, 6, 80, .55));
}
.pista .peao.vez { filter: drop-shadow(0 0 .5em #ffcf33) drop-shadow(0 .35em .3em rgba(34, 6, 80, .55)); }

/* painéis de baixo */
.paineis { display: grid; grid-template-columns: 21% 1.55fr 1.15fr 1fr; gap: 14px; padding: 30px 16px 16px; align-items: end; }
.criancas { width: 100%; height: auto; align-self: end; margin-bottom: -16px; filter: drop-shadow(0 8px 10px rgba(34, 6, 80, .35)); }
.cartao-jogo { align-self: stretch; padding: 14px 16px 16px; border-radius: 22px; background: rgba(255, 255, 255, .9); border: 2px solid #e3ccff; box-shadow: 0 8px 18px rgba(70, 30, 140, .22); color: #3a1470; display: flex; flex-direction: column; gap: 10px; }
.cartao-jogo h2 { align-self: flex-start; margin: -30px 0 2px; padding: 5px 18px; border-radius: 999px; background: linear-gradient(180deg, #7a45dc, #4a1c9c); color: #fff; font-size: 20px; border: 2px solid #fff; text-shadow: none; }
.como { display: flex; align-items: center; gap: 12px; }
.como ol { flex: 1; margin: 0; padding: 0; list-style: none; counter-reset: passo; display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.como li { counter-increment: passo; display: flex; align-items: center; gap: 8px; color: #3a1470; }
.como li::before { content: counter(passo); flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #5a25b8; color: #fff; font: 600 14px/1 var(--fonte-titulo); }
.dado { position: relative; flex: none; width: 92px; }
.dado img { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 6px rgba(34, 6, 80, .4)); }
.dado span { position: absolute; right: -6px; top: -6px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg, #ffe680, #ffc21a); color: #3a1470; font: 700 22px/1 var(--fonte-titulo); border: 2px solid #fff; box-shadow: 0 3px 6px rgba(34, 6, 80, .35); }
.dado.rolling { animation: rolar-dado .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes rolar-dado { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(-22deg) scale(1.15); } 70% { transform: rotate(14deg) scale(1.05); } 100% { transform: none; } }
.cartao-jogo .status { min-height: 44px; margin: 0; color: #4a1c9c; font: 600 18px/1.25 var(--fonte-titulo); text-align: center; display: grid; place-items: center; }
.cartao-jogo .acoes { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.cartao-jogo .acoes .botao { width: 100%; }
.cartao-jogo .botao:not(.principal) { color: #4a1c9c; background: linear-gradient(180deg, #f6eeff, #e3ccff); border-color: #c9a8ff; box-shadow: inset 0 1px 0 #fff, 0 4px 8px rgba(70, 30, 140, .2); }
.cartao-jogo .opcoes { display: flex; gap: 8px; flex-wrap: wrap; }
.cartao-jogo .opcao { color: #4a1c9c; background: linear-gradient(180deg, #f6eeff, #e3ccff); border-color: #c9a8ff; box-shadow: none; }
.cartao-jogo .opcao.selected { color: var(--tinta-escura); }
.cartao-jogo .player { background: #f3e9ff; border-color: #dcc6ff; color: #3a1470; }
.cartao-jogo .player.turn { border-color: #ffb300; box-shadow: 0 0 10px rgba(255, 179, 0, .55); }
.cartao-jogo .player .progress { background: #dccbf5; }
.cartao-jogo .player .fill { background: linear-gradient(180deg, #8a55e6, #5a25b8); }
.mini { width: 30px; height: 30px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
.chaves { display: flex; gap: 16px; flex-wrap: wrap; color: #3a1470; }
.desafios { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-weight: 700; color: #3a1470; }
.desafios li { display: flex; align-items: center; gap: 8px; color: #3a1470; }
.desafios li::before { content: ""; flex: none; width: 24px; height: 24px; background: url(app/ico/estrela.png) center / contain no-repeat; }
.lista-eventos { margin: 0 16px 16px; padding: 10px 16px; border-radius: 18px; background: rgba(255, 255, 255, .88); border: 2px solid #e3ccff; color: #3a1470; font-weight: 700; }
.lista-eventos summary { cursor: pointer; font-family: var(--fonte-titulo); font-weight: 600; }
.lista-eventos ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.lista-eventos li { color: #3a1470; }
.lista-eventos em { font-style: normal; color: #7a1fb8; }
.jogo .aviso { margin: 12px 16px; }

@media (max-width: 1100px) {
  .paineis { grid-template-columns: 1fr 1fr; align-items: stretch; padding-top: 26px; row-gap: 30px; }
  .criancas { display: none; }
  .paineis > .cartao-jogo:first-of-type { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .pista { font-size: 1.5vw; }
  @supports (font-size: 1cqw) { .pista { font-size: 1.6cqw; } }
  /* no celular as casas especiais mostram só o ícone; o texto aparece no aviso da jogada e na lista abaixo */
  .casa.ev { width: 8.4%; aspect-ratio: 1; padding: 0; border-radius: 26%; }
  .casa.ev .q, .casa.ev .e { display: none; }
  .casa.ev img { position: static; transform: none; width: 78%; height: 78%; }
  .casa.w, .casa.p, .casa.y { width: 6.6%; }
  .casa.fim span { display: none; }
  .casa.fim { width: 15%; padding: .9em .4em .6em; }
  .casa.fim strong { font-size: 1.7em; margin-top: 0; }
  .casa.fim img { top: -5.4em; width: 6.4em; height: 6.4em; }
  .pista .peao { width: 8%; }
  .paineis { grid-template-columns: 1fr; padding: 26px 10px 12px; }
  .lista-eventos { margin: 0 10px 12px; }
  .lista-eventos:not([open]) summary { color: #4a1c9c; }
}
@media (prefers-reduced-motion: reduce) { .pista .peao { transition: none; } .dado.rolling { animation: none; } }
