/* Layout: coluna de app (máx. 480px) centralizada, barra superior fixa, navegação inferior fixa. */
:root {
  --volt: #D4FF3A;
  --volt-deep: #9DC21A;
  --volt-ink: #0E0F12;
  --ink: #0E0F12;
  --bg: #F6F6F1;
  --surface: #FFFFFF;
  --surface-2: #EEEEE6;
  --line: #E1E1D8;
  --muted: #5B5E66;
  --brasa: #FF5B3A;
  --brasa-deep: #C93D20;
  --ok: #1F9D55;
  --ok-bg: #E3F8DC;
  --ok-ink: #135C33;
  --bad-bg: #FFE4DC;
  --bad-ink: #A3301A;
  --locked: #D9D9D0;
  --locked-deep: #B9B9AE;
  --shadow: 0 1px 0 rgba(14, 15, 18, .06), 0 8px 24px rgba(14, 15, 18, .06);
  --f-display: 'Outfit', 'Avenir Next', 'Segoe UI', sans-serif;
  --f-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --r: 18px;
  --head: #0E0F12;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F12; --surface: #17191E; --surface-2: #20232A; --line: #2B2E36; --ink: #F3F3EC; --muted: #A2A5AE;
    --ok-bg: #12301F; --ok-ink: #9BE7B4; --bad-bg: #3A1810; --bad-ink: #FFB4A2; --locked: #2B2E36; --locked-deep: #1E2026; --head: #22252D;
    --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F12; --surface: #17191E; --surface-2: #20232A; --line: #2B2E36; --ink: #F3F3EC; --muted: #A2A5AE;
  --ok-bg: #12301F; --ok-ink: #9BE7B4; --bad-bg: #3A1810; --bad-ink: #FFB4A2; --locked: #2B2E36; --locked-deep: #1E2026; --head: #22252D;
  --shadow: 0 1px 0 rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark;
}

html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--volt-deep); outline-offset: 2px; border-radius: 10px; }
.num { font-variant-numeric: tabular-nums; }

#app { max-width: 480px; margin: 0 auto; min-height: 100%; position: relative; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 12px 104px; gap: 16px; }
.screen.full { padding-bottom: 24px; }

/* Barra superior */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: -.03em; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--volt-ink); display: grid; place-items: center; }
.stats { display: flex; gap: 6px; }
.stat { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.stat svg { width: 18px; height: 18px; }
.stat.off { opacity: .45; }

/* Navegação inferior */
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); z-index: 25; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.nav button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; font-size: 11px; font-weight: 700; color: var(--muted); min-height: 52px; }
.nav button svg { width: 24px; height: 24px; }
.nav button[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav button[aria-current="page"] svg { color: var(--ink); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 16px; border: 0; font-family: var(--f-display); font-weight: 800; font-size: 17px; letter-spacing: .01em; text-transform: uppercase; background: var(--volt); color: var(--volt-ink); box-shadow: 0 4px 0 var(--volt-deep); transition: transform .06s, box-shadow .06s; width: 100%; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--volt-deep); }
.btn:disabled { background: var(--locked); color: var(--muted); box-shadow: 0 4px 0 var(--locked-deep); cursor: default; }
.btn.dark { background: var(--volt-ink); color: var(--volt); box-shadow: 0 4px 0 #000; }
:root[data-theme="dark"] .btn.dark { background: var(--surface-2); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.btn.ok { background: var(--ok); color: #fff; box-shadow: 0 4px 0 #136B38; }
.btn.bad { background: var(--brasa); color: #fff; box-shadow: 0 4px 0 var(--brasa-deep); }
.btn.sm { min-height: 40px; font-size: 14px; padding: 0 14px; width: auto; border-radius: 12px; }
.linkbtn { background: none; border: 0; color: var(--muted); font-weight: 700; text-decoration: underline; padding: 8px; }

/* Cartões */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* Seletor de trilha */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; padding: 10px 4px; border-radius: 11px; font-weight: 800; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Trilha */
.unit-head { background: var(--head); color: #F6F6F1; border-radius: var(--r); padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.unit-head .eyebrow { color: var(--volt); }
.unit-head h2 { font-size: 22px; color: #F6F6F1; }
.unit-head p { color: #C9CBD1; font-size: 14px; }
.unit-head .guide { flex-shrink: 0; background: rgba(246,246,241,.08); border: 1px solid rgba(246,246,241,.2); color: #F6F6F1; border-radius: 12px; padding: 10px; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; min-height: 44px; }
.unit-head.done { background: var(--ok); }
.path { display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 56px 0 26px; }
.node-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.node { width: 76px; height: 70px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--locked); box-shadow: 0 7px 0 var(--locked-deep); color: var(--muted); transition: transform .06s, box-shadow .06s; }
.node svg { width: 34px; height: 34px; }
.node:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--locked-deep); }
.node.open { background: var(--volt); box-shadow: 0 7px 0 var(--volt-deep); color: var(--volt-ink); }
.node.open:active { box-shadow: 0 2px 0 var(--volt-deep); }
.node.done { background: var(--volt-ink); box-shadow: 0 7px 0 #000; color: var(--volt); }
:root[data-theme="dark"] .node.done { background: #2B2E36; box-shadow: 0 7px 0 #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .node.done { background: #2B2E36; box-shadow: 0 7px 0 #000; } }
.node.test { border-radius: 22px; }
.node.current { outline: 6px solid color-mix(in srgb, var(--volt) 35%, transparent); outline-offset: 6px; }
.bubble { position: absolute; top: -44px; white-space: nowrap; background: var(--surface); border: 2px solid var(--line); color: var(--ink); font-family: var(--f-display); font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; padding: 6px 12px; border-radius: 12px; animation: bob 1.6s ease-in-out infinite; z-index: 2; }
.bubble::after { content: ""; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: var(--surface); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); }
@keyframes bob { 50% { transform: translateY(-5px); } }
.node-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 12px; max-width: 160px; text-align: center; line-height: 1.25; }
.stars { display: flex; gap: 2px; margin-top: 4px; }
.stars svg { width: 14px; height: 14px; }

/* Folha inferior / modal */
.sheet-back { position: fixed; inset: 0; background: rgba(14,15,18,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: min(480px, 100%); background: var(--surface); border-radius: 24px 24px 0 0; padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; max-height: 88vh; overflow-y: auto; animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet h2 { font-size: 24px; }
.tipbox { background: var(--surface-2); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.tipbox p { font-size: 15px; }

/* Lição */
.lesson-top { display: flex; align-items: center; gap: 12px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 10; }
.iconbtn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: none; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.iconbtn svg { width: 26px; height: 26px; }
.bar { flex: 1; height: 16px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--volt); border-radius: 999px; transition: width .35s ease; box-shadow: inset 0 -4px 0 rgba(0,0,0,.08); }
.lesson-body { flex: 1; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 200px max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 18px; }
.ex-kind { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ex-kind svg { width: 18px; height: 18px; }
.ex-q { font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1.25; letter-spacing: -.01em; }
.combo { color: var(--brasa); font-weight: 800; font-size: 13px; }

.say { display: flex; gap: 10px; align-items: flex-end; }
.say .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.say .msg { background: var(--surface); border: 2px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 12px 14px; font-size: 17px; font-weight: 600; position: relative; }
.say .msg.ctx { font-style: italic; font-weight: 500; color: var(--muted); }
.playbtn { display: inline-flex; align-items: center; gap: 8px; background: var(--volt-ink); color: var(--volt); border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 800; min-height: 48px; }
.playbtn svg { width: 22px; height: 22px; }

.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; font-size: 16px; font-weight: 600; box-shadow: 0 3px 0 var(--line); min-height: 56px; display: flex; align-items: center; gap: 12px; }
.opt .k { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.opt[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); background: var(--surface-2); }
.opt.right { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 3px 0 var(--ok); }
.opt.wrong { border-color: var(--brasa); background: var(--bad-bg); box-shadow: 0 3px 0 var(--brasa); }
.opt:disabled { cursor: default; }
.tfrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tfrow .opt { justify-content: center; font-size: 18px; font-weight: 800; }

.sentence { font-size: 20px; font-weight: 600; line-height: 1.7; }
.blank { display: inline-block; min-width: 110px; border-bottom: 3px solid var(--ink); text-align: center; padding: 0 6px; color: var(--ink); font-weight: 800; }
.blank.filled { background: var(--surface-2); border-radius: 8px 8px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 16px; box-shadow: 0 3px 0 var(--line); min-height: 46px; }
.chip.used { visibility: hidden; }
.answer-line { min-height: 112px; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); padding: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.answer-line .chip { box-shadow: 0 3px 0 var(--line); }

.match { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.match .col { display: flex; flex-direction: column; gap: 10px; }
.mitem { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 12px; font-weight: 700; font-size: 15px; min-height: 64px; box-shadow: 0 3px 0 var(--line); text-align: center; line-height: 1.25; }
.mitem[aria-pressed="true"] { border-color: var(--ink); background: var(--surface-2); }
.mitem.ok { opacity: .35; border-color: var(--ok); }
.mitem.err { border-color: var(--brasa); background: var(--bad-bg); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.order-list { display: flex; flex-direction: column; gap: 8px; }
.order-slot { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 14px; padding: 10px 12px; min-height: 52px; font-weight: 700; }
.order-slot .n { width: 28px; height: 28px; border-radius: 50%; background: var(--volt); color: var(--volt-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.order-slot.empty { border: 2px dashed var(--line); background: none; color: var(--muted); font-weight: 500; }

textarea.free { width: 100%; min-height: 130px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 17px; padding: 14px; resize: vertical; }
textarea.free:focus { border-color: var(--ink); outline: none; }

/* Rodapé da lição e feedback */
.lesson-foot { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); z-index: 15; padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.lesson-foot.right { background: var(--ok-bg); border-color: transparent; }
.lesson-foot.wrong { background: var(--bad-bg); border-color: transparent; }
.fb-title { font-family: var(--f-display); font-weight: 800; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.lesson-foot.right .fb-title, .lesson-foot.right .fb-text { color: var(--ok-ink); }
.lesson-foot.wrong .fb-title, .lesson-foot.wrong .fb-text { color: var(--bad-ink); }
.fb-text { font-size: 15px; }
.fb-text b { font-weight: 800; }
.ai-note { background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: 14px; color: var(--ink); white-space: pre-wrap; }

/* Resultado */
.result { align-items: center; text-align: center; justify-content: center; }
.result h1 { font-size: 32px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.tile { border-radius: 16px; border: 2px solid var(--volt-ink); overflow: hidden; display: flex; flex-direction: column; }
.tile .t { background: var(--volt-ink); color: var(--volt); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 6px 4px; }
.tile .v { background: var(--surface); font-family: var(--f-display); font-weight: 800; font-size: 22px; padding: 12px 4px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.tile .v svg { width: 20px; height: 20px; }
:root[data-theme="dark"] .tile { border-color: #2B2E36; }
:root[data-theme="dark"] .tile .t { background: #2B2E36; }

/* Listas, liga, perfil */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li.me { background: color-mix(in srgb, var(--volt) 22%, transparent); border-radius: 12px; padding-inline: 10px; }
.pos { width: 26px; font-family: var(--f-display); font-weight: 800; text-align: center; font-size: 16px; }
.pos.up { color: var(--ok); }
.pos.down { color: var(--brasa); }
.ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex-shrink: 0; color: var(--volt-ink); }
.zone { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 8px 4px; display: flex; align-items: center; gap: 8px; }
.zone.up { color: var(--ok); }
.zone.down { color: var(--brasa); }
.zone::before, .zone::after { content: ""; flex: 1; height: 2px; background: currentColor; opacity: .3; }

.feature { border-radius: var(--r); padding: 16px; display: flex; gap: 14px; align-items: center; text-align: left; border: 2px solid var(--line); background: var(--surface); box-shadow: 0 3px 0 var(--line); width: 100%; }
.feature .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.feature .ic svg { width: 28px; height: 28px; }
.feature h3 { font-size: 17px; }
.feature p { font-size: 14px; color: var(--muted); }
.feature .count { margin-left: auto; font-family: var(--f-display); font-weight: 800; font-size: 18px; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.volt { background: var(--volt); color: var(--volt-ink); }
.badge.demo { background: var(--surface-2); color: var(--muted); }

.ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 15px; }

.ach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ach .a { border-radius: 16px; border: 2px solid var(--line); padding: 12px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.ach .a .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.ach .a.got .ic { background: var(--volt); color: var(--volt-ink); }
.ach .a.got { border-color: var(--volt-deep); }
.ach .a svg { width: 24px; height: 24px; }

.chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 18px; }
.chart .c { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .c i { display: block; width: 100%; border-radius: 8px 8px 4px 4px; background: var(--volt); min-height: 4px; position: relative; }
.chart .c.zero i { background: var(--surface-2); }
.chart .c small { font-size: 12px; font-weight: 700; color: var(--muted); }
.chart .c b { font-size: 11px; color: var(--muted); }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.toggle label { font-weight: 600; }
.toggle small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.switch { appearance: none; width: 52px; height: 32px; border-radius: 999px; background: var(--locked); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(20px); }

/* Equipe */
.heat { overflow-x: auto; }
.heat table { border-collapse: separate; border-spacing: 4px; font-size: 13px; min-width: 100%; }
.heat th { font-size: 11px; font-weight: 800; color: var(--muted); text-align: center; padding: 2px; }
.heat th.nm, .heat td.nm { text-align: left; font-weight: 700; white-space: nowrap; padding-right: 8px; }
.heat td.cell { width: 30px; height: 30px; border-radius: 8px; text-align: center; font-weight: 800; font-size: 11px; }

/* Simulador */
.chat { display: flex; flex-direction: column; gap: 10px; }
.bub { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 16px; white-space: pre-wrap; }
.bub.cli { align-self: flex-start; background: var(--surface); border: 2px solid var(--line); border-bottom-left-radius: 4px; }
.bub.me { align-self: flex-end; background: var(--volt); color: var(--volt-ink); border-bottom-right-radius: 4px; font-weight: 600; }
.bub.sys { align-self: center; background: none; color: var(--muted); font-size: 13px; text-align: center; }
.composer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); background: var(--bg); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 8px; z-index: 15; }
.composer .row { gap: 8px; }
.composer textarea { flex: 1; min-height: 48px; max-height: 120px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; padding: 12px; resize: none; }
.sendbtn { width: 52px; height: 52px; border-radius: 14px; border: 0; background: var(--volt); color: var(--volt-ink); display: grid; place-items: center; box-shadow: 0 3px 0 var(--volt-deep); flex-shrink: 0; }
.sendbtn svg { width: 24px; height: 24px; }
.sendbtn:disabled { background: var(--locked); box-shadow: none; color: var(--muted); }
.score { display: flex; flex-direction: column; gap: 8px; }
.sbar { display: grid; grid-template-columns: 110px 1fr 34px; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.sbar .track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sbar .track i { display: block; height: 100%; background: var(--volt-deep); border-radius: 999px; }

/* Onboarding */
.onb { justify-content: center; gap: 22px; }
.onb h1 { font-size: 30px; }
.choice { text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; box-shadow: 0 3px 0 var(--line); width: 100%; min-height: 64px; }
.choice[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); background: var(--surface-2); }
.choice b { display: block; font-size: 17px; }
.choice small { color: var(--muted); font-size: 14px; }
.choice .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex-shrink: 0; }
.choice .ic svg { width: 24px; height: 24px; }
input.txt { width: 100%; min-height: 56px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 18px; padding: 0 16px; }
input.txt:focus { border-color: var(--ink); outline: none; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--ink); width: 22px; border-radius: 999px; }

.toast { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 60; background: var(--volt-ink); color: #F6F6F1; padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); animation: up .2s; max-width: calc(100% - 32px); }
canvas.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; width: 100%; height: 100%; }

.mascot { display: block; }
.mascot.bounce { animation: hop .9s ease-in-out infinite; }
@keyframes hop { 50% { transform: translateY(-6px); } }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 560px) {
  body { background: var(--surface-2); }
  #app { background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
}
