:root {
  --bg: #0f1630;
  --bg2: #182248;
  --card: #1f2b5a;
  --line: #2c3a72;
  --text: #f2f4ff;
  --muted: #a8b0d6;
  --blue: #3d6bff;
  --blue2: #5b84ff;
  --red: #ef4565;
  --gold: #ffd23f;
  --green: #21c07a;
  --orange: #ff8a3d;
  --radius: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(120% 60% at 50% 0%, #22306a 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-size: 16px;
  overscroll-behavior-y: none;
}
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:disabled { cursor: default; }
h1, h2, h3 { margin: .4em 0; line-height: 1.15; }
h3 { margin-top: 1.6em; font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.boot { display: grid; place-items: center; height: 100vh; font-size: 4rem; animation: spin 1.2s linear infinite; }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px;
  padding: 14px 20px; border-radius: 16px; font-weight: 800; font-size: 1rem;
  background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line);
  transition: transform .08s, box-shadow .08s, filter .2s;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.btn.primary { background: var(--blue); border-color: var(--blue); box-shadow: 0 5px 0 #2448c4; color: #fff; }
.btn.primary:active:not(:disabled) { box-shadow: 0 2px 0 #2448c4; }
.btn.danger { background: transparent; border-color: var(--red); color: var(--red); box-shadow: 0 4px 0 #8a2238; }
.btn.ghost { background: transparent; }
.btn.big { width: 100%; padding: 18px; font-size: 1.15rem; }
.btn.wide { width: 100%; margin: 28px 0 10px; }
.btn small { font-weight: 600; font-size: .8rem; opacity: .85; }
.btn:disabled { filter: grayscale(.8) brightness(.7); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; font-size: 1.2rem; background: rgba(255,255,255,.06); flex: none; }
.icon-btn.sm { width: 30px; height: 30px; font-size: .95rem; }
.icon-btn.playing, .vbtn.playing { animation: pulse .7s ease-in-out infinite; }
.row-btns { display: flex; gap: 12px; margin: 16px 0; flex-wrap: wrap; }
.row-btns > * { flex: 1; }

/* login */
.login { padding: calc(30px + var(--safe-t)) 22px 40px; }
.login-hero { text-align: center; margin-bottom: 24px; }
.login-hero h1 { font-size: 2.6rem; font-weight: 900; letter-spacing: -1px; }
.login-hero h1 span { color: var(--red); }
.logo-cards { position: relative; height: 130px; margin: 10px auto 6px; width: 240px; }
.lc { position: absolute; width: 110px; height: 120px; border-radius: 18px; display: grid; place-items: center; font-weight: 900; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.lc1 { left: 0; top: 10px; background: var(--blue); transform: rotate(-12deg); animation: float 4s ease-in-out infinite; }
.lc2 { left: 65px; top: 0; background: #fff; color: var(--red); font-size: 3rem; z-index: 2; animation: float 4s ease-in-out -1.3s infinite; }
.lc3 { right: 0; top: 10px; background: var(--red); transform: rotate(12deg); animation: float 4s ease-in-out -2.6s infinite; }
.tabs { display: flex; background: var(--bg2); border-radius: 16px; padding: 4px; margin-bottom: 18px; }
.tabs button { flex: 1; padding: 12px; border-radius: 12px; font-weight: 800; color: var(--muted); transition: background .2s; }
.tabs button.on { background: var(--card); color: var(--text); }
.login-form, .settings { display: flex; flex-direction: column; gap: 14px; }
.lang-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 22px; }
.lang-row button { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--bg2); }
.lang-row button.on { background: var(--card); color: var(--text); }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); }
input, select {
  font: inherit; color: var(--text); background: var(--bg2); border: 2px solid var(--line);
  border-radius: 14px; padding: 13px 14px; font-size: 1rem; outline: none; width: 100%;
}
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--blue); }
input[type=range] { padding: 0; accent-color: var(--blue); }
input:focus, select:focus { border-color: var(--blue); }
.form-error { color: var(--red); margin: 0; font-weight: 700; }

/* topo e navegação */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: rgba(15,22,48,.88); backdrop-filter: blur(10px);
}
.me { display: flex; align-items: center; gap: 10px; }
.me b { display: block; }
.me small { color: var(--muted); font-size: .78rem; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.5rem; background: var(--card); border-radius: 50%; border: 2px solid var(--line); flex: none; }
.avatar.xl { width: 72px; height: 72px; font-size: 2.6rem; }
.pills { display: flex; gap: 8px; }
.pill { padding: 6px 10px; border-radius: 999px; background: var(--card); font-size: .9rem; white-space: nowrap; }
.pill.streak { filter: grayscale(1); opacity: .7; }
.pill.streak.lit { filter: none; opacity: 1; animation: glow 2s ease-in-out infinite; }
.page { padding: 8px 16px calc(96px + var(--safe-b)); }
.page.center { display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; min-height: 100vh; padding-bottom: 40px; }
.page-title { margin-top: 12px; }
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 20;
  display: flex; background: rgba(15,22,48,.95); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + var(--safe-b));
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: .7rem; color: var(--muted); font-weight: 700; padding: 4px 0; border-radius: 12px; }
.bottom-nav a span { font-size: 1.35rem; transition: transform .2s; }
.bottom-nav a.on { color: var(--text); background: rgba(61,107,255,.18); }
.bottom-nav a.on span { transform: translateY(-2px) scale(1.12); }
.back { color: var(--muted); display: inline-block; margin: 10px 0; font-weight: 700; }

/* início */
.mascot-row { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.mascot { font-size: 3rem; }
.bubble { position: relative; background: #fff; color: #1a2250; padding: 10px 14px; border-radius: 16px; font-weight: 800; font-size: .95rem; animation: popIn .4s cubic-bezier(.2,1.6,.4,1); }
.bubble::before { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-right-color: #fff; border-left: 0; }
.level-card, .goal-card { background: var(--card); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: center; margin-bottom: 14px; border: 2px solid var(--line); }
.level-badge { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg, var(--gold), var(--orange)); color: #3b2600; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; transform: rotate(-4deg); box-shadow: 0 6px 0 #a35a15; }
.level-badge small { font-size: .7rem; font-weight: 800; }
.level-badge b { font-size: 1.6rem; line-height: 1; }
.level-info { flex: 1; }
.xpbar { position: relative; height: 22px; border-radius: 999px; background: var(--bg2); overflow: hidden; margin-top: 8px; width: 100%; }
.xpbar-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--gold), var(--orange)); border-radius: 999px; transition: width .8s cubic-bezier(.2,.9,.3,1); }
.xpbar-fill::after { content: ""; position: absolute; inset: 3px 8px auto 8px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.45); }
.xpbar span { position: relative; display: block; text-align: center; font-size: .75rem; font-weight: 800; line-height: 22px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.ring { width: 110px; height: 110px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: var(--bg2); }
.ring-fg { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.9,.3,1); }
.ring text { transform: rotate(90deg); transform-origin: 60px 60px; fill: var(--text); }
.ring-num { font-size: 30px; font-weight: 900; }
.ring-sub { font-size: 12px; fill: var(--muted) !important; }
.goal-text { flex: 1; position: relative; }
.goal-text p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; padding-right: 54px; }
.chest { position: absolute; right: -4px; top: 50%; margin-top: -26px; font-size: 2.6rem; filter: grayscale(1) opacity(.5); }
.chest.ready { filter: none; animation: wiggle 1.2s ease-in-out infinite; }
.chest.open { filter: none; opacity: .6; }
.chest.opening { animation: shakeHard .6s ease-in-out; }
.cta { margin: 6px 0 12px; }
.cta:not(:disabled) { animation: breathe 2.5s ease-in-out infinite; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.tile { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; transition: transform .15s; }
.tile:active { transform: scale(.96); }
.tile span { font-size: 1.8rem; }
.tile small { color: var(--muted); font-size: .8rem; }
.quiz-tile { background: linear-gradient(135deg, #5b3dff, #a23dff); border-color: #7b5bff; }
.quiz-tile small { color: #e3dbff; }

/* temas */
.theme-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.theme-row { display: flex; align-items: center; gap: 12px; background: var(--card); padding: 12px; border-radius: 16px; border: 2px solid var(--line); }
.theme-row:active { transform: scale(.98); }
.theme-icon { font-size: 1.8rem; width: 46px; height: 46px; display: grid; place-items: center; background: var(--bg2); border-radius: 14px; flex: none; }
.theme-icon.big { width: 64px; height: 64px; font-size: 2.4rem; }
.theme-body { flex: 1; min-width: 0; }
.theme-body small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.mini-bar { position: relative; height: 6px; background: var(--bg2); border-radius: 9px; margin-top: 6px; overflow: hidden; }
.mini-bar i { position: absolute; inset: 0 auto 0 0; background: var(--blue2); border-radius: 9px; }
.mini-bar i.m { background: var(--gold); }
.fav { font-size: 1.4rem; padding: 6px; color: var(--muted); }
.fav.on { animation: popIn .3s; }
.theme-head { display: flex; gap: 14px; align-items: center; }
.word-list { list-style: none; padding: 0; margin: 10px 0; }
.word-list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.word-list li div { flex: 1; }
.word-list b { display: block; }
.word-list small { color: var(--muted); }
.word-list em { display: block; color: var(--blue2); font-size: .85rem; margin-top: 2px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.new { background: var(--line); } .dot.learn { background: var(--blue2); } .dot.ok { background: var(--gold); }
.legend { color: var(--muted); font-size: .8rem; display: flex; gap: 6px; align-items: center; }

/* estudo */
.study, .quiz { padding: calc(10px + var(--safe-t)) 16px calc(20px + var(--safe-b)); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.study-top, .quiz-top { display: flex; align-items: center; gap: 12px; }
.progress { flex: 1; height: 16px; background: var(--bg2); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), #6be3a9); border-radius: 999px; transition: width .4s; }
.combo { min-width: 54px; text-align: right; font-weight: 900; color: var(--orange); }
.combo.hot { animation: pulse .6s ease-in-out infinite; color: var(--gold); }
.card-wrap { perspective: 1200px; margin: 18px 0 14px; flex: 1; display: flex; min-height: 280px; max-height: 420px; }
.card { position: relative; width: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3,1.3,.5,1); cursor: pointer; }
.card.enter { animation: cardIn .4s cubic-bezier(.2,1.3,.4,1); }
.card.flipped { transform: rotateY(180deg); }
.card.out-right { animation: outRight .3s ease-in forwards; }
.card.out-left { animation: outLeft .3s ease-in forwards; }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 20px;
  background: #fff; color: #1a2250; box-shadow: 0 8px 0 #c8d0f0, 0 20px 40px rgba(0,0,0,.35);
}
.face.back { transform: rotateY(180deg); background: linear-gradient(160deg, #ffffff, #eef2ff); }
.card.flipped.out-right { animation: outRightFlipped .3s ease-in forwards; }
.card.flipped.out-left { animation: outLeftFlipped .3s ease-in forwards; }
.tag { position: absolute; top: 16px; left: 16px; right: 16px; font-size: .78rem; font-weight: 800; color: #5a6596; text-align: left; }
.tag .new { color: var(--red); }
.main { font-size: clamp(1.5rem, 7vw, 2.3rem); font-weight: 900; line-height: 1.2; word-break: break-word; }
.main.fr { color: #1d3cc4; }
.trans { font-size: 1.25rem; font-weight: 700; margin-top: 12px; color: #2b3260; }
.example { margin-top: 16px; font-style: italic; color: #4c5687; font-size: .95rem; display: flex; align-items: center; gap: 6px; justify-content: center; }
.example .icon-btn { background: #e3e8ff; }
.hint { position: absolute; bottom: 16px; font-size: .8rem; color: #8a93bf; font-weight: 700; }
.voice { display: flex; justify-content: center; gap: 18px; margin-bottom: 8px; }
.vbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 700; font-size: .78rem; color: var(--muted); transition: opacity .2s; }
.vbtn span { width: 58px; height: 58px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 50%; background: var(--card); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.vbtn:active span { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.vbtn.mic span { width: 72px; height: 72px; font-size: 2rem; background: var(--red); border-color: var(--red); box-shadow: 0 5px 0 #a3243f; }
.vbtn.mic.rec span { animation: recPulse 1s ease-in-out infinite; }
.vbtn:disabled, .vbtn.dim { opacity: .4; }
.pron { min-height: 64px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; text-align: center; }
.pron p { margin: 0; }
.listening { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.listening i { width: 5px; height: 20px; background: var(--red); border-radius: 4px; animation: eq .8s ease-in-out infinite; }
.listening i:nth-child(2) { animation-delay: .1s; } .listening i:nth-child(3) { animation-delay: .2s; }
.listening i:nth-child(4) { animation-delay: .3s; } .listening i:nth-child(5) { animation-delay: .4s; }
.listening span { margin-left: 10px; font-style: italic; }
.pron-result { display: flex; gap: 14px; align-items: center; text-align: left; animation: popIn .35s cubic-bezier(.2,1.6,.4,1); background: var(--card); padding: 10px 14px; border-radius: 16px; width: 100%; }
.pron-result small { color: var(--muted); display: block; margin-top: 4px; }
.score-ring { --p: 0; --c: var(--red); width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--bg2) 0); }
.score-ring b { width: 44px; height: 44px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 1.05rem; }
.pron-result.great .score-ring { --c: var(--green); } .pron-result.good .score-ring { --c: var(--blue2); } .pron-result.mid .score-ring { --c: var(--orange); }
.pron-result.great > div > b { color: var(--green); }
.words { margin-top: 4px; font-weight: 800; }
.words .ok { color: var(--green); } .words .miss { color: var(--red); text-decoration: underline wavy; }
.actions { margin-top: auto; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; animation: slideUp .3s ease-out; }
.grade { padding: 12px 4px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; font-weight: 800; color: #fff; transition: transform .08s; }
.grade small { font-weight: 600; font-size: .72rem; opacity: .9; }
.grade:active { transform: translateY(3px); }
.g1 { background: var(--red); box-shadow: 0 4px 0 #a3243f; }
.g2 { background: var(--orange); box-shadow: 0 4px 0 #b55a1c; }
.g3 { background: var(--green); box-shadow: 0 4px 0 #148552; }
.g4 { background: var(--blue); box-shadow: 0 4px 0 #2448c4; }

/* resumo */
.summary h2 { font-size: 2rem; }
.stars { display: flex; gap: 6px; margin-bottom: 4px; }
.star { font-size: 3.4rem; color: var(--bg2); -webkit-text-stroke: 2px var(--line); }
.star.on { color: var(--gold); -webkit-text-stroke: 0; animation: starIn .6s cubic-bezier(.2,1.8,.4,1) both; }
.sum-grid, .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin: 16px 0; }
.stat-grid { grid-template-columns: repeat(3, 1fr); }
.sum-grid div, .stat-grid div { background: var(--card); border-radius: 16px; padding: 14px 8px; display: flex; flex-direction: column; align-items: center; border: 2px solid var(--line); }
.sum-grid b, .stat-grid b { font-size: 1.6rem; font-weight: 900; }
.sum-grid small, .stat-grid small { color: var(--muted); font-size: .78rem; }
.big-emoji { font-size: 5rem; }

/* quiz */
.quiz-score { display: flex; justify-content: space-between; margin: 14px 4px 0; font-weight: 900; font-size: 1.1rem; }
.qtime { font-weight: 900; font-size: 1.1rem; min-width: 50px; text-align: right; }
.qtime.low { color: var(--red); animation: pulse .5s ease-in-out infinite; }
.quiz-q { background: #fff; color: #1a2250; border-radius: 26px; padding: 36px 20px; margin: 18px 0; text-align: center; position: relative; box-shadow: 0 8px 0 #c8d0f0; }
.quiz-q .icon-btn { position: absolute; top: 10px; right: 10px; background: #e3e8ff; }
.opts { display: grid; gap: 10px; }
.opt { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 16px; font-weight: 800; text-align: left; box-shadow: 0 4px 0 var(--line); transition: background .15s; animation: slideUp .25s ease-out both; }
.opt:nth-child(2) { animation-delay: .04s; } .opt:nth-child(3) { animation-delay: .08s; } .opt:nth-child(4) { animation-delay: .12s; }
.opt.right { background: var(--green); border-color: var(--green); box-shadow: 0 4px 0 #148552; animation: popIn .3s; }
.opt.wrong { background: var(--red); border-color: var(--red); box-shadow: 0 4px 0 #a3243f; animation: shake .4s; }
.countdown { font-size: 8rem; font-weight: 900; color: var(--gold); animation: countPop .7s ease-out; }

/* conquistas e loja */
.award-grid, .shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.award, .shop-item { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: popIn .35s both; }
.award span, .shop-item span { font-size: 2.2rem; }
.award b, .shop-item b { font-size: .78rem; line-height: 1.15; }
.award small, .shop-item small { color: var(--muted); font-size: .7rem; line-height: 1.2; }
.award:not(.got) { opacity: .5; }
.award.got { border-color: var(--gold); background: linear-gradient(160deg, #2d3a75, #3a3260); }
.shop-item { cursor: pointer; }
.shop-item.poor { opacity: .55; }
.shop-item.owned { border-color: var(--blue2); }
.shop-item.equipped { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,210,63,.25); }
.shop-item .desc { font-size: .66rem; }

/* perfil */
.profile-head { display: flex; gap: 16px; align-items: center; margin-top: 10px; }
.ranking { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ranking li { display: grid; grid-template-columns: 34px 40px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; background: var(--card); padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); }
.ranking li.me { border-color: var(--blue2); }
.ranking .pos { grid-row: span 2; font-size: 1.3rem; text-align: center; font-weight: 900; }
.ranking .avatar { grid-row: span 2; }
.ranking small { color: var(--muted); font-size: .75rem; grid-column: 3; }
.ranking .xp { grid-row: 1 / span 2; grid-column: 4; font-weight: 900; color: var(--gold); }
.support { list-style: none; padding: 0; margin: 0; line-height: 1.8; }

/* modal, toast, efeitos */
.modal-back { position: fixed; inset: 0; background: rgba(5,8,20,.7); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fadeIn .2s; }
.modal-back.out { animation: fadeOut .2s forwards; }
.modal { background: var(--bg2); border: 2px solid var(--line); border-radius: 24px; padding: 24px; width: 100%; max-width: 380px; text-align: center; animation: popIn .35s cubic-bezier(.2,1.6,.4,1); }
.reward-icon { font-size: 5rem; }
.reward h2 { font-size: 2rem; color: var(--gold); }
.reward-line { font-size: 1.3rem; font-weight: 900; margin: 6px 0; }
.reward .btn { margin-top: 14px; width: 100%; }
#toast-root { position: fixed; top: calc(10px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 60; width: calc(100% - 24px); max-width: 420px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: toastIn .4s cubic-bezier(.2,1.5,.4,1); font-weight: 700; }
.toast.out { animation: toastOut .4s forwards; }
.toast.gold { border-color: var(--gold); }
.toast.bad { border-color: var(--red); }
.toast small { color: var(--muted); font-weight: 600; }
.t-icon { font-size: 1.8rem; }
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }
.float-text { position: fixed; z-index: 80; transform: translateX(-50%); font-weight: 900; font-size: 1.3rem; pointer-events: none; animation: floatUp 1.3s ease-out forwards; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.float-text.xp { color: var(--gold); }
.float-text.combo-txt { color: var(--orange); font-size: 1.6rem; }
.shake { animation: shake .45s; }
.bounce { animation: bounce 2s ease-in-out infinite; }
.pop { animation: popIn .5s cubic-bezier(.2,1.6,.4,1); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,138,61,0); } 50% { box-shadow: 0 0 14px 2px rgba(255,138,61,.55); } }
@keyframes popIn { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-14deg) scale(1.1); } 30% { transform: rotate(12deg) scale(1.1); } 45% { transform: rotate(-8deg); } 60% { transform: rotate(0); } }
@keyframes shakeHard { 0%, 100% { transform: none; } 20% { transform: translateX(-8px) rotate(-10deg); } 40% { transform: translateX(8px) rotate(10deg); } 60% { transform: translateX(-6px) rotate(-6deg) scale(1.2); } 80% { transform: scale(1.5); opacity: .5; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px) rotate(-5deg); } }
@keyframes cardIn { 0% { transform: translateY(40px) scale(.9); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes outRight { to { transform: translateX(120%) rotate(18deg); opacity: 0; } }
@keyframes outLeft { to { transform: translateX(-120%) rotate(-18deg); opacity: 0; } }
@keyframes outRightFlipped { from { transform: rotateY(180deg); } to { transform: translateX(120%) rotate(18deg) rotateY(180deg); opacity: 0; } }
@keyframes outLeftFlipped { from { transform: rotateY(180deg); } to { transform: translateX(-120%) rotate(-18deg) rotateY(180deg); opacity: 0; } }
@keyframes recPulse { 0%, 100% { box-shadow: 0 5px 0 #a3243f, 0 0 0 0 rgba(239,69,101,.6); } 50% { box-shadow: 0 5px 0 #a3243f, 0 0 0 16px rgba(239,69,101,0); } }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1.2); } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes starIn { 0% { transform: scale(0) rotate(-180deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes countPop { 0% { transform: scale(2); opacity: 0; } 40% { transform: scale(1); opacity: 1; } 100% { transform: scale(.8); opacity: .3; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes toastIn { from { transform: translateY(-30px) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-30px); opacity: 0; } }
@keyframes floatUp { 0% { transform: translate(-50%, 0) scale(.8); opacity: 0; } 15% { opacity: 1; transform: translate(-50%, -10px) scale(1.15); } 100% { transform: translate(-50%, -80px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-height: 640px) {
  .card-wrap { min-height: 220px; }
  .vbtn span { width: 50px; height: 50px; }
  .vbtn.mic span { width: 60px; height: 60px; }
}

/* gramática */
.grammar-cta { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #0f8a5f, #21c07a); border: 2px solid #3fd897; border-radius: var(--radius); padding: 14px 16px; margin: 4px 0 12px; box-shadow: 0 5px 0 #0b6446; transition: transform .15s; }
.grammar-cta:active { transform: translateY(3px); box-shadow: 0 2px 0 #0b6446; }
.grammar-cta > span { font-size: 2rem; }
.grammar-cta div { flex: 1; display: flex; flex-direction: column; }
.grammar-cta small { color: #dbffef; font-weight: 600; }
.grammar-cta i { font-style: normal; font-size: 1.8rem; font-weight: 900; }
.chev { font-size: 1.6rem; color: var(--muted); font-weight: 900; }
.lvl { display: inline-block; font-size: .68rem; font-weight: 900; padding: 1px 6px; border-radius: 6px; margin-right: 4px; color: #0f1630; }
.lvl-A2 { background: #6be3a9; } .lvl-B1 { background: var(--gold); } .lvl-B2 { background: #ff9bb0; }
.g-intro { background: var(--card); border-left: 4px solid var(--green); border-radius: 12px; padding: 12px 14px; line-height: 1.5; }
.rule-list { display: flex; flex-direction: column; gap: 12px; }
.g-summary { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-top: 12px; }
.g-summary ul { margin: 6px 0 0; padding-left: 20px; line-height: 1.5; }
.g-summary li + li { margin-top: 4px; }
.rule-tip { align-self: stretch; background: #fff7dc; color: #6b5200 !important; border-radius: 10px; padding: 8px 10px; line-height: 1.45; text-align: left; font-size: .92rem; }
.rule-mistake { display: flex; flex-direction: column; align-self: stretch; gap: 4px; margin: 6px 0; font-size: .92rem; text-align: left; }
.rule-mistake span { border-radius: 10px; padding: 6px 10px; font-weight: 700; }
.rule-mistake .no { background: #ffe3e3; color: #a3172b; text-decoration: line-through; text-decoration-thickness: 1px; }
.rule-mistake .yes { background: #ddf7e4; color: #136b33; }
.rule { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 14px; }
.rule > b { display: block; font-size: 1.05rem; }
.rule code, .formula { display: inline-block; font-family: ui-monospace, "SF Mono", Consolas, monospace; background: var(--bg2); color: var(--gold); padding: 4px 8px; border-radius: 8px; margin: 6px 0; font-size: .9rem; }
.rule p { margin: 6px 0; color: var(--muted); line-height: 1.45; }
.rule ul, .ex-list { list-style: none; padding: 0; margin: 8px 0 0; }
.rule li, .ex-list li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.rule li div, .ex-list li div { flex: 1; display: flex; flex-direction: column; }
.rule .fr { color: var(--blue2); font-weight: 800; }
.rule li small { color: var(--muted); }
.face.scroll { overflow-y: auto; justify-content: flex-start; padding-top: 48px; }
.rule-title { font-size: 1.5rem; font-weight: 900; color: #1d3cc4; }
.face .formula { background: #eef2ff; color: #b8264a; font-size: 1rem; margin: 14px 0; }
.example-front { font-style: italic; color: #4c5687; font-size: 1.05rem; }
.rule-text { color: #2b3260; font-weight: 600; line-height: 1.5; text-align: left; margin: 0 0 8px; }
.ex-list { width: 100%; text-align: left; }
.ex-list li { border-top-color: #dde3fb; }
.ex-list .fr { color: #1d3cc4; font-weight: 800; }
.ex-list small { color: #4c5687; }
.ex-list .icon-btn, .face #gsay { background: #e3e8ff; }
.gcard { min-height: 220px; max-height: 300px; flex: none; height: 260px; }
.gq-text { font-size: clamp(1.2rem, 5.5vw, 1.6rem); font-weight: 800; line-height: 1.4; color: #1a2250; }
.blank { display: inline-block; min-width: 70px; border-bottom: 3px solid var(--blue); margin: 0 2px; }
.blank.filled { color: #148552; border-bottom-color: var(--green); padding: 0 4px; background: #e6fbf1; border-radius: 6px 6px 0 0; }
.why { color: #2b3260; font-size: .95rem; margin: 12px 0 6px; line-height: 1.45; }
.tag.ok { color: #148552; } .tag.ko { color: #c22a4a; }
.study .opts { margin-bottom: 12px; }

/* leitura */
.reading-cta { background: linear-gradient(135deg, #5b3fd1, #8a6cff); border-color: #a48dff; box-shadow: 0 5px 0 #3e2a99; }
.reading-cta:active { box-shadow: 0 2px 0 #3e2a99; }
.reading-cta small { color: #ece6ff; }
a.pill { color: inherit; text-decoration: none; }
.lvl-A1 { background: #9fe7ff; } .lvl-C1 { background: #c9a6ff; } .lvl-C2 { background: #ffb36b; }
.r-badge { font-size: .8rem; font-weight: 900; padding: 4px 9px; border-radius: 999px; background: var(--bg2); color: var(--muted); white-space: nowrap; }
.r-badge.new { background: var(--blue); color: #fff; }
.r-badge.full { background: var(--green); color: #0f1630; }
.r-head { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.r-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-head small { color: var(--muted); }
.r-tools { display: flex; gap: 8px; margin-top: 12px; }
.pill-btn { flex: 1; border: 2px solid var(--line); background: var(--card); color: var(--text, #fff); font: inherit; font-weight: 800; padding: 10px 12px; border-radius: 999px; cursor: pointer; }
.pill-btn.on { background: var(--blue); border-color: var(--blue2); color: #fff; }
.pill-btn.dark { flex: none; margin-top: 14px; background: #e3e8ff; border-color: #c9d2fb; color: #1d3cc4; font-size: .9rem; }
.card-wrap.tall { max-height: none; min-height: 52vh; }
.r-text { text-align: left; line-height: 1.65; color: #1a2250; font-size: 1.02rem; }
.r-text h3 { margin: 4px 0 8px; color: #1d3cc4; font-size: 1.25rem; }
.r-text p { margin: 0 0 12px; }
.sent { border-radius: 5px; transition: background .2s; }
.sent.reading { background: #fff1a8; box-shadow: 0 0 0 3px #fff1a8; }
.r-answer { font-size: 1.15rem; font-weight: 800; color: #148552; background: #e6fbf1; border-radius: 12px; padding: 10px 12px; margin-top: 8px; line-height: 1.4; }
.modal.wide { max-width: 560px; max-height: 85vh; overflow-y: auto; text-align: left; }
.modal.wide .r-text { color: inherit; }
.modal.wide .r-text p { color: var(--text, #e8ecff); }
.modal.wide .btn { width: 100%; margin-top: 8px; }
.modal.wide h3 { margin-top: 0; }

/* listas agrupadas por nível */
.lvl-group { margin-top: 18px; }
.lvl-head { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 10px; }
.lvl-head .lvl { font-size: .78rem; padding: 2px 8px; margin: 0; }
.lvl-head small { margin-left: auto; color: var(--muted); font-weight: 700; font-size: .8rem; }
.st-badge { font-size: .78rem; font-weight: 900; padding: 4px 9px; border-radius: 999px; background: var(--bg2); color: var(--gold); white-space: nowrap; }
.st-badge.done { background: none; font-size: 1.4rem; padding: 0 4px; }

/* v1.7.0: nível das cartas novas, seções novas e minhas palavras */
.bottom-nav a { min-width: 0; }
.level-pick { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 4px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.level-pick small { color: var(--muted); font-size: .78rem; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--bg2); border-radius: 12px; padding: 4px; }
.seg button { font: inherit; font-size: .78rem; font-weight: 800; color: var(--muted); padding: 8px 2px; border-radius: 9px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.seg button.on { background: var(--blue); color: #fff; box-shadow: 0 3px 0 #1d3cc4; }
.explore { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 14px; }
.explore a { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; font-weight: 800; text-align: center; color: var(--muted); line-height: 1.15; }
.explore a span { font-size: 1.4rem; }
.more-cta { background: linear-gradient(135deg, #2a3c88, #3d6bff); border-color: #5b84ff; box-shadow: 0 5px 0 #1d2a66; }
.more-cta small { color: #dfe6ff; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; margin: 8px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; font: inherit; font-size: .82rem; font-weight: 800; color: var(--muted); background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.chips button.on { background: var(--blue); border-color: var(--blue2); color: #fff; }
.link-btn { font: inherit; font-weight: 800; color: var(--blue2); background: none; padding: 6px 0; font-size: .85rem; }
.word-list .tr { display: block; font-size: .8rem; }
.word-list em .icon-btn { vertical-align: middle; margin-left: 2px; }
.verb-ini { font-size: 1.05rem; font-weight: 900; color: var(--gold); text-transform: lowercase; }
.theme-icon.big.verb-ini { font-size: 1.5rem; }
.cp { color: var(--muted); }
.conj { margin-top: 4px; }
.conj > b small { color: var(--muted); font-weight: 700; font-size: .8rem; margin-left: 6px; }
.conj li div { flex-direction: row !important; gap: 6px; align-items: baseline; }
.conj li b { color: var(--blue2); }
.conj .pill-btn.wide { width: 100%; margin-top: 10px; }
.page .rule + .rule, .page .rule + .btn, .page .btn + .rule { margin-top: 12px; }
.v-text .fr-text { color: var(--text); line-height: 1.6; font-size: 1.02rem; }
.v-text .sent.reading { color: #1a2250; }
.v-text .tr-text { color: var(--muted); font-style: italic; line-height: 1.5; }
.model-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.model { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 10px 12px; }
.model > b { color: var(--gold); }
.model ul { list-style: none; padding: 0; margin: 6px 0; font-size: .88rem; line-height: 1.55; }
.mini-conj { list-style: none; padding: 0; margin: 10px 0 4px; font-size: .9rem; line-height: 1.5; color: #2b3260; text-align: left; }
.mini-conj .cp { color: #6a74a6; }
.mini-conj li.hl { background: #e6fbf1; border-radius: 6px; padding: 0 6px; }
.nq-modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.nq-modes button { font: inherit; font-weight: 800; font-size: .88rem; color: var(--text); background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: flex; align-items: center; gap: 8px; text-align: left; box-shadow: 0 3px 0 var(--line); }
.nq-modes button span { font-size: 1.3rem; }
.converter input, .search { width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); margin-top: 8px; }
.conv-out { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.conv-out div { flex: 1; display: flex; flex-direction: column; }
.conv-out .fr { color: var(--blue2); font-weight: 800; }
.conv-out small { color: var(--muted); }
.nq-listen { display: flex; gap: 24px; justify-content: center; margin: 8px 0 18px; }
.nq-form { display: flex; gap: 8px; width: 100%; }
.nq-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.3rem; font-weight: 800; text-align: center; padding: 10px; border-radius: 12px; border: 2px solid #c9d2fb; color: #1a2250; background: #fff; }
.nq-prompt { font-size: clamp(2rem, 10vw, 3rem); font-weight: 900; color: #1a2250; }
.wl-btns { display: flex; flex-direction: column; gap: 4px; }
.wl-pron { margin-top: 4px; font-size: .9rem; }
.wl-pron .words { display: inline; }
.wl-score { font-weight: 900; padding: 1px 6px; border-radius: 6px; background: var(--bg2); }
.wl-score.great { color: var(--green); } .wl-score.good { color: var(--blue2); } .wl-score.mid { color: var(--orange); } .wl-score.low { color: var(--red); }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.icon-btn.rec { background: var(--red); animation: pulse .7s ease-in-out infinite; }
@media (max-width: 380px) {
  .bottom-nav a { font-size: .62rem; }
  .explore a { font-size: .6rem; }
}
[hidden] { display: none !important; }
.word-list li .wl-btns { flex: none; }
.word-list li .wl-pron { flex: none; }

/* estudo guiado: o Professor */
.prof { width: 112px; flex: none; position: relative; }
.prof svg { width: 100%; height: auto; display: block; overflow: visible; }
.prof.xs { width: 44px; } .prof.sm { width: 78px; } .prof.lg { width: 150px; }
.prof .prof-body { animation: profBob 2.6s ease-in-out infinite; transform-origin: 80px 180px; }
.prof .prof-eyes { animation: profBlink 4.5s infinite; transform-origin: 80px 84px; }
.prof .prof-wing { transform-origin: 124px 100px; }
.prof .prof-tassel { transform-origin: 80px 35px; animation: profTassel 2.6s ease-in-out infinite; }
.prof-hello .prof-wing { animation: profWave 1.6s ease-in-out infinite; }
.prof-cheer .prof-body { animation: profJump .9s cubic-bezier(.3,1.6,.5,1) infinite; }
.prof-cheer .prof-wing { animation: profWave .45s ease-in-out infinite; }
.prof-think .prof-wing { transform: rotate(-28deg); }
.prof-think .prof-body { animation: profBob 3.5s ease-in-out infinite; }
.prof-listen .prof-body { animation: profTilt 2s ease-in-out infinite; }
@keyframes profBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes profJump { 0%, 100% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-14px) scale(.97, 1.03); } 60% { transform: translateY(0) scale(1.04, .96); } }
@keyframes profWave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-22deg); } }
@keyframes profTassel { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(6deg); } }
@keyframes profTilt { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
@keyframes profBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .prof * { animation: none !important; } }

.guide-home { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; padding: 12px 14px 12px 8px; border-radius: var(--radius);
  background: linear-gradient(135deg, #3b2a6e, #6a3fb8 60%, #8a5be0); border: 2px solid #a785ff; box-shadow: 0 5px 0 #2c1d5a; transition: transform .15s; }
.guide-home:active { transform: translateY(3px); box-shadow: 0 2px 0 #2c1d5a; }
.guide-home-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.guide-home-body small { color: #e3d6ff; font-weight: 800; font-size: .78rem; }
.guide-home-body b { font-size: .98rem; line-height: 1.25; }
.guide-go { align-self: flex-start; margin-top: 4px; background: var(--gold); color: #2c1d5a; font-weight: 900; font-size: .85rem; padding: 6px 12px; border-radius: 999px; box-shadow: 0 3px 0 #b8901a; }
.g-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.g-dots i { font-style: normal; width: 26px; height: 26px; display: grid; place-items: center; font-size: .8rem; border-radius: 50%; background: rgba(255,255,255,.12); filter: grayscale(1); opacity: .6; }
.g-dots i.on { background: var(--green); filter: none; opacity: 1; }
.g-dots.big { justify-content: center; margin: 4px 0 18px; }
.g-dots.big i { width: 36px; height: 36px; font-size: 1.1rem; }

.guide .prof-row, .prof-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 16px; }
.prof-bubble { flex: 1; font-size: .95rem; line-height: 1.35; }
.prof-bubble.up { margin: 6px 0 4px; }
.prof-bubble.up::before { left: 50%; top: -8px; margin: 0 0 0 -8px; border: 8px solid transparent; border-bottom-color: #fff; border-top: 0; }
.guide-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.guide-head div { display: flex; flex-direction: column; }
.guide-head b { font-size: 1.2rem; }
.guide-head small { color: var(--muted); font-weight: 700; }
.g-progress { flex: none; margin: 10px 0 14px; }
.g-path { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; position: relative; }
.g-path::before { content: ""; position: absolute; left: 31px; top: 20px; bottom: 20px; width: 4px; background: var(--line); border-radius: 4px; }
.g-step { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; background: var(--card); border: 2px solid var(--line); border-radius: 18px; animation: slideUp .3s ease-out both; }
.g-step:nth-child(2) { animation-delay: .04s; } .g-step:nth-child(3) { animation-delay: .08s; } .g-step:nth-child(4) { animation-delay: .12s; } .g-step:nth-child(5) { animation-delay: .16s; } .g-step:nth-child(6) { animation-delay: .2s; }
.g-step > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.g-step small { color: var(--muted); font-size: .8rem; }
.g-step em { font-style: normal; font-size: .7rem; font-weight: 800; color: #c9b8ff; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.g-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-size: 1.4rem; border-radius: 50%; background: var(--bg2); border: 2px solid var(--line); z-index: 1; }
.g-step.done { opacity: .8; } .g-step.done .g-ico { background: #0f5a3d; border-color: var(--green); }
.g-step.later { opacity: .55; }
.g-step.current { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,210,63,.25), 0 5px 0 #8a6d12; cursor: pointer; }
.g-step.current .g-ico { background: var(--gold); border-color: var(--gold); animation: pulse 1.4s ease-in-out infinite; }
.g-play { font-style: normal; font-weight: 900; color: var(--gold); font-size: 1.2rem; }
.g-lock { font-style: normal; font-size: .9rem; }
.g-done-box { background: #0f5a3d; border: 2px solid var(--green); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.g-done-box small { color: #c9f7e1; }
.stat-grid.three { grid-template-columns: repeat(3, 1fr); }
.g-stats { margin-top: 18px; }
.g-levels { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 14px; }
.g-level { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 0 var(--line); animation: slideUp .3s ease-out both; }
.g-level:nth-child(2) { animation-delay: .06s; } .g-level:nth-child(3) { animation-delay: .12s; }
.g-level:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--line); }
.g-level > span { font-size: 2.2rem; }
.g-level > div { flex: 1; display: flex; flex-direction: column; }
.g-level b small { color: var(--gold); font-size: .8rem; margin-left: 4px; }
.g-level > div > small { color: var(--muted); }
.g-level.on { border-color: var(--gold); }
.g-level i { font-style: normal; color: var(--gold); font-weight: 900; font-size: 1.3rem; }
.guide-step-end h2 { font-size: 1.5rem; margin-top: 10px; }
.guide-step-end .prof-bubble { flex: none; max-width: 420px; }
.guide-step-end .btn.ghost { margin-top: 10px; }
.g-mini { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-weight: 700; font-size: .88rem; }
.main.fr.sm { font-size: clamp(1.2rem, 5.5vw, 1.6rem); }
.nq-form.dict { flex-direction: column; }
.nq-form.dict textarea { font: inherit; font-size: 1.1rem; font-weight: 700; padding: 10px 12px; border-radius: 12px; border: 2px solid #c9d2fb; color: #1a2250; background: #fff; resize: none; }
.face .words { margin-top: 10px; }
.face .words .accent { color: var(--orange); text-decoration: underline dotted; }
.face .words small { display: block; color: #b55a1c; font-size: .78rem; margin-top: 4px; }
.btn.wide-sm { width: 100%; }

/* simulados */
.mock-cta { background: linear-gradient(135deg, #c2410c, #ff8a3d); border-color: #ffab70; box-shadow: 0 5px 0 #8a2f08; }
.mk-hero { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, #3a1d0a, #6b3410); border: 2px solid #b5652a; border-radius: var(--radius); padding: 14px 16px; margin: 6px 0 14px; }
.mk-hero > span { font-size: 2.4rem; }
.mk-hero div { display: flex; flex-direction: column; gap: 4px; }
.mk-hero small { color: #ffd9bd; line-height: 1.4; }
.mk-current { background: var(--card); border: 2px solid var(--gold); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.mk-current small { color: var(--muted); }
.mk-current .row-btns { margin: 10px 0 0; }
.mk-exam { margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; }
.mk-exam-head { display: flex; gap: 12px; align-items: center; margin-bottom: 2px; }
.mk-exam-head > span { font-size: 2rem; }
.mk-exam-head div { display: flex; flex-direction: column; }
.mk-exam-head b { font-size: 1.2rem; }
.mk-exam-head small { color: var(--muted); }
.mk-report-btn { margin-top: 4px; }
.mk-groups { grid-template-columns: 1fr 1fr; margin: 4px 0 6px; }
.mk-groups button { font-size: .95rem; padding: 10px 4px; }
.mk-group-desc { margin: 0 0 14px; }
.mk-sets { grid-template-columns: repeat(3, 1fr); margin-bottom: 12px; }
.mk-sets a { font-size: .8rem; font-weight: 800; color: var(--muted); padding: 8px 2px; border-radius: 9px; text-align: center; text-decoration: none; }
.mk-sets a.on { background: var(--blue); color: #fff; box-shadow: 0 3px 0 #1d3cc4; }
.mk-set { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 4px 12px; }
.mk-set[open] { padding-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.mk-set > summary { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
.mk-set > summary::-webkit-details-marker { display: none; }
.mk-set > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.mk-set[open] > summary::before { transform: rotate(90deg); }
.mk-set > summary b { font-size: 1.05rem; }
.mk-set > summary small { color: var(--muted); flex: 1; }
.r-badge.done { background: var(--green); color: #0f1630; }
.r-badge.todo { background: var(--orange); color: #2b1300; }
.mk-intro-head { display: flex; gap: 12px; align-items: center; margin: 6px 0 4px; }
.mk-intro-head > span { font-size: 2.4rem; }
.mk-intro-head small { color: var(--muted); font-weight: 800; }
.mk-intro-head h2 { margin: 2px 0 0; }
.mk-clock { display: flex; align-items: baseline; gap: 10px; margin: 12px 0; }
.mk-clock b { font-size: 2.4rem; color: var(--gold); font-weight: 900; }
.mk-clock small { color: var(--muted); font-weight: 700; }
.mk-rules { margin: 0 0 14px; padding-left: 20px; line-height: 1.55; }
.mk-rules li { margin-bottom: 6px; }
.mk-run { gap: 12px; }
.mk-top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0; margin-top: -6px; }
.mk-top-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mk-top-mid b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-top-mid small { color: var(--muted); font-weight: 700; font-size: .8rem; }
.mk-time { font-weight: 900; font-size: 1.25rem; font-variant-numeric: tabular-nums; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 4px 10px; min-width: 76px; text-align: center; }
.mk-time:empty { display: none; }
.mk-time.low { color: #fff; background: var(--red); border-color: var(--red); animation: pulse 1s ease-in-out infinite; }
.mk-doc { background: #fff; color: #1a2250; border-radius: 18px; padding: 14px 16px; }
.mk-doc-tag { display: block; font-size: .78rem; font-weight: 800; color: #5a6596; margin-bottom: 6px; }
.mk-doc-intro { color: var(--muted); font-size: .9rem; margin: 0; line-height: 1.45; }
.mk-doc .mk-doc-intro { color: #4c5687; margin-bottom: 10px; }
.mk-text { font-size: .98rem; }
.mk-text p:last-child { margin-bottom: 0; }
.mk-prompt { margin: 0; line-height: 1.55; font-weight: 600; }
.mk-prompt.small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.mk-audio { display: flex; align-items: center; gap: 14px; }
.mk-audio .vbtn span { font-size: 2.2rem; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: 0 5px 0 #2448c4; }
.mk-audio .vbtn small { color: #4c5687; }
.mk-audio .vbtn:disabled span { background: #c9d2fb; box-shadow: none; }
.mk-audio-info { display: flex; flex-direction: column; gap: 2px; }
.mk-audio-info small { color: #5a6596; }
.mk-wave { margin-top: 4px; }
.mk-q { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px; }
.mk-q-text { margin: 0 0 10px; font-weight: 700; line-height: 1.4; }
.mk-q-text small { color: var(--muted); font-weight: 700; font-size: .72rem; white-space: nowrap; }
.mk-opts { display: flex; flex-direction: column; gap: 8px; }
.mk-opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: var(--bg2); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font-weight: 700; line-height: 1.35; }
.mk-opt i { font-style: normal; font-weight: 900; color: var(--muted); flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .75rem; }
.mk-opt.on { border-color: var(--blue2); background: #22357d; }
.mk-opt.on i { background: var(--blue); border-color: var(--blue); color: #fff; }
.mk-nav { display: flex; gap: 10px; margin-top: 4px; }
.mk-nav .btn { flex: 1; }
.mk-nav .btn.ghost:first-child:not(:only-child) { flex: 0 0 64px; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.mk-grid button { height: 34px; border-radius: 9px; background: var(--bg2); border: 2px solid var(--line); font-weight: 800; font-size: .8rem; color: var(--muted); }
.mk-grid button.ok { background: #1c3f8a; color: #fff; border-color: var(--blue); }
.mk-grid button.cur { border-color: var(--gold); }
.mk-end2 { align-self: center; }
.mk-tabs { grid-template-columns: repeat(3, 1fr); }
.mk-accents { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-accents button { min-width: 36px; height: 36px; border-radius: 9px; background: var(--card); border: 2px solid var(--line); font-weight: 800; font-size: 1.05rem; }
.mk-textarea { font: inherit; font-size: 1.02rem; line-height: 1.55; min-height: 260px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: #1a2250; resize: vertical; }
.mk-textarea.notes { min-height: 150px; background: #fffbe8; }
.mk-count { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mk-count b.good { color: var(--green); } .mk-count b.bad { color: var(--orange); }
.mk-count small { color: var(--muted); }
.mk-phases { display: flex; gap: 6px; }
.mk-phases i { flex: 1; height: 8px; border-radius: 9px; background: var(--bg2); }
.mk-phases i.done { background: var(--green); } .mk-phases i.cur { background: var(--gold); }
.mk-phase-head { display: flex; gap: 12px; align-items: center; border-radius: 16px; padding: 12px 14px; }
.mk-phase-head.prep { background: #3b3410; border: 2px solid #8a7a1c; }
.mk-phase-head.speak { background: #4a1424; border: 2px solid var(--red); }
.mk-phase-head > span:first-child { font-size: 1.8rem; }
.mk-phase-head div { flex: 1; display: flex; flex-direction: column; }
.mk-phase-head small { color: var(--muted); }
.mk-rec { font-size: .75rem; font-weight: 900; color: var(--muted); }
.mk-rec.on { color: #fff; background: var(--red); padding: 3px 8px; border-radius: 99px; animation: pulse 1.2s ease-in-out infinite; }
.mk-examiner { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.mk-ex-who { font-weight: 900; color: var(--gold); font-size: .85rem; }
.mk-examiner p { font-size: 1.1rem; font-weight: 800; margin: 6px 0 8px; line-height: 1.4; }
.mk-examiner .row-btns { margin: 8px 0 0; }
.mk-tips { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-top: 12px; }
.mk-tips summary, .mk-model summary, .mk-review details summary { cursor: pointer; font-weight: 800; }
.mk-tips ul { margin: 8px 0 2px; padding-left: 18px; line-height: 1.5; }
.mk-score { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.mk-score b { font-size: 2.3rem; font-weight: 900; }
.mk-score span { font-weight: 800; }
.mk-score small { color: var(--muted); }
.mk-score.good { border-color: var(--green); } .mk-score.good b { color: var(--green); }
.mk-score.mid { border-color: var(--gold); } .mk-score.mid b { color: var(--gold); }
.mk-score.low { border-color: var(--red); } .mk-score.low b { color: var(--red); }
.mk-review { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.mk-review-head { display: flex; flex-direction: column; gap: 6px; }
.mk-review details { color: var(--muted); font-size: .9rem; }
.mk-review .mk-text { background: #fff; border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.mk-transcript { margin-top: 8px; line-height: 1.5; color: var(--text); }
.mk-transcript p { margin: 0 0 6px; }
.mk-rq { border-left: 4px solid var(--green); padding: 4px 0 4px 10px; display: flex; flex-direction: column; gap: 3px; }
.mk-rq.ko { border-color: var(--red); }
.mk-rq p { margin: 0; font-weight: 700; }
.mk-given { color: #ff9bb0; } .mk-ans { color: #6be3a9; font-weight: 800; }
.mk-rq .why { color: var(--muted); margin: 0; font-size: .85rem; }
.mk-mine { background: var(--bg2); border-radius: 12px; padding: 10px 12px; }
.mk-mine small { color: var(--muted); font-weight: 800; }
.mk-mine p { margin: 6px 0 0; line-height: 1.5; }
.mk-mine audio { width: 100%; margin-top: 6px; }
.mk-model { background: #0f3d2c; border: 2px solid #1d7a55; border-radius: 12px; padding: 10px 12px; }
.mk-model p, .mk-model ul { margin: 8px 0 0; line-height: 1.55; }
.mk-rubric { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.mk-crit p { margin: 0 0 6px; font-weight: 700; line-height: 1.35; }
.mk-crit small { color: var(--gold); font-weight: 800; }
.mk-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .82rem; }
.mk-table th, .mk-table td { border: 1px solid var(--line); padding: 5px 4px; text-align: center; }
.mk-run > .progress { flex: none; height: 10px; }
.mk-audio .vbtn { min-width: 90px; }

/* ---------- fonética ---------- */
.ipa { font-family: "Doulos SIL", "Charis SIL", "Lucida Sans Unicode", "Segoe UI", system-ui, sans-serif; font-size: .88rem; color: #ffd98a; letter-spacing: .01em; }
.ex-list .ipa, .example-front .ipa { color: #7a3fc4; }
.example-front .ipa { display: block; margin-top: 6px; font-style: normal; font-size: 1rem; }
.gq-text.sm { font-size: clamp(1.05rem, 4.6vw, 1.3rem); }
.gq-answer { margin-top: 10px; display: inline-block; padding: 6px 14px; border-radius: 12px; background: #dff7ea; color: #0f7a4a; font-weight: 800; font-size: 1.1rem; }
.sounds { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px; margin: 14px 0 4px; }
.sounds summary { cursor: pointer; font-weight: 800; }
.sounds p { margin: 8px 0; }
.sound-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.sound { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: var(--bg2); border: 2px solid var(--line); color: var(--text); text-align: center; }
.sound b { font-family: "Doulos SIL", "Charis SIL", "Lucida Sans Unicode", "Segoe UI", system-ui, sans-serif; font-size: 1.15rem; color: #ffd98a; }
.sound span { font-weight: 800; }
.sound small { color: var(--muted); font-size: .7rem; line-height: 1.2; }
.sound.playing { border-color: var(--blue2); }
/* Ouvir as explicações da gramática */
.listen-exp { display: block; width: 100%; flex: none; margin: 12px 0; }
.listen-exp.on { border-color: var(--green); }
.face.back .listen-exp { margin: 10px 0 0; }
.rule-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rule-head .icon-btn.on { animation: pulse .7s ease-in-out infinite; }
.g-intro.reading, .g-summary.reading, .rule.reading { border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 204, 113, .25); }

/* ===== computador e tablet: o layout de celular continua igual abaixo de 768px ===== */
.bottom-nav .nav-brand { display: none; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover, .theme-row:hover, .explore a:hover, .award:hover, .shop-item:hover, .ranking li:hover { border-color: var(--blue2); transform: translateY(-2px); }
  .grammar-cta:hover, .guide-home:hover { filter: brightness(1.08); }
  .btn:hover:not(:disabled), .icon-btn:hover, .pill-btn:hover, .chips button:hover, .seg button:hover:not(.on) { filter: brightness(1.15); }
  .bottom-nav a:hover:not(.on) { color: var(--text); background: rgba(255,255,255,.05); }
  .tile, .theme-row, .explore a, .award, .shop-item, .ranking li { transition: transform .15s, border-color .15s; }
}
@media (min-width: 768px) {
  #app { max-width: 760px; }
  .bottom-nav { max-width: 760px; }
  .page { padding-left: 24px; padding-right: 24px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .explore { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
  .tiles .exam-tile, .tiles .wide-tile { grid-column: span 2; }
  .award-grid, .shop-grid { grid-template-columns: repeat(4, 1fr); }
  .stat-grid:not(.three) { grid-template-columns: repeat(6, 1fr); }
  /* telas de foco (cartas, desafios, simulados) ficam numa coluna central */
  .study, .quiz, .page.center { max-width: 640px; margin-left: auto; margin-right: auto; }
  .card-wrap { max-height: 460px; }
}
@media (min-width: 1100px) {
  /* com menu: barra lateral à esquerda e conteúdo largo */
  #app:has(> .bottom-nav) { max-width: 1280px; padding-left: 232px; }
  .bottom-nav {
    left: max(0px, calc(50% - 640px)); top: 0; bottom: 0; transform: none; width: 232px; max-width: none;
    flex-direction: column; gap: 4px; padding: calc(18px + var(--safe-t)) 14px 18px;
    border-top: 0; border-right: 1px solid var(--line); background: rgba(15,22,48,.6);
  }
  .bottom-nav a { flex: none; flex-direction: row; gap: 12px; font-size: .98rem; padding: 11px 14px; }
  .bottom-nav a span { font-size: 1.3rem; width: 28px; text-align: center; }
  .bottom-nav a.on span { transform: scale(1.1); }
  .nav-brand { display: block !important; font-size: 1.55rem !important; font-weight: 900; letter-spacing: -.5px; color: var(--text) !important; padding: 4px 14px 18px !important; background: none !important; }
  .nav-brand b { color: var(--red); }
  .topbar { padding: 14px 32px; }
  #app:has(> .bottom-nav) > .page { padding: 12px 32px 48px; }
  .page-title { font-size: 1.8rem; }

  /* início em grade */
  .page.home { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px 18px; align-items: stretch; }
  .page.home > * { grid-column: span 6; margin: 0; }
  .page.home > .mascot-row { margin: 6px 0 0; }
  .page.home > .level-card, .page.home > .goal-card { order: 1; }
  .page.home > .guide-home, .page.home > .more-cta { order: 2; }
  .page.home > :is(.cta, .ghost, .level-pick, .grammar-cta, .explore, .tiles) { order: 3; }
  .page.home > .level-card, .page.home > .goal-card { grid-column: span 3; }
  .page.home > .guide-home { grid-column: span 6; }
  .page.home > .cta { grid-column: 2 / span 4; }
  .page.home > .level-pick { grid-column: span 6; }
  .page.home > .grammar-cta { grid-column: span 2; }
  .page.home > .explore, .page.home > .tiles { margin: 0; }
  .grammar-cta { min-height: 84px; }

  /* listas em duas colunas */
  .theme-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .word-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .award-grid, .shop-grid { grid-template-columns: repeat(6, 1fr); }
  .sound-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .model-grid { grid-template-columns: repeat(3, 1fr); }
  .rule-list { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .more-page { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-content: start; }
  .more-page > * { grid-column: span 2; margin: 0; }
  .more-page > .more-cta { grid-column: span 1; }
  .settings { max-width: 640px; }
  .profile-head { margin-top: 18px; }
  .modal.wide { max-width: 720px; }
}
.login-form .code-input { font-size: 1.8rem; letter-spacing: .4em; text-align: center; font-weight: 800; }
.login-form .code-timer { text-align: center; margin: 0; }
.login-form .code-email { text-align: center; margin: -6px 0 4px; word-break: break-all; }
