/* ===================== Tokens (PRD §10) ===================== */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --line: #2a2a2a;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.4);
  --primary: #3edc97;
  --primary-soft: #8cf5c6;
  --on-primary: #04150d;
  --danger: #f87171;
  --coral: #f0916e;
  --gold: #ffc24b;
  --durao: #e5533d;
  --radius: 18px;
  --pill: 999px;
  color-scheme: dark;
}

@property --s {
  syntax: '<length>';
  inherits: true;
  initial-value: 160px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  /* Noto Color Emoji vem subsetada só com as bandeiras (Windows não as tem); o resto cai na Inter */
  font-family: 'Noto Color Emoji', 'Inter', 'Inter Variable', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button { font: inherit; color: inherit; }
svg { display: block; }

#app { max-width: 440px; margin: 0 auto; min-height: 100dvh; position: relative; overflow-x: hidden; }

.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(10px + env(safe-area-inset-top)) 20px 0;
  animation: riseIn 0.35s ease-out both;
}
.content { flex: 1; display: flex; flex-direction: column; gap: 16px; padding-bottom: 12px; }
.content.center { align-items: center; justify-content: center; text-align: center; }
.center-text { text-align: center; }
.center { display: flex; justify-content: center; }
.footer {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0 calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 26%);
  z-index: 5;
}

.muted { color: var(--muted); margin: 0; }
.small { font-size: 14px; }
.tiny { font-size: 12px; margin: 8px 0 0; color: var(--faint); }
.warn { color: var(--coral); margin: 0; }
.title { font-size: 26px; line-height: 1.15; margin: 0; letter-spacing: -0.02em; text-align: center; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 10px 0 -4px; }
.label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* ===================== Topbar ===================== */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.topbar .spacer { width: 44px; flex: none; }
.topbar-title { flex: 1; text-align: center; font-size: 17px; margin: 0; }
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--surface); cursor: pointer;
  transition: transform 0.15s ease-out, background 0.2s;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg, .btn svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 10px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }

.progress { flex: 1; height: 6px; border-radius: var(--pill); background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width 0.4s ease-out; }

/* ===================== Botões ===================== */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 0 22px;
  border: 0; border-radius: var(--pill);
  background: var(--primary); color: var(--on-primary);
  font-weight: 750; font-size: 17px; cursor: pointer;
  transition: transform 0.15s ease-out, opacity 0.2s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { min-height: 44px; font-size: 15px; width: auto; flex: 1; padding: 0 16px; }
.btn.glow { animation: ctaGlow 2.8s ease-in-out infinite; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ===================== Cards, bolhas, opções ===================== */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; border: 1px solid #1f1f1f; }

.bubble {
  position: relative;
  background: var(--surface-2);
  border-radius: 20px;
  padding: 14px 16px;
  font-size: 17px;
  line-height: 1.45;
  animation: slideIn 0.3s ease-out both;
}
.bubble p { margin: 0; }
.bubble p + p { margin-top: 10px; }
.bubble.big { font-size: 18px; }
.bubble.small { font-size: 15px; padding: 10px 14px; }
.bubble.pop { animation: pop 0.35s ease-out; }

.chat-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; }
.chat-row .bubble { flex: 1; border-top-left-radius: 6px; }

.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px; text-align: left;
  width: 100%; min-height: 64px; padding: 14px 16px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s ease-out;
  animation: slideIn 0.3s ease-out both;
}
.option:nth-child(2) { animation-delay: 0.04s; }
.option:nth-child(3) { animation-delay: 0.08s; }
.option:nth-child(4) { animation-delay: 0.12s; }
.option:active { transform: scale(0.98); }
.option.selected { border-color: var(--primary); background: rgba(62, 220, 151, 0.08); }
.option b { font-size: 16px; display: block; }
.option small { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; line-height: 1.35; }
.opt-icon { font-size: 24px; width: 32px; text-align: center; flex: none; }

.persona-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 4px 0 4px; }
.persona { position: relative; }
.persona-dot { width: 30px; height: 30px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, var(--primary-soft), var(--primary)); }
.persona-durao .persona-dot { background: radial-gradient(circle at 35% 30%, #ffb38a, var(--durao)); }
.persona-durao.selected { border-color: var(--durao); background: rgba(229, 83, 61, 0.09); }
.persona .check { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; flex: none; }
.persona .check svg { width: 16px; height: 16px; stroke: var(--on-primary); stroke-width: 3; opacity: 0; }
.persona.selected .check { background: var(--primary); border-color: var(--primary); }
.persona-durao.selected .check { background: var(--durao); border-color: var(--durao); }
.persona-kids .persona-dot { background: radial-gradient(circle at 35% 30%, #fff1b8, #f2a93b); }
.persona-kids.selected { border-color: #f2a93b; background: rgba(242, 169, 59, 0.09); }
.persona-kids.selected .check { background: #f2a93b; border-color: #f2a93b; }
.persona.selected .check svg { opacity: 1; }

.toggle-row { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 12px 16px; background: var(--surface); border-radius: var(--radius); min-height: 60px; cursor: pointer; }
.toggle-row b { display: block; font-size: 15px; }
.toggle-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.switch { appearance: none; width: 50px; height: 30px; border-radius: var(--pill); background: var(--line); position: relative; flex: none; cursor: pointer; transition: background 0.2s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 0.2s ease-out; }
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(20px); }

/* ===================== Splash ===================== */
.brand { font-size: 40px; letter-spacing: -0.03em; margin: 26px 0 0; }
.brand span { color: var(--primary); }
.splash-line { font-size: 18px; line-height: 1.45; color: var(--muted); max-width: 320px; margin: 0; }

/* ===================== Gráfico de valor ===================== */
.chart-card { padding: 16px 12px 12px; }
.chart { width: 100%; height: auto; }
.chart .grid line { stroke: #232323; stroke-width: 1; }
.chart path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawLine 1.4s 0.2s ease-out forwards; }
.chart .line-with { stroke: var(--primary); filter: drop-shadow(0 0 6px rgba(62, 220, 151, 0.6)); }
.chart .line-without { stroke: #555; stroke-dasharray: 1; }
.chart .dot-with { fill: var(--primary); opacity: 0; animation: fadeIn 0.3s 1.5s forwards, glowPulse 2.4s 1.8s infinite; }
.chart text { fill: var(--faint); font-size: 11px; font-family: inherit; }
.legend { display: flex; gap: 16px; justify-content: center; font-size: 13px; margin: 8px 0 4px; }
.legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.lg-with::before { background: var(--primary); }
.lg-without::before { background: #555; }
.chart-card .muted { text-align: center; }

/* ===================== Professora Fala: avatar 3D (PRD §5) ===================== */
/* O rosto é renderizado em WebGL (public/js/mascot.js); aqui fica só a moldura e as faíscas. */
.mascot {
  --bg1: #1d3a2e; --bg2: #0d1a15; --glow: rgba(62, 220, 151, 0.34);
  position: relative; flex: none;
  width: var(--s); height: var(--s);
  font-size: calc(var(--s) / 10);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, var(--bg1), var(--bg2) 72%);
  box-shadow: 0 0 calc(var(--s) * 0.2) var(--glow), inset 0 0 0 max(2px, calc(var(--s) * 0.014)) rgba(255, 255, 255, 0.07);
  transition: --s 0.45s ease-out, box-shadow 0.4s;
}
.mascot[data-personality='kids'] { --bg1: #4a3512; --bg2: #1c1407; --glow: rgba(242, 169, 59, 0.4); }
.mascot[data-personality='durao'] { --bg1: #4a1d17; --bg2: #1c0b08; --glow: rgba(229, 83, 61, 0.4); }
.mascot canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
.mascot.no-webgl canvas { display: none; }
.mascot.no-webgl { background: url('/img/icon-512.png') center / cover; }
.mascot[data-state='reaction_great'], .mascot[data-state='celebrating'] { box-shadow: 0 0 calc(var(--s) * 0.32) var(--glow), inset 0 0 0 max(2px, calc(var(--s) * 0.014)) rgba(255, 255, 255, 0.1); }

.m-sparks { position: absolute; inset: 0; pointer-events: none; }
.m-sparks i { position: absolute; left: 50%; top: 50%; width: 0.5em; height: 0.5em; margin: -0.25em; border-radius: 50%; background: var(--gold); opacity: 0; }
.mascot[data-state='reaction_great'] .m-sparks i,
.mascot[data-state='celebrating'] .m-sparks i { animation: spark 0.9s ease-out both; }
.mascot[data-state='celebrating'] .m-sparks i { animation-iteration-count: infinite; animation-duration: 1.8s; }
.m-sparks i:nth-child(1) { --a: 0deg; }
.m-sparks i:nth-child(2) { --a: 60deg; animation-delay: 0.05s; }
.m-sparks i:nth-child(3) { --a: 120deg; animation-delay: 0.1s; }
.m-sparks i:nth-child(4) { --a: 180deg; animation-delay: 0.03s; }
.m-sparks i:nth-child(5) { --a: 240deg; animation-delay: 0.08s; }
.m-sparks i:nth-child(6) { --a: 300deg; animation-delay: 0.12s; }

/* ===================== Prática (PRD §4.5) ===================== */
.screen-practice .stage { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 18px 0 8px; }
.stage .mascot-slot { margin: 14px 0 6px; }
.phase-body { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.stage[data-phase='intro'] .mascot-slot,
.stage[data-phase='feedback'] .mascot-slot { margin-top: 24px; }

.dots { flex: 1; display: flex; justify-content: center; gap: 8px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); transition: background 0.3s, transform 0.3s; }
.dots i.done { background: var(--primary); }
.dots i.current { background: var(--primary-soft); transform: scale(1.25); box-shadow: 0 0 10px rgba(140, 245, 198, 0.6); }

.scene-chip { font-size: 13px; color: var(--muted); background: var(--surface); padding: 8px 14px; border-radius: var(--pill); }

.cue { position: relative; width: 100%; background: var(--surface); border-radius: var(--radius); padding: 12px 52px 12px 16px; animation: slideIn 0.3s ease-out both; }
.cue-who { font-size: 12px; color: var(--faint); }
.cue p { margin: 4px 0 0; font-size: 16px; font-style: italic; }
.mini-play { position: absolute; right: 8px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; }
.mini-play svg { width: 18px; height: 18px; fill: var(--primary); }

.phrase-card { width: 100%; text-align: center; background: var(--surface); border-radius: 22px; padding: 18px 18px 14px; animation: riseIn 0.35s ease-out both; }
.phrase-card .en { font-size: 25px; font-weight: 800; line-height: 1.25; margin: 10px 0 0; letter-spacing: -0.01em; }
.phrase-card .pt { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.phrase-status { min-height: 52px; display: grid; place-items: center; margin-top: 10px; }
.play-btn { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface-2); display: grid; place-items: center; cursor: pointer; transition: transform 0.15s; }
.play-btn:active { transform: scale(0.92); }
.play-btn svg { width: 20px; height: 20px; fill: var(--primary); }
.listening-text { color: var(--primary-soft); font-weight: 600; animation: fadePulse 1.4s ease-in-out infinite; }

/* equalizador ligado ao AnalyserNode (PRD §6.4) */
.eq { display: flex; align-items: center; gap: 6px; height: 44px; opacity: 0; transition: opacity 0.2s; }
.eq i { width: 7px; height: 44px; border-radius: 4px; background: var(--primary); transform: scaleY(0.12); transition: transform 0.06s linear; }
.stage[data-phase='listening'] .eq { opacity: 1; }
.stage:not([data-phase='listening']) .eq { height: 0; }

.mic-area { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; }
.mic-label { font-size: 14px; color: var(--muted); }
.mic {
  width: 84px; height: 84px; border-radius: 50%;
  border: 3px solid var(--primary); background: transparent; color: var(--primary);
  display: grid; place-items: center; cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s ease-out;
}
.mic svg { width: 34px; height: 34px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mic svg path { fill: none; }
.mic:active { transform: scale(0.94); }
.mic.recording { background: var(--primary); color: var(--on-primary); animation: micPulse 1.3s ease-out infinite; }
.mic:disabled { opacity: 0.4; }

.hint { margin: 0; text-align: center; font-size: 14px; color: var(--faint); }
.footer .link-btn { align-self: center; padding-top: 0; }

/* feedback */
.bubble.feedback { width: 100%; text-align: center; padding: 18px; }
.feedback .shock { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; animation: pop 0.35s ease-out; }
.feedback .roast { font-size: 18px; margin-top: 8px; }
.feedback .reveal { font-size: 17px; color: var(--primary-soft); font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity 0.35s ease-out, transform 0.35s ease-out; }
.feedback .reveal.show { opacity: 1; transform: none; }
.screen-practice[data-mode='durao'] .feedback .reveal { color: var(--primary-soft); }
.result-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; transition: opacity 0.35s 0.1s ease-out; }
.result-meta.show { opacity: 1; }
.score-chip { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: var(--pill); background: var(--surface-2); }
.score-chip.tier-great { color: var(--primary); }
.score-chip.tier-ok { color: var(--gold); }
.score-chip.tier-needs_work { color: var(--coral); }
.heard { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.heard span { color: var(--text); font-style: italic; }
.tip { margin: 0; font-size: 14px; background: rgba(255, 194, 75, 0.08); border: 1px solid rgba(255, 194, 75, 0.22); color: #ffe3a6; padding: 10px 14px; border-radius: 14px; text-align: center; }

/* conquista (§4.6) */
.achievement {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center; cursor: pointer;
  background: rgba(10, 10, 10, 0.94);
  animation: fadeIn 0.25s ease-out;
}
.achievement.leaving { animation: fadeOut 0.22s ease-in forwards; }
.achievement .trophy { width: 96px; height: 96px; border-radius: 50%; background: #fff; display: grid; place-items: center; animation: pop 0.5s ease-out; box-shadow: 0 0 40px rgba(255, 194, 75, 0.5); }
.achievement .trophy svg { width: 50px; height: 50px; fill: var(--gold); stroke: #b07b10; stroke-width: 1.6; }
.achievement h2 { margin: 0; font-size: 28px; }
.achievement p { margin: 0; font-size: 17px; max-width: 320px; line-height: 1.45; }
.achievement .mascot-slot { margin: 18px 0 8px; }
.achievement .tap-hint { font-size: 13px; color: var(--faint); margin-top: 18px; }

/* ===================== Home / resumo ===================== */
.home-hero { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 18px; }
.goal-card { display: flex; gap: 16px; align-items: center; }
.goal-card p { margin-top: 4px; }
.next-card { display: flex; flex-direction: column; gap: 6px; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.history li { display: flex; justify-content: space-between; gap: 12px; background: var(--surface); padding: 12px 14px; border-radius: 14px; font-size: 14px; }
.free-chip, .premium-chip { flex: 1; text-align: center; font-size: 13px; color: var(--muted); }
.premium-chip { color: var(--gold); font-weight: 700; }

.goal-ring { position: relative; width: var(--size); height: var(--size); flex: none; }
.goal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.goal-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.goal-ring .track { stroke: var(--surface-2); }
.goal-ring .fill { stroke: var(--primary); transition: stroke-dashoffset 1s ease-out; animation: mvEntra 0.5s ease-out; }
.goal-ring.complete .fill { stroke: var(--gold); }
.goal-ring.complete { animation: mvConclui 0.6s 1s ease-out both, mvCelebra 3s 1.6s ease-in-out infinite; border-radius: 50%; }
.goal-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.goal-label b { font-size: 18px; }
.goal-label span { font-size: 11px; color: var(--muted); }

.streak { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 17px; color: var(--faint); }
.streak.lit { color: var(--gold); }
.flame { position: relative; width: 20px; height: 26px; display: inline-block; }
.flame i { position: absolute; left: 50%; bottom: 0; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; transform-origin: 50% 100%; }
.flame i:nth-child(1) { width: 20px; height: 26px; margin-left: -10px; background: #555; }
.flame i:nth-child(2) { width: 12px; height: 16px; margin-left: -6px; background: #777; }
.flame i:nth-child(3) { width: 4px; height: 4px; margin-left: -2px; bottom: 22px; background: transparent; }
.streak.lit .flame i:nth-child(1) { background: linear-gradient(to top, var(--durao), var(--coral) 50%, var(--gold)); animation: flameBody 1.2s ease-in-out infinite alternate; box-shadow: 0 0 14px rgba(255, 140, 60, 0.6); }
.streak.lit .flame i:nth-child(2) { background: linear-gradient(to top, var(--gold), #fff3c4); animation: flameCore 0.9s ease-in-out infinite alternate; }
.streak.lit .flame i:nth-child(3) { background: var(--gold); border-radius: 50%; animation: flameSpark 1.6s ease-out infinite; }

.stats { display: flex; gap: 10px; width: 100%; }
.stat { flex: 1; background: var(--surface); border-radius: var(--radius); padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat b { font-size: 22px; }
.stat > span { font-size: 12px; color: var(--muted); }

/* ===================== Paywall (§6.6) ===================== */
.paywall { align-items: stretch; gap: 14px; }
.pw-hero { display: flex; justify-content: center; margin-top: 12px; }
.offer-badge { align-self: center; background: rgba(240, 145, 110, 0.14); color: var(--coral); border: 1px solid rgba(240, 145, 110, 0.4); font-weight: 750; font-size: 14px; padding: 8px 14px; border-radius: var(--pill); }
.nudge { animation: nudge 3.5s ease-in-out infinite; }
.countdown { margin: -4px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.countdown b { color: var(--coral); font-variant-numeric: tabular-nums; }
.shake { animation: shake 0.45s ease-in-out; display: block; }
.benefits { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.benefits li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.benefits svg { width: 20px; height: 20px; flex: none; stroke: var(--primary); stroke-width: 3; fill: none; }
.plans { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.plan { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; width: 100%; min-height: 72px; padding: 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.plan.selected { border-color: var(--primary); background: rgba(62, 220, 151, 0.07); }
.plan-tag { position: absolute; top: -10px; left: 14px; background: var(--primary); color: var(--on-primary); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 8px; border-radius: var(--pill); }
.plan-main b { display: block; font-size: 17px; }
.plan-main small { color: var(--primary-soft); font-size: 13px; }
.plan-price { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.plan-price s { color: var(--faint); font-size: 13px; }
.plan-price b { font-size: 18px; }
.plan-price b small { font-size: 12px; color: var(--muted); font-weight: 500; }
.plan-price > small { font-size: 12px; color: var(--muted); }
.segmented { display: flex; background: var(--surface); border-radius: var(--pill); padding: 4px; }
.segmented button { flex: 1; min-height: 44px; border: 0; background: none; border-radius: var(--pill); cursor: pointer; font-weight: 650; color: var(--muted); }
.segmented button.on { background: var(--surface-2); color: var(--text); }
.social { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.social blockquote { margin: 0; background: var(--surface); border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.4; }
.social cite { display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: var(--faint); }
.terms { margin: 0; font-size: 12px; line-height: 1.4; color: var(--faint); text-align: center; }

/* ===================== Sheet, toast, campos ===================== */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.25s; }
.sheet {
  position: relative; width: 100%; max-width: 440px; max-height: 92dvh; overflow-y: auto;
  background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(100%); transition: transform 0.28s ease-out;
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; margin-bottom: 6px; }
.sheet h3 { margin: 0; font-size: 20px; }
.sheet .en { font-weight: 700; margin: 0; }
.input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.input:focus { outline: none; border-color: var(--primary); }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; font-size: 13px; color: var(--muted); }
.field-row { display: flex; gap: 10px; }
.sim-banner { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--gold); background: rgba(255, 194, 75, 0.1); padding: 6px 10px; border-radius: 8px; text-align: center; }
.pix-qr { width: 190px; align-self: center; border-radius: 12px; overflow: hidden; }
.pix-code { font-size: 11px; color: var(--muted); background: var(--bg); padding: 10px; border-radius: 10px; word-break: break-all; }
.downsell-price { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.downsell-price s { color: var(--faint); }
.downsell-price b { font-size: 30px; color: var(--primary); }
.downsell-price span { color: var(--muted); font-size: 14px; }

.toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translateX(-50%); max-width: calc(100% - 40px); width: max-content;
  background: #262626; color: var(--text); font-size: 14px; padding: 12px 16px; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: riseIn 0.25s ease-out;
}

/* confete */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; left: 50%; top: 42%; border-radius: 2px; opacity: 0; animation: confettiBurst 0.6s ease-out forwards, confettiDrift 1.9s ease-in forwards; }

/* ===================== Planos por minutos ===================== */
.segmented.period button em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--on-primary); background: var(--primary); padding: 2px 6px; border-radius: var(--pill); margin-left: 4px; }
.plan-card { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px; padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.plan-card.featured { border-color: var(--primary); background: linear-gradient(160deg, rgba(62, 220, 151, 0.12), var(--surface) 55%); box-shadow: 0 0 30px rgba(62, 220, 151, 0.12); }
.plan-card.mine { border-color: var(--gold); }
.plan-card .plan-tag { position: absolute; top: -11px; left: 16px; }
.plan-head { display: flex; align-items: center; gap: 8px; font-size: 15px; letter-spacing: 0.06em; }
.plan-icon { font-size: 20px; }
.plan-card .plan-price { flex-direction: row; align-items: baseline; gap: 4px; }
.plan-card .plan-price b { font-size: 30px; letter-spacing: -0.02em; }
.plan-card .plan-price small { color: var(--muted); font-size: 14px; }
.plan-eq { margin: 0; font-size: 13px; color: var(--primary-soft); }
.plan-min { margin: 4px 0 0; font-size: 15px; }
.plan-desc { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.plan-card .btn { min-height: 48px; font-size: 16px; }
.packs { display: flex; flex-direction: column; gap: 8px; }
.pack-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pack { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border-radius: 16px; background: var(--surface); border: 1.5px solid rgba(255, 194, 75, 0.35); color: inherit; font: inherit; cursor: pointer; }
.pack b { font-size: 16px; color: var(--gold); }
.pack span { font-size: 13px; color: var(--muted); }
.pack:disabled { opacity: 0.4; cursor: default; }
.rules { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 16px; padding: 12px 14px; }
.rules p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.minutes-card { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.minutes-card > span:last-child { flex: 1; min-width: 0; }
.minutes-card b { display: block; font-size: 15px; }
.minutes-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.minutes-card .meter-bar { margin-top: 8px; }
.min-num { display: flex; flex-direction: column; align-items: center; min-width: 58px; }
.min-num b { font-size: 26px; color: var(--primary); line-height: 1; }
.min-num small { font-size: 11px; color: var(--muted); }
.minutes-card.low .min-num b, [data-quota].low { color: var(--coral) !important; }

/* ===================== Idiomas ===================== */
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-card { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px 10px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--line); cursor: pointer; color: inherit; font: inherit; transition: border-color 0.2s, transform 0.15s; animation: slideIn 0.3s ease-out both; }
.lang-card:active { transform: scale(0.97); }
.lang-card.selected { border-color: var(--primary); background: rgba(62, 220, 151, 0.08); }
.lang-flag { font-size: 38px; line-height: 1.1; }
.lang-card b { font-size: 16px; }
.lang-card small { color: var(--muted); font-size: 13px; }
.lang-card em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--primary); margin-top: 2px; }
.lang-chip { font-size: 20px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 0; }

/* ===================== Romaji (japonês) ===================== */
.rom { margin: 2px 0 0; font-size: 13.5px; color: var(--primary-soft); font-style: italic; letter-spacing: 0.01em; }
.phrase-card .rom { font-size: 16px; margin-top: 6px; }
.chat.hide-tr .rom { display: block; }

/* ===================== Tradução da pergunta ===================== */
.cue-pt { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

/* ===================== Login / cadastro ===================== */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 84px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; translate: 0 -50%; min-height: 40px; padding: 0 10px; border: 0; background: none; color: var(--primary-soft); font-size: 13px; cursor: pointer; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.check-row input { width: 22px; height: 22px; flex: none; accent-color: var(--primary); margin: 0; }
.check-row a, .tiny a { color: var(--primary-soft); }
.form-error { min-height: 1.2em; margin: 0; color: var(--danger); font-size: 14px; }
.link-btn.danger { color: var(--danger); align-self: flex-start; padding-left: 0; }
.btn.danger-btn { background: var(--danger); color: #2a0606; }

/* ===================== Conversa livre ===================== */
.convo-card { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; cursor: pointer; background: linear-gradient(135deg, rgba(62, 220, 151, 0.12), var(--surface) 60%); border-color: rgba(62, 220, 151, 0.3); }
.convo-card b { display: block; font-size: 16px; }
.convo-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.35; }
.convo-card.convo-main { padding: 20px 18px; border-color: rgba(62, 220, 151, 0.55); }
.convo-card.convo-main b { font-size: 19px; }
.free-tag { display: inline-block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--primary); background: rgba(62, 220, 151, 0.12); padding: 3px 8px; border-radius: 999px; }
.convo-icon { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); }
.convo-icon svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.convo-icon svg path { fill: none; }

.screen-conversation { height: 100dvh; min-height: 0; }
.tr-toggle { font-size: 13px; font-weight: 800; color: var(--faint); }
.tr-toggle.on { color: var(--on-primary); background: var(--primary); }
.convo-head { display: flex; gap: 14px; align-items: center; padding: 8px 4px 12px; border-bottom: 1px solid #1c1c1c; }
.convo-head .mascot-slot { padding: 8px; }
.convo-head .tiny { margin-top: 2px; color: var(--gold); }
.chat { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 2px; overscroll-behavior: contain; }
.msg { position: relative; max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 16px; line-height: 1.4; animation: riseIn 0.25s ease-out both; }
.msg p { margin: 0; }
.msg .tr { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.chat.hide-tr .tr { display: none; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; padding-right: 50px; }
.msg.me { align-self: flex-end; background: rgba(62, 220, 151, 0.16); border: 1px solid rgba(62, 220, 151, 0.25); border-bottom-right-radius: 6px; }
.msg.fix { align-self: stretch; max-width: none; background: rgba(255, 194, 75, 0.07); border: 1px solid rgba(255, 194, 75, 0.25); padding-right: 50px; }
.msg.fix .label { color: var(--gold); }
.msg.fix p[lang] { margin-top: 4px; font-weight: 700; }
.msg.fix .comment { margin-top: 4px; font-size: 14px; color: #ffe3a6; }
.msg .mini-play { width: 36px; height: 36px; right: 6px; }
.convo-footer { align-items: center; gap: 8px; padding-top: 10px; background: var(--bg); border-top: 1px solid #1c1c1c; }
.convo-footer .eq { height: 28px; opacity: 1; }
.convo-footer .eq i { height: 28px; }
.convo-footer .mic { width: 76px; height: 76px; }
.mic.live { animation: liveRing 2.2s ease-out infinite; }
.mic.idle { opacity: 0.45; border-style: dashed; }
.screen-conversation[data-status='mascot'] .mic.idle { opacity: 0.8; border-style: solid; }
.convo-actions { display: flex; gap: 18px; justify-content: center; }
.convo-actions .link-btn { padding: 4px 8px; min-height: 36px; }
.typed-row { display: flex; gap: 8px; width: 100%; }
.typed-row[hidden] { display: none; }
.typed-row .btn { flex: none; width: auto; }
.fix-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
@keyframes liveRing { 0% { box-shadow: 0 0 0 0 rgba(62, 220, 151, 0.35); } 100% { box-shadow: 0 0 0 18px rgba(62, 220, 151, 0); } }

/* ===================== Professora (conversa livre) ===================== */
.msg.teacher { align-self: stretch; max-width: none; background: rgba(140, 245, 198, 0.06); border: 1px solid rgba(140, 245, 198, 0.22); display: flex; flex-direction: column; gap: 10px; }
.screen-conversation .msg.teacher { border-left: 3px solid var(--primary); }
.t-who { color: var(--primary-soft); }
.t-text { font-size: 15.5px; }
.t-row { position: relative; background: var(--bg); border-radius: 12px; padding: 9px 50px 9px 12px; }
.t-row p { margin-top: 2px; font-weight: 700; }
.t-row .mini-play { right: 4px; }
.t-fix .label { color: var(--gold); }
.t-try .label { color: var(--primary); }
.t-pron { display: flex; flex-direction: column; gap: 8px; }
.t-pron .label { color: var(--coral); }
.t-pron-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.word-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 34px; padding: 4px 10px 4px 6px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.word-btn svg { width: 14px; height: 14px; fill: var(--coral); }

/* ===================== Configurações: voz da professora ===================== */
.voice-opt { cursor: pointer; justify-content: space-between; }
.voice-opt.disabled { opacity: 0.45; cursor: default; }
.voice-opt > span { flex: 1; min-width: 0; }
.voice-opt .cost { font-style: normal; font-weight: 600; font-size: 12px; color: var(--gold); margin-left: 6px; white-space: nowrap; }
.voice-opt .btn.small { flex: none; min-height: 40px; padding: 0 14px; font-size: 14px; }
.voice-opt .btn svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.voice-opt .btn.playing { border-color: var(--primary); color: var(--primary); animation: fadePulse 1.2s ease-in-out infinite; }

/* ===================== Configurações: nível ===================== */
button.toggle-row { width: 100%; border: 0; text-align: left; font: inherit; color: inherit; }
.toggle-row .chev svg { width: 18px; height: 18px; transform: rotate(180deg); stroke: var(--muted); stroke-width: 2; fill: none; }

/* ===================== Gamificação ===================== */
.grow { flex: 1; }
.xp-chip { font-size: 13px; font-weight: 750; color: var(--gold); background: rgba(255, 194, 75, 0.1); padding: 6px 10px; border-radius: var(--pill); white-space: nowrap; }
.topbar .premium-chip { flex: none; }
.xp-toast {
  position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); z-index: 65; transform: translateX(-50%);
  background: linear-gradient(135deg, #ffc24b, #f0916e); color: #2a1500; font-weight: 800; font-size: 15px;
  padding: 10px 16px; border-radius: var(--pill); box-shadow: 0 10px 30px rgba(255, 160, 60, 0.35);
  animation: xpFloat 2.2s ease-out forwards; pointer-events: none; white-space: nowrap;
}
@keyframes xpFloat { 0% { opacity: 0; transform: translate(-50%, 12px) scale(0.9); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 25% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -18px); } }
.achievement .trophy .ach-icon { font-size: 48px; line-height: 1; }
.xp-earned { margin: 0; text-align: center; font-weight: 800; color: var(--gold); font-size: 18px; }

/* Home */
.home-hero { gap: 12px; margin-top: 4px; }
.challenge-home, .review-cta, .track-card, .test-cta { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.challenge-home { background: linear-gradient(135deg, rgba(255, 194, 75, 0.14), var(--surface) 65%); border-color: rgba(255, 194, 75, 0.35); }
.challenge-home .ch-icon { font-size: 30px; flex: none; }
.challenge-home b, .review-cta b, .track-card b, .test-cta b { display: block; font-size: 16px; margin-top: 2px; }
.challenge-home small, .review-cta small, .track-card small, .test-cta small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.challenge-home.done { background: var(--surface); border-color: #1f1f1f; }
.challenge-home.done small { color: var(--primary); }
.review-cta { background: linear-gradient(135deg, rgba(62, 220, 151, 0.14), var(--surface) 65%); border-color: rgba(62, 220, 151, 0.3); }
.review-cta .convo-icon { font-size: 20px; }
.home-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.home-row .goal-card { gap: 12px; padding: 12px 14px; }
.level-mini { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 104px; cursor: pointer; color: inherit; font: inherit; }
.level-mini .cefr { font-size: 30px; font-weight: 850; color: var(--primary); line-height: 1; }
.level-mini small { font-size: 12px; color: var(--muted); }
.track-cards { display: flex; flex-direction: column; gap: 10px; }
.track-card > span:last-child { flex: 1; min-width: 0; }
.track-card .meter-bar { margin-top: 8px; }
.track-icon { font-size: 30px; flex: none; }
.cat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; background: var(--surface); border: 1px solid #1f1f1f; border-radius: var(--radius); cursor: pointer; color: inherit; font: inherit; }
.cat-chip span { font-size: 24px; }
.cat-chip b { font-size: 14px; }
.cat-chip small { font-size: 11px; color: var(--muted); }

/* barras de habilidade / nota */
.meter { display: flex; flex-direction: column; gap: 5px; }
.meter + .meter { margin-top: 12px; }
.meter-top { display: flex; justify-content: space-between; font-size: 14px; }
.meter-top b { font-variant-numeric: tabular-nums; }
.meter-bar { display: block; height: 8px; border-radius: var(--pill); background: var(--surface-2); overflow: hidden; }
.meter-bar i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--primary-soft)); animation: meterIn 0.9s ease-out both; }
@keyframes meterIn { from { width: 0; } }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.check-list li { position: relative; padding: 10px 12px 10px 36px; background: var(--surface); border-radius: 12px; font-size: 14px; }
.check-list li::before { position: absolute; left: 12px; top: 9px; }
.check-list.good li::before { content: '✓'; color: var(--primary); font-weight: 800; }
.check-list.work li::before { content: '→'; color: var(--gold); font-weight: 800; }

/* ===================== Teste de nível ===================== */
.test-cta { background: linear-gradient(135deg, rgba(62, 220, 151, 0.16), var(--surface) 65%); border: 1.5px solid rgba(62, 220, 151, 0.45); }
.test-cta em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--on-primary); background: var(--primary); padding: 2px 7px; border-radius: var(--pill); margin-left: 6px; vertical-align: 2px; }
.test-parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.test-parts li { display: flex; gap: 10px; align-items: baseline; background: var(--surface); padding: 12px 14px; border-radius: 14px; font-size: 15px; }
.test-parts li span { margin-left: auto; color: var(--muted); font-size: 13px; text-align: right; }
.test-step { gap: 14px; }
.step-title { margin: -6px 0 4px; font-size: 22px; }
.step-body { display: flex; flex-direction: column; gap: 14px; }
.play-big { display: flex; align-items: center; justify-content: center; gap: 10px; align-self: center; min-height: 64px; padding: 0 24px; border-radius: var(--pill); border: 1.5px solid var(--primary); background: rgba(62, 220, 151, 0.08); color: var(--primary); font-weight: 700; cursor: pointer; }
.play-big svg { width: 22px; height: 22px; fill: currentColor; }
.gap-phrase { font-size: 24px; font-weight: 750; text-align: center; margin: 10px 0; line-height: 1.4; }
.gap { color: var(--primary); border-bottom: 3px solid var(--primary); padding: 0 6px; }
.rec-timer { font-size: 13px; color: var(--muted); min-height: 18px; font-variant-numeric: tabular-nums; }
.placement-result { gap: 14px; }
.cefr-badge { align-self: center; display: flex; flex-direction: column; align-items: center; padding: 18px 34px; border-radius: 24px; background: radial-gradient(circle at 50% 20%, rgba(62, 220, 151, 0.25), var(--surface) 70%); border: 1.5px solid rgba(62, 220, 151, 0.4); margin-top: 8px; animation: pop 0.5s ease-out; }
.cefr-badge span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.cefr-badge b { font-size: 64px; line-height: 1; color: var(--primary); letter-spacing: -0.03em; }
.cefr-badge small { font-size: 15px; font-weight: 650; }
.cefr-badge.small { padding: 10px 16px; margin: 0; flex: none; }
.cefr-badge.small b { font-size: 36px; }
.cefr-badge.small small { font-size: 12px; text-align: center; }
.diagnosis { margin: 0; font-size: 17px; line-height: 1.5; text-align: center; }

/* ===================== Revisão ===================== */
.review { gap: 12px; }
.review-body { display: flex; flex-direction: column; gap: 10px; }
.review-dots { justify-content: center; flex: none; }
.focus-chip { align-self: center; font-size: 13px; background: var(--surface); padding: 6px 12px; border-radius: var(--pill); color: var(--muted); text-align: center; }
.review-prompt { font-size: 23px; font-weight: 750; text-align: center; margin: 4px 0; line-height: 1.35; }
.review-body .link-btn { align-self: center; }
.review-result { display: flex; flex-direction: column; gap: 8px; }
.review-result p { margin: 0; }
.verdict { align-self: center; font-weight: 850; font-size: 20px; padding: 6px 16px; border-radius: var(--pill); animation: pop 0.35s ease-out; }
.verdict.ok { color: var(--primary); background: rgba(62, 220, 151, 0.12); }
.verdict.bad { color: var(--coral); background: rgba(240, 145, 110, 0.12); }

/* ===================== Desafio do dia ===================== */
.challenge { gap: 14px; }
.challenge-card { background: linear-gradient(160deg, rgba(255, 194, 75, 0.12), var(--surface) 55%); border: 1px solid rgba(255, 194, 75, 0.3); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.challenge-card h2 { margin: 0; font-size: 24px; }
.challenge-card p { margin: 0; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 13px; background: var(--surface-2); padding: 6px 10px; border-radius: var(--pill); }
.countdown-ring { position: relative; width: 200px; height: 200px; align-self: center; margin-top: 8px; }
.countdown-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.countdown-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.countdown-ring .track { stroke: var(--surface-2); }
.countdown-ring .fill { stroke: var(--gold); transition: stroke-dashoffset 0.3s linear; filter: drop-shadow(0 0 6px rgba(255, 194, 75, 0.5)); }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label b { font-size: 44px; font-variant-numeric: tabular-nums; }
.ring-label span { color: var(--muted); font-size: 14px; }
.live-eq { opacity: 1; align-self: center; }
.score-big { display: flex; flex-direction: column; align-items: center; margin-top: 6px; }
.score-big span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.score-big b { font-size: 76px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--gold); }
.score-big small { color: var(--muted); }
.fix-pairs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fix-pairs li { background: var(--surface); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.fix-pairs s { color: var(--coral); }
.fix-pairs b { color: var(--primary-soft); }

/* ===================== Situações, trilhas, memória, conquistas ===================== */
.segmented.cats { margin: 4px 0 4px; }
.segmented.cats button { font-size: 14px; }
.segmented.diff button { font-size: 13px; min-height: 40px; }
.scene-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scene-card { position: relative; text-align: left; min-height: 92px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid #1f1f1f; cursor: pointer; color: inherit; font: inherit; display: flex; flex-direction: column; gap: 4px; }
.scene-card b { font-size: 15px; }
.scene-card small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.scene-card em { font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--gold); margin-top: auto; }
.track-hero { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 16px; }
.track-hero > div { flex: 1; min-width: 0; }
.track-hero p { margin: 0; }
.track-hero .meter-bar { margin-top: 8px; }
.track-preview { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.track-preview b { color: var(--text); margin-right: 6px; }
.track-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.track-day { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid #1f1f1f; color: inherit; font: inherit; cursor: pointer; }
.track-day b { display: block; font-size: 15px; }
.track-day small { display: block; font-size: 12px; color: var(--muted); }
.day-num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 850; background: var(--surface-2); flex: none; }
.track-day.available { border-color: var(--primary); }
.track-day.available .day-num { background: var(--primary); color: var(--on-primary); animation: ctaGlow 2.8s ease-in-out infinite; }
.track-day.done .day-num { background: rgba(62, 220, 151, 0.18); color: var(--primary); }
.track-day.tomorrow, .track-day.locked { opacity: 0.5; cursor: default; }
.track-day.tomorrow small { color: var(--gold); }
.level-card { display: flex; gap: 14px; align-items: center; }
.level-card p { margin: 0; font-size: 14px; line-height: 1.45; }
.mistakes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mistakes li { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface); padding: 11px 14px; border-radius: 12px; }
.mistakes li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mistakes b { font-size: 14px; }
.mistakes small { font-size: 12px; color: var(--muted); }
.mistakes s { color: var(--coral); }
.mistakes .count { flex: none; font-weight: 800; font-size: 13px; color: var(--gold); }
.mistakes li.mastered { opacity: 0.6; }
.mistakes li.mastered .count { color: var(--primary); }
.word-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.word-chip { font-size: 13px; background: var(--surface); padding: 7px 11px; border-radius: var(--pill); color: var(--muted); }
.word-chip b { color: var(--text); }
.word-chip em { font-style: normal; color: var(--coral); font-size: 11px; }
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid #1f1f1f; }
.ach .ach-icon { font-size: 34px; filter: grayscale(1); opacity: 0.35; }
.ach b { font-size: 14px; }
.ach small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.ach em { font-style: normal; font-size: 11px; color: var(--faint); margin-top: 2px; }
.ach .meter-bar { width: 80%; margin-top: 6px; height: 6px; }
.ach.on { border-color: rgba(255, 194, 75, 0.4); background: linear-gradient(160deg, rgba(255, 194, 75, 0.1), var(--surface) 60%); }
.ach.on .ach-icon { filter: none; opacity: 1; }
.ach.on em { color: var(--gold); }

/* conversa: avisos da memória */
.msg.memo { align-self: stretch; max-width: none; display: flex; flex-direction: column; gap: 3px; font-size: 14px; padding: 10px 14px; }
.msg.memo b { font-size: 14px; }
.warn-memo { background: rgba(240, 145, 110, 0.1); border: 1px solid rgba(240, 145, 110, 0.35); }
.warn-memo span { color: #ffc9b3; }
.words-memo { background: rgba(140, 170, 255, 0.08); border: 1px solid rgba(140, 170, 255, 0.3); }
.words-memo span { color: var(--muted); }
.words-memo span b { color: var(--text); }

/* retrato travado */
#rotate-hint { display: none; }
@media (orientation: landscape) and (max-height: 500px) {
  #rotate-hint { display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: var(--bg); font-size: 18px; }
}

/* ===================== Keyframes (PRD §6) ===================== */
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes glowPulse { 0%, 100% { opacity: 0.65; filter: blur(0); } 50% { opacity: 1; filter: blur(2px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes haloBoost { 0% { transform: scale(1); opacity: 0.7; } 40% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(1); opacity: 0.8; } }
@keyframes jump { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-14%) scale(1.04, 0.97); } 60% { transform: translateY(0) scale(1.05, 0.94); } 100% { transform: translateY(0) scale(1); } }
@keyframes tilt { 0% { transform: rotate(0); } 40% { transform: rotate(-9deg); } 100% { transform: rotate(0); } }
@keyframes giggle { 0%, 100% { transform: rotate(0) translateX(0); } 25% { transform: rotate(-4deg) translateX(-2%); } 75% { transform: rotate(4deg) translateX(2%); } }
@keyframes lean { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(-4deg) scale(1.02); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8%); } }
@keyframes spark { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-7.5em) scale(1); } }
@keyframes talk { from { transform: translateX(-50%) scaleY(0.35); } to { transform: translateX(-50%) scaleY(1); } }
@keyframes dot3 { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-0.3em); opacity: 1; } }
@keyframes micPulse { 0% { box-shadow: 0 0 0 0 rgba(62, 220, 151, 0.55); transform: scale(1); } 50% { transform: scale(1.05); } 100% { box-shadow: 0 0 0 26px rgba(62, 220, 151, 0); transform: scale(1); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.85); opacity: 0; } 60% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes fadePulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes ctaGlow { 0%, 100% { box-shadow: 0 0 0 rgba(62, 220, 151, 0); } 50% { box-shadow: 0 0 26px rgba(62, 220, 151, 0.45); } }
@keyframes nudge { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-3deg); } 94% { transform: rotate(3deg); } 97% { transform: rotate(-1.5deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes confettiBurst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(calc(var(--r) / 2)); } }
@keyframes confettiDrift { 0% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(calc(var(--r) / 2)); } 100% { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + 80vh)) rotate(var(--r)); } }
@keyframes mvEntra { from { opacity: 0; } to { opacity: 1; } }
@keyframes mvConclui { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes mvCelebra { 0%, 100% { box-shadow: 0 0 0 rgba(255, 194, 75, 0); } 50% { box-shadow: 0 0 24px rgba(255, 194, 75, 0.45); } }
@keyframes flameBody { from { transform: scale(1, 1) skewX(-2deg); } to { transform: scale(0.92, 1.08) skewX(3deg); } }
@keyframes flameCore { from { transform: scale(1, 0.9); opacity: 0.85; } to { transform: scale(0.9, 1.1); opacity: 1; } }
@keyframes flameSpark { 0% { transform: translate(0, 0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(4px, -10px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-iteration-count: 1 !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* histórico e relatório "pra revisar" */
.section-head { display: flex; align-items: center; justify-content: space-between; }
.history li { padding: 0; }
.hist-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.hist-row span:first-child { display: flex; flex-direction: column; gap: 3px; }
.rev-badge { font-style: normal; font-size: 12px; font-weight: 700; color: var(--primary); }
.report-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.report-list li { background: var(--surface); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.report-list b { font-size: 15px; }
.report-list small { font-size: 13px; color: var(--text-2, #c3c2b7); line-height: 1.35; }
.rp-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.summary-report { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.sheet .report-list li { background: rgba(255, 255, 255, 0.06); }

/* pagamento */
.plan-mine { margin: 0; font-size: 13px; font-weight: 700; color: var(--primary); }
.warn-box { background: rgba(255, 194, 75, 0.1); border: 1px solid rgba(255, 194, 75, 0.35); color: #ffd98a; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 0; }
.renew-card { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; cursor: pointer; border-color: rgba(255, 194, 75, 0.45); background: linear-gradient(135deg, rgba(255, 194, 75, 0.12), var(--surface) 60%); }
.renew-card.expired { border-color: rgba(229, 83, 61, 0.5); background: linear-gradient(135deg, rgba(229, 83, 61, 0.12), var(--surface) 60%); }
.renew-card b { display: block; }
.renew-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }

/* instalar o app */
.install-card { display: flex; align-items: center; gap: 6px; padding: 0 6px 0 0; border-color: rgba(62, 220, 151, 0.4); }
.install-main { display: flex; gap: 14px; align-items: center; flex: 1; text-align: left; background: none; border: 0; color: inherit; font: inherit; padding: 14px 16px; cursor: pointer; }
.install-main b { display: block; }
.install-main small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.install-steps { margin: 0; padding: 0; list-style: none; counter-reset: passo; display: flex; flex-direction: column; gap: 12px; line-height: 1.4; }
.install-steps li { counter-increment: passo; display: flex; gap: 10px; align-items: baseline; }
.install-steps li::before { content: counter(passo); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary, #04150d); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.install-logo { border-radius: 28px; box-shadow: 0 12px 40px rgba(62, 220, 151, 0.25); }
