:root {
  --bg: #080910;
  --surface: #0f1020;
  --card: #161829;
  --border: #1e2038;
  --border-light: #2a2d50;
  --accent: #7c6dfa;
  --accent-dim: rgba(124, 109, 250, 0.14);
  --accent-hover: #8f82fc;
  --text: #f0f2ff;
  --text-muted: #5d6280;
  --text-dim: #333655;
  --warning: #ff6b6b;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background:
    radial-gradient(ellipse 80% 60% at 20% 15%, rgba(124, 109, 250, 0.1) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 80% 85%, rgba(80, 60, 240, 0.07) 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.app {
  max-width: 700px;
  margin: 0 auto;
  padding: 36px 16px 56px;
}

/* ── Light mode ──────────────────────────────────────────────────────────────── */

[data-theme="light"] {
  --bg: #f0f1ff;
  --surface: #f7f8fe;
  --card: #ffffff;
  --border: #d8dbf5;
  --border-light: #bfc4e8;
  --accent: #6854f8;
  --accent-dim: rgba(104, 84, 248, 0.1);
  --accent-hover: #7c6dfa;
  --text: #12132a;
  --text-muted: #4d5075;
  --text-dim: #8890b0;
  --warning: #e03535;
}

[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 60% at 20% 15%, rgba(108, 95, 255, 0.1) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 80% 85%, rgba(80, 60, 240, 0.06) 0%, transparent 60%),
    var(--bg);
}

[data-theme="light"] .prompt-card {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, rgba(104,84,248,0.3), rgba(104,84,248,0.04) 50%, rgba(104,84,248,0.16)) border-box;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.06),
    0 8px 32px rgba(0,0,0,0.12),
    0 0 60px rgba(108, 95, 255, 0.07),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

[data-theme="light"] .undo-toast {
  box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
}

[data-theme="light"] .backup-toast {
  box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
}

/* ── Header ─────────────────────────────────────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 36px;
}

header h1 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.help-btn {
  position: absolute;
  left: 0;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  touch-action: manipulation;
}

.help-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.theme-toggle {
  position: absolute;
  right: 0;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  touch-action: manipulation;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Prompt Card ─────────────────────────────────────────────────────────────── */

.prompt-card {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, rgba(124,109,250,0.55), rgba(124,109,250,0.04) 50%, rgba(124,109,250,0.32)) border-box;
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 60px 48px;
  text-align: center;
  min-height: 204px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.4),
    0 20px 60px rgba(0,0,0,0.55),
    0 0 90px rgba(124, 109, 250, 0.1),
    inset 0 1px 0 rgba(255,255,255,0.06);
  margin-bottom: 20px;
  transition: opacity 0.12s ease;
}

.prompt-card.flash {
  opacity: 0;
}

.prompt-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.prompt-line {
  display: block;
  font-size: clamp(2rem, 8vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(124, 109, 250, 0.25);
}

.prompt-line.secondary {
  font-size: clamp(1.1rem, 4vw, 1.7rem);
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: -0.015em;
  text-shadow: none;
}

.prompt-card.empty .prompt-line {
  font-size: clamp(0.9rem, 3vw, 1.05rem);
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0;
}

.next-prompt-row {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -8px;
  margin-bottom: 16px;
}

.next-prompt-row.hidden {
  display: none;
}

.next-prompt-label {
  font-weight: 600;
  opacity: 0.7;
}

/* ── Structure hint ─────────────────────────────────────────────────────────── */

.hint-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  margin: -2px 0 6px;
}

.hint-row.hidden { display: none; }

.hint-toggle-btn {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 9px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.hint-toggle-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.hint-toggle-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}

.prompt-hint {
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.prompt-hint.hidden { display: none; }

/* ── Controls ────────────────────────────────────────────────────────────────── */

/* 3-column grid: equal spacers flank the button, timer goes in the right column */
.controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 10px;
}

.next-btn {
  grid-column: 2;
  background: linear-gradient(135deg, #5b48ee 0%, #9183fb 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px 40px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  touch-action: manipulation;
  box-shadow:
    0 4px 20px rgba(108, 95, 255, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.22);
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
}

.next-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow:
    0 8px 28px rgba(108, 95, 255, 0.58),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

.next-btn:active {
  transform: translateY(1px) scale(0.97);
  filter: brightness(0.95);
  box-shadow:
    0 2px 8px rgba(108, 95, 255, 0.3),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

.back-btn {
  grid-column: 1;
  justify-self: end;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  touch-action: manipulation;
  flex-shrink: 0;
}

.back-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.back-btn:disabled {
  opacity: 0.22;
  cursor: not-allowed;
}

.right-controls {
  grid-column: 3;
  padding-left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-display {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.timer-display.warning {
  color: var(--warning);
}

/* Hide the timer display when empty so Next Prompt stays truly centered */
.timer-display:empty {
  display: none;
}

.hold-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  touch-action: manipulation;
}

.hold-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hold-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.hold-btn.hidden {
  display: none;
}

.hear-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  touch-action: manipulation;
}

.hear-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hear-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hear-btn.hidden {
  display: none;
}

.kbd-hint {
  text-align: center;
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

kbd {
  font-family: inherit;
  font-size: 0.72rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text-muted);
}

/* ── Settings ────────────────────────────────────────────────────────────────── */

.settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* Collapsible group header */
.group-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
  text-align: left;
}

.group-toggle:hover {
  color: var(--text);
  background: rgba(255,255,255,0.02);
}

.chevron {
  flex-shrink: 0;
  transition: transform 0.22s ease;
  opacity: 0.5;
}

.group-toggle[aria-expanded="false"] .chevron {
  transform: rotate(-90deg);
}

/* Smooth collapse via max-height */
.group-body {
  overflow: hidden;
  max-height: 3000px;
  transition: max-height 0.3s ease;
}

.group-body.group-collapsed {
  max-height: 0;
}

.group-body-inner {
  padding: 0 20px 20px;
}

/* ── Timer pills ─────────────────────────────────────────────────────────────── */

.timer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 4px;
  background: var(--bg);
  border-radius: 10px;
}

.radio-pill {
  position: relative;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

.radio-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.radio-pill:has(input:checked) {
  background: var(--accent);
  color: #fff;
}

.radio-pill:not(:has(input:checked)):hover {
  background: var(--border-light);
  color: var(--text);
}

.custom-timer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.custom-timer-row.hidden {
  display: none;
}

#customTimer {
  width: 64px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.95rem;
  font-family: inherit;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}

#customTimer:focus {
  border-color: var(--accent);
}

/* ── Metronome panel ─────────────────────────────────────────────────────────── */

.metro-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metro-panel.hidden {
  display: none;
}

.metro-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metro-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 100px;
}

#metroBpm {
  width: 72px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.95rem;
  font-family: inherit;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}

#metroBpm:focus {
  border-color: var(--accent);
}

#tapBtn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 6px 16px;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  touch-action: manipulation;
}

#tapBtn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#tapBtn:active {
  background: var(--accent-dim);
}

@keyframes metro-pulse {
  from { transform: scale(1.4); opacity: 0.5; }
  to   { transform: scale(1);   opacity: 1;   }
}

.timer-display.metro-accent {
  color: var(--accent);
  animation: metro-pulse 0.12s ease-out;
}

.timer-display.metro-beat {
  color: var(--text-muted);
  animation: metro-pulse 0.12s ease-out;
}

.band-mode-row {
  margin-bottom: 0;
}

/* ── Categories ──────────────────────────────────────────────────────────────── */

.category {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.category:last-child {
  padding-bottom: 0;
  border-bottom: none;
  margin-bottom: 0;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  user-select: none;
  color: var(--text);
}

.category-header input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.category-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding-left: 25px;
}

.category-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.1s;
  padding: 3px 0;
}

.category-options label:hover {
  color: var(--text);
}

.category-options.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.inversion-toggle.disabled {
  opacity: 0.3;
  pointer-events: none;
}

.option-divider {
  width: 100%;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.inversion-toggle {
  margin-top: 6px;
  width: 100%;
  color: var(--accent) !important;
  font-style: italic;
}

input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── Key selector ────────────────────────────────────────────────────────────── */

.key-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

select {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

select:focus {
  border-color: var(--accent);
}

/* ── Root Notes (pill toggles) ───────────────────────────────────────────────── */

.notes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notes-grid label {
  position: relative;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  user-select: none;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.notes-grid label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.notes-grid label:has(input:checked) {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.notes-grid label:not(:has(input:checked)):hover {
  background: var(--border-light);
  color: var(--text);
}

.enharmonic-header {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 10px 0 6px;
}

.enharmonic-eq {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: 2px;
}

/* ── Shuffle button ──────────────────────────────────────────────────────────── */

.settings-hint {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 0.55;
}

#shuffleBtn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--text-muted);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.1s;
  touch-action: manipulation;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#shuffleBtn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

#shuffleBtn:active {
  transform: scale(0.98);
}

/* ── Undo toast ──────────────────────────────────────────────────────────────── */

.undo-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 12px 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem;
  color: var(--text-muted);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  overflow: hidden;
}

.undo-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Shrinking progress bar */
.undo-toast::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  border-radius: 0 0 12px 12px;
  transform-origin: left;
  transform: scaleX(0);
}

.undo-toast.visible::after {
  animation: toast-progress 4s linear forwards;
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── Backup toast ────────────────────────────────────────────────────────────── */

.backup-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 0.875rem;
  color: var(--text-muted);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}

.backup-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#undoBtn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
  flex-shrink: 0;
}

#undoBtn:hover {
  filter: brightness(1.15);
}

/* ── Focus visible ───────────────────────────────────────────────────────────── */

/* Suppress browser default focus ring on mouse click; only show for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

/* All interactive button/select elements */
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Group toggle — inset so the outline fits inside the card corner radius */
.group-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
  border-radius: 15px;
}

/* Number inputs already show border-color on :focus; add outline for keyboard too */
input[type="number"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Pill buttons: the real input is visually hidden; show focus ring on the label */
.radio-pill input:focus,
.notes-grid label input:focus {
  outline: none;
}

.radio-pill:has(input:focus-visible),
.notes-grid label:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Category checkbox labels: highlight the whole label row when focused */
.category-options label:has(input:focus-visible) {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}

/* ── Reduced motion ──────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  /* Keep the card visible during the JS-triggered flash swap */
  .prompt-card.flash {
    opacity: 1;
  }
}

/* ── Practice session timer ──────────────────────────────────────────────────── */

.session-countdown {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px 12px;
  margin-bottom: 28px;
}

.session-countdown.hidden {
  display: none;
}

.session-cd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.session-cd-time {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.session-cd-label {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.session-cd-stop {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
  touch-action: manipulation;
}

.session-cd-stop:hover {
  border-color: var(--warning);
  color: var(--warning);
}

.session-cd-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.session-cd-fill {
  height: 100%;
  background: linear-gradient(90deg, #5b48ee, #9183fb);
  border-radius: 2px;
  width: 0%;
  transition: width 1s linear;
}

.goal-progress-row {
  margin-top: 8px;
}

.goal-progress-row.hidden { display: none; }

.goal-progress-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.goal-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.goal-track-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

.goal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.goal-input-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.goal-input {
  width: 72px;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-light);
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  text-align: center;
}

.goal-input:focus { outline: none; border-color: var(--accent); }

.drill-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  gap: 10px;
}

.drill-banner.hidden { display: none; }

.drill-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.drill-stop-btn {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  padding: 3px 9px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.drill-stop-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.drill-btn {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, opacity 0.15s;
}

.drill-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.duration-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.duration-pill {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  touch-action: manipulation;
}

.duration-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.duration-pill.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.session-start-btn {
  background: linear-gradient(135deg, #5b48ee 0%, #9183fb 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 28px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
  touch-action: manipulation;
  box-shadow: 0 2px 12px rgba(108, 95, 255, 0.4);
}

.session-start-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.session-start-btn:active {
  filter: brightness(0.95);
  transform: translateY(0);
}

/* ── MIDI ────────────────────────────────────────────────────────────────────── */

.midi-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: -28px;
  margin-bottom: 40px;
}

.midi-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 7px;
  color: var(--text-dim);
  padding: 4px 12px;
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  touch-action: manipulation;
}

.midi-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.midi-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.midi-status {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.synth-vol-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

#synthVolWrap.hidden { display: none; }

.synth-preset {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-muted);
  padding: 3px 6px;
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.synth-preset:focus { border-color: var(--accent); }

.synth-vol-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}

.synth-vol-label input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 3px;
  background: var(--border-light);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.synth-vol-label input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.synth-vol-label input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* ── Response time display ───────────────────────────────────────────────────── */

.rt-display {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--accent);
  height: 0;
  overflow: visible;
  opacity: 0;
  margin-bottom: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.rt-display.visible {
  opacity: 1;
  height: auto;
  margin-bottom: 6px;
}

.rt-display.fade-out {
  opacity: 0;
  transition: opacity 0.5s;
}

.midi-stats {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  margin-top: -6px;
  margin-bottom: 16px;
}

#midiStats.hidden { display: none; }

/* ── Piano keyboard ──────────────────────────────────────────────────────────── */

.piano-keyboard {
  position: relative;
  height: 80px;
  margin-bottom: 28px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}

.piano-keyboard::-webkit-scrollbar { display: none; }

#pianoKeyboard.hidden { display: none; }

.piano-key {
  position: absolute;
  border-radius: 0 0 6px 6px;
  transition: background 0.04s, box-shadow 0.04s, transform 0.04s;
  cursor: default;
}

.white-key {
  --w: 26px;
  width: var(--w);
  height: 80px;
  left: calc(var(--ki) * var(--w));
  background: linear-gradient(180deg, #d8dbf0 0%, #eef0fa 40%, #f5f6ff 100%);
  border: 1px solid rgba(100, 90, 200, 0.2);
  border-top: none;
  box-shadow:
    inset 0 -3px 6px rgba(100, 90, 200, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 0;
}

[data-theme="light"] .white-key {
  background: linear-gradient(180deg, #e8eaf8 0%, #f5f6ff 40%, #ffffff 100%);
  border-color: rgba(80, 70, 180, 0.15);
  box-shadow:
    inset 0 -3px 6px rgba(80, 70, 180, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.15);
}

.black-key {
  --w: 26px;
  --bw: 16px;
  width: var(--bw);
  height: 50px;
  left: calc(var(--ki) * var(--w) - var(--bw) / 2);
  background: linear-gradient(180deg, #1a1c2e 0%, #12131e 60%, #0e0f1a 100%);
  border: 1px solid rgba(100, 90, 200, 0.15);
  border-top: none;
  box-shadow:
    inset 0 -2px 4px rgba(0, 0, 0, 0.5),
    0 4px 10px rgba(0, 0, 0, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
  z-index: 1;
}

[data-theme="light"] .black-key {
  background: linear-gradient(180deg, #1e2040 0%, #151628 60%, #0f1020 100%);
  box-shadow:
    inset 0 -2px 4px rgba(0, 0, 0, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.35);
}

.white-key.active {
  background: linear-gradient(180deg, var(--accent) 0%, #9183fb 60%, #a898fc 100%);
  border-color: var(--accent);
  box-shadow:
    0 0 14px rgba(124, 109, 250, 0.6),
    0 2px 6px rgba(0, 0, 0, 0.3);
  transform: translateY(1px);
}

.black-key.active {
  background: linear-gradient(180deg, #5b48ee 0%, var(--accent) 60%, #9183fb 100%);
  border-color: var(--accent);
  box-shadow:
    0 0 12px rgba(124, 109, 250, 0.7),
    0 2px 8px rgba(0, 0, 0, 0.4);
  transform: translateY(1px);
}

.piano-key.bass-target::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffb020;
  box-shadow: 0 0 6px rgba(255, 176, 32, 0.9);
  z-index: 2;
}

.white-key.wrong {
  background: linear-gradient(180deg, #ff3c3c 0%, #ff6060 55%, #ff8a8a 100%);
  border-color: #ff3c3c;
  box-shadow:
    0 0 16px rgba(255, 60, 60, 0.65),
    0 2px 6px rgba(0, 0, 0, 0.3);
  transform: translateY(1px);
}

.black-key.wrong {
  background: linear-gradient(180deg, #c01010 0%, #e03030 55%, #ff5555 100%);
  border-color: #e03030;
  box-shadow:
    0 0 14px rgba(255, 60, 60, 0.75),
    0 2px 8px rgba(0, 0, 0, 0.45);
  transform: translateY(1px);
}

.white-key.scale-correct {
  background: linear-gradient(180deg, #22c55e 0%, #4ade80 60%, #86efac 100%);
  border-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.55);
}

.black-key.scale-correct {
  background: linear-gradient(180deg, #15803d 0%, #22c55e 60%, #4ade80 100%);
  border-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.65);
}

.key-label {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(80, 70, 180, 0.5);
  pointer-events: none;
  user-select: none;
}

[data-theme="light"] .key-label {
  color: rgba(60, 50, 160, 0.4);
}

@keyframes midi-success {
  0%   { box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 20px 60px rgba(0,0,0,0.55), 0 0 90px rgba(124,109,250,0.1),  inset 0 1px 0 rgba(255,255,255,0.06); }
  35%  { box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 20px 60px rgba(0,0,0,0.35), 0 0 110px rgba(60,210,110,0.45), inset 0 1px 0 rgba(255,255,255,0.06); }
  100% { box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 20px 60px rgba(0,0,0,0.55), 0 0 90px rgba(124,109,250,0.1),  inset 0 1px 0 rgba(255,255,255,0.06); }
}

.prompt-card.midi-success {
  animation: midi-success 0.7s ease;
}

@keyframes band-hit-flash {
  0%   { box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 20px 60px rgba(0,0,0,0.55), 0 0 90px rgba(124,109,250,0.1),  inset 0 1px 0 rgba(255,255,255,0.06); }
  30%  { box-shadow: 0 2px 4px rgba(0,0,0,0.25), 0 20px 70px rgba(0,0,0,0.3), 0 0 140px rgba(255,214,90,0.6), inset 0 1px 0 rgba(255,255,255,0.08); }
  100% { box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 20px 60px rgba(0,0,0,0.55), 0 0 90px rgba(124,109,250,0.1),  inset 0 1px 0 rgba(255,255,255,0.06); }
}

.prompt-card.band-hit-flash {
  animation: band-hit-flash 0.25s ease;
}

/* ── Learning Path ───────────────────────────────────────────────────────────── */

#pathStart.hidden,
#pathActive.hidden { display: none; }

.path-intro {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.path-start-btn {
  background: linear-gradient(135deg, #5b48ee 0%, #9183fb 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 24px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
  touch-action: manipulation;
  box-shadow: 0 2px 12px rgba(108, 95, 255, 0.4);
}

.path-start-btn:hover  { filter: brightness(1.1); transform: translateY(-1px); }
.path-start-btn:active { filter: brightness(0.95); transform: translateY(0); }

.adaptive-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 10px;
}

.adaptive-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

.reset-weights-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  touch-action: manipulation;
}

.reset-weights-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.path-stage-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.path-stage-num {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  flex-shrink: 0;
}

.path-stage-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.path-stage-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.path-progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.path-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5b48ee, #9183fb);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.mastery-row {
  margin: -8px 0 14px;
}

.mastery-row.hidden { display: none; }

.mastery-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.mastery-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.mastery-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}

.mastery-fill.ready {
  background: #22c55e;
}

.mastery-ready {
  font-size: 0.78rem;
  font-weight: 600;
  color: #22c55e;
  text-align: center;
  margin: 7px 0 0;
}

.mastery-ready.hidden { display: none; }

.path-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.path-nav-btn {
  flex: 1;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  touch-action: manipulation;
}

.path-nav-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.path-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.path-leave-btn {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
  text-align: center;
}

.path-leave-btn:hover { color: var(--text-muted); }

/* ── Mobile ──────────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  .next-btn {
    flex: 1;
    grid-column: unset;
    font-size: 1.1rem;
    padding: 17px 20px;
    border-radius: 14px;
  }

  .right-controls {
    grid-column: unset;
    padding-left: 0;
    gap: 6px;
  }

  .timer-display {
    font-size: 2rem;
    min-width: 2ch;
    text-align: center;
  }

  .back-btn {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .app {
    padding: 20px 12px 48px;
  }

  header {
    margin-bottom: 24px;
  }

  header h1 {
    font-size: 0.68rem;
  }

  .prompt-card {
    padding: 36px 24px;
    min-height: 156px;
    border-radius: 18px;
    margin-bottom: 16px;
  }

  .settings {
    gap: 8px;
  }

  .group-toggle {
    padding: 14px 16px;
  }

  .group-body-inner {
    padding: 0 16px 16px;
  }

  .timer-options {
    gap: 4px;
  }

  .radio-pill {
    padding: 7px 11px;
    font-size: 0.82rem;
  }

  .notes-grid label {
    padding: 8px 13px;
    font-size: 0.82rem;
  }

  select,
  #customTimer,
  #metroBpm {
    font-size: 1rem;
  }

  .key-selector select {
    flex: 1;
    padding: 8px 8px;
  }

  .category-options {
    gap: 2px 14px;
  }

  .category-options label {
    padding: 6px 0;
  }

  .kbd-hint {
    margin-bottom: 32px;
  }
}

@media (max-width: 360px) {
  .notes-grid {
    gap: 4px;
  }

  .notes-grid label {
    padding: 7px 11px;
  }

  .radio-pill {
    padding: 6px 9px;
    font-size: 0.8rem;
  }
}

/* ── Help / About modal ──────────────────────────────────────────────────────── */

.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: help-fade-in 0.18s ease;
}

.help-overlay.hidden {
  display: none;
}

@keyframes help-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.help-panel {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 40px 40px 48px;
  max-width: 620px;
  width: 100%;
  position: relative;
  animation: help-slide-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  margin: auto;
}

@keyframes help-slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.help-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  touch-action: manipulation;
}

.help-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.help-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.help-lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
}

.help-section {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
}

.help-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.help-section h3 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.help-section p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 10px;
}

.help-section p:last-child {
  margin-bottom: 0;
}

.help-section ul {
  margin: 8px 0 10px;
  padding-left: 18px;
  list-style: none;
}

.help-section ul li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 7px;
  position: relative;
  padding-left: 14px;
}

.help-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.help-section ul li:last-child {
  margin-bottom: 0;
}

.help-section strong {
  color: var(--text);
  font-weight: 600;
}

.help-section kbd {
  display: inline-block;
  padding: 1px 7px;
  font-family: inherit;
  font-size: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  color: var(--text-muted);
}

.help-note {
  font-size: 0.8rem !important;
  color: var(--text-dim) !important;
  font-style: italic;
  margin-top: 10px !important;
}

@media (max-width: 480px) {
  .help-panel {
    padding: 28px 22px 36px;
    border-radius: 16px;
  }

  .help-overlay {
    padding: 12px 8px;
    align-items: flex-start;
  }
}

/* ── Stats modal ─────────────────────────────────────────────────────────────── */

.stats-panel {
  padding-bottom: 44px;
}

.stats-empty {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  text-align: center;
  padding: 32px 0 8px;
}

.stats-summary {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0 0 14px;
}

.stats-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-item.dim {
  color: var(--text-dim);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.streak-display {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 6px 0 0;
  text-align: center;
}

.streak-display.hidden { display: none; }

.weak-spots-panel {
  background: var(--bg-raised, var(--border-light));
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 20px;
}

.weak-spot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.weak-spot-row:last-child { border-bottom: none; }

.weak-spot-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}

.weak-spot-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stats-section {
  margin-bottom: 28px;
}

.stats-section:last-child {
  margin-bottom: 0;
}

.stats-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.stats-row {
  display: grid;
  grid-template-columns: 130px 1fr 44px 30px 18px auto;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.stats-row.dim-row {
  opacity: 0.5;
}

.stats-key {
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-bar-track {
  height: 7px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.stats-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.stats-bar-fill.building {
  width: 8%;
  background: var(--text-dim);
  opacity: 0.4;
}

.stats-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stats-count {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stats-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

.stats-badge.needs-work {
  background: rgba(220, 60, 60, 0.15);
  color: hsl(0deg 70% 60%);
}

.stats-badge.strong {
  background: rgba(40, 180, 100, 0.15);
  color: hsl(140deg 60% 48%);
}

.stats-badge.building {
  background: var(--surface);
  color: var(--text-dim);
}

.adaptive-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.view-stats-btn {
  background: linear-gradient(135deg, #5b48ee 0%, #9183fb 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
  touch-action: manipulation;
  box-shadow: 0 2px 10px rgba(108, 95, 255, 0.35);
}

.view-stats-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 90px 1fr 38px 24px 16px auto;
    gap: 5px;
  }
}

/* ── Stats: header summary ───────────────────────────────────────────────────── */

.stats-header-row {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.stats-header-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 8px 10px;
  gap: 4px;
}

.stats-header-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stats-header-lbl {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.2;
}

.stats-header-num-sep {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-dim);
  margin: 0 3px;
}

/* ── Stats: 14-day chart ─────────────────────────────────────────────────────── */

.stats-chart-wrap {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
}

.chart-note {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-dim);
  margin-left: 6px;
}

.stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-area {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.chart-bar {
  width: 100%;
  max-width: 28px;
  border-radius: 3px 3px 0 0;
  background: rgba(124, 109, 250, 0.38);
  transition: height 0.3s ease;
}

.chart-bar.today {
  background: var(--accent);
}

.chart-day {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 5px;
  text-align: center;
  line-height: 1;
}

.chart-day.today {
  color: var(--accent);
  font-weight: 600;
}

/* ── Stats: trend arrows ─────────────────────────────────────────────────────── */

.stats-trend {
  text-align: center;
  line-height: 1;
}

.trend {
  font-size: 0.72rem;
  font-weight: 700;
}

.trend.up   { color: hsl(140deg 60% 48%); }
.trend.down { color: hsl(10deg 75% 58%); }
.trend.flat { color: var(--text-dim); font-weight: 400; }

/* ── Stats: footer (export + clear) ─────────────────────────────────────────── */

.stats-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stats-export-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-footer-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-right: 4px;
}

.export-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  touch-action: manipulation;
}

.export-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#autoBackupCadence:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.clear-history-btn {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 0;
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: color 0.15s;
  text-align: left;
  touch-action: manipulation;
}

.clear-history-btn:hover {
  color: hsl(10deg 75% 58%);
}

.btn-confirm {
  color: hsl(10deg 75% 58%) !important;
  border-color: hsl(10deg 75% 58%) !important;
  font-weight: 600;
}

/* ── Tab bar ─────────────────────────────────────────────────────────────────── */

.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
}

.tab-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  touch-action: manipulation;
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

.tab-btn:not(.active):hover {
  background: var(--accent-dim);
  color: var(--accent);
}

#practiceTab.hidden,
#earTab.hidden { display: none; }

/* ── Ear training main area ───────────────────────────────────────────────────── */

.ear-main {
  margin-bottom: 36px;
}

.ear-controls {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  margin-bottom: 0;
}

.ear-int-subhead {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
}

/* ── Radial interval wheel ────────────────────────────────────────────────── */

#earRadial {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

#earRadial.hidden { display: none; }

.ear-choices.hidden { display: none; }

.ear-label-toggle {
  align-self: flex-end;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.ear-label-toggle:hover { color: var(--text); border-color: var(--text-muted); }
.ear-label-toggle.active { color: var(--accent); border-color: var(--accent); }

.ear-radial-svg {
  width: 100%;
  max-width: 310px;
  height: auto;
  touch-action: manipulation;
}

.ear-radial-svg .radial-node { cursor: pointer; }
.ear-radial-svg.answered .radial-node { cursor: default; pointer-events: none; }

/* ── Session stats ─────────────────────────────────────────────────────────── */

.ear-session-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ear-session-stats.hidden { display: none; }

.ear-score { color: var(--accent); font-weight: 600; }
.ear-streak { color: hsl(40deg 95% 60%); }

/* ── Ear choice grid ─────────────────────────────────────────────────────────── */

.ear-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0 0;
}

.ear-choices:has(.ear-choice-btn:nth-child(1):last-child),
.ear-choices:has(.ear-choice-btn:nth-child(2):last-child) {
  grid-template-columns: 1fr;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.ear-choice-btn {
  padding: 14px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
  touch-action: manipulation;
  text-align: center;
  min-height: 56px;
}

.ear-choice-btn:not(:disabled):hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.ear-choice-btn:not(:disabled):active {
  transform: scale(0.97);
}

.ear-choice-btn.correct {
  border-color: hsl(140deg 58% 42%);
  background: hsl(140deg 58% 42% / 0.15);
  color: hsl(140deg 58% 58%);
  font-weight: 700;
}

.ear-choice-btn.wrong {
  border-color: hsl(0deg 70% 52%);
  background: hsl(0deg 70% 52% / 0.12);
  color: hsl(0deg 70% 62%);
}

.ear-choice-btn:disabled {
  cursor: default;
}

/* ── Stats modal tabs ─────────────────────────────────────────────────────────── */

.stats-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}

.stats-tab {
  flex: 1;
  padding: 6px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  touch-action: manipulation;
}

.stats-tab.active {
  background: var(--accent);
  color: #fff;
}

.stats-tab:not(.active):hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ── Ear HearBtn ─────────────────────────────────────────────────────────────── */

#earHearBtn {
  background: var(--surface);
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  touch-action: manipulation;
}

#earHearBtn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

#earHearBtn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ── Practice Calendar ───────────────────────────────────────────────── */
.cal-section { margin-bottom: 24px; }

.cal-outer {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.cal-day-col {
  display: grid;
  grid-template-rows: repeat(7, 13px);
  gap: 3px;
}

.cal-day-lbl {
  font-size: 0.6rem;
  color: var(--text-dim);
  line-height: 13px;
  text-align: right;
  width: 8px;
}

.cal-grid {
  display: grid;
  grid-template-rows: repeat(7, 13px);
  grid-auto-flow: column;
  grid-auto-columns: 13px;
  gap: 3px;
}

.cal-cell {
  width: 13px;
  height: 13px;
  border-radius: 3px;
}

.cal-future { background: transparent; }
.cal-l0 { background: var(--border); }
.cal-l1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.cal-l2 { background: color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.cal-l3 { background: var(--accent); }

.cal-today {
  outline: 1.5px solid var(--accent);
  outline-offset: 1px;
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.cal-lbl {
  font-size: 0.62rem;
  color: var(--text-dim);
}

/* ── Stage list modal ────────────────────────────────────────────────── */
.stage-list-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.stage-list-overlay.hidden { display: none; }

.stage-list-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: min(380px, calc(100vw - 32px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stage-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.stage-list-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.stage-list-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.stage-list-close:hover { color: var(--text); }

.stage-list-content {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0;
}

.stage-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  cursor: pointer;
  transition: background 0.1s;
}

.stage-list-row:hover { background: var(--accent-dim); }

.stage-list-row.current {
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding-left: 15px;
}

.stage-list-num {
  font-size: 0.7rem;
  color: var(--text-dim);
  min-width: 22px;
  text-align: right;
  flex-shrink: 0;
}

.stage-list-name {
  flex: 1;
  font-size: 0.85rem;
}

.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stage-list-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.stage-list-search-input {
  flex: 1;
  box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 0.85rem;
}

.stage-list-favorites-btn {
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.stage-list-favorites-btn:hover { color: var(--text); }

.stage-list-favorites-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.stage-favorite-star {
  flex-shrink: 0;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1;
}

.stage-favorite-star.favorited { color: var(--accent); }

.stage-favorite-star:hover { color: var(--accent); }

.stage-list-empty {
  padding: 24px 18px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.stage-list-search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.stage-list-phase-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  user-select: none;
}

.stage-list-phase-header:hover { background: var(--accent-dim); }

.stage-list-phase-chevron {
  flex-shrink: 0;
  width: 12px;
}

.stage-list-phase-name { flex: 1; }

.stage-list-phase-count {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.stage-list-phase-body.collapsed { display: none; }

.show-stages-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.show-stages-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

/* ── Onboarding ──────────────────────────────────────────────────────── */
.onboard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 16px;
}

.onboard-overlay.hidden { display: none; }

.onboard-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px 26px;
  width: 100%;
  max-width: 400px;
}

.onboard-step.hidden { display: none; }

.onboard-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.onboard-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0 0 22px;
  line-height: 1.5;
}

.onboard-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.onboard-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}

.onboard-choice:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.onboard-choice-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.onboard-choice-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 400;
}

.onboard-skip {
  display: block;
  margin: 0 auto;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.76rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px;
}

.onboard-skip:hover { color: var(--text-muted); }

.onboard-step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.onboard-step-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 18px;
  line-height: 1.5;
}

.onboard-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.onboard-cat {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.onboard-cat.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.onboard-timer-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.onboard-timer-opt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.onboard-timer-opt strong { font-size: 0.86rem; }

.onboard-timer-opt span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.onboard-timer-opt.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.onboard-timer-opt:hover { border-color: var(--accent); }

.onboard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboard-next,
.onboard-done {
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.onboard-next:hover,
.onboard-done:hover { background: var(--accent-hover); }

.onboard-back {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 6px 0;
}

.onboard-back:hover { color: var(--text-muted); }
