*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #111111;
  color: #d4d0c8;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
}

button {
  cursor: pointer;
  transition: filter 0.15s;
  font-family: inherit;
}
button:hover  { filter: brightness(1.15); }
button:active { filter: brightness(0.9); }

select {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

::-webkit-scrollbar         { width: 6px; height: 6px; }
::-webkit-scrollbar-track   { background: #1a1a1a; }
::-webkit-scrollbar-thumb   { background: #444; border-radius: 3px; }

/* ── Layout ──────────────────────────────────────────────────────────────── */

.control-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 768px) {
  .control-panel { grid-template-columns: 1fr; }
}

/* ── Section panels ──────────────────────────────────────────────────────── */

.section {
  margin-bottom: 12px;
  background: #181818;
  border: 1px solid #252525;
  border-radius: 8px;
  padding: 10px 12px;
}
.section-label {
  font-size: 8px;
  color: #666;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* ── Select ──────────────────────────────────────────────────────────────── */

.select {
  padding: 7px 10px;
  background: #1a1a1a;
  color: #d4d0c8;
  border: 1px solid #333;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

/* ── Root note buttons ───────────────────────────────────────────────────── */

.btn-root {
  padding: 4px 0 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border-radius: 4px;
  border: 1px solid;
}
.btn-root--sel { background: #e8c46a; color: #111;    border-color: #e8c46a; font-weight: 700; }
.btn-root--on  { background: #252520; color: #d4d0c8; border-color: #3a3a30; }
.btn-root--off { background: #1a1a1a; color: #444;    border-color: #222; }

.btn-root__degree {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3px;
}

/* ── Chord type buttons ──────────────────────────────────────────────────── */

.btn-chord {
  padding: 4px 9px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  position: relative;
  border-radius: 3px;
  border: 1px solid;
}
.btn-chord--sel { background: #e8c46a; color: #111;    border-color: #e8c46a; font-weight: 700; }
.btn-chord--on  { background: #252520; color: #d4d0c8; border-color: #3a3a30; }
.btn-chord--off { background: #1a1a1a; color: #444;    border-color: #222; }

.chord-group-label {
  font-size: 8px;
  color: #555;
  margin-bottom: 3px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Preset / tuning buttons ─────────────────────────────────────────────── */

.btn-preset {
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 400;
  border: 1px solid;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-preset--sel { background: #e8c46a; color: #111; border-color: #e8c46a; font-weight: 700; }
.btn-preset--def { background: #252520; color: #888; border-color: #3a3a30; }

.badge-custom {
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  border: 1px solid #4a3a20;
  background: #2a2518;
  color: #e8c46a;
}

/* ── String filter buttons ───────────────────────────────────────────────── */

.btn-string {
  flex: 1;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  border-radius: 4px;
  border: 1px solid;
}
.btn-string--on  { background: #252520; color: #d4d0c8; border-color: #3a3a30; }
.btn-string--off { background: #2a1515; color: #e85a5a; border-color: #5a2020; text-decoration: line-through; }

/* ── Stepper buttons (± constraint controls) ─────────────────────────────── */

.btn-stepper {
  width: 26px;
  height: 26px;
  background: #252520;
  color: #d4d0c8;
  border: 1px solid #3a3a30;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ── Bass note filter buttons ────────────────────────────────────────────── */

.btn-bass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 400;
  min-width: 36px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  border: 1px solid;
}
.btn-bass--sel { background: #e8c46a; color: #111; border-color: #e8c46a; font-weight: 700; }
.btn-bass--def { background: #252520; color: #888; border-color: #3a3a30; }

.btn-bass__interval {
  font-size: 9px;
  opacity: 0.7;
}

.btn-bass-any {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  border-radius: 4px;
  border: 1px solid;
}
.btn-bass-any--sel { background: #3a3020; color: #e8c46a; border-color: #6a5a20; font-weight: 700; }
.btn-bass-any--def { background: #1a1a1a; color: #555;    border-color: #252525; }

/* ── Generic toggle button ───────────────────────────────────────────────── */

.btn-toggle {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
  border: 1px solid;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-toggle--on  { background: #e8c46a; color: #111; border-color: #e8c46a; font-weight: 700; }
.btn-toggle--off { background: #252520; color: #888; border-color: #3a3a30; }

/* ── Tuning editor ───────────────────────────────────────────────────────── */

.btn-tuning-step {
  width: 22px;
  height: 18px;
  background: #252520;
  color: #999;
  border: 1px solid #333;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
}

.btn-tuning-util {
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid;
}
.btn-tuning-neutral { background: #252520; color: #888;    border-color: #3a3a30; }
.btn-tuning-add     { background: #1a2518; color: #7ab85e; border-color: #2a4020; }
.btn-tuning-remove  { background: #2a1515; color: #e85a5a; border-color: #5a2020; }
