/* Motor de idiomas: lesson.css. Lição: topo, exercícios, cartões de ensino, rodapé de retorno, resultado,
   mascote e efeitos (partículas, confete). Só tokens (tokens.css + lang.css); animações de 150-300 ms;
   movimento reduzido no fim deste arquivo (e em responsive.css). */

/* ================= mascote ================= */
.lx-m { flex: none; width: 96px; height: 96px; overflow: visible; }
.lx-m.lx-xs { width: 40px; height: 40px; }
.lx-m.lx-sm { width: 56px; height: 56px; }
.lx-m.lx-md { width: 84px; height: 84px; }
.lx-m.lx-lg { width: 116px; height: 116px; }
.lx-m.lx-xl { width: 148px; height: 148px; }
.lx-mascot .m-body { fill: var(--primary); }
.lx-mascot .m-edge { fill: var(--primary-edge); }
.lx-mascot .m-arm { fill: none; stroke: var(--primary); stroke-width: 11; stroke-linecap: round; }
.lx-mascot .m-belly { fill: #fff; opacity: .14; }
.lx-mascot .m-shine { fill: #fff; opacity: .38; }
.lx-mascot .m-white, .lx-mascot .m-glint { fill: #fff; }
.lx-mascot .m-pupil, .lx-mascot .m-mouth { fill: var(--ink-fixed); }
.lx-mascot .m-tongue { fill: var(--heart); }
.lx-mascot .m-line { fill: none; stroke: var(--ink-fixed); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.lx-mascot .m-line.thin { stroke-width: 3.4; }
.lx-mascot .m-cheek { fill: var(--heart); opacity: .32; }
.lx-mascot .m-tear { fill: var(--tint-2); stroke: var(--sel); stroke-width: 1.4; }
.lx-mascot .m-sh { fill: var(--ink); opacity: .1; }
.lx-mascot .m-dot { fill: var(--line-strong); }
.lx-mascot .m-spark { fill: var(--accent); }
.lx-mascot .m-z { fill: var(--muted); font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.lx-mascot .m-z.z2 { font-size: 14px; }
.lx-mascot .m-all { transform-box: fill-box; transform-origin: 50% 100%; animation: m-in .28s cubic-bezier(.2, 1.4, .4, 1) both; }
.lx-mascot.m-cheer .m-all { animation: m-in .28s cubic-bezier(.2, 1.4, .4, 1) both, m-hop .5s .3s ease-out 2; }
.lx-mascot.m-sad .m-all { animation: m-in .28s ease-out both, m-sag .3s .28s ease-out both; }
.lx-mascot.m-sleep .m-z { animation: m-z 2.4s ease-in-out infinite; }
.lx-mascot.m-sleep .m-z.z2 { animation-delay: 1.2s; }
.lx-mascot.m-think .m-dot { animation: m-dot 1.6s ease-in-out infinite; }
.lx-mascot.m-think .m-dot + .m-dot { animation-delay: .3s; }
@keyframes m-in { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes m-hop { 50% { transform: translateY(-9px) scale(1.02, .98); } }
@keyframes m-sag { to { transform: translateY(2px) scale(1.02, .97); } }
@keyframes m-z { 0%, 100% { opacity: .25; transform: translateY(3px); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes m-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.lx-hero { display: flex; justify-content: center; margin: -4px 0 8px; }

/* ================= lição: topo ================= */
.lesson { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.lesson-top {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px 6px; background: var(--bg);
}
.x { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--muted); transition: background-color .15s, color .15s; }
.x:hover { background: var(--line); color: var(--ink); }
/* barra contínua (histórias, nivelamento) */
.bar { flex: 1; height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { position: relative; display: block; height: 100%; width: 0; background: var(--primary); border-radius: 99px; transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.bar i::after { content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .3); }
/* barra em segmentos (um por exercício) com marca de chegada */
.segbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.segs { flex: 1; display: flex; gap: 3px; height: 14px; }
.segs i { flex: 1; min-width: 3px; position: relative; border-radius: 99px; background: var(--line); overflow: hidden; }
.segs i::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.segs i::after { content: ""; position: absolute; left: 3px; right: 3px; top: 3px; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .32); opacity: 0; transition: opacity .25s; }
.segs i.on::before { transform: none; }
.segs i.on::after { opacity: 1; }
.segs i.pop { animation: seg-pop .3s ease-out; }
@keyframes seg-pop { 50% { transform: scaleY(1.45); } }
.segbar .goal { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--line); color: var(--muted); transition: background-color .25s, color .25s; }
.segbar .goal .ico { width: 16px; height: 16px; stroke-width: 2.2; }
.segbar.cp .goal { background: var(--accent-soft); color: var(--accent-ink); }
.segbar.full .goal { background: var(--accent); color: var(--on-accent); animation: seg-pop .3s ease-out; }
.segbar.full .goal .ico { fill: currentColor; }
.combo { display: inline-flex; align-items: center; gap: 1px; color: var(--accent-ink); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.combo:empty { display: none; }
.combo .ico { width: 18px; height: 18px; color: var(--flame); fill: var(--flame); stroke-width: 1.6; }
.combo.pop { animation: lx-pop-in .3s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes lx-pop-in { from { transform: scale(.5); } to { transform: none; } }
/* vidas: o coração se parte ao errar */
.lesson-top .hearts { position: relative; }
.lesson-top .hearts.hit { animation: nudge .3s; color: var(--bad); }
.heart-break { position: absolute; left: 8px; top: 7px; width: 19px; height: 19px; pointer-events: none; }
.heart-break .ico { position: absolute; inset: 0; width: 19px; height: 19px; color: var(--heart); fill: var(--heart); stroke-width: 1.6; }
.heart-break .hb-l { clip-path: polygon(0 0, 52% 0, 40% 45%, 56% 62%, 45% 100%, 0 100%); animation: hb-l .42s ease-in forwards; }
.heart-break .hb-r { clip-path: polygon(52% 0, 100% 0, 100% 100%, 45% 100%, 56% 62%, 40% 45%); animation: hb-r .42s ease-in forwards; }
@keyframes hb-l { 0% { transform: scale(1.4); } 30% { transform: scale(1.4) translateX(-2px) rotate(-12deg); } 75% { opacity: 0; } 100% { transform: translate(-8px, 16px) rotate(-40deg); opacity: 0; } }
@keyframes hb-r { 0% { transform: scale(1.4); } 30% { transform: scale(1.4) translateX(2px) rotate(12deg); } 75% { opacity: 0; } 100% { transform: translate(8px, 16px) rotate(40deg); opacity: 0; } }

/* ================= palco e enunciados ================= */
.stage { flex: 1; padding: 18px 16px 32px; }
.stage > * { animation: ex-in .26s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ex-in { from { transform: translateX(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.stage > div > h2, .stage h2 { margin: 6px 0 18px; font-size: 24px; font-weight: 700; line-height: 1.22; letter-spacing: -.015em; }
.ex-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 8px; border-radius: 999px;
  background: var(--tint); color: var(--primary-ink); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.ex-tag .ico { width: 16px; height: 16px; stroke-width: 2.3; }
.ex-tag.retry { background: var(--bad-bg); color: var(--bad); }
.teach-step { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* balão do mascote com o texto do enunciado */
.prompt-wrap { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 22px; }
.prompt-wrap .lx-m { margin-bottom: -2px; }
.prompt-en {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; font-size: 20px; font-weight: 600; line-height: 1.38;
  background: var(--card); border: 2px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1);
}
.prompt-wrap .prompt-en { border-bottom-left-radius: 6px; }
.prompt-wrap .prompt-en::before {
  content: ""; position: absolute; left: -9px; bottom: 10px; width: 14px; height: 14px; background: var(--card);
  border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: skewY(-30deg) rotate(8deg); border-bottom-left-radius: 3px;
}
.prompt-en .pt { font-weight: 600; }
.prompt-en .hint-pt { font-weight: 400; margin: 4px 0 0; }

/* botões de ouvir */
.say {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0 0 3px; border: 0; border-radius: 14px;
  background: var(--primary); color: #fff; box-shadow: inset 0 -3px 0 var(--primary-edge); transition: transform .15s, filter .15s;
}
.say:hover { filter: brightness(1.07); }
.say:active { transform: translateY(1px); }
.say .ico { width: 24px; height: 24px; }
.say.slow { width: 44px; height: 44px; background: var(--tint-2); color: var(--primary-ink); box-shadow: inset 0 -3px 0 var(--tint-edge); }
.say.big { width: 104px; height: 104px; border-radius: 30px; padding-bottom: 6px; box-shadow: inset 0 -6px 0 var(--primary-edge); }
.say.big .ico { width: 46px; height: 46px; }
.listen-row { display: flex; align-items: flex-end; gap: 22px; justify-content: center; margin: 10px 0 26px; }
.lbtn { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.listen-row .say.slow { width: 64px; height: 64px; border-radius: 20px; }
.listen-row .say.slow .ico { width: 32px; height: 32px; }

/* ================= opções (mcq, fill, listen, reply) ================= */
.opts { display: grid; gap: 10px; }
.opts.grid2 { grid-template-columns: 1fr 1fr; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 14px 14px;
  text-align: left; font-size: 17px; line-height: 1.3; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 16px; box-shadow: inset 0 -4px 0 var(--line);
  transition: border-color .15s, background-color .15s, transform .12s, box-shadow .15s, opacity .2s;
}
.opt:hover { border-color: var(--line-strong); background: color-mix(in srgb, var(--card) 70%, var(--tint)); }
.opt:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--line); }
.opt .k {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--line); border-radius: 9px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--muted); transition: inherit;
}
.opt.sel { border-color: var(--sel); background: var(--sel-bg); box-shadow: inset 0 0 0 1px var(--sel), inset 0 -4px 0 var(--sel-line); }
.opt.sel .k { border-color: var(--sel); background: var(--sel); color: #fff; }
.opt.right { border-color: var(--ok-solid); background: var(--ok-bg); box-shadow: inset 0 -4px 0 var(--ok-line); animation: pop-ok .3s ease-out; }
.opt.right .k { border-color: var(--ok-solid); background: var(--ok-solid) var(--ic-check) center / 16px no-repeat; color: transparent; }
.opt.wrong { border-color: var(--bad-solid); background: var(--bad-bg); box-shadow: inset 0 -4px 0 var(--bad-line); animation: nudge .3s; }
.opt.wrong .k { border-color: var(--bad-solid); background: var(--bad-solid) var(--ic-x) center / 15px no-repeat; color: transparent; }
.opts .opt.dim { opacity: .55; }
/* rótulo textual do estado (pseudo-elemento: não entra no texto da opção). Texto: --t-opt-* posto por core.js (engine/i18n opt_sel/opt_right/opt_wrong); o literal é só a reserva pt */
.opts .opt::after { flex: none; margin-left: auto; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; color: #fff; }
.opts .opt.sel::after { content: var(--t-opt-sel, "Selecionada"); background: var(--sel); }
.opts .opt.right::after { content: var(--t-opt-right, "Correta"); background: var(--ok-solid); }
.opts .opt.wrong::after { content: var(--t-opt-wrong, "Sua resposta"); background: var(--bad-solid); }
.opts.grid2 .opt { flex-direction: column; justify-content: center; gap: 8px; min-height: 92px; text-align: center; font-size: 18px; font-weight: 600; }
.opts.grid2 .opt .k { position: absolute; margin: 0; }
.opts.grid2 .opt { position: relative; padding-top: 18px; }
.opts.grid2 .opt .k { top: 8px; left: 8px; width: 26px; height: 26px; font-size: 12px; }
.opts.grid2 .opt::after { margin: 0; position: absolute; top: 8px; right: 8px; font-size: 11px; padding: 2px 7px; }
@keyframes nudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes pop-ok { 50% { transform: scale(1.025); } }

.sentence {
  margin: 0 0 10px; padding: 18px 18px; font-size: 21px; line-height: 1.75;
  background: var(--card); border: 2px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1);
}
.sentence .gap {
  display: inline-block; vertical-align: baseline; min-width: 3.4em; margin: 0 .3em; padding: 0 .55em; line-height: 1.35; border-radius: 9px; text-align: center;
  font-weight: 700; color: var(--muted); background: var(--bg); border: 2px dashed var(--line-strong); transition: background-color .15s, color .15s, border-color .15s;
}
.sentence .gap.filled { color: var(--primary-ink); background: var(--tint); border: 2px solid var(--tint-edge); border-bottom-width: 3px; animation: lx-pop-in .2s ease-out; }
.sentence .gap.right { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.sentence .gap.wrong { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.hint-pt { color: var(--ink-2); font-size: 15px; margin: 0 2px 20px; }

/* ================= conversa (reply) ================= */
.chat { display: grid; gap: 12px; margin-bottom: 22px; }
.cline { display: flex; align-items: flex-start; gap: 10px; }
.cline.me { justify-content: flex-end; }
.bubble {
  max-width: 84%; padding: 10px 12px 10px 14px; border-radius: 18px 18px 18px 6px;
  background: var(--card); border: 2px solid var(--line); font-size: 17px; line-height: 1.42;
}
.bubble b { display: block; margin-bottom: 2px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--primary-ink); }
.bubble .say.slow { display: inline-grid; width: 44px; height: 44px; margin: -6px -4px -6px 4px; vertical-align: middle; border-radius: 12px; }
.bubble .say.slow .ico { width: 20px; height: 20px; }
.bubble.me { background: var(--tint); border-color: var(--tint-edge); border-radius: 18px 18px 6px 18px; font-weight: 600; transition: background-color .15s, border-color .15s; }
.bubble.me.empty { min-width: 88px; text-align: center; color: var(--muted); background: var(--bg); border-style: dashed; border-color: var(--line-strong); font-weight: 400; }
.bubble.me.right { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.bubble.me.wrong { background: var(--bad-bg); border-color: var(--bad-line); }

/* avatares (inicial em cor estável por nome) */
.avatar {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1; color: #fff;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / .18);
}
.av-0 { background: var(--primary); } .av-1 { background: var(--band); } .av-2 { background: var(--accent-edge); }
.av-3 { background: var(--brand); } .av-4 { background: var(--primary-edge); } .av-5 { background: var(--band-2); }

/* ================= montar frase (build) ================= */
.answer-line {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; min-height: 118px; padding: 4px 0 0; margin-bottom: 22px; border-radius: 4px;
  background: repeating-linear-gradient(to bottom, transparent 0 55px, var(--line-strong) 55px 57px);
}
.answer-line.two { min-height: 172px; }
.answer-line.right .tile { border-color: var(--ok-line); color: var(--ok); }
.answer-line.wrong .tile { border-color: var(--bad-line); }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 6px 0; }
.tile {
  min-height: 48px; padding: 0 15px 3px; font-size: 17px; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 13px; box-shadow: inset 0 -4px 0 var(--line);
  transition: transform .12s, border-color .15s, background-color .15s, color .15s, box-shadow .15s;
}
.tile:hover { border-color: var(--line-strong); }
.tile:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--line); }
.tile.flying { position: relative; z-index: 3; box-shadow: inset 0 -4px 0 var(--line), 0 8px 18px -8px rgb(0 0 0 / .35); }
/* o lugar de onde o bloco saiu fica tracejado */
.bank .tile.used { color: transparent; background: transparent; border: 2px dashed var(--line-strong); box-shadow: none; pointer-events: none; }
.tile.ghost { background: var(--line); color: transparent; box-shadow: none; }
.fly-ghost { position: fixed; z-index: 40; display: inline-flex; align-items: center; justify-content: center; margin: 0; pointer-events: none; }

/* ================= escrever (type, dictation) ================= */
.type-box { display: grid; gap: 10px; }
textarea.in {
  display: block; width: 100%; min-height: 112px; max-height: 280px; padding: 14px 16px; resize: none; overflow-y: auto;
  font-size: 18px; line-height: 1.45; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 18px; box-shadow: inset 0 2px 0 var(--bg); transition: border-color .15s, box-shadow .15s;
}
textarea.in::placeholder { color: var(--muted); }
textarea.in:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--tint-2); }
textarea.in[readonly] { background: var(--bg); }
textarea.in.right { border-color: var(--ok-solid); background: var(--ok-bg); }
textarea.in.wrong { border-color: var(--bad-solid); background: var(--bad-bg); }
.skeys { display: flex; flex-wrap: wrap; gap: 6px; }
.skeys.off { opacity: .45; pointer-events: none; }
.skey {
  min-width: 44px; height: 44px; padding: 0 8px 3px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); font-size: 18px; font-weight: 600; box-shadow: inset 0 -3px 0 var(--line);
  transition: transform .12s, border-color .15s, background-color .15s;
}
.skey:hover { border-color: var(--line-strong); }
.skey:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--line); }
.skey.shift { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.skey.shift[aria-pressed="true"] { background: var(--sel); border-color: var(--sel); color: #fff; box-shadow: inset 0 -3px 0 var(--sel-line); }

/* ================= pares (match) ================= */
.match-hint { margin-top: -10px; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mcol { display: grid; gap: 10px; align-content: start; }
.match .opt { position: relative; justify-content: center; text-align: center; min-height: 62px; padding: 10px 8px 12px; font-size: 16px; }
.match .opt.tl { font-weight: 600; }
.match .opt.sel { border-color: var(--primary); background: var(--tint); color: var(--primary-ink); box-shadow: inset 0 0 0 1px var(--primary), inset 0 -4px 0 var(--tint-edge); }
.match .opt.wrong { animation: none; }
.match .opt.shake { animation: nudge .3s; }
.match .opt.gone { gap: 6px; color: var(--ok); font-weight: 700; background: var(--ok-bg); border-color: var(--ok-line); box-shadow: none; pointer-events: none; }
.match .opt.gone::before { content: ""; flex: none; width: 18px; height: 18px; background: var(--ic-check-ok) center / contain no-repeat; }
.match .opt.lock { opacity: 1; border-color: var(--ok-solid); animation: pair-lock .32s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pair-lock { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ================= falar (speak) ================= */
.mic { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 18px; }
.mic button.rec { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 16px; border: 0; background: none; color: var(--primary-ink); font-weight: 700; font-size: 16px; border-radius: 20px; }
.mic .mic-ic {
  position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  background: var(--primary); color: #fff; box-shadow: inset 0 -5px 0 var(--primary-edge), 0 0 0 10px var(--tint);
  transition: background-color .2s, box-shadow .2s, transform .15s;
}
.mic .mic-ic .ico { width: 40px; height: 40px; }
.mic button.rec:active .mic-ic { transform: scale(.97); }
.mic button.rec.on { color: var(--bad); }
.mic button.rec.on .mic-ic { background: var(--bad-solid); box-shadow: inset 0 -5px 0 var(--bad-edge), 0 0 0 10px var(--bad-bg); }
.mic button.rec.on .mic-ic::before, .mic button.rec.on .mic-ic::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--bad-solid); animation: ripple 1.6s ease-out infinite;
}
.mic button.rec.on .mic-ic::after { animation-delay: .8s; }
.mic button.rec.on .mic-t { padding: 4px 12px; border-radius: 999px; background: var(--bad-bg); }
@keyframes ripple { from { transform: scale(.9); opacity: .6; } to { transform: scale(1.45); opacity: 0; } }
/* onda sonora: barras que seguem o microfone (AnalyserNode) ou animação de reserva */
.wave { display: flex; align-items: center; justify-content: center; gap: 5px; height: 44px; opacity: 0; transition: opacity .2s; }
.listening .wave { opacity: 1; }
.wave i { width: 6px; height: 40px; border-radius: 99px; background: var(--bad-solid); transform: scaleY(.14); transition: transform .08s linear; }
.wave.fake i { animation: wave 1s ease-in-out infinite; }
.wave.fake i:nth-child(2n) { animation-duration: .8s; }
.wave.fake i:nth-child(3n) { animation-duration: 1.25s; }
.wave.fake i:nth-child(1) { animation-delay: -.2s; } .wave.fake i:nth-child(2) { animation-delay: -.5s; } .wave.fake i:nth-child(3) { animation-delay: -.1s; }
.wave.fake i:nth-child(4) { animation-delay: -.7s; } .wave.fake i:nth-child(5) { animation-delay: -.3s; } .wave.fake i:nth-child(6) { animation-delay: -.9s; }
.wave.fake i:nth-child(7) { animation-delay: -.4s; } .wave.fake i:nth-child(8) { animation-delay: -.6s; } .wave.fake i:nth-child(9) { animation-delay: -.15s; }
.wave.fake:not(.voice) i { animation-name: wave-idle; }
@keyframes wave { 0%, 100% { transform: scaleY(.2); } 50% { transform: scaleY(.95); } }
@keyframes wave-idle { 0%, 100% { transform: scaleY(.12); } 50% { transform: scaleY(.3); } }
.heard { font-size: 16px; color: var(--muted); text-align: center; }
.heard > div:first-child { font-size: 19px; color: var(--ink); margin-bottom: 6px; }
.heard .w-ok { color: var(--ok); font-weight: 700; }
.heard .w-miss { color: var(--bad); text-decoration: underline wavy; text-underline-offset: 4px; }
.heard .score { width: 180px; height: 8px; margin: 0 auto 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.heard .score i { display: block; height: 100%; border-radius: inherit; background: var(--bad-solid); transition: width .3s; }
.heard .score.good i { background: var(--ok-solid); }
.speak-off { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.speak-off .ico { color: var(--muted); }
.linkbtn { min-height: 44px; padding: 0 12px; background: none; border: 0; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }

/* ================= cartões de ensino ================= */
.teach-card { padding: 20px 18px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-1); }
.teach-card h3 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 21px; line-height: 1.22; letter-spacing: -.01em; }
.teach-card h3 .ico { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--tint-2); color: var(--primary-ink); }
.teach-card p { margin: 0 0 16px; font-size: 17px; line-height: 1.62; }
.teach-card p b { color: var(--brand-ink); }
.tc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; justify-content: space-between; margin-bottom: 14px; }
.tc-sub { margin: -6px 0 14px !important; color: var(--ink-2); font-size: 14.5px !important; }
.btn.seq { min-height: 44px; }
.btn.seq.on { color: var(--bad); }
.tl { overflow-wrap: anywhere; }
/* dica: mascote pensando + tipografia de leitura */
.teach-card.tip { padding: 22px 20px 14px; }
.tip-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.tip-eyebrow { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; color: var(--accent-ink); font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tip-eyebrow .ico { width: 16px; height: 16px; }
.teach-card.tip h3 { font-size: 23px; letter-spacing: -.02em; }
.tip-body { max-width: 62ch; }
.tip-body p { font-size: 18px; line-height: 1.72; color: var(--ink); }
.tip-body p b { padding: 0 .2em; border-radius: 5px; background: var(--accent-wash); color: var(--brand-ink); }
.tip-ex { display: grid; gap: 8px; margin: 4px 0 8px; }
.ex-line, .dline { display: flex; align-items: center; gap: 12px; font-size: 17px; line-height: 1.4; }
.tip-ex .ex-line { padding: 10px 12px; border-radius: 16px; background: var(--bg); border-left: 4px solid var(--primary); font-weight: 600; }
.ex-line small, .dline small { display: block; margin-top: 2px; color: var(--muted); font-size: 14.5px; font-weight: 400; }
.ex-line .say, .vcard .say, .dline .say { width: 44px; height: 44px; border-radius: 12px; }
.ex-line .say .ico, .vcard .say .ico, .dline .say .ico { width: 20px; height: 20px; }
/* vocabulário: cartões com áudio, IPA e exemplo */
.vocab-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding-bottom: 10px; }
.vcard {
  display: flex; align-items: flex-start; gap: 14px; padding: 12px 14px; border-radius: 18px; background: var(--bg); border: 2px solid transparent;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.vcard.playing { border-color: var(--primary); background: var(--tint); transform: scale(1.01); }
.vc-main { min-width: 0; flex: 1; }
.vcard .word { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.25; }
.vcard .ipa { margin-left: 0; color: var(--muted); font-family: var(--font-body); font-size: 14px; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.vcard .pt { color: var(--ink-2); font-size: 15.5px; }
.vc-ex { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-strong); font-size: 15px; line-height: 1.4; }
.vc-ex .tl { display: block; font-weight: 600; color: var(--ink); }
.vc-ex .tr { display: block; color: var(--muted); font-size: 14px; }
/* diálogo como conversa */
.dlines { display: grid; gap: 12px; padding-bottom: 8px; }
.dline { align-items: flex-start; gap: 10px; transition: transform .2s; }
.dline.right { flex-direction: row-reverse; }
.dbub {
  max-width: 86%; padding: 10px 14px 10px; border-radius: 18px 18px 18px 6px; background: var(--bg); border: 2px solid var(--line);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.dline.right .dbub { border-radius: 18px 18px 6px 18px; background: var(--tint); border-color: var(--tint-2); }
.dline.playing .dbub { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint-2); }
.dline.playing { transform: translateY(-1px); }
.dline .who { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--primary-ink); }
.dtx { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; font-weight: 600; }
.dtx .say { margin: -2px -6px 0 0; width: 44px; height: 44px; background: transparent; color: var(--primary-ink); box-shadow: none; }
.dtx .say:hover { background: var(--tint-2); }

/* ================= rodapé de verificação ================= */
.foot {
  position: sticky; bottom: 0; z-index: 4; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line); transition: background-color .2s, border-color .2s;
  box-shadow: 0 -10px 28px -20px rgb(0 0 0 / .4);
}
.foot.ok { background: var(--ok-bg); border-top-color: var(--ok-line); }
.foot.bad { background: var(--bad-bg); border-top-color: var(--bad-line); }
.foot .fb { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; animation: rise .22s ease-out; }
.foot .fb .fb-m { margin: -6px 0 -4px -4px; }
.fb-body { flex: 1; min-width: 0; }
.foot .fb h4 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 2px; padding-top: 6px; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
.foot.ok h4 { color: var(--ok); }
.foot.bad h4 { color: var(--bad); }
.combo-tag { display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px 3px 7px; border-radius: 999px; background: var(--flame-soft); color: var(--ink); font-family: var(--font-body); font-size: 13px; font-weight: 800; animation: lx-pop-in .3s cubic-bezier(.2, 1.4, .4, 1); }
.combo-tag .ico { width: 16px; height: 16px; color: var(--flame); fill: var(--flame); stroke-width: 1.6; }
.foot .fb p { margin: 3px 0 0; font-size: 16px; line-height: 1.45; color: var(--ink); }
.foot .fb .fb-ans { font-weight: 700; font-size: 17.5px; }
.foot .fb .fb-ans small { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--bad); }
.foot .fb .fb-note { color: var(--ink-2); font-size: 15px; }
.why { margin-top: 6px; }
.why summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; margin-left: -12px; border-radius: 12px;
  cursor: pointer; list-style: none; font-weight: 800; font-size: 15px; color: var(--ink-2);
}
.why summary::-webkit-details-marker { display: none; }
.why summary .ico { width: 18px; height: 18px; color: var(--accent-ink); }
.why summary::after { content: ""; width: 16px; height: 16px; background: var(--ic-chev) center / contain no-repeat; transition: transform .2s; }
.why[open] summary::after { transform: rotate(180deg); }
.why summary:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.why p { margin: 0 0 4px !important; padding: 10px 12px; border-radius: 12px; background: var(--card); font-size: 15.5px !important; animation: rise .2s ease-out; }
.foot .row { display: flex; gap: 10px; }
.foot .row .btn { flex: 1; }
.foot .row .btn.ghost { flex: 0 0 auto; min-width: 104px; }
.foot > .btn.block { min-height: 54px; font-size: 18px; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ================= modais da lição (sair, sem vidas) ================= */
.lx-modal { text-align: center; }
.lx-modal p { margin-bottom: 20px; }
.lx-modal .clock { font-variant-numeric: tabular-nums; color: var(--ink); }
.lx-actions { display: grid; gap: 10px; }

/* ================= resultado ================= */
.result {
  flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 16px; min-height: 100vh; min-height: 100dvh;
  padding: calc(40px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom)); text-align: center;
}
.stage .result { min-height: 0; padding: 28px 4px 8px; }
/* .big: medalha (nivelamento em onboarding.js) */
.result .big {
  position: relative; align-self: center; display: grid; place-items: center; width: 124px; height: 124px; margin-bottom: 4px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 56px;
  box-shadow: inset 0 -6px 0 color-mix(in srgb, var(--accent) 35%, transparent);
  animation: medal .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.result .big .ico { width: 58px; height: 58px; stroke-width: 1.8; }
.result .big.perfect { background: var(--tint-2); color: var(--primary-ink); box-shadow: inset 0 -6px 0 var(--tint-edge); }
.result .big.sad { background: var(--bad-bg); color: var(--bad); box-shadow: none; animation: none; }
@keyframes medal { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.result h2 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.025em; color: var(--ink); }
.result p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.res-hero { position: relative; align-self: center; display: grid; place-items: center; width: 200px; height: 168px; margin-bottom: -6px; }
.res-hero::before {
  content: ""; position: absolute; inset: 8px 18px 0; border-radius: 50%;
  background: radial-gradient(closest-side, var(--tint-2), transparent); animation: medal .4s ease-out both;
}
.res-hero .lx-m { position: relative; }
.res-badge {
  position: absolute; right: 18px; bottom: 10px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); border: 4px solid var(--bg); box-shadow: inset 0 -4px 0 var(--accent-edge);
  animation: medal .4s .3s cubic-bezier(.2, 1.4, .4, 1) both;
}
.res-badge.perfect { background: var(--primary); color: #fff; box-shadow: inset 0 -4px 0 var(--primary-edge); }
.res-badge .ico { width: 26px; height: 26px; stroke-width: 2; }
.res-sub { margin-top: -10px !important; font-weight: 600; }
.result .stars-row { align-self: center; gap: 8px; }
.result .stars-row .ico { width: 46px; height: 46px; stroke-width: 1.5; animation: star-in .34s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: .4s; }
.result .stars-row .ico:nth-child(2) { animation-delay: .66s; width: 54px; height: 54px; margin-top: -10px; }
.result .stars-row .ico:nth-child(3) { animation-delay: .92s; }
@keyframes star-in { from { transform: scale(0) rotate(-40deg); opacity: 0; } 60% { transform: scale(1.25) rotate(8deg); opacity: 1; } to { transform: none; } }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { text-align: center; padding: 12px 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.kpi b { display: flex; align-items: center; justify-content: center; gap: 4px; font-family: var(--font-display); font-size: 25px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi b .ico { width: 20px; height: 20px; stroke-width: 1.7; }
.kpi b .ico-flame { color: var(--flame); fill: var(--flame); }
.kpi b .ico-zap { color: var(--accent-edge); fill: var(--accent); }
.kpi b .ico-book { color: var(--primary-ink); }
.kpi small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lx-result .kpi { border-width: 2px; border-radius: 18px; box-shadow: inset 0 -4px 0 var(--line); animation: rise .3s both; }
.lx-result .kpi:nth-child(1) { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); animation-delay: .2s; }
.lx-result .kpi:nth-child(2) { animation-delay: .28s; }
.lx-result .kpi:nth-child(3) { animation-delay: .36s; }
.streak-up, .badge-up {
  align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px;
  font-weight: 700; font-size: 16px; line-height: 1.3; text-align: left; color: var(--ink) !important;
}
.streak-up { background: var(--flame-soft); }
.streak-up .ico { color: var(--flame); fill: var(--flame); stroke-width: 1.6; }
.badge-up { background: var(--accent-soft); border-radius: 18px; padding: 10px 16px 10px 12px; }
.badge-up .ico { width: 22px; height: 22px; color: var(--accent-ink); }
/* metas de hoje (outros módulos podem acrescentar linhas pelo evento 'result') */
.res-goals { display: grid; gap: 8px; padding: 14px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.res-goals h3 { margin: 0 0 2px; font-size: 13px; font-family: var(--font-body); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.goal-row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.goal-row .gi { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tint-2); color: var(--primary-ink); }
.goal-row .gi .ico { width: 20px; height: 20px; }
.goal-row.met .gi { background: var(--ok-solid); color: #fff; }
.goal-row .gi.flame { background: var(--flame-soft); color: var(--flame); }
.goal-row .gi.flame .ico { fill: var(--flame); stroke-width: 1.6; }
.goal-row .gt { flex: 1; min-width: 0; }
.goal-row b { display: block; font-size: 15px; color: var(--ink); }
.goal-row small { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.gbar { height: 10px; margin-top: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.gbar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.goal-row.met .gbar i { background: var(--ok-solid); }
.goal-row .gv { flex: none; font-weight: 800; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.result .spacer { flex: 1; min-height: 4px; }
.res-actions {
  position: sticky; bottom: 0; display: flex; gap: 10px; margin: 0 -20px calc(-20px - env(safe-area-inset-bottom));
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line);
}
.res-actions .btn.block { flex: 1; }
.res-actions .btn.share { flex: none; padding: 0 16px 3px; }
@media (max-width: 380px) { .res-actions .btn.share span { display: none; } }
.lx-out .next-life { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.lx-out .next-life .ico { width: 18px; height: 18px; color: var(--muted); }
.lx-out .clock { font-variant-numeric: tabular-nums; }

/* ================= efeitos ================= */
.burst { position: fixed; z-index: 50; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; animation: burst .62s cubic-bezier(.1, .8, .3, 1) forwards; }
.burst i.p0 { background: var(--flame); } .burst i.p1 { background: var(--accent); }
.burst i.p2 { background: var(--primary); border-radius: 2px; } .burst i.p3 { background: var(--heart); width: 6px; height: 6px; }
@keyframes burst { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; } }
.confetti { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px; animation: confetti 2s cubic-bezier(.3, .4, .5, 1) forwards; }
.confetti i.c0 { background: var(--primary); } .confetti i.c1 { background: var(--accent); } .confetti i.c2 { background: var(--ok-solid); }
.confetti i.c3 { background: var(--heart); width: 7px; height: 7px; border-radius: 50%; } .confetti i.c4 { background: var(--brand-2); width: 6px; height: 16px; }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: 0; } }

/* ================= larguras ================= */
@media (min-width: 600px) {
  .vocab-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stage > div > h2, .stage h2 { font-size: 26px; }
}
@media (min-width: 1024px) {
  .res-actions { margin: 0; padding: 12px 0 0; border: 0; background: none; position: static; }
  .result.lx-result { padding-top: 48px; }
}

/* ================= movimento reduzido ================= */
@media (prefers-reduced-motion: reduce) {
  .mic button.rec.on .mic-ic::before { animation: none; transform: scale(1.12); opacity: .5; }
  .mic button.rec.on .mic-ic::after { display: none; }
  .wave i { transform: scaleY(.5) !important; }
  .burst, .confetti, .heart-break { display: none; }
}


/* ================= acabamento (revisão de design 30/10) ================= */
/* avatar ilustrado (avatarEl): fundo e roupa na paleta do app */
.avatar.av-ill { width: 44px; height: 44px; padding: 0; background: none; box-shadow: none; overflow: hidden; }
.avatar.av-ill > svg { display: block; width: 100%; height: 100%; }
.av-ill .av-bg { fill: var(--tint-2); }
.av-ill .av-shirt { fill: var(--primary); }
.av-ill.av-c1 .av-bg { fill: color-mix(in srgb, var(--band) 22%, var(--card)); }
.av-ill.av-c1 .av-shirt { fill: var(--band); }
.av-ill.av-c2 .av-bg { fill: var(--accent-soft); }
.av-ill.av-c2 .av-shirt { fill: var(--accent-edge); }
.dline .avatar, .cline .avatar { margin-top: 2px; }

/* pergunta feita pelo mascote (mcq sem frase no idioma) */
.ask { display: flex; align-items: center; gap: 12px; margin: 6px 0 22px; }
.ask .ask-m { flex: none; }
.ask-b {
  position: relative; flex: 1; min-width: 0; padding: 14px 16px; background: var(--card); border: 2px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-1);
}
.ask-b::before {
  content: ""; position: absolute; left: -9px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: var(--card);
  border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg);
}
.stage .ask-b h2 { margin: 0; font-size: 21px; line-height: 1.3; }
.story-q .ask { display: block; margin: 0 0 14px; }
.story-q .ask-m { display: none; }
.story-q .ask-b { padding: 0; background: none; border: 0; box-shadow: none; }
.story-q .ask-b::before { display: none; }
/* glifo em escrita não latina no meio do enunciado */
.glyph-inline { display: inline-block; margin: 0 .12em; padding: 0 .28em; border-radius: 8px; background: var(--tint); color: var(--primary-ink); font-size: 1.3em; font-weight: 700; line-height: 1.1; vertical-align: -.08em; }

/* opções de 1-2 glifos (ex.: Hangul): cartões em grade, glifo grande, áudio */
.opts.glyphs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.opts.glyphs.n2, .opts.glyphs.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.glyphs .opt {
  position: relative; flex-direction: column; justify-content: center; gap: 0; min-height: 132px; padding: 22px 8px 18px;
  text-align: center; font-size: 60px; font-weight: 600; line-height: 1;
}
.opts.glyphs .opt .k { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; font-size: 12px; font-family: var(--font-display); }
.opts.glyphs .opt .g-au { position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--tint); color: var(--primary-ink); }
.opts.glyphs .opt .g-au .ico { width: 16px; height: 16px; }
.opts.glyphs .opt::after { position: absolute; top: 8px; right: 8px; margin: 0; font-size: 10.5px; padding: 2px 7px; font-weight: 700; line-height: 1.3; }
.opts.glyphs .opt.sel:not(.wrong):not(.right)::after { content: none; }
@media (max-width: 360px) { .opts.glyphs .opt { min-height: 112px; font-size: 50px; } }

/* rodapé: acerto com placar e mascote maior, micro-animação */
.foot .fb.win .fb-m { animation: fb-hop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.foot .fb.win h4 { animation: fb-pop .32s cubic-bezier(.2, 1.4, .4, 1) both; transform-origin: left center; }
@keyframes fb-hop { 0% { transform: translateY(10px) scale(.8); } 55% { transform: translateY(-6px) scale(1.05); } 100% { transform: none; } }
@keyframes fb-pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.fb-gain { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fb-gain .fg {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 7px; border-radius: 999px;
  background: var(--card); color: var(--ink); font-size: 13.5px; font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--ok-line);
  animation: rise .3s .12s both;
}
.fb-gain .fg .ico { width: 16px; height: 16px; color: var(--ok); stroke-width: 3; }
.fb-gain .fg.flame .ico { color: var(--flame); fill: var(--flame); stroke-width: 1.6; }
.foot .fb .lx-m.lx-md { width: 72px; height: 72px; }
/* botão de verificar desativado: diz o que falta */
.foot .btn.check[disabled] { font-size: 16px; letter-spacing: 0; }

/* resultado: confete atrás do conteúdo, só na faixa de cima, some em ~2 s */
.lx-result { position: relative; gap: 14px; padding-top: calc(28px + env(safe-area-inset-top)); }
.lx-result > :not(.confetti):not(.res-actions) { position: relative; z-index: 1; }
.lx-result > .res-actions { z-index: 2; }
.confetti.in { position: absolute; inset: 0 0 auto 0; height: 460px; z-index: 0; }
.confetti.in i { animation-name: confetti-in; animation-fill-mode: both; }
@keyframes confetti-in { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: .9; } 70% { opacity: .9; } 100% { transform: translate(var(--x), 440px) rotate(var(--r)); opacity: 0; } }
.lx-result .res-hero { height: 150px; }
.lx-result .lx-m.lx-xl { width: 132px; height: 132px; }

/* coluna lateral da lição: só no desktop largo (responsive.css) */
.lx-side { display: none; }

/* linha de pronúncia (LANG.pron: pinyin do chinês), sob o texto-alvo; só existe nos apps que definem L.pron.
   Cor muted (AA no claro e no escuro: vem do lang.css), fonte do corpo em latim, letter-spacing leve. */
.pron { display: block; margin-top: 3px; color: var(--muted); font-family: var(--font-body); font-size: .8em; font-weight: 500; font-style: normal; letter-spacing: .03em; line-height: 1.35; text-transform: none; overflow-wrap: normal; word-break: normal; }
.dline small.pron, .ex-line small.pron { margin-top: 2px; color: var(--muted); font-size: 14px; font-weight: 500; }
.vc-ex .pron { font-size: 13.5px; margin-top: 1px; }
.prompt-en .pron { font-size: 15px; margin-top: 4px; }
.sentence .pron.pron-block { margin-top: 2px; font-size: 15px; line-height: 1.4; }
.bubble .pron.pron-line { margin-top: 2px; font-size: 13.5px; }
.foot .fb .fb-ans small.pron { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; letter-spacing: .03em; text-transform: none; color: var(--ink-2); }
.opt .pron.opt-pron { display: inline; order: 1; margin: 0 0 0 8px; font-size: 13.5px; }
.opts .opt::after { order: 2; }
.opts.grid2 .opt .pron.opt-pron, .opts.glyphs .opt .pron.opt-pron { display: block; margin: 0; }
.opts.glyphs .opt .pron.opt-pron { margin-top: 8px; font-size: 14px; white-space: nowrap; }
.opts.glyphs .opt:has(> .opt-pron) { padding-bottom: 42px; }
/* opção em fila com pinyin: texto em cima, pinyin embaixo (grade: número | texto/pinyin | selo) */
.opts:not(.glyphs):not(.grid2) .opt:has(> .opt-pron) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; row-gap: 1px; }
.opts:not(.glyphs):not(.grid2) .opt:has(> .opt-pron) .k { grid-column: 1; grid-row: 1 / span 2; }
.opts:not(.glyphs):not(.grid2) .opt:has(> .opt-pron) .opt-pron { grid-column: 2; grid-row: 2; margin: 0; display: block; }
.opts:not(.glyphs):not(.grid2) .opt:has(> .opt-pron)::after { grid-column: 3; grid-row: 1 / span 2; }
/* hanzi: duas sílabas não cabem a 60 px no cartão de glifo de 390 px */
.opts.glyphs.g2 .opt:lang(zh) { font-size: 46px; white-space: nowrap; padding-top: 38px; }
@media (max-width: 360px) { .opts.glyphs.g2 .opt:lang(zh) { font-size: 38px; } }
.lx-reveal { margin: 14px 2px 0; padding: 10px 14px; border-radius: 14px; background: var(--tint); border: 1px solid var(--tint-edge); font-size: 19px; font-weight: 600; color: var(--ink); }
.lx-reveal .pron { font-size: 14.5px; }
.prompt-en .tl-w { min-width: 0; }
.prompt-en .tl-w .tl { display: block; }

/* ================= ajuda "Como responder" (lesson.js: exHelpBtn, helpSheet, helpArt) ================= */
.ex-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.ex-help {
  flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; margin: -4px -8px -4px 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); transition: color .15s, background-color .15s;
}
.ex-help .ico { width: 24px; height: 24px; stroke-width: 2; }
.ex-help:hover { color: var(--primary-ink); background: var(--tint); }
.ex-help:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.sq-head .ex-help { margin-left: auto; width: 34px; height: 34px; margin-right: -6px; }
.sq-head .ex-help .ico { width: 22px; height: 22px; }
.help-sheet .help-art { margin: 2px 0 18px; padding: 12px 8px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
.help-sheet h3 { font-size: 23px; }
.help-sheet p { margin-bottom: 20px; }
.help-svg { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; overflow: visible; }
.hx-card, .hx-tile, .hx-key { fill: var(--card); stroke: var(--line-strong); stroke-width: 1.5; }
.hx-sel, .hx-key.on { fill: var(--tint); stroke: var(--primary); stroke-width: 2.2; }
.hx-ok { fill: var(--ok-bg); stroke: var(--ok-line); stroke-width: 1.5; }
.hx-ln { fill: var(--muted); opacity: .42; }
.hx-ln.on { fill: var(--primary); opacity: .8; }
.hx-ln.ink { fill: var(--ink); opacity: .72; }
.hx-ln.ok { fill: var(--ok); opacity: .6; }
.hx-k { font: 800 10px var(--font-body); fill: var(--muted); text-anchor: middle; }
.hx-k.on { fill: var(--primary-ink); }
.hx-keymark { fill: var(--muted); opacity: .5; }
.hx-keymark.on { fill: var(--primary); opacity: .9; }
.hx-gap { fill: var(--tint); stroke: var(--primary); stroke-width: 2; stroke-dasharray: 5 4; }
.hx-dashbox { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 5 4; }
.hx-used { fill: var(--line); }
.hx-input { fill: var(--card); stroke: var(--primary); stroke-width: 2; }
.hx-caret, .hx-dot, .hx-pri { fill: var(--primary); }
.hx-soft { fill: var(--tint); stroke: var(--tint-edge); stroke-width: 1.5; }
.hx-white { fill: #fff; }
.hx-ico-w, .hx-ico-p { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hx-ico-p { stroke: var(--primary-ink); }
.hx-hp { stroke-width: 4; }
.hx-wave { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; }
.hx-av { fill: var(--accent-soft); }
.hx-av-h { fill: var(--accent-ink); opacity: .75; }
.hx-rule { stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; }
.hx-arrow { fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 4 4; }
.hx-arrowhead { fill: var(--primary); }
.hx-num circle { fill: var(--primary); }
.hx-num text { font: 800 10.5px var(--font-body); fill: #fff; text-anchor: middle; }
.hx-link { fill: none; stroke-width: 3; stroke-linecap: round; }
.hx-link.ok { stroke: var(--ok); opacity: .7; }
.hx-link.go { stroke: var(--primary); stroke-dasharray: 6 6; }
.hx-ring { fill: none; stroke: var(--primary); stroke-width: 2; opacity: .3; }
.hx-bar { fill: var(--primary); opacity: .55; }
.hx-finger { fill: var(--card); stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.hx-knuckle { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; opacity: .45; }
.hx-ripple { fill: var(--primary); opacity: .26; }
/* movimento discreto: a mão chega e toca, o toque se espalha; nada disso com prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
  .help-svg .hx-press { animation: hx-press 2.6s cubic-bezier(.4, 0, .2, 1) infinite; }
  .help-svg .hx-ripple, .help-svg .hx-ring, .help-svg .hx-bar { transform-box: fill-box; transform-origin: center; }
  .help-svg .hx-ripple { animation: hx-ripple 2.6s ease-out infinite; }
  .help-svg .hx-wave { animation: hx-wave 1.6s ease-in-out infinite; }
  .help-svg .hx-wave.w2 { animation-delay: .25s; }
  .help-svg .hx-caret { animation: hx-blink 1s steps(1) infinite; }
  .help-svg .hx-link.go { animation: hx-dash12 1s linear infinite; }
  .help-svg .hx-arrow { animation: hx-dash8 1s linear infinite; }
  .help-svg .hx-ring { animation: hx-ring 2.2s ease-out infinite; }
  .help-svg .hx-ring.r2 { animation-delay: 1.1s; }
  .help-svg .hx-bar { animation: hx-bar .9s ease-in-out infinite alternate; }
  .help-svg .hx-bar.b1 { animation-delay: -.2s; } .help-svg .hx-bar.b2 { animation-delay: -.45s; }
  .help-svg .hx-bar.b3 { animation-delay: -.65s; } .help-svg .hx-bar.b4 { animation-delay: -.8s; }
}
@keyframes hx-press { 0%, 100% { transform: translate(8px, 14px); } 30%, 72% { transform: none; } 40% { transform: translateY(3px); } }
@keyframes hx-ripple { 0%, 36% { transform: scale(.4); opacity: 0; } 42% { opacity: .42; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes hx-wave { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes hx-blink { 50% { opacity: 0; } }
@keyframes hx-dash12 { to { stroke-dashoffset: -12; } }
@keyframes hx-dash8 { to { stroke-dashoffset: -8; } }
@keyframes hx-ring { from { transform: scale(.78); opacity: .5; } to { transform: scale(1.3); opacity: 0; } }
@keyframes hx-bar { from { transform: scaleY(.45); } to { transform: scaleY(1); } }
