:root {
  --bg: #0A1122;
  --surface: #111A2F;
  --surface-2: #18233D;
  --surface-3: #202D4B;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --text: #EEF1F7;
  --text-2: #B6BFD2;
  --muted: #8A95AB;
  --accent: #EE6A1F;
  --accent-2: #FF8D4D;
  --accent-soft: rgba(238, 106, 31, .14);
  --accent-fill: #C84D0B; --ok-fill: #23804F;
  --yellow: #F2C14E;
  --navy: #0C1E46;
  --ok: #2E9E64; --ok-soft: rgba(46, 158, 100, .14); --ok-line: #63CF95;
  --bad: #D9434E; --bad-soft: rgba(217, 67, 78, .14); --bad-line: #F08A91;
  --st-mastered: #3DB477; --st-learning: #E9A23B; --st-new: rgba(255,255,255,.1);

  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --font-card: 'Onest', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --r: 14px;
  --r-sm: 10px;
  --gutter: 16px;
  --maxw: 520px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
}

.tone-0 { --tc: #F39A66; --t1: #E07A3F; --ts: rgba(224, 122, 63, .13); --tb: rgba(224, 122, 63, .35); --tt: #1B0E05; }
.tone-1 { --tc: #8DB0EE; --t1: #5F86D6; --ts: rgba(95, 134, 214, .13); --tb: rgba(95, 134, 214, .35); --tt: #fff; }
.tone-2 { --tc: #E8C468; --t1: #CFA53E; --ts: rgba(207, 165, 62, .13); --tb: rgba(207, 165, 62, .35); --tt: #1E1600; }
.tone-3 { --tc: #EE8C96; --t1: #CC5A67; --ts: rgba(204, 90, 103, .13); --tb: rgba(204, 90, 103, .35); --tt: #fff; }
.tone-4 { --tc: #72CFA6; --t1: #3EA67A; --ts: rgba(62, 166, 122, .13); --tb: rgba(62, 166, 122, .35); --tt: #04170F; }
.tone-5 { --tc: #B6A8EE; --t1: #8572D0; --ts: rgba(133, 114, 208, .13); --tb: rgba(133, 114, 208, .35); --tt: #fff; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent-2); }
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.mono { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

#app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
body.dark #app { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: -0.5px; line-height: 1;
  flex-shrink: 0;
}
.logo small { display: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.2px; }
.brand-name span, .splash-name span { color: var(--accent-2); }

#splash {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 64px 32px calc(48px + env(safe-area-inset-bottom));
  transition: opacity .32s ease-out, visibility .32s;
}
#splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-emblem { width: 84px; height: 84px; object-fit: contain; }
.splash-center { position: absolute; left: 0; right: 0; top: calc(50% - 56px); display: flex; flex-direction: column; align-items: center; gap: 20px; }
.splash-logo { display: block; width: 112px; height: 112px; filter: drop-shadow(0 14px 28px rgba(212, 87, 15, .3)); }
.splash-name { font-family: var(--font-display); font-weight: 700; font-size: 30px; }
.splash-sub { font-size: 15px; color: var(--muted); text-align: center; line-height: 1.4; margin-top: -10px; }
.splash-bottom { width: 100%; max-width: 300px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.splash-credit { display: flex; align-items: center; gap: 12px; font-size: 12px; line-height: 1.35; color: var(--muted); text-align: left; }
.splash-credit img { width: 57px; height: 46px; }

.returning #splash { pointer-events: none; }
.returning #splash > :not(.splash-center), .returning .splash-center > :not(.splash-logo) { display: none; }

.hero {
  position: relative;
  padding: calc(16px + env(safe-area-inset-top)) var(--gutter) 8px;
  display: flex; flex-direction: column; gap: 14px;
}
.hero h1 { margin: 8px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.15; letter-spacing: -.5px; }
.hero .lead { font-size: 14px; color: var(--muted); line-height: 1.45; margin: -6px 0 0; }
.hero.tinted { padding-bottom: 18px; }
.hero.tinted::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--t1, transparent); }
.hero.tinted .lead { color: var(--text-2); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.brand .grow { flex: 1; min-width: 0; }
.brand .logo { width: 44px; height: 44px; border-radius: 11px; font-size: 17px; }
.hdr-emblem { width: 44px; height: 44px; object-fit: contain; display: block; }
.topbar { display: flex; align-items: center; gap: 10px; }
.topbar .grow { flex: 1; }
.crumb { font-size: 13px; color: var(--muted); font-weight: 600; }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; text-decoration: none;
}
.icon-btn.on svg { fill: var(--yellow); stroke: var(--yellow); }

.searchbox {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 8px 0 14px; border-radius: 12px;
  background: var(--surface); color: var(--muted); font-size: 16px;
  border: 1px solid var(--line-2); transition: border-color .15s, box-shadow .2s var(--ease-out);
}
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(238, 106, 31, .16); }
.searchbox.small { height: 46px; border-radius: var(--r-sm); }
.searchbox input {
  flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent;
  font: 500 17px var(--font); color: var(--text);
}
.searchbox input::-webkit-search-cancel-button { display: none; }
.searchbox input::placeholder { color: var(--muted); }
.searchbox .clear { border: none; background: var(--surface-2); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-2); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line-2); white-space: nowrap;
  background: transparent; color: var(--text-2); font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background .12s, color .12s, border-color .12s;
}
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.letters .chip { min-width: 38px; text-align: center; font-family: var(--font-mono); font-weight: 700; }

.section { padding: 12px var(--gutter) 0; display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding: 0 2px; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .1px; }
.section-head a, .link-sm { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--accent-2); border: none; background: none; padding: 0; cursor: pointer; }
.meta { font-size: 13px; font-weight: 500; color: var(--muted); padding: 0 2px; }
.meta.dark { padding: 0; }
.label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .8px; text-transform: uppercase; }
.link-btn { align-self: center; border: none; background: none; padding: 16px; color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.empty { text-align: center; padding: 32px 24px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.card p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.card .ua-big { font-weight: 700; font-size: 20px; line-height: 1.3; }
.card .ex-en { font-style: italic; color: var(--text); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; overflow: clip; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; min-height: 56px;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: none; }
.list .row { content-visibility: auto; contain-intrinsic-size: auto 60px; }
.row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row .title { font-size: 16px; font-weight: 700; }
.row .sub { font-size: 14px; color: var(--muted); line-height: 1.35; }
.row .en { font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--tc, var(--accent-2)); }
.row > svg { color: rgba(255,255,255,.25); }
.letter-h { position: sticky; top: 0; z-index: 1; padding: 6px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--tc, var(--accent-2)); }
.fav-dot svg { width: 15px; height: 15px; fill: var(--yellow); stroke: var(--yellow); }
.s-mastered { background: var(--st-mastered); }
.s-learning { background: var(--st-learning); }
.s-new { background: var(--st-new); }

.result {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
  color: var(--text); text-decoration: none;
}
.result .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.result .en { font-family: var(--font-mono); font-size: 17px; font-weight: 600; color: var(--tc); word-break: break-word; }
.result .full { font-size: 13px; color: var(--muted); }
.result .ua { font-size: 15px; line-height: 1.4; color: var(--text-2); }
mark { background: rgba(242, 193, 78, .25); color: inherit; border-radius: 3px; padding: 0 1px; }
.tag { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }

.btn {
  min-height: 50px; padding: 10px 18px; border-radius: 12px; border: none; cursor: pointer; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 700; text-decoration: none; width: 100%;
  background: var(--accent-fill); color: #fff;
}
.btn svg { width: 19px; height: 19px; }
.btn.outline, .btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.yes { background: var(--ok-fill); }
.btn.no { background: transparent; border: 1px solid rgba(240, 138, 145, .5); color: var(--bad-line); }
.row-btns { display: flex; gap: 10px; }
.row-btns .btn { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: transparent; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.pill svg { width: 16px; height: 16px; }
.pill.on { color: var(--yellow); border-color: rgba(242, 193, 78, .5); }
.pill.on svg { fill: currentColor; }

.install-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2);
}
.install-card .body { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.install-card b { font-size: 15px; color: var(--text); }
.install-card .btn { width: auto; align-self: flex-start; min-height: 40px; margin-top: 8px; padding: 8px 16px; border-radius: 10px; font-size: 15px; background: var(--accent-soft); color: var(--accent-2); box-shadow: inset 0 0 0 1px rgba(255, 141, 77, .35); }
@media (hover: hover) { .install-card .btn:hover { background: rgba(238, 106, 31, .24); filter: none; } }
.install-card .x { border: none; background: var(--surface-2); width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-2); flex-shrink: 0; }
.update-toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  top: calc(12px + env(safe-area-inset-top));
  width: calc(100% - 24px); max-width: calc(var(--maxw) - 24px);
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 12px 16px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--accent-fill); color: #fff; font: inherit; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.update-toast b { font-size: 15px; }
.note-toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(74px + env(safe-area-inset-bottom));
  width: calc(100% - 24px); max-width: calc(var(--maxw) - 24px);
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 14px; cursor: pointer;
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; line-height: 1.4;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
  animation: notein .28s cubic-bezier(.2, .8, .3, 1);
}
@keyframes notein { from { opacity: 0; transform: translate(-50%, 12px); } }
.note-toast .nt-ic { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ok-soft); color: var(--ok-line); }
.note-toast .nt-ic svg { width: 17px; height: 17px; }
.note-toast .nt-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.note-toast b { font-size: 15px; }
.note-toast small { font-size: 13px; color: var(--text-2); }
.note-toast.warn .nt-ic { background: var(--bad-soft); color: var(--bad-line); }
.sr-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
button.stats-link { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.backup-link .sl-ic { position: relative; }
.backup-link.due { border-color: rgba(242, 193, 78, .45); }
.backup-link.due .bk-last { color: var(--yellow); }
.tabbar a { position: relative; }
.tabbar a.dot::after { content: ''; position: absolute; top: 9px; left: calc(50% + 7px); width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--bg); }
.backup-link.due .sl-ic::after { content: ''; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--surface); }
.backup-sheet .bs-ic { width: 56px; height: 56px; margin-top: 8px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-2); }
.backup-sheet .bs-ic svg { width: 26px; height: 26px; }
.backup-sheet .bs-title { margin: 4px 0 0; font: 800 22px/1.2 var(--font); }
.backup-sheet .bs-last { font-size: 13px; color: var(--muted); }
.backup-sheet p { margin: 0 0 6px; font-size: 15px; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.backup-sheet .sheet-body > .btn { margin-top: 2px; }
.backup-sheet small { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.restore-hint { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.restore-hint .link-sm { padding: 10px 4px; margin: -10px 0; }
.save-toast { width: max-content; padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); }
.save-toast b { font-size: 13px; }
.save-toast span { display: none; }
.save-toast.open { width: calc(100% - 24px); padding: 12px 16px; border-radius: 12px; }
.save-toast.open b { font-size: 15px; }
.save-toast.open span { display: block; }

.tod {
  border-radius: var(--r); padding: 16px;
  display: flex; flex-direction: column; gap: 12px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
}
.tod-head .label { display: inline-flex; align-items: center; gap: 8px; }
.tod-head .label::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--t1); }
.tod.swap .tod-body { animation: swap .25s ease; }
@keyframes swap { from { opacity: 0; transform: translateX(10px); } }
.tod-head { display: flex; justify-content: space-between; align-items: center; }
.tod-more { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tod-more svg { width: 16px; height: 16px; }
.tod-body { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.tod-en { font-family: var(--font-mono); font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -.5px; word-break: break-word; color: var(--tc); }
.tod-full { font-size: 14px; font-weight: 500; color: var(--muted); }
.tod-ua { position: relative; display: block; width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--line-2); background: transparent; text-align: left; cursor: pointer; overflow: hidden; }
.tu-text { display: block; font-weight: 700; font-size: 18px; line-height: 1.35; color: var(--text); filter: blur(7px); opacity: .5; transition: filter .25s ease, opacity .25s ease; }
.tu-cover { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--text-2); transition: opacity .2s ease; }
.tu-cover svg { width: 18px; height: 18px; color: var(--tc); }
.tod-ua.shown { border-style: solid; border-color: var(--line); background: var(--surface-2); }
.tod-ua.shown .tu-text { filter: none; opacity: 1; }
.tod-ua.shown .tu-cover { opacity: 0; pointer-events: none; }
.tod-ex { font-size: 15px; font-style: italic; color: var(--text-2); line-height: 1.5; margin-top: 4px; }
.tod-actions { display: flex; gap: 8px; }
.ipa { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: .2px; }

.recent { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.recent a { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.recent a:last-child { border-bottom: none; }
.recent b { font-family: var(--font-mono); font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--accent-2); flex-shrink: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.recent span { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; min-width: 0; }

.az-row {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text); text-decoration: none;
}
.az-mark { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--accent-2); flex-shrink: 0; }
.az-row .body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.az-row .body b { font-size: 16px; }
.az-row .body span { font-size: 13px; color: var(--muted); }
.az-row > svg { color: rgba(255,255,255,.25); }
.topics { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.topic {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  color: var(--text); text-decoration: none;
}
.topic:last-child { border-bottom: none; }
.tp-no { width: 38px; height: 38px; flex-shrink: 0; border-radius: 9px; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text-2); transition: background .15s, color .15s, border-color .15s; }
.topic:active .tp-no { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (hover: hover) { .topic:hover .tp-no { border-color: var(--accent); color: var(--accent-2); } }
.tp-en { font-size: 12px; font-weight: 500; color: var(--muted); font-style: italic; }
.tp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tp-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.tp-peek { font-family: var(--font-mono); font-size: 12px; color: var(--accent-2); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-count { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.tp-count small { font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--muted); }
.tp-bar { height: 3px; border-radius: 2px; background: var(--st-new); overflow: hidden; margin-top: 4px; max-width: 160px; }
.tp-bar i { display: block; height: 100%; background: var(--st-mastered); }
.g-prog { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.g-prog .stack { margin: 0; height: 6px; }
.g-prog b { color: var(--text-2); font-weight: 600; }
.march-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.march-box .section-head { margin: 0 0 2px; }
.step { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.step .letter { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.step .body { display: flex; flex-direction: column; gap: 2px; }
.step .en { font-size: 15px; font-weight: 700; }
.step .ua { font-size: 14px; color: var(--text-2); }
.c-M { background: #C7505F; color: #fff; } .c-A { background: #D39A3C; color: #2A1B00; }
.c-R { background: #E2C265; color: #2A1B00; } .c-C { background: #5A82CF; color: #fff; }
.c-H { background: #8570C9; color: #fff; }
.gmore { height: 1px; }
.train-cta { margin-top: 8px; }

.term-head { gap: 18px; padding-bottom: 22px; }
.term-head .abbr { font-family: var(--font-mono); font-size: 38px; font-weight: 600; color: var(--text); letter-spacing: -.8px; line-height: 1.1; word-break: break-word; }
.term-head .ipa { font-size: 16px; color: var(--text-2); }
.term-head .full { font-size: 16px; font-weight: 500; color: var(--text-2); }
.term-head .abbr.long { font-size: 28px; }
.term-head .abbr.xlong { font-size: 22px; line-height: 1.25; }
.core-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--yellow); }
.core-tag svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.card .senses { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px;
  font-weight: 600; font-size: 17px; line-height: 1.35; }
.card .senses li:first-child { font-size: 20px; font-weight: 700; }
.card .senses li::marker { color: var(--muted); font-weight: 500; font-family: var(--font-mono); font-size: 14px; }
.card .src-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.term-head .cat-badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 12px; font-weight: 600; text-decoration: none; }
.term-head .cat-badge::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--t1); }
.rel { display: flex; gap: 8px; flex-wrap: wrap; }
.rel a { padding: 8px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--accent-2); font-family: var(--font-mono); font-size: 14px; font-weight: 600; text-decoration: none; }

.dev-card {
  display: flex; flex-direction: column; gap: 14px; padding: 16px; margin-top: 8px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
}
.dev-top { display: flex; align-items: center; gap: 14px; }
.dev-top > svg { color: rgba(255,255,255,.3); }
.dev-crest { width: 76px; height: 40px; object-fit: cover; object-position: 50% 0; flex-shrink: 0; opacity: .9; }
.dev-card .body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.dev-card .k { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.dev-card .s { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.authors { display: flex; flex-direction: column; gap: 10px; }
.dev-card .authors { padding-top: 12px; border-top: 1px solid var(--line); }
.author { display: flex; flex-direction: column; gap: 2px; }
.author b { font-size: 15px; font-weight: 600; color: var(--text); }
.author span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.about-logos { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 12px 0 4px; }
.about-logos .emb { width: 76px; height: 76px; object-fit: contain; }
.about-logos .sep { width: 1px; height: 52px; background: var(--line-2); }
.about-logos .ld { height: 76px; width: auto; }
.about-title { text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.about-uni { align-items: center; gap: 14px; text-align: center; padding: 22px 18px; }
.about-uni img { width: 180px; max-width: 70%; height: auto; }
.about-dep { font-size: 15px; font-weight: 600; color: var(--text-2); }
.feat { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.75; color: var(--text-2); }

.me-head { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.me-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.me-title .k { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.me-title b { font-weight: 800; font-size: 24px; letter-spacing: -.3px; }
.me-title .s { font-size: 13px; color: var(--muted); line-height: 1.35; }
.stack { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--st-new); margin: 6px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }
.ranks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 8px 14px; }
.rank { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; }

.badge {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  color: #fff; background: var(--c1, #6E7C9C);
}
.badge b { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.badge small { font-size: 8.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; opacity: .85; margin-top: 2px; }
.badge.t0 { --c1: #5E6B89; }
.badge.t1 { --c1: #9C6B45; }
.badge.t2 { --c1: #C2582A; }
.badge.t3 { --c1: #7D8AA8; }
.badge.t4 { --c1: #4A68B5; }
.badge.t5 { --c1: #6A55B0; }
.badge.t6 { --c1: #2A8C8C; }
.badge.t7 { --c1: #2F8A66; }
.badge.t8 { --c1: #A63F55; }
.badge.t9 { --c1: #6A55B0; }
.badge.t10 { --c1: #4A68B5; }
.badge.t11 { --c1: #C9A23A; color: #241900; }
.badge.locked { background: transparent; color: rgba(255,255,255,.3); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.12); }
.badge.big { width: 96px; height: 96px; }
.badge.big b { font-size: 34px; }
.badge.big small { font-size: 11px; }
.badge.w3 b { font-size: 15px; }
.badge.big.w3 b { font-size: 28px; }

.celebrate { position: fixed; inset: 0; z-index: 200; background: rgba(4, 9, 22, .82); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -20px; width: 8px; height: 12px; border-radius: 1px; transform: rotate(var(--r, 0deg)); animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(calc(100vh + 40px)) rotate(calc(var(--r, 0deg) + 720deg)); } }
.cel-card { position: relative; width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); border-radius: 18px; padding: 28px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; animation: popin .3s cubic-bezier(.2, .9, .3, 1); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
@keyframes popin { from { transform: scale(.92); opacity: 0; } }
.cel-card h2 { margin: 6px 0 0; font-weight: 800; font-size: 21px; line-height: 1.25; }
.cel-card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.cel-days { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-weight: 700; font-size: 14px; color: var(--accent-2); }
.cel-days svg { width: 16px; height: 16px; fill: var(--accent-2); stroke: none; }
.cel-next { font-size: 13px; color: var(--muted); }
.cel-card .btn { margin-top: 8px; }

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; min-height: 160px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.mode-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--mc-soft); color: var(--mc); }
.mode-ic svg { width: 22px; height: 22px; }
.mode-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mode-body b { font-weight: 700; font-size: 17px; }
.mode-body span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.mode-meta { align-self: flex-start; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text-2); }
.m-quiz { --mc: #FF8D4D; --mc-soft: rgba(238, 106, 31, .16); }
.m-cards { --mc: #8DB0EE; --mc-soft: rgba(95, 134, 214, .18); }
.m-match { --mc: #72CFA6; --mc-soft: rgba(62, 166, 122, .18); }
.m-sprint { --mc: #E8C468; --mc-soft: rgba(207, 165, 62, .18); }
.m-mistakes { --mc: #EE8C96; --mc-soft: rgba(204, 90, 103, .18); }
.mode.big { flex-direction: row; align-items: center; min-height: 0; padding: 16px; background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.mode.big .mode-ic { width: 48px; height: 48px; border-radius: 12px; background: rgba(0,0,0,.16); color: #fff; }
.mode.big .mode-body b { font-size: 20px; }
.mode.big .mode-body span { color: rgba(255,255,255,.85); }
.mode.big .mode-meta { align-self: center; color: #fff; opacity: .9; }
.mode.off { color: var(--muted); }
.mode.off .mode-ic { background: var(--surface-2); color: var(--muted); }
.mode.off .mode-body b { color: var(--text-2); }

body.dark .tabbar { display: none; }
.trainer { padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 0; display: flex; flex-direction: column; gap: 14px; }
.progress { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress div { height: 100%; border-radius: 3px; background: var(--accent); transition: transform .3s; }
.counter { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--text-2); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.mode-title { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-top: -2px; }
.q-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 18px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
}
.q-card .label { color: var(--accent-2); }
.q-card .q { font-weight: 700; font-size: 26px; line-height: 1.2; letter-spacing: -.3px; word-break: break-word; }
.q-card .hint { font-size: 15px; color: var(--text-2); line-height: 1.45; }
.q-card.ctx .q { font-size: 20px; font-weight: 600; line-height: 1.45; letter-spacing: 0; }
.options { display: flex; flex-direction: column; gap: 8px; }
.opt {
  min-height: 56px; width: 100%; padding: 10px 14px; border-radius: 12px;
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2);
  font-size: 16px; font-weight: 500; line-height: 1.35; cursor: pointer; transition: background .12s, border-color .12s, opacity .15s;
}
.opt .key { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--muted); flex-shrink: 0; }
.opt .txt { flex: 1; }
.opt.ok { background: var(--ok-soft); border-color: var(--ok-line); }
.opt.bad { background: var(--bad-soft); border-color: var(--bad-line); }
.opt.ok .key { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.bad .key { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt.dim { opacity: .45; }
.opt:disabled { cursor: default; }
.feedback { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; font-size: 15px; line-height: 1.45; }
.feedback b { font-size: 15px; }
.feedback.ok { background: var(--ok-soft); }
.feedback.ok > b:first-child { color: var(--ok-line); }
.feedback.bad { background: var(--bad-soft); }
.feedback.bad > b:first-child { color: var(--bad-line); }
.feedback .fb-ex { font-style: italic; color: var(--text-2); }
.type-input {
  width: 100%; height: 56px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2);
  font: 600 19px var(--font-mono); outline: none;
}
.type-input:focus { border-color: var(--accent); }
.type-input::placeholder { color: var(--muted); font: 400 16px var(--font); }
.typed { min-height: 56px; padding: 15px 14px; border-radius: 12px; border: 1px solid; font: 600 18px var(--font-mono); word-break: break-word; }
.typed.ok { background: var(--ok-soft); border-color: var(--ok-line); }
.typed.bad { background: var(--bad-soft); border-color: var(--bad-line); }
.result-screen { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 0 8px; text-align: center; }
.result-screen .score { font-family: var(--font-display); font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -2px; color: var(--text); font-variant-numeric: tabular-nums; }
.result-screen .msg { font-size: 16px; color: var(--text-2); line-height: 1.45; }
.res-fire { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--accent-2); }
.res-fire svg { width: 18px; height: 18px; fill: var(--yellow); stroke: none; }
.miss { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.miss .label { padding: 14px 14px 6px; }
.miss a { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 14px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 14px; }
.miss a b { color: var(--accent-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.miss a span { color: var(--muted); text-align: right; }

.deck { position: relative; margin: 4px 4px 22px; transition: height .32s cubic-bezier(.3, .7, .3, 1); }
.deck-back {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-radius: 18px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line-2);
}
.deck-back::after { content: ''; position: absolute; inset: 10px; border-radius: 12px; border: 1px solid rgba(242, 193, 78, .22); }
.db-emb { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; background: url(../icons/emblem.png) center / contain no-repeat; }
.deck-back { transition: transform .45s cubic-bezier(.3, 1.3, .5, 1), opacity .45s ease; }
.deck-back.d1 { transform: translateY(calc(8px * (1 - var(--p, 0)))) scale(calc(.96 + .04 * var(--p, 0))); }
.deck-back.d2 { transform: translateY(calc(15px - 7px * var(--p, 0))) scale(calc(.92 + .04 * var(--p, 0))); opacity: calc(.6 + .4 * var(--p, 0)); }
.deck.dragging .deck-back { transition: none; }
.flash {
  position: relative; z-index: 1; display: block; perspective: 1200px; cursor: grab;
  border: none; background: none; padding: 0; width: 100%; text-align: left; color: var(--text);
  touch-action: pan-y; transition: transform .5s cubic-bezier(.3, 1.35, .5, 1), opacity .3s ease;
  will-change: transform;
}
.flash.dragging { transition: none; cursor: grabbing; }
.flash.dragging .stamp { transition: none; }
.flash-inner { position: relative; display: grid; min-height: 320px; transition: transform .62s cubic-bezier(.45, 0, .25, 1.25); transform-style: preserve-3d; will-change: transform; }
.flash.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face { position: relative; grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 18px; padding: 54px 22px 24px; display: flex; flex-direction: column; justify-content: center; gap: 10px; overflow: hidden; }
.flash-front { background: #1B2745; border: 1px solid var(--line-2); box-shadow: inset 0 4px 0 var(--t1); padding-bottom: 46px; }
.flash-back { transform: rotateY(180deg); background: var(--surface); border: 1px solid var(--line-2); box-shadow: inset 0 4px 0 var(--t1); }
.flash-cat { position: absolute; top: 18px; left: 22px; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--tc); }
.flash-back .flash-cat { color: var(--muted); }
.flash .big { font-size: 32px; font-weight: 700; line-height: 1.15; letter-spacing: -.5px; word-break: break-word; }
.flash-front .big { font-family: var(--font-mono); font-weight: 600; letter-spacing: -1px; }
.flash .big.long { font-size: 24px; }
.flash .big.mid { font-size: 25px; }
.flash .big.xl { font-size: 20px; line-height: 1.3; }
.flash .small { font-size: 15px; line-height: 1.45; color: var(--text-2); }
.flash-back .small { margin-top: 4px; }
.flash .flash-ex { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 18px; line-height: 1.45; font-weight: 400; font-style: italic; color: var(--text-2); }
.flash .flash-ex.long { font-size: 16px; }
.flash .ipa { color: var(--muted); }
.flash .tap { position: absolute; bottom: 18px; left: 22px; right: 22px; font-size: 12px; font-weight: 500; color: var(--muted); }

.stamp { transition: opacity .2s ease, transform .2s ease; position: absolute; z-index: 2; top: 16px; padding: 4px 10px; border: 2px solid; border-radius: 8px; font-size: 15px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; pointer-events: none; background: var(--bg); }
.s-yes { left: 16px; color: var(--ok-line); opacity: var(--yes, 0); transform: rotate(-10deg) scale(calc(1.25 - .25 * var(--yes, 0))); }
.s-no { right: 16px; color: var(--bad-line); opacity: var(--no, 0); transform: rotate(10deg) scale(calc(1.25 - .25 * var(--no, 0))); }
.flash.fly-yes, .flash.fly-no { transition: none; pointer-events: none; }
.flash.fly-yes { animation: flyYes .38s cubic-bezier(.2, .55, .35, 1) forwards; --yes: 1; }
.flash.fly-no { animation: flyNo .38s cubic-bezier(.2, .55, .35, 1) forwards; --no: 1; }
.flash.from-rest.fly-yes, .flash.from-rest.fly-no { animation-timing-function: cubic-bezier(.5, 0, .3, 1); }
.flash.fly-yes .stamp, .flash.fly-no .stamp { transition: none; }
@keyframes flyYes {
  0% { transform: translateX(var(--dx, 0px)) rotate(var(--rot, 0deg)); }
  60% { opacity: 1; }
  100% { transform: translate(calc(var(--dx, 0px) * .3 + 125%), 24px) rotate(22deg); opacity: 0; }
}
@keyframes flyNo {
  0% { transform: translateX(var(--dx, 0px)) rotate(var(--rot, 0deg)); }
  60% { opacity: 1; }
  100% { transform: translate(calc(var(--dx, 0px) * .3 - 125%), 24px) rotate(-22deg); opacity: 0; }
}
.flash.lift { animation: lift .62s cubic-bezier(.4, 0, .3, 1); }
@keyframes lift { 45% { transform: translateY(-10px) scale(1.035); } }
.burst { position: absolute; z-index: 5; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; animation: burst .5s ease-out forwards; }
.burst svg { width: 32px; height: 32px; stroke-width: 3; }
.burst.yes { background: var(--ok); }
.burst.no { background: var(--bad); }
@keyframes burst { 0% { transform: scale(.4); opacity: 0; } 28% { transform: scale(1.12); opacity: 1; } 45% { transform: scale(.97); } 60% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.15); opacity: 0; } }
.card-tally span { display: inline-block; }
.card-tally .bump { animation: bump .3s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.18); } }
.card-tally { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card-tally .no { color: var(--bad-line); }
.card-tally .yes { color: var(--ok-line); }
.card-tally .hint { color: var(--muted); font-weight: 500; }
.flash.enter { animation: deckin .3s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes deckin { from { transform: translateY(8px) scale(.96); } }
.deck.advance .deck-back.d1 { animation: promote1 .38s cubic-bezier(.3, .7, .3, 1) forwards; }
.deck.advance .deck-back.d2 { animation: promote2 .38s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes promote1 { from { transform: translateY(calc(8px * (1 - var(--p, 0)))) scale(calc(.96 + .04 * var(--p, 0))); } to { transform: none; } }
@keyframes promote2 { from { transform: translateY(calc(15px - 7px * var(--p, 0))) scale(calc(.92 + .04 * var(--p, 0))); opacity: calc(.6 + .4 * var(--p, 0)); } to { transform: translateY(8px) scale(.96); opacity: 1; } }
.deck-back.d0 { z-index: 0; animation: d0out .2s .2s ease forwards; }
@keyframes d0out { to { opacity: 0; visibility: hidden; } }
.flash.reveal { animation: reveal .3s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes reveal { from { opacity: 0; transform: scale(.985); } }

.match-head { display: flex; justify-content: space-between; align-items: center; }
.rounds { display: inline-flex; align-items: center; gap: 5px; }
.rounds i { width: 20px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); transition: background .3s; }
.rounds i.done { background: var(--ok-line); }
.rounds i.cur { background: var(--accent); }
.rounds b { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.mt-miss { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--muted); }
.mt-miss svg { width: 14px; height: 14px; }
.mt-miss.has { background: var(--bad-soft); color: var(--bad-line); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; grid-auto-rows: minmax(66px, auto); }
.tile {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 10px; border-radius: 12px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-2);
  font-size: 14px; font-weight: 500; line-height: 1.3; text-align: center; word-break: break-word;
  transition: background .15s, border-color .15s, opacity .3s;
}
.tile.en { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--accent-2); }
.tile.sel { background: rgba(95, 134, 214, .2); border-color: #8DB0EE; color: var(--text); }
.tile.ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--text); opacity: .3; transition: background .12s, border-color .12s, opacity .35s ease .3s; }
.tile.bad { background: var(--bad-soft); border-color: var(--bad-line); }
.tile:disabled { cursor: default; }
.match.entering .tile { animation: tilein .25s ease-out both; animation-delay: calc(var(--i, 0) * .03s); }
@keyframes tilein { from { opacity: 0; } }
.match.leaving .tile { opacity: 0 !important; transition: opacity .25s ease; }
.match-hint { text-align: center; }

.sp-ua { font-size: 20px; font-weight: 600; color: var(--text-2); line-height: 1.35; padding-top: 10px; border-top: 1px solid var(--line); }
.sp-score { text-align: center; font-size: 15px; color: var(--text-2); }
.sp-score b { color: var(--text); font-size: 18px; font-variant-numeric: tabular-nums; }
.sp-card.ok { animation: flash-ok .35s ease; }
.sp-card.bad { animation: flash-bad .35s ease; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10, 17, 34, .97);
  border-top: 1px solid var(--line);
  display: flex; justify-content: center;
}
.tabbar a {
  flex: 1; max-width: 130px; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none;
}
.tabbar a svg { width: 23px; height: 23px; stroke-width: 1.8; }
.tabbar a.active { color: var(--accent-2); font-weight: 600; }
.tabbar a.active svg { stroke-width: 2.2; }

a, button, input { touch-action: manipulation; }
.tabbar, .chip, .btn, .opt, .icon-btn, .row, .daily, .mode, .tile, .topic, .az-row, .result, .flash, .logo, .splash-name { -webkit-user-select: none; user-select: none; }
img { -webkit-user-drag: none; -webkit-touch-callout: none; }
.standalone body { overscroll-behavior-y: none; }
.btn, .opt, .icon-btn, .rel a, .pill, .daily, .mode, .result, .dev-card, .tod-more, .chip, .az-row, .stats-link { transition: transform .1s ease, background .12s, border-color .12s; }
.btn:active, .icon-btn:active, .pill:active, .tile:not(:disabled):active, .tod-more:active, .chip:active { transform: scale(.97); }
.opt:not(:disabled):active, .mode:not(.off):active, .daily:active, .result:active, .dev-card:active, .az-row:active, .stats-link:active, .rel a:active { transform: scale(.985); }
.row:active, .recent a:active, .miss a:active, .topic:active { background: rgba(255,255,255,.04); }
@media (hover: hover) {
  .row:hover, .recent a:hover, .miss a:hover, .topic:hover { background: rgba(255,255,255,.03); }
  .opt:not(:disabled):hover, .tile:not(:disabled):hover, .chip:not(.active):hover { border-color: rgba(255,255,255,.28); }
  .tabbar a:hover { color: var(--text-2); }
}

@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes grow { from { transform: scaleX(0); } }
.tp-bar i, .nr-bar span, .stack span, .rh-bar i, .rs-bar i, .rr-bar i, .progress div { transform-origin: left; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes flash-ok { from { border-color: var(--ok-line); } }
@keyframes flash-bad { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); border-color: var(--bad-line); } 75% { transform: translateX(6px); } }

#app.enter > * { animation: rise .22s ease-out both; }

.q-in .q-card, .q-in .options, .q-in .type-input { animation: rise .2s ease-out both; }
.opt.bad, .tile.bad { animation: shake .3s ease; }
.feedback { animation: rise .18s ease-out both; }

/* Менше руху — не нуль руху: зсуви й польоти зникають, а зміна кольору чи прозорості лишається, щоб натискання було помітне. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-property: opacity, color, background-color, border-color, fill, stroke, filter !important;
    transition-duration: .15s !important; transition-delay: 0s !important;
  }
}

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.how { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.how summary { font-size: 14px; font-weight: 600; color: var(--accent-2); }
.how summary::after { content: ' ›'; }
.how[open] summary::after { content: ' ‹'; }
.how-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.how-list li { display: flex; gap: 10px; align-items: center; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.how-list b { color: var(--text); }
.how-note, .card .how-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

.learn { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.learn summary { display: flex; align-items: center; gap: 12px; }
.learn .lt { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-2); }
.learn.mastered .lt { color: var(--ok-line); }
.learn .q-mark { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.learn[open] .q-mark { background: var(--text); border-color: var(--text); color: var(--bg); }

.checks { display: inline-flex; gap: 4px; flex-shrink: 0; }
.checks i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; }
.checks i svg { width: 12px; height: 12px; stroke-width: 3.5; }
.checks i.on { background: var(--st-learning); border-color: var(--st-learning); color: #2A1B00; }
.learn.mastered .checks i.on, .checks.all i.on { background: var(--st-mastered); border-color: var(--st-mastered); color: #fff; }
.how-rule { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; font-size: 14px; line-height: 1.45; }
.how-rule b { color: var(--text); }
.how-demo { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; color: var(--muted); font-size: 12px; }
.how-demo .checks { gap: 3px; }
.how-demo .checks i { width: 15px; height: 15px; border-width: 1.5px; }
.how-demo .checks i svg { width: 9px; height: 9px; }
.how-demo .checks:last-child i.on { background: var(--st-mastered); border-color: var(--st-mastered); color: #fff; }
.how-ic { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-2); }
.how-ic svg { width: 13px; height: 13px; stroke-width: 3; }
.how-ic.ok { background: var(--ok-soft); color: var(--ok-line); }
.how-ic.bad { background: var(--bad-soft); color: var(--bad-line); }
.fb-progress { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); font-size: 14px; font-weight: 600; color: var(--text); }
.feedback.bad .fb-progress { color: var(--text-2); }
.res-gain { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--st-learning); }
.res-gain i { width: 20px; height: 20px; border-radius: 50%; background: var(--st-learning); color: #2A1B00; display: flex; align-items: center; justify-content: center; }
.res-gain i svg { width: 12px; height: 12px; stroke-width: 3.5; }
.res-gain.muted { color: var(--muted); font-weight: 500; }

.stats-link {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text); text-decoration: none;
}
.stats-link .sl-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-2); }
.stats-link .body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.stats-link .body b { font-size: 16px; }
.stats-link .body span { font-size: 13px; color: var(--muted); }
.stats-link > svg { color: rgba(255,255,255,.25); }

.st-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-tiles span { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--muted); }
.st-tiles b { font-weight: 800; font-size: 24px; color: var(--text); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.st-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; }
.st-head .label { white-space: nowrap; }

.abars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 3px; margin-top: 6px; }
.ab { border: none; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.ab-col { width: 100%; height: 104px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line-2); }
.ab-col i { display: block; width: 100%; max-width: 16px; margin: 0 auto; border-radius: 3px 3px 0 0; background: var(--accent); opacity: .45; transition: opacity .15s; }
.ab.sel .ab-col i { opacity: 1; }
.ab-d { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.ab.today .ab-d { color: var(--text); font-weight: 700; }
.ab.sel .ab-d { color: var(--accent-2); }
.st-read { font-size: 13px; color: var(--text-2); min-height: 18px; }
.st-read b { color: var(--text); }

#hmBox { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.hm-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.hm-nav .icon-btn { width: 36px; height: 36px; border-radius: 8px; }
.hm-nav .icon-btn svg { width: 18px; height: 18px; }
.hm-nav .icon-btn:disabled { opacity: .25; cursor: default; }
.hm-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.hm-title b { font-size: 16px; font-weight: 700; color: var(--text); }
.hm-title small { font-size: 12px; font-weight: 500; color: var(--muted); }
.hm-week, .hm { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.hm-week { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.hm-week span { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.hm-week span.we { color: var(--accent-2); opacity: .8; }
.hm { padding-top: 2px; }
.hm-cell { position: relative; display: block; width: var(--cell, 11px); height: var(--cell, 11px); border-radius: 3px; border: none; padding: 0; background: rgba(255,255,255,.05); cursor: pointer; }
.hm .hm-cell { width: 100%; height: auto; aspect-ratio: 1; max-height: 46px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.hm button.hm-cell:active { transform: scale(.94); }
.hm .hm-cell.blank { background: none; cursor: default; }
.hm .hm-cell.future { background: transparent; color: rgba(255,255,255,.2); cursor: default; }
.hm-cell.l1 { background: rgba(238, 106, 31, .25); }
.hm-cell.l2 { background: rgba(238, 106, 31, .48); }
.hm-cell.l3 { background: rgba(238, 106, 31, .72); }
.hm-cell.l4 { background: var(--accent); }
.hm .hm-cell.l3, .hm .hm-cell.l4 { color: #fff; }
.hm .hm-cell.today { color: var(--accent-2); font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255, 141, 77, .6); }
.hm .hm-cell.today.l3, .hm .hm-cell.today.l4 { color: #fff; }
.hm .hm-cell.sel { outline: none; box-shadow: inset 0 0 0 2px var(--text); }
.hm-cell.done::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff; }
.hm .hm-cell.done::after { top: auto; bottom: 4px; margin-top: 0; }
@media (max-width: 360px) {
  .hm-week, .hm { gap: 4px; }
  .hm .hm-cell { border-radius: 6px; font-size: 12px; }
}
.hm-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 2px; font-size: 11px; color: var(--muted); }
.hm-key { display: inline-flex; align-items: center; gap: 3px; }
.hm-legend .hm-cell { --cell: 11px; cursor: default; border-radius: 2px; }
.hm-legend .hm-cell.done::after { width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px; }
.hm-key .hm-cell.done { margin-right: 3px; }
.hm-key .hm-cell.l0 { margin-left: 4px; }
.hm-key .hm-cell.l4 { margin-right: 4px; }

.st-due { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-due > * { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 10px; background: var(--surface-2); font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; }
.st-due a { box-shadow: inset 0 0 0 1px rgba(255, 141, 77, .45); color: var(--accent-2); }
.st-due b { font-size: 21px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.st-rec > * { background: var(--surface); border: 1px solid var(--line); }

.st-wrong { font-size: 12px; font-weight: 600; color: var(--bad-line); white-space: nowrap; }

.hero.tinted { background: var(--ts, transparent); border-radius: 0 0 22px 22px; margin-bottom: 6px; }
.hero.tinted::before { display: none; }
.hero.tinted .icon-btn { background: rgba(10, 17, 34, .45); border-color: var(--tb, var(--line)); }
.term-head .abbr { color: var(--tc, var(--text)); }
.term-head .cat-badge { background: rgba(10, 17, 34, .45); border-color: var(--tb); color: var(--tc); }
.hero.tinted .letters .chip:not(.active) { background: rgba(10, 17, 34, .35); }
.hero.tinted .chip.active { background: var(--tc); border-color: var(--tc); color: var(--bg); }
.letter-h { background: var(--ts, var(--surface-2)); }

.chip.active { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }

.result { background: var(--ts); border-color: var(--tb); }
.result .tag { display: inline-flex; align-items: center; gap: 6px; color: var(--tc); }
.result .tag::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--t1); }

.tod { background: var(--ts); border-color: var(--tb); }
.tod .tod-more, .tod .pill { background: rgba(10, 17, 34, .4); border-color: var(--tb); }
.tod-ua { border-color: var(--tb); }
.tod-ua.shown { background: rgba(10, 17, 34, .4); border-color: var(--tb); }
.tod-more svg { transition: transform .35s var(--ease-out); }
.tod-more:active svg { transform: rotate(180deg); }
.tod.swap .tod-body { animation: swap .3s cubic-bezier(.2, .8, .3, 1); }
.tu-cover svg { animation: blink 3.5s ease-in-out infinite; }
@keyframes blink { 0%, 90%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

.recent a b { color: var(--tc, var(--accent-2)); }
.recent a { position: relative; }

.az-row { background: var(--accent-soft); border-color: rgba(238, 106, 31, .35); }
.az-mark { background: var(--accent-fill); color: #fff; }
.topic { transition: background .15s; }
#app.enter .section > :nth-child(2) { animation-delay: .03s; }
#app.enter .section > :nth-child(3) { animation-delay: .06s; }
#app.enter .section > :nth-child(4) { animation-delay: .09s; }
#app.enter .section > :nth-child(n+5) { animation-delay: .12s; }
#app.enter .section > * { animation: rise .3s ease-out both; }

.mode { background: var(--mc-soft); border-color: transparent; }
.mode-body b { color: var(--mc); }
.mode-meta { color: var(--mc); }
.mode-ic { background: var(--mc); color: var(--bg); transition: transform .25s var(--ease-out); }
.mode:not(.off):active .mode-ic { transform: rotate(-10deg) scale(1.08); }
@media (hover: hover) { .mode:not(.off):hover .mode-ic { transform: rotate(-8deg) scale(1.06); } }
.mode.big .mode-body b { color: #fff; }
.mode.off { background: var(--surface); border-color: var(--line); }
.mode.off .mode-body b, .mode.off .mode-meta { color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: scale(.9); } }

.q-card { position: relative; overflow: hidden; background: radial-gradient(130% 90% at 0% 0%, rgba(238, 106, 31, .1), transparent 60%), var(--surface); }
.opt .key { transition: background .15s, color .15s, border-color .15s; }
@media (hover: hover) { .opt:not(:disabled):hover .key { border-color: var(--accent); color: var(--accent-2); } }
.opt.ok { animation: okpop .3s var(--ease-out); }
@keyframes okpop { 50% { transform: scale(1.025); } }
.progress div { position: relative; }
.progress div::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 6px; border-radius: 3px; background: #fff; opacity: .55; }
.result-screen .score { color: var(--accent-2); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.result-screen .msg, .res-gain, .res-fire { animation: rise .35s .15s ease-out both; }
.miss { animation: rise .35s .25s ease-out both; }

.flash-front { background: #13203D; border-color: var(--tb); }

.tile.sel { animation: okpop .25s ease; }
.sp-score b { color: var(--accent-2); }

.stats-link .sl-ic { background: var(--accent); color: #fff; }

.st-tiles span:nth-child(1) b { color: var(--accent-2); }
.st-tiles span:nth-child(2) b { color: #72CFA6; }
.st-tiles span:nth-child(3) b { color: #E8C468; }
.st-tiles span:nth-child(4) b { color: #B6A8EE; }

.icon-btn.on svg, .pill.on svg { animation: starpop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes starpop { 0% { transform: scale(.6) rotate(-30deg); } 100% { transform: none; } }

.tabbar a svg { padding: 3px 14px; box-sizing: content-box; border-radius: 12px; transition: background .2s, transform .2s; }
.tabbar a:active svg { transform: scale(.9); }
.tabbar a { z-index: 1; }
.tab-ind { position: absolute; left: 0; top: 0; width: 51px; height: 29px; border-radius: 12px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(255, 141, 77, .18); pointer-events: none; }
.tab-ind.ready { transition: transform .38s var(--ease-out), opacity .2s ease; }
.tab-ind.off { opacity: 0; }


.tp-count em { font-style: normal; }


.ab-col i { opacity: .7; }
.ab.sel .ab-col i { opacity: 1; background: var(--accent-2); }
.hm-cell.l1 { background: rgba(238, 106, 31, .32); }
.hm-cell.l2 { background: rgba(238, 106, 31, .58); }
.hm-cell.l3 { background: rgba(238, 106, 31, .85); }
.hm-cell.l4 { background: var(--accent-2); }
.st-tiles b em { font-style: normal; }

.sp-card .q { font-family: var(--font-mono); }

.deck-back { background: #13203D; border-color: rgba(242, 193, 78, .3); }
.deck-back::after { inset: 8px; border-radius: 12px; border: 1px solid rgba(242, 193, 78, .25); }
.deck-back::before { content: ''; position: absolute; left: 50%; top: 50%; width: 136px; height: 136px; margin: -78px 0 0 -68px; border-radius: 50%; border: 1px solid rgba(242, 193, 78, .35); box-shadow: inset 0 0 0 6px #13203D, inset 0 0 0 7px rgba(242, 193, 78, .18); }
.db-emb { width: 96px; height: 96px; margin: -58px 0 0 -48px; }
.db-cap { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-style: normal; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(242, 193, 78, .7); }
.flash-front::before, .flash-back::before { content: ''; position: absolute; inset: 8px; border-radius: 12px; border: 1px solid rgba(255,255,255,.07); pointer-events: none; }

.empty-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 20px; text-align: center; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.eb-ic { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ok-soft); color: var(--ok-line); margin-bottom: 6px; }
.eb-ic svg { width: 26px; height: 26px; }
.empty-box b { font-size: 17px; }
.empty-box span:last-child { font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 280px; }

.abars.none .ab-col i { display: none; }
.ab-empty { margin: -100px 24px 64px; text-align: center; font-size: 13px; color: var(--muted); pointer-events: none; }

.sp-rules { list-style: none; margin: 0; padding: 4px 0; display: flex; flex-direction: column; gap: 10px; }
.sp-rules li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); animation: rise .3s ease-out both; }
.sp-rules li:nth-child(2) { animation-delay: .06s; } .sp-rules li:nth-child(3) { animation-delay: .12s; } .sp-rules li:nth-child(4) { animation-delay: .18s; }
.sp-k { min-width: 44px; height: 30px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 700; }
.sp-k svg { width: 16px; height: 16px; }
.sp-k.yes { background: var(--ok-fill); color: #fff; }
.sp-k.no { background: transparent; border: 1px solid rgba(240, 138, 145, .5); color: var(--bad-line); }
.sp-rules kbd { margin-left: auto; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-2); font: 600 12px var(--font-mono); color: var(--muted); }
@media (hover: none) { .sp-rules kbd { display: none; } }

.hero .lead { font-size: 15px; }
.section-head h2 { font-size: 17px; }
.meta { font-size: 14px; }
.label { font-size: 12px; }
.chip { font-size: 14px; padding: 9px 13px; }
.card p { font-size: 17px; }
.card .ua-big { font-size: 22px; }
.card .senses { font-size: 18px; }
.card .senses li:first-child { font-size: 22px; }
.row .en { font-size: 16px; }
.row .sub { font-size: 15px; }
.result .en { font-size: 18px; }
.result .ua { font-size: 16px; }
.recent b, .recent span { font-size: 15px; }
.tod-en { font-size: 32px; }
.tod-ex { font-size: 16px; }
.tu-text { font-size: 19px; }
.tu-cover { font-size: 14px; }

.tp-title { font-size: 16px; }
.tp-en { font-size: 13px; }
.tp-peek { font-size: 13px; }
.tp-count { font-size: 16px; }
.az-row .body b { font-size: 17px; }
.az-row .body span { font-size: 14px; }
.mode-body b { font-size: 18px; }
.mode-body span { font-size: 14px; }
.mode.big .mode-body b { font-size: 22px; }
.me-title b { font-size: 26px; }
.me-title .s { font-size: 14px; }
.legend { font-size: 14px; }
.rank { font-size: 13px; }
.learn .lt { font-size: 15px; }
.how-list li, .how-rule { font-size: 15px; }
.how-note, .card .how-note { font-size: 14px; }
.stats-link .body b { font-size: 17px; }
.stats-link .body span { font-size: 14px; }
.st-tiles span { font-size: 13px; }
.st-tiles b { font-size: 26px; }
.st-read { font-size: 14px; }
.q-card .q { font-size: 28px; }
.q-card.ctx .q { font-size: 21px; }
.q-card .hint { font-size: 16px; }
.opt { font-size: 17px; min-height: 58px; }
.feedback, .feedback b { font-size: 16px; }
.type-input { font-size: 20px; }
.tile { font-size: 15px; }
.tile.en { font-size: 15px; }
.sp-ua { font-size: 21px; }
.sp-rules li { font-size: 15px; }
.result-screen .msg { font-size: 17px; }
.miss a { font-size: 15px; }
.miss a b { font-size: 15px; }
.dev-card .s, .author span { font-size: 14px; }
.author b { font-size: 16px; }
.feat { font-size: 16px; }
.empty { font-size: 16px; }
.tabbar a { font-size: 12px; }
@media (max-width: 360px) {
  .q-card .q { font-size: 25px; }
}

.flash-face { align-items: center; text-align: center; padding-left: 26px; padding-right: 26px; }
.flash-cat { left: 0; right: 0; top: 20px; text-align: center; font-size: 12px; }
.flash .tap { left: 0; right: 0; text-align: center; font-size: 13px; }
.flash .big { font-size: 34px; }
.flash .big.long { font-size: 26px; }
.flash .big.mid { font-size: 27px; }
.flash .big.xl { font-size: 22px; }
.flash .small { font-size: 16px; }
.flash .flash-ex { position: relative; border-top: none; margin-top: 10px; padding-top: 20px; font-size: 19px; }
.flash .flash-ex.long { font-size: 17px; }
.flash .flash-ex::before { content: ''; position: absolute; left: 50%; top: 0; width: 48px; height: 2px; margin-left: -24px; border-radius: 1px; background: var(--t1, var(--accent)); opacity: .8; }
.flash-front { background: url(../icons/emblem.png) center 16px / 38px no-repeat, #13203D; transform: rotateY(0deg); }
.flash-back { background: url(../icons/emblem.png) center 16px / 38px no-repeat, var(--surface); }
.flash-face { padding-top: 96px; }
.flash-cat { top: 62px; }
.flash-face *, .flash-face::before { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.flash-front { visibility: visible; transition: visibility 0s .22s; }
.flash-back { visibility: hidden; transition: visibility 0s .22s; }
.flash.flipped .flash-front { visibility: hidden; }
.flash.flipped .flash-back { visibility: visible; }

.db-emb, .db-cap, .deck-back::before { transition: opacity .15s ease; }
.deck.flipping .db-emb, .deck.flipping .db-cap, .deck.flipping .deck-back::before { opacity: 0; }

:root { --font-mono: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.tod-en { font-weight: 700; letter-spacing: -.4px; }
.term-head .abbr { font-weight: 700; letter-spacing: -.6px; }
.flash-front .big { font-weight: 700; letter-spacing: -.4px; }
.row .en, .result .en, .recent b, .miss a b, .rel a, .tile.en, .tp-peek { font-weight: 700; }
.type-input, .typed { font-weight: 600; }
.letters .chip, .letter-h, .tp-no, .az-mark { font-weight: 700; }
.counter, .dl-no, .tp-no, .tp-count, .ab-d, .mt-miss, .mode-meta { font-variant-numeric: tabular-nums; }

.row .en, .row .sub { font-size: 16px; line-height: 1.4; }
.result .en, .result .ua { font-size: 17px; line-height: 1.4; }
.recent b, .recent span, .miss a b, .miss a span { font-size: 15px; }
.tod-en, .tu-text { font-size: 24px; line-height: 1.25; letter-spacing: -.2px; }
.tod-en { font-weight: 700; }
.tu-text { font-weight: 700; }
.term-head .abbr, .card .ua-big, .card .senses li:first-child { font-size: 28px; line-height: 1.2; letter-spacing: -.3px; }
.term-head .abbr.long { font-size: 24px; }
.term-head .abbr.xlong { font-size: 21px; }
.card .senses li { font-size: 19px; }
.flash .big { font-size: 32px; }
.flash .big.long, .flash .big.mid { font-size: 26px; }
.flash .big.xl { font-size: 22px; }
.flash-front .big, .flash-back .big { font-weight: 700; letter-spacing: -.3px; }
.tile, .tile.en { font-size: 15px; font-weight: 600; }
.sp-card .q, .sp-ua { font-size: 24px; line-height: 1.3; }
.sp-ua { font-weight: 600; }
.feedback .mono { font-size: inherit; }
.flash-front, .flash-back { padding-bottom: 50px; }
.flash-back { background: url(../icons/emblem.png) center 16px / 38px no-repeat, #13203D; border-color: var(--tb); }
.flash-back .flash-cat { color: var(--tc); }

.daily {
  display: flex; flex-direction: column; gap: 16px;
  padding: 18px; border-radius: 26px; text-decoration: none; color: #fff;
  --grad: linear-gradient(120deg, #FF9A4D, #F2471D, #E8264F, #FF6A2D, #FF9A4D); background: #F2471D;
  box-shadow: 0 16px 40px rgba(242, 80, 40, .38);
  position: relative; overflow: hidden; isolation: isolate;
}
.daily::before {
  content: ''; position: absolute; z-index: -1; left: 0; top: 0; width: 300%; height: 100%; pointer-events: none;
  background: var(--grad) 0 50% / 100% 300%; animation: shimmer 10s ease infinite;
}
.daily::after { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.26), transparent 70%); }
.daily.done { --grad: linear-gradient(120deg, #2BD98A, #0E9F6E, #0B7F8C, #1FC48D, #2BD98A); background: #0E9F6E; box-shadow: 0 16px 40px rgba(20, 180, 120, .32); }
@keyframes shimmer { 50% { transform: translateX(-66.6667%); } }
.daily-top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.fire { width: 68px; height: 76px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 20px; background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.fire svg { width: 26px; height: 26px; fill: rgba(255,255,255,.55); stroke: none; }
.fire b { font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; color: #fff; font-variant-numeric: tabular-nums; }
.fire b.len3 { font-size: 20px; }
.fire b.len4 { font-size: 16px; }
.fire b.len5 { font-size: 13px; }
.fire small { font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; opacity: .85; }
.fire.lit svg { fill: var(--yellow); filter: drop-shadow(0 0 8px rgba(255, 220, 90, .8)); animation: flicker 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.06, .96) rotate(-2deg); } 60% { transform: scale(.97, 1.05) rotate(2deg); } }
.daily-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.daily-txt .k { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; opacity: .9; }
.daily-txt .t { font-family: var(--font-card); font-weight: 800; font-size: 20px;  line-height: 1.15; }
.daily-txt .s { font-size: 13px; opacity: .92; }
.daily .go { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.daily.done .go { color: #0E9F6E; }
.week { display: flex; justify-content: space-between; position: relative; z-index: 1; }
.wd { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; opacity: .85; }
.wd i { width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.16); display: flex; align-items: center; justify-content: center; }
.wd i b { font-family: var(--font-card); font-weight: 800; font-size: 12px;  color: rgba(255,255,255,.85); }
.wd.today { opacity: 1; font-weight: 800; font-size: 10.5px; }
.wd.today:not(.on) i { position: relative; background: rgba(255,255,255,.18); border: 2px solid #fff; }
.wd.today:not(.on) i::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); pointer-events: none; animation: pulse 1.8s ease-in-out infinite; }
.wd.on i { background: #fff; }
.wd.on i svg { width: 18px; height: 18px; fill: var(--accent); stroke: none; }
.daily.done .wd.on i svg { fill: #0E9F6E; }
.wd.rk i { background: rgba(255, 220, 90, .3); border: 2px solid var(--yellow); }
.wd.rk i svg { width: 16px; height: 16px; fill: var(--yellow); stroke: none; }
.wd.today.rk:not(.on) i { border-color: var(--yellow); }
@keyframes pulse { 50% { transform: scale(1.4); opacity: 0; } }
.next-rank { display: flex; flex-direction: column; gap: 7px; position: relative; z-index: 1; }
.nr-bar { height: 6px; border-radius: 3px; background: rgba(0,0,0,.2); overflow: hidden; }
.nr-bar span { display: block; height: 100%; border-radius: 3px; background: #fff; }
.nr-txt { font-size: 12px; font-weight: 700; opacity: .95; position: relative; z-index: 1; }

:root {
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-base: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px; --fs-3xl: 32px;
}
body { font-size: var(--fs-base); line-height: 1.5; font-feature-settings: 'kern' 1; text-rendering: optimizeLegibility; }

.card .ex-en, .tod-ex, .tp-en, .feedback .fb-ex, .flash .flash-ex { font-style: normal; }
.wd i, .wd i b, .checks i, .legend i, .hm-cell, .em, .res-gain i { font-style: normal; }

.hero h1 { font-family: var(--font-display); font-size: min(var(--fs-2xl), 7.6vw); font-weight: 700; line-height: 1.15; letter-spacing: -.4px; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.brand-name { font-family: var(--font-display); letter-spacing: -.2px; }
.section-head h2 { font-family: var(--font); font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.1px; }

.label, .mode-title, .dev-card .k, .me-title .k, .daily-txt .k, .flash-cat, .tod-head .label, .q-card .label {
  font-family: var(--font); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .8px; text-transform: uppercase; line-height: 1.3;
}
.daily-txt .k { opacity: .9; }

.meta, .crumb, .brand-sub, .hero .lead, .tp-en, .tp-count small, .st-tiles span, .st-read, .legend, .src-note, .how-note, .card .how-note, .cel-next, .hm-title small, .az-row .body span, .stats-link .body span, .mode-body span, .author span, .dev-card .s {
  font-family: var(--font); font-weight: 500; letter-spacing: 0;
}
.hero .lead { font-size: var(--fs-base); line-height: 1.45; }
.meta, .crumb, .st-read, .legend { font-size: var(--fs-md); }
.brand-sub, .tp-en, .src-note, .cel-next, .hm-title small { font-size: var(--fs-sm); }

.card p, .feat, .cel-card p, .how-list li, .how-rule, .empty { font-weight: 400; line-height: 1.55; }
.card p, .feat { font-size: var(--fs-base); }

.row .en, .row .title, .tp-title, .az-row .body b, .stats-link .body b, .author b, .mode-body b, .result .en, .recent b, .miss a b, .learn .lt {
  font-family: var(--font); font-weight: 700; letter-spacing: -.1px;
}
.row .sub, .result .ua, .recent span, .miss a span { font-weight: 400; }

.daily-txt .t, .me-title b, .cel-card h2, .q-card .q, .mode.big .mode-body b, .tod-en, .term-head .abbr, .flash .big, .tu-text, .card .ua-big, .card .senses li:first-child {
  font-family: var(--font); font-weight: 800; letter-spacing: -.3px;
}
.daily-txt .t { font-size: var(--fs-xl); line-height: 1.15; }
.q-card .q { line-height: 1.2; }
.st-tiles b, .st-due b, .ct-count, .tp-count, .counter, .hm-title b, .badge b {
  font-family: var(--font); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px;
}
.result-screen .score { font-family: var(--font-display); font-weight: 700; letter-spacing: -2px; font-variant-numeric: tabular-nums; }

.btn { font-family: var(--font); font-size: var(--fs-base); font-weight: 700; letter-spacing: 0; }
.chip, .pill, .tod-more, .link-sm, .section-head a, .how summary { font-family: var(--font); font-weight: 600; }
.chip { font-size: var(--fs-md); }
.tabbar a { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1px; }
.opt { font-weight: 500; line-height: 1.35; }
.opt .key, .tp-no, .ab-d, .mt-miss, .mode-meta, .dl-no { font-family: var(--font); font-weight: 700; font-variant-numeric: tabular-nums; }

.wd { font-size: var(--fs-xs); font-weight: 600; }
.wd.today { font-size: var(--fs-xs); font-weight: 800; }
.wd i b { font-family: var(--font); font-size: var(--fs-sm); font-weight: 800; font-variant-numeric: tabular-nums; }
.daily-txt .s { font-size: var(--fs-md); font-weight: 500; }
.nr-txt { font-size: var(--fs-sm); font-weight: 600; }

.card .ex-en { color: var(--text); font-weight: 500; }
.tod-ex { font-size: var(--fs-base); font-weight: 400; color: var(--text-2); }
.flash .flash-ex { font-weight: 400; color: var(--text-2); }
.feedback .fb-ex { color: var(--text-2); }
.brand-sub { font-size: var(--fs-xs); }
.hero h1, .section-head h2, .daily-txt .t, .nr-txt, .tp-title, .q-card .q, .flash .big, .term-head .abbr, .card .ua-big, .cel-card h2, .empty b, .empty-box b { text-wrap: balance; }
.card p, .hero .lead, .tod-ex, .flash .flash-ex, .mode-body span, .how-list li, .empty, .empty-box span:last-child { text-wrap: pretty; }

.tp-no { position: relative; width: 46px; height: 46px; border: none; border-radius: 50%; background: none; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.tp-no > svg { position: absolute; inset: 0; width: 46px; height: 46px; transform: rotate(-90deg); }
.tp-no > svg circle { fill: none; stroke-width: 3; }
.tn-t { stroke: var(--line-2); }
.tn-v { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--p, 0)); }
.tp-no[style*="--p:0"] .tn-v { display: none; }
.tp-no b { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; color: var(--accent-2); font-variant-numeric: tabular-nums; letter-spacing: -.3px; transition: background .2s, color .2s; }
.topic:active .tp-no b { background: var(--accent-fill); color: #fff; border: none; }
@media (hover: hover) { .topic:hover .tp-no b { background: var(--accent-fill); color: #fff; } .topic:hover .tp-no { border: none; } }
.topic:active .tp-no { background: none; }


.pogon { display: inline-flex; width: 40px; height: 66px; flex-shrink: 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.pogon svg { width: 100%; height: 100%; fill: none; stroke: none; overflow: visible; }
.pg-f { fill: #0E0F5A; stroke: rgba(255,255,255,.16); stroke-width: .8; }
.pg-gen { stroke: #A7B3D8; stroke-width: 1.6; }
.pg-g { fill: #D6B25A; }
.pg-l { fill: #F4DE98; opacity: .85; }
.pg-d { fill: #8E6C27; opacity: .7; }
.pg-tw { stroke: #7A5A1E; stroke-width: 3.4; stroke-dasharray: .5 .8; stroke-linecap: butt; }
.pg-wr { fill: none; stroke: #8E6C27; stroke-width: 1.1; stroke-dasharray: 1.1 .7; }
.pg-bl { fill: #2E6CC4; }
.pg-tz { fill: none; stroke: #F1D48A; stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; }
.pg-k { font: 400 19px Georgia, 'Times New Roman', serif; }
.pogon.locked { filter: none; }
.pogon.locked .pg-f { fill: rgba(255,255,255,.035); stroke: rgba(255,255,255,.16); }
.pogon.locked .pg-gen { stroke: rgba(255,255,255,.22); }
.pogon.locked .pg-g { fill: rgba(255,255,255,.2); }
.pogon.locked .pg-l, .pogon.locked .pg-d { opacity: 0; }
.pogon.locked .pg-tw { stroke: rgba(255,255,255,.12); }
.pogon.locked .pg-wr { stroke: rgba(255,255,255,.12); }
.pogon.locked .pg-bl { fill: rgba(255,255,255,.08); }
.pogon.locked .pg-tz { stroke: rgba(255,255,255,.3); }
.pogon.big { width: 52px; height: 86px; }
.cel-card .pogon.big { width: 66px; height: 108px; animation: pgin .6s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes pgin { from { transform: translateY(-20px) scale(.6) rotate(-12deg); opacity: 0; } }

.ranks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; padding: 16px 8px; }
.rank { position: relative; gap: 6px; padding: 10px 2px 8px; border-radius: 12px; transition: background .2s; }
.rank .rk-t { max-width: 100%; font-size: 12.5px; font-weight: 700; line-height: 1.2; color: var(--text-2); -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
.rank .rk-d { font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank:not(.got) .rk-t { color: var(--muted); }
.rank.cur { background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(255, 141, 77, .45); }
.rank.cur .rk-t { color: var(--text); }
.rank.cur .rk-d { color: #fff; background: var(--accent-fill); padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.rank.cur .pogon { animation: pgfloat 3s ease-in-out infinite; }
@keyframes pgfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.rank.nx { box-shadow: inset 0 0 0 1px var(--line-2); }
.rank.nx .rk-d { color: var(--accent-2); }

body { overflow-x: clip; }
#app {
  min-height: 100vh; min-height: 100dvh;
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
  transition: transform .22s cubic-bezier(.2, .8, .3, 1), opacity .22s ease;
}
#app.swiping { transition: none; will-change: transform, opacity; }
#app.swipe-out { transform: translateX(100%) !important; opacity: 0 !important; }

a, button { -webkit-touch-callout: none; }

body::after {
  content: ''; position: fixed; left: 0; right: 0; top: 0; z-index: 45; pointer-events: none;
  height: env(safe-area-inset-top);
  background: rgba(10, 17, 34, .96);
  opacity: 0; transition: opacity .2s ease;
}
html.scrolled body::after { opacity: 1; }

.tabbar { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); transition: transform .2s ease; }
@media (hover: none) { body.kb .tabbar { transform: translateY(110%); } }

.icon-btn { width: 44px; height: 44px; }
.hm-nav .icon-btn { width: 44px; height: 44px; border-radius: var(--r-sm); }
.pill { height: 42px; }
.tod-more { padding: 9px 12px; }
.searchbox .clear { width: 38px; height: 38px; border-radius: 10px; }
.install-card .x { width: 40px; height: 40px; border-radius: 10px; }
.section-head a, .section-head .link-sm { padding: 10px 0 10px 12px; margin: -10px 0; }
.chip { min-height: 40px; }
.letters .chip { min-width: 42px; }

.gbar {
  position: sticky; top: env(safe-area-inset-top); z-index: 5;
  display: flex; flex-direction: column; gap: 10px;
  padding: 6px var(--gutter) 10px; background: var(--bg);
  transition: box-shadow .2s ease;
}
html.scrolled .gbar { box-shadow: 0 1px 0 var(--line), 0 10px 18px -10px rgba(0, 0, 0, .6); }
.gbar .chip.active { background: var(--tc, var(--accent)); border-color: var(--tc, var(--accent)); color: var(--bg); }
.gbar + .section { padding-top: 4px; }
.letter-h { top: calc(var(--gbar, 0px) + env(safe-area-inset-top)); }

.trainer > [data-action="next"] {
  position: sticky; z-index: 3; bottom: calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55);
}
.flash-inner { min-height: clamp(320px, calc(100dvh - 280px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 480px); }
.sp-card { min-height: clamp(200px, calc(100dvh - 400px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 380px); justify-content: center; }
.match { grid-auto-rows: minmax(clamp(66px, calc((100dvh - 330px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) / 5), 92px), auto); }
.row-btns .btn { min-height: 54px; }

@media (orientation: landscape) and (max-height: 500px) {
  .flash-inner { min-height: 240px; }
  .sp-card { min-height: 0; }
  .match { grid-auto-rows: minmax(56px, auto); }
}

:root { --font-num: 'Unbounded', 'Onest', system-ui, sans-serif; }
  font-family: var(--font-num); font-weight: 700; font-variant-numeric: proportional-nums lining-nums; letter-spacing: -.04em;
}
.tp-count, .rk-d, .hm-cell, .ab-d, .wd i b, .mode-meta, .tp-no b, .opt .key, .legend, .meta, .crumb, .hm-title, .badge b, .cel-days {
  font-variant-numeric: proportional-nums lining-nums;
}
.rank .rk-d, .hm .hm-cell, .counter, .card-tally, .mt-miss, .rounds b { font-variant-numeric: proportional-nums lining-nums; }
.counter { min-width: 48px; }

.st-tiles b { font-size: 24px; line-height: 1.1; }
.st-due b { font-size: 19px; line-height: 1.15; }
.result-screen .score { letter-spacing: -.05em; }
.sp-score b { font-size: 17px; }
@media (max-width: 360px) { .st-tiles b { font-size: 21px; } }

.wd i { width: 40px; height: 40px; }
.wd i b { font-size: 14px; letter-spacing: -.02em; line-height: 1; }
.wd i b.len3 { font-size: 12.5px; letter-spacing: -.04em; }
.wd i b.len4 { font-size: 10.5px; letter-spacing: -.05em; }
@media (max-width: 360px) { .wd i { width: 34px; height: 34px; } .wd i b.len3 { font-size: 11px; } }

.wd i b { text-box: trim-both cap alphabetic; }

.tp-count { min-width: 48px; text-align: right; line-height: 1.15; }
.tp-count small { margin-top: 2px; }

.nr-txt { text-wrap: pretty; }

.miss a { flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 14px; }
.miss a b { white-space: normal; }
.miss a span { text-align: left; line-height: 1.4; }

.tabbar { view-transition-name: tabbar; }
::view-transition-old(tabbar) { display: none; }
::view-transition-new(tabbar) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: .42s; animation-timing-function: cubic-bezier(.32, .72, 0, 1); animation-fill-mode: both;
}
html[data-nav="forward"]::view-transition-new(root) { animation-name: vt-push-in; box-shadow: -10px 0 30px rgba(0, 0, 0, .45); }
html[data-nav="forward"]::view-transition-old(root) { animation-name: vt-push-out; }
html[data-nav="back"]::view-transition-new(root) { animation-name: vt-pop-in; }
html[data-nav="back"]::view-transition-old(root) { animation-name: vt-pop-out; z-index: 1; box-shadow: -10px 0 30px rgba(0, 0, 0, .45); }
html[data-nav="tab"]::view-transition-old(root) { animation: vt-fade-out .16s ease both; }
html[data-nav="tab"]::view-transition-new(root) { animation: vt-fade-in .22s ease both; }
@keyframes vt-push-in { from { transform: translateX(100%); } }
@keyframes vt-push-out { to { transform: translateX(-30%); filter: brightness(.7); } }
@keyframes vt-pop-in { from { transform: translateX(-30%); filter: brightness(.7); } }
@keyframes vt-pop-out { to { transform: translateX(100%); } }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(6px); } }
html.vt #app.enter > * { animation: none; }
html.vt #app.enter .section > * { animation: none; }

:root { --gold: #E8C468; --gold-2: #F4DE98; --rank-bg: linear-gradient(135deg, #18226A 0%, #10173F 55%, #121A33 100%); }

.pg-glint { animation: glint 5s ease-in-out infinite; }
@keyframes glint { 0%, 58% { transform: skewX(-18deg) translateX(0); } 82%, 100% { transform: skewX(-18deg) translateX(72px); } }

.rank-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 6px;
  padding: 14px 14px 14px 12px; border-radius: 20px; border: 1px solid rgba(242, 193, 78, .28);
  background: radial-gradient(120% 140% at 0% 0%, rgba(46, 108, 196, .38), transparent 60%), var(--rank-bg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .12s ease;
}
.rank-hero:active { transform: scale(.985); }
.rank-hero::after { content: ''; position: absolute; right: -40px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 193, 78, .16), transparent 70%); pointer-events: none; }
.rh-pg { display: flex; flex-shrink: 0; }
.rh-pg .pogon.big { width: 56px; height: 92px; }
.rh-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; position: relative; z-index: 1; }
.rh-body .k { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--gold); }
.rh-body > b { font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -.3px; text-wrap: balance; }
.rh-bar { height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.rh-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); box-shadow: 0 0 10px rgba(242, 193, 78, .6); }
.rh-next { font-size: 13px; line-height: 1.35; color: var(--text-2); }
.rh-next b { color: var(--gold-2); font-weight: 700; }
.rh-nx { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; position: relative; z-index: 1; }
.rh-nx .pogon { width: 26px; height: 43px; }
.rh-nx small { font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }

.rank { border: none; background: none; font: inherit; color: inherit; cursor: pointer; -webkit-user-select: none; user-select: none; transition: transform .12s ease, background .2s; }
.rank:active { transform: scale(.94); }
.rk-ok { position: absolute; top: 6px; right: calc(50% - 30px); width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ok); color: #fff; box-shadow: 0 0 0 2px var(--surface); z-index: 1; }
.rk-ok svg { width: 10px; height: 10px; stroke-width: 3.6; }

.sheet-wrap { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center; background: rgba(4, 9, 22, .7); animation: fade .25s ease; }
.sheet-wrap.out { animation: sheetfade .26s ease forwards; }
@keyframes sheetfade { to { opacity: 0; } }
.sheet {
  width: 100%; max-width: var(--maxw); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0; border: 1px solid var(--line-2); border-bottom: none;
  background: radial-gradient(120% 60% at 50% 0%, rgba(46, 108, 196, .22), transparent 70%), var(--surface);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .5);
  animation: sheetin .44s cubic-bezier(.32, .72, 0, 1); transition: transform .3s cubic-bezier(.32, .72, 0, 1);
}
.sheet.drag { transition: none; will-change: transform; }
.sheet-wrap.out .sheet { transform: translateY(100%) !important; transition: transform .26s ease-in; }
@keyframes sheetin { from { transform: translateY(100%); } }
.sheet-grip { display: block; width: 40px; height: 5px; margin: 0 auto 6px; border-radius: 3px; background: rgba(255, 255, 255, .22); }
.sheet-body { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.sheet-body.swap { animation: swapin .32s cubic-bezier(.2, .8, .3, 1); }
@keyframes swapin { from { opacity: 0; transform: translateY(8px); } }
.sheet-body > .btn { margin-top: 10px; }

.rs-top { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.rs-nav:disabled { opacity: .25; cursor: default; }
.rs-pg { position: relative; display: flex; justify-content: center; padding: 8px 0 4px; }
.rs-pg .pogon.big { position: relative; width: 84px; height: 138px; animation: pgin .55s cubic-bezier(.3, 1.5, .5, 1) both; }
.rs-glow { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%; background: radial-gradient(circle, rgba(242, 193, 78, .3), transparent 62%); opacity: 0; pointer-events: none; }
.rs-pg.got .rs-glow { opacity: 1; animation: glowpulse 3.2s ease-in-out infinite; }
@keyframes glowpulse { 50% { transform: scale(1.12); opacity: .7; } }
.rs-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.rs-chip svg { width: 13px; height: 13px; stroke-width: 3.2; }
.rs-chip.got { background: var(--ok-soft); color: var(--ok-line); }
.rs-chip.cur { background: var(--accent-fill); color: #fff; }
.rs-chip.nx { background: var(--accent-soft); color: var(--accent-2); }
.rs-group { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--gold); opacity: .85; margin-top: 2px; }
.rs-title { margin: 0; font: 800 26px/1.15 var(--font); letter-spacing: -.3px; text-wrap: balance; }
.rs-ins, .rs-text { margin: 0; max-width: 330px; font-size: 15px; line-height: 1.45; color: var(--text-2); text-wrap: pretty; }
.rs-prog { width: 100%; margin-top: 6px; padding: 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.rs-prog-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.rs-prog-top b { color: var(--text); }
.rs-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.rs-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #F2C14E); animation: grow .8s .15s cubic-bezier(.2, .8, .2, 1) both; }
.rs-left { font-size: 14px; line-height: 1.45; color: var(--text-2); }
.rs-left b { color: var(--text); }
.rs-done { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok-line); font-size: 14px; font-weight: 600; text-align: left; }
.rs-done svg { width: 16px; height: 16px; stroke-width: 3; }
.rs-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 12px; }
.rs-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); transition: width .25s ease; }
.rs-dots i.got { background: rgba(242, 193, 78, .6); }
.rs-dots i.on { width: 18px; background: var(--accent-2); }

.next-rank { flex-direction: row; align-items: center; gap: 12px; }
.nr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.nr-txt b { font-weight: 800; }
.nr-pg { display: flex; flex-shrink: 0; position: relative; z-index: 1; }
.nr-pg .pogon { width: 24px; height: 40px; animation: pgfloat 3s ease-in-out infinite; }
.wd.rk i .pogon { width: 15px; height: 25px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.wd.rk i .pogon svg { width: 100%; height: 100%; fill: none; stroke: none; }

.res-rank {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: var(--r);
  border: 1px solid rgba(242, 193, 78, .3); background: var(--rank-bg); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .3); animation: rise .4s .3s ease-out both;
}
.res-rank:active { transform: scale(.985); }
.rr-pg { display: flex; flex-shrink: 0; }
.rr-pg .pogon { width: 34px; height: 56px; }
.rr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rr-body .k, .res-rank .k { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--gold); }
.rr-body b { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.rr-bar { height: 8px; margin-top: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.rr-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); box-shadow: 0 0 12px rgba(242, 193, 78, .6); animation: rrfill 1.1s .75s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rrfill { from { transform: scaleX(var(--s0, 0)); } }
.rr-txt { font-size: 13px; color: var(--text-2); }
.rr-txt em { font-style: normal; font-weight: 800; color: var(--gold-2); }

.cel-card { border-color: rgba(242, 193, 78, .32); background: radial-gradient(120% 70% at 50% 0%, rgba(46, 108, 196, .4), transparent 62%), var(--rank-bg); }
.cel-stage { position: relative; width: 150px; height: 150px; margin: -6px 0 2px; display: flex; align-items: center; justify-content: center; perspective: 600px; }
.cel-rays {
  position: absolute; inset: -24px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(242, 193, 78, .28) 0deg 7deg, transparent 7deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 22%, transparent 68%); mask: radial-gradient(circle, #000 22%, transparent 68%);
  animation: rays 16s linear infinite, raysin .7s .8s ease-out both;
}
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes raysin { from { opacity: 0; } }
.cel-old, .cel-new { position: absolute; display: flex; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.cel-stage .pogon.big { width: 72px; height: 118px; animation: none; }
.cel-old { animation: celout .45s .35s cubic-bezier(.5, 0, .75, 0) both; }
.cel-new { animation: celin .65s .8s cubic-bezier(.25, 1.45, .5, 1) both; }
@keyframes celout { to { transform: rotateY(90deg) scale(.92); } }
@keyframes celin { from { transform: rotateY(-90deg) scale(.92); } }
.cel-k { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); animation: rise .4s 1.1s ease-out both; }
.cel-card h2 { margin: 0; font-size: 26px; letter-spacing: -.3px; animation: rise .4s 1.2s ease-out both; }
.cel-card .cel-days, .cel-card p, .cel-card .cel-next, .cel-card .btn { animation: rise .4s 1.3s ease-out both; }
.rh-nx .pogon, .rr-pg .pogon { opacity: .55; filter: saturate(.7) drop-shadow(0 3px 6px rgba(0,0,0,.35)); }

#qchips { align-items: center; }
.qc-label { flex-shrink: 0; align-self: center; margin-right: 2px; font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.chip.qc { font-weight: 600; color: var(--text); background: var(--surface); border-color: var(--line); }
.chip.qc-x { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 0 10px; color: var(--muted); }
.chip em { font-style: normal; font-weight: 700; opacity: .65; margin-left: 2px; }
.chip.active em { opacity: .9; }
.sr-empty .eb-ic { background: var(--surface-2); color: var(--muted); }

.sr-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(242, 193, 78, .1); border: 1px solid rgba(242, 193, 78, .25); font-size: 14px; line-height: 1.45; color: var(--text-2); }
.sr-note > svg { width: 18px; height: 18px; color: var(--yellow); margin-top: 1px; }
.sr-note b { color: var(--text); }
.sr-note .link-sm { font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.sr-ex { font-size: 13px; line-height: 1.4; color: var(--muted); }
.sr-ex mark { background: rgba(242, 193, 78, .2); }

.best {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 18px;
  background: radial-gradient(120% 100% at 100% 0%, var(--ts, transparent), transparent 70%), var(--ts, var(--surface)); border: 1px solid var(--tb, var(--line-2));
}
.best-k { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--tc, var(--accent-2)); }
.best-en { font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.3px; color: var(--tc, var(--text)); text-decoration: none; word-break: break-word; }
.best-en mark { background: none; color: inherit; }
.best-full { font-size: 14px; font-weight: 500; color: var(--muted); }
.best-ua { font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--text); }
.best-ex { margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; color: var(--text-2); }
.best-act { display: flex; gap: 8px; margin-top: 6px; }
.best .pill { background: rgba(10, 17, 34, .4); border-color: var(--tb, var(--line-2)); }
html.sheet-open, html.sheet-open body { overflow: hidden; }

/* Поверхні браузера в кольорах застосунку. */
html { color-scheme: dark; scrollbar-color: var(--surface-3) var(--bg); }
::selection { background: rgba(238, 106, 31, .38); color: #fff; }
input { caret-color: var(--accent-2); }

/* Прогрес домальовується при появі екрана — видно, що це шкала, а не прикраса. */
.stack .fill { display: flex; flex: 1; min-width: 0; }
.stack .fill, .nr-bar span, .rh-bar i { animation: fillin .7s .12s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes fillin { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
.tn-v { animation: ringin .8s .12s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes ringin { from { stroke-dashoffset: 100; } }

/* Порожні стани: збережені — у кольорі зірочки. */
.eb-fav .eb-ic { background: rgba(242, 193, 78, .14); color: var(--yellow); }
.eb-fav .eb-ic svg { fill: currentColor; stroke: none; }

/* Наведення мишею на комп'ютері: дотик лишається з :active, миша отримує свій відгук. */
@media (hover: hover) {
  .btn, .mode.big, .daily { transition: transform .1s ease, background .12s, border-color .12s, filter .15s; }
  .btn:not(.outline):not(.ghost):not(.no):hover, .mode.big:hover, .daily:hover { filter: brightness(1.08); }
  .btn.outline:hover, .btn.ghost:hover, .icon-btn:hover, .pill:hover, .tod-more:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, .28); }
  .btn.no:hover { background: var(--bad-soft); border-color: var(--bad-line); }
  .hero.tinted .icon-btn:hover, .tod .tod-more:hover, .tod .pill:hover, .best .pill:hover { background: rgba(10, 17, 34, .7); border-color: var(--tc, rgba(255, 255, 255, .28)); }
  .mode:not(.off):not(.big):hover { border-color: color-mix(in srgb, var(--mc) 45%, transparent); }
  .result:hover { border-color: var(--t1); }
  .stats-link:hover, .dev-card:hover { border-color: var(--line-2); background: var(--surface-2); }
  .backup-link.due:hover { border-color: rgba(242, 193, 78, .7); }
  .az-row:hover { border-color: var(--accent); }
  .rel a:hover { border-color: var(--line-2); background: var(--surface-2); }
  .rank:not(.cur):hover { background: rgba(255, 255, 255, .04); }
  .rank-hero:hover, .res-rank:hover { border-color: rgba(242, 193, 78, .55); }
  .searchbox:not(:focus-within):hover { border-color: rgba(255, 255, 255, .24); }
  .link-sm:hover, .section-head a:hover, .how summary:hover { text-decoration: underline; text-underline-offset: 3px; }
  .daily .go { transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
  .daily:hover .go { transform: translateX(3px); }
  .row > svg, .stats-link > svg, .az-row > svg, .dev-top > svg { transition: transform .2s cubic-bezier(.16, 1, .3, 1), color .2s; }
  .row:hover > svg, .stats-link:hover > svg, .az-row:hover > svg, .dev-card:hover .dev-top > svg { transform: translateX(3px); color: var(--text-2); }
}

/* Малий погон на яскравій картці дня: без контуру читався як темний прямокутник. */
.wd.rk .pg-f, .nr-pg .pg-f { stroke: rgba(255, 255, 255, .6); stroke-width: 2.2; }


/* «Моє»: рекорд серії — одне велике число, решта стиха. */
.me-top { gap: 12px; }
.me-streak {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 8px;
  margin-top: 6px; padding: 20px 18px 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
}
.ms-mark { position: absolute; z-index: -1; right: -22px; top: 50%; display: flex; color: var(--accent); opacity: .3; transform: translateY(-50%) rotate(12deg); pointer-events: none; }
.ms-mark svg { width: 150px; height: 150px; fill: none; stroke: currentColor; stroke-width: .45; }
.me-streak.live .ms-mark svg { transform-origin: 50% 90%; animation: flicker 3.2s ease-in-out infinite; }
.ms-v { display: flex; align-items: flex-end; gap: 12px; }
.ms-v b { font-family: var(--font-num); font-size: 76px; font-weight: 700; line-height: .85; letter-spacing: -.055em; color: var(--accent-2); font-variant-numeric: tabular-nums lining-nums; }
.ms-unit { display: flex; flex-direction: column; gap: 2px; padding-bottom: 2px; font-size: 20px; font-weight: 700; line-height: 1.1; color: var(--text); }
.ms-unit small { font-size: 13px; font-weight: 600; color: var(--muted); }
.ms-now { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.me-streak.zero .ms-v b { color: var(--text-2); }
.me-streak.zero .ms-mark { color: var(--muted); opacity: .25; }
@media (max-width: 360px) { .ms-v b { font-size: 62px; } .ms-mark svg { width: 140px; height: 140px; } }

.me-top .rank-hero { margin-top: 0; }

.me-prog { gap: 10px; }
.mp-head { display: flex; justify-content: space-between; align-items: center; }
.mp-pct { font-family: var(--font-num); font-size: 15px; font-weight: 700; color: var(--ok-line); letter-spacing: -.02em; }
.mp-big { font-size: 15px; color: var(--text-2); }
.mp-big b { font-family: var(--font-num); font-size: 24px; font-weight: 700; letter-spacing: -.04em; color: var(--text); margin-right: 2px; }
.me-prog .stack { height: 10px; border-radius: 5px; margin: 2px 0; }

.me-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.me-tools .stats-link { flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px; min-height: 128px; }
.me-tools .stats-link > svg { display: none; }
.me-tools .stats-link .body b { font-size: 16px; }
.me-tools .stats-link .body span { font-size: 13px; line-height: 1.35; }
.me-tools .backup-link .sl-ic { background: var(--surface-3); color: var(--text); }
.me-tools .backup-link.due .sl-ic { background: var(--yellow); color: #241900; }
.mp-pct.none { color: var(--muted); }


/* Статистика за розділами: кожен розділ у своєму кольорі, відсоток — головне число, найслабший підказано окремо. */
.sc { gap: 12px; }
.sc-sum { margin: -4px 0 0; font-size: 14px; color: var(--muted); }
.sc-sum b { color: var(--text); font-weight: 700; font-variant-numeric: lining-nums; }
.sc-focus { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--ts); border: 1px solid var(--tb); }
.sc-focus .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-focus .body span { font-size: 12px; font-weight: 600; color: var(--text-2); }
.sc-focus .body b { font-size: 16px; font-weight: 700; color: var(--tc); }
.sc-focus .pill { flex-shrink: 0; background: rgba(10, 17, 34, .4); border-color: var(--tb); }
.sc-list { display: flex; flex-direction: column; }
.sc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; row-gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.sc-row:first-child { border-top: none; padding-top: 4px; }
.sc-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.25; }
.sc-name::before { content: ''; flex-shrink: 0; width: 8px; height: 8px; border-radius: 2px; background: var(--t1); }
.sc-pct { font-family: var(--font-num); font-size: 17px; font-weight: 700; letter-spacing: -.03em; color: var(--tc); font-variant-numeric: lining-nums; }
.sc-pct small { font-size: 11px; margin-left: 1px; opacity: .8; }
.sc-pct svg { width: 18px; height: 18px; stroke-width: 3; color: var(--ok-line); }
.sc-row .stack { grid-column: 1 / -1; height: 6px; margin: 0; }
.sc-row .s-mastered { background: var(--t1); }
.sc-row .s-learning { background: var(--t1); opacity: .35; }
.sc-sub { grid-column: 1 / -1; font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: lining-nums; }
.sc-row:active { background: rgba(255, 255, 255, .03); }
@media (hover: hover) { .sc-row:hover .sc-name { color: var(--tc); } }

/* Рівні вогню рекорду: ft1 — 1+ день … ft5 — рік і більше. */
.me-streak.ft1 .ms-mark { opacity: .3; }
.me-streak.ft2 .ms-mark { opacity: .45; }
.me-streak.ft2 .ms-mark svg, .me-streak.ft3 .ms-mark svg, .me-streak.ft4 .ms-mark svg, .me-streak.ft5 .ms-mark svg { transform-origin: 50% 90%; animation: flicker 3s ease-in-out infinite; }
.me-streak.ft3 .ms-mark { opacity: .6; }
.me-streak.ft4 .ms-mark svg { fill: rgba(238, 106, 31, .12); }
.me-streak.ft4 { background: radial-gradient(90% 80% at 100% 100%, rgba(238, 106, 31, .16), transparent 70%), var(--surface); border-color: rgba(255, 141, 77, .28); }
.me-streak.ft4 .ms-mark { opacity: .75; filter: drop-shadow(0 0 14px rgba(238, 106, 31, .45)); }
.me-streak.ft5 { background: radial-gradient(90% 80% at 100% 100%, rgba(242, 163, 29, .2), transparent 70%), radial-gradient(70% 60% at 0% 0%, rgba(238, 106, 31, .12), transparent 70%), var(--surface); border-color: rgba(242, 193, 78, .4); }
.me-streak.ft5 .ms-mark { color: var(--yellow); opacity: .85; filter: drop-shadow(0 0 16px rgba(242, 193, 78, .5)); }
.me-streak.ft5 .ms-mark svg { fill: rgba(242, 193, 78, .14); }
.me-streak.ft5 .ms-v b { color: #FFB45C; text-shadow: 0 0 28px rgba(255, 141, 77, .35); }
.ms-v b.landed { animation: landed .45s var(--ease-out); }
@keyframes landed { 40% { transform: scale(1.06); } }
.ms-v b { transform-origin: left bottom; }
.ms-embers { position: absolute; z-index: -1; right: 0; bottom: 0; width: 55%; height: 100%; pointer-events: none; }
.ms-embers i { position: absolute; bottom: -6px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #FFB45C; box-shadow: 0 0 6px 1px rgba(255, 141, 77, .8); opacity: 0; animation: ember var(--t) var(--d) ease-out infinite; }
.ft5 .ms-embers i:nth-child(3n) { background: #FFE08A; }
@keyframes ember {
  0% { opacity: 0; transform: translate(0, 0) scale(1); }
  15% { opacity: .9; }
  100% { opacity: 0; transform: translate(calc((var(--s) - 4px) * 6), -150px) scale(.3); }
}
@media (prefers-reduced-motion: reduce) { .ms-embers { display: none; } }
/* Серію перервано: рекорд лишається, але вогонь холоне — без мерехтіння, сяйва й золота. */
.me-streak.cold { background: var(--surface); border-color: var(--line); }
.me-streak.cold .ms-mark { color: var(--muted); opacity: .22; filter: none; }
.me-streak.cold .ms-mark svg { animation: none; fill: none; }
.me-streak.cold .ms-v b { color: var(--text-2); text-shadow: none; }


/* «Врятувати серію»: погаслий вогник із жаринкою; натискання розпалює його знову. */
.streak-back {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 14px;
  padding: 16px; border-radius: 20px; border: 1px solid rgba(242, 193, 78, .4);
  background: radial-gradient(110% 120% at 0% 100%, rgba(242, 163, 29, .2), transparent 60%), var(--surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3); animation: rise .4s var(--ease-out) both;
  transition: border-color .4s ease, box-shadow .4s ease;
}
.streak-back .sb-top { display: flex; align-items: center; gap: 14px; }
.streak-back .sb-ic { position: relative; flex-shrink: 0; width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: background .4s ease; }
.streak-back .sb-ic svg { width: 28px; height: 28px; fill: #4C5672; stroke: none; transition: fill .45s ease, transform .45s var(--ease-out), filter .45s ease; }
.streak-back .sb-ic i { position: absolute; left: 50%; bottom: 13px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #FFB45C; box-shadow: 0 0 8px 2px rgba(255, 141, 77, .8); animation: smoulder 1.8s ease-in-out infinite; }
@keyframes smoulder { 50% { opacity: .35; transform: scale(.7); } }
.streak-back .body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.streak-back .body b { font-size: 16px; line-height: 1.3; text-wrap: balance; }
.streak-back .body span { font-size: 13px; line-height: 1.4; color: var(--text-2); }
.streak-back .sb-go { min-height: 48px; font-size: 15px; background: linear-gradient(180deg, #FFD36B, #F2A31D); color: #241900; box-shadow: 0 8px 20px rgba(242, 163, 29, .3), inset 0 1px 0 rgba(255, 255, 255, .4); }
.streak-back .sb-go svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.streak-back.relit { border-color: var(--yellow); box-shadow: 0 12px 34px rgba(242, 163, 29, .35); }
.streak-back.relit .sb-ic { background: rgba(238, 106, 31, .22); }
.streak-back.relit .sb-ic svg { fill: #FFB45C; transform: scale(1.2); filter: drop-shadow(0 0 10px rgba(255, 170, 80, .85)); animation: flicker 1s ease-in-out infinite; transform-origin: 50% 90%; }
.streak-back.relit .sb-ic i { animation: none; opacity: 0; transition: opacity .2s; }
.streak-back.relit .sb-go { pointer-events: none; }

/* Відновлений день у календарі: обведення жовтим, без крапки «завдання дня». */
.hm-cell.rs { box-shadow: inset 0 0 0 1.5px var(--yellow); }
