[hidden] { display: none !important; }
:root {
  --bg: #f6f1e7; --surface: #fffdf8; --surface-2: #efe8da; --ink: #1d1b2f; --muted: #6b6578; --line: #e2d9c7;
  --primary: #7c5cff; --primary-d: #5b3fd9; --ok: #12a594; --ok-bg: #d9f5ef; --bad: #e5484d; --bad-bg: #fde2e1;
  --amber: #f2a03d; --gold: #f5b700; --shadow: 0 2px 0 var(--line);
  --radius: 18px; --font: 'Nunito', system-ui, sans-serif; --display: 'Bricolage Grotesque', 'Nunito', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14121f; --surface: #1e1b2e; --surface-2: #29253d; --ink: #f1edff; --muted: #a39cb8; --line: #36304f;
    --primary: #9b82ff; --primary-d: #6f55e0; --ok: #2dd4bf; --ok-bg: #123a36; --bad: #ff6b6f; --bad-bg: #3f1a1f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14121f; --surface: #1e1b2e; --surface-2: #29253d; --ink: #f1edff; --muted: #a39cb8; --line: #36304f;
  --primary: #9b82ff; --primary-d: #6f55e0; --ok: #2dd4bf; --ok-bg: #123a36; --bad: #ff6b6f; --bad-bg: #3f1a1f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 500 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.15; margin: 0 0 .3em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
kbd { font: 700 .7rem var(--font); border: 1.5px solid var(--line); border-radius: 6px; padding: 0 .35em; color: var(--muted); }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 0; border-radius: 14px; padding: .7em 1.3em; font-weight: 800; cursor: pointer; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; transition: transform .08s, filter .15s; }
.btn.big { width: 100%; padding: .95em 1.3em; font-size: 1rem; }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 var(--primary-d); }
.btn.primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--primary-d); }
.btn:disabled { background: var(--surface-2); color: var(--muted); box-shadow: 0 4px 0 var(--line); cursor: default; }
.btn.ghost { background: var(--surface); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.btn.danger { background: transparent; border: 2px solid var(--bad); color: var(--bad); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); }
.link { background: none; border: 0; color: var(--primary); font-weight: 800; cursor: pointer; padding: .5em 0; }

/* ---------- topo ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line); }
.topbar-in { max-width: 720px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { font: 800 1.25rem var(--display); display: flex; align-items: center; gap: .3em; }
.chips { display: flex; gap: 6px; }
.chip { font-weight: 800; padding: .25em .7em; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); font-size: .9rem; white-space: nowrap; }
.chip.streak { color: var(--muted); filter: grayscale(1); }
.chip.streak.on { color: #e8590c; filter: none; border-color: #ffd8a8; }
.chip.lvl { background: var(--primary); color: #fff; border-color: var(--primary-d); }

.page { max-width: 720px; margin: 0 auto; padding: 20px 16px 64px; }
.section-title { font-size: 1.15rem; margin: 28px 0 12px; }
.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 0 var(--line); padding: 16px; }
a.card { display: flex; align-items: center; gap: 14px; transition: transform .12s; }
a.card:hover { transform: translateY(-2px); }
.bar { height: 14px; background: var(--surface-2); border-radius: 999px; overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; background: var(--c, var(--primary)); border-radius: 999px; transition: width .45s cubic-bezier(.3, 1.4, .5, 1); box-shadow: inset 0 -4px 0 rgb(0 0 0 / .12); }
.bar.thin { height: 8px; margin: 6px 0 2px; }

/* ---------- boas-vindas ---------- */
.welcome { max-width: 460px; margin: 0 auto; padding: 48px 16px; }
.welcome-hero { text-align: center; margin-bottom: 24px; }
.big-logo { font-size: 64px; line-height: 1; margin-bottom: 8px; animation: float 3s ease-in-out infinite; }
.welcome-form { display: grid; gap: 18px; }
.welcome-form label { display: grid; gap: 6px; font-weight: 800; }
.welcome-form input, .settings input:not([type=checkbox]), .settings select { padding: .75em 1em; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); }
fieldset { border: 0; padding: 0; margin: 0; } legend { font-weight: 800; margin-bottom: 6px; }
.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.goal-opt { display: grid; gap: 2px; padding: 12px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); cursor: pointer; }
.goal-opt small { color: var(--muted); font-size: .75rem; }
.goal-opt.sel { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }

/* ---------- início ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.goal-ring { position: relative; flex: none; }
.ring-bg { fill: none; stroke: var(--surface-2); }
.ring-fg { fill: none; stroke: var(--amber); stroke-linecap: round; transition: stroke-dashoffset .8s; }
.goal-ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.goal-ring-txt b { font: 800 1.35rem var(--display); } .goal-ring-txt small { font-size: .7rem; color: var(--muted); }
.cta, .review, .arcade { margin-bottom: 12px; }
.cta { background: var(--c); border-color: color-mix(in srgb, var(--c) 70%, #000); box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 65%, #000); color: #fff; }
.cta small { opacity: .85; display: block; font-weight: 700; } .cta b { font: 800 1.25rem var(--display); }
.cta.done { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: 0 4px 0 var(--line); display: flex; align-items: center; gap: 14px; }
.cta-icon { width: 54px; height: 54px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 1.8rem; background: rgb(255 255 255 / .2); }
.review .cta-icon, .arcade .cta-icon, .cta.done .cta-icon { background: var(--surface-2); }
.cta-go { margin-left: auto; font-size: 1.3rem; }
.review small, .arcade small { display: block; color: var(--muted); font-weight: 700; } .review b, .arcade b { display: block; font-size: 1.05rem; }
.review.empty { opacity: .8; }
.badge-count { margin-left: auto; background: var(--bad); color: #fff; font-weight: 800; border-radius: 999px; min-width: 30px; height: 30px; display: grid; place-items: center; padding: 0 8px; }
.arcade { background: linear-gradient(120deg, var(--surface), color-mix(in srgb, var(--amber) 18%, var(--surface))); }
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.module-emoji { font-size: 2.4rem; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--c, var(--muted)) 15%, var(--surface)); flex: none; }
.module-info { flex: 1; display: grid; } .module-info b { font: 800 1.15rem var(--display); }
.module.soon { display: flex; align-items: center; gap: 14px; opacity: .55; border-style: dashed; box-shadow: none; }

/* ---------- mapa ---------- */
.mod-hero { display: flex; gap: 16px; align-items: flex-start; background: var(--c); color: #fff; border-radius: 22px; padding: 20px; margin-bottom: 16px; box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 60%, #000); }
.mod-hero h1 { font-size: 1.4rem; } .mod-hero p { margin: 0 0 12px; opacity: .92; }
.mod-hero .bar { background: rgb(255 255 255 / .25); margin-bottom: 4px; } .mod-hero .bar i { background: var(--gold); }
.mod-hero-emoji { font-size: 2.6rem; }
.unit { margin-top: 28px; }
.unit-head { background: var(--c); color: #fff; border-radius: 16px; padding: 12px 16px; display: grid; box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 60%, #000); }
.unit-head b { font: 800 1.15rem var(--display); } .unit-head span { opacity: .9; font-size: .9rem; }
.path { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 26px 0 8px; }
.node-wrap { position: relative; display: flex; flex-direction: column; align-items: center; transform: translateX(var(--x)); }
.node { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; background: var(--c); box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 60%, #000); transition: transform .1s; }
a.node:active { transform: translateY(5px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 60%, #000); }
.node.done { background: var(--gold); box-shadow: 0 7px 0 #c48a00; }
.node.locked { background: var(--surface-2); box-shadow: 0 7px 0 var(--line); filter: grayscale(1); opacity: .7; font-size: 1.5rem; }
.node.boss-node { width: 96px; height: 96px; font-size: 2.6rem; border-radius: 28px; }
.node.open:not(.done) { animation: pulse 2s infinite; }
.node-label { font-weight: 800; font-size: .85rem; margin-top: 10px; text-align: center; max-width: 140px; }
.node-stars { color: var(--gold); letter-spacing: 2px; font-size: .95rem; } .node-stars i { color: var(--line); font-style: normal; }
.node-tip { position: absolute; top: -34px; background: var(--surface); border: 2px solid var(--line); color: var(--c); font-weight: 800; font-size: .75rem; letter-spacing: .06em; padding: 3px 10px; border-radius: 10px; animation: bob 1.4s ease-in-out infinite; white-space: nowrap; z-index: 1; }
.node-tip::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; background: var(--surface); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: translateX(-50%) rotate(45deg); }

/* ---------- sessão ---------- */
.session, .blitz { max-width: 720px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.s-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.s-top .bar { height: 16px; }
.combo { font-weight: 800; color: #e8590c; display: inline-flex; align-items: center; gap: 2px; animation: pop .3s; }
.hearts { font-size: 1.05rem; letter-spacing: 1px; white-space: nowrap; }
.hearts.lose { animation: shake .45s; }
.boss { display: flex; align-items: center; gap: 12px; margin: 0 16px; padding: 10px 14px; border-radius: 16px; background: #1f2937; color: #fff; }
.boss-face { font-size: 2.4rem; }
.boss-face.hit { animation: hit .5s; }
.boss-info { flex: 1; display: grid; gap: 4px; } .boss-info b { font-size: .9rem; }
.boss .hp { background: rgb(255 255 255 / .15); height: 10px; } .boss .hp i { background: var(--bad); }
.s-body { flex: 1; padding: 12px 16px 24px; }
.s-body.enter > * { animation: slideIn .32s cubic-bezier(.2, .9, .3, 1.1); }
.prompt { font: 800 1.35rem var(--display); margin: 8px 0 14px; }
.sentence { font-size: 1.3rem; font-weight: 700; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 0 0 12px; }
.blank { display: inline-block; min-width: 3.2em; border-bottom: 3px solid var(--primary); color: transparent; line-height: 1.1; }
.hint { color: var(--muted); margin: -4px 0 14px; font-style: italic; }
.retry-tag { display: inline-block; font-size: .8rem; font-weight: 800; color: #e8590c; background: #fff1e6; border-radius: 8px; padding: 2px 8px; margin-bottom: 6px; }
.say { border: 2px solid var(--line); background: var(--surface); border-radius: 12px; width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem; flex: none; box-shadow: 0 3px 0 var(--line); }
.say.huge { width: 96px; height: 96px; font-size: 2.6rem; border-radius: 24px; display: block; margin: 8px auto 18px; background: var(--primary); border-color: var(--primary-d); box-shadow: 0 5px 0 var(--primary-d); }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); box-shadow: 0 4px 0 var(--line); cursor: pointer; font-weight: 700; font-size: 1.05rem; transition: transform .08s; }
.opt:active { transform: translateY(2px); }
.opt.sel { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); box-shadow: 0 4px 0 var(--primary); }
.opt.right { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 4px 0 var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); box-shadow: 0 4px 0 var(--bad); }
.opt:disabled { cursor: default; color: var(--ink); }
.answer { width: 100%; font-size: 1.25rem; font-weight: 700; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); }
.answer:focus { outline: none; border-color: var(--primary); }
.answer.right { border-color: var(--ok); background: var(--ok-bg); } .answer.wrong { border-color: var(--bad); background: var(--bad-bg); }
.build { min-height: 66px; border-bottom: 2px dashed var(--line); border-top: 2px dashed var(--line); padding: 10px 0; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.build.right { border-color: var(--ok); } .build.wrong { border-color: var(--bad); }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tile { padding: 9px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); box-shadow: 0 3px 0 var(--line); font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.tile.used { visibility: hidden; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match .col { display: grid; gap: 10px; align-content: start; }
.tile.m { padding: 14px 10px; }
.tile.sel { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); box-shadow: 0 3px 0 var(--primary); }
.tile.done { opacity: .35; border-color: var(--ok); box-shadow: none; cursor: default; }
.tile.shake { animation: shake .45s; border-color: var(--bad); }

.intro-card { background: var(--surface); border: 2px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 4px 0 var(--line); }
.kicker { font-size: .78rem; font-weight: 800; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; }
.rich p { margin: .4em 0 .8em; }
.rule, .warn, .tip { border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.rule { background: color-mix(in srgb, var(--primary) 12%, var(--surface)); border-left: 4px solid var(--primary); }
.warn { background: var(--bad-bg); border-left: 4px solid var(--bad); }
.tip { background: color-mix(in srgb, var(--amber) 16%, var(--surface)); border-left: 4px solid var(--amber); }
.ex { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.ex b { display: block; } .ex small { color: var(--muted); }
.chips-list { display: flex; flex-wrap: wrap; gap: 6px; } .chips-list span { background: var(--surface-2); padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.vtable { display: grid; gap: 4px; margin: 6px 0 14px; }
.vrow { display: grid; grid-template-columns: 40px minmax(70px, auto) 20px minmax(70px, auto) 1fr; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.vrow .say { width: 34px; height: 34px; font-size: .9rem; box-shadow: none; }
.vrow .past { color: var(--primary); } .vrow small { color: var(--muted); } .arrow { color: var(--muted); }

.s-foot { position: sticky; bottom: 0; border-top: 2px solid var(--line); background: var(--bg); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.s-foot-in { display: grid; gap: 10px; }
.s-foot.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.s-foot.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.s-foot.ok .go { background: var(--ok); box-shadow: 0 4px 0 color-mix(in srgb, var(--ok) 60%, #000); }
.s-foot.bad .go { background: var(--bad); box-shadow: 0 4px 0 color-mix(in srgb, var(--bad) 60%, #000); }
.fb:empty { display: none; }
.fb { animation: slideUp .25s; }
.fb-title { font: 800 1.3rem var(--display); display: block; }
.fb p { margin: .25em 0; color: var(--ink); }
.pill { font: 800 .75rem var(--font); background: #e8590c; color: #fff; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }

/* ---------- resultado ---------- */
.result { text-align: center; padding: 24px 0; display: grid; gap: 12px; justify-items: center; max-width: 480px; margin: 0 auto; }
.result-hero { font-size: 80px; animation: pop .6s; }
.stars { display: flex; gap: 6px; font-size: 3rem; }
.star { color: var(--line); animation: starIn .5s both; } .star.on { color: var(--gold); text-shadow: 0 3px 0 #c48a00; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.rs { border: 2px solid; border-radius: 16px; overflow: hidden; display: grid; }
.rs small { color: #fff; font-weight: 800; font-size: .75rem; text-transform: uppercase; padding: 3px; }
.rs b { font: 800 1.5rem var(--display); padding: 10px 4px; background: var(--surface); }
.rs.xp { border-color: var(--amber); } .rs.xp small { background: var(--amber); }
.rs.acc { border-color: var(--ok); } .rs.acc small { background: var(--ok); }
.rs.combo { border-color: var(--primary); } .rs.combo small { background: var(--primary); }
.banner { width: 100%; padding: 12px; border-radius: 14px; font-weight: 700; background: var(--surface); border: 2px solid var(--line); animation: slideUp .4s both; }
.banner.level { border-color: var(--primary); } .banner.streak { border-color: #ffa94d; } .banner.badge { border-color: var(--gold); } .banner.goal { border-color: var(--amber); }
.result-actions { display: grid; gap: 10px; width: 100%; margin-top: 8px; }

/* ---------- revisão / vazio ---------- */
.empty-state { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 30px 0; }
.boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; margin: 10px 0; }
.box { display: grid; justify-items: center; gap: 2px; }
.box-bar { width: 100%; max-width: 48px; height: 80px; background: var(--surface-2); border-radius: 10px; display: flex; align-items: flex-end; overflow: hidden; }
.box-bar i { display: block; width: 100%; background: var(--ok); border-radius: 10px; }
.box small { font-size: .7rem; color: var(--muted); }

/* ---------- blitz ---------- */
.blitz-start { text-align: center; display: grid; gap: 8px; justify-items: center; }
.blitz-start ul { text-align: left; }
.bar.time i { background: var(--amber); transition: width .1s linear; }
.clock { font-weight: 800; min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
.blitz-body { padding: 16px; display: grid; gap: 20px; }
.blitz-score { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.blitz-score > b { font: 800 3rem var(--display); }
.blitz-card { text-align: center; display: grid; gap: 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 24px 16px; box-shadow: 0 4px 0 var(--line); }
.blitz-verb { font: 800 clamp(2.4rem, 10vw, 3.6rem) var(--display); color: var(--primary); }
.blitz-card .answer { text-align: center; }
.blitz-flash { min-height: 1.5em; font-weight: 800; } .blitz-flash.ok { color: var(--ok); } .blitz-flash.bad { color: var(--bad); }

/* ---------- perfil ---------- */
.profile-head { display: flex; gap: 16px; align-items: center; } .grow { flex: 1; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font: 800 1.8rem var(--display); flex: none; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 12px; display: grid; text-align: center; }
.stat b { font-size: 1.15rem; } .stat small { color: var(--muted); }
.chart { position: relative; display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 150px; align-items: end; padding-bottom: 28px; }
.col-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.col-bar i { width: 100%; max-width: 22px; background: var(--primary); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.col-bar.hit i { background: var(--amber); }
.col-bar small { position: absolute; bottom: -22px; font-size: .68rem; color: var(--muted); }
.chart-goal { position: absolute; left: 16px; right: 16px; border-top: 2px dashed var(--amber); margin-bottom: 28px; pointer-events: none; }
.chart-goal span { position: absolute; right: 0; top: -20px; font-size: .7rem; color: var(--amber); font-weight: 800; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge-card { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 12px; display: grid; text-align: center; gap: 2px; filter: grayscale(1); opacity: .5; }
.badge-card.got { filter: none; opacity: 1; border-color: var(--gold); box-shadow: 0 4px 0 #e9c46a; }
.badge-card span { font-size: 2rem; } .badge-card small { color: var(--muted); font-size: .78rem; }
.settings { display: grid; gap: 12px; }
.settings .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; }
.settings input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--primary); }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

/* ---------- animações ---------- */
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); } }
@keyframes starIn { 0% { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes hit { 30% { transform: scale(.8) rotate(-12deg); filter: brightness(2); } 60% { transform: translateX(8px); } }
@keyframes pulse { 0%, 100% { scale: 1; } 50% { scale: 1.06; } }
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes float { 50% { transform: translateY(-8px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 480px) {
  .prompt { font-size: 1.15rem; } .sentence { font-size: 1.1rem; }
  .node { width: 68px; height: 68px; }
  .hello { align-items: flex-start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .vrow { grid-template-columns: 34px auto 16px auto; } .vrow small { grid-column: 2 / -1; margin-top: -6px; }
}

/* ---------- leitura ---------- */
.reading { display: grid; gap: 10px; }
.passage { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; max-height: 44vh; overflow-y: auto; line-height: 1.65; box-shadow: 0 4px 0 var(--line); }
.passage h3 { font-size: 1.05rem; margin-bottom: .5em; }
.passage p { margin: 0 0 .7em; }
.passage .w { cursor: pointer; border-radius: 4px; }
.passage .w:hover { background: color-mix(in srgb, var(--primary) 14%, transparent); }
.passage .w.marked { text-decoration: underline dotted var(--primary) 2px; text-underline-offset: 3px; }
.sent { transition: background .3s; border-radius: 4px; }
.sent.hl { background: color-mix(in srgb, var(--amber) 32%, transparent); }
.sent.evidence { background: color-mix(in srgb, var(--ok) 26%, transparent); }
.pop { position: absolute; z-index: 5; max-width: 260px; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 8px 12px; font-size: .92rem; box-shadow: 0 6px 20px rgb(0 0 0 / .25); line-height: 1.35; }
.pop small { opacity: .75; } .pop .link { color: var(--amber); padding: 0; font-size: .8rem; }
.read-tip { margin: 0; font-size: .82rem; color: var(--muted); }
.reading .prompt { margin-top: 4px; }
.hint-btn { justify-self: start; }
.hint-box { background: color-mix(in srgb, var(--amber) 16%, var(--surface)); border-left: 4px solid var(--amber); border-radius: 12px; padding: 10px 14px; animation: slideUp .25s; }
.vocab-tag { color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, var(--surface)); }
.vocab-list { display: grid; gap: 10px; margin-top: 16px; }
.vocab-item { display: flex; align-items: center; gap: 12px; padding: 12px; }
.vocab-item .ctx { display: block; color: var(--muted); font-style: italic; }
.dots { display: inline-flex; gap: 3px; margin-top: 4px; } .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .dots i.on { background: var(--ok); }

/* ---------- conta e histórico ---------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--surface-2); padding: 5px; border-radius: 14px; margin-bottom: 12px; }
.tabs button { border: 0; background: transparent; padding: .6em; border-radius: 10px; font-weight: 800; cursor: pointer; color: var(--muted); }
.tabs button.sel { background: var(--surface); color: var(--ink); box-shadow: 0 2px 0 var(--line); }
.form-err { color: var(--bad); font-weight: 700; margin: 0; }
.small { font-size: .82rem; margin: 0; }
.account { text-align: right; margin: 0 0 8px; }
.sub { font-size: 1rem; margin: 18px 0 8px; display: flex; justify-content: space-between; align-items: baseline; }
.hist-list { display: grid; gap: 10px; }
.hist-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.hist-row .bar { grid-column: 1 / -1; margin: 0; }
.hist-row small, .weak-row small { color: var(--muted); }
.weak-row { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.weak-row:last-child { border: 0; padding: 0; }
.bad-txt { color: var(--bad) !important; white-space: nowrap; font-weight: 800; }
.hist-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.hist-table th { text-align: left; color: var(--muted); font-weight: 800; font-size: .75rem; text-transform: uppercase; padding: 4px 6px; }
.hist-table td { padding: 7px 6px; border-top: 1px solid var(--line); }
.hist-table tr.lost td { color: var(--muted); }
@media (max-width: 480px) { .hist-table th:nth-child(5), .hist-table td:nth-child(5) { display: none; } }
