/* ============================================================
   CONQUISTEI — modo criança

   Princípios desta folha:
   - alvo de toque nunca menor que 56px;
   - a cor do perfil (--cor) manda no tema inteiro da tela;
   - pouco texto, muito ícone, tudo redondo.
   ============================================================ */

:root {
    --kid-cor: #5B7CFA;
    --kid-claro: #8AA4FF;
    --kid-escuro: #3A5CD8;
    --kid-texto: #FFFFFF;
    --kid-tinta: #1B1F3B;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body.kids {
    font-family: "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--kid-tinta);
    background: linear-gradient(170deg, var(--kid-claro) 0%, var(--kid-cor) 55%, var(--kid-escuro) 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    min-height: 100%;
}

.kids-tela {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

/* ------------------------------------------------------------
   Barra de topo
   ------------------------------------------------------------ */

.kids-topo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin-bottom: 6px;
}

.kids-topo h1 {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .16);
}

.kids-redondo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .24);
    border: 0;
    color: #fff;
    font-size: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    text-decoration: none;
    font-family: inherit;
    backdrop-filter: blur(4px);
}

.kids-redondo:active { transform: scale(.93); }
.kids-redondo.vazio { background: transparent; pointer-events: none; }

/* ------------------------------------------------------------
   Avisos
   ------------------------------------------------------------ */

.kids-aviso {
    background: rgba(255, 255, 255, .96);
    border-radius: 18px;
    padding: 13px 16px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
    animation: kids-pop .3s ease-out;
}

.kids-aviso.erro { color: #B42318; }
.kids-aviso.sucesso { color: #027A48; }
.kids-aviso.aviso { color: #B54708; }

@keyframes kids-pop {
    from { opacity: 0; transform: scale(.94) translateY(-8px); }
    to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   PAINEL — avatar central com botões orbitando
   ------------------------------------------------------------ */

.orbita {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.06;
    max-height: 62vh;
    margin: 4px auto 0;
    flex: 1 1 auto;
}

/* Núcleo: os anéis + a foto */
.nucleo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 52%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.nucleo::before {
    content: "";
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
}

.nucleo .foto {
    position: relative;
    width: 78%;
    height: 78%;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    color: var(--kid-cor);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.nucleo .foto img { width: 100%; height: 100%; object-fit: cover; }

.nucleo .saldo {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: var(--kid-escuro);
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 17px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}

/* Satélites */
.satelite {
    position: absolute;
    width: 27%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: var(--kid-escuro);
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
    border: 0;
    font-family: inherit;
    cursor: pointer;
    padding: 4px;
    transition: transform .14s;
}

.satelite:active { transform: translate(-50%, -50%) scale(.92); }
.satelite:hover { text-decoration: none; }
.satelite .emoji { font-size: 27px; line-height: 1; }
.satelite .rotulo { font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.1; }

/* Posições fixas ao redor do núcleo (segue a referência: 3 em cima, 2 embaixo) */
.satelite.p1 { left: 18%; top: 17%; }
.satelite.p2 { left: 50%; top: 8%; }
.satelite.p3 { left: 82%; top: 17%; }
.satelite.p4 { left: 22%; top: 84%; }
.satelite.p5 { left: 78%; top: 84%; }

.satelite .selo {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    background: #F79009;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #fff;
}

.kids-rodape-nota {
    text-align: center;
    color: rgba(255, 255, 255, .92);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0 2px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .14);
}

/* ------------------------------------------------------------
   PERFIS — quem é você?
   ------------------------------------------------------------ */

.perfis {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.perfil-bolha {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    padding: 16px 8px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .16);
    transition: transform .14s;
}

.perfil-bolha:active { transform: scale(.95); }
.perfil-bolha:hover { text-decoration: none; }

.perfil-bolha .foto {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
    border: 4px solid #fff;
}

.perfil-bolha .foto img { width: 100%; height: 100%; object-fit: cover; }
.perfil-bolha .nome { color: #fff; font-size: 17px; font-weight: 700; text-align: center; }

/* ------------------------------------------------------------
   PIN — teclado numérico
   ------------------------------------------------------------ */

.pin-tela { display: flex; flex-direction: column; align-items: center; flex: 1; }

.pin-tela .quem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 8px 0 18px;
}

.pin-tela .quem .foto {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    border: 4px solid #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
}

.pin-tela .quem .foto img { width: 100%; height: 100%; object-fit: cover; }
.pin-tela .quem .nome { color: #fff; font-size: 20px; font-weight: 700; }

.pin-pontos { display: flex; gap: 14px; margin-bottom: 22px; }

.pin-pontos i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .32);
    transition: background .12s, transform .12s;
}

.pin-pontos i.cheio { background: #fff; transform: scale(1.14); }

.teclado {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 300px;
}

.tecla {
    aspect-ratio: 1.25;
    border: 0;
    border-radius: 22px;
    background: rgba(255, 255, 255, .95);
    color: var(--kid-escuro);
    font-size: 27px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .14);
    transition: transform .1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tecla:active { transform: scale(.93); }
.tecla.transparente { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; font-size: 22px; }

/* ------------------------------------------------------------
   Cartões brancos genéricos do modo criança
   ------------------------------------------------------------ */

.kids-cartao {
    background: #fff;
    border-radius: 22px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.kids-cartao h2 { font-size: 17px; margin: 0 0 10px; font-weight: 700; }

.kids-rolagem { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Tarefa disponível */
.tarefa-kid {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 20px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
}

.tarefa-kid.feita { opacity: .55; }

.tarefa-kid .emoji {
    width: 52px;
    height: 52px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    background: #F2F4FC;
    flex: 0 0 auto;
}

.tarefa-kid .info { flex: 1; min-width: 0; }
.tarefa-kid .info .nome { font-size: 16px; font-weight: 700; line-height: 1.2; }
.tarefa-kid .info .preco { font-size: 17px; font-weight: 800; color: #12B76A; }
.tarefa-kid .info .obs { font-size: 12.5px; color: #8A90B0; font-weight: 600; }

.botao-fiz {
    border: 0;
    border-radius: 16px;
    background: var(--kid-cor);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    padding: 13px 16px;
    min-width: 74px;
    min-height: 52px;
    cursor: pointer;
    flex: 0 0 auto;
    transition: transform .1s;
}

.botao-fiz:active { transform: scale(.94); }
.botao-fiz:disabled { background: #D3D7EA; color: #8A90B0; cursor: default; }

/* Botão grande de ação */
.kids-botao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 20px;
    background: #fff;
    color: var(--kid-escuro);
    font-family: inherit;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
    padding: 0 18px;
}

.kids-botao:active { transform: scale(.97); }
.kids-botao:hover { text-decoration: none; }
.kids-botao.contorno { background: rgba(255, 255, 255, .2); color: #fff; box-shadow: none; }

/* Saldo grande */
.saldo-grande {
    text-align: center;
    color: #fff;
    padding: 6px 0 16px;
}

.saldo-grande .rotulo { font-size: 15px; font-weight: 600; opacity: .92; }
.saldo-grande .valor {
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    text-shadow: 0 3px 14px rgba(0, 0, 0, .18);
}
.saldo-grande .nota { font-size: 14px; font-weight: 600; opacity: .92; margin-top: 2px; }

.mini-numeros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }

.mini-numero {
    background: rgba(255, 255, 255, .18);
    border-radius: 18px;
    padding: 12px;
    text-align: center;
    color: #fff;
}

.mini-numero .n { font-size: 21px; font-weight: 800; }
.mini-numero .r { font-size: 12px; font-weight: 600; opacity: .92; }

/* Extrato */
.extrato-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 0;
    border-bottom: 1px solid #EEF0F8;
}

.extrato-item:last-child { border-bottom: 0; }
.extrato-item .emoji { font-size: 24px; width: 30px; text-align: center; }
.extrato-item .corpo { flex: 1; min-width: 0; }
.extrato-item .corpo .t { font-weight: 700; font-size: 15px; line-height: 1.2; }
.extrato-item .corpo .d { font-size: 12.5px; color: #8A90B0; font-weight: 600; }
.extrato-item .v { font-weight: 800; font-variant-numeric: tabular-nums; }
.extrato-item .v.esperando { color: #B54708; }
.extrato-item .v.ok { color: #12B76A; }
.extrato-item .v.nao { color: #B42318; text-decoration: line-through; }

/* Meta */
.meta-kid { text-align: center; color: #fff; }
.meta-kid .icone-meta { font-size: 62px; line-height: 1; }
.meta-kid h2 { font-size: 24px; margin: 6px 0 2px; color: #fff; font-weight: 700; }
.meta-kid .preco { font-size: 15px; opacity: .92; font-weight: 600; }

.barra-kid {
    height: 26px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .26);
    overflow: hidden;
    margin: 18px 0 8px;
    position: relative;
}

.barra-kid .preenche {
    height: 100%;
    border-radius: 14px;
    background: linear-gradient(90deg, #FFD166, #FF9F43);
    transition: width .7s cubic-bezier(.2, .8, .3, 1);
    min-width: 26px;
}

.barra-kid .rotulo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.meta-numeros { display: flex; justify-content: space-between; color: #fff; font-size: 14px; font-weight: 700; }

.sugestao {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #fff;
    border-radius: 18px;
    padding: 12px 14px;
    margin-bottom: 9px;
    text-align: left;
}

.sugestao .emoji { font-size: 27px; }
.sugestao .txt { font-size: 15px; font-weight: 600; line-height: 1.3; }
.sugestao .txt strong { color: var(--kid-escuro); }

/* Vazio */
.kids-vazio { text-align: center; color: #fff; padding: 40px 20px; }
.kids-vazio .emoji { font-size: 60px; }
.kids-vazio h2 { color: #fff; font-size: 21px; margin: 10px 0 6px; }
.kids-vazio p { font-size: 15px; opacity: .94; font-weight: 600; margin: 0 0 18px; }

/* Confete simples ao concluir algo */
.comemora { animation: comemora .6s ease-out; }

@keyframes comemora {
    0% { transform: scale(1); }
    35% { transform: scale(1.12) rotate(-3deg); }
    70% { transform: scale(.96) rotate(2deg); }
    100% { transform: scale(1); }
}

/* Telas maiores: a órbita não pode virar um planetário */
@media (min-width: 560px) {
    .kids-tela { max-width: 560px; padding-top: 24px; }
    .orbita { max-width: 480px; }
    .perfis { grid-template-columns: repeat(3, 1fr); }
}

@media (min-height: 780px) and (min-width: 560px) {
    .orbita { max-height: 560px; }
}
