:root {
  /* LT Academy — claro: off-white quente, tinta quase preta, dourado */
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f1ede4;
  --ink: #16150f;
  --muted: #6e695e;
  --line: #e7e1d4;
  --brand: #c9a14a;                 /* dourado para preenchimentos */
  --brand-grad: linear-gradient(135deg, #f0d48a 0%, #d2a64c 50%, #a97a2a 100%);
  --brand-ink: #16150f;             /* texto sobre o dourado */
  --brand-text: #8a6114;            /* dourado legível como texto sobre o fundo */
  --brand-soft: rgba(201, 161, 74, .14);
  --accent: #16150f;                /* botão secundário forte (preto) */
  --accent-ink: #f7f5f0;
  --hero: #141310;
  --good: #15803d;
  --good-bg: #e3f4e8;
  --bad: #c62828;
  --bad-bg: #fbe7e5;
  --warn-bg: #f8edd2; --warn: #855c06;
  --gold: #d4a94f;
  --silver: #a9b0ba;
  --bronze: #b97a4b;
  --belt-edge: rgba(0, 0, 0, .14);
  --shadow: 0 1px 2px rgba(20, 18, 10, .05), 0 4px 16px rgba(20, 18, 10, .05);
  --radius: 16px;
  --nav-w: 248px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0c; --surface: #161614; --surface-2: #201f1c; --ink: #f3f0e8; --muted: #a39e92;
    --line: #2b2a26; --brand-text: #dcb867; --brand-soft: rgba(212, 169, 79, .14);
    --accent: #f3f0e8; --accent-ink: #0d0d0c; --hero: #171611;
    --good: #4ade80; --good-bg: #10261a; --bad: #f87171; --bad-bg: #2d1414; --warn-bg: #2c2410; --warn: #e9c46a;
    --belt-edge: rgba(255, 255, 255, .38);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-text); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 .ic, h2 .ic { vertical-align: -3px; color: var(--brand-text); }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
button { font: inherit; cursor: pointer; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line);
  border-radius: 12px; padding: 10px 12px; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
label { font-weight: 800; font-size: .85rem; color: var(--muted); display: block; margin: 12px 0 4px; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.nav {
  width: var(--nav-w); background: var(--surface); border-right: 1px solid var(--line);
  position: fixed; inset: 0 auto 0 0; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; padding: 4px 8px 22px; }
.logo-lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo-lockup .wordmark { font-weight: 800; font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink);
  font-weight: 800;
}
.nav a { font-weight: 700; color: var(--muted); position: relative; }
.nav a .i { width: 22px; display: grid; place-items: center; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--brand-soft); color: var(--ink); }
.nav a.active .i { color: var(--brand-text); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav .spacer { flex: 1; }
.nav .me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); color: var(--ink); }
.main { margin-left: var(--nav-w); padding: 28px 32px 60px; max-width: calc(1180px + var(--nav-w)); }
.main > * { max-width: 1180px; }
.topbar { display: none; }
.bottomnav { display: none; }

@media (max-width: 860px) {
  .nav { display: none; }
  .main { margin-left: 0; padding: 14px 16px 96px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; padding: 10px 16px;
    background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface);
    border-top: 1px solid var(--line); z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a { flex: 1; text-align: center; color: var(--muted); font-size: .68rem; font-weight: 800; padding: 4px 0; }
  .bottomnav a .i { display: grid; place-items: center; height: 26px; }
  .bottomnav a.active { color: var(--brand-text); }
  .topbar > .row { flex-wrap: nowrap; gap: 6px; }
  .topbar > a { min-width: 0; }
  h1 { font-size: 1.45rem; }
}

/* ---------- componentes ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g2, .g3 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  padding: 11px 18px; font-weight: 800; background: var(--brand-grad); color: var(--brand-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 2px 8px rgba(169, 122, 42, .25); transition: transform .08s, filter .15s; text-align: center;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.good { background: #15803d; color: #fff; box-shadow: none; }
.btn.bad { background: #c62828; color: #fff; box-shadow: none; }
.btn.accent { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn.sm { padding: 7px 12px; font-size: .85rem; border-radius: 11px; }
.btn.block { width: 100%; }
.iconbtn { background: var(--surface-2); border: 0; border-radius: 12px; padding: 8px 10px; font-size: 1.1rem; color: var(--ink); display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.brand { background: var(--brand-soft); color: var(--brand-text); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }

.belt {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 999px;
  font-weight: 800; font-size: .75rem; border: 1px solid var(--belt-edge); white-space: nowrap;
}
.belt .knot { width: 14px; height: 6px; border-radius: 2px; background: currentColor; opacity: .3; }

.hero {
  background: radial-gradient(120% 140% at 100% 0%, rgba(212,169,79,.28), transparent 55%), var(--hero);
  color: #f3f0e8; border-radius: 22px; padding: 26px; position: relative; overflow: hidden; border: 1px solid rgba(212,169,79,.25);
}
.hero .hero-mark { position: absolute; right: -30px; bottom: -26px; opacity: .1; color: #f3f0e8; pointer-events: none; }
.hero h1 { font-size: 1.6rem; }
.hero .eyebrow { margin: 0; color: #dcb867; font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.btn.light { background: #f3f0e8; color: #16150f; box-shadow: none; }
.btn.outline-light { background: transparent; color: #f3f0e8; box-shadow: inset 0 0 0 1px rgba(243,240,232,.35); }
.stat { text-align: center; padding: 14px; }
.stat { text-align: left; display: grid; gap: 2px; }
.stat .ic { color: var(--brand-text); margin-bottom: 4px; }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

.progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand-grad); border-radius: 999px; transition: width .4s; }

.tile {
  display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); transition: transform .12s, border-color .12s; position: relative;
}
.tile:hover { transform: translateY(-2px); border-color: var(--brand); }
.tile .emoji { font-size: 2rem; line-height: 1; }
.tile .tic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.tile h3 { margin: 4px 0 0; }
.tile.locked { opacity: .55; pointer-events: none; }
.tile .corner { position: absolute; top: 12px; right: 12px; }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.avatar { font-size: 1.6rem; width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; flex: none; }

.tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 5px; border-radius: 14px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-weight: 800; color: var(--muted); }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.table-wrap { overflow-x: auto; }

/* markdown */
.md h2 { margin-top: 1.2em; }
.md ul { padding-left: 1.2em; }
.md li { margin: 4px 0; }
.md blockquote { margin: 12px 0; padding: 10px 14px; background: var(--surface-2); border-left: 3px solid var(--brand); border-radius: 8px; }
.md table { margin: 12px 0; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.md strong { color: var(--brand-text); }

/* exercícios */
.ex { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); }
.ex.ok { border-color: var(--good); }
.ex.no { border-color: var(--bad); }
.ex.typo { border-color: var(--warn); }
.ex .prompt { font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; }
.options { display: grid; gap: 8px; }
.opt {
  text-align: left; border: 2px solid var(--line); background: var(--surface); padding: 12px 14px; border-radius: 14px;
  font-weight: 700; color: var(--ink);
}
.opt:hover { border-color: var(--brand); }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt.right { border-color: var(--good); background: var(--good-bg); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; padding: 8px; border-radius: 14px; }
.chips.answer { background: var(--surface-2); border: 2px dashed var(--line); }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 7px 12px; font-weight: 700; color: var(--ink); }
.feedback { margin-top: 12px; padding: 10px 14px; border-radius: 12px; font-weight: 800; }
.feedback.ok { background: var(--good-bg); color: var(--good); }
.feedback.no { background: var(--bad-bg); color: var(--bad); }
.feedback.typo { background: var(--warn-bg); color: var(--warn); }
.feedback.typo .big-check { color: var(--warn); }
.mic { width: 84px; height: 84px; border-radius: 50%; font-size: 2.2rem; border: 0; background: var(--brand-grad); color: var(--brand-ink); box-shadow: 0 6px 20px rgba(169,122,42,.35); }
.mic.rec { animation: pulse 1s infinite; background: var(--bad); }
@keyframes pulse { 50% { transform: scale(1.08); } }
.word-ok { color: var(--good); font-weight: 800; }
.word-no { color: var(--bad); font-weight: 800; text-decoration: underline wavy; }

/* toasts */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 800; box-shadow: var(--shadow); animation: slidein .25s; max-width: 340px; }
.toast.err { background: #c62828; color: #fff; }
.toast.xp { background: var(--brand-grad); color: #16150f; font-size: 1.05rem; }
@keyframes slidein { from { transform: translateY(-10px); opacity: 0; } }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 8, 6, .6); z-index: 500; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { background: var(--surface); border-radius: 22px; padding: 22px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
@keyframes fade { from { opacity: 0; } }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background:
  radial-gradient(circle at 15% 0%, rgba(212,169,79,.22), transparent 45%), var(--bg); }
.auth .card { width: min(420px, 100%); padding: 28px; }
.auth .logo { display: flex; justify-content: center; color: var(--ink); margin: 6px 0 14px; }
.auth h1 { text-align: center; font-size: 1.15rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 800; }
.auth .sub { text-align: center; }

/* ranking */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; }
.podium .p { text-align: center; padding: 14px 8px; border-radius: 18px 18px 8px 8px; color: #fff; }
.podium .p .avatar { margin: 0 auto 6px; background: rgba(255,255,255,.25); width: 56px; height: 56px; font-size: 2rem; }
.podium .p1 { background: linear-gradient(180deg, #f0d48a, #b8862f); min-height: 210px; color: #16150f; }
.podium .p2 { background: linear-gradient(180deg, #cfd6df, var(--silver)); min-height: 170px; }
.podium .p3 { background: linear-gradient(180deg, #e3a274, var(--bronze)); min-height: 145px; }
.podium .prize { font-size: .75rem; background: rgba(0,0,0,.18); border-radius: 10px; padding: 4px 6px; margin-top: 8px; }
.me-row { outline: 2px solid var(--brand); }

/* clips */
.lyrics { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; padding: 4px; }
.lyric { padding: 10px 14px; border-radius: 12px; color: var(--muted); font-weight: 800; transition: all .2s; }
.lyric.now { background: var(--surface-2); color: var(--ink); font-size: 1.15rem; }
.lyric.past { opacity: .75; }
.gap { display: inline-block; min-width: 70px; border-bottom: 3px solid var(--brand); text-align: center; color: var(--brand-text); }
.gap.ok { color: var(--good); border-color: var(--good); }
.gap.no { color: var(--bad); border-color: var(--bad); }
.video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.video-wrap iframe, .video-wrap > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tts-stage { aspect-ratio: 16 / 9; border-radius: 16px; display: grid; place-items: center; text-align: center; padding: 20px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(212,169,79,.3), transparent 55%), #141310; color: #f3f0e8; font-size: 1.4rem; font-weight: 800; }

/* games */
.game-wrap { position: relative; width: 100%; max-width: 960px; margin: 0 auto; }
.game-wrap canvas { width: 100%; display: block; border-radius: 18px; background: #000; touch-action: none; }
.hud { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 800; margin-bottom: 10px; }
.hud span { background: var(--surface); border: 1px solid var(--line); padding: 6px 12px; border-radius: 12px; }
.touch-ctrl { display: none; justify-content: space-between; margin-top: 12px; gap: 10px; user-select: none; -webkit-user-select: none; }
.touch-ctrl button { width: 72px; height: 72px; border-radius: 50%; border: 0; font-size: 1.8rem; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); touch-action: none; }
@media (hover: none) { .touch-ctrl { display: flex; } }
.game-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8,8,6,.72); border-radius: 18px; padding: 16px; z-index: 5; }
.game-overlay .card { width: min(480px, 100%); text-align: center; }
.q-timer { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.q-timer div { height: 100%; background: var(--brand-grad); }
.hud { align-items: center; }
.hud-btn { margin-left: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 5px 10px; font-size: 1rem; cursor: pointer; }
.game-count { position: absolute; inset: 0; display: grid; place-items: center; z-index: 6; pointer-events: none;
  font-size: clamp(3rem, 12vw, 7rem); font-weight: 800; color: #f3d892; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.game-count.pulse { animation: count-pop .5s ease-out; }
@keyframes count-pop { from { transform: scale(1.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.record { color: var(--brand-text); }
.game-overlay .opt { text-align: left; }
@keyframes q-in { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.game-overlay .card { animation: q-in .22s ease-out; max-height: 100%; overflow: auto; }
/* No celular o canvas fica baixo demais: perguntas e telas de jogo ocupam a tela toda */
@media (max-width: 700px) {
  .game-overlay { position: fixed; border-radius: 0; z-index: 60; }
  .game-overlay .card { max-height: calc(100dvh - 32px); }
  .game-overlay h2 { font-size: 1.15rem; }
}

/* belt test */
.belt-visual { height: 34px; border-radius: 8px; position: relative; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); border: 1px solid var(--belt-edge); }
.belt-visual::after { content: ""; position: absolute; left: 50%; top: -6px; width: 30px; height: 46px; margin-left: -15px; border-radius: 6px; background: inherit; border: 1px solid var(--belt-edge); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.belt-track { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.belt-track div { height: 12px; border-radius: 4px; border: 1px solid var(--belt-edge); box-shadow: inset 0 -3px 0 rgba(0,0,0,.14); }
.belt-track div.cur { outline: 2px solid var(--brand); outline-offset: 2px; }


/* ---------- LT Academy: detalhes ---------- */
.hero-next { display: grid; gap: 2px; max-width: 520px; }
.hero-next b { font-size: 1.05rem; }
.rank-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; flex: none; background: var(--surface-2); }
.rank-n.r1 { background: linear-gradient(135deg, #f0d48a, #b8862f); color: #16150f; }
.rank-n.r2 { background: linear-gradient(135deg, #e3e6ea, #a9b0ba); color: #16150f; }
.rank-n.r3 { background: linear-gradient(135deg, #e0a87c, #a8673a); color: #fff; }
.fast { border: 1px solid rgba(212,169,79,.35); background: linear-gradient(180deg, var(--brand-soft), transparent 70%), var(--surface); }
.fast .goal { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fast .goal:last-of-type { border-bottom: 0; }
.fast .goal .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); }
.fast .goal.done .dot { background: var(--brand-grad); color: #16150f; }
::selection { background: rgba(212,169,79,.35); }

@media (max-width: 400px) {
  .topbar .wordmark { display: none; }
  .topbar .iconbtn { min-width: 38px; min-height: 38px; padding: 6px 8px; }
}

/* ---------- treinos (tradução, escrita, escuta, vocabulário) ---------- */
.drill .src { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 1.08rem; }
.drill .src .lang { font-size: .7rem; font-weight: 800; letter-spacing: .08em; color: var(--brand-text); border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px; flex: none; }
.drill .sent { font-size: 1.25rem; font-weight: 700; line-height: 2.3; margin: 6px 0; }
.drill .slot { display: inline-block; min-width: 82px; padding: 0 10px; margin: 0 2px; border-bottom: 3px solid var(--brand); line-height: 1.6; text-align: center; cursor: pointer; color: var(--brand-text); }
.drill .slot em { font-style: normal; font-size: .85rem; color: var(--muted); }
.drill .slot.hint { cursor: default; font-size: .95rem; color: var(--muted); background: var(--brand-soft); border-radius: 8px 8px 0 0; }
.drill .slot.on { color: var(--ink); }
.drill .slot.right, .drill .blank-inp.right { border-color: var(--good); color: var(--good); }
.drill .slot.wrong, .drill .blank-inp.wrong { border-color: var(--bad); color: var(--bad); }
.drill .blank-inp { font: inherit; font-size: 1.05rem; padding: 2px 8px; margin: 0 3px; border: 0; border-bottom: 3px solid var(--brand); background: var(--surface-2); color: var(--ink); border-radius: 8px 8px 0 0; max-width: 100%; }
.drill .blank-inp:focus { outline: none; background: var(--brand-soft); }
.drill .chip.used { opacity: .25; pointer-events: none; }
.drill .inp.big { width: 100%; font-size: 1.1rem; min-height: 64px; resize: vertical; }
.drill.was-done { opacity: .92; }
.big-check { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--good); color: #fff; vertical-align: middle; animation: pop-in .35s ease-out; }
.check-burst { display: grid; place-items: center; width: 84px; height: 84px; margin: 6px auto 12px; border-radius: 50%; background: var(--good); color: #fff; box-shadow: 0 0 0 10px var(--good-bg); animation: pop-in .4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop-in { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.iconbtn.sm { min-width: 32px; min-height: 32px; padding: 4px 6px; font-size: .95rem; }
.drill input.blank-inp { width: auto; display: inline-block; vertical-align: baseline; }
.drill textarea, .drill .inp { font-family: inherit; }

/* ---------- aulas gravadas ---------- */
.lesson-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; color: inherit; transition: transform .15s, border-color .15s; }
.lesson-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.lesson-card.locked { opacity: .55; }
.lesson-card .thumb { aspect-ratio: 16 / 9; background: #141310 center / cover no-repeat; display: grid; place-items: center; position: relative; }
.lesson-card .thumb.empty { background: radial-gradient(120% 140% at 100% 0%, rgba(212,169,79,.25), transparent 55%), #141310; }
.lesson-card .thumb .play { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(13,13,12,.75); color: #f3d892; }
.lesson-card .lc-body { padding: 12px 14px; display: grid; gap: 4px; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .lesson-layout { grid-template-columns: 1fr; } }
.teacher-only { border: 1px dashed rgba(212,169,79,.5); }
.btn.block { width: 100%; justify-content: center; }
.avatar.av-svg { padding: 0; overflow: hidden; background: var(--surface-2); display: inline-grid; place-items: end center; flex: none; }
.avatar.av-svg svg { display: block; }
.stat.money b { color: var(--brand-text); }
.warn-card { border-color: rgba(224,163,37,.5); }
.agenda-item .when { display: grid; min-width: 74px; }
.agenda-item.done { opacity: .75; }
.agenda-item.canceled { opacity: .45; text-decoration: line-through; }
.todo { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.todo input { width: auto; }
.todo.done span { text-decoration: line-through; color: var(--muted); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.bad-text { color: var(--bad); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 90px; align-items: end; margin: 8px 0; }
.bars div { height: 100%; display: flex; align-items: end; background: var(--surface-2); border-radius: 4px; }
.bars span { display: block; width: 100%; background: var(--brand-grad); border-radius: 4px; min-height: 2px; }
.skill-row { display: grid; grid-template-columns: 96px 1fr 44px 28px; gap: 8px; align-items: center; margin: 8px 0; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 12px; max-height: 180px; overflow: auto; padding: 8px; background: var(--surface-2); border-radius: 10px; }
.av-stage { display: grid; justify-items: center; gap: 6px; padding: 16px; margin: 10px 0 14px; border-radius: 16px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(212,169,79,.22), transparent 60%), var(--surface-2); }
.av-row { display: grid; gap: 6px; margin: 10px 0; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.swatch.on { outline: 3px solid var(--brand); outline-offset: 2px; }
.chip.sm { padding: 5px 10px; font-size: .85rem; }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); }
.nav-sep { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 4px; }
.iconbtn.av-btn { padding: 2px; }
.check-btn { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--brand); background: transparent; flex: none; cursor: pointer; }
.check-btn.on { background: var(--good); border-color: var(--good); }
[data-task].done b { text-decoration: line-through; color: var(--muted); }
.tasks-card { border-color: rgba(212,169,79,.45); }
.w.on { background: var(--brand-soft); border-radius: 4px; }
.word-card { position: fixed; right: 20px; bottom: 20px; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; z-index: 80;
  box-shadow: 0 18px 50px rgba(0,0,0,.35); border: 1px solid rgba(212,169,79,.4); animation: q-in .2s ease-out; }
.word-card .ex-line { padding: 6px 0; border-bottom: 1px solid var(--line); }
.word-card .ex-line a { color: var(--ink); font-weight: 700; }
@media (max-width: 860px) { .word-card { left: 16px; right: 16px; bottom: 84px; width: auto; } }
.ed-line { display: flex; gap: 10px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.ed-line.now { background: var(--brand-soft); border-radius: 8px; }
.ed-line input.t { width: 64px; flex: none; padding: 2px 6px; font-size: .8rem; }
.ed-line .wd { cursor: pointer; border-radius: 4px; padding: 0 1px; }
.ed-line .wd:hover { background: var(--surface-2); }
.ed-line .wd.gap-on { background: var(--brand-grad); color: #16150f; padding: 0 4px; }
textarea { font-family: inherit; }

/* jogos de DOM: memória e montar palavras */
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px; border-radius: 18px; background: radial-gradient(120% 120% at 50% 0%, rgba(212,169,79,.18), transparent 60%), #141310; min-height: 420px; }
.mcard { position: relative; aspect-ratio: 4 / 3; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; }
.mcard span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; backface-visibility: hidden; transition: transform .35s; font-weight: 800; padding: 6px; text-align: center; }
.mcard .back { background: var(--brand-grad); color: #16150f; font-size: 1.4rem; letter-spacing: .08em; }
.mcard .front { background: #f3f0e8; color: #16150f; transform: rotateY(180deg); font-size: clamp(.8rem, 2.2vw, 1.15rem); align-content: center; gap: 2px; }
.mcard .front.pt { background: #dfeaff; }
.mcard .front small { font-size: .62rem; opacity: .55; letter-spacing: .1em; }
.mcard.up .back, .mcard.done .back { transform: rotateY(180deg); }
.mcard.up .front, .mcard.done .front { transform: rotateY(360deg); }
.mcard.done .front { box-shadow: inset 0 0 0 3px var(--good); }
@media (max-width: 600px) { .memory { grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px; } }
.builder { min-height: 380px; display: grid; gap: 22px; align-content: center; justify-items: center; text-align: center; }
.builder .b-hint { display: grid; gap: 4px; justify-items: center; }
.builder .b-hint b { font-size: 2rem; }
.builder .b-slots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.builder .b-slots .slot { width: 46px; height: 54px; border-bottom: 4px solid var(--line); font-size: 1.8rem; font-weight: 800; display: grid; place-items: center; text-transform: uppercase; }
.builder .b-slots .slot.on { border-color: var(--brand); color: var(--brand-text); }
.builder .b-tiles { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 560px; }
.tile-l { width: 52px; height: 52px; border-radius: 12px; border: 0; font: 800 1.5rem Manrope, sans-serif; text-transform: uppercase; background: var(--surface-2); color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--line); }
.tile-l.used { opacity: .2; pointer-events: none; }
.builder.win { box-shadow: 0 0 0 3px var(--good); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.rain-input { display: flex; gap: 8px; margin-top: 10px; }
.rain-input input { flex: 1; font-size: 1.15rem; }
.cs-chip { font-size: .82rem; padding: 3px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--ink); }
.cs-chip b { color: var(--brand-text); }
.done-card { text-align: center; margin-bottom: 16px; border: 1px solid rgba(212,169,79,.5);
  background: radial-gradient(120% 140% at 50% 0%, rgba(212,169,79,.22), transparent 60%), var(--surface); animation: q-in .3s ease-out; }
.done-check { width: 64px; height: 64px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff;
  box-shadow: 0 0 0 10px var(--good-bg); animation: pop-in .45s cubic-bezier(.2, 1.6, .4, 1); }
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.vocab-item { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; }
.vocab-item b { color: var(--brand-text); }
.vocab-item span { font-size: .85rem; color: var(--muted); }
.lrush { min-height: 360px; display: grid; gap: 14px; align-content: center; justify-items: center; text-align: center; }
.lr-letters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lr-letters .tile-l { width: 56px; height: 56px; font-size: 1.7rem; }
.lr-word { min-height: 48px; font-size: 2rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--brand-text); }
.lr-found { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 640px; }
.good-text { color: var(--good); }
.lr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.lr-item { display: grid; gap: 2px; text-align: left; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; }
.lr-item b { color: var(--ink); }
.lr-item span { font-size: .82rem; }
.lr-item.got { border-color: var(--good); background: var(--good-bg); }
.lr-item.got b { color: var(--good); }
.game-overlay .grid.g3 { grid-template-columns: repeat(3, 1fr); }
.game-overlay .lr-results { text-align: left; margin: 10px 0 14px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.game-overlay .lr-grid { max-height: 34vh; overflow: auto; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.game-overlay .lr-item { background: var(--surface); }

/* Treino de estruturas */
.st-intro { margin-bottom: 14px; }
.st-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.st-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 2px solid var(--line); color: var(--ink); cursor: pointer; font: inherit; transition: border-color .15s, transform .15s; }
.st-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.st-card.mastered { border-color: var(--good); }
.st-card .st-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-emoji { font-size: 1.8rem; line-height: 1; }
.st-head { display: flex; gap: 14px; align-items: center; }
.st-tip { margin-top: 4px; }
.st-tip p { margin: 0; }
.st-steps { padding: 4px; }
.st-steps button { padding: 6px 12px; }
.st-aff { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; font-weight: 800; }
.st-ex .inp.big { font-size: 1.1rem; }
.vocab-review { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.vr-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
@media (max-width: 520px) { .st-aff { font-size: 1.15rem; } .st-grid { grid-template-columns: 1fr; } }
