/* DJZ — playful, kid-friendly styling */

:root {
  --bg: #f6f7ff;
  --ink: #2b2350;
  --muted: #6d6590;
  --card: #ffffff;
  --primary: #ff6b6b;
  --primary-dark: #e25555;
  --gold: #ffb703;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 24px;
  --shadow: 0 10px 30px rgba(43, 35, 80, 0.10);
  --shadow-big: 0 18px 44px rgba(43, 35, 80, 0.16);
  --font: "Fredoka", "Comic Sans MS", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, #ffe8d6 0%, transparent 32%),
    radial-gradient(circle at 88% 4%, #d9f3ff 0%, transparent 30%),
    radial-gradient(circle at 78% 92%, #e8ddff 0%, transparent 34%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.55;
}

button { font-family: inherit; cursor: pointer; }

/* ---------------- Top bar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #ece7ff;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

.logo-emoji { font-size: 1.9rem; animation: bounce 2.4s ease-in-out infinite; }

.logo-text {
  background: linear-gradient(90deg, #ff6b6b, #ff9f43, #ff6b6b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.06em;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.topnav { display: flex; gap: 8px; }

.nav-btn {
  border: 2px solid #e6e1ff;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.nav-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }

/* ---------------- Layout ---------------- */

#app { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; outline: none; }

.section { margin-top: 40px; }

.section-title { font-size: 1.45rem; margin-bottom: 16px; }

.grid { display: grid; gap: 18px; }

.level-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.module-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.badge-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------------- Cards ---------------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  border: 2px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  text-align: left;
}

button.card { display: block; width: 100%; color: inherit; font-size: 1rem; }

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-big); }

/* ---------------- Hero ---------------- */

.hero { text-align: center; padding: 44px 0 10px; }

.hero-badge {
  display: inline-block;
  background: #fff;
  border: 2px dashed #cfc7f5;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-title { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.12; font-weight: 700; }

.grad-text {
  background: linear-gradient(90deg, #7c3aed, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad-text-2 {
  background: linear-gradient(90deg, #ff6b6b, #ff9f43);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub { max-width: 620px; margin: 16px auto 0; color: var(--muted); font-size: 1.12rem; }

.hero-emojis { margin-top: 18px; font-size: 2rem; letter-spacing: 8px; }

/* ---------------- Level cards ---------------- */

.level-card { border-top: 8px solid var(--lvl); display: flex; gap: 16px; align-items: flex-start; }

.level-icon { font-size: 2.6rem; line-height: 1; }

.level-icon.big { font-size: 4rem; }

.level-body h2 { margin: 6px 0 4px; font-size: 1.35rem; }

.level-desc { color: var(--muted); font-size: 0.95rem; margin: 6px 0 12px; }

.level-stats { font-size: 0.9rem; color: var(--muted); margin-top: 8px; font-weight: 600; }

.chip {
  display: inline-block;
  background: color-mix(in srgb, var(--chip) 14%, white);
  color: var(--chip);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
}

.chip.tiny { font-size: 0.72rem; padding: 2px 9px; }

/* ---------------- Progress bar ---------------- */

.progress-track {
  height: 12px;
  background: #ece9ff;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lvl, #22c55e), #ffd166);
  transition: width 0.5s ease;
}

/* ---------------- Steps / parent ---------------- */

.step-card { text-align: center; }

.step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}

.step-emoji { font-size: 2.2rem; }

.step-card h3 { margin: 6px 0 6px; }

.step-card p, .parent-card p { color: var(--muted); }

.parent-intro { margin-bottom: 14px; color: var(--ink) !important; }

.table-wrap { overflow-x: auto; }

.parent-table, .progress-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

.parent-table th, .progress-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f1eeff;
  color: var(--ink);
  border-radius: 10px;
}

.parent-table td, .progress-table td { padding: 10px 12px; border-bottom: 1px solid #eee9ff; }

.parent-sport { font-weight: 600; white-space: nowrap; }

.parent-tip { margin-top: 14px; background: #fff8e1; border-radius: 12px; padding: 12px 14px; color: var(--ink) !important; }

/* ---------------- Level hero / module hero ---------------- */

.level-hero, .module-hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--lvl) 16%, white), white);
  border: 2px solid color-mix(in srgb, var(--lvl) 30%, white);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.level-hero-inner, .module-hero-inner { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }

.level-hero h1, .module-hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 6px 0 2px; }

.module-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---------------- Module cards ---------------- */

.module-card { display: flex; flex-direction: column; gap: 8px; border-top: 8px solid var(--lvl); }

.module-icons { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.module-icons.big { justify-content: flex-start; }

.sport-emoji { font-size: 2.4rem; }

.stem-chip {
  background: #ece9ff;
  color: #5b4fc0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.module-card h3 { font-size: 1.15rem; }

.module-tagline { color: var(--muted); font-size: 0.92rem; flex: 1; }

.module-sport { font-weight: 700; font-size: 0.85rem; color: var(--lvl); }

.module-stars { display: flex; align-items: center; gap: 4px; }

.module-stars.inline { margin-top: 8px; }

.done-tag { margin-left: 8px; font-size: 0.75rem; font-weight: 700; color: var(--green); }

.star { font-size: 1.3rem; }
.star.filled { animation: pop 0.35s ease; }
@keyframes pop { 0% { transform: scale(0.3); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---------------- Tabs ---------------- */

.tabs { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }

.tab {
  border: 2px solid transparent;
  background: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.15s ease;
}

.tab.active { background: var(--lvl, var(--primary)); color: #fff; box-shadow: var(--shadow); }

.tab:hover:not(.active) { border-color: var(--lvl, var(--primary)); color: var(--ink); }

/* ---------------- Buttons ---------------- */

.btn {
  border: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary { background: linear-gradient(90deg, #ff6b6b, #ff9f43); color: #fff; box-shadow: 0 8px 20px rgba(255, 107, 107, 0.35); }

.btn-ghost { background: #fff; border: 2px solid #e6e1ff; color: var(--ink); }

.btn-ghost:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-danger { background: #fff; border: 2px solid var(--red); color: var(--red); margin-top: 20px; }

/* ---------------- Lesson slides ---------------- */

.slide-card { padding: 26px; }

.slide-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); }

.slide-card h2 { font-size: 1.5rem; margin: 8px 0 10px; }

.slide-body { font-size: 1.08rem; color: #3d3560; }

.slide-dots { display: flex; gap: 8px; margin: 18px 0 14px; }

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: none;
  background: #ddd7ff;
  transition: background 0.15s ease, transform 0.15s ease;
}

.dot.active { background: var(--primary); transform: scale(1.3); }

.slide-nav { display: flex; gap: 10px; justify-content: space-between; }

/* ---------------- Lab ---------------- */

.lab-card { margin-top: 18px; border: 2px dashed #cfc7f5; }

.lab-card h3 { margin-bottom: 4px; }

.lab-slider { width: 100%; margin: 14px 0 6px; accent-color: var(--primary); height: 34px; }

.lab-readout { font-size: 2.4rem; font-weight: 700; color: var(--primary); text-align: center; }

.lab-msg { margin-top: 8px; text-align: center; color: #3d3560; font-weight: 600; min-height: 1.6em; }

/* ---------------- Try It ---------------- */

.try-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 16px 0 8px; }

.materials li, .steps li { margin: 8px 0 8px 22px; }

.materials { list-style: "✨ "; }

.steps { list-style: none; counter-reset: none; }

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--lvl, var(--primary));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 8px;
}

.why-box {
  margin-top: 18px;
  background: #e9fbf1;
  border-radius: 14px;
  padding: 14px 16px;
  color: #166534;
}

.try-card .btn { margin-top: 20px; }

/* ---------------- Quiz ---------------- */

.quiz-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.quiz-progress { font-weight: 700; color: var(--muted); }

.quiz-score { font-weight: 700; letter-spacing: 2px; }

.quiz-card h2 { font-size: 1.35rem; margin-bottom: 18px; }

.quiz-options { display: grid; gap: 12px; }

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #f7f5ff;
  border: 2px solid #e6e1ff;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.quiz-option:hover:not(:disabled) { border-color: var(--primary); transform: translateX(4px); }

.opt-letter {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d8d1ff;
  font-weight: 700;
  color: #5b4fc0;
}

.quiz-option.correct { background: #e9fbf1; border-color: var(--green); }

.quiz-option.wrong { background: #fee2e2; border-color: var(--red); }

.quiz-option.dim { opacity: 0.5; }

.quiz-feedback { margin-top: 18px; padding: 14px 16px; border-radius: 16px; }

.quiz-feedback.good { background: #e9fbf1; color: #166534; }

.quiz-feedback.bad { background: #fee2e2; color: #991b1b; }

.feedback-head { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }

.quiz-next { margin-top: 16px; }

/* ---------------- Results ---------------- */

.results-card { text-align: center; padding: 34px 24px; border: 3px solid color-mix(in srgb, var(--lvl) 40%, white); }

.results-stars { font-size: 2.6rem; margin-bottom: 10px; }

.results-card h2 { font-size: 1.5rem; margin-bottom: 8px; }

.level-badge-win {
  margin-top: 12px;
  display: inline-block;
  background: #fff8e1;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  color: #92400e;
}

.results-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------------- Progress ---------------- */

.progress-hero h1 { font-size: 2.2rem; margin-bottom: 16px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }

.stat { text-align: center; }

.stat-num { font-size: 2rem; font-weight: 700; color: var(--primary); }

.stat-suffix { font-size: 1rem; color: var(--muted); }

.stat-label { color: var(--muted); font-weight: 600; }

.badge-card { display: flex; gap: 14px; align-items: center; }

.badge-icon { font-size: 2.4rem; }

.badge-card h3 { font-size: 1.1rem; }

.badge-card p { color: var(--muted); font-size: 0.9rem; }

.row-module { font-weight: 600; }

.row-tries { color: var(--muted); }

/* ---------------- Footer ---------------- */

.footer {
  text-align: center;
  padding: 26px 20px 40px;
  color: var(--muted);
  border-top: 2px solid #ece7ff;
  background: rgba(255, 255, 255, 0.6);
}

.footer-note { font-size: 0.85rem; margin-top: 4px; }

/* ---------------- Responsive ---------------- */

@media (max-width: 640px) {
  .topbar { padding: 10px 14px; }
  .nav-btn { padding: 7px 12px; font-size: 0.85rem; }
  #app { padding: 16px 14px 48px; }
  .hero { padding-top: 26px; }
  .hero-emojis { font-size: 1.5rem; letter-spacing: 5px; }
  .level-hero-inner, .module-hero-inner { flex-direction: column; align-items: flex-start; }
  .slide-nav { flex-direction: column; }
  .slide-nav .btn { width: 100%; }
  .quiz-option { font-size: 0.95rem; padding: 12px; }
  .results-stars { font-size: 2rem; }
}

/* ================================================================
   DJZ v2 — accounts, pricing, gating, music labs, certificates
   ================================================================ */

/* ---------------- Buttons & chips ---------------- */

.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

.btn-big { padding: 16px 32px; font-size: 1.12rem; }

.btn-block { width: 100%; }

.link-btn { border: none; background: none; color: var(--primary); font-weight: 700; font-size: 0.95rem; text-decoration: underline; }

.icon-btn { border: none; background: none; font-size: 1.1rem; }

/* ---------------- Topbar auth area ---------------- */

#auth-area { display: flex; align-items: center; gap: 8px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid #e6e1ff;
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.user-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.user-avatar { font-size: 1.1rem; }

.plan-badge, .kid-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-badge { background: color-mix(in srgb, var(--chip) 14%, white); color: var(--chip); }

.kid-badge { background: #fff3e0; color: #b45309; }

.logout-btn { border: 2px solid #e6e1ff; background: #fff; }

/* ---------------- Guest banner ---------------- */

.guest-banner {
  background: linear-gradient(90deg, #fff8e1, #ffe8d6);
  border: 2px dashed #f59e0b;
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 20px;
  color: #92400e;
  font-size: 0.95rem;
}

/* ---------------- Hero CTA ---------------- */

.hero-cta { margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }

.hero-cta-note { color: var(--muted); font-size: 0.9rem; font-weight: 600; }

/* ---------------- Gating ---------------- */

.level-card { position: relative; }

.level-card.locked { opacity: 0.85; }

.lock-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  border: 2px solid #e6e1ff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.lock-tag, .preview-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  white-space: nowrap;
}

.lock-tag { background: #fee2e2; color: #b91c1c; }

.preview-tag { background: #e0f2fe; color: #0369a1; }

.locked-level-card { text-align: center; padding: 36px 24px; }

.locked-icon { font-size: 3rem; margin-bottom: 10px; }

.locked-level-card h2 { margin-bottom: 8px; }

.locked-body { color: var(--muted); max-width: 460px; margin: 0 auto; }

.locked-lab { text-align: center; }

.locked-lab-body { margin: 12px 0; color: var(--muted); }

.locked-lab .btn { margin-top: 4px; }

.teaser-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #eef2ff, #fff);
  border: 2px solid #e0e7ff;
}

.teaser-card h2 { margin-bottom: 4px; }

.teaser-card p { color: var(--muted); max-width: 560px; }

/* ---------------- Auth ---------------- */

.auth-wrap { display: flex; justify-content: center; padding: 30px 0; }

.auth-card { max-width: 520px; width: 100%; padding: 30px; }

.auth-brand { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }

.auth-card h1 { font-size: 1.7rem; margin-bottom: 6px; }

.auth-sub { color: var(--muted); margin-bottom: 18px; }

.auth-tabs { margin-bottom: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: 0.92rem; }

.field input, .field select {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 2px solid #e6e1ff;
  border-radius: 14px;
  background: #fbfaff;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus, .field select:focus { border-color: var(--primary); }

.field input:disabled { opacity: 0.6; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.check { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); margin-bottom: 14px; cursor: pointer; }

.check input { width: 18px; height: 18px; accent-color: var(--primary); }

.form-error {
  display: none;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 0.92rem;
}

.auth-alt { margin-top: 16px; text-align: center; color: var(--muted); font-size: 0.92rem; }

.auth-forgot { text-align: right; margin: -6px 0 14px; }

/* ---------------- Pricing ---------------- */

.pricing-hero { text-align: center; padding: 30px 0 10px; }

.pricing-eyebrow { display: inline-block; background: #fff; border: 2px dashed #cfc7f5; color: var(--muted); font-weight: 700; padding: 6px 16px; border-radius: 999px; margin-bottom: 14px; font-size: 0.85rem; }

.pricing-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); line-height: 1.15; }

.pricing-sub { max-width: 640px; margin: 14px auto 0; color: var(--muted); font-size: 1.08rem; }

.billing-toggle { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }

.bill-btn {
  border: 2px solid #e6e1ff;
  background: #fff;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all 0.15s ease;
}

.bill-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.save-badge { background: var(--green); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 0.72rem; margin-left: 4px; }

.plan-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; }

.plan-card { display: flex; flex-direction: column; gap: 10px; position: relative; border-top: 8px solid var(--lvl); }

.plan-card.highlight { border: 3px solid var(--primary); box-shadow: var(--shadow-big); }

.plan-flag {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-icon { font-size: 2.2rem; }

.plan-card h2 { font-size: 1.35rem; }

.plan-tagline { color: var(--lvl); font-weight: 700; font-size: 0.92rem; }

.plan-price { font-size: 2.1rem; font-weight: 700; }

.plan-period { font-size: 1rem; color: var(--muted); font-weight: 600; }

.plan-yearly-note { color: var(--muted); font-size: 0.8rem; min-height: 1.2em; }

.plan-blurb { color: var(--muted); font-size: 0.92rem; flex: 1; }

.plan-features { list-style: "✅ "; padding-left: 22px; font-size: 0.92rem; }

.plan-features li { margin: 6px 0; }

.plan-card .btn { margin-top: 6px; }

.compare-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

.compare-table th { text-align: left; padding: 10px 12px; background: #f1eeff; }

.compare-table td { padding: 10px 12px; border-bottom: 1px solid #eee9ff; text-align: center; }

.compare-table td:first-child, .compare-table th:first-child { text-align: left; }

.compare-label { font-weight: 600; }

.faq-list { display: grid; gap: 10px; }

.faq-item {
  background: #fff;
  border: 2px solid #eee9ff;
  border-radius: 16px;
  padding: 14px 18px;
}

.faq-item summary { font-weight: 700; cursor: pointer; font-size: 1rem; }

.faq-item p { color: var(--muted); margin-top: 10px; }

.final-cta { text-align: center; padding: 36px 24px; background: linear-gradient(135deg, #eef2ff, #fff); border: 2px solid #e0e7ff; }

.final-cta h2 { font-size: 1.6rem; margin-bottom: 12px; }

.urgency { color: var(--muted); max-width: 620px; margin: 0 auto 10px; }

.risk-reversal { font-weight: 600; max-width: 620px; margin: 0 auto 20px; }

.microcopy { list-style: none; margin-top: 16px; color: var(--muted); font-size: 0.88rem; }

.microcopy li { margin: 4px 0; }

/* ---------------- Account ---------------- */

.account-hero h1 { font-size: 2.1rem; }

.account-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.account-card h2 { margin-bottom: 12px; }

.account-line { margin: 8px 0; }

.plan-thanks { background: #e9fbf1; border-radius: 12px; padding: 10px 14px; color: #166534; font-weight: 600; }

.kid-list { display: grid; gap: 10px; margin-bottom: 14px; }

.kid-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f7f5ff;
  border: 2px solid #eee9ff;
  border-radius: 16px;
  padding: 12px 14px;
}

.kid-row.active { border-color: var(--primary); background: #fff; }

.kid-avatar { font-size: 1.6rem; }

.kid-info { flex: 1; display: flex; flex-direction: column; }

.kid-meta { color: var(--muted); font-size: 0.82rem; }

.kid-active-tag { background: var(--green); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

.kid-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

.kid-form input, .kid-form select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 2px solid #e6e1ff;
  border-radius: 12px;
  outline: none;
}

.kid-hint, .plan-limit { color: var(--muted); font-size: 0.85rem; }

.plan-limit { background: #fff8e1; border-radius: 12px; padding: 10px 14px; margin: 8px 0; }

.more-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Progress / certificates ---------------- */

.progress-sub { color: var(--muted); margin-bottom: 16px; }

.cert-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.cert-card { text-align: center; border-top: 8px solid var(--lvl); }

.cert-icon { font-size: 2.6rem; }

.cert-card h3 { margin: 8px 0 4px; }

.cert-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }

/* ---------------- Modals ---------------- */

body.modal-open { overflow: hidden; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 60, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  position: relative;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  text-align: center;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { transform: translateY(24px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: #f1eeff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
  color: var(--muted);
}

.modal-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.checkout-summary { color: var(--muted); margin: 8px 0 16px; }

.modal .field { text-align: left; }

.demo-note {
  background: #fff8e1;
  border-radius: 12px;
  padding: 10px 14px;
  color: #92400e;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 10px 0;
  text-align: left;
}

/* ---------------- Toasts ---------------- */

#toast-root {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-big);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 90vw;
  text-align: center;
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ---------------- Piano lab ---------------- */

.piano {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0 6px;
}

.piano-key {
  width: 52px;
  height: 110px;
  border: 3px solid #2b2350;
  border-radius: 10px 10px 14px 14px;
  background: linear-gradient(180deg, #fff 0%, #f1eeff 100%);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  box-shadow: 0 5px 0 #cfc7f5;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}

.piano-key:hover { background: linear-gradient(180deg, #ffe8d6, #ffd6b8); }

.piano-key:active { transform: translateY(4px); box-shadow: 0 1px 0 #cfc7f5; background: linear-gradient(180deg, #ffd6b8, #ffc49a); }

/* ---------------- Beat lab (sequencer) ---------------- */

.seq-tracks { display: grid; gap: 8px; margin: 16px 0 12px; }

.seq-row { display: flex; align-items: center; gap: 8px; }

.seq-label { width: 84px; font-weight: 700; font-size: 0.9rem; }

.pad {
  flex: 1;
  min-width: 44px;
  height: 44px;
  border: 2px solid #ddd7ff;
  border-radius: 12px;
  background: #f7f5ff;
  font-size: 1rem;
  color: #b8aee0;
  transition: all 0.12s ease;
}

.pad.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.pad.step-active { outline: 3px solid var(--gold); outline-offset: 2px; }

.seq-controls { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.seq-tempo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9rem; }

.seq-tempo input { width: 140px; accent-color: var(--primary); }

.seq-bpm { min-width: 58px; }

.seq-step-light { margin-top: 12px; color: var(--muted); font-size: 0.85rem; font-weight: 600; }

/* ---------------- Printable certificate ---------------- */

#print-root { display: none; }

.certificate {
  background: #fff;
  border: 8px double var(--lvl, #8b5cf6);
  border-radius: 18px;
  padding: 48px 40px;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink);
}

.cert-logo { font-size: 2rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; }

.cert-kicker { letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700; color: var(--muted); font-size: 0.9rem; }

.cert-name { font-size: 2.6rem; font-weight: 700; margin: 18px 0 6px; color: var(--lvl, #8b5cf6); }

.cert-body { color: var(--muted); }

.cert-level { font-size: 1.6rem; font-weight: 700; margin: 12px 0 6px; }

.cert-ages { font-size: 1rem; color: var(--muted); }

.cert-stars { color: var(--muted); }

.cert-date { margin-top: 22px; color: var(--muted); }

.cert-footer { margin-top: 30px; border-top: 2px solid #eee9ff; padding-top: 14px; color: var(--muted); font-size: 0.9rem; }

@media print {
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  body { background: #fff !important; }
}

/* ---------------- Responsive (v2) ---------------- */

@media (max-width: 640px) {
  #auth-area .user-name, #auth-area .kid-badge { display: none; }
  .user-chip { padding: 6px 10px; }
  .field-row { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .piano-key { width: 40px; height: 90px; }
  .seq-label { width: 64px; font-size: 0.8rem; }
  .pad { min-width: 34px; height: 40px; }
  .teaser-card { flex-direction: column; text-align: center; }
  .more-actions .btn { width: 100%; }
}
