/* Dark panel look, matching the desktop app. Neutral grays, a blue accent, and
   amber for the pedal lights; all of it stays distinguishable with protan color
   blindness. Mobile-first; the knob row and controls widen on larger screens. */

:root {
  --bg: #15171b;
  --panel: #23262c;
  --button: #30343b;
  --button-hover: #3b4048;
  --text: #eceef1;
  --muted: #9ba1aa;
  --accent: #648fff; /* Cornflower blue. */
  --fill: #0072b2; /* Blue. */
  --amber: #ffb000;
  --white-key: #e6e8ec;
  --black-key: #1a1c20;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.top,
.app,
.foot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px;
}

.title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
}

.start-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--panel);
  border-radius: 8px;
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: var(--amber);
}

.btn {
  min-height: 44px;
  padding: 8px 24px;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.btn:hover {
  background: var(--button-hover);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--fill);
}

.btn-primary:hover {
  background: var(--accent);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.knobs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
  padding: 16px 8px;
  background: var(--panel);
  border-radius: 8px;
}

.knobs:empty {
  display: none;
}

.knob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.knob:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

.knob-canvas {
  width: 96px;
  height: 96px;
}

.knob-name {
  font-size: 15px;
}

.knob-ends {
  display: flex;
  justify-content: space-between;
  width: 120px;
  color: var(--muted);
  font-size: 11px;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
  background: var(--panel);
  border-radius: 8px;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-name {
  font-size: 14px;
  color: var(--muted);
}

.control-volume input {
  width: 100%;
  accent-color: var(--fill);
}

.pedals {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pedal {
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--button);
  color: var(--muted);
  font-size: 14px;
}

.pedal.on {
  background: var(--amber);
  color: var(--bg);
}

.pedal.on .pedal-state {
  font-weight: 600;
}

.keys {
  margin-top: 16px;
}

.keyboard {
  display: block;
  width: 100%;
  height: 96px;
  border-radius: 8px;
  background: var(--panel);
  touch-action: none;
}

.help {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.help-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.help-list {
  margin: 0;
  padding-left: 20px;
}

.help-list li {
  margin-bottom: 4px;
}

kbd {
  padding: 0 4px;
  border: 1px solid var(--button-hover);
  border-radius: 4px;
  background: var(--button);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}

.foot {
  color: var(--muted);
  font-size: 13px;
}

code {
  color: var(--text);
}

@media (min-width: 768px) {
  .start-row {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .knobs {
    grid-template-columns: repeat(6, 1fr);
    padding: 24px 16px;
  }

  .controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .control-volume {
    width: 240px;
  }

  .keyboard {
    height: 128px;
  }
}
