/* Drum Coach: dark Aero glass. Glossy panes over a blue-green aurora, aqua highlights, gold stars. */
:root {
  --bg: #04122a;
  --bg2: #051630;
  --card: rgba(16, 42, 80, 0.56);
  --card2: rgba(120, 180, 240, 0.10);
  --line: rgba(160, 210, 255, 0.22);
  --text: #f1f7ff;
  --muted: #a9c3df;
  --dim: #7b94b2;
  --accent: #5fd0ff;
  --accent-ink: #00213f;
  --gold: #ffd166;
  --good: #5be38f;
  --warn: #ffb347;
  --bad: #ff6b7a;
  --info: #8cc8ff;
  --radius: 12px;
  --shadow: 0 10px 34px rgba(0, 6, 22, 0.45);
  --bevel: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.03) 38%, rgba(255, 255, 255, 0) 60%);
  --gloss: linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.10) 48%, rgba(255, 255, 255, 0.02) 52%, rgba(255, 255, 255, 0.08) 100%);
  --font: "Segoe UI", "Open Sans", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
/* The aurora: deep blue sky, teal and green glows and two curved light streaks. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(150% 46% at 42% 74%, transparent 48%, rgba(140, 255, 220, 0.10) 49.4%, rgba(140, 255, 220, 0.02) 51%, transparent 52.5%),
    radial-gradient(140% 40% at 55% 66%, transparent 48%, rgba(180, 230, 255, 0.14) 49.5%, rgba(180, 230, 255, 0.03) 51.5%, transparent 53.5%),
    radial-gradient(90% 55% at 88% -8%, rgba(90, 200, 255, 0.38), transparent 62%),
    radial-gradient(70% 50% at -5% 105%, rgba(40, 220, 170, 0.26), transparent 62%),
    radial-gradient(60% 40% at 25% 28%, rgba(70, 110, 255, 0.16), transparent 70%),
    linear-gradient(180deg, #0b3166 0%, #072650 38%, #04142e 100%);
}
/* Paints the phone's status-bar strip above the sticky header. */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10;
  background: #0a2a55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 8px; text-wrap: balance; }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; text-shadow: 0 0 22px rgba(120, 200, 255, 0.35); }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; font-weight: 700; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
kbd {
  display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 5px;
  background: linear-gradient(180deg, #34557f, #1b3354); border: 1px solid #0a1a30;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 0 rgba(0, 0, 0, 0.5);
  font: 600 12px/1.5 ui-monospace, Consolas, monospace; text-align: center; color: var(--text);
}

/* ---------- header: a glass title bar ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding-block: 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: linear-gradient(180deg, rgba(130, 180, 240, 0.30) 0%, rgba(50, 95, 160, 0.26) 48%, rgba(8, 26, 56, 0.62) 52%, rgba(10, 32, 66, 0.70) 100%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(0, 8, 24, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.10), 0 6px 22px rgba(0, 0, 0, 0.35);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 400; font-size: 20px; letter-spacing: 0.01em; text-shadow: 0 0 12px rgba(140, 210, 255, 0.65); white-space: nowrap; }
.brand b { font-weight: 700; }
.brand:hover { text-decoration: none; }
.orb {
  position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 78%, #8ff0ff 0%, #2f9be6 40%, #0b4796 70%, #052a5e 100%);
  box-shadow: inset 0 -3px 8px rgba(130, 240, 255, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(0, 10, 30, 0.8), 0 0 14px rgba(95, 208, 255, 0.55);
}
.orb::after {
  content: ""; position: absolute; left: 5px; right: 5px; top: 2px; height: 48%; border-radius: 50% 50% 45% 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.08));
  pointer-events: none;
}
.orb svg { width: 24px; height: 24px; position: relative; top: 1px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  color: #d9eaff; padding: 7px 14px; border-radius: 6px; font-weight: 600; border: 1px solid transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); text-align: center; white-space: nowrap;
}
.nav a:hover { text-decoration: none; background: var(--gloss), rgba(120, 180, 255, 0.16); border-color: rgba(255, 255, 255, 0.22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 10px rgba(95, 208, 255, 0.22); }
.nav a.on {
  color: #fff; background: var(--gloss), rgba(60, 140, 225, 0.42); border-color: rgba(0, 12, 32, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 14px rgba(120, 215, 255, 0.35), 0 0 12px rgba(95, 208, 255, 0.35);
}
.kit-badge {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px; background: var(--gloss), rgba(20, 50, 95, 0.6); border: 1px solid rgba(0, 10, 30, 0.7);
  box-shadow: var(--bevel); color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.kit-badge:hover { text-decoration: none; box-shadow: var(--bevel), 0 0 12px rgba(95, 208, 255, 0.4); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #c8d6e6, #56657a); flex: none; }
.dot.on { background: radial-gradient(circle at 40% 35%, #d9ffe6, #2fc46a 60%); box-shadow: 0 0 8px var(--good); }
.dot.warn { background: radial-gradient(circle at 40% 35%, #fff0cf, #f39b1f 60%); box-shadow: 0 0 8px var(--warn); }

main {
  max-width: 1168px; margin: 0 auto; outline: none;
  padding-block: 24px 80px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- building blocks ---------- */
.card {
  background: var(--sheen), var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--bevel), var(--shadow); min-width: 0;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.card + .card, .stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.cols > * { min-width: 0; }
.cols > .card + .card { margin-top: 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 7px; border: 1px solid rgba(0, 10, 30, 0.8);
  background: var(--gloss), rgba(38, 78, 130, 0.62); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 1px 2px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  font: 600 14px/1.2 var(--font); cursor: pointer; white-space: nowrap;
  transition: box-shadow 0.15s, background-color 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:hover { text-decoration: none; background-color: rgba(55, 125, 200, 0.66); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 14px rgba(95, 208, 255, 0.45); }
.btn:active { transform: translateY(1px); background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(255, 255, 255, 0.06)), rgba(30, 90, 160, 0.75); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn.primary {
  color: #fff; border-color: #083a72;
  background: linear-gradient(180deg, #a3e7ff 0%, #52bdf4 46%, #1b86d8 50%, #2aa5ee 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -3px 7px rgba(150, 240, 255, 0.5), 0 0 14px rgba(70, 180, 255, 0.45);
  text-shadow: 0 1px 2px rgba(0, 40, 90, 0.85);
}
.btn.primary:hover { background: linear-gradient(180deg, #c1f0ff 0%, #6ccbf8 46%, #2b97e4 50%, #46b8f6 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 -3px 7px rgba(170, 245, 255, 0.6), 0 0 22px rgba(95, 208, 255, 0.8); }
.btn.primary:active { background: linear-gradient(180deg, #3ea2e6 0%, #1a7fd0 50%, #2a9be6 100%); }
.btn.danger { background: var(--gloss), rgba(150, 30, 48, 0.55); border-color: #3d0c14; color: #ffd6db; }
.btn.danger:hover { background-color: rgba(190, 40, 60, 0.6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 14px rgba(255, 100, 120, 0.45); }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.big { padding: 12px 24px; font-size: 16px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--gloss), rgba(120, 180, 255, 0.14); border-color: rgba(255, 255, 255, 0.2); }
.btn.on { border-color: #0a3f78; color: #fff; background: var(--gloss), rgba(40, 150, 230, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 0 12px rgba(140, 225, 255, 0.45); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--gloss), rgba(70, 120, 190, 0.28); color: #cfe2f7; border: 1px solid rgba(160, 210, 255, 0.25);
}
.tag.gold { color: #ffe3a0; background: var(--gloss), rgba(190, 140, 30, 0.30); border-color: rgba(255, 210, 110, 0.45); }
.tag.green { color: #b9ffd2; background: var(--gloss), rgba(40, 170, 90, 0.30); border-color: rgba(110, 240, 160, 0.4); }
.tag.aqua { color: #c7f1ff; background: var(--gloss), rgba(40, 160, 230, 0.32); border-color: rgba(120, 220, 255, 0.45); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

.stars { color: var(--gold); letter-spacing: 2px; white-space: nowrap; text-shadow: 0 0 8px rgba(255, 200, 80, 0.55); }
.stars .off { color: rgba(170, 200, 235, 0.25); text-shadow: none; }

/* Vista-style glossy green progress bar */
.bar { height: 10px; border-radius: 999px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(255, 255, 255, 0.06)); border: 1px solid rgba(0, 10, 30, 0.6); overflow: hidden; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12); }
.bar > i { display: block; height: 100%; background: linear-gradient(180deg, #b6f7a9 0%, #4fd650 48%, #22a52a 52%, #47d24f 100%); border-radius: inherit; box-shadow: 0 0 8px rgba(90, 230, 110, 0.6); }

.banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 10px;
  background: var(--sheen), rgba(20, 50, 92, 0.6); border: 1px solid var(--line); font-size: 14px;
  box-shadow: var(--bevel);
}
.banner.warn { border-color: rgba(255, 190, 90, 0.45); background: var(--sheen), rgba(110, 70, 10, 0.45); }
.banner.info { border-color: rgba(120, 200, 255, 0.45); background: var(--sheen), rgba(20, 70, 130, 0.5); }
.banner .btn { margin-left: auto; }

input[type=range] { accent-color: var(--accent); width: 160px; max-width: 100%; vertical-align: middle; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; vertical-align: -3px; }
select {
  background: var(--gloss), rgba(30, 64, 110, 0.85); color: var(--text); border: 1px solid rgba(0, 10, 30, 0.75); border-radius: 7px;
  padding: 7px 10px; font: inherit; max-width: 100%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
select option { background: #0b2346; color: var(--text); }
label.tog { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; }
label.tog:hover { color: var(--text); }

/* Phone link on the computer's Setup page. QR codes need a white quiet zone to scan. */
.phone-link { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-top: 10px; }
.phone-link > div:last-child { flex: 1 1 280px; min-width: 0; }
.qr { width: 180px; max-width: 100%; padding: 10px; border-radius: 10px; background: #fff; box-shadow: var(--bevel), 0 0 18px rgba(95, 208, 255, 0.35); }
.qr svg { display: block; width: 100%; height: auto; }
.phone-link code {
  font: 600 15px/1.4 ui-monospace, Consolas, monospace; color: var(--accent); min-width: 0; overflow-wrap: anywhere;
  padding: 5px 9px; border-radius: 7px; background: rgba(0, 10, 30, 0.45); border: 1px solid var(--line); user-select: all;
}
.phone-link ul { display: grid; gap: 4px; margin: 12px 0 0; padding-left: 18px; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center; margin-bottom: 20px; }
.hero > * { min-width: 0; }
.hero h1 { font-size: 36px; font-weight: 300; letter-spacing: -0.015em; }
.hero h1 b { font-weight: 700; color: #bfeaff; }
.hero p { color: var(--muted); font-size: 16px; max-width: 540px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat {
  background: var(--sheen), var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center;
  box-shadow: var(--bevel);
}
.stat b { display: block; font-size: 22px; color: #fff; text-shadow: 0 0 12px rgba(120, 210, 255, 0.5); }
.stat span { color: var(--muted); font-size: 12px; }

.continue {
  color: var(--text); display: flex; align-items: center; gap: 18px;
  border-color: rgba(120, 210, 255, 0.45);
  background: linear-gradient(115deg, rgba(60, 170, 240, 0.30), rgba(16, 42, 80, 0.5) 55%), var(--card);
  box-shadow: var(--bevel), 0 0 26px rgba(70, 180, 255, 0.18), var(--shadow);
}
.continue h2 { margin: 2px 0 4px; }
.continue:hover { text-decoration: none; }

.levels { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.level {
  display: flex; flex-direction: column; gap: 8px; color: var(--text); min-width: 0;
  background: var(--sheen), var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--bevel), var(--shadow);
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.level:hover { text-decoration: none; border-color: rgba(140, 220, 255, 0.6); transform: translateY(-2px); box-shadow: var(--bevel), 0 0 22px rgba(95, 208, 255, 0.3), var(--shadow); }
.level .n { font: 700 12px/1 var(--font); color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.level h2 { margin: 0; }
.level p { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.level.locked { opacity: 0.55; }
.level.locked .n { color: var(--dim); }
.level .foot { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.level .foot .bar { flex: 1; }

/* ---------- level page and song list ---------- */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.items { display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  background: var(--sheen), var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; color: var(--text);
  box-shadow: var(--bevel);
}
.item:hover { text-decoration: none; border-color: rgba(140, 220, 255, 0.55); box-shadow: var(--bevel), 0 0 16px rgba(95, 208, 255, 0.25); }
.num, .item .num {
  position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 50% 80%, #6fb8f0 0%, #2a6cb8 50%, #143e78 100%); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 0 0 1px rgba(0, 10, 30, 0.7);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.num::after { content: ""; position: absolute; left: 5px; right: 5px; top: 2px; height: 45%; border-radius: 50%; background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)); }
.item.passed .num, .num.done { background: radial-gradient(circle at 50% 80%, #8ff5a8 0%, #2ebd5c 50%, #157a35 100%); }
.item h4 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.item p { margin: 0; color: var(--muted); font-size: 13px; }
.item .right { text-align: right; font-size: 13px; color: var(--muted); }
.item.locked { opacity: 0.5; pointer-events: none; }

.songs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.song {
  display: flex; flex-direction: column; gap: 8px; color: var(--text); min-width: 0;
  background: var(--sheen), var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--bevel), var(--shadow); transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.song:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(140, 220, 255, 0.6); box-shadow: var(--bevel), 0 0 22px rgba(95, 208, 255, 0.3), var(--shadow); }
.song.locked { opacity: 0.7; }
.song h2 { margin: 0; }
.song p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.song .tags { margin: 0; }
.song .foot { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.minimap { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.minimap i { display: block; height: 100%; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; }

/* ---------- lesson page ---------- */
.lesson-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 14px; }
.lesson-head > div:first-child { min-width: 0; }
.lesson-head .best { margin-left: auto; text-align: right; }
.lesson-head .best .stars { font-size: 22px; }
.stage { padding: 14px 14px 12px; scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 70px); }
.stage canvas {
  display: block; width: 100%; border-radius: 8px; background: var(--bg2);
  border: 1px solid rgba(0, 6, 18, 0.8); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.12);
}
.hud { display: flex; align-items: center; gap: 16px; min-height: 40px; padding: 8px 4px 2px; }
.hud .where { color: var(--muted); font-size: 14px; min-width: 200px; }
.hud .where b { color: var(--accent); }
.judge { font-weight: 800; font-size: 20px; min-width: 190px; text-align: center; transition: opacity 0.25s; text-shadow: 0 0 14px currentColor; }
.hud .live { margin-left: auto; color: var(--muted); font-size: 14px; text-align: right; }
.hud .live b { color: var(--text); }
.controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 4px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
.tempo { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.tempo output { color: var(--text); min-width: 110px; }
.hint { color: var(--dim); font-size: 12.5px; margin: 8px 4px 0; }
.countdown {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-weight: 800; font-size: 64px; line-height: 1; color: rgba(140, 225, 255, 0.92); text-shadow: 0 0 30px rgba(60, 170, 255, 0.9), 0 4px 20px rgba(0, 0, 0, 0.6);
}
.stage-wrap { position: relative; }
.practice-part { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 4px 0; }
.practice-part label { color: var(--muted); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }

.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5); }

.songmap { display: flex; gap: 3px; margin: 8px 0 12px; height: 34px; }
.songmap div {
  border-radius: 6px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #06122a;
  overflow: hidden; white-space: nowrap; padding: 0 4px; min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -8px 12px rgba(0, 0, 0, 0.12);
}
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain td, table.plain th { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.plain th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

/* step-by-step song guide */
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.steps li {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: var(--card2); border: 1px solid rgba(160, 210, 255, 0.14);
}
.steps li.current { border-color: rgba(120, 215, 255, 0.6); box-shadow: 0 0 16px rgba(95, 208, 255, 0.22); }
.steps h4 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.steps p { margin: 0; color: var(--muted); font-size: 13px; }
.steps .act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- tap pads for phones and tablets ---------- */
.pads {
  display: grid; gap: 8px; margin-top: 10px;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.prow { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.pad {
  --c: #5fd0ff;
  position: relative; height: var(--padh, 78px); border-radius: 14px; border: 1px solid rgba(0, 6, 20, 0.85);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.30) 0%, rgba(255, 255, 255, 0.08) 46%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(rgba(4, 16, 40, 0.48), rgba(4, 16, 40, 0.48)),
    var(--c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.4);
  color: #fff; font: 700 15px/1.1 var(--font); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: none; padding: 4px;
  transition: filter 0.12s, box-shadow 0.12s, transform 0.06s;
}
.pad small { font-weight: 600; font-size: 11px; opacity: 0.85; }
.pad.hit {
  filter: brightness(1.55) saturate(1.2); transform: scale(0.97); transition: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 24px var(--c), 0 0 4px #fff;
}
.pad.cym { border-radius: 50% / 38%; }
.padbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 13px; }

/* ---------- results ---------- */
.results { margin-top: 16px; border-color: rgba(140, 215, 255, 0.4); }
.score-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.score {
  font: 800 56px/1 var(--font); letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 0%, #bfeaff 50%, #5fc4ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 12px rgba(95, 208, 255, 0.45));
}
.score small { font-size: 20px; font-weight: 700; }
.score-row .stars { font-size: 34px; }
.headline { min-width: 0; }
.headline h2 { margin: 0 0 4px; font-size: 22px; }
.xp { margin-left: auto; text-align: right; }
.xp b { color: var(--gold); font-size: 22px; text-shadow: 0 0 10px rgba(255, 200, 80, 0.5); }
.counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--gloss), rgba(60, 110, 180, 0.3); border: 1px solid rgba(160, 210, 255, 0.2); font-size: 13px; font-weight: 600; }
.chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: 0 0 6px currentColor; }
.offsets { display: block; width: 100%; height: 160px; background: var(--bg2); border-radius: 8px; margin: 8px 0 14px; border: 1px solid rgba(0, 6, 18, 0.8); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55); }
.feedback { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.feedback > * { min-width: 0; }
.finding { background: var(--card2); border: 1px solid rgba(160, 210, 255, 0.14); border-left: 4px solid var(--warn); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.finding.big { border-left-color: var(--bad); }
.finding h4 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.finding p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.finding ul { margin: 0; padding-left: 18px; font-size: 14px; }
.finding li + li { margin-top: 3px; }
.positive { background: rgba(40, 170, 90, 0.16); border: 1px solid rgba(110, 240, 160, 0.2); border-left: 4px solid var(--good); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- setup ---------- */
#modal .kits { grid-template-columns: 1fr 1fr; }
.kits { grid-template-columns: repeat(4, 1fr); }
.kit {
  text-align: left; cursor: pointer; background: var(--sheen), var(--card2); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; color: var(--text); font: inherit; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  box-shadow: var(--bevel); transition: box-shadow 0.15s, border-color 0.15s;
}
.kit:hover { border-color: rgba(140, 220, 255, 0.55); box-shadow: var(--bevel), 0 0 14px rgba(95, 208, 255, 0.25); }
.kit.on { border-color: rgba(120, 215, 255, 0.9); background: linear-gradient(180deg, rgba(90, 200, 255, 0.28), rgba(40, 120, 210, 0.18)); box-shadow: var(--bevel), 0 0 20px rgba(95, 208, 255, 0.45); }
.kit:disabled { opacity: 0.5; cursor: not-allowed; }
.kit:disabled:hover { border-color: var(--line); box-shadow: var(--bevel); }
.kit .ico { font-size: 26px; line-height: 1; }
.kit b { font-size: 15px; }
.kit span { color: var(--muted); font-size: 13px; }
.meter { position: relative; height: 16px; background: var(--bg2); border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 6, 18, 0.8); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5); }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #4fd650, #ffd166 70%, #ff6b7a); width: 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.meter > b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #fff; box-shadow: 0 0 6px #fff; }
.heard { display: inline-flex; align-items: center; gap: 8px; min-width: 160px; font-weight: 700; }
.pips { display: inline-flex; gap: 4px; }
.pips i { width: 10px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.pips i.on { background: radial-gradient(circle at 40% 35%, #e0f8ff, var(--accent) 60%); border-color: var(--accent); box-shadow: 0 0 6px var(--accent); }
.flash { animation: flash 0.35s ease-out; }
@keyframes flash { from { background: rgba(95, 208, 255, 0.35); } to { background: transparent; } }
.field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.field > label:first-child { min-width: 150px; color: var(--muted); font-weight: 600; font-size: 14px; }

/* ---------- free practice ---------- */
.metro { text-align: center; }
.bpm { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 10px; }
.bpm .val { font: 300 64px/1 var(--font); min-width: 140px; letter-spacing: -0.03em; text-shadow: 0 0 22px rgba(120, 210, 255, 0.55); }
.bpm .unit { color: var(--muted); font-weight: 700; }
.beats { display: flex; justify-content: center; gap: 12px; margin: 18px 0 6px; }
.beats i {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 8, 24, 0.8);
  background: radial-gradient(circle at 50% 80%, #2b4f7e, #142a4a 70%); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35);
  transition: background 0.06s, box-shadow 0.06s;
}
.beats i.first { border-color: rgba(255, 210, 110, 0.7); }
.beats i.lit { background: radial-gradient(circle at 50% 80%, #c8f4ff, #43b9f5 55%, #1a72c8); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8), 0 0 16px rgba(95, 208, 255, 0.85); }
.beats i.lit.mute { background: transparent; border-color: var(--accent); box-shadow: 0 0 8px rgba(95, 208, 255, 0.5); }
.metro .row { justify-content: center; }
.tmeter { display: block; width: 100%; height: 120px; background: var(--bg2); border-radius: 8px; margin-top: 8px; border: 1px solid rgba(0, 6, 18, 0.8); box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55); }

/* ---------- toast & modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--gloss), rgba(14, 40, 78, 0.92); border: 1px solid rgba(160, 215, 255, 0.4); color: var(--text); padding: 10px 18px; border-radius: 10px;
  box-shadow: var(--bevel), 0 0 18px rgba(95, 208, 255, 0.25), var(--shadow); transition: opacity 0.2s, transform 0.2s; z-index: 60;
  max-width: calc(100vw - 32px); width: max-content;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(2, 8, 20, 0.6); display: grid; place-items: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.modal[hidden] { display: none; }
.modal .box {
  background: var(--sheen), rgba(10, 32, 64, 0.88); border: 1px solid rgba(170, 220, 255, 0.4); border-radius: 14px; padding: 24px;
  width: min(720px, 100%); max-height: 100%; overflow: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.5), 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(70, 170, 255, 0.18);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
}
.modal .box.narrow { width: min(460px, 100%); }
.choices { display: grid; gap: 8px; margin: 14px 0; }
.choice {
  text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--sheen), var(--card2);
  color: var(--text); font: inherit; cursor: pointer; display: flex; gap: 12px; align-items: center; box-shadow: var(--bevel);
}
.choice:hover { border-color: rgba(120, 215, 255, 0.8); box-shadow: var(--bevel), 0 0 14px rgba(95, 208, 255, 0.3); }
.choice .lv { color: var(--accent); font-weight: 700; font-size: 12px; min-width: 64px; text-transform: uppercase; letter-spacing: 0.06em; }

@media (max-width: 900px) {
  .hero, .cols, .feedback { grid-template-columns: 1fr; }
  .levels, .kits { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 27px; }
  main { padding-block: 14px 60px; }
  .top { position: relative; top: auto; padding-block: 8px 6px; gap: 8px; flex-wrap: wrap; }
  .stage { scroll-margin-top: calc(env(safe-area-inset-top, 0px) + 8px); }
  .brand { font-size: 18px; }
  .orb { width: 32px; height: 32px; }
  .orb svg { width: 20px; height: 20px; }
  .nav { margin-left: 0; order: 3; width: 100%; gap: 3px; }
  .nav a { flex: 1; padding: 7px 4px; font-size: 13.5px; }
  .kit-badge { padding: 5px 10px; font-size: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .levels, .kits, #modal .kits { grid-template-columns: 1fr; }
  .continue { flex-wrap: wrap; gap: 12px; }
  .continue .btn { width: 100%; }
  .card { padding: 14px; }
  .item { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .item .num { width: 30px; height: 30px; }
  .lesson-head { flex-direction: column; gap: 6px; }
  .lesson-head .best { margin-left: 0; text-align: left; }
  .stage { padding: 8px 8px 10px; }
  .hud { flex-wrap: wrap; gap: 4px 12px; }
  .hud .where { min-width: 0; flex: 1 1 60%; }
  .judge { min-width: 0; font-size: 17px; order: 3; flex-basis: 100%; text-align: left; min-height: 22px; }
  .controls { gap: 10px; }
  .controls .spacer { display: none; }
  .controls .btn.big { flex: 1 1 100%; }
  .controls .btn { flex: 1; }
  .tempo { width: 100%; }
  .tempo input[type=range] { flex: 1; width: auto; }
  .tempo output { min-width: 0; }
  .steps li { grid-template-columns: 30px minmax(0, 1fr); }
  .steps li .num { width: 30px; height: 30px; }
  .steps .act { grid-column: 1 / -1; justify-content: flex-start; }
  .score { font-size: 44px; }
  .xp { margin-left: 0; text-align: left; }
  .field > label:first-child { min-width: 0; flex-basis: 100%; }
  .heard { min-width: 0; }
  .bpm { gap: 6px; }
  .bpm .val { font-size: 46px; min-width: 84px; }
  .bpm .unit { font-size: 12px; }
  .bpm .btn { padding-inline: 10px; }
  .beats { gap: 8px; }
  .modal .box { padding: 18px; }
  .songs { grid-template-columns: 1fr; }
}
