/* Secao 561: Kids English (portal infantil). Celular em pe, tablet deitado. Botoes grandes,
   pouco texto, tudo falado. Fonte Andika: desenhada para quem esta aprendendo a ler. */
:root {
  --bg: #fff8ec; --panel: #ffffff; --ink: #2b2340; --muted: #6f6787; --line: #f0e3cc; --sunk: #f6efe2;
  --sol: #ffc93c; --ceu: #3fa7f5; --grama: #3cbf7a; --coral: #ff6f61; --uva: #8f6bf2;
  --sol-soft: #fff1c7; --ceu-soft: #dcefff; --grama-soft: #d9f5e6; --coral-soft: #ffe1dd; --uva-soft: #ece4ff;
  --shadow: 0 4px 0 rgba(43, 35, 64, .10), 0 10px 26px rgba(43, 35, 64, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1729; --panel: #262036; --ink: #f4efff; --muted: #b6aecb; --line: #3a3150; --sunk: #2f2842;
    --sol-soft: #4a3d13; --ceu-soft: #16324a; --grama-soft: #173a2a; --coral-soft: #4a2420; --uva-soft: #2f2650;
    --shadow: 0 4px 0 rgba(0,0,0,.35), 0 10px 26px rgba(0,0,0,.3); color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.45 Andika, system-ui, sans-serif; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
h1, h2, h3, .f { font-family: Fredoka, Andika, sans-serif; font-weight: 700; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
:focus-visible { outline: 4px solid var(--ceu); outline-offset: 3px; }
#app { max-width: 1100px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(28px + env(safe-area-inset-bottom, 0px)); min-height: 100%; }
.card { background: var(--panel); border-radius: 26px; box-shadow: var(--shadow); padding: 18px; }
.centro { min-height: 82vh; display: grid; place-items: center; text-align: center; }
.centro > .card { width: 100%; }
.dica { color: var(--muted); margin: 0; }
.big { border: 0; border-radius: 22px; padding: 14px 22px; font-family: Fredoka, sans-serif; font-weight: 700; font-size: 19px; box-shadow: 0 4px 0 rgba(0,0,0,.15); display: inline-flex; gap: 8px; align-items: center; justify-content: center; color: #2b2340; min-height: 56px; }
.big:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.big:disabled { opacity: .45; }
.sol { background: var(--sol); } .ceu { background: var(--ceu); color: #fff; } .grama { background: var(--grama); color: #fff; } .coral { background: var(--coral); color: #fff; } .uva { background: var(--uva); color: #fff; }
.leve { background: var(--panel); border: 3px solid var(--line); box-shadow: none; }
.botoes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.voltar { border: 0; background: var(--panel); border-radius: 18px; width: 54px; height: 54px; font-size: 26px; box-shadow: var(--shadow); flex: none; }
.barra-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.barra-top h2 { font-size: 24px; }
.pill { background: var(--panel); border-radius: 999px; padding: 6px 14px; box-shadow: var(--shadow); display: inline-flex; gap: 6px; align-items: center; font-family: Fredoka, sans-serif; font-weight: 700; font-size: 20px; border: 0; }
.ml { margin-left: auto; }

/* entrada */
.logo { font-size: 84px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.08)); }
.codigo { font: 700 34px Fredoka, monospace; letter-spacing: .25em; text-align: center; text-transform: uppercase; width: 100%; max-width: 360px; border: 4px solid var(--line); border-radius: 22px; padding: 12px; background: var(--panel); }
.erro { color: var(--coral); font-weight: 700; min-height: 1.4em; margin: 8px 0 0; }
.lgpd { text-align: left; max-width: 620px; font-size: 16px; }
.lgpd li { margin-bottom: 6px; }
.lgpd input[type=text] { width: 100%; border: 3px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--panel); }

/* quem vai brincar */
.criancas { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 18px; }
.crianca { border: 0; background: var(--panel); border-radius: 28px; padding: 18px 22px; box-shadow: var(--shadow); display: grid; justify-items: center; gap: 6px; min-width: 150px; }
.crianca .av { font-size: 76px; line-height: 1; }
.crianca b { font-family: Fredoka, sans-serif; font-size: 22px; }
.senha { display: grid; grid-template-columns: repeat(3, 92px); gap: 12px; justify-content: center; margin: 16px 0; }
.senha button { width: 92px; height: 92px; border-radius: 24px; border: 4px solid var(--line); background: var(--panel); font-size: 50px; box-shadow: var(--shadow); }
.senha button.on { border-color: var(--uva); background: var(--uva-soft); }
.pontos { display: flex; gap: 10px; justify-content: center; }
.pontos i { width: 18px; height: 18px; border-radius: 50%; background: var(--line); }
.pontos i.on { background: var(--uva); }
.treme { animation: nao .4s; }
@keyframes nao { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }

/* home */
.avatar { width: 62px; height: 62px; border-radius: 50%; background: var(--sol); display: grid; place-items: center; font-size: 38px; box-shadow: var(--shadow); border: 0; flex: none; }
.oi h1 { font-size: 26px; }
.oi small { color: var(--muted); display: block; font-size: 15px; }
.recado { display: flex; gap: 12px; align-items: center; background: var(--uva-soft); border-radius: 22px; padding: 12px 14px; margin-bottom: 12px; }
.recado .foto { width: 50px; height: 50px; border-radius: 50%; background: var(--uva); color: #fff; display: grid; place-items: center; font-size: 26px; flex: none; }
.recado .txt { flex: 1; min-width: 0; }
.recado b { font-family: Fredoka, sans-serif; }
.niveis { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 4px 0 10px; }
.nivel { border: 3px solid transparent; background: var(--panel); border-radius: 999px; padding: 8px 16px; font-family: Fredoka, sans-serif; font-weight: 700; font-size: 16px; white-space: nowrap; box-shadow: var(--shadow); }
.nivel[aria-pressed="true"] { border-color: var(--uva); }
.nivel.trancado { opacity: .5; }
.trilha { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.parada { border: 0; background: var(--panel); border-radius: 28px; padding: 14px 10px 12px; box-shadow: var(--shadow); display: grid; justify-items: center; gap: 4px; text-align: center; position: relative; }
.parada .bola { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; border: 5px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,.08); }
.parada b { font-family: Fredoka, sans-serif; font-size: 17px; line-height: 1.15; }
.parada small { color: var(--muted); font-size: 13px; }
.parada.feita .bola { background: var(--grama); }
.parada.agora .bola { background: var(--sol); animation: pula 1.6s infinite; }
.parada.aberta .bola { background: var(--ceu-soft); }
.parada.trancada { opacity: .55; }
.parada.trancada .bola { background: var(--line); filter: grayscale(1); }
.mini-barra { width: 80%; height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.mini-barra i { display: block; height: 100%; background: var(--grama); }
@keyframes pula { 50% { transform: translateY(-6px); } }

/* licao */
.ativs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ativ { display: flex; gap: 12px; align-items: center; border: 3px solid transparent; background: var(--panel); border-radius: 22px; padding: 12px; box-shadow: var(--shadow); text-align: left; font-family: Fredoka, sans-serif; font-weight: 700; font-size: 18px; }
.ativ .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; flex: none; }
.ativ small { display: block; font-family: Andika, sans-serif; font-weight: 400; color: var(--muted); font-size: 14px; }
.ativ .st { margin-left: auto; font-size: 22px; }
.palco { display: grid; gap: 14px; }
.flash { display: grid; justify-items: center; gap: 6px; padding: 18px; border-radius: 26px; background: var(--ceu-soft); }
.flash .img { font-size: min(150px, 34vw); line-height: 1; border: 0; background: none; }
.flash .img img { max-width: min(260px, 60vw); max-height: 220px; border-radius: 18px; }
.flash .img.toca { animation: tchan .5s; }
@keyframes tchan { 40% { transform: scale(1.15) rotate(-6deg); } }
.flash .pal { font-family: Fredoka, sans-serif; font-size: clamp(36px, 9vw, 58px); font-weight: 700; line-height: 1.1; text-align: center; }
.flash .pt { color: var(--muted); }
.flash .frase { font-size: 19px; text-align: center; }
.mic { width: 124px; height: 124px; border-radius: 50%; border: 0; background: var(--coral); color: #fff; font-size: 54px; box-shadow: 0 6px 0 rgba(0,0,0,.18); }
.mic.gravando { animation: ouvindo 1s infinite; }
@keyframes ouvindo { 0% { box-shadow: 0 0 0 0 rgba(255,111,97,.6); } 100% { box-shadow: 0 0 0 28px rgba(255,111,97,0); } }
.opcoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.op { border: 4px solid var(--line); background: var(--panel); border-radius: 26px; padding: 12px; font-size: clamp(52px, 13vw, 84px); line-height: 1.1; box-shadow: var(--shadow); }
.op img { max-width: 100%; max-height: 120px; }
.op.certo { border-color: var(--grama); background: var(--grama-soft); animation: tchan .5s; }
.op.errado { border-color: var(--coral); background: var(--coral-soft); animation: nao .4s; }
.ligar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ligar .col { display: grid; gap: 10px; }
.peca { border: 4px solid var(--line); background: var(--panel); border-radius: 20px; padding: 10px; font-size: 22px; font-family: Fredoka, sans-serif; font-weight: 700; min-height: 72px; display: grid; place-items: center; box-shadow: var(--shadow); }
.peca.emo { font-size: 46px; }
.peca.sel { border-color: var(--uva); background: var(--uva-soft); }
.peca.par { border-color: var(--grama); background: var(--grama-soft); opacity: .6; pointer-events: none; }
.tela { position: relative; border-radius: 26px; overflow: hidden; background: linear-gradient(180deg, #bfe6ff 0%, #e7f7ff 60%, #b9e8b0 60%); aspect-ratio: 16 / 9; display: grid; place-items: center; }
.tela .cena { font-size: min(120px, 24vw); transition: opacity .4s; }
.tela .leg { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px; background: rgba(43,35,64,.72); color: #fff; font-family: Fredoka, sans-serif; font-size: clamp(18px, 4vw, 26px); text-align: center; }
.tela .play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.18); border: 0; font-size: 72px; color: #fff; }
.progresso { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.progresso i { display: block; height: 100%; width: 0; background: var(--uva); transition: width .3s; }
.camera { position: relative; border-radius: 26px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 62vh; margin: 0 auto; width: min(100%, 460px); }
.camera video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera video.rev { transform: none; }
.camera .cmd { position: absolute; left: 10px; right: 10px; top: 10px; background: rgba(43,35,64,.75); color: #fff; border-radius: 16px; padding: 8px 12px; font-family: Fredoka, sans-serif; font-size: 20px; text-align: center; }
.camera .rec { position: absolute; right: 14px; bottom: 14px; background: var(--coral); color: #fff; border-radius: 999px; padding: 4px 12px; font-family: Fredoka, sans-serif; font-weight: 700; }
.tarefas { display: grid; gap: 10px; }
.tarefa { display: flex; gap: 12px; align-items: center; border: 3px solid var(--line); background: var(--panel); border-radius: 20px; padding: 12px; text-align: left; font-size: 18px; }
.tarefa .box { width: 34px; height: 34px; border-radius: 10px; border: 3px solid var(--grama); display: grid; place-items: center; font-size: 22px; flex: none; color: #fff; }
.tarefa.on .box { background: var(--grama); }
.tarefa.on span { text-decoration: line-through; color: var(--muted); }
.ganhou { text-align: center; font-family: Fredoka, sans-serif; font-size: 24px; color: var(--grama); min-height: 1.5em; }
.aguarda { text-align: center; background: var(--sol-soft); border-radius: 18px; padding: 10px; font-weight: 700; }

/* loja */
.premios { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.premio { border: 0; background: var(--panel); border-radius: 24px; padding: 14px; box-shadow: var(--shadow); display: grid; justify-items: center; gap: 4px; text-align: center; }
.premio .e { font-size: 58px; }
.premio b { font-family: Fredoka, sans-serif; font-size: 16px; }
.premio .preco { font-family: Fredoka, sans-serif; font-weight: 700; color: #b57f00; }
.premio.caro { opacity: .5; }
.album { display: flex; flex-wrap: wrap; gap: 8px; font-size: 44px; }

/* pais */
.pais-crianca { display: grid; gap: 8px; }
.pais-linha { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 2px dashed var(--line); font-size: 16px; }
.pais-linha small { color: var(--muted); }

/* efeitos */
.confete { position: fixed; pointer-events: none; font-size: 28px; z-index: 50; animation: cai 1.4s ease-in forwards; }
@keyframes cai { to { transform: translateY(70vh) rotate(540deg); opacity: 0; } }
.fundo { position: fixed; inset: 0; background: rgba(20, 16, 34, .55); display: grid; place-items: center; padding: 16px; z-index: 60; }
.caixa { background: var(--panel); border-radius: 26px; padding: 20px; width: min(460px, 100%); text-align: center; box-shadow: var(--shadow); }
.carregando { font-size: 64px; animation: pula 1s infinite; }
[hidden] { display: none !important; }

@media (orientation: landscape) and (min-width: 800px) {
  .licao-grade { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
  .licao-grade .ativs { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .senha { grid-template-columns: repeat(3, 80px); } .senha button { width: 80px; height: 80px; font-size: 44px; } .ligar .peca { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
