/* ==========================================================================
   Sistema de design (v6). Tokens no :root: cores, tipografia, espaçamento, raios, sombras, foco e movimento.
   Os temas usam --tinta, --roxo, --roxo-escuro, --branco, --sombra, --raio, --letra e --cor: esses nomes continuam
   valendo (com os valores novos), como apelidos dos tokens.
   ========================================================================== */
:root {
  /* marca: um violeta só, com as variações; o âmbar é o acento (estrelas, conquistas) */
  --marca: #6c5ce7;
  --marca-forte: #5646d4;
  --marca-escura: #3d2fa8;
  --marca-suave: #eeecff;
  --marca-clara: #b9b0ff;
  --acento: #ffc23d;
  --acento-escuro: #b7791f;
  --sucesso: #15a35a;
  --sucesso-suave: #e3f8ec;
  --perigo: #e0393e;
  --perigo-suave: #fde8e8;
  --aviso: #d9861a;
  --aviso-suave: #fff3dc;
  /* neutros claros (cartões, janelas, abertura) */
  --n-0: #ffffff;
  --n-50: #f7f7fb;
  --n-100: #f0f1f7;
  --n-200: #e3e5ef;
  --n-300: #cdd0de;
  --n-400: #a3a7bd;
  --n-500: #7a7f99;
  --n-600: #5a5f7a;
  --n-700: #3c405c;
  --n-900: #171a32;
  /* escuros (a casca e o fundo dos jogos) */
  --e-fundo: #0e1022;
  --e-fundo-2: #13152b;
  --e-superficie: #1a1d36;
  --e-superficie-2: #22264a;
  --e-superficie-3: #2c3159;
  --e-borda: rgba(255, 255, 255, .08);
  --e-borda-forte: rgba(255, 255, 255, .16);
  --e-texto: #f4f5fb;
  --e-texto-2: #b4b8d0;
  --e-texto-3: #858aa8;
  /* cores de apoio das categorias (só em detalhes: etiquetas, pontos, filetes) */
  --cat-aprender: #5b8def;
  --cat-aventura: #2bb39f;
  --cat-classicos: #e8a33a;
  --cat-familia: #ec6a9c;
  --cat-datas: #f2804a;
  --cat-arte: #a974f0;
  --cat-tv: #3ab4e6;
  --cat-livros: #8b7cf6;

  /* tipografia: as fontes do sistema, com cara de produto (nada baixado da internet) */
  --fonte: "Nunito", "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --fonte-titulo: "Nunito", "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --t-2xs: 11px;
  --t-xs: 12px;
  --t-sm: 13.5px;
  --t-base: 15px;
  --t-md: 17px;
  --t-lg: 20px;
  --t-xl: 24px;
  --t-2xl: 30px;
  --t-3xl: 38px;
  --t-4xl: 52px;
  --peso-normal: 400;
  --peso-medio: 600;
  --peso-forte: 700;
  --peso-titulo: 800;
  --linha-justa: 1.12;
  --linha-titulo: 1.22;
  --linha-texto: 1.5;
  --espaco-letra-titulo: -.02em;

  /* espaço em múltiplos de 4 */
  --e1: 4px;
  --e2: 8px;
  --e3: 12px;
  --e4: 16px;
  --e5: 20px;
  --e6: 24px;
  --e7: 32px;
  --e8: 40px;
  --e9: 48px;
  --e10: 64px;

  /* raios */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-pilula: 999px;

  /* sombras em 3 níveis (suaves; nada de sombra dura de desenho animado) */
  --sombra-1: 0 1px 2px rgba(14, 16, 34, .08), 0 2px 6px rgba(14, 16, 34, .08);
  --sombra-2: 0 2px 4px rgba(14, 16, 34, .08), 0 10px 24px rgba(14, 16, 34, .14);
  --sombra-3: 0 6px 12px rgba(6, 7, 20, .18), 0 24px 56px rgba(6, 7, 20, .38);

  /* foco: anel branco com halo (bem visível de longe, na TV) e violeta nas superfícies claras */
  --foco: #ffffff;
  --foco-claro: var(--marca);
  --anel: 0 0 0 3px var(--e-fundo), 0 0 0 6px var(--foco);
  --anel-claro: 0 0 0 3px #fff, 0 0 0 6px var(--marca);

  /* movimento */
  --d-rapida: 120ms;
  --d-media: 220ms;
  --d-lenta: 360ms;
  --curva: cubic-bezier(.2, .8, .2, 1);
  --curva-entra: cubic-bezier(0, 0, .2, 1);
  --curva-sai: cubic-bezier(.4, 0, 1, 1);

  /* a cor do tema aberto (base.js põe a do tema; sem tema, a da marca) */
  --tema: #6c5ce7;
  --tema-rgb: 108, 92, 231;

  /* ---------- apelidos (os nomes antigos, que os 20 temas usam) ---------- */
  --tinta: var(--n-900);
  --roxo: var(--marca);
  --roxo-escuro: var(--marca-escura);
  --branco: #ffffff;
  --sombra: var(--sombra-2);
  --raio: var(--r-xl);
  --letra: var(--fonte);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--letra);
  color: var(--tinta);
  /* O fundo dos jogos: o escuro da casca com um toque da cor do tema (base.js põe --tema-rgb). */
  background:
    radial-gradient(1100px 560px at 50% -14%, rgba(var(--tema-rgb), .42), rgba(var(--tema-rgb), 0) 68%),
    radial-gradient(900px 500px at 100% 110%, rgba(var(--tema-rgb), .16), rgba(var(--tema-rgb), 0) 60%),
    linear-gradient(180deg, #1b1e3c 0%, #14162e 55%, #101227 100%) fixed;
  background-color: #14162e;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}
h1, h2, h3 { font-family: var(--fonte-titulo); letter-spacing: var(--espaco-letra-titulo); }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .45; cursor: default; }
input { font: inherit; -webkit-user-select: text; user-select: text; }

/* Ícones de linha (js/icones.js): do tamanho da letra, na cor do texto. */
.ic { display: inline-grid; place-items: center; flex: none; width: 1.25em; height: 1.25em; line-height: 0; vertical-align: -.22em; }
.ic-svg { width: 100%; height: 100%; display: block; }

.tela { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
/* Transição suave entre as telas (só opacidade: não muda o lugar de nada que é position: fixed). */
.tela-entra { animation: tela-entra var(--d-lenta) var(--curva-entra) both; }
@keyframes tela-entra { from { opacity: 0; } }
.corpo { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: var(--e3) var(--e4) var(--e7); display: flex; flex-direction: column; gap: var(--e4); }

/* ---------- cabeçalho dos jogos ---------- */
.topo {
  position: relative; z-index: 5; display: flex; align-items: center; gap: var(--e2);
  min-height: 60px; padding: calc(var(--e2) + env(safe-area-inset-top)) var(--e3) var(--e2);
  color: var(--branco);
}
.topo h1 {
  flex: 1; min-width: 0; margin: 0; font-size: clamp(17px, 4.4vw, 21px); font-weight: var(--peso-forte); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em;
}
.botao-icone {
  width: 44px; height: 44px; border-radius: var(--r-pilula); flex: none;
  background: rgba(255, 255, 255, .1); color: var(--branco); border: 1px solid rgba(255, 255, 255, .12);
  font-size: 20px; line-height: 1; display: grid; place-items: center;
  transition: background var(--d-rapida) var(--curva), transform var(--d-rapida) var(--curva);
}
.botao-icone .ic { width: 22px; height: 22px; }
@media (hover: hover) and (pointer: fine) { .botao-icone:hover { background: rgba(255, 255, 255, .18); } }
.botao-icone:active { transform: scale(.94); }
.botao-icone.desligado { background: transparent; color: rgba(255, 255, 255, .62); }
.topo .botao-icone[data-voltar] .ic { width: 24px; height: 24px; }

/* ---------- botões: primário, secundário e fantasma ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e2);
  min-height: 48px; padding: 12px 22px; border-radius: var(--r-md);
  font-weight: var(--peso-forte); font-size: var(--t-md); line-height: 1.2; letter-spacing: -.005em;
  background: var(--n-100); color: var(--n-900); box-shadow: inset 0 0 0 1px rgba(14, 16, 34, .06);
  transition: background var(--d-rapida) var(--curva), transform var(--d-rapida) var(--curva), box-shadow var(--d-rapida) var(--curva);
}
@media (hover: hover) and (pointer: fine) { .botao:hover:not(:disabled) { background: var(--n-200); } }
.botao:active:not(:disabled) { transform: scale(.97); }
.botao .ic { width: 20px; height: 20px; }
.botao-principal { background: var(--marca); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 6px 16px rgba(108, 92, 231, .32); }
@media (hover: hover) and (pointer: fine) { .botao-principal:hover:not(:disabled) { background: var(--marca-forte); } }
.botao-fantasma { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.botao-grande { min-height: 56px; font-size: var(--t-lg); padding: 14px 32px; border-radius: var(--r-lg); align-self: center; }
.botao-pequeno { min-height: 38px; padding: 7px 14px; font-size: var(--t-base); border-radius: var(--r-sm); }
.botao-pequeno .ic { width: 18px; height: 18px; }
.botao-ouvir {
  align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-pilula);
  background: var(--marca-suave); color: var(--marca-escura); font-weight: var(--peso-forte); font-size: var(--t-sm);
}
.botao-ouvir .ic { width: 18px; height: 18px; }
/* chip: a pessoa da vez (a cor dela, com o texto que dá para ler) */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; margin: 0 2px; border-radius: var(--r-pilula);
  background: var(--cor); color: var(--cor-texto, #fff); font-weight: var(--peso-forte); line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.explica { margin: 0; text-align: center; color: rgba(255, 255, 255, .9); font-size: var(--t-md); font-weight: var(--peso-medio); line-height: var(--linha-titulo); }

/* ---------- início ---------- */
.marca { text-align: center; color: var(--branco); padding: calc(30px + env(safe-area-inset-top)) 0 6px; }
.marca-logo { font-size: clamp(48px, 14vw, 80px); font-weight: 900; letter-spacing: -1px; line-height: 1; text-shadow: 0 5px 0 rgba(0, 0, 0, .18); }
.marca-logo span { color: #fde047; }
.marca p { margin: 8px 0 0; font-size: 20px; font-weight: 700; opacity: .95; }
.jogos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 10px; }
.jogo-cartao {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 18px; border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra);
  border-top: 10px solid var(--cor, #c4b5fd);
}
.jogo-cartao:active { transform: scale(.97); }
.jogo-cartao strong { font-size: 22px; }
.jogo-cartao span { font-size: 16px; opacity: .8; }
.jogo-arte { width: 120px; height: 120px; display: grid; place-items: center; font-size: 72px; }
.jogo-arte svg { width: 100%; height: 100%; }
.em-breve { opacity: .7; border-top-color: #e5e7eb; }

/* ---------- menu dos temas (a lista simples, quando a página da série não monta) ---------- */
.apresenta { display: flex; align-items: center; gap: var(--e3); }
.apresenta-tito { width: 104px; flex: none; animation: balanca 2.4s ease-in-out infinite; }
.apresenta-tito svg { width: 100%; }
.fala-tito {
  position: relative; flex: 1; padding: var(--e3) var(--e4); border-radius: var(--r-lg);
  background: var(--branco); font-size: var(--t-md); font-weight: var(--peso-medio); line-height: 1.4; box-shadow: var(--sombra-1);
}
.fala-tito::before {
  content: ""; position: absolute; left: -10px; top: 50%; margin-top: -9px;
  border: 9px solid transparent; border-right: 12px solid var(--branco); border-left: 0;
}
.brincadeiras { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--e3); }
.brincadeira {
  display: flex; align-items: center; gap: var(--e3); padding: var(--e3) var(--e4); text-align: left;
  border-radius: var(--r-lg); background: var(--branco); box-shadow: var(--sombra-1);
}
.brincadeira:active { transform: scale(.98); }
.brincadeira-emoji { font-size: 36px; width: 60px; height: 60px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--n-100); flex: none; }
.brincadeira-texto { display: flex; flex-direction: column; gap: 2px; }
.brincadeira-texto strong { font-size: var(--t-md); }
.brincadeira-texto small { font-size: var(--t-sm); color: var(--n-600); line-height: 1.35; }
.quem-brinca {
  display: flex; align-items: center; justify-content: space-between; gap: var(--e2) var(--e3); flex-wrap: wrap;
  padding: var(--e2) var(--e2) var(--e2) var(--e4); border-radius: var(--r-lg); color: var(--branco); font-weight: var(--peso-medio); font-size: var(--t-base);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
}
.quem-brinca > span:first-child { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 2px; }
.quem-brinca .botao { min-height: 36px; padding: 6px 14px; background: rgba(255, 255, 255, .12); color: #fff; box-shadow: none; }

/* ---------- jogadores (times por cor) ---------- */
.cores { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--e3); }
.cor-cartao {
  display: flex; flex-direction: column; align-items: center; gap: var(--e2); padding: var(--e5) var(--e3);
  border-radius: var(--r-lg); background: var(--e-superficie, #1a1d36); color: #fff; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .1); transition: transform var(--d-rapida) var(--curva), background var(--d-rapida), border-color var(--d-rapida);
}
.cor-cartao:active { transform: scale(.98); }
.cor-cartao strong { font-size: var(--t-lg); color: #fff; }
.cor-cartao.dentro { background: rgba(255, 255, 255, .08); border-color: var(--cor); box-shadow: inset 0 0 0 1px var(--cor); }
.cor-bola {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--cor); color: #fff; font-size: 28px; font-weight: var(--peso-titulo); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.cor-bola .ic { width: 26px; height: 26px; }
.dentro .cor-bola { box-shadow: 0 0 0 3px var(--e-fundo, #0e1022), 0 0 0 6px var(--cor); }
.cor-dica { font-size: var(--t-sm); color: rgba(255, 255, 255, .6); }
.cor-nome {
  width: 100%; max-width: 170px; min-height: 40px; padding: 8px 10px; text-align: center; font-size: var(--t-base); font-weight: var(--peso-forte);
  border: 1.5px solid rgba(255, 255, 255, .16); border-radius: var(--r-md); background: rgba(255, 255, 255, .06); color: #fff;
}

/* ---------- janelas, balão e confete ---------- */
.janela {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--e4);
  background: rgba(9, 10, 24, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: aparece var(--d-media) var(--curva-entra);
}
.janela-caixa {
  position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow: auto;
  padding: var(--e7) var(--e6) var(--e6); border-radius: var(--r-2xl); background: var(--branco); color: var(--tinta); text-align: center;
  display: flex; flex-direction: column; gap: var(--e3); box-shadow: var(--sombra-3); animation: janela-entra var(--d-lenta) var(--curva);
}
.janela-caixa h2 { margin: 0; font-size: var(--t-xl); line-height: var(--linha-titulo); }
.janela-caixa p { margin: 0; font-size: var(--t-md); line-height: 1.45; color: var(--n-700); }
.janela-arte { width: 112px; margin: 0 auto; }
.janela-arte svg { width: 100%; }
.janela-botoes { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--e2); margin-top: var(--e2); }
.janela-botoes .botao { flex: 1 1 140px; max-width: 260px; }
/* Certo e errado: um filete de cor no alto da janela (no lugar da borda grossa). */
.janela-certo, .janela-errado { overflow: hidden; }
.janela-certo::before, .janela-errado::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--sucesso); }
.janela-errado::before { background: var(--aviso); }
.balao {
  position: fixed; left: 50%; top: 42%; z-index: 60; transform: translate(-50%, -50%);
  max-width: calc(100vw - 32px); padding: 12px 22px; border-radius: var(--r-pilula); background: rgba(23, 26, 50, .94); color: #fff;
  font-size: var(--t-lg); font-weight: var(--peso-forte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  box-shadow: var(--sombra-3); border: 1px solid rgba(255, 255, 255, .12);
  animation: balao var(--d-media) var(--curva);
}
.confete { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.confete i { position: absolute; top: -20px; width: 8px; height: 14px; border-radius: 2px; animation: cai linear forwards; }

/* ---------- placar ---------- */
.fim { width: 100%; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--e4); text-align: center; color: var(--branco); }
.fim-icone { align-self: center; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #3a2a00;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--acento) 70%); box-shadow: 0 8px 24px rgba(255, 194, 61, .35); }
.fim-icone .ic { width: 32px; height: 32px; }
.fim h2 { margin: 0; font-size: clamp(24px, 5vw, 32px); line-height: var(--linha-titulo); }
.placar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--e2); }
.placar li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px var(--e3);
  padding: var(--e3) var(--e4); border-radius: var(--r-lg); background: var(--branco); color: var(--tinta);
  box-shadow: inset 4px 0 0 var(--cor), var(--sombra-1); text-align: left;
}
.placar li:first-child { box-shadow: inset 4px 0 0 var(--cor), 0 0 0 2px var(--acento), var(--sombra-2); }
.placar-medalha {
  grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--t-md); font-weight: var(--peso-titulo); color: #fff; background: var(--n-400);
}
.placar-pos-1 { background: linear-gradient(135deg, #ffd666, #e8a317); color: #4a3200; }
.placar-pos-2 { background: linear-gradient(135deg, #e8ebf2, #a9b0c2); color: #2d3245; }
.placar-pos-3 { background: linear-gradient(135deg, #f3c39a, #c27a43); color: #4a2410; }
.placar-nome { display: flex; align-items: center; gap: var(--e2); min-width: 0; font-size: var(--t-lg); font-weight: var(--peso-forte); }
.placar-nome > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.placar-bicho { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: var(--cor); }
.placar-valor { grid-row: span 2; font-size: var(--t-xl); font-weight: var(--peso-titulo); font-variant-numeric: tabular-nums; }
.placar small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--t-sm); color: var(--n-600); }
.fim-praticou { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.fim-praticou > strong { display: inline-flex; align-items: center; gap: 6px; color: var(--e-texto-2); font-size: var(--t-sm); font-weight: var(--peso-forte); text-transform: uppercase; letter-spacing: .06em; }
.fim-praticou > span { padding: 5px 12px; border-radius: var(--r-pilula); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-size: var(--t-sm); font-weight: var(--peso-medio); }
.fim-botoes { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--e2); }
.fim-botoes .botao:not(.botao-principal) { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
@media (hover: hover) and (pointer: fine) { .fim-botoes .botao:not(.botao-principal):hover { background: rgba(255, 255, 255, .2); } }

/* ---------- conheça o Tito ---------- */
.licao {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 24px 20px; border-radius: 28px; background: var(--branco); box-shadow: var(--sombra); min-height: 340px;
  touch-action: pan-y;
}
.licao h2 { margin: 0; font-size: 28px; }
.licao p { margin: 0; font-size: 21px; line-height: 1.4; max-width: 560px; }
.licao-arte { width: 140px; }
.licao-arte svg { width: 100%; }
.licao-emoji { font-size: 96px; line-height: 1.1; }
.entra { animation: entra .35s ease-out; }
.pontinhos { display: flex; justify-content: center; gap: 8px; }
.pontinhos i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.pontinhos i.ativo { background: #fff; transform: scale(1.3); }
.licao-botoes { display: flex; justify-content: space-between; gap: 10px; }

/* ---------- a vez e a contagem (comum aos jogos) ---------- */
.vez {
  display: flex; align-items: center; justify-content: space-between; gap: var(--e2) var(--e3); flex-wrap: wrap;
  min-height: 52px; padding: var(--e2) var(--e4); border-radius: var(--r-lg); background: var(--branco); color: var(--tinta);
  box-shadow: inset 5px 0 0 var(--cor, var(--marca)), var(--sombra-1); font-size: var(--t-lg); font-weight: var(--peso-forte);
}
.vez small { font-size: var(--t-sm); color: var(--n-600); font-weight: var(--peso-medio); }
.contagem { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.contagem-item { padding: 4px 12px; border-radius: var(--r-pilula); background: var(--branco); color: var(--tinta); box-shadow: inset 0 0 0 2px var(--cor); font-weight: var(--peso-forte); font-size: var(--t-base); }

/* ---------- cadê o escorpião ---------- */
.lugares { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.lugar {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px;
  border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra);
}
.lugar:active { transform: scale(.97); }
.lugar strong { font-size: 21px; }
.lugar-arte { width: 110px; height: 90px; display: grid; place-items: center; }
.lugar-arte svg { width: 100%; height: 100%; }
.aviso-real { margin: 0; padding: 12px 16px; border-radius: 18px; background: #fef3c7; font-size: 17px; font-weight: 700; text-align: center; }
/* O monte: as peças amontoadas num cenário (muro e chão de terra, quintal, corredor, garagem). */
.monte {
  position: relative; width: 100%; aspect-ratio: 1 / .92; max-height: 66vh; margin: 0 auto; overflow: hidden;
  border-radius: 26px; box-shadow: var(--sombra), inset 0 -30px 40px rgba(0, 0, 0, .25);
}
@media (min-aspect-ratio: 1/1) { .monte { aspect-ratio: 4 / 3; } }
.cena-tijolos {
  background:
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(0, 0, 0, .2) 17px 19px) top / 100% 30% no-repeat,
    linear-gradient(#8d8171, #776c5e) top / 100% 30% no-repeat,
    radial-gradient(ellipse at 50% 72%, #8a6a43, #6b4f33 62%, #4a3522);
}
.cena-folhas {
  background:
    linear-gradient(#4d6b25, #5b7a2e) top / 100% 28% no-repeat,
    radial-gradient(ellipse at 50% 70%, #a3793f, #7b5a2a 58%, #4d3a1c);
}
.cena-sapatos {
  background:
    linear-gradient(#ede9fe, #ddd6fe) top / 100% 30% no-repeat,
    linear-gradient(#a78bfa, #a78bfa) 0 30% / 100% 3% no-repeat,
    repeating-linear-gradient(90deg, #c8a27a 0 46px, #b38d63 46px 48px);
}
.cena-caixas {
  background:
    repeating-linear-gradient(90deg, transparent 0 60px, rgba(0, 0, 0, .12) 60px 62px) top / 100% 30% no-repeat,
    linear-gradient(#a8a29e, #8f8a85) top / 100% 30% no-repeat,
    radial-gradient(ellipse at 50% 70%, #a8a29e, #78716c 68%, #57534e);
}
.enfeite { position: absolute; pointer-events: none; z-index: 5; filter: brightness(.72) saturate(.8); }
.enfeite svg { width: 100%; display: block; }
.peca { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(var(--giro)); padding: 0; }
.embaixo {
  position: absolute; inset: 14%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, #3e2713, #24150a); overflow: visible;
}
/* O que está embaixo só existe depois de levantar: nada de pinça aparecendo pela borda. */
.peca:not(.aberta) .embaixo > * { visibility: hidden; }
.embaixo svg { width: 92%; transition: transform 1s ease-in, opacity 1s; }
.cobre { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .5s; }
.cobre svg { width: 100%; height: 100%; filter: drop-shadow(0 5px 2px rgba(0, 0, 0, .4)); }
.peca:not(.aberta):active .cobre { transform: scale(.94); }
.peca.aberta .cobre { transform: translate(40%, -80%) rotate(40deg) scale(.7); opacity: 0; }
.peca.aberta .embaixo svg { animation: sai .3s ease-out; }
.peca.foge .embaixo svg { transform: translate(320%, -60%) rotate(90deg); opacity: 0; }
.peca.picou .embaixo { background: radial-gradient(circle, #fecaca, #ef4444); animation: treme .12s 6; }
.peca.picou .tem-escorpiao svg { animation: pula .4s cubic-bezier(.2, 1.6, .4, 1); transform: scale(1.5); }

/* ---------- tira o dedo ---------- */
.relogio { text-align: center; color: var(--branco); font-size: 46px; font-weight: 900; text-shadow: 0 3px 0 rgba(0, 0, 0, .2); line-height: 1; }
.arena {
  position: relative; width: min(100%, 64vh, 560px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%;
  background: radial-gradient(circle, #d6b98a 0%, #b08a58 60%, #8a6a40 100%);
  box-shadow: inset 0 0 0 10px rgba(0, 0, 0, .12), var(--sombra);
  touch-action: none; overflow: hidden;
}
.arena.picou { animation: treme .12s 6; background: radial-gradient(circle, #fecaca 0%, #f87171 70%, #b91c1c 100%); }
.alvo {
  position: absolute; left: 50%; top: 50%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; display: grid; place-items: center; font-size: clamp(34px, 9vw, 60px);
  background: var(--cor); border: 6px dashed rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .25); animation: pulsa 1.2s ease-in-out infinite;
}
.alvo.com-dedo { animation: none; border-style: solid; box-shadow: 0 0 0 14px rgba(255, 255, 255, .45); }
.alvo span { pointer-events: none; }
.bicho { position: absolute; left: 0; top: 0; width: 24%; pointer-events: none; will-change: transform; }
.bicho svg { width: 100%; display: block; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .3)); }
.bicho .rabo { transform-box: fill-box; transform-origin: 0% 0%; }
.bicho[data-estado="mirando"] .rabo { animation: rabo .09s linear infinite alternate; }
.bicho[data-estado="mirando"] .ferrao,
.bicho[data-estado="atacando"] .ferrao { fill: #ef4444; stroke: #ef4444; }
.recado {
  text-align: center; padding: 10px 14px; border-radius: 18px; background: var(--branco);
  font-size: 21px; font-weight: 800; box-shadow: var(--sombra); min-height: 52px;
}

/* ---------- 7 erros ---------- */
.erros-barra { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--branco); font-weight: 800; font-size: 20px; }
.erros-figuras { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-aspect-ratio: 1/1) { .erros-figuras { grid-template-columns: 1fr; } }
.erros-figuras figure { margin: 0; }
.erros-figuras figcaption { text-align: center; color: var(--branco); font-weight: 800; margin-top: 4px; }
.erros-cena { width: 100%; display: block; border-radius: 18px; box-shadow: var(--sombra); background: #151d48; }
.marcas circle { fill: none; stroke-width: 5; }
.marcas .achado { stroke: #22c55e; animation: aparece .3s; }
.marcas .pista { stroke: #fde047; stroke-dasharray: 8 6; animation: brilha .5s 3; }
.xis { fill: #ef4444; font-size: 26px; text-anchor: middle; font-weight: 900; }
.erros-fato {
  padding: 12px 16px; border-radius: 18px; background: var(--branco); font-size: 19px; font-weight: 700;
  text-align: center; box-shadow: var(--sombra);
}
.pisca { animation: pula .4s cubic-bezier(.2, 1.6, .4, 1); }

/* ---------- pode ou não pode ---------- */
.pergunta {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 22px 18px; border-radius: 28px; background: var(--branco); box-shadow: var(--sombra);
}
.pergunta-emoji { font-size: 90px; line-height: 1.1; }
.pergunta p { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.25; }
.pergunta small { font-size: 17px; opacity: .7; font-weight: 700; }
.respostas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.resposta {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px;
  border-radius: 24px; color: #fff; font-size: 24px; font-weight: 900; text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
.resposta span { font-size: 44px; }
.resposta:active { transform: translateY(4px); }
.resposta-sim { background: #22c55e; box-shadow: 0 6px 0 #15803d; }
.resposta-nao { background: #ef4444; box-shadow: 0 6px 0 #b91c1c; }

/* ---------- tipos de escorpião (Conheça o Tito) ---------- */
.tipos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
.tipos figure { margin: 0; text-align: center; }
.tipos svg { width: 100%; max-width: 90px; }
.tipos figcaption { font-size: 13px; font-weight: 800; line-height: 1.1; }

/* ---------- quiz do escorpião ---------- */
.opcoes { display: flex; flex-direction: column; gap: 10px; }
.opcao {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left;
  border-radius: 22px; background: var(--branco); box-shadow: var(--sombra); border: 4px solid transparent;
  font-size: 20px; font-weight: 800; min-height: 74px; transition: transform .08s;
}
.opcao:active { transform: scale(.98); }
.opcao-letra { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #ede9fe; color: var(--roxo-escuro); font-size: 18px; }
.opcao-emoji { font-size: 40px; width: 54px; text-align: center; flex: none; }
.opcao-arte { width: 64px; flex: none; }
.opcao-arte svg { width: 100%; display: block; }
.opcao-certa { border-color: #22c55e; background: #dcfce7; }
.opcao-errada { border-color: #ef4444; background: #fee2e2; animation: treme .12s 4; }

/* ---------- lanterna mágica ---------- */
.procurar {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 14px;
  border-radius: 20px; background: #fef3c7; font-size: 20px; font-weight: 700; box-shadow: var(--sombra);
}
.procurar-arte { width: 52px; flex: none; }
.procurar-arte svg { width: 100%; display: block; }
.quintal-noite {
  position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 62vh; margin: 0 auto; overflow: hidden;
  border-radius: 26px; touch-action: none;
  background:
    radial-gradient(circle at 82% 9%, #fef3c7 0 5%, rgba(254, 243, 199, .25) 6%, transparent 9%),
    linear-gradient(#0f1538 0%, #22336b 38%, #3d6b2e 38%, #2f5a26 100%);
  box-shadow: var(--sombra);
}
@media (min-aspect-ratio: 1/1) { .quintal-noite { aspect-ratio: 4 / 3; } }
.contagem-grande { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 120px; font-weight: 900; text-shadow: 0 6px 0 rgba(0, 0, 0, .3); }
.bicho-noite {
  position: absolute; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(var(--giro));
  display: grid; place-items: center; animation: surge .25s ease-out; padding: 0;
}
.bicho-noite svg { width: 100%; filter: drop-shadow(0 0 10px rgba(255, 255, 255, .35)); pointer-events: none; }
.bicho-noite .bichinho { width: 80%; }
.bicho-noite.andando { animation: surge .25s ease-out, anda-noite var(--dura) linear forwards; }
@keyframes anda-noite { to { translate: var(--ir-x) var(--ir-y); } }
.bicho-noite.some { opacity: 0; transform: translate(-50%, -50%) rotate(var(--giro)) scale(.4); transition: .25s; pointer-events: none; }
.luz {
  position: absolute; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 251, 200, .9), rgba(255, 251, 200, 0) 70%); animation: apaga .5s forwards;
}
.rotulo {
  position: absolute; transform: translate(-50%, -140%); padding: 4px 12px; border-radius: 999px; color: #fff;
  font-size: 17px; font-weight: 900; white-space: nowrap; pointer-events: none; animation: sobe 1.3s forwards;
}
@keyframes surge { from { transform: translate(-50%, -50%) rotate(var(--giro)) scale(.2); opacity: 0; } }
@keyframes apaga { to { opacity: 0; transform: translate(-50%, -50%) scale(1.4); } }
@keyframes sobe { to { transform: translate(-50%, -260%); opacity: 0; } }

/* ---------- abertura das brincadeiras e níveis ---------- */
.abertura {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--e2); text-align: center;
  padding: var(--e6) var(--e5) var(--e5); border-radius: var(--r-2xl); background: var(--branco); color: var(--tinta); box-shadow: var(--sombra-2);
}
.abertura h2 { margin: 0; font-size: clamp(22px, 5.4vw, 30px); line-height: var(--linha-titulo); }
.abertura p { margin: 0; font-size: var(--t-md); line-height: var(--linha-texto); max-width: 540px; color: var(--n-700); }
.abertura-arte { width: 112px; }
.abertura-arte svg { width: 100%; display: block; }
.abertura-rotulo { margin: var(--e2) 0 0; color: rgba(255, 255, 255, .72); font-size: var(--t-xs); font-weight: var(--peso-forte); letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.niveis { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; align-self: center; padding: 5px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.nivel {
  display: inline-flex; align-items: center; gap: var(--e2); min-height: 44px; padding: 8px 16px; border-radius: var(--r-md);
  color: rgba(255, 255, 255, .85); font-size: var(--t-base); font-weight: var(--peso-forte);
  transition: background var(--d-rapida) var(--curva), color var(--d-rapida) var(--curva);
}
@media (hover: hover) and (pointer: fine) { .nivel:hover:not(.escolhido) { background: rgba(255, 255, 255, .08); color: #fff; } }
.nivel.escolhido { background: var(--branco); color: var(--n-900); box-shadow: var(--sombra-1); }
/* As barrinhas do nível (1 a 4), no lugar dos emojis. */
.nivel-barras { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.nivel-barras i { display: block; width: 4px; border-radius: 2px; background: currentColor; opacity: .28; }
.nivel-barras i:nth-child(1) { height: 5px; }
.nivel-barras i:nth-child(2) { height: 8px; }
.nivel-barras i:nth-child(3) { height: 11px; }
.nivel-barras i:nth-child(4) { height: 14px; }
.nivel-barras i.cheia { opacity: 1; }
.nivel.escolhido .nivel-barras i.cheia { color: var(--marca); }
.janela-nota { font-size: var(--t-base) !important; font-weight: var(--peso-medio); color: var(--n-500) !important; }

/* ---------- menu, aula e trilha ---------- */
.secao { margin: var(--e2) 0 0; color: var(--branco); font-size: var(--t-lg); font-weight: var(--peso-forte); }
.aula-faixa {
  display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; border-radius: var(--raio);
  background: linear-gradient(120deg, #fde047, #fb923c); box-shadow: 0 6px 0 #c2410c, 0 12px 24px rgba(42, 26, 94, .25);
}
.aula-faixa:active { transform: translateY(4px); box-shadow: 0 2px 0 #c2410c; }
.aula-faixa-emoji { font-size: 50px; flex: none; }
.aula-faixa strong { font-size: 24px; }
.aula-faixa small { font-size: 16px; opacity: .85; }
.aula-faixa-seta { margin-left: auto; font-size: 26px; font-weight: 900; }
.brincadeira { position: relative; }
.selo-novo {
  position: absolute; top: 8px; right: 10px; padding: 2px 10px; border-radius: 999px;
  background: #ec4899; color: #fff; font-size: 13px; font-weight: 900; text-transform: uppercase;
}
.trilha { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trilha-item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left;
  border-radius: var(--raio); background: var(--branco); box-shadow: var(--sombra);
}
.trilha-item:active { transform: scale(.98); }
.trilha-numero {
  width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--roxo); color: #fff; font-weight: 900; font-size: 19px;
}
.trilha-item.vista .trilha-numero { background: #22c55e; }
.trilha-emoji { font-size: 34px; flex: none; }
.capitulo-cabeca {
  align-self: center; display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .25); color: #fff; font-size: 19px;
}
.capitulo-cabeca span { font-size: 26px; }
.licao.conversa { background: #fef3c7; border: 4px dashed #f59e0b; }
.conversa-pergunta { font-size: 24px !important; font-weight: 800; }
.conversa-dica { font-size: 15px; opacity: .75; font-weight: 700; }
.capitulo-fim { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.capitulo-fim[hidden], .licao-botoes [hidden] { display: none; }
/* O escorpião com uma parte em destaque: as outras ficam apagadas. */
.destaca .patas, .destaca .pinca, .destaca .rabo, .destaca .tronco, .destaca .olhos { opacity: .25; }
.destaca-olhos .tronco { opacity: .6; }
.destaca-pinca .pinca, .destaca-rabo .rabo, .destaca-olhos .olhos, .destaca-patas .patas {
  opacity: 1; transform-box: fill-box; transform-origin: center; animation: realce 1.1s ease-in-out infinite;
}
@keyframes realce { 50% { transform: scale(1.12); } }

/* ---------- o susto ---------- */
.susto {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; pointer-events: none; overflow: hidden;
  background: radial-gradient(circle, rgba(127, 29, 29, .35), rgba(69, 10, 10, .93) 70%); animation: susto-fundo .45s ease-out;
}
.susto-bicho { width: min(94vmin, 640px); animation: susto-pulo .3s cubic-bezier(.15, 1.6, .4, 1) both, susto-treme .07s .3s infinite; }
.susto-bicho svg { width: 100%; display: block; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .6)); }
.susto-grito {
  position: absolute; top: 7%; font-size: clamp(64px, 20vmin, 170px); font-weight: 900; letter-spacing: 2px;
  color: #fde047; -webkit-text-stroke: 4px #7f1d1d; text-shadow: 0 8px 0 #450a0a; transform: rotate(-8deg);
  animation: pula .25s .08s both;
}
.susto-leve .susto-bicho { width: min(72vmin, 480px); }
.susto-leve .susto-grito { font-size: clamp(48px, 14vmin, 110px); }
.susto.some { opacity: 0; transition: opacity .3s; }
body.tremendo #app { animation: treme-tela .08s infinite; }
@keyframes susto-fundo { 0% { background: #fff; } 18% { background: rgba(220, 38, 38, .92); } }
@keyframes susto-pulo { from { transform: translateY(45vh) scale(.12) rotate(-25deg); } to { transform: none; } }
@keyframes susto-treme { 0%, 100% { transform: none; } 25% { transform: translate(-7px, 4px) rotate(-2deg); } 75% { transform: translate(7px, -4px) rotate(2deg); } }
@keyframes treme-tela { 0%, 100% { transform: none; } 50% { transform: translate(5px, -3px); } }

/* ---------- barra de tempo (Tira o Dedo, quiz e cartões) ---------- */
.barra-tempo { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.barra-tempo i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #fde047, #f97316); transition: width .1s linear; }
.barra-contra i { width: 100%; background: linear-gradient(90deg, #ef4444, #fde047); }
.barra-tempo.escondida { visibility: hidden; }
.bicho.fino svg { transform: scale(.78, .9); }
.bicho-segundo { width: 20%; }
.erros-tempo.acabando { color: #fecaca; animation: pulsa-texto .5s infinite; }
@keyframes pulsa-texto { 50% { transform: scale(1.15); } }
.marcas .faltou, .casa-svg .faltou { fill: none; stroke: #fde047; stroke-width: 5; stroke-dasharray: 8 6; animation: brilha .6s infinite; }

/* ---------- pilha do susto ---------- */
.pilha-moldura { border-radius: 26px; overflow: hidden; box-shadow: var(--sombra); background: #1b1535; }
.pilha-cena { width: 100%; display: block; touch-action: manipulation; }
.pilha-gente { display: flex; flex-wrap: wrap; gap: 6px; font-size: 15px; }
.contagem-item.fora { opacity: .55; text-decoration: line-through; }
.peca-pilha { cursor: pointer; transform-box: fill-box; transform-origin: center; }
.peca-pilha .contorno { fill: none; stroke: #fde047; stroke-width: 2.5; opacity: 0; }
.peca-pilha.livre .contorno { opacity: .9; animation: brilha 1.4s ease-in-out infinite; }
.peca-pilha.presa { animation: treme-peca .09s 4; }
.peca-pilha.levantando { animation: levanta .45s ease-in-out infinite; }
.peca-pilha.levantando .contorno { opacity: 0; }
.peca-pilha.indo { transform: translate(var(--vai-x), var(--vai-y)) scale(.35); opacity: 0; transition: transform .6s ease-in, opacity .6s ease-in; pointer-events: none; }
.espia { animation: espia 1s ease-in-out forwards; pointer-events: none; }
.corre-escondido { animation: corre-esc .5s linear forwards; pointer-events: none; }
.bicho-fora, .escorpiao-fora { animation: sai .3s ease-out; pointer-events: none; }
.bicho-fora-anda { transition: transform 1.1s ease-in; }
.carrinho-conta { font-size: 20px; font-weight: 900; fill: #fff; stroke: #14532d; stroke-width: 4; paint-order: stroke; }
@keyframes treme-peca { 0%, 100% { transform: none; } 50% { transform: translateX(3px); } }
@keyframes levanta { 0%, 100% { transform: translateY(-7px) rotate(-1deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
@keyframes espia { 0% { opacity: 0; transform: translateY(8px); } 25%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(8px); } }
@keyframes corre-esc { from { opacity: 1; } 80% { opacity: 1; } to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
@keyframes sai { from { transform: scale(.3); opacity: 0; } }

/* ---------- monte o escorpião ---------- */
.monte-area { padding: 12px; border-radius: 26px; background: radial-gradient(circle, #fef9c3, #fde68a); box-shadow: var(--sombra); }
.monte-molde { width: 100%; max-width: 330px; max-height: 44vh; display: block; margin: 0 auto; overflow: visible; }
.sombra [fill="none"] { fill: none !important; }
.nivel-1 .sombra * { fill: rgba(255, 255, 255, .6); stroke: rgba(120, 53, 15, .38); stroke-dasharray: 4 3; }
.nivel-2 .sombra *, .nivel-3 .sombra[data-p="corpo"] * { fill: rgba(42, 26, 94, .16); stroke: rgba(42, 26, 94, .16); }
.nivel-3 .sombra:not([data-p="corpo"]) { display: none; }
.sombra.coberta { opacity: 0; }
.posta { opacity: 0; }
.posta.encaixada { opacity: 1; transform-box: fill-box; transform-origin: center; animation: sai .35s cubic-bezier(.2, 1.6, .4, 1); }
.monte-molde.vivo { animation: balanca 1.2s ease-in-out infinite; }
.monte-molde.vivo .posta[data-p="rabo"], .monte-molde.vivo .posta[data-p="ferrao"] {
  transform-box: view-box; transform-origin: 100px 152px; animation: abana .35s ease-in-out infinite alternate;
}
@keyframes abana { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.bandeja { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bandeja-item {
  aspect-ratio: 1; padding: 6px; border-radius: 18px; background: var(--branco); box-shadow: var(--sombra);
  display: grid; place-items: center; touch-action: none;
}
.bandeja-item svg { width: 100%; height: 100%; pointer-events: none; }
.bandeja-item.pegou { opacity: .3; }
.arrasto { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .35)); }
.arrasto svg { width: 100%; height: 100%; display: block; }

/* ---------- seguro ou perigoso ---------- */
.mesa { position: relative; min-height: 250px; display: grid; place-items: center; }
.cartao-situacao {
  width: min(100%, 420px); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 22px 18px; border-radius: 28px; background: var(--branco); box-shadow: var(--sombra); border: 5px solid transparent;
  touch-action: none; transition: transform .12s, border-color .12s;
}
.cartao-situacao p { margin: 0; font-size: 25px; font-weight: 800; line-height: 1.25; }
.cartao-situacao.pende-sim { border-color: #22c55e; }
.cartao-situacao.pende-nao { border-color: #ef4444; }
.cartao-situacao.vai-sim { transform: translateX(130%) rotate(18deg) !important; opacity: 0; transition: transform .4s ease-in, opacity .4s; }
.cartao-situacao.vai-nao { transform: translateX(-130%) rotate(-18deg) !important; opacity: 0; transition: transform .4s ease-in, opacity .4s; }
.cartao-situacao.errou { animation: treme .12s 4; border-color: #f97316; }
.seguro-porque { min-height: 54px; }
.seguro-porque.certo { background: #dcfce7; }
.seguro-porque.errado { background: #ffedd5; }

/* ---------- memória ---------- */
.memoria { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.memoria-6 { grid-template-columns: repeat(3, 1fr); }
@media (min-aspect-ratio: 1/1) { .memoria-6, .memoria-8 { grid-template-columns: repeat(4, 1fr); } .memoria-10 { grid-template-columns: repeat(5, 1fr); } }
.carta { aspect-ratio: 3 / 4; padding: 0; perspective: 700px; max-height: 18vh; width: 100%; justify-self: center; }
@media (min-aspect-ratio: 1/1) { .carta { max-height: none; } }
.carta-dentro { position: relative; width: 100%; height: 100%; transition: transform .4s; transform-style: preserve-3d; }
.carta.virada .carta-dentro { transform: rotateY(180deg); }
.carta-verso, .carta-frente {
  position: absolute; inset: 0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 4px 0 rgba(42, 26, 94, .25);
}
.carta-verso {
  background: repeating-linear-gradient(45deg, #6d4ce0 0 10px, #7c5cf0 10px 20px); font-size: clamp(24px, 7vw, 40px);
  border: 3px solid #fff;
}
.carta-frente { background: var(--branco); transform: rotateY(180deg); border: 4px solid #ede9fe; padding: 4px; }
.carta.achada .carta-frente { border-color: var(--cor); background: #f0fdf4; }
.carta-arte { width: 70%; }
.carta-arte svg { width: 100%; display: block; }
.carta-emoji { font-size: clamp(28px, 8vw, 48px); line-height: 1.1; }
.carta-frente small { font-size: 12px; font-weight: 800; line-height: 1.1; text-align: center; }

/* ---------- casa segura ---------- */
.chegando { display: flex; align-items: center; gap: 8px; }
.chegando-casa { font-size: 30px; }
.chegando-trilho { position: relative; flex: 1; height: 38px; margin-right: 20px; border-radius: 999px; background: rgba(255, 255, 255, .25); }
.chegando-bicho { position: absolute; top: 50%; left: 100%; width: 36px; transform: translate(-50%, -50%) rotate(-90deg); transition: left .1s linear; }
.chegando-bicho svg { width: 100%; display: block; }
.chegando-bicho.volta { left: 100% !important; transform: translate(-50%, -50%) rotate(90deg); transition: left 2s ease-in; }
.casa-cena { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--sombra); }
.casa-svg { width: 100%; display: block; touch-action: manipulation; }

/* ---------- animações ---------- */
@keyframes aparece { from { opacity: 0; } }
@keyframes pula { from { transform: scale(.6); opacity: 0; } }
@keyframes janela-entra { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.balao { animation-name: balao; }
@keyframes balao { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }
@keyframes entra { from { transform: translateX(30px); opacity: 0; } }
@keyframes cai { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes treme { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pulsa { 50% { transform: translate(-50%, -50%) scale(1.06); } }
@keyframes brilha { 50% { opacity: .2; } }
@keyframes balanca { 50% { transform: rotate(6deg) translateY(-4px); } }
@keyframes rabo { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) {
  .apresenta-tito, .alvo, .tela-entra, .janela, .janela-caixa, .balao { animation: none; }
}

/* escorpião: vez em destaque, avisos grandes (a voz está desligada), surpresas douradas e até 8 jogadores */
/* Sem voz, o botão de ouvir não faz nada nas telas do escorpião. */
.sem-voz .tela[class*="tela-escorpiao"] .botao-ouvir { display: none; }
/* A vez: o nome maior; na contagem, quem está jogando fica pintado com a cor dele. */
.vez .es-vez-nome { font-size: 24px; }
.es-vez-nome .chip { padding: 3px 14px; }
.contagem-item.es-agora { background: var(--cor); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); transform: scale(1.08); }
.pilha-gente .contagem-item { padding: 3px 9px; }
.es-recado { font-size: clamp(18px, 5vw, 22px); line-height: 1.3; }
.es-placa-escorpioes { align-self: center; padding: 6px 16px; border-radius: 999px; background: rgba(0, 0, 0, .25); color: #fff; font-size: 17px; font-weight: 800; }
.es-fato { min-height: 56px; }
.es-cientifico { display: block; font-size: 11px; font-style: italic; font-weight: 700; opacity: .7; }
.es-pergunta-tipo { font-size: 19px !important; opacity: .8 !important; }
/* Surpresas: a pergunta, o cartão e o par dourados. */
.es-selo-ouro {
  align-self: center; padding: 3px 12px; border-radius: 999px; font-size: 15px; font-weight: 900;
  background: linear-gradient(90deg, #fde047, #f59e0b); color: #713f12; text-shadow: none;
}
.pergunta.es-ouro, .cartao-situacao.es-ouro { background: linear-gradient(#fffbeb, #fff); box-shadow: 0 0 0 5px #f59e0b, var(--sombra); }
.carta-frente.es-carta-ouro { background: #fffbeb; box-shadow: inset 0 0 0 4px #f59e0b, 0 4px 0 rgba(42, 26, 94, .25); }
.es-estrela-casa {
  position: absolute; z-index: 4; width: 13%; aspect-ratio: 1; padding: 0; transform: translate(-50%, -50%);
  animation: es-gira 1.1s ease-in-out infinite;
}
.es-estrela-casa svg { width: 100%; display: block; pointer-events: none; filter: drop-shadow(0 0 10px #fde047); }
.bicho-noite.es-estrela-noite svg { filter: drop-shadow(0 0 12px #fde047); }
.bicho.es-dourado svg { filter: drop-shadow(0 0 8px #facc15) drop-shadow(0 0 16px #fde047); }
@keyframes es-gira { 50% { transform: translate(-50%, -50%) scale(1.15) rotate(12deg); } }
/* Tira o Dedo: o aviso grande dentro da arena. */
.es-aviso-arena {
  position: absolute; left: 0; right: 0; top: 7%; z-index: 5; text-align: center; pointer-events: none; opacity: 0;
  font-size: clamp(30px, 9vw, 54px); font-weight: 900; color: #fff; -webkit-text-stroke: 2px #7f1d1d; text-shadow: 0 4px 0 rgba(0, 0, 0, .35);
}
.es-aviso-arena.ativo { opacity: 1; animation: es-pisca .3s ease-in-out infinite alternate; }
.es-aviso-poe { color: #fde047; -webkit-text-stroke-color: #1e3a8a; }
.arena.es-perigo { box-shadow: inset 0 0 0 10px #ef4444, var(--sombra); }
@keyframes es-pisca { to { transform: scale(1.1); } }
/* Cadê o Escorpião?: o botão de tirar a mão, com a barra do tempo que falta para a picada. */
.es-tira-mao {
  position: absolute; left: 50%; bottom: 5%; z-index: 300; min-width: 62%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 22px; border-radius: 26px;
  background: #ef4444; color: #fff; font-size: clamp(24px, 7vw, 34px); font-weight: 900; box-shadow: 0 6px 0 #991b1b;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .25); touch-action: manipulation; animation: es-chama .3s ease-in-out infinite alternate;
}
.es-tira-mao > span:first-child { font-size: 1.3em; line-height: 1; }
.es-tira-barra { display: block; width: 100%; height: 10px; margin-top: 6px; border-radius: 999px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.es-tira-barra i { display: block; width: 100%; height: 100%; background: #fde047; transition-property: width; transition-timing-function: linear; }
.es-tira-barra i.vai { width: 0; }
@keyframes es-chama { to { transform: translateX(-50%) scale(1.06); } }
/* Lanterna Mágica: o pedido grande na contagem e o rótulo que quebra a linha. */
.es-procurar { flex-wrap: wrap; padding: 8px 14px; font-size: clamp(19px, 5vw, 24px); text-align: center; }
.es-procurar .procurar-arte { width: 64px; }
.contagem-grande.es-contagem { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(15, 21, 56, .55); }
.es-pedido {
  display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 86%; padding: 10px 18px; border-radius: 22px;
  background: #fef3c7; color: var(--tinta); text-align: center; text-shadow: none; box-shadow: var(--sombra);
}
.es-pedido-arte { width: min(34vw, 140px); }
.es-pedido-arte svg { width: 100%; display: block; }
.es-pedido strong { font-size: clamp(20px, 5.5vw, 28px); line-height: 1.2; }
.es-contagem-numero { font-size: clamp(64px, 18vw, 110px); line-height: 1; }
.es-rotulo { white-space: normal; width: max-content; max-width: 60%; text-align: center; line-height: 1.15; }
@media (prefers-reduced-motion: reduce) { .es-tira-mao, .es-aviso-arena.ativo, .es-estrela-casa { animation: none; } }
