:root {
  --bg: #eeebe3;
  --paper: #f9f7f2;
  --ink: #23211d;
  --ink-soft: #55524a;
  --ink-faint: #8a867a;
  --line: #d8d3c5;
  --line-strong: #b8b2a0;
  --accent: #1d4e89;
  --accent-ink: #ffffff;
  --accent-soft: #e4ecf6;
  --good: #1e7145;
  --good-bg: #e3f2e9;
  --bad: #c81e1e;
  --bad-bg: #fbe6e6;
  --warn: #c98a00;
  --warn-bg: #fdf1d9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35,33,29,0.06), 0 6px 20px -8px rgba(35,33,29,0.18);
  --font-display: ui-rounded, "Segoe UI Rounded", "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Code", "SF Mono", "Consolas", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171613;
    --paper: #201f1b;
    --ink: #efece3;
    --ink-soft: #b9b4a6;
    --ink-faint: #7d786c;
    --line: #37352d;
    --line-strong: #4a473b;
    --accent: #6f9bd6;
    --accent-ink: #0f1720;
    --accent-soft: #223349;
    --good: #6fce9a;
    --good-bg: #163325;
    --bad: #e58888;
    --bad-bg: #3a1f1f;
    --warn: #e4b95a;
    --warn-bg: #3a2f14;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 10px 30px -10px rgba(0,0,0,0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #171613; --paper: #201f1b; --ink: #efece3; --ink-soft: #b9b4a6; --ink-faint: #7d786c;
  --line: #37352d; --line-strong: #4a473b; --accent: #6f9bd6; --accent-ink: #0f1720; --accent-soft: #223349;
  --good: #6fce9a; --good-bg: #163325; --bad: #e58888; --bad-bg: #3a1f1f; --warn: #e4b95a; --warn-bg: #3a2f14;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 10px 30px -10px rgba(0,0,0,0.6);
}
:root[data-theme="light"] {
  --bg: #eeebe3; --paper: #f9f7f2; --ink: #23211d; --ink-soft: #55524a; --ink-faint: #8a867a;
  --line: #d8d3c5; --line-strong: #b8b2a0; --accent: #1d4e89; --accent-ink: #ffffff; --accent-soft: #e4ecf6;
  --good: #1e7145; --good-bg: #e3f2e9; --bad: #c81e1e; --bad-bg: #fbe6e6; --warn: #c98a00; --warn-bg: #fdf1d9;
  --shadow: 0 1px 2px rgba(35,33,29,0.06), 0 6px 20px -8px rgba(35,33,29,0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }
.app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ---- header ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-mark .dot { color: var(--accent); }
.theme-toggle {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-toggle:focus-visible, button:focus-visible, .opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.road-rule {
  height: 4px;
  margin: 0 20px 4px;
  background-image: repeating-linear-gradient(to right, var(--line-strong) 0 18px, transparent 18px 30px);
  border-radius: 2px;
  opacity: 0.7;
}

main { flex: 1; padding: 8px 20px 40px; }

/* ---- home screen ---- */
.hero {
  padding: 22px 2px 6px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1.15;
  margin: 0 0 8px;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
.hero p {
  color: var(--ink-soft);
  margin: 0;
  max-width: 46ch;
  line-height: 1.5;
}

.resume-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 18px;
}
.resume-banner p { margin: 0 0 12px; color: var(--ink); font-size: 0.92rem; line-height: 1.4; }
.resume-banner .resume-actions { display: flex; gap: 10px; }
.resume-banner .resume-actions button { flex: 1; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: left;
}
.stat-card .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}
.stat-card .label {
  color: var(--ink-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
  display: block;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease;
}
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
}

.rules-note {
  color: var(--ink-faint);
  font-size: 0.85rem;
  text-align: center;
  margin: 14px 0 0;
}

.info-toggle {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.info-toggle summary {
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.info-toggle summary::-webkit-details-marker { display: none; }
.info-toggle summary::after { content: "+"; font-size: 1.2rem; color: var(--ink-faint); }
.info-toggle[open] summary::after { content: "\2212"; }
.info-toggle .body {
  padding: 0 16px 16px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}
.info-toggle .body ul { margin: 6px 0 0; padding-left: 18px; }
.info-toggle .body li { margin-bottom: 4px; }

.history-list { margin-top: 22px; }
.history-list h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin: 0 0 10px;
  font-weight: 700;
}
.cat-stats-sub { text-transform: none; letter-spacing: normal; font-weight: 500; }
.cat-stats-empty { color: var(--ink-faint); font-size: 0.85rem; }
.history-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.history-item:first-of-type { border-top: none; }
.wq-details { flex-basis: 100%; margin-top: 8px; }
.wq-details summary { cursor: pointer; color: var(--accent); font-size: 0.8rem; font-weight: 600; }
.wq-list { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.wq-row {
  display: flex;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}
.wq-diff {
  flex-shrink: 0;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warn-bg, var(--line));
  color: var(--ink-soft);
  white-space: nowrap;
}
.wq-body { flex: 1; min-width: 0; }
.wq-q { font-size: 0.85rem; color: var(--ink); margin-bottom: 4px; }
.wq-your { font-size: 0.78rem; color: var(--bad); }
.wq-correct { font-size: 0.78rem; color: var(--good); }
.pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pill.pass { background: var(--good-bg); color: var(--good); }
.pill.fail { background: var(--bad-bg); color: var(--bad); }
.history-meta { color: var(--ink-faint); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.rank-item:first-of-type { border-top: none; }
.rank-pos {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rank-item.top1 .rank-pos { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.rank-info { flex: 1; min-width: 0; }
.rank-score { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 0.98rem; color: var(--ink); }
.rank-meta { color: var(--ink-faint); font-size: 0.78rem; font-family: var(--font-mono); font-variant-numeric: tabular-nums; margin-top: 1px; }

/* ---- quiz screen ---- */
.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.progress-label {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.score-live {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 800;
  transition: color 0.3s ease;
}
.score-live.band-good { color: var(--good); }
.score-live.band-warn { color: var(--warn); }
.score-live.band-bad { color: var(--bad); }

.progress-track {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 22px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.audio-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.btn-audio-toggle {
  flex: 1;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-audio-toggle.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-audio-repeat {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.voice-input-wrap { margin-bottom: 14px; }
.voice-input {
  width: 100%;
  background: var(--paper);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--ink);
  font-family: var(--font-body);
}
.voice-input:focus { border-color: var(--accent); border-style: solid; outline: none; }
.voice-hint { color: var(--ink-faint); font-size: 0.76rem; margin: 6px 2px 0; line-height: 1.4; }

.sign-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.sign-imgs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.sign-card img {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.question-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.question-text {
  font-size: 1.12rem;
  line-height: 1.5;
  margin: 0;
  text-wrap: balance;
}

.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.opt {
  text-align: left;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.opt .tag {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink-faint);
  flex-shrink: 0;
}
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt:disabled { cursor: default; }
.opt.selected { background: var(--accent-soft); border-color: var(--accent); }
.opt.selected .tag { color: var(--accent); }
.opt.correct { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.opt.correct .tag { color: var(--good); }
.opt.wrong { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.opt.wrong .tag { color: var(--bad); }
.opt.dim { opacity: 0.5; }

.feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.55;
  animation: rise 0.2s ease;
}
.feedback.is-correct { background: var(--good-bg); color: var(--ink); }
.feedback.is-wrong { background: var(--bad-bg); color: var(--ink); }
.feedback .fb-title { font-weight: 800; margin-bottom: 4px; display: block; }
.feedback.is-correct .fb-title { color: var(--good); }
.feedback.is-wrong .fb-title { color: var(--bad); }
.feedback .fb-points { font-family: var(--font-mono); font-weight: 700; }

@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.nav-dot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.76rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.nav-dot.answered { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.nav-dot.current { outline: 2px solid var(--accent); outline-offset: 1px; }

.quiz-nav-bar { display: flex; gap: 10px; margin-top: 18px; }
.quiz-nav-bar button { flex: 1; }
.finish-bar { margin-top: 10px; }
.finish-bar button { width: 100%; }
.answered-note {
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.82rem;
  margin: 10px 0 0;
}

/* ---- result screen ---- */
.result-banner {
  text-align: center;
  padding: 30px 20px;
  border-radius: var(--radius);
  margin: 10px 0 20px;
}
.result-banner.pass { background: var(--good-bg); }
.result-banner.fail { background: var(--bad-bg); }
.result-banner .verdict {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.result-banner.pass .verdict { color: var(--good); }
.result-banner.fail .verdict { color: var(--bad); }
.result-banner .score-big {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
}
.result-banner .score-sub { color: var(--ink-soft); font-size: 0.85rem; margin-top: 6px; }

.game-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.game-score-card .gs-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); font-weight: 700; }
.game-score-card .gs-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 1.7rem; font-weight: 800; color: var(--accent); }
.game-score-card .gs-best { font-size: 0.78rem; color: var(--ink-faint); margin-top: 2px; }
.game-score-card .gs-combo { font-size: 0.78rem; color: var(--warn); font-weight: 700; margin-top: 4px; }

.module-breakdown { margin-bottom: 22px; }
.mb-row { margin-bottom: 12px; }
.mb-head { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 5px; }
.mb-head .mb-name { color: var(--ink-soft); font-weight: 600; }
.mb-head .mb-frac { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink-faint); }
.mb-track { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.mb-fill { height: 100%; background: var(--accent); border-radius: 999px; }

.diff-breakdown-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin: 0 0 8px;
  font-weight: 700;
}
.review-section h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  margin: 0 0 12px;
  font-weight: 700;
}
.review-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bad);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.review-item .review-sign { width: 72px; height: 72px; object-fit: contain; display: block; margin-bottom: 10px; }
.review-item .rq { font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.review-item .ra-wrong { color: var(--bad); margin-bottom: 4px; }
.review-item .ra-right { color: var(--good); margin-bottom: 8px; }
.review-item .rc { color: var(--ink-soft); }
.review-item .rc b { color: var(--ink); }
.review-item.is-correct { border-left-color: var(--good); }
.all-correct-note {
  text-align: center;
  color: var(--ink-soft);
  padding: 20px;
  background: var(--good-bg);
  border-radius: var(--radius);
}

.result-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

.hidden { display: none !important; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
  max-width: 360px;
  width: 100%;
}
.modal-box p {
  margin: 0 0 18px;
  color: var(--ink);
  line-height: 1.5;
  font-size: 0.95rem;
}
.modal-actions { display: flex; gap: 10px; }
.modal-actions button { flex: 1; }

.backup-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.backup-actions button, .backup-actions label {
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.danger-zone {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}
.btn-danger {
  width: 100%;
  background: var(--bad-bg);
  color: var(--bad);
  border: 1.5px solid var(--bad);
  border-radius: var(--radius);
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.diag-textarea {
  width: 100%;
  min-height: 90px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.4;
  resize: vertical;
  margin-top: 8px;
}
.diag-hint { color: var(--ink-faint); font-size: 0.78rem; margin: 8px 0 0; }
.diag-copy { margin-top: 8px; }

/* ---- topbar: conta ---- */
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.account-btn {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-btn.is-in { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* ---- tela de conta / login ---- */
.auth-tabs { display: flex; gap: 8px; margin: 18px 0 16px; }
.auth-tab {
  flex: 1;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.auth-tab.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); margin-top: 8px; }
.auth-input {
  width: 100%;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 1rem;
  color: var(--ink);
  font-family: var(--font-body);
}
.auth-input:focus { border-color: var(--accent); outline: none; }
.auth-form .btn-primary { margin-top: 14px; }
#authMagic { margin-top: 10px; }
.auth-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 12px;
  text-align: center;
}
.auth-status {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 4px 0 14px;
}
.auth-status:empty { display: none; }
.auth-status.is-error { color: var(--bad); border-color: var(--bad); background: var(--bad-bg); }
.auth-status.is-ok { color: var(--good); border-color: var(--good); background: var(--good-bg); }

.sync-note { font-size: 0.78rem; color: var(--ink-faint); text-align: center; margin: 8px 0 0; }

/* ---- treino focado ---- */
.btn-train { margin-top: 12px; }
.train-filters { display: flex; flex-direction: column; gap: 10px; margin: 22px 0; }
.train-filter {
  text-align: left;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.train-filter:hover { border-color: var(--accent); }
.tf-label { font-weight: 700; font-size: 1rem; color: var(--ink); }
.tf-meta { font-size: 0.8rem; color: var(--ink-faint); }

#trainNextBtn { margin-top: 16px; }
.feedback b { color: var(--ink); }
.feedback.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
