:root {
  --bg-deep: #0b1f3a;
  --primary: #2563eb;
  --primary-glow: #3b82f6;
  --primary-dark: #1e3a8a;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --accent: #10b981;
  --accent-glow: #34d399;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --card: rgba(255, 255, 255, 0.92);
  --card-solid: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --muted: #64748b;
  --border: rgba(148, 163, 184, 0.35);
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: #eef4ff;
  overflow-x: hidden;
  padding-bottom: var(--safe-bottom);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}
body::before {
  width: 420px; height: 420px;
  background: rgba(37, 99, 235, 0.22);
  top: -120px; left: -100px;
  animation: floatA 12s ease-in-out infinite;
}
body::after {
  width: 360px; height: 360px;
  background: rgba(16, 185, 129, 0.18);
  bottom: -80px; right: -60px;
  animation: floatB 14s ease-in-out infinite;
}

@keyframes floatA {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, 20px); }
}
@keyframes floatB {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-24px, -16px); }
}

.ico { width: 22px; height: 22px; display: block; flex-shrink: 0; }
.ico.sm { width: 18px; height: 18px; }
.ico.md { width: 26px; height: 26px; }
.ico.lg { width: 36px; height: 36px; }
.ico.accent { color: var(--gold); }

.app {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px calc(28px + var(--safe-bottom));
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-top: var(--safe-top);
}

.brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
.brand-icon {
  width: 48px; height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, #1d4ed8, #3b82f6 50%, #06b6d4);
  color: white;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
  position: relative;
}
.brand-icon::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.5), transparent);
  z-index: -1;
  opacity: 0.5;
}
.brand strong {
  display: block;
  font-size: 17px;
  line-height: 1.3;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand span { color: var(--muted); font-size: 12px; font-weight: 500; }

.lesson-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  max-width: 50%;
}
.lesson-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.global-progress {
  height: 6px;
  background: rgba(255,255,255,0.7);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.global-progress.hidden { display: none; }
.global-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent-glow), var(--accent));
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 999px;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.screen { display: none; }
.screen.active { display: block; animation: screenIn 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 22px;
  margin-bottom: 16px;
}

.hero {
  text-align: center;
  padding: 32px 22px 28px;
  background: #ffffff;
}
.hero-deco {
  position: absolute;
  top: 20px; left: 20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-soft), transparent 70%);
  pointer-events: none;
}
.hero h1 {
  margin: 12px 0 16px;
  font-size: clamp(24px, 6.5vw, 36px);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hero h1 span {
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  margin: 0;
  font-size: 12px;
  background: var(--primary-soft);
  padding: 6px 14px;
  border-radius: 999px;
}
.lead {
  color: var(--text-soft);
  line-height: 1.9;
  font-size: 15px;
  margin: 0 auto 22px;
  max-width: 480px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 26px;
  display: grid;
  gap: 10px;
  max-width: 340px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: right;
  box-shadow: var(--shadow-soft);
}
.feature-list .ico-wrap {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  flex-shrink: 0;
}

.btn {
  border: none;
  cursor: pointer;
  border-radius: 16px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 40%, #0891b2 100%);
  color: white;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}
.btn.primary:hover { box-shadow: 0 14px 36px rgba(37, 99, 235, 0.5); }
.btn.ghost {
  background: white;
  color: var(--primary-dark);
  border: 2px solid rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-soft);
}
.btn-lg { width: 100%; max-width: 340px; min-height: 54px; font-size: 17px; }
.btn-sm { padding: 10px 16px; font-size: 14px; min-height: 44px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.section-head .ico-wrap {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--gold);
  display: grid; place-items: center;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 10px;
}
.rules-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #f8fafc, #fff);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.rules-list li:hover { transform: translateX(-4px); box-shadow: var(--shadow-soft); }
.rules-list .num {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), var(--primary-glow));
  color: white;
  display: grid; place-items: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.tip-box {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.75;
  direction: ltr;
  text-align: center;
  font-weight: 500;
}
.tip-box strong { color: #b45309; }

.bank-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.preview h3 { margin: 0 0 10px; font-size: 17px; font-weight: 800; }

.math-block {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 18px;
  font-size: clamp(24px, 6.5vw, 32px);
  font-weight: 800;
  text-align: center;
  direction: ltr;
  unicode-bidi: embed;
  margin: 14px 0;
  letter-spacing: 0.03em;
  color: var(--text);
}
.math-block.large {
  font-size: clamp(28px, 7.5vw, 38px);
  padding: 28px 20px;
  background: #f9fafb;
  border: 1px solid #d1d5db;
}

.path-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
}
.path-preview span:not(.arrow) {
  background: white;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
  color: var(--primary-dark);
  box-shadow: var(--shadow-soft);
}
.path-preview .arrow { color: var(--accent); font-weight: 800; font-size: 14px; }

.mobile-path {
  padding: 14px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-path::-webkit-scrollbar { display: none; }
.mobile-path-inner { display: flex; gap: 10px; min-width: min-content; }
.mobile-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 68px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}
.mobile-step .step-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  display: grid; place-items: center;
  color: var(--muted);
  transition: all 0.3s;
}
.mobile-step.done .step-dot {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.mobile-step.current .step-dot {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.2);
  transform: scale(1.08);
}
.mobile-step.pending { opacity: 0.4; }

.desktop-only { display: none; }
.mobile-only { display: flex; }
.quiz-layout { display: flex; flex-direction: column; }

.quiz-panel { padding: 24px 20px; }

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.pill {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}
.pill.final {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.muted { color: var(--muted); font-size: 14px; font-weight: 700; }

.step-icon-wrap {
  width: 64px; height: 64px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--primary-soft), white);
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes iconPop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.step-icon-wrap.final {
  background: linear-gradient(145deg, var(--accent-soft), white);
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}
.step-icon-wrap .ico { width: 32px; height: 32px; }

#question-title {
  margin: 0 0 8px;
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 800;
  line-height: 1.4;
}
.question-hint {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
  font-weight: 500;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.option {
  border: 2px solid var(--border);
  background: white;
  border-radius: 18px;
  padding: 0;
  min-height: 72px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: inherit;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  text-align: right;
}
.option:active:not(.disabled) { transform: scale(0.96); }
.option:hover:not(.disabled) {
  border-color: var(--primary-glow);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}
.option.correct {
  border-color: var(--accent);
  background: linear-gradient(135deg, #ecfdf5, #fff);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.25);
}
.option.wrong {
  border-color: var(--danger);
  background: linear-gradient(135deg, #fef2f2, #fff);
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.option.disabled { pointer-events: none; opacity: 0.85; }

.opt-letter {
  width: 48px;
  min-width: 48px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  background: #f1f5f9;
  color: var(--primary-dark);
  border-left: 1px solid var(--border);
}
.option.correct .opt-letter { background: var(--accent); color: white; }
.option.wrong .opt-letter { background: var(--danger); color: white; }

.opt-value {
  flex: 1;
  display: grid;
  place-items: center;
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 800;
  direction: ltr;
  padding: 16px 12px;
}

.feedback {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  line-height: 1.75;
  font-size: 15px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: fadeUp 0.35s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.feedback .ico-wrap {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.feedback.success {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #6ee7b7;
}
.feedback.success .ico-wrap { background: var(--accent); color: white; }
.feedback.error {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fca5a5;
}
.feedback.error .ico-wrap { background: var(--danger); color: white; }
.hidden { display: none !important; }

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  align-items: stretch;
}
.quiz-actions .btn-lg { flex: 1; min-width: 140px; }

.back-home {
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
}

.sidebar { padding: 22px; }
.sidebar h3 { margin: 0 0 16px; font-size: 16px; font-weight: 800; }
.path-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.path-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: white;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s;
}
.path-item.done {
  background: var(--accent-soft);
  border-color: rgba(16, 185, 129, 0.4);
}
.path-item.current {
  background: var(--primary-soft);
  border-color: rgba(37, 99, 235, 0.4);
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
}
.path-item.pending { opacity: 0.45; }
.path-item .ico { width: 20px; height: 20px; }
.path-item.done .ico { color: var(--accent); }
.path-item.current .ico { color: var(--primary); }

.skill-meter-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}
.skill-meter-head span { color: var(--muted); }
.skill-meter-head strong {
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
}
.meter-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 999px;
}

.result {
  text-align: center;
  padding: 36px 24px;
  background: #ffffff;
}
.trophy-ring {
  width: 100px; height: 100px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #059669);
  display: grid; place-items: center;
  color: white;
  box-shadow: 0 16px 48px rgba(16, 185, 129, 0.45);
  animation: trophyBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes trophyBounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.stars .ico {
  width: 36px; height: 36px;
  color: var(--gold);
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.4));
  animation: starPop 0.5s ease backwards;
}
.stars .ico:nth-child(1) { animation-delay: 0.1s; }
.stars .ico:nth-child(2) { animation-delay: 0.25s; }
.stars .ico:nth-child(3) { animation-delay: 0.4s; }
@keyframes starPop {
  from { transform: scale(0) rotate(-30deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.stars .ico.dim { color: #e2e8f0; filter: none; animation: none; }
.result h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 5.5vw, 28px);
  font-weight: 800;
  color: var(--accent);
}
.result-text {
  color: var(--text-soft);
  line-height: 1.85;
  font-size: 15px;
  margin: 0 0 22px;
  max-width: 400px;
  margin-inline: auto;
}
.card-inner {
  text-align: right;
  margin: 0 0 24px;
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  border: 1px solid var(--border);
}
.result-path-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}
.result-path-item:last-child { border-bottom: none; }
.result-path-item strong { color: var(--primary-dark); }
.result .btn { margin-bottom: 10px; }

.lesson-pick { padding: 22px 20px; }
.pick-title { margin: 0 0 6px; font-size: 18px; font-weight: 800; }
.pick-sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

.lesson-card {
  width: 100%;
  text-align: right;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-soft);
}
.lesson-card:hover {
  border-color: var(--primary-glow);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
}
.lesson-card.featured {
  border-color: #bfdbfe;
  background: #ffffff;
}
.lesson-card h3 { margin: 8px 0 10px; font-size: 17px; font-weight: 800; }
.lesson-card .math-block.sm {
  font-size: 22px;
  padding: 14px;
  margin: 10px 0;
}
.path-preview.compact { margin-top: 10px; }
.bank-tag.secondary {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: none;
}
.lesson-go {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
}

.adapt-box {
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.7;
}
.adapt-box strong { display: block; color: var(--primary-dark); margin-bottom: 4px; font-size: 12px; }
.adapt-box p { margin: 0; color: var(--text-soft); font-weight: 600; }
.mobile-adapt { margin-bottom: 14px; }

.shape-compare h3 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  color: var(--primary-dark);
}
.compare-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.compare-col {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.compare-col.before {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.compare-col.after {
  background: #ecfdf5;
  border: 1px solid #86efac;
}
.compare-label {
  display: block;
  font-weight: 800;
  font-size: 11px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.compare-col.before .compare-label { color: var(--danger); }
.compare-col.after .compare-label { color: var(--accent); }
.compare-arrow {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--primary);
  font-size: 18px;
}

.dev-footer {
  text-align: center;
  padding: 20px 16px 8px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.dev-footer strong {
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 800;
}
.dev-footer.center { padding-top: 0; margin-top: 8px; }
.dev-sub { font-size: 12px; opacity: 0.85; }

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

@media (min-width: 768px) {
  .app { padding: 20px 28px 40px; }
  .desktop-only { display: block; }
  .mobile-only { display: none; }
  .mobile-path { display: none; }
  .quiz-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
  }
  .hero { text-align: right; padding: 36px 32px; }
  .feature-list { margin-inline: 0; max-width: none; }
  .btn-lg { width: auto; min-width: 220px; }
  .lesson-badge { max-width: none; }
}

@media (max-width: 380px) {
  .options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
