.piano-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  min-width: 0;
}
.inst-tools {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.inst-tools select {
  flex: 1 1 auto;
  min-width: 0;
}
.track-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.piano-bar .chip {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  color: var(--on-ink, #1c140c);
  background: var(--pad);
  box-shadow: none;
  filter: brightness(0.82);
}
.piano-bar .chip.is-selected {
  filter: brightness(1.15);
  box-shadow: 0 0 0 2px var(--ink);
  color: var(--on-ink, #1c140c);
  background: var(--pad);
}
.inst-settings {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}
.inst-settings-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.inst-slider,
.inst-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.inst-toggle {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}
.inst-slider input[type="range"] { width: 100%; accent-color: var(--brown-light); }

.roll-wrap { flex: 1 1 0; min-height: 0; max-height: 100%; overflow: auto; touch-action: pan-x pan-y; }
.roll {
  display: grid;
  grid-template-columns: 3.2rem repeat(var(--cols, 16), minmax(1.35rem, 1fr));
  gap: 2px;
  min-width: 36rem;
  touch-action: pan-x pan-y;
  user-select: none;
}
.note-name {
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-align: left;
  touch-action: pan-x pan-y;
  user-select: none;
}
.note-name.is-black { color: var(--brown-light); }
.cell { height: 1.15rem; background: #221f1b; }
.cell.is-black:not(.is-on) { background: #161411; }
.empty-note { margin: 0; color: var(--muted); }

.keys { display: flex; gap: 0.3rem; touch-action: none; }
.key {
  flex: 1;
  min-height: 3.1rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  color: var(--ink);
  background: var(--panel-light);
  touch-action: none;
  user-select: none;
}
.key.is-black { color: var(--muted); background: #2a261f; }
