/* LexiQuest — cozy night arcade. Tokens sourced from DESIGN.md (OKLCH → hex). */
:root {
  --ink: #140e0a;
  --ink-2: #1e1712;
  --ink-3: #2a221d;
  --line: #3a312a;
  --paper: #ede7df;
  --faint: #90847a;
  --mango: #f8a13f;
  --mango-deep: #482c0d;
  --lime: #a1d862;
  --lime-deep: #283916;
  --coral: #ea6a64;
  --coral-deep: #4b1d1b;
  --peri: #87a9f4;
  --peri-deep: #1f2d4c;
  --heat-0: #241d17;
  --heat-1: #253317;
  --heat-2: #3c561c;
  --heat-3: #5a7f2b;
  --heat-4: #7aa940;
  --heat-5: #a1d862;
  --font-ui: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-game: "Baloo 2", "Nunito Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --rad: 16px;
  --rad-sm: 10px;
  --nav-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100dvh;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
:focus-visible { outline: 2px solid var(--mango); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--mango-deep); }

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 18px calc(var(--nav-h) + 28px);
  min-height: 100dvh;
}
@media (min-width: 720px) {
  .app { padding-top: 32px; }
}

h1, h2, h3 { line-height: 1.15; }
.screen-title {
  font-family: var(--font-game);
  font-size: 26px;
  font-weight: 700;
  margin: 4px 0 16px;
}
.section-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 26px 0 10px;
}
.muted { color: var(--faint); }
.dotted-rule {
  border: 0;
  border-top: 2px dotted var(--line);
  margin: 22px 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-game);
  font-weight: 700;
  font-size: 17px;
  padding: 13px 22px;
  border-radius: var(--rad);
  background: var(--ink-3);
  border-bottom: 4px solid color-mix(in oklab, var(--ink-3) 55%, black);
  transition: transform 0.13s var(--ease), border-bottom-width 0.13s var(--ease), filter 0.13s var(--ease), opacity 0.13s var(--ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn-primary {
  background: var(--mango);
  color: #2b1a05;
  border-bottom-color: color-mix(in oklab, var(--mango) 62%, black);
}
.btn-lime { background: var(--lime); color: #1c2907; border-bottom-color: color-mix(in oklab, var(--lime) 62%, black); }
.btn-big {
  width: 100%;
  font-size: 20px;
  padding: 18px 24px;
  border-radius: 20px;
  border-bottom-width: 5px;
}
.btn-big:active { border-bottom-width: 3px; }
.btn-ghost { background: transparent; border: 2px solid var(--line); border-bottom-width: 4px; }
.btn-sub { font-family: var(--font-ui); font-weight: 800; font-size: 14px; padding: 9px 14px; border-radius: 12px; }

/* ---------- chips, pills ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
  color: var(--paper);
}
.chip-line { background: transparent; border: 1.5px solid var(--line); color: var(--faint); }
.pill-state { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.pill-new { background: var(--ink-3); color: var(--faint); }
.pill-learning { background: var(--mango-deep); color: var(--mango); }
.pill-reviewing { background: var(--peri-deep); color: var(--peri); }
.pill-mastered { background: var(--lime-deep); color: var(--lime); }

/* ---------- surfaces ---------- */
.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 16px;
}

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 800; color: var(--faint); margin-bottom: 6px; }
.input {
  width: 100%;
  background: var(--ink-2);
  border: 2px solid var(--line);
  border-radius: var(--rad-sm);
  color: var(--paper);
  padding: 12px 14px;
  transition: border-color 0.15s var(--ease);
}
.input:focus { outline: none; border-color: var(--mango); }
.input::placeholder { color: color-mix(in oklab, var(--faint) 70%, transparent); }
.form-error {
  color: var(--coral);
  background: var(--coral-deep);
  border-radius: var(--rad-sm);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 12px;
  margin-bottom: 12px;
}

/* ---------- auth ---------- */
.auth-hero { text-align: center; padding: 40px 0 26px; }
.auth-hero .flame { width: 74px; height: auto; }
.brand {
  font-family: var(--font-game);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -0.01em;
}
.brand .qx { color: var(--mango); }
.tagline { color: var(--faint); font-weight: 700; margin-top: 2px; }
.auth-toggle { display: flex; gap: 6px; background: var(--ink-2); border-radius: 999px; padding: 5px; margin: 22px 0 18px; }
.auth-toggle button {
  flex: 1;
  padding: 9px;
  border-radius: 999px;
  font-weight: 800;
  color: var(--faint);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.auth-toggle button.on { background: var(--ink-3); color: var(--paper); }
.demo-hint { text-align: center; margin-top: 18px; font-size: 13px; color: var(--faint); }
.demo-hint button { color: var(--peri); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.avatar-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.avatar-grid button {
  font-size: 22px;
  padding: 6px 0;
  border-radius: var(--rad-sm);
  border: 2px solid transparent;
  transition: transform 0.12s var(--ease), border-color 0.12s var(--ease);
}
.avatar-grid button:hover { transform: scale(1.12); }
.avatar-grid button.on { border-color: var(--mango); background: var(--mango-deep); }

/* ---------- home ---------- */
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.avatar-btn {
  font-size: 26px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  transition: transform 0.12s var(--ease);
}
.avatar-btn:hover { transform: scale(1.06); }
.streak-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-game);
  font-weight: 800;
  font-size: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink-2);
  border: 1px solid var(--line);
}
.streak-chip .flame { width: 20px; height: auto; }
.streak-chip.lit { border-color: var(--mango); background: var(--mango-deep); color: var(--mango); }
.hello { margin-top: 18px; }
.hello h1 { font-family: var(--font-game); font-size: 30px; font-weight: 800; }
.hello .title-line { color: var(--faint); font-weight: 700; }

.xp-block { margin-top: 16px; }
.xp-row { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 13px; }
.xp-row .lv { color: var(--mango); font-family: var(--font-game); font-size: 16px; }
.xp-row .nums { color: var(--faint); }
.xp-bar { display: flex; gap: 4px; margin-top: 7px; }
.xp-seg { flex: 1; height: 10px; border-radius: 5px; background: var(--ink-3); overflow: hidden; position: relative; }
.xp-seg i { position: absolute; inset: 0; background: var(--mango); border-radius: 5px; transform-origin: left; transform: scaleX(var(--fill, 0)); transition: transform 0.6s var(--ease); }

.quest-cta { margin-top: 24px; }
.quest-cta .btn-big { flex-direction: column; gap: 2px; }
.quest-cta .cta-sub { font-family: var(--font-ui); font-size: 13px; font-weight: 800; opacity: 0.75; }
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

.today-strip { display: flex; gap: 18px; margin-top: 20px; padding: 14px 16px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--rad); }
.today-strip .t-item { flex: 1; }
.today-strip .t-num { font-family: var(--font-game); font-weight: 800; font-size: 22px; }
.today-strip .t-lab { font-size: 12px; font-weight: 700; color: var(--faint); }

.lexi-tip { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; }
.lexi-tip .flame { width: 34px; height: auto; flex-shrink: 0; margin-top: 2px; }
.lexi-tip .bubble {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 4px var(--rad) var(--rad) var(--rad);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--paper);
}
.badge-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  font-size: 13px;
  font-weight: 800;
}
.badge-mini .e { font-size: 17px; }

/* ---------- quest ---------- */
.quest-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.quest-quit { font-size: 15px; color: var(--faint); padding: 8px; border-radius: 10px; font-weight: 800; }
.quest-quit:hover { color: var(--coral); }
.qprogress { flex: 1; display: flex; gap: 3px; }
.qprogress i { flex: 1; height: 7px; border-radius: 4px; background: var(--ink-3); transition: background 0.2s var(--ease); }
.qprogress i.done { background: var(--lime); }
.qprogress i.miss { background: var(--coral); }
.qprogress i.cur { background: var(--paper); }
.combo-flag {
  font-family: var(--font-game);
  font-weight: 800;
  color: var(--mango);
  font-size: 15px;
  min-width: 44px;
  text-align: right;
  transition: transform 0.18s var(--ease);
}
.combo-flag.pop { transform: scale(1.35); }
.blitz-timer { height: 7px; border-radius: 4px; background: var(--ink-3); overflow: hidden; flex: 1; }
.blitz-timer i { display: block; height: 100%; background: var(--mango); transform-origin: left; }

.qcard { animation: rise 0.24s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.qkind { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.qword {
  font-family: var(--font-game);
  font-weight: 800;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 2px 0 4px;
}
.qpos { color: var(--faint); font-weight: 700; font-style: italic; }
.qprompt { font-size: 20px; font-weight: 700; line-height: 1.45; max-width: 46ch; }
.qprompt .blank {
  display: inline-block;
  min-width: 84px;
  border-bottom: 3px solid var(--mango);
  transform: translateY(-3px);
}
.opts { display: grid; gap: 10px; margin-top: 22px; }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--ink-2);
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: var(--rad);
  padding: 13px 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  transition: transform 0.12s var(--ease), border-color 0.12s var(--ease), background 0.12s var(--ease), opacity 0.2s var(--ease);
}
.opt:hover { border-color: color-mix(in oklab, var(--line) 40%, var(--paper)); }
.opt:active { transform: translateY(2px); border-bottom-width: 2px; }
.opt .key {
  font-family: var(--font-game);
  font-weight: 700;
  font-size: 14px;
  color: var(--faint);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.opt.correct { border-color: var(--lime); background: var(--lime-deep); animation: pulse 0.24s var(--ease); }
.opt.correct .key { border-color: var(--lime); color: var(--lime); }
.opt.wrong { border-color: var(--coral); background: var(--coral-deep); animation: shake 0.28s var(--ease); }
.opt.wrong .key { border-color: var(--coral); color: var(--coral); }
.opt.dim { opacity: 0.4; }
.opt:disabled { cursor: default; }
.opt:disabled:hover { border-color: var(--line); }
.opt.correct:disabled:hover { border-color: var(--lime); }
.opt.wrong:disabled:hover { border-color: var(--coral); }
@keyframes pulse { 50% { transform: scale(1.025); } }
@keyframes shake {
  20% { transform: translateX(-7px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-4px); }
  90% { transform: translateX(2px); }
}

.typed-row { display: flex; gap: 10px; margin-top: 22px; }
.typed-row .input { flex: 1; font-size: 18px; font-weight: 700; }
.typed-hint { margin-top: 10px; color: var(--faint); font-weight: 700; letter-spacing: 0.2em; }

.feedback { margin-top: 20px; animation: rise 0.22s var(--ease); }
.verdict { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.verdict .v-word { font-family: var(--font-game); font-weight: 800; font-size: 22px; }
.verdict .v-word.good { color: var(--lime); }
.verdict .v-word.bad { color: var(--coral); }
.verdict .v-xp { font-family: var(--font-game); font-weight: 800; color: var(--mango); font-size: 18px; animation: xp-pop 0.5s var(--ease); }
@keyframes xp-pop { 0% { opacity: 0; transform: translateY(8px) scale(0.8); } }
.hook {
  margin-top: 12px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 14px;
}
.hook .h-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mango); margin-bottom: 6px; }
.hook .h-def { font-weight: 700; margin-bottom: 8px; }
.hook .h-mn { color: var(--paper); }
.hook .h-ex { color: var(--faint); font-style: italic; margin-top: 8px; }
.feedback .btn { margin-top: 14px; width: 100%; }

/* teach card */
.teach-banner { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mango); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.teach-banner .flame { width: 18px; height: auto; }
.teach-def { font-size: 19px; font-weight: 700; margin: 14px 0 4px; max-width: 50ch; }
.teach-ex { color: var(--faint); font-style: italic; margin-top: 8px; }
.teach-ex b { color: var(--paper); font-style: normal; }
.syn-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.teach-foot { margin-top: 22px; }

/* quest end */
.qend { text-align: center; padding-top: 26px; }
.qend .flame { width: 84px; height: auto; }
.qend h2 { font-family: var(--font-game); font-size: 32px; font-weight: 800; margin-top: 10px; }
.qend .sub { color: var(--faint); font-weight: 700; margin-top: 2px; }
.result-rows { margin: 24px auto 0; max-width: 330px; text-align: left; }
.result-rows .r {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 4px;
  border-bottom: 2px dotted var(--line);
  font-weight: 700;
}
.result-rows .r:last-child { border-bottom: 0; }
.result-rows .r b { font-family: var(--font-game); font-size: 20px; font-weight: 800; }
.result-rows .r b.xp { color: var(--mango); }
.result-rows .r b.good { color: var(--lime); }
.levelup {
  margin: 18px auto 0;
  max-width: 330px;
  background: var(--mango-deep);
  border: 1.5px solid var(--mango);
  border-radius: var(--rad);
  padding: 14px;
  font-weight: 800;
  color: var(--mango);
  animation: pulse 0.4s var(--ease);
}
.newbadges { display: flex; flex-direction: column; gap: 8px; margin: 18px auto 0; max-width: 330px; }
.newbadge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink-2);
  border: 1.5px solid var(--lime);
  border-radius: var(--rad);
  padding: 10px 14px;
  text-align: left;
  animation: rise 0.3s var(--ease) backwards;
}
.newbadge .e { font-size: 28px; }
.newbadge .n { font-weight: 800; }
.newbadge .d { font-size: 13px; color: var(--faint); font-weight: 700; }
.qend .btn { margin-top: 26px; min-width: 220px; }

/* ---------- dictionary ---------- */
.search-row { display: flex; gap: 8px; margin-bottom: 12px; }
.filter-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.filter-row .chip { cursor: pointer; border: 1.5px solid transparent; }
.filter-row .chip.on { border-color: var(--mango); color: var(--mango); background: var(--mango-deep); }
.word-count { color: var(--faint); font-size: 13px; font-weight: 700; margin: 8px 2px 14px; }
.wrow { border-bottom: 2px dotted var(--line); }
.wrow-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 2px;
  text-align: left;
}
.wrow-head .w { font-family: var(--font-game); font-weight: 700; font-size: 18px; }
.wrow-head .p { color: var(--faint); font-style: italic; font-size: 13px; }
.wrow-head .spacer { flex: 1; }
.diff-dots { display: inline-flex; gap: 2.5px; }
.diff-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
.diff-dots i.on { background: var(--faint); }
.wrow-body { padding: 2px 2px 16px; animation: rise 0.2s var(--ease); }
.wrow-body .d { font-weight: 700; margin-bottom: 6px; }
.wrow-body .ex { color: var(--faint); font-style: italic; margin-bottom: 10px; }
.wrow-body .rec { margin-top: 10px; font-size: 13px; color: var(--faint); font-weight: 700; }

/* ---------- stats ---------- */
.stat-strip { display: flex; gap: 8px; }
.stat-strip .s {
  flex: 1;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 12px 6px;
  text-align: center;
}
.stat-strip b { display: block; font-family: var(--font-game); font-weight: 800; font-size: 21px; }
.stat-strip span { font-size: 11.5px; font-weight: 800; color: var(--faint); }
.chart-block { margin-top: 8px; }
.chart-block svg { display: block; width: 100%; height: auto; }
.chart-note { font-size: 12.5px; color: var(--faint); font-weight: 700; margin-top: 6px; }
.journey { display: flex; height: 18px; border-radius: 9px; overflow: hidden; gap: 2px; }
.journey i { display: block; }
.journey-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--faint); }
.journey-legend .k { display: inline-flex; align-items: center; gap: 6px; }
.journey-legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.trouble-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  border-bottom: 2px dotted var(--line);
  font-weight: 700;
}
.trouble-row .tw { font-family: var(--font-game); font-size: 17px; }
.trouble-row .ta { margin-left: auto; color: var(--coral); font-weight: 800; font-size: 13px; }
.simple-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.simple-table th { text-align: left; color: var(--faint); font-weight: 800; padding: 7px 6px; border-bottom: 2px solid var(--line); }
.simple-table td { padding: 8px 6px; border-bottom: 1px solid var(--ink-3); font-weight: 700; }
.chart-tip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--rad-sm);
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--paper);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  max-width: 240px;
}

/* ---------- leaderboard ---------- */
.rank-tabs { display: flex; gap: 6px; background: var(--ink-2); border-radius: 999px; padding: 5px; margin-bottom: 16px; }
.rank-tabs button { flex: 1; padding: 8px; border-radius: 999px; font-weight: 800; color: var(--faint); }
.rank-tabs button.on { background: var(--ink-3); color: var(--paper); }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: var(--rad-sm);
  font-weight: 700;
}
.rank-row.me { background: var(--mango-deep); border: 1.5px solid var(--mango); }
.rank-row .pos { font-family: var(--font-game); font-weight: 800; width: 30px; color: var(--faint); }
.rank-row.top1 .pos, .rank-row.top2 .pos, .rank-row.top3 .pos { font-size: 18px; }
.rank-row .av { font-size: 22px; }
.rank-row .xp { margin-left: auto; font-family: var(--font-game); font-weight: 800; color: var(--mango); }
.rank-row .st { font-size: 12.5px; color: var(--faint); }

/* ---------- badges ---------- */
.badges-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.badge-tile {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--rad);
  padding: 16px 14px;
  text-align: center;
}
.badge-tile .e { font-size: 34px; display: block; }
.badge-tile .n { font-weight: 800; margin-top: 8px; }
.badge-tile .d { font-size: 12.5px; color: var(--faint); font-weight: 700; margin-top: 3px; }
.badge-tile .when { font-size: 11.5px; color: var(--lime); font-weight: 800; margin-top: 7px; }
.badge-tile.locked { border-style: dashed; opacity: 0.62; }
.badge-tile.locked .e { filter: grayscale(1) opacity(0.5); }

/* ---------- settings ---------- */
.goal-stepper { display: flex; align-items: center; gap: 16px; }
.goal-stepper b { font-family: var(--font-game); font-size: 26px; min-width: 40px; text-align: center; }
.goal-stepper .btn { padding: 8px 16px; }

/* ---------- nav ---------- */
.nav[hidden] { display: none; }
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in oklab, var(--ink) 92%, black);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 4px;
  z-index: 30;
}
.nav-btn {
  flex: 1;
  max-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--faint);
  border-radius: 12px;
  transition: color 0.15s var(--ease), transform 0.15s var(--ease);
}
.nav-btn .nav-ico { font-size: 20px; filter: grayscale(1) opacity(0.7); transition: filter 0.15s var(--ease), transform 0.15s var(--ease); }
.nav-btn.on { color: var(--mango); }
.nav-btn.on .nav-ico { filter: none; transform: scale(1.12); }

/* ---------- toasts ---------- */
.toasts { position: fixed; top: 14px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; }
.toast {
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--paper);
  font-weight: 800;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  animation: rise 0.25s var(--ease);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.toast.err { border-color: var(--coral); color: var(--coral); }

/* ---------- skeletons ---------- */
.skel { border-radius: var(--rad-sm); background: var(--ink-2); position: relative; overflow: hidden; }
.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(237, 231, 223, 0.05) 50%, transparent 70%);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- confetti ---------- */
#confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 55; }

/* ---------- empty states ---------- */
.empty { text-align: center; padding: 36px 16px; color: var(--faint); font-weight: 700; }
.empty .flame { width: 52px; height: auto; opacity: 0.9; }
.empty p { margin-top: 10px; max-width: 34ch; margin-inline: auto; }
.empty .btn { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  .opt.wrong { animation: none; }
  .opt.correct { animation: none; }
  .skel::after { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
