:root {
  --bg: #f0f3fa;
  --surface: #ffffff;
  --surface-2: #f4f3f9;
  --surface-3: #ede8fe;
  --text: #191c32;
  --muted: #7b7890;
  --line: #ece9f5;
  --accent: #6143ff;
  --accent-ink: #ffffff;
  --accent-soft: #ede8fe;
  --accent-text: #6143ff;
  --pastel-ink: #191c32;
  --green: #22c55e;
  --gem: #8b5cf6;
  --flame: #ff8a1f;
  --flame-off: #c9c5d6;
  --ok: #157a3b;
  --ok-bg: #e6f8ec;
  --bad: #c92a2a;
  --bad-bg: #fff0f0;
  --typo: #a5460a;
  --typo-bg: #fff1e3;
  --l0: #d6d2e6; --l1: #d0c4ff; --l2: #b39dff; --l3: #9679ff; --l4: #6143ff; --l5: #22c55e;
  --radius: 28px;
  --radius-sm: 18px;
  --shadow: 0 14px 34px rgba(45, 35, 95, 0.06), 0 2px 6px rgba(45, 35, 95, 0.02);
  --shadow-sm: 0 2px 8px rgba(35, 25, 75, 0.05);
  --display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}

/* Ciemny motyw: <html data-theme="dark"> (Profil → Wygląd). Tu kolory bazowe; resztę wylicza tools/build-dark.js → dark.css. */
:root[data-theme="dark"] {
    --bg: #14121d;
    --surface: #1f1c2b;
    --surface-2: #28253a;
    --surface-3: #2c2650;
    --text: #efedf7;
    --muted: #a7a2bb;
    --line: #322e44;
    --accent: #8d75ff;
    --accent-soft: #2c2650;
    --accent-text: #c3b6ff;
    --flame-off: #4a4658;
    --ok: #69db7c;
    --ok-bg: #173022;
    --bad: #ff8787;
    --bad-bg: #3a1a1c;
    --typo: #ffc078;
    --typo-bg: #3a2a14;
    --l0: #3d3a4c;
    --shadow: none;
    --shadow-sm: none;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background: linear-gradient(180deg, #f5f4fd 0%, #edf2fb 100%);
  min-height: 100vh;
  color: var(--text);
  font: 16px/1.45 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select { font: inherit; color: inherit; }
h1,
h2,
h3 { margin: 0; }
svg { display: block; }
kbd { font: 11px ui-monospace, monospace; padding: 1px 5px; border-radius: 5px; border: 1px solid currentColor; opacity: 0.5; }

.app { max-width: 540px; margin: 0 auto; padding: 14px 16px calc(100px + env(safe-area-inset-bottom)); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.bad-text { color: var(--bad); }
.ok-text { color: var(--ok); }
.gem-text { color: var(--accent-text); }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 14px; }
.section-head .section-title { margin: 0; }
.section-title { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 24px 2px 14px; color: var(--text); }
.card-title { font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--text); }
.card-title.small { font-size: 17px; margin-bottom: 10px; }
.link { border: 0; background: none; color: var(--text); font-weight: 800; font-size: 15px; cursor: pointer; padding: 6px 2px; }
.overline { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.overline.gold { color: #8a5a00; }

/* ---- górny pasek ---- */
.statusbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 2px 2px; }
.pill-stat { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 8px; border: 0; border-radius: 9999px; background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; font-weight: 800; font-size: 15px; color: var(--text); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.pill-stat:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(35, 25, 75, 0.08); }
.pill-stat:active { transform: translateY(0); }
.pill-stat svg { width: 20px; height: 20px; }
.pill-stat.stat-known svg { width: 22px; height: 22px; }
.pill-stat b { font-variant-numeric: tabular-nums; }
.pill-stat.flame { color: var(--flame-off); }
.pill-stat.flame b { color: var(--muted); }
.pill-stat.flame.hot { color: var(--flame); }
.pill-stat.flame.hot b { color: var(--text); }
.flag { margin-left: auto; width: 38px; height: 38px; padding: 0; border: 3px solid #ffffff; border-radius: 50%; overflow: hidden; background: #012169; box-shadow: var(--shadow-sm); cursor: pointer; flex-shrink: 0; transition: transform 0.15s ease; }
.flag:hover { transform: scale(1.05); }
.flag svg { width: 100%; height: 100%; }

/* ---- karty i przyciski ---- */
.card { background: var(--surface); border-radius: var(--radius); padding: 20px 18px 18px; margin-bottom: 16px; box-shadow: var(--shadow); border: 1px solid rgba(235, 233, 245, 0.85); }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 16px; cursor: pointer; font-weight: 700; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.pill { border: 0; border-radius: 18px; height: 52px; padding: 0 24px; font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--accent-ink); background: var(--accent); box-shadow: 0 8px 24px rgba(97, 67, 255, 0.35); cursor: pointer; transition: all 0.2s ease; }
.btn.pill:hover:not(:disabled) { background: #5433f5; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(97, 67, 255, 0.42); }
.btn.pill:active:not(:disabled) { transform: translateY(1px); }
.btn.wide { width: 100%; margin-bottom: 4px; }
.btn.wide:not(.pill) { height: 52px; font-size: 17px; border-radius: 999px; }
.btn.small-pill { height: 44px; padding: 0 20px; font-size: 16px; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 14px; }
.btn.danger { color: var(--bad); }
.btn.file { cursor: pointer; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 18px; padding: 6px; border-radius: 10px; line-height: 1; color: inherit; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--surface-2); }

.bar { display: block; height: 6px; border-radius: 99px; background: var(--l0); overflow: hidden; flex: 1; min-width: 0; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.3s; }
.bar.thick { height: 10px; }
.bar.dark { background: rgba(30, 27, 51, 0.14); }

.gem-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 9999px; background: #ede8fe; color: #6143ff; font-size: 13px; font-weight: 800; white-space: nowrap; }
.gem-pill svg { width: 14px; height: 14px; }

/* ---- karuzela plan dnia / plan dzienny ---- */
.daily-carousel { position: relative; margin-bottom: 8px; }
.daily-deck { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 2px 4px 4px; }
.daily-deck::-webkit-scrollbar { display: none; }
.daily-slide { flex: 0 0 100%; scroll-snap-align: start; box-sizing: border-box; margin-bottom: 0; }
.carousel-dots { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 8px 0 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #d6d2e6; border: 0; padding: 0; cursor: pointer; transition: all 0.2s ease; }
.dot.active { width: 22px; border-radius: 999px; background: #6143ff; }

/* ---- plan dnia ---- */
.plan { display: flex; flex-direction: column; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes launch { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(-14px); } }

.tasks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.task { display: flex; align-items: center; gap: 12px; height: 50px; padding: 6px 14px 6px 8px; border-radius: 16px; transition: transform 0.15s ease; }
.task:hover { transform: translateX(2px); }

/* ---- karta plan dzienny (focus) ---- */
.plan-focus { display: flex; flex-direction: column; text-align: center; }
.focus-top { display: flex; justify-content: center; align-items: center; margin-bottom: 2px; }
.focus-top .card-title { font-size: 20px; font-weight: 800; color: #1e1b33; }

/* ---- pakiety słówek ---- */
.packs { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 14px; scrollbar-width: none; }
.packs::-webkit-scrollbar { display: none; }
.pack { position: relative; flex: 0 0 134px; height: 146px; scroll-snap-align: start; border: 0; border-radius: 22px; padding: 14px 10px 12px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.pack:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1); }
.pack:active { transform: translateY(0); }
.pack-art { width: 76px; height: 60px; display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.pack-art svg { width: 100%; height: 100%; }
.pack b { font-family: var(--display); font-size: 16px; font-weight: 800; line-height: 1.2; margin-top: auto; }

/* ---- egzamin ---- */

.path { position: relative; width: 100%; max-width: 420px; margin: 0 auto 28px; aspect-ratio: 390 / 470; }
.path > * { position: absolute; }
.path-line { inset: 0; width: 100%; height: 100%; }
.sticker { transform: translate(-50%, -50%); pointer-events: none; }
.sticker svg { width: 44px; height: 44px; }
.pnode { transform: translate(-50%, -50%); border-radius: 50%; border: 4px solid #fff; padding: 0; display: flex; align-items: center; justify-content: center; }
.pnode.done { width: 44px; height: 44px; background: var(--green); box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35); cursor: pointer; }
.pnode.done svg { width: 20px; height: 20px; }
.pnode.start { width: 40px; height: 40px; background: #38c6b4; color: #fff; }
.pnode.start svg { width: 18px; height: 18px; }
.pnode.locked { width: 40px; height: 40px; background: #d6d2e6; color: #6e6a85; cursor: pointer; }
.pnode.locked svg { width: 16px; height: 16px; }
.pnode.current { width: 72px; height: 72px; border-width: 5px; background: #ff9f43; box-shadow: 0 8px 20px rgba(255, 138, 31, 0.45); cursor: pointer; z-index: 2; }
.pnode.current svg { width: 34px; height: 34px; }
.pnode.current:hover { transform: translate(-50%, -50%) scale(1.05); }
.pglow { width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 159, 67, 0.22); transform: translate(-50%, -50%); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.12); } }
.pnode.trophy { width: 60px; height: 60px; background: #ffd25e; box-shadow: 0 6px 16px rgba(255, 197, 61, 0.45); cursor: pointer; }
.pnode.trophy svg { width: 32px; height: 32px; }
.pchip { transform: translate(-50%, -50%); padding: 2px 8px; border-radius: 99px; background: var(--surface); font-size: 12px; font-weight: 800; color: var(--muted); box-shadow: 0 2px 6px rgba(60, 40, 140, 0.1); white-space: nowrap; }
.pchip.ok { color: var(--ok); }
.plabel { display: flex; flex-direction: column; white-space: nowrap; font-size: 13px; }
.plabel b { font-size: 14px; }
.plabel > span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: 12px; }
.plabel svg { width: 14px; height: 14px; }
.plabel.below { transform: translate(-50%, 44px); align-items: center; text-align: center; }
.plabel.below b { font-family: var(--display); font-size: 17px; font-weight: 600; }
.plabel.left { transform: translate(calc(-100% - 40px), -50%); align-items: flex-end; text-align: right; }

.float-card { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 22px; box-shadow: 0 10px 28px rgba(60, 40, 140, 0.14); }
.fc-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fc-icon svg { width: 22px; height: 22px; }
.fc-text { flex: 1; display: flex; flex-direction: column; }
.fc-text b { font-family: var(--display); font-size: 17px; font-weight: 600; }

/* ---- moje listy ---- */

/* ---- audio ---- */

/* ---- tematy ---- */

/* ---- sesja ---- */
.session-top { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; }
.gem-count { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gem-count svg { width: 20px; height: 20px; }
.study { text-align: center; padding: 26px 18px; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 4px 12px; border-radius: 99px; margin-bottom: 14px; }
.word-en,
.prompt-en { font-family: var(--display); font-size: 32px; font-weight: 600; line-height: 1.2; }
.word-en .icon-btn,
.prompt-en .icon-btn { display: inline-block; vertical-align: middle; }
.prompt-pl { font-family: var(--display); font-size: 27px; font-weight: 600; line-height: 1.25; }
.pron { color: var(--muted); font-size: 15px; margin-top: 4px; }
.word-pl { font-size: 20px; font-weight: 700; margin-top: 10px; }
.mnemo { margin-top: 14px; padding: 10px 12px; background: var(--accent-soft); border-radius: 14px; font-size: 15px; text-align: left; }
.example { margin-top: 10px; font-size: 15px; text-align: left; }
.example .icon-btn { display: inline-block; }
.example.center { text-align: center; }
.listen { width: 100px; height: 100px; border-radius: 50%; border: 0; color: #fff; font-size: 40px; cursor: pointer; display: block; margin: 4px auto 10px; background: var(--accent); box-shadow: 0 10px 22px -6px rgba(107, 78, 255, 0.55); }
.listen:active { transform: scale(0.95); }
.exam-banner { font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; margin: -6px 0 12px; }

.options { display: grid; gap: 8px; margin-bottom: 12px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 15px 16px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-size: 17px; font-weight: 700; box-shadow: var(--shadow-sm); }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt.ok { border-color: var(--green); background: var(--ok-bg); }
.opt.bad { border-color: var(--bad); background: var(--bad-bg); }
.opt.picked { border-color: var(--accent); background: var(--accent-soft); }
.opt.dim { opacity: 0.5; }
.opt:disabled { cursor: default; color: var(--text); }

.type-form { margin-bottom: 12px; }
.type-form input { width: 100%; padding: 15px 16px; font-size: 20px; font-weight: 700; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); outline: none; }
.type-form input:focus { border-color: var(--accent); }
.type-form input.ok { border-color: var(--green); background: var(--ok-bg); }
.type-form input.typo { border-color: #ff9f43; background: var(--typo-bg); }
.type-form input.bad { border-color: var(--bad); background: var(--bad-bg); text-decoration: line-through; }
.type-form input.picked { border-color: var(--accent); background: var(--accent-soft); }
.type-actions { display: flex; gap: 8px; margin-top: 10px; }
.type-actions .primary { margin-left: auto; border-radius: 999px; padding: 10px 22px; }

.feedback { border-radius: var(--radius); padding: 16px; margin-bottom: 12px; text-align: center; }
.feedback.ok { background: var(--ok-bg); }
.feedback.bad { background: var(--bad-bg); }
.feedback.typo { background: var(--typo-bg); }
.fb-title { font-weight: 800; margin-bottom: 8px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.feedback.ok .fb-title { color: var(--ok); }
.feedback.bad .fb-title { color: var(--bad); }
.feedback.typo .fb-title { color: var(--typo); }
.feedback .word-en { font-size: 24px; }
.feedback .word-pl { font-size: 17px; margin-top: 4px; }
.gain { display: inline-flex; align-items: center; gap: 3px; background: var(--accent-soft); color: var(--accent-text); border-radius: 99px; padding: 2px 9px 2px 10px; font-size: 14px; animation: pop 0.4s ease-out; }
.gain svg { width: 16px; height: 16px; }
@keyframes pop { from { transform: scale(0.5) translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- wyniki i nagrody ---- */
.result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }

.result p { margin: 0; }
.cel-stats { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.cel-stats > div { padding: 12px 6px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; }
.result .cel-stats > div { background: var(--surface-2); box-shadow: none; }
.cel-stats b { font-family: var(--display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cel-stats span { font-size: 12px; font-weight: 700; color: var(--muted); }
.score-ring { --p: 0; width: 140px; height: 140px; margin: 4px auto 10px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--surface-2) 0); }
.score-ring span { width: 108px; height: 108px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--display); font-size: 32px; font-weight: 700; }
.score-ring.pass { --ring: var(--green); }
.score-ring.fail { --ring: #f59f00; }
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; box-shadow: var(--shadow-sm); color: var(--flame-off); }
.banner svg { width: 30px; height: 30px; flex: none; }
.banner div { display: flex; flex-direction: column; font-size: 15px; color: var(--text); }
.banner span { color: var(--muted); font-size: 14px; }
.banner.unlock { background: #ff9f43; color: #fff; }
.banner.unlock div,
.banner.unlock span { color: #3a1d00; }
.mistake { padding: 8px 0; border-bottom: 1px solid var(--line); }
.mistake:last-child { border-bottom: 0; }
.mistake .icon-btn { display: inline-block; }
.mini-word { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mini-word:last-child { border-bottom: 0; }

.celebrate { position: relative; display: flex; flex-direction: column; align-items: stretch; padding-top: 44px; }
.confetti { position: absolute; left: -16px; right: -16px; top: -14px; pointer-events: none; }
.confetti svg { width: 100%; height: auto; }
.round-close { position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; z-index: 1; }
.cel-art { display: flex; justify-content: center; animation: pop 0.6s ease-out; }
.cel-title { font-family: var(--display); font-size: 30px; font-weight: 600; text-align: center; margin-top: 8px; }
.celebrate > p { margin: 4px 0 14px; font-weight: 600; }
.cel-reward { align-self: center; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; background: var(--surface); box-shadow: 0 6px 18px rgba(107, 78, 255, 0.18); margin-bottom: 16px; }
.cel-reward svg { width: 26px; height: 26px; }
.cel-reward b { font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--accent-text); }
.cel-reward span { font-size: 13px; font-weight: 700; color: var(--muted); }
.badge-card { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 22px; background: #fff6d6; color: var(--pastel-ink); margin-bottom: 14px; }
.badge-card > div { flex: 1; display: flex; flex-direction: column; }
.badge-card b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.badge-card .gem-pill { background: #fff; color: #4b32c8; }

.streak-card { display: flex; flex-direction: column; gap: 14px; }
.sc-row { display: flex; align-items: center; gap: 12px; }
.sc-icon { width: 52px; height: 52px; border-radius: 16px; background: #fff1e3; color: var(--flame); display: flex; align-items: center; justify-content: center; }
.sc-icon svg { width: 34px; height: 34px; }
.sc-text { display: flex; flex-direction: column; }
.sc-text b { font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.15; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.wday { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.wd-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--flame); }
.wd-icon svg { width: 22px; height: 22px; }
.wday.done .wd-icon { background: #fff1e3; }
.wday.frozen .wd-icon { background: #e3f2ff; }
.wday.future .wd-icon { background: transparent; border: 2px dashed var(--l0); }
.wday.today > span:last-child { color: var(--accent-text); font-weight: 800; }
.wday.today .wd-icon { box-shadow: 0 0 0 2px var(--accent); }

.levels,
.forecast { display: grid; grid-template-columns: repeat(auto-fit, minmax(36px, 1fr)); gap: 6px; text-align: center; }
.lv-bar,
.fc-bar { height: 70px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.lv-bar i,
.fc-bar i { display: block; width: 100%; border-radius: 8px 8px 0 0; min-height: 2px; }
.fc-bar i { background: var(--accent); }
.l0 { background: var(--l0); } .l1 { background: var(--l1); } .l2 { background: var(--l2); }
.l3 { background: var(--l3); } .l4 { background: var(--l4); } .l5 { background: var(--l5); }
.lv b,
.fc b { display: block; font-size: 14px; margin-top: 4px; font-variant-numeric: tabular-nums; min-height: 20px; }
.lv span,
.fc span { font-size: 11px; color: var(--muted); }
.fc b { margin: 0 0 4px; }

/* ---- słówka ---- */
.filters { display: flex; gap: 8px; margin-bottom: 10px; }
.filters input,
.filters select,
.form select,
.form input[type="number"],
.form input[type="text"],
.form input[type="date"] { padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.filters input { flex: 1; }
.filters select { max-width: 45%; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 13px; cursor: pointer; font-size: 14px; font-weight: 700; }
.chip span { color: var(--muted); margin-left: 2px; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.chip.on span { color: var(--accent-text); }
.chip.dashed { border-style: dashed; color: var(--muted); background: transparent; }
.word-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.word-row { border-bottom: 1px solid var(--line); }
.word-row:last-child { border-bottom: 0; }
.wr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wr-main b,
.wr-main span { overflow: hidden; text-overflow: ellipsis; }
.wr-main span { font-size: 14px; }
.dots { display: flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--l0); }
.dots i.on { background: var(--accent); }
.list-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.list-tags .chip { font-size: 13px; padding: 4px 10px; }
.empty { padding: 24px; margin: 0; }

/* ---- profil ---- */

.badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 6px; text-align: center; }
.badge-item { display: flex; flex-direction: column; align-items: center; gap: 2px; filter: grayscale(1); opacity: 0.4; }
.badge-item.got { filter: none; opacity: 1; }
.badge-item svg { width: 40px; height: 44px; }
.badge-item b { font-size: 12px; line-height: 1.15; }
.badge-item span { font-size: 11px; color: var(--muted); }
.shop { display: flex; align-items: center; gap: 12px; }
.shop-icon { width: 46px; height: 46px; border-radius: 14px; background: #e3f2ff; display: grid; place-items: center; flex: none; }
.shop-icon svg { width: 28px; height: 28px; }
.shop div { flex: 1; }
.shop p { margin: 2px 0 0; }
.btn.buy { border-radius: 99px; color: var(--accent-text); border-color: var(--gem); gap: 4px; padding: 8px 12px; }
.btn.buy svg { width: 18px; height: 18px; }
.rules { list-style: none; padding: 0; margin: 0; }
.rules li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.rules li:last-child { border-bottom: 0; }
.rules b { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); white-space: nowrap; }
.rules svg { width: 16px; height: 16px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 600; }
.form label.check { flex-direction: row; align-items: center; gap: 10px; }
.form label.btn { flex-direction: row; }
.form .chips { margin: 0; }
.form input[type="range"] { width: 100%; accent-color: var(--accent); }
.form input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.form p { margin: 0; }

/* ---- odtwarzacz ---- */
.player .word-en { font-size: 34px; }
.reveal { opacity: 0; transition: opacity 0.3s; }
.reveal.on { opacity: 1; }

.round { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; display: grid; place-items: center; }
.round svg { width: 22px; height: 22px; }
.round.main { width: 76px; height: 76px; color: #fff; background: var(--accent); box-shadow: 0 10px 22px -6px rgba(107, 78, 255, 0.55); }
.round.main svg { width: 32px; height: 32px; }

/* ---- dolne menu ---- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: center; background: #ffffff; border-top: 1px solid #ece9f5; padding: 0 8px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(35, 25, 75, 0.04); }
.nav[hidden] { display: none; }
.nav button { position: relative; flex: 1; max-width: 140px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: #8e8aa0; padding: 10px 4px 4px; cursor: pointer; transition: color 0.15s ease; }
.nav button svg { width: 24px; height: 24px; transition: transform 0.15s ease; }
.nav-ind { position: absolute; top: 0; left: 50%; width: 44px; height: 3px; margin-left: -22px; border-radius: 0 0 3px 3px; background: transparent; transition: background 0.2s ease; }
.nav button.active { color: #6143ff; font-weight: 800; }
.nav button.active .nav-ind { background: #6143ff; }
.nav button:active svg { transform: scale(0.92); }

.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-size: 15px; font-weight: 700; max-width: calc(100% - 32px); z-index: 10; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.toast[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *,
*::before,
*::after { animation: none !important; transition: none !important; }
}
.no-nav .toast { bottom: calc(20px + env(safe-area-inset-bottom)); }

/* ---- ustawienia planu dnia ---- */
.icon-round { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.icon-round:hover { background: var(--accent-soft); color: var(--accent); }
.icon-round svg { width: 22px; height: 22px; }
.page-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
.page-head h1 { flex: 1; text-align: center; font-family: var(--display); font-size: 22px; font-weight: 600; }
.page-head .icon-round { background: var(--surface); box-shadow: var(--shadow-sm); }
.page-head-spacer { width: 40px; flex-shrink: 0; }

.plan-preview { border-radius: var(--radius); padding: 16px; background: var(--accent); color: #fff; margin-bottom: 4px; box-shadow: 0 12px 26px -10px rgba(107, 78, 255, 0.6); }
.overline.light { color: #e3dcff; }
.pp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.pp-stats > div { background: #fff; color: var(--pastel-ink); border-radius: 18px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pp-stats b { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pp-stats span { font-size: 12px; font-weight: 700; color: #5e5a73; }
.pp-forecast { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; }
.pp-forecast svg { width: 20px; height: 20px; flex-shrink: 0; }
.pp-exam { margin: 8px 0 0; padding: 8px 12px; border-radius: 14px; font-size: 13px; font-weight: 800; }
.pp-exam.ok { background: #e6f8ec; color: #157a3b; }
.pp-exam.warn { background: #fff1e3; color: #a5460a; }

.set-card { display: flex; flex-direction: column; gap: 14px; }
.set-head { display: flex; align-items: center; gap: 12px; }
.set-head b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.set-icon { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; }
.set-icon svg { width: 22px; height: 22px; }
.set-hint { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }

.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.seg { border: 0; background: transparent; border-radius: 12px; padding: 10px 6px; font-size: 14px; font-weight: 800; color: var(--muted); cursor: pointer; }
.seg.on { background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-sm); }
.kind-seg { margin-bottom: 10px; }.kind-seg .seg span { margin-left: 3px; opacity: 0.6; }

.set-list { padding: 4px 16px; }
.set-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.set-text b { font-size: 16px; font-weight: 800; }
.set-text span { font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.4; }
.switch { position: relative; width: 52px; height: 32px; flex-shrink: 0; margin-top: 4px; border: 0; border-radius: 99px; background: var(--l0); cursor: pointer; transition: background 0.2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch.on { background: var(--accent); }
.switch.on span { transform: translateX(20px); }

.stepper { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding-top: 2px; }
.st-track { position: absolute; top: 16px; left: calc(50% / var(--n)); right: calc(50% / var(--n)); height: 6px; margin-top: -3px; border-radius: 99px; background: var(--l0); }
.st-track i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.25s; }
.st-stop { position: relative; border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; color: var(--muted); }
.st-dot { width: 14px; height: 14px; margin: 9px 0; border-radius: 50%; background: var(--l0); transition: all 0.2s; }
.st-stop.past .st-dot { background: var(--accent); }
.st-stop.on .st-dot { width: 32px; height: 32px; margin: 0; background: #fff; border: 4px solid var(--accent); box-shadow: 0 4px 12px rgba(107, 78, 255, 0.35); }
.st-label { display: inline-flex; align-items: flex-end; gap: 6px; font-size: 15px; font-weight: 800; }
.st-stop.on .st-label { color: var(--text); }
.lvl-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.lvl-bars i { width: 4px; border-radius: 2px; background: var(--l0); }
.lvl-bars i.on { background: var(--green); }

.btn.ghost-line { background: transparent; border: 2px solid var(--line); color: var(--muted); margin-top: 8px; }
.link-card { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; text-align: left; cursor: pointer; }
.chev { color: var(--muted); font-size: 24px; line-height: 1; }
