/* =====================================================================
   AlfaBicho: O Safári das Palavras — Design System (protótipo web)
   Estrutura:
     1. Tokens / reset
     2. Shell do "celular"
     3. Botões e pílulas
     4. Tela Home: trilha, unidades, mascote
     5. Navegação inferior
     6. Motor de lição (atividades)
     7. Biblioteca / Loja / Espaço dos Pais
     8. Modal, toast, confete
     9. Animações
   ===================================================================== */

/* ---------- 1. Tokens / reset ---------- */
:root {
  --verde: #22c55e;
  --verde-esc: #15803d;
  --verde-esc2: #14532d;
  --verde-claro: #86efac;
  --amarelo: #facc15;
  --amarelo-esc: #ca8a04;
  --laranja: #fb923c;
  --azul: #38bdf8;
  --azul-esc: #0284c7;
  --rosa: #f472b6;
  --roxo: #a78bfa;
  --creme: #fffbeb;
  --tinta: #1f2937;
  --tinta-fraca: #64748b;
  --erro: #ef4444;
  --erro-esc: #b91c1c;
  --branco: #ffffff;
  --fonte: "Baloo 2", "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif;
  --raio: 1.15rem;
  --sombra-card: 0 6px 0 rgba(20, 83, 45, 0.18), 0 10px 22px rgba(20, 83, 45, 0.12);
}

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--fonte);
  color: var(--tinta);
  background: radial-gradient(circle at 30% 0%, #166534 0%, #052e16 60%, #021a0d 100%);
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}
button { font-family: inherit; border: 0; cursor: pointer; background: none; color: inherit; }
button:disabled { cursor: not-allowed; }

/* ---------- 2. Shell do "celular" ---------- */
.phone-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #bbf7d0;
  isolation: isolate;
}
@media (min-width: 560px) {
  body { display: grid; place-items: center; padding: 18px; }
  .phone-shell {
    height: min(920px, calc(100dvh - 36px));
    border-radius: 42px;
    border: 9px solid #0f172a;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 3px #1e293b;
  }
}

#screen {
  position: relative;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
#screen::-webkit-scrollbar { display: none; }

/* camada de lições/resultados: não bloqueia cliques quando vazia */
.overlay-slot {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}
.overlay-slot > * { pointer-events: auto; }

/* fundo de selva */
.bg-selva {
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 26%),
    linear-gradient(180deg, #dbeafe 0%, #e0f2fe 12%, #d9f99d 34%, #86efac 62%, #4ade80 100%);
  background-attachment: local;
}

/* ---------- 3. Botões e pílulas ---------- */
.btn {
  --sombra: var(--verde-esc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--raio);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: var(--verde);
  border-bottom: 5px solid var(--sombra);
  transition: transform 0.07s ease, filter 0.15s ease;
  will-change: transform;
}
.btn:active:not(:disabled) { transform: translateY(4px); border-bottom-width: 1px; }
.btn:disabled { filter: grayscale(0.6) brightness(0.95); opacity: 0.75; }
.btn-verde { background: var(--verde); --sombra: #166534; }
.btn-amarelo { background: var(--amarelo); --sombra: var(--amarelo-esc); color: #422006; }
.btn-azul { background: var(--azul); --sombra: var(--azul-esc); color: #082f49; }
.btn-rosa { background: var(--rosa); --sombra: #be185d; }
.btn-erro { background: #fecaca; --sombra: #f87171; color: #7f1d1d; }
.btn-branco { background: #fff; --sombra: #cbd5e1; color: var(--tinta); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 0 rgba(20, 83, 45, 0.18);
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1;
}
.pill .ico { font-size: 1.12rem; }
.pill-hearts { color: #be123c; }
.pill-stars { color: #a16207; }
.pill-streak { color: #c2410c; }
.pill-vida-baixa { animation: tremer 0.9s ease-in-out infinite; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem 0.9rem 0.35rem;
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar .dir { display: flex; align-items: center; gap: 0.45rem; }

/* ---------- 4. Home: trilha ---------- */
.trilha { position: relative; padding-bottom: 1rem; }
.trilha-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.trilha-svg .caminho-base {
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-dasharray: 1 20;
}
.trilha-svg .caminho-feito {
  fill: none;
  stroke: #fbbf24;
  stroke-width: 13;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 0 rgba(120, 53, 15, 0.35));
}

.unidade-banner {
  position: relative;
  z-index: 2;
  margin: 1.1rem 1rem 0.4rem;
  padding: 0.72rem 1rem;
  border-radius: 1rem;
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.22);
}
.unidade-banner small { display: block; font-weight: 600; font-size: 0.74rem; opacity: 0.9; }

.no-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 118px;
  padding: 0 1.6rem;
}
.no-row.inicio { justify-content: flex-start; }
.no-row.centro { justify-content: center; }
.no-row.fim { justify-content: flex-end; }

.no {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.55rem;
  color: #fff;
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
  border: 4px solid #fff;
  box-shadow: 0 7px 0 #14532d, 0 12px 20px rgba(6, 78, 59, 0.28);
  transition: transform 0.12s ease, filter 0.2s ease;
}
.no:active { transform: translateY(3px); }
.no .emoji { font-size: 2rem; line-height: 1; }
.no-rotulo {
  position: absolute;
  bottom: -1.35rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 800;
  color: #14532d;
  background: rgba(255, 255, 255, 0.75);
  padding: 0 0.4rem;
  border-radius: 0.4rem;
}
.no--atual {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
  box-shadow: 0 7px 0 #b45309, 0 0 0 8px rgba(253, 224, 71, 0.45), 0 12px 22px rgba(120, 53, 15, 0.3);
  color: #422006;
  animation: flutuar 1.9s ease-in-out infinite;
}
.no--atual::after {
  content: "▶";
  position: absolute;
  top: -2.15rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  color: #b45309;
  animation: apontar 1.2s ease-in-out infinite;
}
.no--feito {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  box-shadow: 0 7px 0 #064e3b, 0 12px 20px rgba(6, 78, 59, 0.25);
}
.no--bloqueado {
  background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
  box-shadow: 0 7px 0 #94a3b8;
  border-color: #f1f5f9;
  color: #94a3b8;
  filter: saturate(0.4);
}
.no--bloqueado .emoji { opacity: 0.55; }
.no-selo {
  position: absolute;
  right: -6px;
  top: -6px;
  font-size: 1.45rem;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}
.no-estrelas {
  position: absolute;
  bottom: -1.7rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

/* mascote flutuante com balão */
.tito-float {
  position: sticky;
  bottom: 6px;
  z-index: 25;
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  padding: 0 0.7rem 0.4rem;
  pointer-events: none;
}
.tito-float .tito-wrap { pointer-events: auto; flex: 0 0 auto; }
.balao {
  pointer-events: auto;
  position: relative;
  margin-bottom: 1.4rem;
  max-width: 13.5rem;
  background: #fff;
  border-radius: 1rem;
  border: 3px solid #14532d;
  padding: 0.55rem 0.75rem;
  font-weight: 700;
  font-size: 0.86rem;
  color: #14532d;
  box-shadow: 0 4px 0 rgba(20, 83, 45, 0.25);
  animation: aparecer 0.3s ease-out;
}
.balao::after {
  content: "";
  position: absolute;
  left: -10px;
  bottom: 8px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 3px solid #14532d;
  border-bottom: 3px solid #14532d;
  transform: rotate(45deg);
}

/* ---------- 5. Navegação inferior ---------- */
#bottomnav {
  flex: 0 0 auto;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.2rem;
  padding: 0.45rem 0.4rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 3px solid #dcfce7;
  box-shadow: 0 -6px 18px rgba(6, 78, 59, 0.12);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.35rem 0.2rem;
  border-radius: 0.85rem;
  font-size: 0.66rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}
.nav-item .ico { font-size: 1.5rem; line-height: 1; filter: grayscale(0.55); }
.nav-item.ativo { color: #15803d; background: #dcfce7; }
.nav-item.ativo .ico { filter: none; transform: scale(1.08); }
.nav-item:active { transform: scale(0.94); }
.phone-shell.modo-licao #bottomnav { display: none; }

/* ---------- 6. Motor de lição ---------- */
.lesson {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  z-index: 20;
}
.lesson-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem 0.4rem;
}
.btn-x {
  font-size: 1.5rem;
  font-weight: 800;
  color: #94a3b8;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
}
.btn-x:active { background: #e2e8f0; }
.barra-progresso {
  flex: 1 1 auto;
  height: 16px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.12);
}
.barra-progresso > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  transition: width 0.35s ease;
}
.lesson-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
}
.lesson-footer {
  flex: 0 0 auto;
  padding: 0.8rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  border-top: 3px solid #d1fae5;
  background: #fff;
}
.titulo-rodada {
  font-size: 1.3rem;
  font-weight: 800;
  text-align: center;
  color: #14532d;
  line-height: 1.25;
  margin: 0.35rem 0 0.15rem;
}
.sub-rodada {
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--tinta-fraca);
  margin-bottom: 0.6rem;
}
.btn-ouvir {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 auto 0.6rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #e0f2fe;
  border-bottom: 4px solid #7dd3fc;
  color: #075985;
  font-weight: 800;
  font-size: 0.9rem;
}
.btn-ouvir:active { transform: translateY(3px); border-bottom-width: 1px; }

/* múltipla escolha (Escute e toque) */
.grade-opcoes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin-top: 0.4rem;
}
.grade-opcoes.quatro { grid-template-columns: repeat(2, 1fr); }
.opcao {
  position: relative;
  min-height: 84px;
  border-radius: 1.1rem;
  background: #fff;
  border: 3px solid #d1fae5;
  border-bottom-width: 6px;
  border-bottom-color: #a7f3d0;
  font-size: 2rem;
  font-weight: 800;
  color: #14532d;
  display: grid;
  place-items: center;
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}
.opcao:active { transform: translateY(3px); }
.opcao.certa { background: #dcfce7; border-color: #22c55e; border-bottom-color: #15803d; }
.opcao.errada { background: #fee2e2; border-color: #f87171; border-bottom-color: #b91c1c; }
.opcao.pequena { font-size: 1.15rem; min-height: 74px; }
.opcao .emoji-opt { font-size: 1.9rem; display: block; }
.opcao .txt-opt { font-size: 0.86rem; font-weight: 800; color: #334155; display: block; margin-top: 0.1rem; }

/* --- A) Fábrica de Sílabas --- */
.fabrica {
  position: relative;
  flex: 1 1 auto;
  min-height: 300px;
  margin: 0.2rem 0;
}
.fabrica-centro {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 132px;
  height: 132px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  background: radial-gradient(circle at 35% 28%, #4ade80, #15803d);
  border: 5px solid #fff;
  box-shadow: 0 9px 0 #14532d, 0 0 0 12px rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  z-index: 3;
}
.fabrica-centro.pulso { animation: pulsar 1.6s ease-in-out infinite; }
.fabrica-centro.combinada {
  background: radial-gradient(circle at 35% 28%, #fde047, #ea580c);
  box-shadow: 0 9px 0 #7c2d12, 0 0 0 12px rgba(253, 224, 71, 0.5);
  transform: translate(-50%, -50%) scale(1.08);
}
.fabrica-centro .composta { font-size: 2.6rem; letter-spacing: -0.02em; }

.vogal {
  position: absolute;
  width: 66px;
  height: 66px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: #7c2d12;
  background: linear-gradient(180deg, #fef9c3, #fde047);
  border: 4px solid #fff;
  box-shadow: 0 6px 0 #ca8a04;
  transform: translate(-50%, -50%);
  touch-action: none;
  z-index: 4;
  transition: box-shadow 0.15s ease, filter 0.15s ease;
}
.vogal:active { filter: brightness(1.06); }
.vogal.selecionada {
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.45), 0 6px 0 #ca8a04;
}
.is-dragging { opacity: 0.35; }
.drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transform: translate3d(-9999px, -9999px, 0);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.35));
  scale: 1.12;
}
.drop-active {
  outline: 5px dashed #f59e0b !important;
  outline-offset: 4px;
  filter: brightness(1.05);
}
.dica-rodape {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  margin-top: 0.35rem;
}

/* --- B) Quebra-cabeça de palavras --- */
.imagem-palavra {
  align-self: center;
  width: 148px;
  height: 148px;
  border-radius: 1.6rem;
  background: radial-gradient(circle at 50% 35%, #ffffff, #dbeafe);
  border: 4px solid #fff;
  box-shadow: var(--sombra-card);
  display: grid;
  place-items: center;
  font-size: 5rem;
  line-height: 1;
  margin: 0.3rem 0 0.7rem;
  animation: aparecer 0.3s ease-out;
}
.slots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.4rem 0 1rem;
}
.slot {
  min-width: 86px;
  height: 78px;
  padding: 0 0.5rem;
  border-radius: 1rem;
  border: 4px dashed #a7f3d0;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: #14532d;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.slot.preenchido {
  border-style: solid;
  border-color: #22c55e;
  background: #fff;
  box-shadow: 0 5px 0 #15803d;
}
.slot.destino-ativo { background: #fef9c3; border-color: #f59e0b; }
.tray {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.7rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.55);
  border: 3px dashed #bbf7d0;
  min-height: 96px;
  align-items: center;
}
.bloco {
  min-width: 76px;
  height: 68px;
  padding: 0 0.7rem;
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #ffffff, #e0f2fe);
  border: 3px solid #7dd3fc;
  border-bottom-width: 6px;
  border-bottom-color: #0284c7;
  font-size: 1.5rem;
  font-weight: 800;
  color: #075985;
  display: grid;
  place-items: center;
  touch-action: none;
  transition: transform 0.1s ease;
}
.bloco:active { transform: translateY(3px); }
.bloco.selecionado { box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.4); }
.bloco.usado { visibility: hidden; }

/* feedback (rodapé da lição) */
.painel-feedback {
  border-radius: 1.1rem 1.1rem 0 0;
  padding: 0.75rem 1rem;
  animation: subir 0.22s ease-out;
}
.painel-feedback.ok { background: #dcfce7; }
.painel-feedback.nok { background: #fee2e2; }
.painel-feedback .linha { display: flex; align-items: center; gap: 0.55rem; }
.painel-feedback .titulo { font-weight: 800; font-size: 1.1rem; }
.painel-feedback.ok .titulo { color: #166534; }
.painel-feedback.nok .titulo { color: #991b1b; }
.painel-feedback .detalhe { font-size: 0.84rem; font-weight: 600; color: #334155; margin-top: 0.15rem; }
.painel-feedback .detalhe b { color: #166534; }
.painel-feedback.nok .detalhe b { color: #991b1b; }

/* ---------- 7. Resultado ---------- */
.resultado {
  position: absolute;
  inset: 0;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.4rem;
  text-align: center;
  background: linear-gradient(180deg, #dbeafe 0%, #d9f99d 45%, #86efac 100%);
}
.resultado h1 { font-size: 1.9rem; font-weight: 800; color: #14532d; margin: 0; line-height: 1.1; }
.card-premio {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.4rem;
}
.premio {
  min-width: 96px;
  padding: 0.6rem 0.8rem;
  border-radius: 1rem;
  background: #fff;
  border-bottom: 5px solid #cbd5e1;
  box-shadow: var(--sombra-card);
}
.premio .ico { font-size: 1.7rem; }
.premio .val { font-size: 1.25rem; font-weight: 800; color: #14532d; }
.premio .rot { font-size: 0.68rem; font-weight: 700; color: #64748b; text-transform: uppercase; }

/* ---------- 8. Biblioteca ---------- */
.tela { padding: 0.4rem 1rem 1.4rem; }
.tela-titulo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #14532d;
  margin: 0.6rem 0 0.2rem;
}
.tela-sub { font-size: 0.86rem; font-weight: 600; color: #166534; margin-bottom: 0.8rem; }
.grade-palavras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.card-palavra {
  border-radius: 1.1rem;
  background: #fff;
  border: 3px solid #dcfce7;
  border-bottom-width: 6px;
  border-bottom-color: #bbf7d0;
  padding: 0.7rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  transition: transform 0.1s ease;
}
.card-palavra:active { transform: translateY(3px); }
.card-palavra .emoji { font-size: 2.3rem; line-height: 1; }
.card-palavra .palavra { font-weight: 800; font-size: 1.02rem; color: #14532d; }
.card-palavra .silabas { font-size: 0.7rem; font-weight: 700; color: #0ea5e9; letter-spacing: 0.08em; }
.card-palavra.bloqueada { background: #f1f5f9; border-color: #e2e8f0; border-bottom-color: #cbd5e1; color: #94a3b8; }
.card-palavra.bloqueada .emoji { filter: grayscale(1) opacity(0.45); }
.card-palavra.bloqueada .palavra { color: #94a3b8; }

/* ---------- 9. Loja ---------- */
.vitrine-tito {
  position: relative;
  border-radius: 1.3rem;
  background: radial-gradient(circle at 50% 30%, #fef9c3, #bbf7d0);
  border: 4px solid #fff;
  box-shadow: var(--sombra-card);
  padding: 0.6rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
}
.grade-loja { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
.card-item {
  border-radius: 1.1rem;
  background: #fff;
  border: 3px solid #e2e8f0;
  border-bottom-width: 6px;
  border-bottom-color: #cbd5e1;
  padding: 0.6rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  transition: transform 0.1s ease;
}
.card-item:active { transform: translateY(3px); }
.card-item .emoji { font-size: 2.2rem; line-height: 1; }
.card-item .nome { font-size: 0.78rem; font-weight: 800; color: #334155; text-align: center; line-height: 1.15; }
.card-item .preco {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #a16207;
  background: #fef9c3;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.card-item.equipado { border-color: #22c55e; border-bottom-color: #15803d; background: #f0fdf4; }
.card-item.equipado .preco { color: #166534; background: #dcfce7; }
.card-item.comprado { border-color: #bae6fd; border-bottom-color: #7dd3fc; }
.card-item.comprado .preco { color: #075985; background: #e0f2fe; }

/* ---------- 10. Espaço dos Pais ---------- */
.card-info {
  background: #fff;
  border-radius: 1.1rem;
  border: 3px solid #e2e8f0;
  border-bottom-width: 6px;
  border-bottom-color: #cbd5e1;
  padding: 0.8rem;
  margin-bottom: 0.7rem;
}
.stat-linha { display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 0; font-weight: 700; font-size: 0.92rem; color: #334155; }
.stat-linha + .stat-linha { border-top: 2px dashed #e2e8f0; }
.stat-linha b { color: #14532d; font-size: 1.02rem; }
.alternador {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.5rem 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: #334155;
}
.switch {
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.2s ease;
  flex: 0 0 auto;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.switch.on { background: #22c55e; }
.switch.on::after { transform: translateX(24px); }

/* ---------- 11. Modal / toast / confete ---------- */
#modal-root {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 1.2rem;
  background: rgba(6, 78, 59, 0.55);
  backdrop-filter: blur(3px);
}
#modal-root.aberto { display: grid; }
.modal {
  width: 100%;
  max-width: 22rem;
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.1rem;
  text-align: center;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
  animation: aparecer 0.22s ease-out;
}
.modal h3 { margin: 0.2rem 0 0.3rem; font-size: 1.25rem; font-weight: 800; color: #14532d; }
.modal p { margin: 0 0 0.9rem; font-size: 0.9rem; font-weight: 600; color: #475569; line-height: 1.3; }
.modal .emoji-grande { font-size: 3rem; line-height: 1; }
.modal input {
  width: 100%;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 800;
  text-align: center;
  padding: 0.55rem;
  border-radius: 0.9rem;
  border: 3px solid #cbd5e1;
  outline: none;
  color: #14532d;
}
.modal input:focus { border-color: #22c55e; }

#toast-root {
  position: absolute;
  left: 0;
  right: 0;
  top: 4.2rem;
  z-index: 95;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}
.toast {
  background: rgba(20, 83, 45, 0.94);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  animation: subir 0.25s ease-out;
}

#fx {
  position: absolute;
  inset: 0;
  z-index: 96;
  pointer-events: none;
  display: block;
}

/* ---------- 12. Animações ---------- */
@keyframes flutuar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes apontar { 0%, 100% { transform: translate(-50%, 0); opacity: 0.85; } 50% { transform: translate(-50%, 5px); opacity: 1; } }
@keyframes pulsar {
  0%, 100% { box-shadow: 0 9px 0 #14532d, 0 0 0 10px rgba(255, 255, 255, 0.35); }
  50% { box-shadow: 0 9px 0 #14532d, 0 0 0 18px rgba(255, 255, 255, 0.12); }
}
@keyframes tremer {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px) rotate(-2deg); }
  40% { transform: translateX(3px) rotate(2deg); }
  60% { transform: translateX(-2px) rotate(-1deg); }
  80% { transform: translateX(2px) rotate(1deg); }
}
@keyframes sacudir {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-9px) rotate(-2deg); }
  30% { transform: translateX(9px) rotate(2deg); }
  45% { transform: translateX(-7px); }
  60% { transform: translateX(7px); }
  80% { transform: translateX(-3px); }
}
@keyframes aparecer { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes estourar { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes brilhar {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(250, 204, 21, 0)); }
  50% { filter: drop-shadow(0 0 12px rgba(250, 204, 21, 0.95)); }
}
.anim-sacudir { animation: sacudir 0.45s ease-in-out; }
.anim-estourar { animation: estourar 0.4s ease-out; }
.anim-brilhar { animation: brilhar 1.4s ease-in-out infinite; }

/* mascote */
.tito-wrap { position: relative; line-height: 0; }
.tito-svg { display: block; height: auto; }
.tito-acc {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  line-height: 1;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.28));
}

/* fogo da ofensiva */
.fogo { display: inline-block; animation: tremer-fogo 1.1s ease-in-out infinite; transform-origin: bottom center; }
@keyframes tremer-fogo {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.13) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
