/*
VOICE: acolhedor e profissional para a fono; brincalhão e grande para a criança.
IDEA: o caderno de sessão da fonoaudióloga, com ondas de som saindo de uma boca sorridente.
PICTURE: a mascote Lalá (bolha com boca) e cartões de palavra gigantes no modo criança.
COLOUR and TYPE: branco quente, tinta grafite, coral Falalá, verde e violeta por trilha, amarelo-estrela; Nunito nos títulos, Figtree no texto.
LAYOUT: barra lateral fixa com o caderno à direita; no celular, barra inferior e tudo em uma coluna.
*/
:root {
  color-scheme: light dark;
  --bg: light-dark(#FFFCF9, #15161B);
  --panel: light-dark(#FFFFFF, #1D1F26);
  --panel-2: light-dark(#FFF4EE, #24262F);
  --line: light-dark(#EFE6DF, #30333D);
  --ink: light-dark(#1F2330, #F1EFEA);
  --ink-2: light-dark(#5B6070, #B7B9C2);
  --ink-3: light-dark(#8A8F9C, #858996);
  --brand: #FF6A3D;
  --brand-ink: light-dark(#C2410C, #FF9A78);
  --brand-soft: light-dark(#FFE7DC, #3A2620);
  --green: #1F8A70;
  --green-soft: light-dark(#DDF2EA, #1C3530);
  --violet: #5B4FC4;
  --violet-soft: light-dark(#E8E5FB, #2A2745);
  --sun: #FFC93C;
  --danger: light-dark(#C0352B, #FF8A80);
  --danger-soft: light-dark(#FDE8E6, #3A2221);
  --shadow: 0 1px 2px rgba(31, 35, 48, .06), 0 8px 24px rgba(31, 35, 48, .06);
  --radius: 14px;
  --display: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 3.2vw, 36px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: var(--brand-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; color: var(--ink-3); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Botões e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; text-decoration: none; color: var(--ink); transition: transform .12s, background .12s, border-color .12s; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #F2582A; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.danger { color: var(--danger); }
.btn.big { min-height: 56px; padding: 14px 26px; font-size: 18px; border-radius: 16px; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 16px; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--panel-2); color: var(--ink-2); white-space: nowrap; }
.chip.r { background: var(--brand-soft); color: var(--brand-ink); }
.chip.s { background: var(--green-soft); color: light-dark(#14634F, #7FD6BC); }
.chip.oral { background: var(--violet-soft); color: light-dark(#4338A8, #B6AEF5); }
.check { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* Tela de entrada */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-art { background: var(--brand); color: #fff; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.auth-art h1 { font-size: clamp(32px, 4.4vw, 52px); color: #fff; max-width: 13ch; }
.auth-art .lead { font-size: 18px; max-width: 34ch; opacity: .95; margin-top: 14px; }
.auth-art ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-weight: 600; }
.auth-art li { display: flex; gap: 10px; align-items: center; }
.auth-art li svg { background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 3px; width: 26px; height: 26px; }
.auth-mascot { width: min(340px, 70%); align-self: center; }
.auth-form { display: grid; place-items: center; padding: clamp(24px, 5vw, 64px); }
.auth-card { width: min(420px, 100%); display: grid; gap: 22px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--panel-2); border-radius: 14px; padding: 4px; }
.tabs button { border: 0; background: transparent; min-height: 42px; border-radius: 11px; font-weight: 700; color: var(--ink-2); }
.tabs button[aria-selected=true] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 900; font-size: 24px; letter-spacing: -.02em; color: inherit; text-decoration: none; }
.logo svg { width: 38px; height: 38px; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--panel-2); font-size: 14px; color: var(--ink-2); }
.notice.warn { background: var(--brand-soft); color: var(--brand-ink); }
.notice.ok { background: var(--green-soft); color: light-dark(#14634F, #7FD6BC); }

/* Estrutura do app */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 16px; background: var(--panel-2); border-right: 1px solid var(--line); }
.side .logo { padding: 4px 10px 18px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--panel); color: var(--ink); }
.nav a[aria-current=page] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.nav a[aria-current=page] svg { color: var(--brand); }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.plan-pill { padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.plan-pill b { display: block; font-size: 14px; }
.who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 14px; }
.who .av { width: 34px; height: 34px; border-radius: 999px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.main { padding: clamp(18px, 3vw, 40px); max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { margin-top: 6px; }
.bottom-nav { display: none; }
.topbar { display: none; }
.banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 22px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.banner.danger { background: var(--danger-soft); color: var(--danger); }
.banner .btn { margin-left: auto; }

/* Cartões e listas */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { display: grid; gap: 4px; }
.kpi .v { font-family: var(--display); font-weight: 900; font-size: clamp(28px, 3vw, 36px); line-height: 1; }
.kpi .l { font-size: 14px; color: var(--ink-2); }
.two { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; align-items: center; background: var(--ink); color: var(--bg); border: 0; }
.hero h2 { color: inherit; }
.hero p { opacity: .8; margin: 6px 0 16px; }
.hero svg.mascot { width: 150px; }
.list { display: grid; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.li:first-child { border-top: 0; }
a.li:hover { background: var(--panel-2); border-radius: 10px; }
.av-kid { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--panel-2); flex: none; }
.li .t { font-weight: 700; }
.li .meta { margin-left: auto; text-align: right; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.stars { color: var(--sun); letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: var(--line); }
.empty { text-align: center; padding: 36px 16px; display: grid; justify-items: center; gap: 12px; color: var(--ink-2); }
.empty svg.mascot { width: 110px; }
.steps { display: grid; gap: 10px; counter-reset: s; }
.step { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); font-weight: 600; }
.step .n { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); font-size: 14px; flex: none; }
.step.done { color: var(--ink-3); text-decoration: line-through; }
.step.done .n { background: var(--green); border-color: var(--green); color: #fff; }

/* Pacientes */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search .input { padding-left: 44px; }
.pgrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pcard { display: grid; gap: 12px; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.pcard:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.pcard .top { display: flex; gap: 12px; align-items: center; }
.pcard .av-kid { width: 54px; height: 54px; font-size: 30px; }
.bar { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.phead { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.phead .av-kid { width: 76px; height: 76px; font-size: 42px; border-radius: 22px; }
.fig { position: relative; min-height: 240px; }
.fig > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.avatar-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.avatar-pick button { aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); background: var(--panel); font-size: 26px; }
.avatar-pick button[aria-pressed=true] { border-color: var(--brand); background: var(--brand-soft); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td.num { text-align: right; white-space: nowrap; }

/* Biblioteca */
.tracks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.track { border: 0; color: #fff; display: grid; gap: 10px; text-align: left; min-height: 190px; align-content: space-between; position: relative; overflow: hidden; }
.track h2 { color: #fff; font-size: 26px; }
.track p { opacity: .92; font-size: 15px; }
.track .count { font-weight: 700; font-size: 14px; opacity: .9; }
.track .big-letter { position: absolute; right: -6px; bottom: -34px; font-family: var(--display); font-weight: 900; font-size: 150px; line-height: 1; opacity: .18; }
.ex { display: grid; gap: 12px; }
.ex-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.tip { font-size: 14px; color: var(--ink-2); background: var(--panel-2); padding: 10px 12px; border-radius: 10px; }
.words { display: flex; flex-wrap: wrap; gap: 8px; }
.word { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; }
.word .p { font-size: 20px; }
mark { background: transparent; color: var(--brand-ink); font-weight: 900; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 3px; }

/* Montar sessão */
.setup { display: grid; gap: 22px; }
.setup-step { display: grid; gap: 14px; }
.setup-step h2 { display: flex; gap: 10px; align-items: center; }
.setup-step h2 .n { width: 30px; height: 30px; border-radius: 999px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 15px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.pick { display: flex; gap: 10px; align-items: center; padding: 12px; border: 2px solid var(--line); border-radius: 14px; background: var(--panel); text-align: left; font-weight: 700; }
.pick[aria-pressed=true] { border-color: var(--brand); background: var(--brand-soft); }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button { border: 2px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 16px; font-weight: 700; min-height: 44px; }
.seg button[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.sticky-go { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 30%); display: flex; gap: 12px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

/* Modal e avisos */
.modal-back { position: fixed; inset: 0; background: rgba(20, 22, 30, .5); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border-radius: 20px; padding: 24px; display: grid; gap: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(420px, calc(100% - 32px)); }
body:has(.kid) .toasts { top: 18px; bottom: auto; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); animation: up .2s; }
.toast.bad { background: var(--danger); color: #fff; }
.loading { display: grid; place-items: center; min-height: 50vh; color: var(--ink-3); gap: 12px; }
.spin { width: 34px; height: 34px; border-radius: 999px; border: 3px solid var(--line); border-top-color: var(--brand); animation: rot 0.8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

/* Planos */
.plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan { display: grid; gap: 10px; }
.plan .price { font-family: var(--display); font-weight: 900; font-size: 34px; }
.plan .price small { font-size: 15px; color: var(--ink-2); font-weight: 600; }
.plan.best { border: 2px solid var(--brand); }
.plan ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; display: grid; gap: 4px; }

/* ================= Modo criança ================= */
.kid { position: fixed; inset: 0; z-index: 40; background: #FFF6E5; color: #24324A; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; font-family: var(--display); color-scheme: light; }
.kid.t-r { background: #FFEFE7; }
.kid.t-s { background: #E6F6EF; }
.kid.t-oral { background: #EEEBFF; }
.kid-top { display: flex; align-items: center; gap: 14px; padding: 14px clamp(14px, 3vw, 28px); }
.kid-top .who-kid { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.kid-top .who-kid .av-kid { background: #fff; }
.dots { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }
.dots i { width: 14px; height: 14px; border-radius: 999px; background: rgba(36, 50, 74, .14); }
.dots i.ok { background: #1F8A70; }
.dots i.help { background: #FFC93C; }
.dots i.miss { background: #E8613C; }
.dots i.now { outline: 3px solid #24324A; outline-offset: 2px; }
.kid.disp-upper .say-word { text-transform: uppercase; }
.kid.disp-upper .kid-card .word-big.say-word { letter-spacing: .04em; }
.hold-x { position: relative; }
.hold-x .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.hold-x .ring circle { fill: none; stroke: #E8613C; stroke-width: 4; stroke-dasharray: 132; stroke-dashoffset: 132; }
.hold-x.holding .ring circle { transition: stroke-dashoffset 1.5s linear; stroke-dashoffset: 0; }
.kid-x { width: 48px; height: 48px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .8); display: grid; place-items: center; color: #24324A; }
.kid-stage { display: grid; place-items: center; padding: 8px 16px; overflow: auto; }
.kid-card { background: #fff; border-radius: 32px; padding: clamp(20px, 4vw, 40px); width: min(720px, 100%); display: grid; justify-items: center; gap: 14px; text-align: center; box-shadow: 0 6px 0 rgba(36, 50, 74, .08), 0 18px 40px rgba(36, 50, 74, .1); animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.kid-card .pic { font-size: clamp(110px, 22vh, 190px); line-height: 1; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .06)); }
.kid-card .word-big { font-size: clamp(40px, 8vw, 76px); font-weight: 900; letter-spacing: .02em; line-height: 1.05; color: #24324A; }
.kid-card .word-big mark { color: #E8613C; text-decoration-thickness: 6px; text-underline-offset: 8px; }
.kid.t-s .kid-card .word-big mark { color: #1F8A70; }
.kid.t-oral .kid-card .word-big mark { color: #5B4FC4; }
.kid-card .phrase { font-size: clamp(30px, 5vw, 52px); font-weight: 900; line-height: 1.2; max-width: 18ch; }
.kid-card .hint { font-size: 18px; color: #5A6680; font-family: var(--body); max-width: 40ch; }
.listen { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.kbtn { border: 0; border-radius: 20px; min-height: 60px; padding: 12px 24px; font-family: var(--display); font-weight: 900; font-size: 20px; display: inline-flex; align-items: center; gap: 10px; background: #24324A; color: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .2); }
.kbtn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.kbtn.light { background: #fff; color: #24324A; box-shadow: 0 5px 0 rgba(36, 50, 74, .15); }
.kbtn svg.i { width: 26px; height: 26px; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.pair { border: 4px solid #E4E8F0; background: #fff; border-radius: 26px; padding: 26px 10px; font-family: var(--display); font-weight: 900; font-size: clamp(32px, 6vw, 56px); color: #24324A; }
.pair.right { border-color: #1F8A70; background: #E6F6EF; }
.pair.wrong { border-color: #E8613C; background: #FFEFE7; }
.mouth-box { width: min(300px, 70vw); aspect-ratio: 1; position: relative; }
.mouth-box svg, .mouth-box video { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 28px; }
.mouth-box video { object-fit: cover; transform: scaleX(-1); background: #24324A; }
.counter { display: flex; align-items: center; gap: 18px; }
.counter .n { font-size: 64px; font-weight: 900; min-width: 2.2ch; }
.counter .of { font-size: 22px; color: #5A6680; }
.tap { width: 120px; height: 120px; border-radius: 999px; border: 0; background: #FFC93C; color: #24324A; font-family: var(--display); font-weight: 900; font-size: 34px; box-shadow: 0 7px 0 #D9A21F; }
.tap:active { transform: translateY(4px); box-shadow: 0 3px 0 #D9A21F; }
.hold { font-size: 20px; font-weight: 800; color: #5B4FC4; min-height: 28px; }
.kid-foot { background: #24324A; color: #fff; padding: 12px clamp(12px, 3vw, 28px); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: var(--body); }
.kid-foot .lbl { font-size: 13px; opacity: .7; margin-right: auto; }
.score { border: 0; border-radius: 14px; min-height: 52px; padding: 10px 18px; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; color: #24324A; }
.score.ok { background: #7FDCB9; }
.score.help { background: #FFD96B; }
.score.miss { background: #FFB59C; }
.score.skip { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
.score[disabled] { opacity: .35; cursor: default; }
.attn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.attn h4 { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.attn ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.attn li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.attn li .w { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attn li .mini { width: 70px; height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; flex: none; }
.attn li .mini i { display: block; height: 100%; }
.attn li .pc { font-size: 13px; color: var(--ink-2); width: 3.2em; text-align: right; flex: none; }
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.burst i { position: absolute; left: 50%; top: 45%; width: 14px; height: 14px; border-radius: 3px; animation: fly .9s ease-out forwards; }
.finish .big-stars { font-size: 76px; letter-spacing: 6px; }
.finish .big-stars .off { color: #E4E8F0; }
.finish .big-stars span { display: inline-block; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.finish .big-stars span:nth-child(2) { animation-delay: .15s; }
.finish .big-stars span:nth-child(3) { animation-delay: .3s; }
.finish .stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-family: var(--body); }
.finish textarea { font-family: var(--body); width: 100%; border: 2px solid #E4E8F0; border-radius: 16px; padding: 12px 14px; min-height: 90px; font-size: 16px; color: #24324A; background: #fff; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes fly { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes wag { 50% { transform: translateX(var(--d, 10px)); } }
.mascot .body { animation: bob 2.4s ease-in-out infinite; transform-box: fill-box; }
.anim-side { animation: wag 1.2s ease-in-out infinite; transform-box: fill-box; }
.anim-out { animation: wag 1s ease-in-out infinite; --d: 0px; transform-box: fill-box; }
.anim-pulse { animation: bob 1.4s ease-in-out infinite; transform-box: fill-box; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Responsivo */
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: minmax(0, 1fr); }
  .tracks { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2); position: sticky; top: 0; z-index: 20; }
  .topbar .logo { font-size: 20px; }
  .topbar .logo svg { width: 30px; height: 30px; }
  .main { padding-bottom: 96px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; bottom: 0; left: 0; right: 0; background: var(--panel); border-top: 1px solid var(--line); z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; font-size: 11px; font-weight: 700; color: var(--ink-3); text-decoration: none; }
  .bottom-nav a[aria-current=page] { color: var(--brand-ink); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding-bottom: 28px; }
  .auth-art ul, .auth-mascot { display: none; }
  .sticky-go { bottom: 64px; }
  .toasts { bottom: 84px; }
}
@media (max-width: 600px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero svg.mascot { display: none; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .kpis { gap: 10px; }
  .card { padding: 16px; }
  .li .meta { font-size: 13px; }
  .table.stack thead { display: none; }
  .table.stack tr { display: grid; padding-block: 10px; border-bottom: 1px solid var(--line); }
  .table.stack td { border: 0; padding: 3px 0; text-align: left; }
  .kid-foot .lbl { width: 100%; }
  .attn { grid-template-columns: minmax(0, 1fr); }
  .score { flex: 1; justify-content: center; padding: 10px 6px; font-size: 14px; line-height: 1.15; }
  .score svg { display: none; }
  .score.skip { flex: 0 0 auto; padding-inline: 12px; }
  .score.undo svg { display: inline; }
  .score.undo .tx { display: none; }
  .kid-foot .keys { display: none; }
  .tap { width: 96px; height: 96px; }
}

/* ================= Figuras ================= */
.emo { display: inline-block; vertical-align: middle; width: 1.25em; height: 1.25em; object-fit: contain; user-select: none; }
.emo-txt { display: inline-block; line-height: 1; }
.av-kid .emo { width: 72%; height: 72%; }
.kid-card .pic .emo { width: clamp(120px, 24vh, 210px); height: auto; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .06)); }
.word .p .emo { width: 24px; height: 24px; }
.word.ok { border-color: color-mix(in srgb, var(--green) 40%, transparent); background: var(--green-soft); color: light-dark(#14634F, #7FD6BC); }

/* ================= Modo criança: novos tipos e gravação ================= */
.kbtn.rec.on { background: #E8613C; animation: recpulse 1.2s ease-in-out infinite; }
@keyframes recpulse { 0%, 100% { box-shadow: 0 5px 0 rgba(0,0,0,.2), 0 0 0 0 rgba(232, 97, 60, .55); } 50% { box-shadow: 0 5px 0 rgba(0,0,0,.2), 0 0 0 12px rgba(232, 97, 60, 0); } }
.kid-card .sep { color: #B6BDCC; margin: 0 .18em; }
.claps { display: flex; gap: 10px; justify-content: center; min-height: 54px; align-items: center; }
.clap { width: 52px; height: 52px; border-radius: 999px; background: #FFC93C; display: grid; place-items: center; color: #24324A; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.clap:nth-child(2) { animation-delay: .1s; } .clap:nth-child(3) { animation-delay: .2s; } .clap:nth-child(4) { animation-delay: .3s; }
.clap svg.i { width: 28px; height: 28px; }
.pair.yn { font-size: clamp(22px, 3.6vw, 32px); display: flex; align-items: center; justify-content: center; gap: 8px; }
.pair.yn svg.i { width: 28px; height: 28px; }
div.pair { cursor: default; }

/* ================= Tarefa de casa (fono) ================= */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; align-items: center; margin-top: 14px; }
.linkbox { display: grid; gap: 8px; }
.linkbox .input { font-size: 14px; min-height: 40px; color: var(--ink-2); }
.week { display: flex; gap: 6px; }
.week span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); font-size: 13px; font-weight: 700; color: var(--ink-3); }
.week span.on { background: var(--green); color: #fff; }
.week span.today { outline: 2px solid var(--ink-3); outline-offset: 1px; }
.week span svg.i { width: 18px; height: 18px; }
.recs { display: grid; gap: 8px; }
.rec-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.rec-row:first-child { border-top: 0; }
.rec-row .w { min-width: 110px; flex: 1; }
.rec-play { flex-direction: column; align-items: flex-start; gap: 0; min-height: 50px; white-space: normal; text-align: left; }
.rec-play svg.i { display: none; }

/* ================= Relatório ================= */
.report-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px clamp(14px, 4vw, 40px); border-bottom: 1px solid var(--line); background: var(--panel-2); position: sticky; top: 0; z-index: 5; }
.report { max-width: 860px; margin: 24px auto; padding: clamp(20px, 4vw, 48px); background: #fff; color: #1F2330; border-radius: 20px; box-shadow: var(--shadow); display: grid; gap: 26px; color-scheme: light; }
.report h1 { font-size: clamp(28px, 4vw, 40px); color: #1F2330; }
.report h2 { font-size: 20px; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; color: #1F2330; }
.report .muted, .report .tiny { color: #5B6070; }
.report .logo { color: #1F2330; }
.rep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 3px solid #FF6A3D; }
.rep-who { display: flex; gap: 14px; align-items: center; }
.rep-who .av-kid { width: 72px; height: 72px; border-radius: 20px; background: #FFF4EE; }
.rep-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.rep-kpis div { background: #FFF4EE; border-radius: 14px; padding: 14px; display: grid; gap: 2px; }
.rep-kpis b { font-family: var(--display); font-size: 32px; font-weight: 900; line-height: 1; color: #1F2330; }
.rep-kpis span { font-size: 14px; color: #5B6070; }
.report .fig { min-height: 220px; color: #1F2330; }
.rep-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.report .word { background: #fff; border-color: #EFE6DF; color: #1F2330; }
.report .word.ok { background: #DDF2EA; color: #14634F; }
.report .chip { background: #FFF4EE; }
.rep-note { min-height: 90px; background: #fff; color: #1F2330; border-color: #EFE6DF; }
.rep-note-print { display: none; white-space: pre-wrap; }
.rep-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #5B6070; border-top: 1px solid #EFE6DF; padding-top: 14px; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .no-print, .toasts { display: none !important; }
  .report { box-shadow: none; margin: 0; padding: 0; max-width: none; border-radius: 0; }
  .rep-note { display: none; }
  .rep-note-print { display: block; }
  .report section { break-inside: avoid; }
}

/* ================= Página da família ================= */
.casa { min-height: 100vh; background: color-mix(in srgb, var(--track, #FF6A3D) 12%, var(--bg)); padding-bottom: 40px; }
.casa-top { display: flex; justify-content: space-between; align-items: center; padding: 14px clamp(16px, 4vw, 32px); }
.casa-wrap { width: min(640px, 100% - 28px); margin: 0 auto; display: grid; gap: 16px; }
.casa-hero { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 28px 20px; }
.casa-hero h1 { font-size: clamp(30px, 6vw, 42px); }
.av-kid.big { width: 96px; height: 96px; border-radius: 28px; background: var(--panel-2); }
.casa-msg { font-size: 17px; font-style: italic; color: var(--ink-2); max-width: 40ch; }
.casa-week { display: grid; justify-items: center; gap: 8px; }
.howto { margin: 10px 0 12px; padding-left: 22px; display: grid; gap: 8px; }
.casa-foot { text-align: center; font-size: 13px; color: var(--ink-3); padding: 10px; }

@media (max-width: 760px) {
  .home-grid, .rep-two { grid-template-columns: minmax(0, 1fr); }
}

/* ================= Respiração e trava-línguas ================= */
.breath-stage { width: min(260px, 62vw); aspect-ratio: 1; display: grid; place-items: center; }
.breath-ball { width: 100%; aspect-ratio: 1; border-radius: 999px; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #BFE3FA, #2F8FD1); box-shadow: 0 10px 0 rgba(47, 143, 209, .18);
  transform: scale(.55); transition-property: transform, box-shadow; transition-timing-function: ease-in-out; }
.breath-ball .bpic .emo { width: 96px; height: 96px; }
.breath-ball.ph-in, .breath-ball.ph-hold { transform: scale(1); }
.breath-ball.ph-hold { box-shadow: 0 10px 0 rgba(47, 143, 209, .18), 0 0 0 14px rgba(47, 143, 209, .18); }
.breath-ball.ph-out { transform: scale(.5); }
.breath-ball.ph-done { transform: scale(.8); background: radial-gradient(circle at 35% 30%, #C8F0DE, #1F8A70); }
.breath-label { font-size: clamp(26px, 4.4vw, 40px); font-weight: 900; color: #24324A; min-height: 1.2em; }
.breath-count { font-size: 18px; font-weight: 800; color: #5A6680; }
.tiny-kid { font-family: var(--body); font-size: 14px; color: #7A8499; }
.tw-tag { font-size: 16px !important; letter-spacing: .06em; text-transform: uppercase; color: #5A6680; font-family: var(--body); font-weight: 800; }
.tw-challenge { display: grid; justify-items: center; gap: 8px; font-family: var(--body); font-weight: 700; color: #5A6680; }
.tw-dots { display: flex; gap: 8px; }
.tw-dots i { width: 22px; height: 22px; border-radius: 999px; background: #E4E8F0; }
.tw-dots i.on { background: #FFC93C; }
.kid.t-resp { background: #E6F2FB; }
.kid.t-l { background: #FFF4E0; }
.kid.t-ch { background: #FCEAF2; }
.kid.t-trocas { background: #E6EEF9; }
.kid.t-silabas { background: #E2F4F3; }
.chip.resp { background: #DDEEFA; color: light-dark(#1D6AA0, #8CC6EE); }
.chip.l { background: #FBEFD9; color: light-dark(#8A5800, #F0C46E); }
.chip.ch { background: #FBE3EF; color: light-dark(#9B2D63, #F2A2C8); }
.chip.trocas { background: #E0ECF9; color: light-dark(#24569A, #9DC0EE); }
.chip.silabas { background: #DCF2F1; color: light-dark(#0B6B6B, #8ED8D6); }
@media (prefers-reduced-motion: reduce) { .breath-ball { transition-duration: .01s !important; } }

/* ================= Roteiros ================= */
.progs { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.prog { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; position: relative; overflow: hidden; min-height: 170px; padding-top: 26px; transition: transform .15s, border-color .15s; }
.prog:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.prog-bar { position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--c); }
.sess { display: grid; gap: 14px; scroll-margin-top: 80px; }
.sess.next { border: 2px solid var(--brand); }
.sess.done .sess-n { color: var(--green); }
.sess-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.sess-n { font-size: 13px; font-weight: 800; color: var(--brand-ink); display: inline-flex; gap: 4px; align-items: center; }
.sess-n svg.i { width: 16px; height: 16px; }
.sess-head h3 { font-size: 20px; margin: 2px 0 4px; }
.facts .chip svg.i { width: 15px; height: 15px; }
.blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.blk { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.blk:first-child { border-top: 0; }
.blk .n { width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.sess-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: var(--panel-2); border-radius: 12px; padding: 12px 14px; }
.sess-nav { gap: 8px; margin-bottom: 16px; position: sticky; top: 0; z-index: 4; background: var(--bg); padding: 8px 0; }
.prog-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.prog-row:first-of-type { border-top: 0; }
.prog-steps { display: flex; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.prog-steps span { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); font-weight: 800; font-size: 13px; color: var(--ink-3); }
.prog-steps span.on { background: var(--green); color: #fff; }
.prog-steps span.next { outline: 2px solid var(--brand); color: var(--brand-ink); }
@media (max-width: 600px) { .sess-foot { grid-template-columns: minmax(0, 1fr); } }
