/* ==========================================================
   תרגלו+ — design system
   ========================================================== */

:root {
  color-scheme: light;
  --bg: #f4f6fc;
  --bg-glow-1: #e6e8ff;
  --bg-glow-2: #ddf4ee;
  --surface: #ffffff;
  --surface-2: #f7f8fd;
  --surface-3: #eef1fa;
  --text: #161a2e;
  --text-2: #5a6180;
  --text-3: #8b91ab;
  --border: #e4e8f4;
  --border-strong: #d3d9ec;
  --primary: #5b5bd6;
  --primary-2: #7c5cf0;
  --primary-weak: #ececfd;
  --primary-text: #ffffff;
  --mint: #0fae86;
  --mint-weak: #e1f7ef;
  --amber: #d9820a;
  --amber-weak: #fdf1dd;
  --rose: #d93a52;
  --rose-weak: #fde9ec;
  --blue: #3d7bf5;
  --blue-weak: #e8f0fe;
  --heat-1: #dcdcfe;
  --heat-2: #b4b4fb;
  --heat-3: #8b8bf7;
  --heat-4: #5b5bd6;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --shadow-1: 0 1px 2px rgba(22, 26, 46, .05), 0 4px 14px -6px rgba(22, 26, 46, .10);
  --shadow-2: 0 2px 6px rgba(22, 26, 46, .05), 0 18px 36px -18px rgba(22, 26, 46, .22);
  --shadow-3: 0 30px 70px -30px rgba(43, 37, 120, .45);
  --ring: 0 0 0 3px rgba(91, 91, 214, .22);
  --font: "Heebo", "Assistant", "Segoe UI", system-ui, -apple-system, "Arial Hebrew", Arial, sans-serif;
  --font-en: "Inter", "Segoe UI", system-ui, Arial, sans-serif;
  --header-h: 70px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0e16;
  --bg-glow-1: #1a1c3d;
  --bg-glow-2: #0d2b2a;
  --surface: #141827;
  --surface-2: #181d2e;
  --surface-3: #1e2334;
  --text: #eef1fb;
  --text-2: #a4abc6;
  --text-3: #7c839f;
  --border: #242a3d;
  --border-strong: #313952;
  --primary: #8b8bf5;
  --primary-2: #a78bfa;
  --primary-weak: #1e2140;
  --primary-text: #0b0e16;
  --mint: #34d3a8;
  --mint-weak: #122e28;
  --amber: #f0b34a;
  --amber-weak: #2e2413;
  --rose: #f87188;
  --rose-weak: #331a22;
  --blue: #6ea0ff;
  --blue-weak: #141f3a;
  --heat-1: #2a2a5e;
  --heat-2: #3d3d8a;
  --heat-3: #5a5ad0;
  --heat-4: #8b8bf5;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px -8px rgba(0, 0, 0, .5);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .3), 0 24px 48px -24px rgba(0, 0, 0, .7);
  --shadow-3: 0 30px 70px -30px rgba(0, 0, 0, .8);
  --ring: 0 0 0 3px rgba(139, 139, 245, .3);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 8% -12%, var(--bg-glow-1) 0%, transparent 62%),
    radial-gradient(900px 480px at 100% -5%, var(--bg-glow-2) 0%, transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(1.5rem, 3.4vw, 2.05rem); line-height: 1.2; letter-spacing: -.015em; }
h2 { font-size: 1.15rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; }
a { color: var(--primary); text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--primary-weak); color: var(--text); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-text);
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.muted { color: var(--text-2); }
.small { font-size: .86rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

.icon {
  width: 20px; height: 20px; flex: none;
  display: inline-block; vertical-align: middle;
}
svg.icon { overflow: visible; }

/* ---------- header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.app-header.is-stuck { border-bottom-color: var(--border); }

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand-mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(140deg, #6d6bea, #8b5cf6 55%, #4f7cff);
  box-shadow: 0 8px 18px -8px rgba(91, 91, 214, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text small { font-size: .74rem; color: var(--text-3); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 600; font-size: .92rem;
  transition: background .18s, color .18s;
}
.nav-link .icon { width: 18px; height: 18px; opacity: .85; }
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.is-active { background: var(--primary-weak); color: var(--primary); }
.nav-link.is-active .icon { opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.round { border-radius: 999px; }

/* ---------- layout ---------- */
main { padding: 8px 20px 72px; }
.screen {
  max-width: 1120px;
  margin: 0 auto;
  animation: rise .34s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.section { margin-top: 34px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-bottom: 14px;
}
.link-more {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: .88rem; font-weight: 600;
}
.link-more .icon { width: 16px; height: 16px; }

.screen-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding: 18px 0 22px;
}
.screen-head p { margin-top: 6px; font-size: .95rem; }
.screen-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-size: .93rem; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-lg { padding: 14px 24px; font-size: 1rem; border-radius: 15px; }

.btn-primary {
  background: linear-gradient(140deg, #6a68e6, #7c5cf0 60%, #6a6ff0);
  color: #fff;
  box-shadow: 0 12px 24px -14px rgba(91, 91, 214, .95), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn-primary:hover { box-shadow: 0 16px 30px -14px rgba(91, 91, 214, .95); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-soft { background: var(--primary-weak); color: var(--primary); }
.btn-soft:hover { filter: brightness(.97); }
.btn-success { background: var(--mint); color: #fff; box-shadow: 0 12px 22px -14px var(--mint); }
.btn-danger { background: var(--rose); color: #fff; }
.btn-danger-soft { background: var(--rose-weak); color: var(--rose); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  margin-top: 20px;
  padding: 34px 34px;
  border-radius: var(--radius-xl);
  color: #f6f5ff;
  background:
    radial-gradient(600px 300px at 88% 8%, rgba(255, 255, 255, .22), transparent 62%),
    radial-gradient(500px 260px at 4% 100%, rgba(76, 220, 190, .28), transparent 60%),
    linear-gradient(135deg, #4f46d4 0%, #6d54e8 46%, #4a6af0 100%);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .35;
  mask-image: linear-gradient(120deg, #000, transparent 62%);
  pointer-events: none;
}
.hero-main { position: relative; z-index: 1; }
.eyebrow {
  font-size: .82rem; font-weight: 600; letter-spacing: .02em;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 10px;
}
.hero h1 { color: #fff; font-weight: 800; }
.hero-sub { margin-top: 10px; max-width: 46ch; color: rgba(255, 255, 255, .82); font-size: .98rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero .btn-primary {
  background: #fff; color: #3b34b8;
  box-shadow: 0 14px 28px -16px rgba(0, 0, 0, .6);
}
.hero .btn-ghost {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .32);
  color: #fff;
  backdrop-filter: blur(4px);
}
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .2); }

.goal { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; }
.goal-ring { position: relative; width: 132px; height: 132px; }
.goal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track, .ring-value { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring-track { stroke: rgba(255, 255, 255, .22); }
.ring-value {
  stroke: #7dffd4;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .7s cubic-bezier(.2, .8, .3, 1);
  filter: drop-shadow(0 0 8px rgba(125, 255, 212, .55));
}
.goal-ring-label {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center; gap: 2px;
}
.goal-ring-label strong { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.goal-ring-label span { font-size: .76rem; color: rgba(255, 255, 255, .75); }
.goal-caption { font-size: .78rem; color: rgba(255, 255, 255, .7); }

/* ---------- stat cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.stat-card {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.stat-card strong { display: block; font-size: 1.42rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat-card span:last-child { font-size: .78rem; color: var(--text-3); font-weight: 500; }
.stat-icon {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
}
.stat-icon .icon { width: 21px; height: 21px; }
.tone-violet { background: var(--primary-weak); color: var(--primary); }
.tone-amber { background: var(--amber-weak); color: var(--amber); }
.tone-mint { background: var(--mint-weak); color: var(--mint); }
.tone-rose { background: var(--rose-weak); color: var(--rose); }
.tone-blue { background: var(--blue-weak); color: var(--blue); }

/* ---------- game cards ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 12px;
}
.game-grid-lg { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.game-card {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  text-align: start;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.2, .8, .3, 1), box-shadow .2s, border-color .2s;
}
.game-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.game-card:disabled { cursor: not-allowed; transform: none; opacity: .62; }
.game-card::before {
  content: "";
  position: absolute; inset-inline-start: 0; top: 18px; bottom: 18px;
  width: 3px; border-radius: 3px;
  background: var(--accent, var(--primary));
  opacity: 0; transition: opacity .2s;
}
.game-card:hover::before { opacity: 1; }

.game-icon {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--accent-grad, linear-gradient(140deg, #6a68e6, #8b5cf6));
  box-shadow: 0 10px 20px -12px var(--accent, #5b5bd6);
}
.game-icon .icon { width: 23px; height: 23px; }
.game-title { font-size: 1.04rem; font-weight: 700; }
.game-desc { font-size: .85rem; color: var(--text-2); line-height: 1.45; }
.game-meta {
  margin-top: auto; padding-top: 4px;
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600; color: var(--accent, var(--primary));
}
.game-meta.is-off { color: var(--text-3); }

.accent-violet { --accent: #5b5bd6; --accent-grad: linear-gradient(140deg, #6a68e6, #8b5cf6); }
.accent-blue { --accent: #3574e8; --accent-grad: linear-gradient(140deg, #4a8bf5, #3d64e0); }
.accent-teal { --accent: #0f9d8f; --accent-grad: linear-gradient(140deg, #19b8a4, #0d8f92); }
.accent-amber { --accent: #d9820a; --accent-grad: linear-gradient(140deg, #f0a83a, #e07a12); }
.accent-rose { --accent: #d93a52; --accent-grad: linear-gradient(140deg, #f0617a, #d63a63); }
.accent-green { --accent: #12a06b; --accent-grad: linear-gradient(140deg, #22c68a, #0e9a72); }

/* ---------- due list ---------- */
.due-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.due-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.due-item .word-en { font-size: 1rem; font-weight: 700; }
.due-item .word-he { font-size: .84rem; color: var(--text-2); }
.due-item .grow { min-width: 0; flex: 1; }
.due-item .icon-btn { width: 34px; height: 34px; border-radius: 10px; }
.empty-note {
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: .9rem;
  background: var(--surface-2);
}

/* ---------- words screen ---------- */
.panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  margin-bottom: 16px;
}
.panel-title { font-size: 1rem; margin-bottom: 4px; }
.panel-actions { display: flex; gap: 10px; margin-top: 12px; }
.panel-quiet { margin-top: 26px; background: var(--surface-2); box-shadow: none; display: grid; gap: 16px; }
.io-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.io-row strong { font-size: .95rem; }
.io-actions { display: flex; gap: 8px; }

.ai-prompt { margin-top: 4px; }
.ai-prompt summary {
  cursor: pointer;
  color: var(--text-2);
  font-size: .82rem;
  font-weight: 700;
  padding: 4px 0;
}
.ai-prompt pre {
  margin: 8px 0 0;
  padding: 12px 14px;
  max-height: 230px;
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: .78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  direction: rtl;
  text-align: right;
  color: var(--text-2);
}

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.search {
  position: relative;
  flex: 1 1 240px;
  display: flex; align-items: center;
  min-width: 200px;
}
.search .icon {
  position: absolute; inset-inline-start: 13px;
  color: var(--text-3); pointer-events: none;
}
.search input {
  width: 100%;
  padding: 11px 42px 11px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit; font-size: .93rem;
  transition: border-color .18s, box-shadow .18s;
}
.search input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: .84rem; font-weight: 600;
  cursor: pointer;
  transition: .18s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.chip .count { opacity: .7; font-size: .78rem; margin-inline-start: 3px; }

.select, .input, .textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit; font-size: .93rem;
  transition: border-color .18s, box-shadow .18s;
}
.select { width: auto; padding-inline-end: 32px; cursor: pointer; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.select-wrap { display: inline-flex; }

.word-list { display: grid; gap: 8px; }
.word-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: border-color .18s, transform .18s;
}
.word-row:hover { border-color: var(--border-strong); }
.word-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.word-en {
  font-family: var(--font-en);
  font-size: 1.04rem; font-weight: 650;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.word-he {
  font-size: .88rem; color: var(--text-2);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.word-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.word-actions { display: flex; gap: 4px; }
.word-actions .icon-btn { width: 34px; height: 34px; border-radius: 10px; border-color: transparent; background: transparent; }
.word-actions .icon-btn:hover { background: var(--surface-3); }
.word-actions .icon-btn.is-danger:hover { background: var(--rose-weak); color: var(--rose); }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .73rem; font-weight: 700;
}
.pill-new { background: var(--blue-weak); color: var(--blue); }
.pill-learning { background: var(--amber-weak); color: var(--amber); }
.pill-mastered { background: var(--mint-weak); color: var(--mint); }
.pill-none { background: var(--surface-3); color: var(--text-3); }
.due-label { font-size: .74rem; color: var(--text-3); }

.empty {
  display: grid; justify-items: center; gap: 8px;
  text-align: center;
  padding: 54px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.empty-icon { color: var(--primary); }
.empty-icon .icon { width: 34px; height: 34px; }
.empty p { color: var(--text-2); max-width: 40ch; font-size: .92rem; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }

/* ---------- practice screen ---------- */
.practice-bar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  margin-bottom: 18px;
}
.field { display: grid; gap: 7px; }
.field-label { font-size: .82rem; font-weight: 700; color: var(--text-2); }
.field-label em { font-style: normal; font-size: .72rem; font-weight: 600; color: var(--primary); margin-inline-start: 4px; }
.field-label em.em-soft { color: var(--text-3); }

.segmented {
  display: flex;
  padding: 4px;
  gap: 3px;
  border-radius: 13px;
  background: var(--surface-3);
}
.segmented button {
  flex: 1;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font-size: .85rem; font-weight: 600;
  cursor: pointer;
  transition: .18s;
  white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-1);
}

.note {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--blue-weak);
  color: var(--text);
  font-size: .88rem;
  line-height: 1.55;
}
.note .icon { color: var(--blue); flex: none; margin-top: 2px; }

/* ---------- game shell ---------- */
.screen-game { max-width: 760px; }
.game-shell { padding-top: 14px; }

.game-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.game-progress { display: grid; gap: 6px; }
.bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar > span {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width .35s cubic-bezier(.2, .8, .3, 1);
}
.game-counter { font-size: .76rem; color: var(--text-3); font-weight: 600; text-align: center; }
.game-score {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .85rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.score-ok { color: var(--mint); }
.score-bad { color: var(--rose); }
.score-sep { color: var(--text-3); font-weight: 400; }

.game-body { display: grid; gap: 20px; }
.game-title-bar { display: grid; gap: 4px; text-align: center; margin-bottom: 4px; }
.game-title-bar h2 { font-size: 1.1rem; }
.game-title-bar p { font-size: .85rem; color: var(--text-2); }

/* ---------- flashcards ---------- */
.flashcard { perspective: 1600px; cursor: pointer; outline: none; }
.flashcard-inner {
  position: relative;
  min-height: 290px;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.3, .9, .25, 1);
}
.flashcard.is-flipped .flashcard-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 30px 26px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  text-align: center;
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.face-front { background: var(--surface); }
.face-back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, var(--surface), var(--primary-weak));
}
.face-label {
  font-size: .74rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.face-word {
  font-family: var(--font-en);
  font-size: clamp(2rem, 7vw, 2.9rem);
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.face-word-he { font-family: var(--font); font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 700; }
.face-note { color: var(--text-2); font-size: .95rem; max-width: 32ch; }
.face-extra {
  font-size: .85rem; color: var(--text-2);
  padding: 8px 12px; border-radius: 10px; background: var(--surface-3);
  max-width: 46ch; font-style: italic;
}
.face-hint { font-size: .78rem; color: var(--text-3); margin-top: 4px; }
.speak-lg { width: 48px; height: 48px; border-radius: 999px; }

.rate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rate-row .btn { padding: 15px; font-size: .98rem; }
.is-hidden { visibility: hidden; opacity: 0; pointer-events: none; }

/* ---------- quiz / typing ---------- */
.prompt {
  display: grid; justify-items: center; gap: 10px;
  padding: 30px 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  text-align: center;
}
.prompt-label { font-size: .76rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.prompt-word {
  font-size: clamp(1.7rem, 6vw, 2.5rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.prompt-word.is-en { font-family: var(--font-en); }
.prompt-note { font-size: .84rem; color: var(--text-3); }

.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem; font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}
.option:hover:not(:disabled) { border-color: var(--primary); background: var(--surface-2); }
.option:disabled { cursor: default; }
.option .opt-key {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-3);
  font-size: .78rem; font-weight: 700;
}
.option.is-correct { border-color: var(--mint); background: var(--mint-weak); }
.option.is-correct .opt-key { background: var(--mint); color: #fff; }
.option.is-wrong { border-color: var(--rose); background: var(--rose-weak); }
.option.is-wrong .opt-key { background: var(--rose); color: #fff; }
.option.is-dim { opacity: .55; }
.option-text { font-family: var(--font-en); }
.option-text.he { font-family: var(--font); }

.feedback {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-radius: 13px;
  font-size: .92rem; font-weight: 600;
  animation: rise .22s ease both;
}
.feedback .icon { flex: none; }
.feedback.ok { background: var(--mint-weak); color: var(--mint); }
.feedback.bad { background: var(--rose-weak); color: var(--rose); }
.feedback span strong { color: inherit; }

.typing-form { display: grid; gap: 12px; }
.typing-input {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1.12rem;
  font-family: var(--font-en);
  text-align: center;
  transition: border-color .18s, box-shadow .18s;
}
.typing-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.typing-input.is-he { font-family: var(--font); }
.typing-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.typing-actions .btn { flex: 1; }
.hint-row { display: flex; gap: 8px; justify-content: center; }

/* ---------- matching ---------- */
.match-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.match-tile {
  position: relative;
  min-height: 84px;
  display: grid; place-items: center;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: .95rem; font-weight: 650;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: transform .18s, border-color .18s, background .18s, opacity .3s;
  box-shadow: var(--shadow-1);
}
.match-tile.is-en { font-family: var(--font-en); }
.match-tile:hover:not(.is-matched):not(.is-selected) { border-color: var(--primary); transform: translateY(-2px); }
.match-tile.is-selected { border-color: var(--primary); background: var(--primary-weak); color: var(--primary); }
.match-tile.is-matched {
  border-color: var(--mint); background: var(--mint-weak); color: var(--mint);
  cursor: default; opacity: .75;
}
.match-tile.is-wrong { border-color: var(--rose); background: var(--rose-weak); animation: shake .4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.match-status {
  display: flex; justify-content: center; gap: 22px;
  font-size: .85rem; color: var(--text-2); font-weight: 600;
}
.match-status b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- הקראה ---------- */
.read-round {
  font-size: .76rem; color: var(--text-3); font-weight: 700;
  padding: 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  white-space: nowrap;
}
.read-card {
  display: grid; gap: 10px; justify-items: center; align-content: center;
  min-height: 250px; padding: 28px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.read-word {
  font-family: var(--font-en);
  font-size: clamp(1.9rem, 7vw, 2.9rem);
  font-weight: 750; letter-spacing: -.02em; line-height: 1.15;
  overflow-wrap: anywhere;
}
.read-he { font-size: 1.25rem; font-weight: 700; color: var(--text-2); }
.read-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.read-controls .btn { flex: 1 1 0; min-width: 96px; }
.read-hint { font-size: .8rem; color: var(--text-3); text-align: center; }

/* ---------- hangman ---------- */
.hangman-wrap { display: grid; gap: 16px; justify-items: center; }
.gallows { width: 168px; height: 196px; color: var(--text-2); }
.gallows .part { stroke: var(--rose); stroke-width: 3.5; }
.gallows [data-step] { opacity: 0; transition: opacity .3s; }
.gallows [data-step].is-on { opacity: 1; }
.hang-word {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 7px;
  direction: ltr;
}
.hang-letter {
  width: 34px; height: 44px;
  display: grid; place-items: center;
  border-bottom: 2.5px solid var(--border-strong);
  font-family: var(--font-en);
  font-size: 1.35rem; font-weight: 700;
  color: var(--text);
}
.hang-letter.is-space { border-bottom-color: transparent; width: 14px; }
.hang-letter.is-revealed { color: var(--primary); }
.clue {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: .88rem; font-weight: 600;
  color: var(--text-2);
}
.clue b { color: var(--text); font-weight: 700; }
.letters {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  max-width: 460px;
  direction: ltr;
}
.letter-btn {
  padding: 11px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-en);
  font-size: .92rem; font-weight: 700;
  cursor: pointer;
  transition: .16s;
}
.letter-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.letter-btn:disabled { opacity: .35; cursor: default; }
.letter-btn.is-miss { background: var(--rose-weak); border-color: transparent; color: var(--rose); opacity: 1; }
.letter-btn.is-hit { background: var(--mint-weak); border-color: transparent; color: var(--mint); opacity: 1; }
.hang-lives { display: flex; gap: 5px; }
.life { width: 10px; height: 10px; border-radius: 999px; background: var(--surface-3); }
.life.is-lost { background: var(--rose); }

/* ---------- results ---------- */
.results {
  display: grid; justify-items: center; gap: 14px;
  text-align: center;
  padding: 34px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  animation: rise .3s ease both;
}
.results-badge {
  display: grid; place-items: center;
  width: 108px; height: 108px;
  border-radius: 999px;
  font-size: 1.7rem; font-weight: 800;
  font-variant-numeric: tabular-nums;
  border: 5px solid var(--primary-weak);
  color: var(--primary);
}
.results-badge.is-great { border-color: var(--mint-weak); color: var(--mint); }
.results-badge.is-ok { border-color: var(--amber-weak); color: var(--amber); }
.results-badge.is-low { border-color: var(--rose-weak); color: var(--rose); }
.results h2 { font-size: 1.3rem; }
.results-sub { color: var(--text-2); font-size: .94rem; max-width: 40ch; }
.results-stats { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.results-stats div { display: grid; gap: 2px; }
.results-stats strong { font-size: 1.25rem; font-weight: 800; }
.results-stats span { font-size: .78rem; color: var(--text-3); }
.missed {
  width: 100%;
  text-align: start;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.missed h3 { font-size: .88rem; color: var(--text-2); margin-bottom: 8px; }
.missed ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.missed li {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .9rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.missed li:last-child { border-bottom: 0; padding-bottom: 0; }
.missed .en { font-family: var(--font-en); font-weight: 650; }
.missed .he { color: var(--text-2); }
.results-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }

/* ---------- stats ---------- */
.card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  margin-top: 16px;
  display: grid;
  gap: 14px;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.heatmap {
  display: grid;
  grid-template-rows: repeat(7, 15px);
  grid-auto-flow: column;
  grid-auto-columns: 15px;
  gap: 4px;
  direction: ltr;
  overflow-x: auto;
  padding-bottom: 4px;
}
.heat-cell { width: 15px; height: 15px; border-radius: 4px; background: var(--surface-3); }
.heat-cell[data-l="1"] { background: var(--heat-1); }
.heat-cell[data-l="2"] { background: var(--heat-2); }
.heat-cell[data-l="3"] { background: var(--heat-3); }
.heat-cell[data-l="4"] { background: var(--heat-4); }
.heat-legend { display: flex; align-items: center; gap: 5px; justify-content: flex-start; }
.heat-legend i { display: inline-block; }

.mastery { display: grid; gap: 12px; }
.mastery-row { display: grid; gap: 6px; }
.mastery-row .m-head { display: flex; justify-content: space-between; font-size: .86rem; font-weight: 600; }
.mastery-row .m-head span { color: var(--text-2); }
.mastery-track { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.mastery-fill { height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.2, .8, .3, 1); }
.mastery-fill.new { background: var(--blue); }
.mastery-fill.learning { background: var(--amber); }
.mastery-fill.mastered { background: var(--mint); }

.hard-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
}
.hard-row + .hard-row { margin-top: 6px; }
.hard-row .n {
  width: 24px; height: 24px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--rose-weak); color: var(--rose);
  font-size: .76rem; font-weight: 800;
}
.hard-row .grow { flex: 1; min-width: 0; }
.hard-row .stat { font-size: .76rem; color: var(--text-3); font-weight: 600; }

/* ---------- dialogs ---------- */
.dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-3);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.dialog-sm { width: min(400px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(12, 14, 28, .5); backdrop-filter: blur(3px); }
.dialog[open] { animation: pop .24s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.dialog-form { display: grid; }
.dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px 12px;
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
}
.dialog-head h2 { font-size: 1.1rem; }
.dialog-head .icon-btn { width: 34px; height: 34px; border-color: transparent; background: transparent; }
.dialog-body { display: grid; gap: 14px; padding: 4px 20px 18px; }
.dialog-foot {
  display: flex; gap: 10px; justify-content: flex-start;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  position: sticky;
  bottom: 0;
  z-index: 3;
}
.input-with-action { display: flex; gap: 8px; align-items: center; }
.input-with-action .input { flex: 1; }

/* מקשי ניקוד: במקלדת של הטלפון אין דרך להקליד תנועות */
.nikud-row { display: flex; flex-wrap: wrap; gap: 6px; }
.nikud-key {
  min-width: 40px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .18s, color .18s;
}
.nikud-key:hover { border-color: var(--primary); color: var(--primary); }
.nikud-key:active { transform: scale(.96); }
.field-hint { color: var(--text-3); font-size: .76rem; line-height: 1.45; }
.form-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--rose-weak);
  color: var(--rose);
  font-size: .85rem;
  font-weight: 600;
}
.range { width: 100%; accent-color: var(--primary); }
.danger-zone { border-top: 1px solid var(--border); padding-top: 14px; }

/* ---------- sync ---------- */
.sync-box {
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.sync-line { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; }
.sync-dot {
  width: 9px; height: 9px; flex: none;
  border-radius: 999px;
  background: var(--text-3);
  box-shadow: 0 0 0 3px var(--surface-3);
}
.sync-dot[data-state="synced"] { background: var(--mint); box-shadow: 0 0 0 3px var(--mint-weak); }
.sync-dot[data-state="syncing"] { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-weak); animation: pulse 1.1s ease-in-out infinite; }
.sync-dot[data-state="error"],
.sync-dot[data-state="denied"],
.sync-dot[data-state="setup"] { background: var(--rose); box-shadow: 0 0 0 3px var(--rose-weak); }
.sync-dot[data-state="offline"] { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-weak); }
@keyframes pulse { 50% { opacity: .35; } }

.sync-code {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
}
.sync-code-label { font-size: .78rem; color: var(--text-3); font-weight: 600; }
.sync-code code {
  flex: 1;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1rem; font-weight: 700; letter-spacing: .08em;
  color: var(--primary);
  text-align: center;
  user-select: all;
}
.sync-code .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
.sync-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sync-actions .btn { flex: 1 1 auto; padding: 9px 12px; font-size: .84rem; }
.sync-input {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #1b1f33;
  color: #f2f3fb;
  font-size: .9rem; font-weight: 600;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  animation: toast-in .26s cubic-bezier(.2, .8, .3, 1) both;
}
.toast.is-out { animation: toast-out .22s ease forwards; }
.toast .icon { color: #7dffd4; }
.toast.bad .icon { color: #ff9aa9; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px) scale(.97); }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 26px 24px; }
  .goal { justify-self: start; }
  .goal-ring { width: 104px; height: 104px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .practice-bar { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --header-h: 60px; }
  .header-inner { padding: 8px 14px; gap: 10px; }
  .brand-text small { display: none; }
  .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
  main { padding: 4px 14px 108px; }

  .nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 60;
    justify-content: space-around;
    gap: 0;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(16px) saturate(160%);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px -18px rgba(0, 0, 0, .38);
  }
  .nav-link {
    flex-direction: column;
    gap: 3px;
    padding: 6px 10px;
    font-size: .7rem;
    font-weight: 600;
    border-radius: 12px;
  }
  .nav-link .icon { width: 22px; height: 22px; }
  .nav-link.is-active { background: transparent; color: var(--primary); }

  .screen-head { padding-top: 10px; }
  .screen-actions { width: 100%; }
  .screen-actions .btn { flex: 1; }

  .hero { margin-top: 8px; border-radius: var(--radius-lg); padding: 22px 20px; }
  .hero h1 { font-size: 1.45rem; }
  .hero-actions .btn { flex: 1; }

  .word-row { flex-wrap: wrap; gap: 8px; }
  .word-meta { flex-direction: row; align-items: center; gap: 8px; }
  .word-actions { margin-inline-start: auto; }

  .flashcard-inner { min-height: 250px; }
  .face { padding: 22px 18px; }

  .match-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .match-tile { min-height: 74px; font-size: .86rem; }

  .letters { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .rate-row .btn { font-size: .9rem; padding: 14px 8px; }
  .io-row { display: grid; }
  .io-actions .btn { flex: 1; }
  .dialog-foot { position: sticky; bottom: 0; }
}

@media (max-width: 380px) {
  .stat-grid { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
