/* Dark console look, matching the piano page. Neutral grays, a blue accent,
   and amber for pulled drawknobs; all of it stays distinguishable with protan
   color blindness. Mobile-first; the divisions sit side by side 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;
}

/* The console: one panel per division, drawknobs inside. */

.console {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.console:empty {
  display: none;
}

.division {
  padding: 16px;
  background: var(--panel);
  border-radius: 8px;
}

.division-name {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawknobs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* A drawknob: a round stop knob that lights amber when pulled. */
.drawknob {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  padding: 8px;
  border: 2px solid var(--button-hover);
  border-radius: 50%;
  background: var(--button);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

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

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

.drawknob.on {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 0 12px rgb(255 176 0 / 35%);
}

.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);
}

.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;
}

/* The stoplist: every stop's provenance, tucked behind a disclosure. */

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

.stoplist summary {
  cursor: pointer;
}

.stoplist-entries {
  margin: 8px 0 0;
}

.stoplist-entries dt {
  margin-top: 8px;
  font-weight: 600;
  color: var(--text);
}

.stoplist-entries dd {
  margin: 0;
}

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;
  }

  .console {
    flex-direction: row;
    align-items: stretch;
  }

  .division {
    flex: 1;
  }

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

  .control-volume {
    width: 240px;
  }

  .keyboard {
    height: 128px;
  }
}
