/* ============================================================
   Keynote Soul design system
   ============================================================ */
:root {
  --bg: #0a0c12;
  --bg-raised: #10131d;
  --panel: #141824;
  --panel-2: #1a1f2e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f6;
  --muted: #98a1b3;
  --faint: #6b7386;
  --gold: #f0b354;
  --gold-2: #e89b3c;
  --gold-soft: rgba(240, 179, 84, 0.14);
  --teal: #38cfc0;
  --teal-soft: rgba(56, 207, 192, 0.13);
  --purple: #8b7cf6;
  --good: #4ade80;
  --bad: #f87171;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scrollbar-color: #2a3040 var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(139, 124, 246, 0.13), transparent 60%),
    radial-gradient(900px 480px at 88% -10%, rgba(240, 179, 84, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
button { font-family: inherit; }
kbd {
  padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 5px; background: var(--panel-2); font-size: 0.82em; font-family: inherit;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 12, 18, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: min(1200px, 100% - 40px); margin: 0 auto;
  display: flex; align-items: center; gap: 22px; height: 62px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  background: none; border: none; color: var(--text); cursor: pointer; padding: 0;
}
.brand-mark {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; font-size: 17px; color: #14100a;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 4px 14px rgba(240, 179, 84, 0.35);
}
.brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.brand-name em { font-style: normal; color: var(--gold); }

.main-nav { display: flex; gap: 4px; }
.nav-link {
  border: none; background: none; color: var(--muted); cursor: pointer;
  padding: 8px 14px; border-radius: 999px; font-size: 0.95rem; font-weight: 600;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); background: var(--panel-2); }

.topbar-status { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.stat-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); font-size: 0.85rem; color: var(--muted);
}
.stat-chip strong { color: var(--text); }
.midi-chip {
  display: flex; align-items: center; gap: 7px; cursor: default;
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); font-size: 0.85rem; color: var(--muted);
}
.midi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.midi-dot.on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  color: var(--muted); cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }

/* ---------- Layout ---------- */
.app-main { width: min(1200px, 100% - 40px); margin: 0 auto; padding: 28px 0 80px; }
.view.hidden, .hidden { display: none !important; }

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; border: 1px solid transparent;
  font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: transform .08s, filter .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 13px 24px; font-size: 1.02rem; }
.btn-sm { padding: 7px 13px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #171004;
  box-shadow: 0 6px 20px rgba(240, 179, 84, 0.28);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost {
  background: var(--panel-2); border-color: var(--line-strong); color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold); }
.btn-danger-ghost {
  background: none; border-color: rgba(248, 113, 113, 0.4); color: var(--bad);
}
.btn-danger-ghost:hover { background: rgba(248, 113, 113, 0.1); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 34px; align-items: center;
  padding: 40px 0 44px;
}
.hero-kicker {
  margin: 0 0 10px; color: var(--gold); font-size: 0.8rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.hero-title { margin: 0 0 14px; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.06; }
.grad-text {
  background: linear-gradient(100deg, var(--gold) 20%, var(--purple) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 0 0 24px; max-width: 540px; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hstat {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel);
}
.hstat span { display: block; color: var(--faint); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.hstat strong { display: block; margin-top: 4px; font-size: 1.55rem; font-family: var(--font-display); }
.hstat strong small { font-size: 0.9rem; color: var(--muted); font-family: var(--font-body); }

/* ---------- Tracks & lessons ---------- */
.track-list { display: grid; gap: 30px; }
.track { }
.track-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.track-icon {
  width: 44px; height: 44px; display: grid; place-items: center; font-size: 21px;
  border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-strong);
}
.track-head h2 { margin: 0; font-size: 1.35rem; }
.track-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.track-meta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.track-progress-label { color: var(--faint); font-size: 0.85rem; font-weight: 600; }
.pro-tag {
  padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.08em; color: #171004;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.lesson-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.lesson-card {
  position: relative; text-align: left; cursor: pointer;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--text); transition: border-color .15s, transform .12s;
}
.lesson-card:hover:not(.locked) { border-color: var(--gold); transform: translateY(-2px); }
.lesson-card.locked { opacity: 0.55; cursor: default; }
.lesson-card .lc-num { color: var(--faint); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; }
.lesson-card h3 { margin: 6px 0 4px; font-size: 1.02rem; font-family: var(--font-body); font-weight: 700; }
.lesson-card p { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.4; }
.lc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.lc-stars { color: var(--gold); font-size: 0.95rem; letter-spacing: 2px; }
.lc-stars .dim { color: #3a3f4e; }
.lc-state { font-size: 0.75rem; font-weight: 700; color: var(--faint); }
.lc-state.done { color: var(--good); }
.lesson-card.current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 10px 30px rgba(240,179,84,.15); }
.lc-lock { position: absolute; top: 14px; right: 14px; font-size: 0.95rem; }

/* ---------- Lesson view ---------- */
.lesson-head, .play-head, .free-head {
  display: flex; align-items: center; gap: 18px; margin-bottom: 20px;
}
.lesson-head-titles, .play-head-titles { flex: 1; min-width: 0; }
.lesson-track-tag {
  margin: 0; color: var(--gold); font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.lesson-head h2, .play-head h2, .free-head h2 { margin: 2px 0 0; font-size: 1.5rem; }

.lesson-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.lesson-side { padding: 22px; }
.side-heading { margin: 0 0 12px; font-size: 1.02rem; color: var(--gold); }
.lesson-concept p { margin: 0 0 12px; color: var(--muted); font-size: 0.94rem; line-height: 1.6; }
.lesson-concept p strong { color: var(--text); }
.lesson-tips { display: grid; gap: 8px; margin: 16px 0; }
.tip {
  padding: 10px 12px; border-left: 3px solid var(--teal); border-radius: 0 8px 8px 0;
  background: var(--teal-soft); color: #c8f5ef; font-size: 0.86rem;
}
.side-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }

.lesson-stage { padding: 24px; }
.lesson-prompt { text-align: center; margin-bottom: 18px; }
.prompt-step { margin: 0 0 8px; color: var(--faint); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.prompt-target {
  display: inline-grid; place-items: center; min-width: 200px; min-height: 96px;
  padding: 10px 28px; border-radius: 16px;
  border: 2px solid var(--gold); background: var(--gold-soft);
  font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--gold);
}
.prompt-cue { margin: 12px auto 10px; max-width: 560px; color: var(--muted); font-size: 0.98rem; }
.prompt-badges { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.badge {
  padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--panel-2); color: var(--text); font-size: 0.83rem; font-weight: 600;
}

.step-strip { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; }
.step-pip {
  min-width: 46px; padding: 7px 10px; text-align: center;
  border: 1.5px solid var(--line); border-radius: 9px; background: var(--panel);
  font-size: 0.85rem; font-weight: 700; color: var(--muted);
}
.step-pip.current { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.step-pip.done { border-color: rgba(74, 222, 128, 0.5); color: var(--good); }

.lesson-feedback {
  min-height: 44px; display: grid; place-items: center; margin-bottom: 16px;
  border-radius: 10px; border: 1px solid var(--line);
  color: var(--muted); font-size: 0.95rem; font-weight: 600; text-align: center; padding: 8px 14px;
}
.lesson-feedback.good { border-color: rgba(74, 222, 128, 0.5); color: var(--good); background: rgba(74, 222, 128, 0.07); }
.lesson-feedback.bad { border-color: rgba(248, 113, 113, 0.5); color: var(--bad); background: rgba(248, 113, 113, 0.07); }

.kb-hint { margin: 12px 4px 0; color: var(--faint); font-size: 0.83rem; }
.kb-hint.center { text-align: center; }

/* ---------- DOM piano ---------- */
.kb-wrap { overflow-x: auto; padding-bottom: 4px; }
.piano {
  position: relative; height: 170px; min-width: 640px;
  border-radius: 10px; overflow: hidden;
  background: #05060a; padding-top: 5px;
  box-shadow: inset 0 6px 14px rgba(0,0,0,.6);
}
.piano-lg { height: 200px; min-width: 900px; }
.pkey {
  position: absolute; top: 5px; bottom: 0; margin: 0; padding: 0 0 10px;
  display: flex; align-items: flex-end; justify-content: center;
  border: 1px solid #0a0c10; border-radius: 0 0 6px 6px; cursor: pointer;
  font-size: 0.72rem; font-weight: 700; user-select: none; touch-action: none;
}
.pkey.white {
  background: linear-gradient(180deg, #f4f2ee 0%, #fdfcfa 84%, #d8d4cc 100%);
  color: #7a7468; z-index: 1;
}
.pkey.black {
  height: 60%; bottom: auto; z-index: 2;
  background: linear-gradient(180deg, #34363c 0%, #17181c 25%, #101115 100%);
  color: #9aa0ad; border-radius: 0 0 5px 5px; padding-bottom: 7px;
  box-shadow: 0 3px 6px rgba(0,0,0,.5);
}
.pkey.white.pressed, .pkey.white.flash {
  background: linear-gradient(180deg, #ffe9c0, #f5c877);
  color: #6b4a12;
}
.pkey.black.pressed, .pkey.black.flash { background: linear-gradient(180deg, #8a6420, #5c430f); color: #ffe4b0; }
.pkey.white.target { background: linear-gradient(180deg, #d9fbf4, #94e6d8); color: #0c5c50; box-shadow: inset 0 0 0 2px var(--teal); }
.pkey.black.target { background: linear-gradient(180deg, #1f6d61, #0f4a41); box-shadow: inset 0 0 0 2px var(--teal); color: #b5f5ea; }
.pkey.white.collected { background: linear-gradient(180deg, #d9f5e0, #a7e5b8); color: #14532d; }
.pkey.black.collected { background: linear-gradient(180deg, #1e6b3c, #10502a); color: #baf1cd; }

/* ---------- Play (game) view ---------- */
.play-mode-toggle { display: flex; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.mode-btn {
  display: grid; gap: 1px; padding: 9px 18px; border: none; cursor: pointer;
  background: var(--panel); color: var(--muted); font-weight: 700; font-size: 0.9rem; text-align: center;
}
.mode-btn small { font-size: 0.68rem; font-weight: 600; color: var(--faint); }
.mode-btn.active { background: var(--gold-soft); color: var(--gold); }
.mode-btn.active small { color: var(--gold-2); }

.game-shell { overflow: hidden; }
.game-hud {
  display: flex; gap: 26px; align-items: center;
  padding: 13px 20px; border-bottom: 1px solid var(--line);
  background: rgba(6, 8, 12, 0.5);
}
.hud-item span { display: block; color: var(--faint); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.hud-item strong { font-size: 1.25rem; font-family: var(--font-display); }
.hud-progress { flex: 1; }
.hud-bar { margin-top: 6px; height: 7px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.hud-bar div { height: 100%; width: 0%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .2s; }

.game-canvas-wrap { position: relative; }
#gameCanvas { display: block; width: 100%; height: min(62vh, 620px); min-height: 420px; touch-action: none; }

.game-overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(5, 6, 10, 0.72); backdrop-filter: blur(6px); z-index: 5;
}
.overlay-card { text-align: center; padding: 36px 44px; max-width: 460px; }
.overlay-card h3 { margin: 0 0 6px; font-size: 1.8rem; }
.overlay-card .ov-stars { font-size: 2.4rem; letter-spacing: 8px; color: var(--gold); margin: 8px 0; }
.overlay-card .ov-stars .dim { color: #3a3f4e; }
.overlay-card p { color: var(--muted); margin: 0 0 8px; }
.ov-statline { display: flex; justify-content: center; gap: 22px; margin: 14px 0 22px; }
.ov-statline div span { display: block; color: var(--faint); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.ov-statline div strong { font-size: 1.3rem; font-family: var(--font-display); }
.ov-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- Free play ---------- */
.free-stage { padding: 26px; }
.chord-display { text-align: center; margin-bottom: 20px; }
.chord-name {
  font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 700;
  min-height: 1.2em; line-height: 1.15;
  background: linear-gradient(100deg, var(--gold), var(--purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chord-notes { color: var(--muted); font-size: 1rem; min-height: 1.5em; }

/* ---------- Modals & toast ---------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(4, 5, 9, 0.7); backdrop-filter: blur(5px); padding: 20px;
}
.modal { width: min(440px, 100%); padding: 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 1.3rem; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { color: var(--muted); font-size: 0.88rem; font-weight: 700; }
.field select, .field input[type='range'] { width: 100%; }
.field select {
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--panel-2); color: var(--text); font: inherit;
}
input[type='range'] { accent-color: var(--gold); }
.modal-fine { margin: 14px 0 0; color: var(--faint); font-size: 0.8rem; }

.modal-premium .premium-lede { color: var(--muted); margin: 0 0 14px; }
.premium-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 9px; }
.premium-list li { color: var(--text); font-size: 0.93rem; }
.premium-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.premium-price strong { font-size: 2rem; font-family: var(--font-display); color: var(--gold); }
.premium-price span { color: var(--faint); font-size: 0.9rem; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 90;
  padding: 12px 22px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--panel-2); box-shadow: var(--shadow);
  color: var(--text); font-weight: 700; font-size: 0.95rem;
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Daily practice card ---------- */
.daily-card { padding: 20px 22px; margin-bottom: 30px; }
.daily-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.daily-head h3 { margin: 0; font-size: 1.15rem; }
.daily-head p { margin: 3px 0 0; color: var(--muted); font-size: 0.88rem; }
.daily-count { font-family: var(--font-display); font-size: 1.1rem; color: var(--muted); }
.daily-count strong { font-size: 1.7rem; color: var(--gold); }
.daily-bar { margin: 14px 0 16px; height: 8px; }
.daily-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.daily-item {
  display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text); transition: border-color .15s;
}
.daily-item:hover { border-color: var(--gold); }
.di-icon { font-size: 1.25rem; }
.di-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.di-text strong { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.di-text small { color: var(--faint); font-size: 0.76rem; }
.di-go { color: var(--gold); font-weight: 800; }

/* ---------- Premium / license ---------- */
.license-row { display: flex; gap: 8px; margin-top: 12px; }
.license-row input {
  flex: 1; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--panel); color: var(--text); font: inherit; font-size: 0.88rem;
}
.license-row input::placeholder { color: var(--faint); }
.btn:disabled { opacity: 0.55; cursor: default; }
.settings-pro-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel);
}
#proStatus { font-size: 0.9rem; font-weight: 700; }
.modal-fine a { color: var(--muted); }

/* ---------- Onboarding ---------- */
.modal-onboard { width: min(480px, 100%); }
.ob-hero { display: grid; place-items: center; margin-bottom: 8px; }
.ob-mark { width: 56px; height: 56px; font-size: 28px; border-radius: 16px; }
.modal-onboard h3 { margin: 8px 0 4px; font-size: 1.5rem; text-align: center; }
.ob-lede { margin: 0 0 16px; color: var(--muted); text-align: center; }
.modal-onboard .premium-list { margin-bottom: 20px; }
.ob-choices { display: grid; gap: 10px; margin-bottom: 18px; }
.ob-choice {
  display: grid; gap: 2px; text-align: left; cursor: pointer;
  padding: 13px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text);
}
.ob-choice span { color: var(--muted); font-size: 0.84rem; }
.ob-choice.selected { border-color: var(--gold); background: var(--gold-soft); }
.ob-choice.selected span { color: var(--gold-2); }
.ob-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
#obDots { display: flex; gap: 6px; }
.ob-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.ob-dot.on { background: var(--gold); }
.ob-skip { border: none; background: none; color: var(--faint); cursor: pointer; font-size: 0.85rem; }
.ob-skip:hover { color: var(--muted); }
.modal-onboard .ov-actions { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 30px; }
.footer-inner {
  width: min(1200px, 100% - 40px); margin: 0 auto; padding: 20px 0 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  color: var(--faint); font-size: 0.85rem;
}
.footer-inner nav { display: flex; gap: 16px; }
.footer-inner a { color: var(--faint); text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* ---------- Legal pages ---------- */
.legal-page { max-width: 720px; padding-top: 40px; }
.legal-page h1 { margin: 22px 0 4px; }
.legal-updated { color: var(--faint); font-size: 0.85rem; margin: 0 0 26px; }
.legal-page h3 { margin: 24px 0 8px; color: var(--gold); font-size: 1.05rem; }
.legal-page p { color: var(--muted); line-height: 1.65; }
.legal-page a { color: var(--gold); }
.legal-note {
  margin-top: 34px; padding: 12px 14px; border: 1px solid rgba(240, 179, 84, 0.4);
  border-radius: var(--radius-sm); background: var(--gold-soft); font-size: 0.88rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 26px 0 30px; }
  .lesson-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}
@media (max-width: 620px) {
  .topbar-inner, .app-main { width: calc(100% - 24px); }
  .stat-chip, .midi-chip { display: none; }
  .lesson-head, .play-head { flex-wrap: wrap; }
  #gameCanvas { min-height: 340px; }
  .daily-items { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 8px; }
}
