/* ==========================================================================
   Guitar Hub — design system
   Warm "stage lights" palette: deep rosewood darks, amber accent.
   ========================================================================== */
:root {
  --bg: #100d0c;
  --bg-2: #17120f;
  --surface: #1c1715;
  --surface-2: #241e1b;
  --surface-3: #2f2723;
  --line: rgba(255, 238, 220, .08);
  --line-2: rgba(255, 238, 220, .16);
  --text: #f6eee5;
  --text-2: #d2c3b5;
  --muted: #9b8b7d;
  --accent: #f0a83c;
  --accent-2: #e4743f;
  --accent-ink: #1d1206;
  --accent-soft: rgba(240, 168, 60, .13);
  --green: #62c48d;
  --green-soft: rgba(98, 196, 141, .14);
  --red: #ef6a5b;
  --blue: #74afe9;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .85);
  --glow: radial-gradient(1200px 600px at 85% -10%, rgba(240, 168, 60, .14), transparent 60%),
          radial-gradient(900px 500px at -10% 10%, rgba(228, 116, 63, .10), transparent 60%);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Fraunces", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --lvl: var(--accent);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f1e9; --bg-2: #efe6da; --surface: #fffbf6; --surface-2: #f6eee4; --surface-3: #ece1d3;
    --line: rgba(70, 40, 15, .09); --line-2: rgba(70, 40, 15, .18);
    --text: #2a1c12; --text-2: #5b4535; --muted: #8b7565;
    --accent: #c4720f; --accent-2: #c2502a; --accent-ink: #fffaf2; --accent-soft: rgba(196, 114, 15, .11);
    --green: #2f9a62; --green-soft: rgba(47, 154, 98, .12); --red: #c84536; --blue: #2f6fb5;
    --shadow: 0 1px 2px rgba(70, 40, 15, .06), 0 14px 34px -18px rgba(70, 40, 15, .28);
    --shadow-lg: 0 30px 70px -30px rgba(70, 40, 15, .4);
    --glow: radial-gradient(1200px 600px at 85% -10%, rgba(240, 168, 60, .20), transparent 60%),
            radial-gradient(900px 500px at -10% 10%, rgba(228, 116, 63, .10), transparent 60%);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f7f1e9; --bg-2: #efe6da; --surface: #fffbf6; --surface-2: #f6eee4; --surface-3: #ece1d3;
  --line: rgba(70, 40, 15, .09); --line-2: rgba(70, 40, 15, .18);
  --text: #2a1c12; --text-2: #5b4535; --muted: #8b7565;
  --accent: #c4720f; --accent-2: #c2502a; --accent-ink: #fffaf2; --accent-soft: rgba(196, 114, 15, .11);
  --green: #2f9a62; --green-soft: rgba(47, 154, 98, .12); --red: #c84536; --blue: #2f6fb5;
  --shadow: 0 1px 2px rgba(70, 40, 15, .06), 0 14px 34px -18px rgba(70, 40, 15, .28);
  --shadow-lg: 0 30px 70px -30px rgba(70, 40, 15, .4);
  --glow: radial-gradient(1200px 600px at 85% -10%, rgba(240, 168, 60, .20), transparent 60%),
          radial-gradient(900px 500px at -10% 10%, rgba(228, 116, 63, .10), transparent 60%);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); background-image: var(--glow); background-attachment: fixed;
  color: var(--text); font: 15.5px/1.6 var(--font-ui); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.page { padding: 28px 0 80px; animation: pageIn .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.eyebrow { font: 600 12px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }
.icon { width: 18px; height: 18px; flex: none; }
.icon.lg { width: 22px; height: 22px; }

/* ---------- boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-pick { width: 46px; height: 52px; background: linear-gradient(135deg, #f6c063, #d9622f); clip-path: path("M23 0C33 0 46 3 46 11c0 10-10 30-23 41C10 41 0 21 0 11 0 3 13 0 23 0z"); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .6; } }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; font-size: 14px; cursor: pointer;
  text-decoration: none; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--line-2); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 24px -12px var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.icon-only { padding: 9px; border-radius: 50%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.success { background: var(--green-soft); color: var(--green); border-color: transparent; }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .textarea, .select {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-2);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.input.sm { padding: 7px 10px; font-size: 13px; }
.form-error { color: var(--red); font-size: 14px; min-height: 1.2em; }

/* switch */
.switch { position: relative; width: 44px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), background .2s; }
.switch input:checked + span { background: var(--accent); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.chip.lvl { background: color-mix(in srgb, var(--lvl) 16%, transparent); color: var(--lvl); border-color: transparent; }
.chip .icon { width: 14px; height: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 19px; }
.section-title { display: flex; align-items: end; gap: 12px; margin: 44px 0 18px; }
.section-title h2 { font-size: clamp(22px, 3vw, 28px); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.topbar .container { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.brand-pick { width: 28px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.user-menu { position: relative; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; border: 0; cursor: pointer; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; font-family: var(--font-display); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; display: none; z-index: 50; }
.menu.open { display: block; animation: pageIn .2s both; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: none; text-decoration: none; font-size: 14px; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu .menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.mobile-nav { display: none; }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(160deg, #2a1810, #120c09 70%); color: #f6eee5; }
.auth-art .brand { color: #f6eee5; }
.auth-art h1 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; max-width: 12ch; position: relative; z-index: 2; }
.auth-art h1 em { font-style: italic; color: #f6c063; }
.auth-art p { color: #cdbfb2; max-width: 40ch; position: relative; z-index: 2; font-size: 17px; }
.strings { position: absolute; inset: 0; z-index: 1; opacity: .9; }
.strings line { stroke: url(#stringGrad); }
.strings .s { animation: vibrate 3.2s ease-in-out infinite; transform-origin: center; }
@keyframes vibrate { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(-1.2px); } 75% { transform: translateY(1.2px); } }
.auth-feature-row { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 2; }
.auth-feature-row .chip { background: rgba(255, 255, 255, .07); color: #f6eee5; border-color: rgba(255, 255, 255, .1); }
.auth-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: min(400px, 100%); }
.auth-form h2 { font-size: 32px; margin-bottom: 6px; }
.auth-form form { display: grid; gap: 16px; margin-top: 28px; }

/* ---------- dashboard hero ---------- */
.hero { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.hero-main { position: relative; overflow: hidden; padding: 32px; }
.hero-main::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); pointer-events: none; }
.hero h1 { font-size: clamp(30px, 4vw, 44px); margin: 10px 0 8px; }
.up-next { margin-top: 26px; display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; transition: transform .2s, border-color .2s; }
.up-next:hover { transform: translateY(-2px); border-color: var(--line-2); }
.up-next .num { font: 700 30px/1 var(--font-display); color: var(--lvl); min-width: 52px; text-align: center; }
.up-next h3 { font-size: 20px; margin: 4px 0; }
.up-next p { margin: 0; color: var(--muted); font-size: 14px; }
.hero-side { padding: 26px; display: grid; gap: 18px; align-content: start; }
.ring-wrap { display: flex; align-items: center; gap: 20px; }
.ring { width: 128px; height: 128px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring .track { stroke: var(--surface-3); }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); }
.ring .label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .label strong { font: 700 30px/1 var(--font-display); }
.ring .label span { font-size: 12px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.stat strong { display: block; font: 700 24px/1.1 var(--font-display); }
.stat span { font-size: 12px; color: var(--muted); }
.stat .icon { color: var(--accent); margin-bottom: 6px; }

.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); margin-bottom: 20px; }

.dash-grid .level { margin-top: 0; }
.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }

/* ---------- journey / lesson cards ---------- */
.level { margin-top: 40px; }
.level-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.level-badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font: 700 20px/1 var(--font-display); color: var(--lvl); background: color-mix(in srgb, var(--lvl) 14%, transparent); border: 1px solid color-mix(in srgb, var(--lvl) 30%, transparent); flex: none; }
.level-head h2 { font-size: 26px; }
.level-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.level-progress { margin-left: auto; text-align: right; min-width: 120px; }
.bar-mini { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.bar-mini i { display: block; height: 100%; border-radius: inherit; background: var(--lvl); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.lesson-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-height: 168px; overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.lesson-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--lvl); opacity: .85; }
.lesson-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.lesson-card .top { display: flex; align-items: center; justify-content: space-between; }
.lesson-card .n { font: 700 13px/1 var(--font-mono); color: var(--lvl); }
.lesson-card h3 { font-size: 18px; }
.lesson-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lesson-card .foot { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
.lesson-card.locked { cursor: not-allowed; background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 10px, var(--bg-2) 10px, var(--bg-2) 20px); }
.lesson-card.locked h3, .lesson-card.locked p { opacity: .55; }
.lesson-card.locked:hover { transform: none; box-shadow: none; }
.lesson-card.locked::before { background: var(--line-2); }
.status-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.status-dot.done { background: var(--green); color: #0d1f14; }
.status-dot.open { background: var(--accent-soft); color: var(--accent); }
.status-dot .icon { width: 14px; height: 14px; }
.new-tag { position: absolute; top: 14px; right: 50px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 3px 7px; border-radius: 6px; }

/* teacher notes */
.note-list { display: grid; gap: 12px; }
.note-item { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 3px solid var(--accent); }
.note-item .meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.note-item a { font-weight: 600; text-decoration: none; color: var(--text); }
.note-item p { margin: 0; white-space: pre-wrap; font-size: 14.5px; color: var(--text-2); }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); font-size: 14px; }

/* practice */
.practice-chart { display: flex; align-items: end; gap: 5px; height: 90px; margin: 14px 0 6px; }
.practice-chart .b { flex: 1; border-radius: 6px 6px 3px 3px; background: var(--surface-3); position: relative; min-height: 4px; transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.practice-chart .b.on { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.practice-chart .b.today { outline: 2px solid var(--line-2); outline-offset: 2px; }
.practice-chart .b:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); font-size: 11px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.practice-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.minute-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.minute-chips button { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; font-size: 13px; font-weight: 600; }
.minute-chips button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* resources */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.res-card { display: flex; gap: 14px; padding: 18px; text-decoration: none; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .2s, border-color .2s; position: relative; }
.res-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.res-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.res-card[data-type="tool"] .res-icon { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); }
.res-card[data-type="chart"] .res-icon { background: var(--green-soft); color: var(--green); }
.res-card h3 { font-size: 16.5px; margin-bottom: 4px; font-family: var(--font-ui); font-weight: 700; letter-spacing: 0; }
.res-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.res-card.locked { opacity: .55; cursor: not-allowed; }
.res-card.locked:hover { transform: none; }
.res-card .lock-badge { position: absolute; top: 12px; right: 12px; color: var(--muted); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-row button { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2); }
.filter-row button.on { background: var(--text); color: var(--bg); border-color: transparent; }

/* ---------- lesson page ---------- */
.lesson-hero { position: relative; padding: 40px 0 34px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--lvl) 12%, transparent), transparent); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.lesson-hero h1 { font-size: clamp(32px, 5vw, 54px); max-width: 20ch; margin: 10px 0 12px; }
.lesson-hero .lead { font-size: 18px; color: var(--text-2); max-width: 60ch; margin: 0 0 18px; }
.lesson-num { font: 600 13px/1 var(--font-mono); color: var(--lvl); letter-spacing: .08em; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-top: 34px; align-items: start; }
.lesson-side { position: sticky; top: 84px; display: grid; gap: 16px; }
.objectives { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.objectives label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.objectives input { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); flex: none; margin: 0; display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.objectives input:checked { background: var(--green); border-color: var(--green); }
.objectives input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #0d1f14; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.objectives input:checked + span { text-decoration: line-through; color: var(--muted); }
.side-links { display: grid; gap: 6px; }
.side-links a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.side-links a:hover { background: var(--surface-3); }
.side-links a.locked { opacity: .5; pointer-events: none; }
.complete-card { text-align: center; }
.complete-card .btn { width: 100%; padding: 14px; font-size: 15px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 50px; }
.pager a { padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; display: grid; gap: 4px; transition: border-color .2s; }
.pager a:hover { border-color: var(--line-2); }
.pager a.next { text-align: right; grid-column: 2; }
.pager small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.pager strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; }

/* ---------- prose (lesson + resource content) ---------- */
.prose { font-size: 16.5px; line-height: 1.75; color: var(--text-2); min-width: 0; }
.prose h2 { font-size: 30px; color: var(--text); margin: 0 0 14px; }
.prose h3 { font-size: 23px; color: var(--text); margin: 44px 0 12px; padding-top: 10px; }
.prose h4 { font-size: 18px; color: var(--text); margin: 28px 0 8px; font-family: var(--font-ui); font-weight: 700; }
.prose h3::before { content: ""; display: block; width: 28px; height: 3px; border-radius: 3px; background: var(--lvl); margin-bottom: 14px; }
.prose p { margin: 0 0 16px; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); }
.prose code { font: 600 .88em var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--lvl); }
.prose li.check { list-style: none; margin-left: -22px; padding-left: 30px; position: relative; }
.prose li.check::before { content: ""; position: absolute; left: 2px; top: 6px; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--lvl); }
.prose li.timed { list-style: none; margin-left: -22px; display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.prose li.timed .chip { min-width: 64px; justify-content: center; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; font: 14px/1.6 var(--font-mono); }
.tab-wrap { margin: 0 0 20px; border-radius: var(--radius-sm); background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); overflow-x: auto; position: relative; }
.tab-wrap::before { content: "TAB"; position: absolute; top: 10px; right: 12px; font: 700 10px/1 var(--font-mono); letter-spacing: .2em; color: var(--muted); }
.prose pre.tab { margin: 0; background: none; border: 0; padding: 18px 20px; font: 500 14.5px/1.55 var(--font-mono); color: var(--text); white-space: pre; tab-size: 4; }
.callout { margin: 0 0 20px; padding: 16px 18px 16px 52px; border-radius: var(--radius-sm); position: relative; background: var(--surface); border: 1px solid var(--line); font-size: 15.5px; }
.callout::before { position: absolute; left: 16px; top: 15px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.callout.tip { border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: var(--accent-soft); }
.callout.tip::before { content: "\2605"; background: var(--accent); color: var(--accent-ink); }
.callout.warn { border-color: color-mix(in srgb, var(--red) 30%, transparent); background: color-mix(in srgb, var(--red) 9%, transparent); }
.callout.warn::before { content: "!"; background: var(--red); color: #fff; }
.callout.goal { border-color: color-mix(in srgb, var(--green) 30%, transparent); background: var(--green-soft); }
.callout.goal::before { content: "\2713"; background: var(--green); color: #0d1f14; }
.callout.note::before { content: "i"; background: var(--surface-3); color: var(--text); font-family: Georgia, serif; font-style: italic; }
.callout.teacher { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: linear-gradient(135deg, var(--accent-soft), transparent); }
.callout.teacher::before { content: "\266A"; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); font-size: 14px; }
.callout.teacher .who { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.callout.teacher p { margin: 0; white-space: pre-wrap; color: var(--text); }
.table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 13px; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: var(--surface); }
.video-card { display: flex; gap: 14px; align-items: center; padding: 14px 18px; margin: 0 0 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text) !important; }
.video-card small { display: block; color: var(--muted); font-size: 12.5px; }
.play-badge { width: 42px; height: 42px; border-radius: 50%; background: var(--red); flex: none; position: relative; }
.play-badge::after { content: ""; position: absolute; left: 16px; top: 13px; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }

/* ---------- music widgets ---------- */
.chord-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.chord-card { width: 128px; padding: 12px 10px 8px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: center; transition: transform .15s, border-color .2s, box-shadow .2s; user-select: none; }
.chord-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--lvl) 50%, transparent); box-shadow: var(--shadow); }
.chord-card.ring-out { animation: strumPulse .5s ease-out; }
@keyframes strumPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lvl) 60%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.chord-card .name { font: 700 19px/1 var(--font-display); color: var(--text); margin-bottom: 4px; }
.chord-card .hint { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; display: flex; gap: 4px; justify-content: center; align-items: center; }
.chord-card .hint .icon { width: 11px; height: 11px; }
.chord-svg { width: 100%; height: auto; }
.chord-svg .str, .chord-svg .fret { stroke: var(--text-2); opacity: .55; }
.chord-svg .nut { fill: var(--text); }
.chord-svg .dot { fill: var(--lvl); }
.chord-svg .fing { fill: var(--accent-ink); font: 700 8px var(--font-ui); text-anchor: middle; dominant-baseline: central; }
.chord-svg .mark { fill: none; stroke: var(--muted); stroke-width: 1.3; }
.chord-svg .mute { stroke: var(--muted); stroke-width: 1.3; }
.chord-svg .basefret { fill: var(--muted); font: 600 9px var(--font-ui); }

.strum { margin: 0 0 22px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.strum-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.strum-head .label { font-weight: 700; color: var(--text); font-size: 15px; }
.strum-slots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.slot { display: grid; gap: 6px; justify-items: center; padding: 10px 0 8px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); transition: background .08s, transform .08s, border-color .1s; }
.slot svg { width: 26px; height: 26px; color: var(--text); }
.slot.rest svg { color: var(--muted); opacity: .35; }
.slot .count { font: 600 12px/1 var(--font-mono); color: var(--muted); }
.slot.beat .count { color: var(--text-2); }
.slot.hit { background: var(--accent); border-color: transparent; transform: scale(1.06); }
.slot.hit svg, .slot.hit .count { color: var(--accent-ink); opacity: 1; }
.slot.rest.hit { background: var(--surface-3); }
.slot.rest.hit svg, .slot.rest.hit .count { color: var(--text-2); }
.tempo-ctl { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.tempo-ctl button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; font-weight: 700; font-size: 16px; color: var(--text-2); }
.tempo-ctl button:hover { background: var(--surface-3); }
.tempo-ctl output { min-width: 66px; text-align: center; font: 600 13px var(--font-mono); }
.play-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); cursor: pointer; flex: none; box-shadow: 0 8px 18px -8px var(--accent); transition: transform .15s; }
.play-btn:hover { transform: scale(1.06); }
.play-btn .icon { width: 18px; height: 18px; }

.metro-inline { display: flex; align-items: center; gap: 14px; margin: 0 0 22px; padding: 12px 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); width: fit-content; max-width: 100%; flex-wrap: wrap; }
.metro-inline .title { font-weight: 700; font-size: 14px; color: var(--text); }
.beat-dots { display: flex; gap: 6px; }
.beat-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); transition: background .06s, transform .06s; }
.beat-dots i.on { background: var(--accent); transform: scale(1.25); }
.beat-dots i.on.first { background: var(--accent-2); }

.fretboard { margin: 0 0 24px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow-x: auto; }
.fretboard figcaption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.fb-svg { min-width: 460px; width: 100%; height: auto; }
.fb-svg .wood { fill: color-mix(in srgb, #5a3826 70%, var(--surface)); }
.fb-svg .fw { stroke: #c9b8a2; stroke-width: 2; opacity: .8; }
.fb-svg .nutline { stroke: #efe6d6; stroke-width: 5; }
.fb-svg .st { stroke: #e8dcc8; opacity: .75; }
.fb-svg .inlay { fill: #efe6d6; opacity: .22; }
.fb-svg .fnum { fill: var(--muted); font: 600 10px var(--font-mono); text-anchor: middle; }
.fb-svg .sname { fill: var(--muted); font: 700 10px var(--font-mono); text-anchor: middle; dominant-baseline: central; }
.fb-svg .nd { fill: var(--surface); stroke: var(--text); stroke-width: 1.5; }
.fb-svg .nd.root { fill: var(--accent); stroke: var(--accent); }
.fb-svg .nt { font: 700 9px var(--font-ui); text-anchor: middle; dominant-baseline: central; fill: var(--text); pointer-events: none; }
.fb-svg .nd.root + .nt { fill: var(--accent-ink); }
.fb-svg .hit { cursor: pointer; }
.fb-svg .hit:hover .nd { stroke: var(--accent); stroke-width: 2.5; }

/* ---------- tools ---------- */
.tool { padding: 28px; margin: 0 0 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--text); }
.metro-tool { display: grid; grid-template-columns: 280px 1fr; gap: 30px; align-items: center; }
.metro-dial { width: 260px; height: 260px; border-radius: 50%; display: grid; place-content: center; text-align: center; position: relative; margin: auto; background: radial-gradient(circle at 50% 40%, var(--surface-2), var(--bg-2)); border: 1px solid var(--line-2); box-shadow: inset 0 2px 30px rgba(0, 0, 0, .25); }
.metro-dial::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; transform: scale(.94); }
.metro-dial.pulse::before { animation: ripple .35s ease-out; }
.metro-dial.pulse.first::before { border-color: var(--accent-2); border-width: 4px; }
@keyframes ripple { 0% { opacity: .9; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.08); } }
.metro-dial .bpm { font: 700 76px/1 var(--font-display); letter-spacing: -.03em; }
.metro-dial .unit { font-size: 13px; color: var(--muted); letter-spacing: .2em; text-transform: uppercase; }
.metro-dial .tname { margin-top: 8px; font-family: var(--font-display); font-style: italic; color: var(--accent); }
.metro-controls { display: grid; gap: 18px; }
.range { width: 100%; accent-color: var(--accent); height: 28px; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px; flex-wrap: wrap; }
.seg button { padding: 6px 13px; border: 0; background: none; border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2); }
.seg button.on { background: var(--text); color: var(--bg); }
.ctl-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; display: block; }
.trainer-box { padding: 14px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.trainer-box .input { width: 80px; }

.tuner { display: grid; gap: 26px; }
.tuner-display { display: grid; justify-items: center; gap: 4px; padding: 10px 0; }
.tuner-note { font: 700 92px/1 var(--font-display); transition: color .2s; }
.tuner-note sup { font-size: .4em; }
.tuner-note.in { color: var(--green); }
.tuner-hz { font: 500 14px var(--font-mono); color: var(--muted); }
.gauge { width: min(420px, 100%); }
.gauge .tick { stroke: var(--line-2); stroke-width: 2; }
.gauge .tick.mid { stroke: var(--green); stroke-width: 3; }
.gauge .needle { stroke: var(--accent); stroke-width: 4; stroke-linecap: round; transition: transform .12s linear; transform-origin: 200px 190px; }
.gauge .needle.in { stroke: var(--green); }
.gauge .glabel { fill: var(--muted); font: 600 12px var(--font-ui); text-anchor: middle; }
.string-btns { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.string-btns button { padding: 14px 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; display: grid; gap: 2px; justify-items: center; transition: background .15s, transform .1s; }
.string-btns button strong { font: 700 22px/1 var(--font-display); }
.string-btns button small { font-size: 11px; color: var(--muted); }
.string-btns button:hover { background: var(--surface-3); }
.string-btns button.on { background: var(--accent-soft); border-color: var(--accent); }
.string-btns button.near { border-color: var(--green); }

.chord-lib-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.chord-lib-head .input { max-width: 260px; }
.chord-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.chord-lib-grid .chord-card { width: auto; }

.fb-tool-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.quiz-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 18px 0 12px; }
.quiz-prompt { font: 600 20px/1.3 var(--font-display); }
.note-btns { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.note-btns button { padding: 11px 0; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; font-weight: 700; font-size: 14px; transition: background .15s; }
.note-btns button:hover { background: var(--surface-3); }
.note-btns button.right { background: var(--green); color: #0d1f14; border-color: transparent; }
.note-btns button.wrong { background: var(--red); color: #fff; border-color: transparent; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.fb-svg .nd.quiz { fill: var(--accent); stroke: var(--accent); animation: glowDot 1.2s ease-in-out infinite; }
@keyframes glowDot { 50% { opacity: .55; } }
.score { display: flex; gap: 10px; }

/* ---------- admin ---------- */
.admin-head { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.admin-head h1 { font-size: clamp(30px, 4vw, 42px); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.kpi { padding: 18px 20px; }
.kpi strong { display: block; font: 700 32px/1.1 var(--font-display); margin-top: 6px; }
.kpi span { font-size: 13px; color: var(--muted); }
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.student-card { padding: 20px; display: grid; gap: 14px; text-decoration: none; transition: transform .2s, border-color .2s; }
.student-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.student-card .who { display: flex; gap: 12px; align-items: center; }
.student-card h3 { font-size: 19px; }
.student-card .sub { font-size: 13px; color: var(--muted); }
.student-card .meta { display: flex; gap: 8px; flex-wrap: wrap; }
.progress-line { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .done { background: var(--green); }
.bar .open { background: var(--accent); }

.student-head { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 24px; margin-bottom: 22px; }
.student-head h1 { font-size: 32px; }
.goal-input { border: 0; background: transparent; padding: 4px 0; width: 100%; color: var(--text-2); border-bottom: 1px dashed transparent; outline: none; }
.goal-input:hover, .goal-input:focus { border-bottom-color: var(--line-2); }
.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.admin-side { display: grid; gap: 18px; position: sticky; top: 84px; }
.lvl-block { margin-bottom: 18px; overflow: hidden; }
.lvl-block-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--lvl) 10%, transparent), transparent); }
.lvl-block-head h3 { font-size: 19px; }
.lrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); transition: background .2s; }
.lrow:last-child { border-bottom: 0; }
.lrow.is-locked .ltitle { color: var(--muted); }
.lrow .lnum { font: 700 13px var(--font-mono); color: var(--lvl); }
.lrow .ltitle { font-weight: 600; text-decoration: none; }
.lrow .ltitle:hover { color: var(--accent); }
.lrow .lmeta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.lrow .lctl { display: flex; gap: 10px; align-items: center; }
.lrow .note-edit { grid-column: 2 / -1; display: none; }
.lrow.editing .note-edit { display: grid; gap: 8px; }
.lrow.flash { background: var(--accent-soft); }
.date-input { padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 13px; width: 140px; }
.res-toggle { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.res-toggle:last-child { border-bottom: 0; }
.res-toggle .t { flex: 1; min-width: 0; }
.res-toggle .t strong { display: block; font-size: 14px; }
.res-toggle .t small { color: var(--muted); font-size: 12px; }
.log-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-item:last-child { border-bottom: 0; }
.log-item .min { font-weight: 700; color: var(--accent); min-width: 54px; }

.cred { padding: 18px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px dashed var(--accent); font-family: var(--font-mono); display: grid; gap: 6px; font-size: 14.5px; }
.cred b { color: var(--accent); font-weight: 600; }

.curr-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.curr-row:last-child { border-bottom: 0; }
.curr-row code { font: 12px var(--font-mono); color: var(--muted); }
.howto { padding: 22px; background: linear-gradient(135deg, var(--accent-soft), transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.howto code { font: 12.5px var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.howto ul { margin: 10px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14.5px; }

/* ---------- modal & toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(8, 5, 3, .6); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fadeIn .2s both; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(480px, 100%); padding: 28px; box-shadow: var(--shadow-lg); animation: pageIn .3s both; max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { font-size: 26px; margin-bottom: 6px; }
.modal form { display: grid; gap: 14px; margin-top: 18px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: 99px; background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: toastIn .3s cubic-bezier(.2, 1.3, .4, 1) both; display: flex; align-items: center; gap: 8px; }
.toast.err { background: var(--red); color: #fff; }
.toast.out { animation: toastOut .25s both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

.confetti { position: fixed; top: 0; left: 0; width: 9px; height: 14px; z-index: 300; pointer-events: none; border-radius: 2px; animation: confetti 1.6s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero, .dash-grid, .admin-layout { grid-template-columns: 1fr; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-side { position: static; }
  .admin-side { position: static; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .metro-tool { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 340px; padding: 28px; }
  .nav { display: none; }
  .topbar .brand { font-size: 16.5px; }
  .topbar .chip.accent { display: none; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .mobile-nav a { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 4px 12px; }
  .mobile-nav a.active { color: var(--accent); }
  .page { padding-bottom: 110px; }
  .student-head { grid-template-columns: auto 1fr; }
  .student-head .actions { grid-column: 1 / -1; }
  .note-btns { grid-template-columns: repeat(6, 1fr); }
  .level-progress { display: none; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 10px; }
  .stat strong { font-size: 20px; }
  .ring { width: 104px; height: 104px; }
  .hero-main, .hero-side { padding: 22px; }
  .up-next { flex-direction: column; align-items: flex-start; }
  .up-next .num { text-align: left; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .lrow { grid-template-columns: 28px minmax(0, 1fr); }
  .lrow .lctl { grid-column: 2; flex-wrap: wrap; }
  .strum-slots { gap: 3px; }
  .slot svg { width: 20px; height: 20px; }
  .string-btns { grid-template-columns: repeat(3, 1fr); }
  .metro-dial { width: 220px; height: 220px; }
  .metro-dial .bpm { font-size: 62px; }
  .tool { padding: 18px; }
  .pager { grid-template-columns: 1fr; }
  .pager a.next { grid-column: 1; }
  .tuner-note { font-size: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
