/* MusicMaster */
:root {
  --bg: #0e1014;
  --bg-2: #151922;
  --card: #171c26;
  --card-2: #1d2330;
  --line: #262d3b;
  --text: #e8ecf4;
  --muted: #8b95a9;
  --accent: #ffb340;
  --accent-2: #6ea8ff;
  --good: #56d68a;
  --radius: 14px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #333c4f transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #333c4f; border-radius: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, #1b2130 0%, var(--bg) 60%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }

/* ------------------------------------------------------------------ shell */
.app { display: flex; flex-direction: column; min-height: 100vh; }

.app-header {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 16, 20, 0.75);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #ff7a59);
  color: #24160a; font-size: 17px; font-weight: 700;
}
.brand-name { font-weight: 680; letter-spacing: -0.02em; font-size: 17px; }

.header-controls { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; }
.header-field { display: flex; flex-direction: column; gap: 4px; }
.header-field > span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.header-field.vol .range { width: 110px; }

.app-body { display: flex; flex: 1; min-height: 0; align-items: flex-start; }

.sidebar {
  width: 250px; flex: none; padding: 20px 14px;
  border-right: 1px solid var(--line);
  position: sticky; top: 60px;
  display: flex; flex-direction: column; gap: 12px;
}
.sidebar-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-left: 8px; }
.exercise-nav { display: flex; flex-direction: column; gap: 6px; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.sidebar-title:not(:first-child) { margin-top: 12px; }
/* A group of related modes inside a section. */
.sidebar-subtitle {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 2px; padding-left: 8px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: #6d788f;
}
.sidebar-subtitle::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.nav-item {
  display: flex; gap: 11px; align-items: center; text-align: left;
  padding: 10px 11px; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--text);
  font: inherit; cursor: pointer;
}
.nav-item:hover { background: var(--card); }
.nav-item.active { background: var(--card-2); border-color: var(--line); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { font-size: 18px; color: var(--muted); width: 20px; text-align: center; }
.nav-text { display: flex; flex-direction: column; line-height: 1.3; }
.nav-text strong { font-weight: 600; font-size: 14px; }
.nav-text em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.sidebar-foot { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid var(--line); }

.main { flex: 1; min-width: 0; padding: 26px 28px 60px; }
.exercise-host { max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.exercise-head h1 { font-size: 26px; }
.exercise-head p { margin-top: 6px; max-width: 68ch; line-height: 1.55; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.settings { padding: 6px 18px 18px; }
.settings-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer;
  padding: 12px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
}
.settings.collapsed .settings-body { display: none; }
.chev { font-size: 10px; }

.field-group-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); margin: 16px 0 8px;
}
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: span 2; }
.field-label { display: flex; flex-direction: column; gap: 2px; }
.field-label > span:first-child { font-size: 13px; font-weight: 550; }
.field-help { font-size: 11.5px; color: var(--muted); }

/* ----------------------------------------------------------------- inputs */
.input {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 10px; font: inherit; font-size: 14px; width: 100%;
}
.input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
select.input { cursor: pointer; }
.input.compact { padding: 6px 8px; font-size: 13px; min-width: 190px; width: auto; }

.range { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 3px; background: var(--line); width: 100%; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 0;
}
.range::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; }
.range-wrap { display: flex; align-items: center; gap: 12px; }
.range-out { font-family: var(--mono); font-size: 12.5px; color: var(--accent); white-space: nowrap; min-width: 108px; text-align: right; }

.toggle {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px;
  padding: 6px 10px 6px 6px; cursor: pointer; color: var(--muted); font: inherit;
}
.toggle .knob {
  width: 34px; height: 19px; border-radius: 12px; background: var(--line);
  position: relative; transition: background .15s; flex: none;
}
.toggle .knob::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s;
}
.toggle.on { color: var(--text); }
.toggle.on .knob { background: rgba(255, 179, 64, .28); }
.toggle.on .knob::after { transform: translateX(15px); background: var(--accent); }
.toggle em { font-style: normal; font-size: 13px; }

.btn {
  background: var(--card-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer;
}
.btn:hover { border-color: #38425a; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn.primary { background: var(--accent); color: #221607; border-color: transparent; font-weight: 620; }
.btn.big { padding: 11px 22px; font-size: 15px; }
.btn:disabled { opacity: .4; cursor: default; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.link-btn { background: none; border: 0; color: var(--accent-2); font: inherit; font-size: 11px; cursor: pointer; text-decoration: underline; }

.star { background: none; border: 0; color: var(--line); font-size: 17px; cursor: pointer; line-height: 1; padding: 2px 4px; }
.star:hover { color: var(--muted); }
.star.on { color: var(--accent); }
.star.big { font-size: 21px; }
.scale-field { display: flex; gap: 8px; align-items: center; }
.scale-field .input { flex: 1; min-width: 0; }

/* ------------------------------------------------------------ scale picker */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5, 7, 11, .72);
  display: grid; place-items: center; z-index: 100; padding: 24px;
}
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  width: min(760px, 100%); max-height: 84vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 16px; }
.modal-body { padding: 16px 20px 18px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.search { position: sticky; top: 0; }
.scale-list { display: flex; flex-direction: column; }
.scale-group {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); padding: 14px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.scale-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 9px; cursor: pointer;
}
.scale-row:hover { background: var(--card-2); }
.scale-row.current { background: rgba(255, 179, 64, .09); }
.scale-row-main { flex: 1; min-width: 0; }
.scale-row-name { display: flex; align-items: baseline; gap: 8px; }
.scale-row-name .aka { font-size: 11.5px; color: var(--muted); }
.scale-row-sub { font-size: 11.5px; color: var(--muted); }
.scale-row-iv { font-family: var(--mono); font-size: 11px; color: #4d586e; white-space: nowrap; }

/* ------------------------------------------------------------ note stream */
.stream { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 18px; }
.scale-strip { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
  padding: 5px 11px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--line);
  min-width: 48px; flex: none; width: max-content;
}
.chip b, .chip i { white-space: nowrap; }
.chip b { font-weight: 600; font-size: 14px; }
.chip i { font-style: normal; font-size: 11px; color: var(--muted); }
.chip.active { background: rgba(255, 179, 64, .16); border-color: var(--accent); }
.chip.active b { color: var(--accent); }

.stream-main {
  display: flex; align-items: center; gap: 28px;
  padding: 24px 8px; min-height: 240px;
}
.ring-wrap { flex: none; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.beats { display: flex; gap: 6px; }
.beats.big { gap: 8px; }
.beats.big .beat { width: 32px; height: 32px; font-size: 13px; }
.beat {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-family: var(--mono); color: #4d586e;
  border: 1px solid var(--line); background: var(--bg-2);
}
.beat.downbeat { border-color: #3d475c; color: var(--muted); }
.beat.announce { box-shadow: inset 0 0 0 1px rgba(110, 168, 255, .45); color: var(--accent-2); }
.beat.done { color: var(--muted); border-color: #313b4e; }
.beat.now { background: var(--accent); border-color: var(--accent); color: #221607; font-weight: 700; }
.beat.downbeat.now { box-shadow: 0 0 0 3px rgba(255, 179, 64, .18); }
.ring { width: 120px; height: 120px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .05s linear; }

.note-area { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.note-main { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.note-primary { font-size: clamp(64px, 13vw, 132px); font-weight: 640; letter-spacing: -0.03em; line-height: 1; }
.note-secondary { font-size: clamp(22px, 4vw, 42px); color: var(--muted); font-weight: 500; }
.note-main.countin .note-primary { color: var(--muted); }
.note-main.idle .note-primary { color: #2c3546; font-size: clamp(52px, 8vw, 96px); }
body.focus-mode .note-main.idle .note-primary { font-size: clamp(70px, 12vw, 140px); }
.note-string {
  align-self: center;
  font-size: clamp(15px, 2vw, 22px); font-weight: 550; letter-spacing: .01em;
  color: var(--accent-2);
  border: 1px solid rgba(110, 168, 255, .35);
  background: rgba(110, 168, 255, .09);
  border-radius: 999px; padding: 4px 13px; white-space: nowrap;
}
.note-next .note-string { font-size: 12.5px; padding: 2px 9px; }
.note-next.first .note-string { font-size: 15px; padding: 3px 11px; }
.multi { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-btn {
  min-width: 42px; padding: 6px 10px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--muted);
  font: inherit; font-size: 13px; cursor: pointer;
}
.chip-btn:hover { color: var(--text); border-color: #38425a; }
.chip-btn.on { background: rgba(110, 168, 255, .14); border-color: rgba(110, 168, 255, .5); color: var(--text); }
.multi-all { margin-left: 4px; }
.degree { font-size: 13px; color: var(--muted); letter-spacing: .03em; min-height: 18px; }
.next-slot { display: flex; align-items: baseline; gap: 10px; min-height: 30px; }
.next-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #4d586e; }
.note-next { display: flex; align-items: baseline; gap: 8px; }
.note-next .note-primary { font-size: 24px; color: var(--muted); font-weight: 550; }
.note-next .note-secondary { font-size: 14px; }
.note-next.first .note-primary { font-size: 46px; color: var(--accent); font-weight: 620; }
.note-next.first .note-secondary { font-size: 22px; }

.history { display: flex; gap: 7px; flex-wrap: wrap; min-height: 24px; }
.hist {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 6px;
}

.transport { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
.stats { display: flex; gap: 22px; margin-left: auto; }
.stat { display: flex; flex-direction: column; gap: 1px; }
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stat-value { font-family: var(--mono); font-size: 14px; }
.keys { letter-spacing: .02em; }

/* --------------------------------------------------------- translation */
.translate { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.translate-dir {
  font-size: 12px; text-transform: uppercase; letter-spacing: .11em; color: var(--muted);
}
.translate-main { display: flex; align-items: baseline; gap: 22px; min-height: 130px; }
.prompt-slot { flex: 1; min-width: 0; }
.prompt-note { font-size: clamp(68px, 13vw, 132px); font-weight: 640; letter-spacing: -0.03em; line-height: 1.1; }
.prompt-note.idle { color: #2c3546; }
.live-timer { font-family: var(--mono); font-size: 15px; color: var(--muted); min-width: 60px; }

.verdict { min-height: 26px; font-size: 15px; font-family: var(--mono); color: transparent; }
.verdict.good { color: var(--good); }
.verdict.bad { color: #ff6b6b; }

.answer-grid { display: flex; flex-direction: column; gap: 8px; }
.answer-row { display: flex; flex-wrap: wrap; gap: 8px; }
.answer-btn {
  min-width: 62px; padding: 12px 14px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 17px; font-weight: 550; cursor: pointer;
}
.answer-btn:hover:not(:disabled) { border-color: var(--accent-2); background: rgba(110, 168, 255, .12); }
.answer-btn:disabled { opacity: .35; cursor: default; }

.answer-input { max-width: 320px; font-size: 17px; }
.answer-input.shake { animation: shake .22s; border-color: #ff6b6b; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

body.focus-mode .prompt-note { font-size: clamp(90px, 20vw, 240px); }
body.focus-mode .translate-main { min-height: 34vh; }

/* ---------------------------------------------------------- fretboard */
.fretboard {
  padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 16px;
  --fb-row: 40px; --fb-nums: 20px;
}
.fb-head {
  min-height: 16px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .11em; color: var(--muted);
}

.fb-neck { display: flex; align-items: flex-start; gap: 10px; }
.fb-stack { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.fb-names { display: grid; flex: none; }
.fb-name {
  display: flex; align-items: center; justify-content: flex-end; gap: 7px;
  font-family: var(--mono); line-height: 1;
}
.fb-name b { font-size: 11px; font-weight: 500; color: var(--muted); opacity: .55; }
.fb-name span { font-size: 13px; color: var(--text); min-width: 28px; text-align: right; }
.fb-name.off { opacity: .34; }

/* The neck. Every cell is one fret of one string; its right border is the
 * fret wire, and the ::before rule draws the string across it. */
.fb-board { display: grid; border-radius: 3px 8px 8px 3px; overflow: hidden; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.fb-cell {
  position: relative;
  background: linear-gradient(180deg, #3b2d1f, #281e13);
  border-right: 2px solid #8e96a6;
}
.fb-cell.open {
  background: linear-gradient(180deg, #1a1f2a, #141822);
  border-right: 5px solid #dfe3ea;                     /* the nut */
}
.fb-cell.off { filter: saturate(.35) brightness(.72); }
.fb-cell::before {
  content: ''; position: absolute; left: 0; right: -5px; top: 50%; z-index: 2;
  height: var(--w, 2px); transform: translateY(-50%); border-radius: 2px;
  background: linear-gradient(180deg, #eef1f6, #98a1b3);
}
.fb-cell.off::before { opacity: .3; }

.fb-inlay {
  position: relative; z-index: 1; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22%;
}
.fb-inlay i { width: 9px; height: 9px; border-radius: 50%; background: rgba(233, 237, 245, .18); }

.fb-dot {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; white-space: nowrap;
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: #24160a;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 179, 64, .2), 0 2px 6px rgba(0, 0, 0, .5);
}
.fb-cell.open .fb-dot { background: transparent; color: var(--accent); border: 3px solid var(--accent); box-shadow: none; }
.fb-cell.reveal .fb-dot {
  background: var(--good); color: #0b2216; border-color: var(--good);
  box-shadow: 0 0 0 4px rgba(86, 214, 138, .2);
}

.fb-frets { display: grid; padding-top: 5px; }
.fb-fretnum { text-align: center; font-family: var(--mono); font-size: 11px; color: #5d677b; }
.fb-fretnum.marked { color: var(--muted); }

.fb-below { display: flex; align-items: baseline; gap: 16px; min-height: 26px; }

/* Tap-to-answer necks. */
.fb-board.pickable .fb-cell:not(.off):not(.away) { cursor: pointer; }
.fb-board.pickable .fb-cell:not(.off):not(.away):hover::after {
  content: ''; position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}

/* One string in the spotlight: the rest step back and stop taking taps. */
.fb-cell.away { filter: saturate(.15) brightness(.5); }
.fb-cell.away::before { opacity: .25; }
.fb-cell.forced { background: linear-gradient(180deg, #4a3826, #33261a); }
.fb-cell.forced::before { background: linear-gradient(180deg, #fff6e2, #d9b97f); }
.fb-name.away { opacity: .25; }
.fb-name.forced span { color: var(--accent); }
.fb-name.forced b { opacity: 1; color: var(--accent); }

.fb-dot.good { background: var(--good); color: #0b2216; border-color: var(--good); box-shadow: 0 0 0 4px rgba(86, 214, 138, .2); }
.fb-dot.bad { background: #ff6b6b; color: #2a0b0b; border-color: #ff6b6b; box-shadow: 0 0 0 4px rgba(255, 107, 107, .18); }

/* The prompt side of Find the Note / Find Them All. */
.fb-ask { display: flex; align-items: baseline; gap: 22px; min-height: 92px; }
.fb-ask .prompt-note { font-size: clamp(48px, 8vw, 86px); }
.fb-ask-side { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; margin-left: auto; text-align: right; }
.fb-where { font-size: 12px; text-transform: uppercase; letter-spacing: .11em; color: var(--accent); }
.fb-progress { font-family: var(--mono); font-size: 22px; color: var(--text); }

body.focus-mode .fretboard { --fb-row: min(9vh, 76px); --fb-nums: 24px; }
body.focus-mode .fb-dot { min-width: 30px; height: 30px; font-size: 15px; }
body.focus-mode .fb-name span { font-size: 17px; }
body.focus-mode .fb-ask .prompt-note { font-size: clamp(64px, 11vw, 130px); }

/* ---------------------------------------------------------- metronome */
.metro { padding: 24px 22px 18px; display: flex; flex-direction: column; gap: 20px; }
.metro-main { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; min-height: 170px; }
.pulse {
  width: 108px; height: 108px; border-radius: 50%; flex: none;
  border: 2px solid var(--line); background: var(--bg-2);
}
.pulse.on { animation: pulse .34s ease-out; }
.pulse.on.accent { animation: pulse-accent .42s ease-out; }
@keyframes pulse {
  0%   { background: var(--accent-2); border-color: var(--accent-2); transform: scale(1.06); }
  100% { background: var(--bg-2); border-color: var(--line); transform: scale(1); }
}
@keyframes pulse-accent {
  0%   { background: var(--accent); border-color: var(--accent); transform: scale(1.12); }
  100% { background: var(--bg-2); border-color: var(--line); transform: scale(1); }
}
.metro-readout { display: flex; flex-direction: column; gap: 3px; margin-right: auto; }
.metro-readout .beats { margin-top: 12px; }
.metro-bpm-line { display: flex; align-items: baseline; gap: 10px; }
.metro-bpm { font-size: clamp(64px, 11vw, 116px); font-weight: 640; letter-spacing: -0.03em; line-height: 1; }
.metro-unit { font-size: 20px; color: var(--muted); letter-spacing: .04em; }
.metro-marking { font-size: 15px; color: var(--accent); letter-spacing: .04em; }
.metro-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.nudge { display: flex; gap: 6px; }
.nudge .btn { padding: 6px 12px; font-family: var(--mono); font-size: 13px; }

body.focus-mode .metro-bpm { font-size: clamp(90px, 18vw, 200px); }
body.focus-mode .pulse { width: 150px; height: 150px; }
body.focus-mode .metro-main { min-height: 40vh; }

/* --------------------------------------------------------- focus mode */
body.focus-mode .app-header,
body.focus-mode .sidebar,
body.focus-mode .settings,
body.focus-mode .exercise-head { display: none; }
body.focus-mode .main { padding-top: 40px; }
body.focus-mode .stream-main { min-height: 46vh; }
body.focus-mode .note-main .note-primary { font-size: clamp(90px, 18vw, 230px); }
body.focus-mode .note-main .note-secondary { font-size: clamp(30px, 6vw, 72px); }
body.focus-mode .note-next .note-primary { font-size: 32px; }
body.focus-mode .note-next .note-secondary { font-size: 18px; }
body.focus-mode .note-next.first .note-primary { font-size: 60px; }
body.focus-mode .note-next.first .note-secondary { font-size: 28px; }
body.focus-mode .note-main .note-string { font-size: clamp(20px, 2.6vw, 32px); padding: 6px 18px; }
body.focus-mode .note-next.first .note-string { font-size: 18px; }
body.focus-mode .ring { width: 150px; height: 150px; }
body.focus-mode .beat { width: 30px; height: 30px; font-size: 12px; }

@media (max-width: 820px) {
  .app-body { flex-direction: column; }
  .sidebar { width: 100%; position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-group { flex-direction: row; flex-wrap: wrap; }
  .main { padding: 18px 14px 50px; }
  .field.wide { grid-column: span 1; }
  .stream-main { flex-direction: column; align-items: flex-start; gap: 14px; }
  .stats { margin-left: 0; width: 100%; }
  .fretboard { --fb-row: 30px; }
  .fb-name span { font-size: 11px; min-width: 22px; }
  .fb-name b { display: none; }
}
