.game-pill.selected { background: #2563eb; border-color: #2563eb; color: #ffffff; }

.game-option {
  padding: 1rem 0.5rem; border-radius: 0.875rem; border: 2px solid #d1d5db;
  font-weight: 600; font-size: 1.05rem; color: #1f2937; background: #ffffff;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.dark .game-option { border-color: #4b5563; color: #f3f4f6; background: #1f2937; }
.game-option:not(.locked):hover { border-color: #3b82f6; }
.game-option:not(.locked):active { transform: scale(0.97); }
.game-option.locked { cursor: default; }
.game-option.playing { border-color: #06b6d4; box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.25); }
.game-option.correct { background: #16a34a; border-color: #16a34a; color: #ffffff; }
.game-option.wrong { background: #dc2626; border-color: #dc2626; color: #ffffff; }

.metric-card { background: #f3f4f6; border-radius: 12px; padding: 14px; text-align: center; }
.dark .metric-card { background: #1e2a3a; }
.metric-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; }
.metric-value { font-size: 26px; font-weight: 600; color: #1f2937; }
.dark .metric-value { color: #ffffff; }

.game-prose h2 { font-size: 1.25rem; font-weight: 700; margin: 1.75rem 0 0.75rem; color: inherit; }
.game-prose p { margin-bottom: 1rem; }
.game-prose a { color: #2563eb; }
.dark .game-prose a { color: #60a5fa; }

:root {
  --lg-accent: #2563eb; --lg-accent-hover: #3b82f6; --lg-selected-border: #2563eb; --lg-focus: #2563eb;
  --lg-text: #111827; --lg-muted: #6b7280;
  --lg-pad-bg: #f3f4f6; --lg-pad-border: #d1d5db;
  --lg-level-bg: #ffffff; --lg-level-border: #d1d5db; --lg-dot: #9ca3af; --lg-ring: rgba(37, 99, 235, 0.15);
  --lg-mode-bg: #eff6ff; --lg-mode-border: #2563eb;
  --lg-mode-off-bg: #ffffff; --lg-mode-off-border: #e5e7eb; --lg-mode-off-text: #4b5563; --lg-mode-off-opacity: 1;
  --lg-card-bg: #f9fafb; --lg-card-border: #e5e7eb;
  --lg-amber: #b45309; --lg-heart: #e11d48;
  --lg-track: #e5e7eb; --lg-good: #16a34a;
  --lg-hl-bg: #eaf2ff; --lg-hl-bar: #1a73f0;
  --lg-grad: linear-gradient(90deg, #0a66e8, #0a96b4);
}
.dark {
  --lg-selected-border: #60a5fa; --lg-focus: #60a5fa;
  --lg-text: #f3f4f6; --lg-muted: #9ca3af;
  --lg-pad-bg: #1f2937; --lg-pad-border: #4b5563;
  --lg-level-bg: #1f2937; --lg-level-border: #4b5563; --lg-dot: #6b7280; --lg-ring: rgba(37, 99, 235, 0.2);
  --lg-mode-bg: rgba(59, 130, 246, 0.2); --lg-mode-border: #60a5fa;
  --lg-mode-off-bg: transparent; --lg-mode-off-border: #374151; --lg-mode-off-text: #f3f4f6; --lg-mode-off-opacity: 0.7;
  --lg-card-bg: #1f2937; --lg-card-border: #374151;
  --lg-amber: #f59e0b; --lg-heart: #fb7185;
  --lg-track: #232f3f; --lg-good: #4ade80;
  --lg-hl-bg: rgba(26, 115, 240, 0.16); --lg-hl-bar: #4fd8ea;
}

:is(.lg-setup, .lg-results) :is(button, a):focus-visible { outline: 3px solid var(--lg-focus); outline-offset: 3px; }

.lg-pads { display: flex; justify-content: center; gap: 12px; }
.lg-pad {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  width: 52px; height: 52px; border-radius: 12px;
  border: 2px solid var(--lg-pad-border); background: var(--lg-pad-bg);
}
.lg-pad.lit { background: var(--lg-accent); border-color: var(--lg-accent); box-shadow: 0 0 18px rgba(37, 99, 235, 0.45); }
.lg-pad.lit i {
  display: block; width: 5px; height: 22px; border-radius: 3px; background: #ffffff;
  transform-origin: 50% 100%; animation: lg-eq 0.55s ease-in-out infinite alternate;
}
.lg-pad.lit i:nth-child(2) { animation-delay: 0.12s; }
.lg-pad.lit i:nth-child(3) { animation-delay: 0.24s; }
.lg-pad.lit i:nth-child(4) { animation-delay: 0.06s; }
@keyframes lg-eq { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .lg-pad.lit i { animation: none; } }

.lg-title { margin-top: 22px; font-size: 60px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; text-align: center; }
@media (max-width: 639px) { .lg-title { font-size: 48px; } }

.lg-label {
  margin-bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--lg-muted); text-align: center;
}

.lg-levels { position: relative; display: flex; gap: 12px; max-width: 100%; overflow-x: auto; padding: 8px; scrollbar-width: none; }
.lg-levels::-webkit-scrollbar { display: none; }
.lg-levels > :first-child { margin-left: auto; }
.lg-levels > :last-child { margin-right: auto; }
.lg-level {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  flex: none; width: 76px; height: 84px; border-radius: 16px;
  border: 2px solid var(--lg-level-border); background: var(--lg-level-bg); color: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.lg-level:hover { border-color: var(--lg-accent-hover); }
.lg-level-n { font-size: 30px; font-weight: 800; line-height: 1; }
.lg-dots { display: flex; flex-direction: column; align-items: center; gap: 3px; height: calc(var(--lg-dot-rows, 1) * 5px + (var(--lg-dot-rows, 1) - 1) * 3px); }
.lg-dots span { display: flex; gap: 3px; }
.lg-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--lg-dot); }
.lg-level.selected { background: var(--lg-accent); border-color: var(--lg-selected-border); color: #ffffff; box-shadow: 0 0 0 5px var(--lg-ring); }
.lg-level.selected .lg-dots i { background: #ffffff; }
@media (max-width: 479px) {
  .lg-levels { gap: 8px; }
  .lg-level { width: 60px; height: 70px; }
  .lg-level-n { font-size: 24px; }
}

.lg-modes { display: flex; gap: 12px; width: min(380px, 100%); }
.lg-mode {
  display: flex; align-items: center; justify-content: center; flex: 1 1 0; height: 56px; border-radius: 14px;
  border: 2px solid var(--lg-mode-off-border); background: var(--lg-mode-off-bg); color: var(--lg-mode-off-text);
  opacity: var(--lg-mode-off-opacity); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}
.lg-mode:hover { border-color: var(--lg-accent-hover); }
.lg-mode.selected { background: var(--lg-mode-bg); border-color: var(--lg-mode-border); color: var(--lg-text); opacity: 1; }
.lg-mode svg { width: 26px; height: 26px; }
.lg-heart { color: var(--lg-heart); }

.lg-play {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: min(380px, 100%); height: 68px; border-radius: 16px;
  background: linear-gradient(90deg, #2563eb, #0891b2); color: #ffffff; font-size: 24px; font-weight: 800;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35); transition: box-shadow 0.2s, transform 0.1s;
}
.lg-play:hover:not(:disabled) { box-shadow: 0 14px 36px rgba(37, 99, 235, 0.45); }
.lg-play:active:not(:disabled) { transform: scale(0.98); }
.lg-play:disabled { opacity: 0.5; cursor: not-allowed; }
.lg-play svg { width: 26px; height: 26px; }

.lg-card { width: min(760px, 100%); padding: 20px 24px; border-radius: 16px; border: 1px solid var(--lg-card-border); background: var(--lg-card-bg); }
.lg-card-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lg-muted);
}
.lg-card-head svg { width: 18px; height: 18px; }
.lg-trophy { color: var(--lg-amber); }
.lg-card-head .lg-mode-icon { color: var(--lg-text); }

.lg-table-wrap { margin: 0 -12px; }
.lg-table { width: 100%; min-width: 520px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.lg-table th {
  padding: 6px 0 8px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--lg-muted); border-bottom: 1px solid var(--lg-card-border);
}
.lg-table td { padding: 8px 0; font-size: 16px; }
.lg-table :is(th, td):first-child { padding-left: 12px; }
.lg-table :is(th, td):last-child { padding-right: 12px; }
.lg-table .lg-rank1 { color: var(--lg-amber); font-weight: 800; }
.lg-table .lg-pts { font-weight: 800; }
.lg-table .lg-current td { padding-top: 10px; padding-bottom: 10px; background: var(--lg-hl-bg); }
.lg-table .lg-current td:first-child { border-radius: 10px 0 0 10px; box-shadow: inset 3px 0 0 var(--lg-hl-bar); }
.lg-table .lg-current td:last-child { border-radius: 0 10px 10px 0; }

.lg-results { gap: 30px; padding: 40px 16px 48px; }

.lg-reason {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 10px; border-radius: 9999px;
  border: 1px solid var(--lg-card-border); background: var(--lg-card-bg); font-size: 16px; font-weight: 700; color: var(--lg-muted);
}
.lg-reason svg { width: 22px; height: 22px; }

.lg-score { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lg-points { font-size: 112px; font-weight: 900; letter-spacing: -3px; line-height: 1; font-variant-numeric: tabular-nums; }
@media (max-width: 479px) { .lg-points { font-size: 72px; letter-spacing: -2px; } }
.lg-best, .lg-rankpill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 10px; border-radius: 9999px;
  font-size: 15px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; line-height: 1;
}
.lg-best { background: linear-gradient(90deg, #f5a13a, #ffcb6b); color: #2a1a03; }
.lg-best .lg-trophy { width: 18px; height: 18px; color: #2a1a03; }
.lg-rankpill { padding: 7px 14px; border: 1px solid var(--lg-card-border); background: var(--lg-card-bg); color: var(--lg-text); }

.lg-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: min(760px, 100%); }
@media (max-width: 767px) { .lg-stats { grid-template-columns: 1fr; } }
.lg-stat {
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; border-radius: 18px;
  border: 1px solid var(--lg-card-border); background: var(--lg-card-bg); text-align: center;
}
.lg-stat-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lg-stat-cap { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--lg-muted); }

.lg-lv {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg, #0a66e8, #0a96b4); color: #ffffff; line-height: 1;
}
.lg-lv span { font-size: 10px; font-weight: 800; color: #d6f6fb; }
.lg-lv b { font-size: 30px; font-weight: 900; }
.lg-lvbar { display: flex; gap: 3px; width: 190px; max-width: 100%; height: 6px; }
.lg-lvbar i { flex: 1 1 0; border-radius: 3px; background: var(--lg-track); }
.lg-lvbar i.run { background: #1a7fd0; }
.lg-lvbar i.top { background: #4fd8ea; }

.lg-ring { position: relative; width: 82px; height: 82px; }
.lg-ring svg { width: 82px; height: 82px; transform: rotate(-90deg); }
.lg-ring circle { fill: none; stroke-width: 7; }
.lg-ring-track { stroke: var(--lg-track); }
.lg-ring-fill { stroke: var(--lg-good); stroke-linecap: round; }
.lg-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }

.lg-trials { font-size: 52px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }

.lg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; }
.lg-again, .lg-settings {
  display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 100%; height: 62px; border-radius: 16px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: box-shadow 0.2s, border-color 0.15s, transform 0.1s;
}
.lg-again { width: 300px; background: var(--lg-grad); color: #ffffff; font-size: 19px; font-weight: 800; box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35); }
.lg-again:hover { box-shadow: 0 14px 36px rgba(37, 99, 235, 0.45); }
.lg-settings { width: 220px; border: 2px solid var(--lg-level-border); color: var(--lg-text); font-size: 17px; font-weight: 700; }
.lg-settings:hover { border-color: var(--lg-accent-hover); }
:is(.lg-again, .lg-settings):active { transform: scale(0.98); }
.lg-again svg { width: 24px; height: 24px; }
.lg-settings svg { width: 22px; height: 22px; }

/* ── Leveled game lesson screen ─────────────────────────────────────────── */
.ftn-screen {
  --ftn-bg: radial-gradient(ellipse at 50% 60%, #eef3fb, #ffffff 65%);
  --ftn-text: #111827; --ftn-text2: #374151; --ftn-muted: #6b7280;
  --ftn-pad-bg: #f3f4f6; --ftn-pad-border: #d1d5db;
  --ftn-track: #e5e7eb; --ftn-ring-track: #e5e7eb;
  --ftn-heart-empty: #eef0f3; --ftn-heart-stroke: #d1d5db; --ftn-heart: #e11d48; --ftn-heart-over: #d97706;
  --ftn-ok-bg: #16a34a; --ftn-ok-border: #15803d;
  --ftn-rev-bg: #dcfce7; --ftn-rev-border: #16a34a;
  --ftn-bad-bg: #dc2626; --ftn-bad-border: #b91c1c;
  --ftn-teal: #0891b2; --ftn-amber: #d97706; --ftn-gray: #9ca3af; --ftn-dot: #0a66e8;
  --ftn-veil-up: radial-gradient(circle, rgba(8, 145, 178, 0.25), rgba(255, 255, 255, 0.8) 60%);
  --ftn-veil-down: rgba(255, 255, 255, 0.8); --ftn-down-bg: #f3f4f6; --ftn-down-border: #9ca3af; --ftn-down-text: #4b5563;
  --ftn-over-bg: rgba(255, 255, 255, 0.88); --ftn-crack: #ffffff;
  --ftn-accent: #1a73f0; --ftn-green: #4ade80; --ftn-bar-done: #1a7fd0; --ftn-bar-now: #4fd8ea;
  position: relative; background: var(--ftn-bg); color: var(--ftn-text); font-family: Inter, system-ui, sans-serif;
}
.dark .ftn-screen {
  --ftn-bg: radial-gradient(ellipse at 50% 60%, #142033, #0e1522 65%);
  --ftn-text: #e8edf3; --ftn-text2: #c5cfdb; --ftn-muted: #9aa6b5;
  --ftn-pad-bg: #1b2431; --ftn-pad-border: #364253;
  --ftn-track: #232f3f; --ftn-ring-track: #1f2a39;
  --ftn-heart-empty: #243041; --ftn-heart-stroke: #3a4656; --ftn-heart: #ff5c7a; --ftn-heart-over: #ffb347;
  --ftn-ok-bg: #15803d; --ftn-ok-border: #4ade80;
  --ftn-rev-bg: #123524; --ftn-rev-border: #4ade80;
  --ftn-bad-bg: #b42332; --ftn-bad-border: #ff8a94;
  --ftn-teal: #4fd8ea; --ftn-amber: #f5a13a; --ftn-gray: #5d6a7c; --ftn-dot: #ffffff;
  --ftn-veil-up: radial-gradient(circle, rgba(10, 150, 180, 0.35), rgba(14, 21, 34, 0.75) 60%);
  --ftn-veil-down: rgba(14, 21, 34, 0.7); --ftn-down-bg: #243041; --ftn-down-border: #5d6a7c; --ftn-down-text: #c5cfdb;
  --ftn-over-bg: rgba(14, 21, 34, 0.88); --ftn-crack: #0e1522;
}
.ftn-screen button { -webkit-tap-highlight-color: transparent; }
.ftn-screen button:focus-visible { outline: 3px solid var(--ftn-accent); outline-offset: 3px; }

.ftn-header { display: flex; align-items: center; gap: 20px; height: 64px; padding: 0 28px; }
.ftn-back { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 12px; color: var(--ftn-text); }
.ftn-back svg { width: 26px; height: 26px; }
.ftn-lvbar { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; height: 10px; }
.ftn-lvbar i { flex: 1 1 0; height: 6px; border-radius: 4px; background: var(--ftn-track); transition: height 0.3s, background-color 0.3s, box-shadow 0.3s; }
.ftn-lvbar i.done { background: var(--ftn-bar-done); }
.ftn-lvbar i.now { height: 10px; background: var(--ftn-bar-now); box-shadow: 0 0 12px rgba(79, 216, 234, 0.7); }
.ftn-top { flex: none; font-size: 13px; font-weight: 700; color: var(--ftn-muted); }

.ftn-hud { display: flex; align-items: center; justify-content: space-between; height: 88px; padding: 0 40px; }
.ftn-badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
  width: 72px; height: 72px; border-radius: 20px; background: var(--ftn-pad-bg); border: 2px solid var(--ftn-pad-border); line-height: 1;
}
.ftn-badge span { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--ftn-muted); }
.ftn-badge b { font-size: 30px; font-weight: 900; margin-top: 2px; }
.ftn-points { position: relative; font-size: 44px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.ftn-gain {
  position: absolute; left: 100%; bottom: 100%; margin-left: 6px; font-size: 22px; font-weight: 900; color: var(--ftn-green);
  white-space: nowrap; pointer-events: none; animation: ftn-gain 1.1s ease-out forwards;
}
@keyframes ftn-gain {
  0% { opacity: 0; transform: scale(0.8) translateY(0); }
  18% { opacity: 1; transform: scale(1.15) translateY(0); }
  100% { opacity: 0; transform: scale(1) translateY(-46px); }
}
.ftn-life { display: flex; justify-content: flex-end; flex: none; min-width: 72px; }
.ftn-hearts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 176px; transform-origin: right center; }
.ftn-heart { display: block; width: 26px; height: 26px; }
.ftn-heart svg { display: block; width: 26px; height: 26px; overflow: visible; }
.ftn-heart-empty { fill: var(--ftn-heart-empty); stroke: var(--ftn-heart-stroke); stroke-width: 1.5; }
.ftn-heart-fill { fill: var(--ftn-heart); transition: clip-path 0.45s; }
.ftn-heart.over .ftn-heart-empty { stroke: var(--ftn-heart-over); }
.ftn-heart.over .ftn-heart-fill { fill: var(--ftn-heart-over); }
.ftn-hearts.loss { animation: ftn-loss 0.5s ease-out; }
.ftn-hearts.refill { animation: ftn-refill 0.6s ease-out; }
@keyframes ftn-loss {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 92, 122, 0)); }
  30% { transform: scale(1.25); filter: drop-shadow(0 0 10px rgba(255, 60, 90, 0.9)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 92, 122, 0)); }
}
@keyframes ftn-refill {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 140, 170, 0)); }
  40% { filter: drop-shadow(0 0 12px rgba(255, 140, 170, 0.85)); }
}
.ftn-infinity { width: 36px; height: 36px; color: var(--ftn-accent); }

.ftn-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px; padding: 16px 16px 40px; }
.ftn-target { display: flex; align-items: center; justify-content: center; gap: 20px; }
.ftn-before, .ftn-after { font-size: 30px; font-weight: 700; color: var(--ftn-text2); }
.ftn-before:empty, .ftn-after:empty { display: none; }
.ftn-token { position: relative; width: 124px; height: 124px; }
.ftn-ring { position: absolute; inset: 0; width: 124px; height: 124px; transform: rotate(-90deg); }
.ftn-ring circle { fill: none; }
.ftn-ring-track { stroke: var(--ftn-ring-track); stroke-width: 6; }
.ftn-ring-arc { stroke: var(--ftn-teal); stroke-width: 6; stroke-linecap: round; opacity: 0.3; }
.ftn-ring-dot { fill: var(--ftn-dot); filter: drop-shadow(0 0 4px var(--ftn-dot)) drop-shadow(0 0 8px var(--ftn-dot)); }
.ftn-note {
  position: absolute; top: 14px; left: 14px; display: flex; align-items: center; justify-content: center;
  width: 96px; height: 96px; border-radius: 50%; font-size: 44px; font-weight: 900; line-height: 1; letter-spacing: -1px;
}

.ftn-pads { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; width: 100%; --pad: 164px; }
.ftn-pads[data-n="2"] { --pad: 210px; }
.ftn-pads[data-n="3"] { --pad: 184px; }
.ftn-pads[data-n="4"] { --pad: 164px; }
.ftn-pads[data-n="5"] { --pad: 150px; }
.ftn-pads[data-n="6"] { --pad: 138px; }
.ftn-pads[data-n="7"] { --pad: 126px; }
.ftn-pads[data-n="8"] { --pad: 116px; }
.ftn-pad {
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  width: var(--pad); height: var(--pad); border-radius: 17%;
  background: var(--ftn-pad-bg); border: 2px solid var(--ftn-pad-border); color: #ffffff;
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none;
  transition: background-color 0.12s, border-color 0.12s, box-shadow 0.12s, transform 0.12s, opacity 0.12s;
}
.ftn-key { position: absolute; top: 10px; left: 12px; font-size: 13px; font-weight: 700; color: var(--ftn-muted); transition: color 0.12s; }
.ftn-fill { position: absolute; inset: 0; background: rgba(74, 222, 128, 0.5); transform: scaleY(0); transform-origin: 50% 100%; pointer-events: none; }
.ftn-pad.holding .ftn-fill { transform: scaleY(1); transition: transform 0.5s linear; }
.ftn-eq { display: none; gap: 6px; }
.ftn-eq i { display: block; width: 6px; height: 30px; border-radius: 3px; background: #ffffff; transform-origin: 50% 100%; animation: ftn-eq 0.5s ease-in-out infinite alternate; }
.ftn-eq i:nth-child(2) { animation-delay: 0.1s; }
.ftn-eq i:nth-child(3) { animation-delay: 0.2s; }
.ftn-eq i:nth-child(4) { animation-delay: 0.3s; }
.ftn-eq i:nth-child(5) { animation-delay: 0.4s; }
@keyframes ftn-eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
.ftn-mark { display: none; width: 40%; height: 40%; }
.ftn-mark svg { width: 100%; height: 100%; }
.ftn-pad.sounding {
  background: var(--ftn-accent); border-color: #7ab8ff; transform: scale(1.05);
  box-shadow: 0 0 0 7px rgba(26, 115, 240, 0.22), 0 0 44px rgba(26, 115, 240, 0.6);
}
.ftn-pad.sounding .ftn-key { color: rgba(255, 255, 255, 0.85); }
.ftn-pad.sounding .ftn-eq { display: flex; }
.ftn-pad.correct {
  background: var(--ftn-ok-bg); border-color: var(--ftn-ok-border);
  box-shadow: 0 0 0 7px rgba(74, 222, 128, 0.22), 0 0 44px rgba(74, 222, 128, 0.5); animation: ftn-pop 0.35s ease-out;
}
.ftn-pad.correct .ftn-check { display: block; }
.ftn-pad.wrong { background: var(--ftn-bad-bg); border-color: var(--ftn-bad-border); animation: ftn-shake 0.42s ease-in-out; }
.ftn-pad.wrong .ftn-x { display: block; }
.ftn-pad.revealed {
  background: var(--ftn-rev-bg); border: 3px solid var(--ftn-rev-border); color: var(--ftn-green);
  box-shadow: 0 0 0 7px rgba(74, 222, 128, 0.16); animation: ftn-pop 0.35s ease-out;
}
.ftn-pad.revealed .ftn-check { display: block; }
.ftn-pad:is(.correct, .wrong) .ftn-key { color: rgba(255, 255, 255, 0.85); }
.ftn-pad:is(.correct, .wrong, .revealed) .ftn-eq { display: none; }
.ftn-pad.dim { opacity: 0.3; }
@keyframes ftn-pop { 0% { transform: scale(1); } 45% { transform: scale(1.09); } 100% { transform: scale(1); } }
@keyframes ftn-shake {
  0%, 100% { transform: translateX(0); } 15% { transform: translateX(-9px); } 30% { transform: translateX(9px); }
  45% { transform: translateX(-9px); } 60% { transform: translateX(9px); } 75% { transform: translateX(-5px); } 90% { transform: translateX(5px); }
}

.ftn-hint { display: flex; justify-content: center; gap: 28px; margin-top: -16px; font-size: 15px; font-weight: 600; color: var(--ftn-muted); }
.ftn-hint.hidden { display: none; }
.ftn-hint span { display: inline-flex; align-items: center; gap: 8px; }
.ftn-hint i { display: block; width: 16px; height: 16px; border-radius: 50%; }
.ftn-hint-tap { border: 3px solid var(--ftn-accent); }
.ftn-hint-hold { background: linear-gradient(to top, var(--ftn-green) 50%, transparent 50%); border: 2px solid var(--ftn-green); }

.ftn-veil, .ftn-over { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.ftn-veil { pointer-events: none; animation: ftn-veil 1.25s linear forwards; }
.ftn-veil.up { background: var(--ftn-veil-up); }
.ftn-veil.down { background: var(--ftn-veil-down); }
@keyframes ftn-veil { 0% { opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
.ftn-lvbadge { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; line-height: 1; animation: ftn-lvbadge 1.25s ease-out forwards; }
.ftn-veil.up .ftn-lvbadge {
  width: 200px; height: 200px; background: linear-gradient(135deg, #0a66e8, #0a96b4); border: 4px solid #7fe3f0;
  box-shadow: 0 0 80px rgba(79, 216, 234, 0.6); color: #ffffff;
}
.ftn-veil.up .ftn-lvbadge span { font-size: 16px; font-weight: 800; letter-spacing: 2px; }
.ftn-veil.up .ftn-lvbadge b { font-size: 100px; font-weight: 900; }
.ftn-veil.down .ftn-lvbadge { width: 170px; height: 170px; background: var(--ftn-down-bg); border: 4px solid var(--ftn-down-border); color: var(--ftn-down-text); }
.ftn-veil.down .ftn-lvbadge b { font-size: 84px; font-weight: 900; }
@keyframes ftn-lvbadge {
  0% { opacity: 0; transform: scale(0.3); } 24% { opacity: 1; transform: scale(1.18); } 40% { transform: scale(1); }
  80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); }
}
.ftn-chevrons { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ftn-chevrons svg { width: 56px; height: 28px; animation: ftn-chev 0.8s ease-in-out infinite; }
.ftn-chevrons svg:nth-child(2) { animation-delay: 0.2s; }
.ftn-veil.up .ftn-chevrons { color: #4fd8ea; }
.ftn-veil.down .ftn-chevrons { color: #f5a13a; transform: scaleY(-1); }
@keyframes ftn-chev { 0% { opacity: 0.3; transform: translateY(8px); } 50% { opacity: 1; } 100% { opacity: 0.3; transform: translateY(-8px); } }

.ftn-over { background: var(--ftn-over-bg); }
.ftn-broken { width: 84px; height: 84px; color: var(--ftn-heart); }
.ftn-crack { stroke: var(--ftn-crack); }
.ftn-over-pts { font-size: 64px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ftn-text); }
.ftn-over-btn {
  display: flex; align-items: center; justify-content: center; width: 260px; height: 60px; margin-top: 12px; border-radius: 16px;
  background: var(--lg-grad); color: #ffffff; font-size: 20px; font-weight: 800; box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
}

@media (max-width: 599px) {
  .ftn-header { padding: 0 16px; }
  .ftn-hud { padding: 0 20px; }
  .ftn-points { font-size: 36px; }
  .ftn-pads { gap: 12px 10px; }
  .ftn-pad { width: calc((100% - 30px) / 4); height: auto; aspect-ratio: 1; }
  .ftn-before, .ftn-after { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .ftn-gain { animation: ftn-gain-still 1.1s linear forwards; }
  .ftn-hearts.loss, .ftn-hearts.refill, .ftn-pad.correct, .ftn-pad.wrong, .ftn-pad.revealed, .ftn-chevrons svg, .ftn-eq i { animation: none; }
  .ftn-pad.sounding { transform: none; }
  .ftn-lvbadge { animation: ftn-veil 1.25s linear forwards; }
}
@keyframes ftn-gain-still { 0% { opacity: 1; } 100% { opacity: 0; } }
