/* Live Clip View and auxiliary windows. Geometry stays with the existing
   editors; these rules only align their presentation and scrolling surfaces. */
body .studio .clip-editor,
body .audio-settings,
body .context-menu {
  font-family: LiveSans, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
}
body .studio .clip-editor {
  container-type: inline-size;
  container-name: clip-view;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
body .studio .clip-editor .editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
  height: auto;
  min-height: 22px;
  flex: 0 0 auto;
  padding: 3px 5px;
  border-bottom: 1px solid var(--live-frame);
  background: var(--live-surface);
}
body .studio .clip-editor .editor-top > div:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}
body .studio .clip-editor #clip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 400;
}
body .studio .clip-editor .editor-track {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}
body .studio .clip-editor .editor-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 5px;
  min-width: 0;
  margin-left: auto;
  font-size: 9px;
}
body .studio .clip-editor .editor-settings > span { white-space: nowrap; }
body .studio .clip-editor .editor-settings button,
body .studio .clip-editor .editor-settings select {
  height: 17px;
  min-height: 17px;
  padding: 0 4px;
  font: inherit;
  line-height: normal;
  border: 1px solid var(--live-frame);
  border-radius: 1px;
  background: var(--live-control);
  color: var(--live-text);
}
body .studio .clip-editor .editor-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: auto;
}
body .studio .clip-editor .editor-bottom {
  flex: 0 0 auto;
  min-height: 17px;
  padding: 2px 5px;
  line-height: 1.3;
  font-size: 9px;
}
body .studio .clip-editor .empty-editor {
  min-height: 100px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px;
  font-size: 10px;
}
body .studio .clip-editor .empty-editor button {
  font: inherit;
  padding: 2px 6px;
  border: 1px solid var(--live-frame);
  border-radius: 2px;
  background: var(--live-control);
  color: var(--live-text);
}
/* Live's Clip and Pitch & Time columns share one title strip beside the roll. */
body .studio .clip-editor .midi-editor {
  --midi-sidebar-width: 72px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: auto;
}
body .studio .clip-editor .midi-clip-view {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--live-surface);
}
body .studio .clip-editor .midi-clip-properties {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-right: 2px solid var(--live-frame);
  background: var(--live-surface);
}
body .studio .clip-editor .midi-clip-properties > header {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 22px;
  box-sizing: border-box;
  min-width: 0;
  padding: 1px 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--live-frame);
  background: color-mix(in srgb, var(--track-color) 30%, var(--live-surface));
  color: var(--live-text);
  font-size: 10px;
  font-weight: 600;
}
body .studio .clip-editor .midi-clip-properties > header i { width: 9px; height: 9px; flex: 0 0 9px; border: 1px solid var(--live-frame); }
body .studio .clip-editor .midi-properties-columns { display: grid; grid-template-columns: 1fr 1fr; flex: 1; min-height: 0; }
body .studio .clip-editor .midi-clip-column,
body .studio .clip-editor .midi-note-column { display: flex; flex-direction: column; min-height: 0; overflow: auto; }
body .studio .clip-editor .midi-note-column { border-left: 1px solid var(--live-frame); }
body .studio .clip-editor .midi-properties-tab { flex: 0 0 19px; box-sizing: border-box; padding: 2px 5px; border-bottom: 1px solid var(--live-frame); text-align: center; font-size: 9px; }
body .studio .clip-editor .midi-clip-properties section { display: flex; flex-direction: column; gap: 5px; margin: 0 7px; padding: 7px 0; border-bottom: 1px solid var(--live-frame); }
body .studio .clip-editor .midi-clip-properties .midi-scale-section { margin-top: auto; border-bottom: 0; }
body .studio .clip-editor .midi-clip-properties h3 { margin: 0 0 3px; color: var(--live-text); font-size: 10px; font-weight: 400; }
body .studio .clip-editor .midi-clip-properties label { display: grid; grid-template-columns: minmax(0, 1fr) 57px; align-items: center; gap: 3px; min-width: 0; font-size: 9px; color: var(--live-text); }
body .studio .clip-editor .midi-property-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
body .studio .clip-editor .midi-property-pair label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
body .studio .clip-editor .midi-scale-fields { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px; }
body .studio .clip-editor .midi-action-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
body .studio .clip-editor .midi-clip-properties input,
body .studio .clip-editor .midi-clip-properties select {
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  height: 18px;
  padding: 0 3px;
  border: 1px solid var(--live-scrollbar);
  border-radius: 0;
  background: var(--live-field);
  color: var(--live-text);
  font: 9px/16px LiveSans, Arial, sans-serif;
}
body .studio .clip-editor .midi-clip-properties input[type=checkbox] { justify-self: end; width: 12px; height: 12px; min-height: 12px; margin: 0; }
body .studio .clip-editor .midi-clip-properties button { box-sizing: border-box; width: 100%; min-width: 0; min-height: 18px; padding: 0 4px; border: 1px solid var(--live-scrollbar); border-radius: 9px; background: var(--live-control); color: var(--live-text); font: 9px/16px LiveSans, Arial, sans-serif; }
body .studio .clip-editor .midi-clip-properties .midi-loop-toggle { display: flex; position: relative; justify-content: center; height: 19px; border: 1px solid var(--live-scrollbar); background: var(--live-control); cursor: pointer; }
body .studio .clip-editor .midi-loop-toggle:has(:checked) { background: var(--live-accent); color: var(--live-on-text); }
body .studio .clip-editor .midi-loop-toggle input { position: absolute; inset: 0; opacity: 0; width: 100% !important; height: 100% !important; cursor: pointer; }
body .studio .clip-editor .midi-loop-toggle:focus-within { outline: 1px solid var(--live-text); }
body .studio .clip-editor .midi-pitch-range { display: grid; place-items: center; min-height: 28px; border-radius: 2px; background: var(--live-field); color: var(--live-text); font-size: 11px; }
body .studio .clip-editor .midi-editor-heading,
body .studio .clip-editor .midi-note-actions {
  justify-content: flex-start;
  align-items: center;
  gap: 3px 6px;
  min-height: 21px;
  padding: 2px 5px;
  font-size: 9px;
}
body .studio .clip-editor .midi-editor-heading > span:first-child { flex: 0 0 auto; }
body .studio .clip-editor .midi-sidebar-tools {
  position: sticky;
  left: 0;
  z-index: 3;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: var(--midi-sidebar-width);
  min-width: var(--midi-sidebar-width);
  height: 20px;
  padding: 1px 2px;
  background: var(--live-surface);
  border-right: 1px solid var(--live-frame);
}
body .studio .clip-editor .midi-sidebar-tools button,
body .studio .clip-editor .midi-sidebar-tools select {
  box-sizing: border-box;
  min-width: 0;
  width: auto;
  height: 16px;
  min-height: 16px;
  padding: 0 3px;
  font: 8px/14px LiveSans, Arial, sans-serif;
  border: 1px solid var(--live-frame);
  border-radius: 1px;
  background: var(--live-control);
  color: var(--live-text);
}
body .studio .clip-editor .midi-sidebar-tools button { flex: 0 0 27px; }
body .studio .clip-editor .midi-sidebar-tools select { flex: 1 1 auto; max-width: 48px; padding-inline: 1px; }
body .studio .clip-editor .midi-sidebar-tools button[aria-pressed=true] { background: var(--live-accent); color: var(--live-on-text); }
body .studio .clip-editor .midi-loop-settings { gap: 3px 5px; }
body .studio .clip-editor .midi-loop-settings label { gap: 3px; }
body .studio .clip-editor .midi-loop-settings button,
body .studio .clip-editor .midi-loop-settings input,
body .studio .clip-editor .midi-loop-settings select,
body .studio .clip-editor [data-midi-fold] {
  height: 16px;
  min-height: 16px;
  font: inherit;
  line-height: normal;
  border: 1px solid var(--live-frame);
  border-radius: 1px;
  box-shadow: none;
}
body .studio .clip-editor [data-midi-fold] {
  padding: 0 5px;
  color: var(--live-text);
  background: var(--live-control);
}
body .studio .clip-editor [data-midi-fold][aria-pressed=true] {
  color: var(--live-on-text);
  background: var(--live-accent);
}
body .studio .clip-editor .midi-loop-settings input[type=checkbox] {
  width: 12px;
  height: 12px;
  min-height: 12px;
  margin: 0;
}
body .studio .clip-editor .midi-time-ruler { font-size: 9px; }
body .studio .clip-editor .midi-time-ruler > .midi-sidebar-tools { grid-column: 1; border-left: 0; padding: 1px 2px; }
body .studio .clip-editor .midi-time-ruler > span:not(.midi-sidebar-tools) { min-width: 0; }
body .studio .clip-editor .midi-piano-ruler,
body .studio .clip-editor .midi-velocity-sidebar {
  box-sizing: border-box;
  width: var(--midi-sidebar-width);
  min-width: var(--midi-sidebar-width);
  flex: 0 0 var(--midi-sidebar-width);
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--live-surface);
}
body .studio .clip-editor .midi-piano-ruler { display: flex; flex-direction: column; }
body .studio .clip-editor .midi-piano-key-row {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  width: var(--midi-sidebar-width);
  min-width: 0;
}
body .studio .clip-editor .midi-octave-label {
  min-width: 0;
  display: flex;
  align-items: center;
  padding-left: 4px;
  overflow: hidden;
  color: var(--live-muted);
  font: 8px/1 LiveSans, Arial, sans-serif;
}
body .studio .clip-editor .midi-piano-key-row .midi-piano-key {
  box-sizing: border-box;
  width: 32px;
  min-width: 32px;
  margin-left: auto;
}
body .studio .clip-editor .midi-piano-key.midi-key-in-scale {
  background: color-mix(in srgb, #8e69c7 32%, var(--live-white-key));
}
body .studio .clip-editor .midi-piano-key.midi-black-key.midi-key-in-scale {
  background: color-mix(in srgb, #8e69c7 42%, var(--live-black-key));
}
body .studio .clip-editor .midi-piano-key.midi-key-root {
  background: #8e69c7;
  color: #fff;
}
body .studio .clip-editor .midi-key-row.midi-key-in-scale { fill: color-mix(in srgb, #8e69c7 20%, var(--live-surface)); }
body .studio .clip-editor .midi-key-row.midi-key-root { fill: color-mix(in srgb, #8e69c7 38%, var(--live-surface)); }
body .studio .clip-editor .midi-octave-label:has(+ .midi-key-root) { color: #c9b5f0; font-weight: 600; }
body .studio .clip-editor .midi-velocity-sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 2px 4px;
  border-right: 1px solid var(--live-frame);
  color: var(--live-muted);
  font-size: 8px;
}
body .studio .clip-editor .midi-velocity-name { text-align: left; white-space: nowrap; }
body .studio .clip-editor .midi-velocity-sidebar .midi-velocity-scale {
  position: static;
  width: auto;
  min-width: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0;
  line-height: 1;
  background: transparent;
}
body .studio .clip-editor .midi-note-grid,
body .studio .clip-editor .midi-velocity-grid { width: calc(100% - var(--midi-sidebar-width)); }
body .studio .clip-editor .midi-velocity-footer {
  border-top: 1px solid var(--live-frame);
  font-size: 9px;
}
body .studio .clip-editor .midi-editor-heading { flex: 0 0 22px; box-sizing: border-box; padding: 0; min-height: 22px; flex-wrap: nowrap; }
body .studio .clip-editor .midi-editor-fold-controls { display: flex; gap: 3px; align-items: center; padding-left: 4px; }
body .studio .clip-editor .midi-editor-heading button { height: 17px; padding: 0 5px; border: 1px solid var(--live-scrollbar); border-radius: 0; background: var(--live-control); color: var(--live-text); font: inherit; }
body .studio .clip-editor .midi-editor-heading button[aria-pressed=true] { background: var(--live-accent); color: var(--live-on-text); }
body .studio .clip-editor .midi-notes-tab { align-self: stretch; display: grid; place-items: center; min-width: 68px; margin-left: auto; border-inline: 1px solid var(--live-frame); background: var(--live-control); }
body .studio .clip-editor .midi-grid-indicator { min-width: 44px; margin-left: auto; padding-right: 7px; text-align: right; color: var(--live-muted); }
body .studio .clip-editor .midi-time-ruler { height: 32px; border-bottom: 1px solid var(--live-frame); }
body .studio .clip-editor .midi-loop-ruler { position: absolute; bottom: 2px; left: var(--midi-sidebar-width); right: 0; height: 9px; pointer-events: none; }
body .studio .clip-editor .midi-loop-ruler > i { position: absolute; left: var(--midi-loop-start); width: var(--midi-loop-width); height: 8px; box-sizing: border-box; border: 1px solid var(--live-scrollbar); background: color-mix(in srgb, var(--track-color) 45%, var(--live-surface)); }
body .studio .clip-editor .midi-loop-ruler > i::before,
body .studio .clip-editor .midi-loop-ruler > i::after { content: ''; position: absolute; top: -1px; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
body .studio .clip-editor .midi-loop-ruler > i::before { left: -1px; border-left: 5px solid var(--live-text); }
body .studio .clip-editor .midi-loop-ruler > i::after { right: -1px; border-right: 5px solid var(--live-text); }
body .studio .clip-editor .midi-piano-key { background: var(--live-white-key, #c4c4c4); color: transparent; border-bottom: 1px solid var(--live-frame); }
body .studio .clip-editor .midi-piano-key.midi-black-key { background: var(--live-black-key, #555); color: transparent; }
body .studio .clip-editor .midi-octave-label { font-size: 9px; }
body .studio .clip-editor .midi-note text { font-size: 9px; }
body .studio .clip-editor .midi-velocity-grid { background: var(--live-surface); }
body .studio .clip-editor .midi-velocity-note circle { stroke: var(--live-frame); stroke-width: 1; vector-effect: non-scaling-stroke; }
body .studio .clip-editor .midi-velocity-divider { height: 3px; flex: 0 0 3px; }
body .studio .clip-editor .midi-velocity-footer { display: flex; align-items: center; gap: 5px; box-sizing: border-box; height: 24px; min-height: 24px; overflow-x: auto; white-space: nowrap; padding: 2px 5px; }
body .studio .clip-editor .midi-velocity-footer label { display: flex; align-items: center; gap: 4px; }
body .studio .clip-editor .midi-velocity-footer input { box-sizing: border-box; width: 42px; height: 18px; border: 1px solid var(--live-scrollbar); border-radius: 0; background: var(--live-field); color: var(--live-text); font: inherit; padding: 0 3px; }
body .studio .clip-editor .midi-velocity-footer button { height: 18px; padding: 0 7px; border: 1px solid var(--live-scrollbar); border-radius: 9px; background: var(--live-control); color: var(--live-text); font: inherit; }
/* Sample parameters occupy one column alongside the waveform, rather than a
   row of unrelated cards. Export remains reachable below the parameters. */
body .studio .clip-editor .audio-card {
  display: grid;
  grid-template-columns: 222px minmax(100px, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  align-items: stretch;
  min-width: 0;
  min-height: 150px;
  height: 100%;
  overflow: auto;
}
body .studio .clip-editor .audio-description {
  grid-column: 1;
  grid-row: 1;
  width: auto;
  min-width: 0;
  padding: 5px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.35;
  border-right: 1px solid var(--live-frame);
}
body .studio .clip-editor .audio-description > small {
  display: block;
  margin: 3px 0 5px;
  font: 9px/1.35 LiveSans, Arial, sans-serif;
}
body .studio .clip-editor .warp-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 5px;
  align-items: center;
  margin: 4px 0;
}
body .studio .clip-editor .warp-controls label {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 4px;
  min-width: 0;
}
body .studio .clip-editor .warp-controls input,
body .studio .clip-editor .warp-controls select {
  width: 100%;
  max-width: 100%;
  height: 17px;
  border-radius: 1px;
  font: inherit;
}
body .studio .clip-editor .warp-controls > small { grid-column: 1 / -1; }
body .studio .clip-editor .warp-tempo-buttons { display: flex; gap: 2px; }
body .studio .clip-editor .warp-controls button { height: 17px; border-radius: 1px; }
body .studio .clip-editor .audio-card > #export-audio {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  padding: 2px 5px 5px;
  font-size: 9px;
}
body .studio .clip-editor .audio-wave {
  grid-column: 2;
  grid-row: 1 / -1;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 130px;
  padding: 12px 6px;
  margin: 0;
  background: var(--live-desktop);
}
body .studio .clip-editor .audio-wave i { border-radius: 0; }
/* Settings is appended directly to body, outside .studio. */
body dialog.audio-settings {
  width: 530px;
  max-width: calc(100vw - 16px);
  height: min(580px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--live-scrollbar, #777);
  border-radius: 9px;
}
body .audio-settings > header {
  position: relative;
  height: 28px;
  font-size: 12px;
  border-radius: 8px 8px 0 0;
}
body .audio-settings > header strong { font-weight: 600; }
body .audio-settings .settings-layout {
  min-width: 0;
  min-height: 0;
  height: calc(100% - 28px);
  grid-template-columns: 120px minmax(0, 1fr);
}
body .audio-settings .settings-layout nav { gap: 0; padding-top: 5px; }
body .audio-settings .settings-layout nav button {
  min-height: 24px;
  padding: 4px 8px;
  font: 9px/1.3 LiveSans, Arial, sans-serif;
  border-radius: 0;
}
body .audio-settings .settings-layout section {
  min-width: 0;
  padding: 0 12px 12px;
  overscroll-behavior: contain;
}
body .audio-settings .settings-layout h2 {
  margin: 10px 0 6px;
  font-size: 10px;
  font-weight: 600;
}
body .audio-settings .settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 170px);
  align-items: center;
  gap: 5px 8px;
  min-height: 22px;
  margin: 0;
  font-size: 10px;
}
body .audio-settings .settings-row select,
body .audio-settings .settings-row output {
  min-width: 0;
  width: 100%;
  min-height: 17px;
  padding: 1px 3px;
  border-radius: 1px;
  font: inherit;
}
body .audio-settings .settings-row output { overflow-wrap: anywhere; }
body .audio-settings .settings-layout p {
  font: 10px/1.4 LiveSans, Arial, sans-serif;
  overflow-wrap: anywhere;
}
body .audio-settings .settings-layout section > button {
  min-height: 18px;
  padding: 2px 5px;
  font: inherit;
  border-radius: 2px;
}
/* ContextMenu is likewise a body-level floating window. A single check slot
   keeps checked and unchecked labels and their shortcuts on common columns. */
body .context-menu {
  min-width: min(205px, calc(100vw - 8px));
  max-width: calc(100vw - 8px);
  max-height: calc(100dvh - 8px);
  overflow: auto;
  padding: 3px 0;
  border-radius: 3px;
  box-shadow: 1px 2px 6px #0005;
}
body .context-menu button {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 21px;
  padding: 2px 8px;
  font: inherit;
  line-height: 1.3;
}
body .context-menu button::before {
  content: '';
  grid-column: 1;
  width: 10px;
  margin: 0;
}
body .context-menu button[aria-checked=true]::before {
  content: '✓';
  width: 10px;
  margin: 0;
}
body .context-menu button > span { grid-column: 2; overflow-wrap: anywhere; }
body .context-menu .menu-shortcut {
  grid-column: 3;
  font: 9px LiveSans, Arial, sans-serif;
  white-space: nowrap;
  color: var(--live-muted);
  margin: 0;
}
@container clip-view (max-width: 620px) {
  body .studio .clip-editor .midi-clip-view { grid-template-columns: 240px minmax(0, 1fr); }
  body .studio .clip-editor .midi-editor { --midi-sidebar-width: 68px; }
  body .studio .clip-editor .midi-sidebar-tools { gap: 1px; padding-inline: 1px; }
  body .studio .clip-editor .midi-sidebar-tools button { flex-basis: 24px; padding-inline: 1px; font-size: 7px; }
  body .studio .clip-editor .midi-sidebar-tools select { max-width: 39px; font-size: 7px; }
  body .studio .clip-editor .editor-settings { margin-left: 0; }
  body .studio .clip-editor .editor-track { display: none; }
  body .studio .clip-editor .editor-bottom { flex-wrap: wrap; }
  body .studio .clip-editor .audio-card { grid-template-columns: 185px minmax(100px, 1fr); }
  body .studio .clip-editor .midi-loop-settings { flex-wrap: wrap; }
}
@container clip-view (max-width: 480px) {
  body .studio .clip-editor .midi-clip-view { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(92px, auto) minmax(0, 1fr); overflow: auto; }
  body .studio .clip-editor .midi-clip-properties { max-height: 150px; border-right: 0; border-bottom: 1px solid var(--live-frame); }
  body .studio .clip-editor .midi-clip-properties > header { grid-column: 1 / -1; }
  body .studio .clip-editor .midi-clip-properties section { align-content: start; }
}
@media (max-width: 480px) {
  body .audio-settings .settings-layout { grid-template-columns: 94px minmax(0, 1fr); }
  body .audio-settings .settings-layout section { padding-inline: 8px; }
  body .audio-settings .settings-row { grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 6px 0; }
  body .studio .mapping-panel { min-width: 0; width: calc(100vw - 16px); max-width: 320px; }
}
body .studio .mapping-panel { font: 10px LiveSans, Arial, sans-serif; border-radius: 0; box-shadow: none; }
body .studio .mapping-panel header { min-height: 24px; padding: 3px 6px; }
body .studio .mapping-panel header strong { font-weight: 400; }
body .studio .mapping-panel > label { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 5px; }
body .studio .mapping-panel button,
body .studio .mapping-panel select { min-height: 18px; padding: 1px 3px; font: inherit; border-radius: 1px; }
body .studio .mapping-panel th { font-weight: 400; background: var(--live-surface); }
body .studio .mapping-panel th,
body .studio .mapping-panel td { padding: 3px 5px; font-size: 9px; }
/* Piano keys use the extracted theme colors; black keys stop before the
   common 42px grid origin instead of becoming a second full-width label cell. */
body .studio .clip-editor .midi-piano-ruler { background:var(--live-white-key); }
body .studio .clip-editor .midi-piano-key { background:var(--live-white-key); color:var(--live-clip-text); border-color:var(--live-muted); font:8px/14px LiveSans,Arial,sans-serif; }
body .studio .clip-editor .midi-piano-key.midi-black-key { width:72%; background:var(--live-black-key); color:var(--live-text); border-right:1px solid var(--live-frame); border-radius:0 1px 1px 0; }
