@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/space-grotesk.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #08090b;
  --surface: #111215;
  --line: #292a2e;
  --text: #eeeef0;
  --muted: #96969f;
  --lime: #cefa75;
  --pink: #ef81b5;
  --purple: #b99bff;
  --font: "Space Grotesk", Arial, sans-serif;
  font-family: var(--font);
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
  background: none;
  border: 0;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
::selection {
  background: var(--lime);
  color: #111;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-thumb {
  background: #3e3c45;
  border-radius: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
svg {
  display: block;
}
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
}
kbd {
  font: 10px var(--font);
  color: #b8b5bf;
  background: #24242b;
  padding: 3px 5px;
  border-radius: 3px;
}
input {
  min-width: 0;
  color: var(--text);
  accent-color: var(--lime);
}
input[type="number"]::-webkit-inner-spin-button {
  opacity: 0;
}
input[type="range"] {
  cursor: pointer;
  accent-color: var(--lime);
}
#shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  min-width: 360px;
}
.app-header {
  height: 76px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 25px;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: #0b0c0e;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f3f3f5;
  text-decoration: none;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.brand-symbol {
  color: var(--lime);
  width: 29px;
  height: 32px;
}
.brand-period {
  color: var(--lime);
}
.header-divider {
  height: 25px;
  width: 1px;
  background: var(--line);
  flex-shrink: 0;
}
.project-name {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.project-name input {
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 500;
  width: 200px;
}
.project-name > span {
  font-size: 8px;
  letter-spacing: 0.16em;
  color: #91919a;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
#save-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9798a2;
  font-size: 10px;
  margin-right: 15px;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #87a86a;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 32px;
  color: #aaaab5;
  border-radius: 5px;
  flex-shrink: 0;
}
.icon-button:hover {
  color: #fff;
  background: #22232a;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 9px;
  white-space: nowrap;
  color: #bcbcc5;
  font-size: 11px;
  border-radius: 5px;
}
.text-button:hover {
  color: #fff;
  background: #23232a;
}
.text-button .icon {
  width: 15px;
  height: 15px;
}
.export-button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  background: #d2fa8d;
  color: #12150e;
  font-size: 11px;
  font-weight: 700;
  border-radius: 5px;
  white-space: nowrap;
}
.export-button:hover {
  background: #e1ffb0;
}
.export-button .icon {
  width: 15px;
  height: 15px;
}
.studio {
  display: flex;
  min-height: 0;
  flex: 1;
}
.library {
  width: 244px;
  flex-shrink: 0;
  background: #0d0e11;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.library-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 23px 20px 17px;
}
.library-title h1 {
  font-size: 17px;
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.count {
  font-size: 10px;
  color: #9d9da9;
  border: 1px solid #30313a;
  line-height: 16px;
  padding: 0 5px;
  border-radius: 4px;
}
.search-box {
  display: flex;
  align-items: center;
  margin: 0 16px;
  gap: 7px;
  padding: 9px 9px;
  background: #17181d;
  border: 1px solid #2b2b34;
  border-radius: 5px;
}
.search-box .icon {
  width: 14px;
  height: 14px;
  color: #92929e;
}
.search-box input {
  background: none;
  border: 0;
  outline: none;
  width: 100%;
  font-size: 10px;
  padding: 1px;
}
.search-box input::placeholder {
  color: #9b9aa6;
}
.search-box kbd {
  padding: 0 3px;
  font-size: 10px;
}
.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 15px 16px 16px;
  border-bottom: 1px solid #23242b;
}
.filter-button {
  font-size: 10px;
  color: #acabb7;
  padding: 5px 8px;
  border-radius: 4px;
}
.filter-button.active {
  background: #cefa751c;
  color: var(--lime);
}
.filter-button:hover {
  background: #24252b;
  color: #eee;
}
.library-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  min-height: 50px;
}
.library-device {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 8px;
  text-align: left;
  border-radius: 5px;
  transition: background 120ms;
}
.library-device:hover {
  background: #202127;
}
.device-glyph {
  width: 33px;
  height: 36px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--item-color) 10%, #15151c);
  color: var(--item-color);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.glyph-dnb {
  color: var(--pink);
  background: #2b1824;
}
.glyph-subtractor {
  color: var(--lime);
  background: #23291a;
}
.glyph-orbit {
  color: var(--purple);
  background: #251d35;
}
.library-device-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.library-device strong {
  font-size: 11px;
  font-weight: 500;
  color: #e2e1e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.library-device small {
  font-size: 8px;
  color: #a09ca9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 157px;
}
.add-device {
  margin-left: auto;
  color: #a9a6b5;
  opacity: 0;
}
.add-device .icon {
  width: 13px;
  height: 13px;
}
.library-device:hover .add-device {
  opacity: 1;
}
.library-footer {
  margin-top: auto;
  padding: 17px 16px 12px;
  border-top: 1px solid var(--line);
}
.library-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #9b98a8;
  font-size: 9px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.library-tip .icon {
  color: #787482;
  width: 14px;
  height: 14px;
  margin-top: 2px;
}
.help-button {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #b7b3c3;
  width: 100%;
  padding: 0;
}
.help-button .icon {
  width: 14px;
  height: 14px;
}
.help-button kbd {
  margin-left: auto;
}
.main-workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #08090b;
}
.rack-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.rack-toolbar {
  height: 56px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  background: #101114;
}
.rack-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.rack-title > .icon {
  width: 16px;
  height: 16px;
  color: #c3bdcf;
}
.rack-title h2 {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}
.rack-title > span {
  font-size: 9px;
  color: #9d99aa;
  margin-left: 6px;
}
.rack-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cable-toggle {
  font-size: 10px;
}
.cable-toggle.active {
  color: #d6e6b9;
}
.flip-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 10px;
  border: 1px solid #41404b;
  border-radius: 5px;
  background: #1b1c22;
}
.flip-button .icon {
  width: 14px;
  height: 14px;
}
.flip-button kbd {
  font-size: 9px;
  margin-left: 9px;
}
.flip-button:hover {
  border-color: var(--lime);
}
.rack-subbar {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 27px;
  flex-shrink: 0;
  color: #9b97a7;
  font-size: 8px;
  letter-spacing: 0.08em;
}
.rack-subbar > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #b5b0bf;
}
.live-light {
  height: 4px;
  width: 4px;
  border-radius: 50%;
  background: var(--lime);
}
.patch-count {
  font-size: 8px;
  letter-spacing: 0;
  color: #908c9b;
}
.rack-instruction {
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0;
  color: #a09aaa;
}
.rack-scroll {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 9px 25px 26px;
  background: radial-gradient(ellipse at 50% 0, #18141c 0, transparent 65%);
}
.rack-world {
  position: relative;
  max-width: 1250px;
  margin: auto;
  min-height: 100%;
  padding: 0 15px;
}
.rail {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 13px;
  background: #17171c;
  border: 1px solid #24232b;
  z-index: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 21px,
    #09090b 22px,
    #09090b 26px,
    transparent 27px,
    transparent 45px
  );
  background-size: 5px 45px;
  background-repeat: repeat-y;
  background-position: center;
}
.rail-left {
  left: 0;
  border-radius: 4px 0 0 4px;
}
.rail-right {
  right: 0;
  border-radius: 0 4px 4px 0;
}
.rack-devices {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0 0 16px;
}
.device-wrap {
  position: relative;
}
.device-context {
  position: absolute;
  right: 10px;
  top: 5px;
  display: flex;
  gap: 3px;
  opacity: 0;
  z-index: 15;
}
.device-wrap:hover .device-context,
.device-context:focus-within {
  opacity: 1;
}
.device-context button {
  color: #bcb6ca;
  background: #161419e8;
  width: 22px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}
.device-context .icon {
  width: 12px;
  height: 12px;
}
.rack-add-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 65px;
  color: #bbb5c5;
  font-size: 11px;
  border: 1px dashed #3d3746;
  border-radius: 4px;
  margin-top: 2px;
}
.rack-add-slot .icon {
  width: 16px;
  height: 16px;
  color: var(--lime);
}
.rack-add-slot small {
  font-size: 9px;
  color: #9d96aa;
  margin-left: 14px;
}
.rack-add-slot:hover {
  background: #1c1b23;
  border-color: var(--lime);
}
.drag-over {
  outline: 1px dashed var(--lime);
  outline-offset: 3px;
}
.cable-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
  overflow: visible;
}
.patch-cable {
  pointer-events: stroke;
  cursor: pointer;
  outline: none;
}
.patch-cable path {
  fill: none;
  stroke-linecap: round;
}
.cable-shadow {
  stroke: #000a;
  stroke-width: 7;
  transform: translateY(3px);
}
.cable-core {
  stroke-width: 4;
}
.cable-sheen {
  stroke: #ffffff30;
  stroke-width: 1;
  transform: translate(-0.5px, -1px);
}
.patch-cable:hover .cable-core,
.patch-cable:focus .cable-core {
  stroke-width: 6;
}
.cable-preview {
  stroke: var(--lime);
  stroke-width: 3;
  stroke-dasharray: 6 4;
  fill: none;
}
.is-playing .cable-sheen {
  stroke-dasharray: 5 27;
  animation: signal-flow 2s linear infinite;
}
.jack.pending {
  outline: 2px solid var(--lime);
  outline-offset: 5px;
}
.timeline {
  height: 246px;
  flex-shrink: 0;
  border-top: 1px solid #35313e;
  background: #101115;
  display: flex;
  flex-direction: column;
}
.timeline-toolbar {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.timeline-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.timeline-title > .icon {
  width: 14px;
  height: 14px;
  color: #bdb6c8;
}
.timeline-title h2 {
  font-size: 11px;
  font-weight: 500;
  margin: 0;
}
.timeline-title > span {
  font-size: 9px;
  color: #a09aaa;
  margin-left: 8px;
}
.timeline-tools {
  display: flex;
  align-items: center;
  gap: 15px;
}
.snap-label {
  font-size: 8px;
  color: #9d98a7;
  letter-spacing: 0.07em;
}
.snap-label b {
  color: #d1cbd9;
  font-weight: 400;
  margin-left: 6px;
}
.timeline-tools .text-button {
  font-size: 9px;
}
.timeline-content {
  overflow: auto;
  position: relative;
  flex: 1;
  min-height: 0;
}
.timeline-ruler {
  height: 30px;
  display: flex;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #17161d;
}
.track-heading {
  width: 191px;
  flex-shrink: 0;
  padding: 11px 15px;
  font-size: 7px;
  letter-spacing: 0.13em;
  color: #9992a4;
  border-right: 1px solid #323039;
}
.bar-ruler {
  display: flex;
  position: relative;
  flex: 1;
}
.bar-ruler > button {
  width: 12.5%;
  border-left: 1px solid #2f2a36;
  text-align: left;
  padding-left: 10px;
  font-size: 8px;
  color: #aaa3b8;
  z-index: 2;
}
.bar-ruler > button.current {
  color: var(--lime);
}
.loop-region {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: #cefa753a;
}
.loop-region > span {
  position: absolute;
  width: 5px;
  height: 8px;
  background: var(--lime);
  top: 0;
  left: 0;
}
.loop-region > span + span {
  left: auto;
  right: 0;
}
.track-rows {
  position: relative;
  min-height: calc(100% - 30px);
}
.timeline-track {
  height: 43px;
  display: flex;
  border-bottom: 1px solid #242129;
}
.track-label {
  width: 191px;
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0 9px 0 14px;
  border-right: 1px solid #343039;
  background: #111216;
  z-index: 2;
}
.track-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  text-align: left;
  font-size: 9px;
  flex: 1;
  min-width: 0;
}
.track-select > i {
  width: 5px;
  height: 5px;
  background: var(--track-color);
  border-radius: 1px;
  flex-shrink: 0;
}
.track-select > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-mute,
.track-solo {
  font-size: 7px;
  width: 17px;
  height: 17px;
  border: 1px solid #33303c;
  border-radius: 3px;
  color: #b3acbf;
}
.track-mute.active {
  background: #ed78b3;
  color: #151016;
  border-color: transparent;
}
.track-solo.active {
  background: var(--lime);
  color: #15170f;
  border-color: transparent;
}
.track-lane {
  flex: 1;
  min-width: 0;
  position: relative;
  background-image: repeating-linear-gradient(
      to right,
      #8e7fa018 0,
      #8e7fa018 1px,
      transparent 1px,
      transparent 12.5%
    ),
    repeating-linear-gradient(
      to right,
      #8e7fa00c 0,
      #8e7fa00c 1px,
      transparent 1px,
      transparent 3.125%
    );
}
.timeline-clip {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--track-color) 45%, #25212c);
  background: color-mix(in srgb, var(--track-color) 18%, #111218);
  color: var(--track-color);
  padding: 4px 7px;
  cursor: grab;
  overflow: hidden;
  touch-action: none;
}
.timeline-clip > span {
  display: block;
  font-size: 6px;
  letter-spacing: 0.09em;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline-clip > svg {
  width: 100%;
  height: 14px;
  margin-top: 1px;
  fill: var(--track-color);
  opacity: 0.65;
}
.timeline-clip:hover {
  filter: brightness(1.25);
}
.timeline-clip.dragging {
  cursor: grabbing;
  z-index: 3;
}
.clip-resize {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: ew-resize;
}
.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(191px + (100% - 191px) * var(--position, 0) / 100);
  width: 1px;
  background: #d9fba0;
  pointer-events: none;
  z-index: 4;
}
.timeline-playhead:before {
  content: "";
  position: absolute;
  top: 0;
  left: -3px;
  width: 7px;
  height: 5px;
  background: #d9fba0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.transport {
  height: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  padding: 0 23px;
  background: #0e0f11;
  border-top: 1px solid #333038;
  z-index: 30;
}
.transport-left,
.transport-center,
.transport-right {
  display: flex;
  align-items: center;
}
.transport-left {
  gap: 8px;
}
.audio-led {
  width: 4px;
  height: 4px;
  background: #757480;
  border-radius: 50%;
}
.audio-led.active {
  background: var(--lime);
}
.engine-label {
  font-size: 7px;
  color: #a19aa8;
  letter-spacing: 0.08em;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.engine-label b {
  font-size: 7px;
  color: #c7c4cc;
  font-weight: 400;
}
.transport-center {
  gap: 8px;
}
.transport-center > .icon-button {
  width: 28px;
}
.transport-center .icon {
  width: 16px;
  height: 16px;
}
.play-button {
  width: 43px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: #151a0d;
  border-radius: 5px;
  margin: 0 3px;
}
.play-button:hover {
  background: #e3ffb6;
}
.play-button.playing {
  background: #cefa75;
}
.loop-button.active {
  color: var(--lime);
}
.position-display {
  font-size: 20px;
  letter-spacing: 0.035em;
  font-variant-numeric: tabular-nums;
  margin: 0 14px;
}
.position-display > span {
  color: #7b7785;
  padding: 0 3px;
}
.tempo-control {
  display: flex;
  align-items: baseline;
  position: relative;
  padding: 12px 10px 0 12px;
  border-left: 1px solid #35303e;
  margin-left: 0;
}
.tempo-control > label {
  position: absolute;
  top: 0;
  left: 12px;
  font-size: 6px;
  color: #9e95ac;
  letter-spacing: 0.12em;
}
.tempo-control input {
  width: 39px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 17px;
  appearance: textfield;
}
.tempo-control > span {
  font-size: 7px;
  margin-left: 3px;
  color: #a9a0b4;
}
.time-signature {
  font-size: 10px;
  color: #a49cad;
  border-left: 1px solid #35303e;
  padding-left: 15px;
  margin-left: 5px;
  white-space: nowrap;
}
.transport-right {
  gap: 16px;
}
.master-control {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c4bdcd;
}
.master-control .icon {
  width: 13px;
  height: 13px;
}
.master-control input {
  width: 70px;
  height: 3px;
  accent-color: #d2cbdc;
}
.master-meter {
  display: flex;
  gap: 3px;
  width: 36px;
  height: 19px;
  align-items: flex-end;
}
.master-meter > i {
  width: 5px;
  height: 100%;
  background: linear-gradient(
    to top,
    #7c9e4c 0 73%,
    #e8cb6c 74% 90%,
    #e5758c 91%
  );
  position: relative;
  border-radius: 1px;
  overflow: hidden;
}
.master-meter > i:after {
  content: "";
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  transform: translateY(calc(-1 * var(--level, 0%)));
  background: #24262a;
  transition: transform 80ms;
}
.inspector {
  display: none;
  width: 260px;
  flex-shrink: 0;
  border-left: 1px solid var(--line);
  background: #101115;
  overflow-y: auto;
}
.inspector.open {
  display: block;
}
.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #101115;
  border-bottom: 1px solid var(--line);
  height: 56px;
  padding: 0 15px;
}
.inspector-head h2 {
  font-size: 12px;
  font-weight: 500;
}
.inspector-body,
.help-copy {
  padding: 20px 18px;
}
.inspector-body h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 10px;
}
.inspector-body p {
  font-size: 11px;
  color: #b3acbf;
  line-height: 1.7;
  margin: 0 0 25px;
}
.field-label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 8px;
  color: #a7a0b4;
  letter-spacing: 0.08em;
  margin: 20px 0;
}
.field-label input {
  border: 1px solid #3d3747;
  background: #1b1922;
  padding: 8px;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0;
}
.inspector-controls {
  margin: 25px 0 30px;
}
.inspector-controls label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: #d4cddd;
  margin: 18px 0;
}
.inspector-controls output {
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.inspector-controls input {
  width: 100%;
  height: 3px;
}
#inspector .inspector-controls small[id^="inspector-"] {
  flex-basis: 100%;
  font-size: 12px;
  line-height: 1.45;
  color: #b8bdc6;
}
.connection-list button {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  font-size: 8px;
  text-align: left;
  line-height: 1.6;
  padding: 8px 0;
}
.connection-list .icon {
  width: 12px;
  height: 12px;
}
.connection-list button > .icon {
  margin-left: auto;
}
.remove-device-button {
  color: #e69ab7;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  margin-top: 25px;
}
.remove-device-button .icon {
  width: 13px;
  height: 13px;
}
.help-lead {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--lime);
  margin: 0 0 30px;
}
.help-copy h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 25px 0 8px;
}
.help-copy p:not(.help-lead) {
  color: #b8b0c5;
  font-size: 10px;
  line-height: 1.8;
}
.signal-key {
  display: flex;
  gap: 10px;
  font-size: 7px;
  margin-top: 15px;
}
.signal-key > span {
  color: var(--key);
}
.signal-key > span:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--key);
  margin-right: 4px;
  border-radius: 50%;
}
.keyboard-guide {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  font-size: 9px;
  margin: 30px 0;
  color: #bdb4cd;
}
.keyboard-guide kbd {
  justify-self: end;
}
.experiment-note {
  border-top: 1px solid #3b3246;
  padding-top: 18px;
  margin-top: 30px;
  color: #b3a7c7 !important;
}
.no-results {
  padding: 20px 10px;
  color: #b3acbf;
  font-size: 11px;
  line-height: 1.7;
}
#toast {
  position: fixed;
  z-index: 100;
  bottom: 88px;
  left: 50%;
  transform: translate(-50%, 10px);
  padding: 12px 20px;
  background: #d8f8a8;
  color: #18200d;
  font-size: 11px;
  max-width: min(500px, 90vw);
  box-shadow: 0 7px 25px #0008;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 170ms,
    transform 170ms;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.library[hidden] {
  display: none;
}
.library-close {
  display: flex;
  width: 24px;
  height: 24px;
}
.library-toggle {
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #c3bdcf;
}
.library-toggle.active {
  background: #20212a;
  color: var(--lime);
}
.library-toggle:hover {
  background: #292933;
}
.library-toggle .icon {
  width: 14px;
  height: 14px;
}
.rack-title > .library-toggle {
  margin-right: 8px;
}
@keyframes signal-flow {
  to {
    stroke-dashoffset: -64;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 1600px) {
  .library {
    width: 270px;
  }
  .library-device small {
    max-width: 180px;
  }
  .rack-scroll {
    padding-left: 42px;
    padding-right: 42px;
  }
  .timeline {
    height: 270px;
  }
  .app-header {
    height: 80px;
  }
}
@media (max-width: 1200px) {
  #save-state {
    display: none;
  }
  .library {
    width: 221px;
  }
  .library-device small {
    max-width: 140px;
  }
  .app-header {
    gap: 17px;
    padding: 0 19px;
  }
  .header-actions {
    gap: 5px;
  }
  .project-name input {
    width: 170px;
  }
  .transport {
    gap: 10px;
    padding: 0 16px;
  }
  .transport-center {
    gap: 4px;
  }
  .position-display {
    margin: 0 9px;
  }
  .transport-right {
    gap: 8px;
  }
  .rack-scroll {
    padding-left: 16px;
    padding-right: 16px;
  }
  .inspector.open {
    width: 236px;
  }
  .timeline {
    height: 227px;
  }
  .master-control input {
    width: 55px;
  }
}
@media (max-width: 900px) {
  .app-header {
    height: 66px;
  }
  .brand {
    font-size: 24px;
  }
  .brand-symbol {
    width: 25px;
  }
  .project-name > span {
    font-size: 6px;
  }
  .header-actions > .icon-button,
  .header-actions > .header-divider {
    display: none;
  }
  .library {
    width: 190px;
  }
  .library-title {
    padding-left: 15px;
  }
  .library-filters {
    padding: 12px 10px;
    gap: 2px;
  }
  .filter-button {
    font-size: 9px;
    padding: 4px 6px;
  }
  .search-box {
    margin: 0 10px;
  }
  .search-box input {
    font-size: 9px;
  }
  .library-list {
    padding: 6px 5px;
  }
  .library-device {
    gap: 8px;
    padding: 9px 5px;
  }
  .device-glyph {
    width: 28px;
    height: 30px;
  }
  .library-device strong {
    font-size: 10px;
  }
  .library-device small {
    font-size: 7px;
    max-width: 123px;
  }
  .add-device {
    display: none;
  }
  .library-footer {
    padding: 15px 12px;
  }
  .rack-toolbar {
    padding: 0 16px;
    height: 48px;
  }
  .rack-subbar {
    padding: 0 17px;
  }
  .rack-instruction {
    display: none;
  }
  .rack-title > span {
    display: none;
  }
  .rack-actions {
    gap: 4px;
  }
  .flip-button kbd {
    display: none;
  }
  .rack-scroll {
    padding: 5px 12px 20px;
  }
  .rack-world {
    padding: 0 10px;
  }
  .rail {
    width: 9px;
  }
  .timeline-title > span {
    display: none;
  }
  .timeline-toolbar {
    padding: 0 15px;
  }
  .track-heading,
  .track-label {
    width: 155px;
  }
  .track-label {
    padding-left: 10px;
    gap: 3px;
  }
  .track-select {
    font-size: 8px;
  }
  .timeline-playhead {
    left: calc(155px + (100% - 155px) * var(--position, 0) / 100);
  }
  .time-signature {
    display: none;
  }
  .transport-right .icon-button {
    display: none;
  }
  .transport-left {
    display: none;
  }
  .transport {
    justify-content: center;
    gap: 35px;
    height: 66px;
  }
  .inspector.open {
    position: absolute;
    right: 0;
    top: 66px;
    bottom: 66px;
    z-index: 35;
    box-shadow: -10px 0 35px #0009;
  }
  .timeline {
    height: 219px;
  }
  .rack-add-slot small {
    display: none;
  }
}
@media (max-width: 640px) {
  .app-header {
    height: 61px;
    padding: 0 14px;
    gap: 13px;
  }
  .brand {
    font-size: 23px;
    gap: 6px;
  }
  .brand-symbol {
    width: 23px;
  }
  .app-header > .header-divider {
    display: none;
  }
  .project-name {
    min-width: 0;
  }
  .project-name input {
    width: 115px;
    font-size: 11px;
  }
  .project-name > span {
    display: none;
  }
  .header-actions {
    gap: 0;
  }
  .header-actions .text-button {
    padding: 7px;
  }
  .header-actions .text-button span {
    display: none;
  }
  .header-actions .text-button .icon {
    width: 14px;
  }
  .export-button {
    padding: 8px;
    margin-left: 5px;
  }
  .export-button span {
    display: none;
  }
  .library {
    display: none;
  }
  .library.mobile-open {
    display: flex;
    position: absolute;
    top: 61px;
    bottom: 66px;
    left: 0;
    z-index: 40;
    width: 249px;
    box-shadow: 12px 0 40px #000c;
  }
  .library-device small {
    font-size: 8px;
    max-width: 165px;
  }
  .library-device strong {
    font-size: 11px;
  }
  .library-close {
    display: flex;
    margin-left: auto;
  }
  .library-toggle {
    padding: 5px 6px;
    font-size: 9px;
  }
  .rack-title > .library-toggle {
    margin-right: 0;
  }
  .rack-title {
    gap: 7px;
  }
  .rack-title > .icon {
    display: none;
  }
  .rack-toolbar {
    height: 47px;
    padding: 0 12px;
  }
  .rack-title h2 {
    font-size: 12px;
  }
  .rack-actions .text-button {
    font-size: 9px;
    padding: 5px;
  }
  .flip-button {
    font-size: 9px;
    padding: 6px 8px;
  }
  .rack-subbar {
    height: 28px;
    font-size: 7px;
    padding: 0 16px;
    gap: 11px;
  }
  .rack-scroll {
    padding: 5px 8px 20px;
  }
  .rack-world {
    padding: 0 8px;
  }
  .rail {
    width: 7px;
  }
  .rack-devices {
    gap: 10px;
  }
  .timeline {
    height: 210px;
  }
  .timeline-toolbar {
    padding: 0 12px;
    height: 35px;
  }
  .timeline-tools {
    gap: 8px;
  }
  .timeline-tools .snap-label {
    display: none;
  }
  .timeline-title h2 {
    font-size: 10px;
  }
  .timeline-ruler {
    height: 24px;
  }
  .track-heading,
  .track-label {
    width: 113px;
  }
  .track-label {
    padding-left: 8px;
    padding-right: 5px;
    gap: 3px;
  }
  .track-select {
    font-size: 7px;
    gap: 5px;
  }
  .track-select > span {
    max-width: 59px;
  }
  .track-mute,
  .track-solo {
    width: 12px;
    height: 14px;
    font-size: 6px;
  }
  .timeline-track {
    height: 42px;
  }
  .track-heading {
    padding: 8px;
    font-size: 6px;
  }
  .bar-ruler > button {
    padding-left: 5px;
    font-size: 7px;
  }
  .timeline-clip {
    padding: 4px;
  }
  .timeline-clip > span {
    font-size: 5px;
  }
  .timeline-playhead {
    left: calc(113px + (100% - 113px) * var(--position, 0) / 100);
  }
  .transport {
    padding: 0 10px;
    gap: 10px;
    justify-content: space-between;
  }
  .transport-center {
    gap: 3px;
  }
  .transport-center > .icon-button {
    width: 22px;
  }
  .transport-center > .icon-button:first-child {
    display: none;
  }
  .play-button {
    width: 34px;
    height: 32px;
  }
  .transport-center .icon {
    width: 14px;
    height: 14px;
  }
  .position-display {
    font-size: 16px;
    margin: 0 5px;
    letter-spacing: 0;
  }
  .position-display > span {
    padding: 0 1px;
  }
  .tempo-control {
    padding: 12px 3px 0 9px;
  }
  .tempo-control > label {
    left: 9px;
    font-size: 5px;
  }
  .tempo-control input {
    width: 32px;
    font-size: 15px;
  }
  .tempo-control > span {
    font-size: 6px;
  }
  .master-control input {
    width: 40px;
  }
  .master-control .icon {
    display: none;
  }
  .master-meter {
    width: 14px;
    height: 16px;
  }
  .master-meter > i {
    width: 3px;
  }
  .transport-right {
    gap: 6px;
  }
  .inspector.open {
    top: 61px;
  }
  .rack-add-slot {
    font-size: 9px;
    min-height: 50px;
  }
  .device-context {
    opacity: 1;
    right: 5px;
  }
  .device-context button {
    width: 18px;
    height: 17px;
  }
}
.field-label select {
  width: 100%;
  border: 1px solid #3d3747;
  background: #1b1922;
  color: #eee;
  padding: 8px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0;
}
.pattern-lab {
  padding: 18px 0 20px;
  border-top: 1px solid #38303f;
  border-bottom: 1px solid #38303f;
  margin-top: 20px;
}
.pattern-lab h3 {
  color: var(--lime);
}
.pattern-lab p {
  font-size: 9px;
  margin-bottom: 12px;
}
.generator-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 10px 0 18px;
}
.generator-actions button {
  padding: 8px 4px;
  font-size: 8px;
  background: #25202e;
  border: 1px solid #44374e;
  color: #d9c4ee;
  border-radius: 3px;
}
.generator-actions button:hover {
  background: var(--lime);
  color: #17200a;
}
.drum-matrix {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
}
.drum-matrix-row {
  display: grid;
  grid-template-columns: 24px repeat(16, minmax(7px, 1fr));
  gap: 2px;
  align-items: center;
}
.drum-matrix-row > span {
  font-size: 6px;
  text-transform: uppercase;
  color: #b7abc8;
}
.matrix-hit {
  height: 17px;
  background: #30232d;
  border: 1px solid #50323e;
  border-radius: 2px;
  padding: 0;
}
.matrix-hit:nth-child(4n + 2) {
  border-color: #9a5b79;
}
.matrix-hit.active {
  background: #fa8aba;
}
.matrix-hit.ghost {
  background: #9b5b76;
}
.bass-note-editor {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.bass-note-editor label {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bass-note-editor label > span {
  font-size: 6px;
  color: #a59aae;
}
.bass-note-editor select {
  background: #25222c;
  border: 1px solid #43374c;
  color: var(--lime);
  width: 100%;
  font-size: 9px;
  padding: 5px 1px;
  border-radius: 3px;
}
.rack-world.flipping .rack-device {
  animation: rack-flip 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes rack-flip {
  from {
    transform: perspective(1000px) rotateX(13deg);
    filter: brightness(0.55);
  }
  to {
    transform: perspective(1000px) rotateX(0);
    filter: brightness(1);
  }
}
svg[data-scope="parametric-eq"] {
  cursor: crosshair;
  touch-action: none;
}
svg[data-scope="orbit"] {
  cursor: crosshair;
  touch-action: none;
}
/* The arrangement is an editable instrument, with its own selection and pattern surfaces. */
.timeline {
  height: 290px;
}
.timeline-toolbar select,
.timeline-tools select,
.clip-selection-toolbar input,
.pattern-editor-tools select {
  background: #191921;
  border: 1px solid #42394e;
  color: #e3d9ef;
  border-radius: 3px;
  font-size: 9px;
  padding: 4px 6px;
}
.timeline-tools > label {
  font-size: 7px;
  color: #b6a9c7;
  display: flex;
  align-items: center;
  gap: 5px;
}
.timeline-title select {
  font-size: 8px;
  margin-left: 6px;
}
.automation-write {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  color: #c6b6d3;
  border: 1px solid #54435d;
  padding: 5px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.automation-write .icon {
  width: 11px;
  height: 11px;
}
.automation-write.active {
  color: #ff9bbf;
  background: #481d31;
  border-color: #d976a2;
}
.clip-selection-toolbar {
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  background: #18151e;
  border-bottom: 1px solid #3d3049;
  overflow: auto;
  white-space: nowrap;
}
.clip-selection-toolbar > input {
  width: 140px;
  font-size: 9px;
}
.clip-selection-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 6px;
  color: #c3b5cf;
}
.clip-selection-toolbar label input {
  width: 52px;
  font-variant-numeric: tabular-nums;
}
.clip-selection-toolbar button {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  padding: 5px 6px;
  border-radius: 3px;
  color: #d6c9e2;
}
.clip-selection-toolbar button:hover {
  background: #372942;
}
.clip-selection-toolbar button .icon {
  width: 11px;
  height: 11px;
}
.clip-selection-toolbar button.clip-delete {
  color: #ff98ba;
}
.selected-clip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.clip-selection-hint {
  font-size: 9px;
  color: #b5a6c4;
}
.timeline-grid {
  position: relative;
  min-width: 100%;
}
.track-heading,
.track-label {
  position: sticky;
  left: 0;
  z-index: 7;
}
.track-heading {
  z-index: 9;
}
.timeline-ruler {
  z-index: 8;
}
.bar-ruler > button {
  flex: 1;
  width: auto;
}
.track-lane {
  background-size:
    calc(100% / var(--arr-bars, 8)) 100%,
    calc(100% / var(--arr-bars, 8) / 4) 100%;
  background-image: linear-gradient(to right, #7f73922a 1px, transparent 1px),
    linear-gradient(to right, #7f739214 1px, transparent 1px);
}
.timeline-clip {
  touch-action: none;
  isolation: isolate;
  min-width: 7px;
}
.timeline-clip.selected {
  border-color: var(--track-color);
  box-shadow: inset 0 0 0 1px var(--track-color);
  background: color-mix(in srgb, var(--track-color) 28%, #111218);
}
.clip-trim {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  z-index: 3;
  opacity: 0.4;
}
.clip-trim:after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  width: 2px;
  background: currentColor;
  opacity: 0.75;
  border-radius: 1px;
}
.clip-trim-left {
  left: 0;
}
.clip-trim-left:after {
  left: 2px;
}
.clip-trim-right {
  right: 0;
}
.clip-trim-right:after {
  right: 2px;
}
.timeline-clip:hover .clip-trim,
.timeline-clip.selected .clip-trim {
  opacity: 1;
}
.timeline.editor-open {
  height: 64vh;
  min-height: 440px;
  max-height: calc(100dvh - 260px);
}
.timeline.editor-open .timeline-content {
  min-height: 70px;
}
.clip-editor {
  display: none;
  flex-shrink: 0;
  min-height: 0;
  height: 300px;
  background: #0d0e13;
  border-top: 1px solid #594064;
  overflow: hidden;
}
.editor-open .clip-editor {
  display: flex;
  flex-direction: column;
}
.clip-editor-header {
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  background: #19141f;
  border-bottom: 1px solid #3b2e48;
}
.clip-editor-header > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.clip-editor-header strong {
  font-size: 10px;
  color: #e5d6f1;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clip-editor-header span {
  font-size: 7px;
  color: #b1a1c3;
}
.clip-editor-header > button .icon {
  width: 14px;
  height: 14px;
}
.editor-tabs {
  display: flex;
  gap: 3px;
}
.editor-tabs button {
  padding: 6px 9px;
  font-size: 9px;
  color: #b9a7c9;
  border-radius: 3px;
}
.editor-tabs button.active {
  background: #3b284d;
  color: #d7b9f5;
}
.clip-editor-body {
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.pattern-editor-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 37px;
  min-width: 600px;
  padding: 0 15px;
  border-bottom: 1px solid #2b2335;
}
.pattern-editor-tools label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 7px;
  color: #bcabc9;
}
.pattern-editor-tools button {
  font-size: 7px;
  padding: 4px 5px;
  color: #cdb7dd;
  border: 1px solid #3b2b4a;
  border-radius: 3px;
}
.pattern-editor-tools > span {
  font-size: 7px;
  color: #a898b7;
}
.pattern-step-ruler,
.clip-drum-row,
.piano-row {
  display: grid;
  grid-template-columns: 78px repeat(16, minmax(24px, 1fr));
  gap: 2px;
  min-width: 600px;
  padding: 0 12px;
}
.pattern-step-ruler {
  height: 20px;
  background: #15111c;
  position: sticky;
  top: 0;
  z-index: 2;
}
.pattern-step-ruler button {
  font-size: 7px;
  color: #aa99bf;
}
.pattern-step-ruler button.selected {
  color: var(--lime);
  background: #2a3020;
}
.clip-drum-grid {
  padding-bottom: 5px;
  max-height: 170px;
  overflow: auto;
}
.clip-drum-row {
  height: 20px;
}
.clip-drum-row > button:first-child {
  text-align: left;
  text-transform: uppercase;
  font-size: 7px;
  color: #c2afce;
  position: sticky;
  left: 0;
  background: #121017;
}
.clip-drum-row > button:first-child.selected {
  color: #ff99bf;
}
.drum-cell {
  background: #211723;
  border: 1px solid #342039;
  border-radius: 2px;
  margin: 2px 0;
  position: relative;
  padding: 0;
}
.drum-cell:nth-child(4n + 2) {
  border-color: #6d3654;
}
.drum-cell.active {
  background: color-mix(
    in srgb,
    #fb87bc calc(var(--velocity, 0.8) * 100%),
    #341b2c
  );
  border-color: #a85f83;
}
.drum-cell.selected {
  outline: 1px solid #f4e3ff;
  outline-offset: -1px;
}
.drum-cell b {
  font-size: 6px;
  color: #1a0c13;
}
.piano-scroll {
  height: 170px;
  overflow: auto;
}
.piano-row {
  height: 11px;
  gap: 1px;
}
.piano-row > span {
  font-size: 6px;
  color: #a898b8;
  line-height: 11px;
  position: sticky;
  left: 0;
  background: #15121b;
}
.piano-row > button {
  padding: 0;
  background: #18161e;
  border-bottom: 1px solid #26212e;
}
.piano-row.black-key > button {
  background: #101016;
}
.piano-row > button:nth-child(4n + 2) {
  border-left: 1px solid #4c3b5c;
}
.piano-row > button.active {
  background: #c7ed84;
  box-shadow: inset 0 -2px #76934b;
}
.hit-editor {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 15px;
  min-width: 680px;
  border-top: 1px solid #3d2c49;
  background: #17121d;
}
.hit-editor strong {
  font-size: 7px;
  color: #e2cadf;
  min-width: 85px;
}
.hit-editor > label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 6px;
  color: #c3afcf;
}
.hit-editor input {
  width: 70px;
  height: 3px;
  accent-color: #f58db8;
}
.hit-editor output {
  font-size: 7px;
  min-width: 28px;
  color: #f7add1;
}
.hit-editor > button {
  font-size: 7px;
  color: #e18ead;
}
.note-rolls {
  display: flex;
  align-items: center;
  gap: 3px;
}
.note-rolls > span {
  font-size: 6px;
  margin-right: 3px;
  color: #c3afcf;
}
.note-rolls > button {
  font-size: 7px;
  border: 1px solid #573549;
  border-radius: 2px;
  padding: 3px 5px;
}
.note-rolls > button.active {
  background: #f58db8;
  color: #200e17;
}
.automation-canvas {
  height: 154px;
  position: relative;
  padding: 10px 16px 10px 42px;
}
.automation-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
  background: #141019;
  overflow: visible;
}
.auto-grid path {
  fill: none;
  stroke: #382842;
  stroke-width: 0.6;
}
.auto-line {
  fill: none;
  stroke: #d59cfa;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.automation-canvas circle {
  fill: #e8d0ff;
  stroke: #1a1023;
  stroke-width: 1;
}
.auto-scale {
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 7px;
  color: #b4a0c9;
}
.auto-points {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 5px 15px 12px;
  font-size: 7px;
  color: #aa98bb;
}
.auto-points > span {
  padding: 4px;
  background: #22172c;
  border-radius: 3px;
}
.auto-points b {
  color: #d7b7ed;
  margin-left: 5px;
}
#auto-playhead {
  stroke: #d3fc8e;
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.timeline-grid .timeline-playhead {
  left: calc(191px + (100% - 191px) * var(--position, 0) / 100);
}
@media (max-width: 900px) {
  .timeline-grid .track-label,
  .timeline-grid .track-heading {
    width: 155px;
  }
  .timeline-grid .timeline-playhead {
    left: calc(155px + (100% - 155px) * var(--position, 0) / 100);
  }
  .timeline-tools {
    gap: 6px;
  }
  .timeline-tools .automation-write {
    font-size: 7px;
  }
  .clip-selection-toolbar {
    padding: 0 12px;
    gap: 6px;
  }
  .clip-editor {
    height: 290px;
  }
  .clip-editor-header {
    padding: 0 12px;
  }
  .clip-editor-header strong {
    max-width: 180px;
  }
  .timeline.editor-open {
    max-height: calc(100dvh - 210px);
  }
}
@media (max-width: 640px) {
  .timeline {
    height: 260px;
  }
  .timeline-toolbar {
    overflow: auto;
    gap: 10px;
  }
  .timeline-title select {
    font-size: 7px;
    padding: 3px;
  }
  .timeline-tools > label {
    display: none;
  }
  .timeline-tools .text-button {
    font-size: 7px;
    gap: 3px;
  }
  .automation-write {
    font-size: 0 !important;
    width: 24px;
    height: 24px;
    justify-content: center;
    padding: 2px;
  }
  .automation-write .icon {
    width: 12px;
    height: 12px;
  }
  .clip-selection-toolbar {
    height: 33px;
  }
  .clip-selection-hint {
    font-size: 7px;
  }
  .clip-selection-toolbar > input {
    width: 100px;
  }
  .clip-selection-toolbar button {
    font-size: 7px;
  }
  .timeline-grid .track-label,
  .timeline-grid .track-heading {
    width: 113px;
  }
  .timeline-grid .timeline-playhead {
    left: calc(113px + (100% - 113px) * var(--position, 0) / 100);
  }
  .timeline.editor-open {
    height: 65vh;
    min-height: 390px;
    max-height: calc(100dvh - 170px);
  }
  .clip-editor {
    height: 275px;
  }
  .clip-editor-header > div:first-child {
    max-width: 140px;
  }
  .clip-editor-header strong {
    max-width: 135px;
    font-size: 9px;
  }
  .clip-editor-header span {
    font-size: 6px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .editor-tabs button {
    font-size: 8px;
    padding: 6px;
  }
  .pattern-editor-tools {
    min-width: 590px;
  }
  .pattern-step-ruler,
  .clip-drum-row,
  .piano-row {
    grid-template-columns: 68px repeat(16, minmax(26px, 1fr));
    padding: 0 8px;
  }
  .piano-scroll {
    height: 150px;
  }
  .hit-editor {
    gap: 9px;
    padding: 8px;
  }
  .pattern-editor-tools {
    padding: 0 8px;
  }
}
@media (max-width: 900px) {
  .starter-patch span {
    display: none;
  }
  .starter-patch {
    padding: 6px;
  }
  .rack-actions {
    gap: 3px;
  }
}
.rack-world:not(.rear) .patch-cable {
  pointer-events: none;
}
.auto-points > button {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 7px;
  padding: 4px;
  color: #c8b0dd;
  background: #22172c;
  border-radius: 3px;
}
.auto-points > button .icon {
  height: 8px;
  width: 8px;
}
.auto-points > button:hover {
  background: #533047;
  color: #ffe4ef;
}
/* The break drawer uses the same focused tools as the rack faceplates. */
.break-library-target {
  color: var(--acid, #cafa68);
  font-size: 11px;
}
.break-library-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 16px;
}
.break-library-tabs button,
.break-library-card button {
  border: 1px solid #383d3c;
  background: #161b1a;
  color: #e7ede8;
  border-radius: 3px;
  padding: 8px;
  cursor: pointer;
}
.break-library-tabs button[aria-pressed="true"] {
  border-color: #e2b76c;
  color: #f1cb87;
}
.break-library-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.break-library-card {
  padding: 12px;
  border: 1px solid #323832;
  background: #080c0b;
}
.break-library-card > span,
.break-library-card small {
  font: 10px var(--font-mono, monospace);
  color: #c5b693;
}
.break-library-card h3 {
  margin: 8px 0 !important;
  color: #f6ecd8;
}
.break-library-card p {
  margin: 8px 0;
  font-size: 12px;
}
.break-library-card button {
  display: block;
  width: 100%;
  margin-top: 10px;
}
.break-library-card a {
  font-size: 11px;
  color: #a7d9d3;
}
.break-library-note {
  font-size: 11px !important;
  line-height: 1.6;
}

/* Control Bridge — shell chrome and public outer geometry only. */
#shell { --shell-font:var(--font); --shell-readout-font:ui-monospace,SFMono-Regular,Menlo,monospace; --shell-rail:60px; --shell-bridge:104px; height:100dvh; display:flex; flex-direction:column; overflow:hidden; background:#090a0c; }
#shell .app-header { height:var(--shell-rail); min-height:var(--shell-rail); padding:0 16px; gap:12px; flex-wrap:nowrap; background:#0c0d0f; }
#shell .brand { flex:0 0 auto; font-size:25px; gap:7px; }
#shell .brand-symbol { width:24px; height:24px; }
#shell .project-name { min-width:120px; flex:1 1 230px; max-width:300px; }
#shell .project-name input { width:100%; font-size:15px; font-weight:600; padding:0; height:25px; }
#shell .shell-document-truth { display:flex; white-space:nowrap; font-size:12px; color:#adb0b7; line-height:18px; }
#shell #save-state { display:inline; font-size:12px; }
#shell #shell-association { font-size:12px; letter-spacing:0; }
#shell .header-actions,#shell .shell-history,#shell .shell-workspace-selector { display:flex; align-items:center; flex-wrap:nowrap; gap:4px; }
#shell .header-actions { margin-left:auto; }
#shell .shell-history { padding:0 8px; border-left:1px solid #292c31; }
#shell .shell-history .text-button { width:36px; height:36px; padding:8px; }
#shell .shell-history span { display:none; }
#shell .shell-key,#shell .header-actions .text-button { min-height:36px; padding:7px 10px; border:1px solid transparent; border-radius:3px; background:transparent; color:#c9ccd3; font:500 12px var(--shell-font); white-space:nowrap; cursor:pointer; }
#shell .shell-key:hover,#shell .header-actions .text-button:hover { color:#f5f6f7; background:#24272c; }
#shell .shell-key[aria-pressed="true"],#shell .shell-favorite[aria-pressed="true"] { color:var(--lime); background:#252d1b; }
#shell .header-actions .shell-export-key { border-color:#444850; }
#shell .studio { position:relative; min-height:0; overflow:hidden; }
#shell .main-workspace { min-height:0; overflow:hidden; }
#shell .rack-section { min-height:160px; }
#shell .rack-toolbar { height:48px; min-height:48px; padding:0 18px; }
#shell .rack-subbar { height:24px; min-height:24px; padding:0 18px; }
#shell .rack-toolbar .text-button,#shell .rack-toolbar .flip-button { min-height:36px; }
#shell .timeline { height:var(--timeline-expanded-height,clamp(260px,32%,340px)); flex-shrink:0; max-height:none; }
#shell[data-workspace-mode="rack"] > .studio > .main-workspace > .timeline { display:none; }
#shell[data-workspace-mode="timeline"] > .studio > .main-workspace > .rack-section { display:none; }
#shell[data-workspace-mode="timeline"] > .studio > .main-workspace > .timeline { flex:1; height:auto; min-height:0; max-height:none; }
#shell .library { width:272px; min-height:0; }
#shell .library-title { height:48px; min-height:48px; padding:0 14px; }
#shell .library-title h1 { font-size:16px; }
#shell .search-box { margin:8px 12px; min-height:40px; padding:0 8px; gap:6px; }
#shell .search-box input { min-width:0; width:100%; font-size:13px; }
#shell .shell-clear-search { width:32px; height:32px; flex-shrink:0; }
#shell .shell-library-controls { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 12px 8px; }
#shell .shell-library-controls label { display:flex; align-items:center; gap:6px; min-width:0; font-size:12px; color:#b9bdc7; }
#shell .shell-library-controls select { min-width:0; width:106px; }
#shell .shell-library-controls select,#shell .shell-library-sort select { background:#17191e; color:#dce0e7; border:1px solid #41454e; border-radius:3px; min-height:32px; font:12px var(--shell-font); }
#shell .shell-library-sort { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:5px; padding:0 12px 8px; border-bottom:1px solid #292c32; color:#b9bdc7; font-size:12px; }
#shell .shell-library-sort label { display:flex; align-items:center; gap:6px; }
#shell .library-list { padding:0 12px; }
#shell .shell-library-row { display:flex; min-height:72px; align-items:stretch; border-bottom:1px solid #282c32; }
#shell .shell-library-row .library-device { flex:1; min-width:0; padding:10px 4px; margin:0; border:0; border-radius:0; gap:8px; background:transparent; }
#shell .shell-library-row .library-device:hover { background:#181b20; }
#shell .library-device-text { min-width:0; }
#shell .library-device strong { font-size:14px; font-weight:600; color:#e2e5eb; }
#shell .library-device small { font-size:12px; max-width:none; line-height:1.4; white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:#b4b9c4; }
#shell .library-device .add-device { opacity:1; color:#bfc4ce; margin-left:auto; flex-shrink:0; }
#shell .shell-favorite { width:44px; min-width:44px; min-height:44px; align-self:center; color:#b4bac4; border-radius:3px; }
#shell .shell-favorite svg { width:18px; height:18px; }
#shell .library-footer { padding:10px 14px; }
#shell .library-footer p { font-size:12px; line-height:1.5; }
#shell .shell-empty { padding:16px 0; font-size:13px; color:#c2c6cf; line-height:1.6; }
#shell .transport { position:relative; display:grid; grid-template-columns:204px 180px 184px minmax(210px,1fr) 310px; align-items:stretch; gap:12px; height:var(--shell-bridge); min-height:var(--shell-bridge); max-height:var(--shell-bridge); padding:12px 16px; overflow:visible; background:#0c0e10; border-top:1px solid #373a40; flex-shrink:0; }
#shell .shell-bay { min-width:0; border-left:1px solid #30333a; padding-left:12px; }
#shell .shell-bay:first-child { border:0; padding:0; }
#shell .shell-play-keys { display:flex; align-items:center; gap:5px; }
#shell .shell-play-keys .icon-button { width:40px; height:44px; flex-shrink:0; }
#shell .shell-play-keys .play-button { width:56px; height:44px; flex-shrink:0; }
#shell .shell-play-keys .loop-button.active { color:var(--lime); background:#252d1b; }
#shell .shell-bay-helper { display:flex; align-items:center; justify-content:space-between; height:32px; }
#shell .shell-health { font-size:11px; color:#b9bec7; padding:6px 0; text-align:left; }
#shell .shell-bay-helper .shell-key { min-height:30px; padding:4px 8px; }
#shell .shell-ledger { display:flex; flex-direction:column; }
#shell #position-display { min-width:0; width:100%; height:40px; margin:0; padding:0; text-align:left; font:600 25px var(--shell-readout-font); color:#e8eddf; letter-spacing:-.035em; background:transparent; }
#shell #shell-elapsed { font:13px var(--shell-readout-font); color:#c0c5ce; }
#shell #shell-transport-state { margin-top:5px; font-size:12px; color:#9fa6b2; text-transform:capitalize; }
#shell .shell-clock-top,#shell .shell-clock-bottom { display:flex; align-items:center; gap:4px; }
#shell .shell-clock-top { height:40px; }
#shell .tempo-control { display:flex; flex-direction:column; align-items:start; gap:0; font-size:10px; color:#b4bbc5; border:0; padding:0; }
#shell #tempo { width:58px; height:27px; font:500 22px var(--shell-readout-font); padding:0; color:#e4e8ee; border:0; border-radius:0; background:transparent; }
#shell .shell-clock .shell-key { padding:6px; }
#shell #shell-tap-value { position:absolute; top:3px; font-size:10px; color:var(--lime); }
#shell #shell-tap-apply { position:absolute; bottom:3px; background:#202718; min-height:24px; padding:2px 6px; }
#shell .shell-range > div { display:flex; align-items:center; justify-content:space-between; gap:4px; height:55px; }
#shell .shell-range-readout { display:grid; gap:7px; text-align:left; min-width:0; font-size:12px; color:#d0d5df; line-height:1.25; }
#shell .shell-range-readout span { display:block; }
#shell #shell-range-state { font-size:11px; color:#b5beca; }
#shell .shell-range .shell-key { padding:6px; }
#shell .shell-listening { display:grid; grid-template-columns:104px minmax(0,1fr); gap:4px 10px; }
#shell .shell-mix { display:grid; align-content:center; gap:5px; min-width:0; font-size:11px; color:#c0c7d2; }
#shell .shell-mix label { display:flex; gap:6px; align-items:center; font:10px var(--shell-readout-font); margin:0; }
#shell .shell-mix small { font-size:10px; color:#b4bdca; white-space:nowrap; }
#shell [data-shell-meter] { height:8px; flex:1; position:relative; background:#2b3038; overflow:hidden; }
#shell [data-shell-meter] i { display:block; height:100%; width:0; background:#b4df75; }
#shell [data-shell-meter] b { position:absolute; top:0; bottom:0; width:2px; background:#f7f7ec; left:0; }
#shell [data-shell-meter][data-clip="true"] b { background:#ff7c94; }
#shell .shell-monitor { display:flex; align-items:center; gap:8px; color:#bfc6d1; font-size:12px; min-width:0; }
#shell .shell-monitor input { width:100%; min-width:40px; accent-color:#c9d1df; }
#shell .shell-listen-controls { display:grid; align-content:center; gap:4px; }
#shell .shell-listen-controls > div { display:flex; justify-content:space-between; }
#shell .shell-listen-controls .shell-key { min-height:32px; padding:5px 7px; }
#shell .shell-listen-latch { grid-column:1/-1; font-size:10px; text-align:left; color:#b2bac7; }
#shell [data-listen-latch][data-clip="true"] { color:#ff9bae; }
#shell #shell-countdown { position:absolute; bottom:100%; left:0; right:0; background:#29321b; color:var(--lime); font:12px var(--shell-readout-font); text-align:center; }
#shell #shell-countdown:not(:empty) { padding:6px; }
#shell .shell-visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#shell .shell-modal { width:min(900px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); color:#e7eaf0; background:#111419; border:1px solid #4b525e; border-radius:6px; padding:0; box-shadow:0 18px 70px #000c; animation:shell-drawer 180ms cubic-bezier(.16,1,.3,1); }
#shell #shell-listen-dialog { width:min(640px,calc(100vw - 32px)); }
#shell .shell-modal::backdrop { background:#000b; }
#shell .shell-dialog-head { display:flex; align-items:center; justify-content:space-between; padding:14px 20px; border-bottom:1px solid #353d49; position:sticky; top:0; background:#171c24; z-index:1; }
#shell .shell-dialog-head h2 { margin:0; font-size:22px; font-weight:500; letter-spacing:-.025em; }
#shell .shell-dialog-body { padding:20px 24px 24px; }
#shell .shell-modal h3 { margin:4px 0 16px; font-size:19px; }
#shell .shell-modal h4 { margin:24px 0 8px; color:#b7c0cf; font-size:12px; }
#shell .shell-modal p { max-width:70ch; line-height:1.6; font-size:14px; color:#bfc8d6; margin:12px 0 20px; }
#shell .shell-modal button { border:1px solid #444d5c; border-radius:3px; background:#222a36; color:#e3eaf5; min-height:36px; padding:8px 12px; margin:2px 4px 2px 0; font:500 13px var(--shell-font); }
#shell .shell-modal button:hover { background:#303d50; }
#shell .shell-modal button[aria-pressed="true"] { color:var(--lime); background:#28311f; border-color:#576c38; }
#shell .shell-modal button:disabled { cursor:not-allowed; opacity:.5; }
#shell .shell-modal label { display:flex; flex-direction:column; gap:8px; color:#cad4e4; font-size:13px; margin:16px 0; }
#shell .shell-modal input,#shell .shell-modal select,#shell .shell-modal textarea { color:#e6edf8; background:#090d13; border:1px solid #566278; border-radius:3px; padding:10px; font:14px var(--shell-font); width:100%; accent-color:var(--lime); caret-color:var(--lime); }
#shell .shell-modal textarea { resize:vertical; line-height:1.6; }
#shell .shell-modal .shell-form-row { display:flex; gap:10px; flex-wrap:wrap; align-items:end; }
#shell .shell-form-row label { flex:1 1 140px; }
#shell .shell-form-row button { margin-bottom:16px; }
#shell .shell-tabs { display:flex; border-bottom:1px solid #364153; gap:4px; margin-bottom:22px; }
#shell .shell-modal .shell-tabs button { flex:1; background:transparent; border-color:transparent; border-radius:0; margin-bottom:-1px; }
#shell .shell-modal .shell-tabs button[aria-pressed="true"] { border-bottom-color:var(--lime); color:var(--lime); }
#shell .shell-project-nav { float:left; width:156px; display:flex; flex-direction:column; gap:4px; }
#shell .shell-project-nav button { text-align:left; }
#shell .shell-project-pane { margin-left:180px; min-height:380px; }
#shell .shell-record { border-bottom:1px solid #343d4d; padding:12px 0; }
#shell .shell-record-select { width:100%; text-align:left; background:transparent!important; border:0!important; }
#shell .shell-record strong { overflow-wrap:anywhere; font-size:14px; line-height:1.5; }
#shell .shell-record small { display:block; margin-top:6px; font-size:12px; color:#b0bdcf; }
#shell .shell-record-detail { padding:12px 8px; }
#shell .shell-task-status { clear:both; min-height:24px; padding-top:8px; }
#shell .shell-task-status[role="alert"] { color:#ffb0c1; }
#shell #shell-command-results { display:grid; gap:3px; }
#shell #shell-command-results button { text-align:left; }
#shell #shell-command-results small { display:block; margin-top:5px; }
#shell #shell-command-results [aria-selected="true"] { border-color:var(--lime); background:#26301d; }
#shell .shell-key:focus-visible,#shell .shell-favorite:focus-visible,#shell .library-device:focus-visible,#shell .shell-modal :focus-visible,#shell #tempo:focus-visible,#shell #position-display:focus-visible { outline:2px solid var(--lime); outline-offset:2px; }
#shell .shell-modal [aria-invalid="true"],#shell #tempo[aria-invalid="true"] { outline:2px solid #ff95af; }
#shell .shell-modal [hidden],#shell .shell-library-sort [hidden],#shell .search-box [hidden],#shell .shell-record[hidden] { display:none!important; }
#toast { bottom:calc(104px + 12px); max-width:calc(100vw - 32px); }
@keyframes shell-drawer { from { opacity:.6; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:1279px) {
 #shell { --shell-bridge:116px; }
 #shell .shell-browser-save { display:none; }
 #shell .app-header { gap:8px; padding:0 12px; }
 #shell .brand { font-size:22px; }
 #shell .shell-workspace-selector .shell-key { padding:5px 7px; }
 #shell .project-name { max-width:220px; }
 #shell .transport { grid-template-columns:196px 160px 174px minmax(190px,1fr); gap:10px; padding:12px; }
 #shell .shell-listening { display:none; }
 #shell .shell-range .shell-key { min-height:44px; }
 #shell .shell-range { position:relative; }
 #shell .shell-range::after { content:''; }
 #shell .shell-range-readout { font-size:12px; }
 #shell .shell-history { padding:0 3px; }
 #shell .header-actions .shell-key,#shell .header-actions .text-button { padding:7px; }
 #shell .inspector.open { position:absolute; right:0; top:0; bottom:0; height:100%; width:280px; z-index:30; box-shadow:-12px 0 30px #0008; }
 #toast { bottom:128px; }
}
@media(min-width:721px) and (max-width:1000px) {
 #shell .shell-workspace-selector { display:none; }
 #shell .transport { grid-template-columns:190px 154px 168px minmax(170px,1fr); gap:6px; padding:12px 8px; }
 #shell .shell-bay { padding-left:8px; }
 #shell .library { width:250px; }
}
@media(max-width:720px) {
 #shell { --shell-rail:96px; --shell-bridge:112px; }
 #shell .app-header { display:grid; grid-template-columns:112px minmax(0,1fr); grid-template-rows:44px 44px; gap:0 8px; padding:4px 12px; }
 #shell .brand { font-size:22px; }
 #shell .brand-symbol { width:20px; height:20px; }
 #shell .project-name { max-width:none; min-width:0; }
 #shell .project-name input { font-size:13px; }
 #shell .shell-document-truth,#shell #shell-association,#shell #save-state { font-size:10px; }
 #shell .shell-workspace-selector { display:none; }
 #shell .shell-history { border:0; padding:0; gap:4px; }
 #shell .shell-history .text-button { height:44px; width:44px; }
 #shell .header-actions { justify-self:end; gap:4px; }
 #shell .header-actions .shell-key,#shell .header-actions .text-button { min-height:44px; padding:6px 7px; font-size:12px; }
 #shell .header-actions .shell-export-key span { display:none; }
 #shell .header-actions .shell-export-key { width:44px; justify-content:center; }
 #shell .studio { flex:1; }
 #shell .main-workspace { overflow-y:auto; overflow-x:hidden; display:block; }
 #shell[data-workspace-mode="split"] .rack-section { min-height:100%; height:100%; }
 #shell[data-workspace-mode="split"] .timeline { min-height:100%; height:max(var(--timeline-expanded-height,0px),100%); }
 #shell[data-workspace-mode="rack"] .rack-section { height:100%; }
 #shell[data-workspace-mode="timeline"] .timeline { min-height:100%; height:100%; }
 #shell .rack-toolbar { padding:0 10px; }
 #shell .rack-title { gap:6px; }
 #shell .rack-title > .icon { display:none; }
 #shell .rack-title h2 { font-size:12px; }
 #shell #device-count { display:none; }
 #shell .rack-actions { gap:5px; }
 #shell .rack-toolbar .text-button,#shell .rack-toolbar .flip-button { min-height:44px; padding:6px; }
 #shell .rack-actions kbd { display:none; }
 #shell .rack-subbar { padding:0 12px; }
 #shell .rack-instruction { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
 #shell .transport { display:grid; grid-template-columns:184px minmax(0,1fr); grid-template-rows:48px 40px; gap:2px 8px; padding:8px 10px; }
 #shell .shell-bay { border:0; padding:0; }
 #shell .shell-playback { display:contents; }
 #shell .shell-play-keys { grid-row:1; grid-column:1; gap:3px; }
 #shell .shell-play-keys .icon-button { width:38px; min-width:38px; height:44px; }
 #shell .shell-play-keys .play-button { width:52px; min-width:52px; height:44px; }
 #shell .shell-bay-helper { grid-row:2; grid-column:1; justify-content:space-between; height:40px; }
 #shell .shell-bay-helper .shell-key { min-height:40px; padding:6px; }
 #shell .shell-health { max-width:120px; font-size:10px; }
 #shell .shell-ledger { grid-column:2; grid-row:1; }
 #shell #position-display { font-size:22px; height:28px; }
 #shell #shell-elapsed { font-size:11px; }
 #shell #shell-transport-state { display:none; }
 #shell .shell-clock { grid-row:2; grid-column:2; display:flex; align-items:center; gap:2px; }
 #shell .shell-clock-top { gap:2px; }
 #shell .tempo-control { font-size:9px; }
 #shell #tempo { width:48px; font-size:20px; }
 #shell .shell-clock .shell-tap-key,#shell .shell-clock-bottom,#shell #shell-tap-value,#shell #shell-tap-apply { display:none; }
 #shell .shell-clock .shell-key { min-height:40px; padding:5px; }
 #shell .shell-range,#shell .shell-listening { display:none; }
 #shell .shell-clock-top::after { content:none; }
 #shell .library { width:min(300px,calc(100vw - 44px)); }
 #shell .library.open { top:0; bottom:0; height:100%; max-height:none; z-index:40; }
 #shell .inspector.open { top:0; bottom:0; width:min(320px,100%); height:100%; }
 #shell .shell-modal { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
 #shell .shell-dialog-head { padding:10px 14px; }
 #shell .shell-dialog-head button,#shell .shell-modal button { min-height:44px; }
 #shell .shell-dialog-body { padding:16px; }
 #shell .shell-project-nav { float:none; width:auto; display:grid; grid-template-columns:repeat(3,1fr); gap:4px; border-bottom:1px solid #364153; margin-bottom:20px; padding-bottom:10px; }
 #shell .shell-project-nav button { font-size:12px; padding:6px; margin:0; text-align:center; }
 #shell .shell-project-pane { margin:0; min-height:0; }
 #shell .shell-record-detail { padding:8px 0; }
 #shell .shell-tabs { gap:0; }
 #toast { bottom:124px; }
}
@media(max-height:600px) and (min-width:721px) {
 #shell .studio > .main-workspace { overflow-y:auto; }
 #shell .rack-section { min-height:280px; flex-shrink:0; }
 #shell .shell-modal { max-height:calc(100dvh - 16px); }
}
@media(prefers-reduced-motion:reduce) { #shell .shell-modal { animation:none; } #shell .shell-key { transition:none; } }

/* Public workbench navigation is local to narrow composition. */
#shell .shell-workbench-nav { display:none; }
#shell .library-device .add-device { display:block; }
#shell .shell-modal [data-listen-panel="levels"] .shell-mix { max-width:340px; margin:24px 0 12px; }
#shell .shell-modal [data-listen-panel="levels"] .shell-monitor { flex-direction:column; align-items:stretch; }
@media(max-width:720px) {
 #shell .shell-workbench-nav { display:flex; position:sticky; top:0; z-index:12; min-height:44px; padding:0 4px; justify-content:space-between; background:#15191f; border-bottom:1px solid #343c48; }
 #shell .shell-workbench-nav .shell-key { min-height:44px; padding:6px; font-size:11px; }
 #shell[data-workspace-mode="split"] .rack-section { height:calc(100% - 44px); min-height:calc(100% - 44px); scroll-margin-top:44px; }
 #shell[data-workspace-mode="split"] .timeline { min-height:calc(100% - 44px); scroll-margin-top:44px; }
 #shell .library.mobile-open { top:0; bottom:0; height:100%; width:min(300px,calc(100vw - 44px)); }
}

/* Explicit intermediate and narrow rows; no transport overflow surface. */
#shell .shell-responsive-workspace,#shell .shell-narrow-range,#shell .shell-narrow-listen,#shell .shell-more-transport,#shell .shell-section-jump,#shell .shell-project-page-select { display:none; }
@media(min-width:721px) and (max-width:1279px) {
 #shell { --shell-rail:56px; }
 #shell .transport { grid-template-columns:204px 180px 1fr 310px; grid-template-rows:44px 36px; gap:8px 12px; padding:10px 16px; }
 #shell .shell-playback { display:contents; }
 #shell .shell-play-keys { grid-column:1; grid-row:1; }
 #shell .shell-bay-helper { grid-column:1; grid-row:2; height:36px; }
 #shell .shell-ledger { grid-column:2; grid-row:1; flex-direction:row; flex-wrap:wrap; align-content:center; border:0; padding:0; }
 #shell #position-display { height:28px; font-size:23px; }
 #shell #shell-transport-state { display:none; }
 #shell .shell-clock { grid-column:3/5; grid-row:1; display:flex; gap:12px; align-items:center; border:0; padding:0; }
 #shell .shell-clock-bottom { gap:10px; }
 #shell .shell-range { grid-column:2/4; grid-row:2; border:0; padding:0; display:flex; align-items:center; gap:8px; }
 #shell .shell-range > div { height:36px; flex:1; }
 #shell .shell-range-readout { display:flex; gap:8px; font-size:11px; }
 #shell .shell-range-readout span { max-width:180px; }
 #shell #shell-range-state { display:none; }
 #shell .shell-range .shell-key { min-height:36px; }
 #shell .shell-listening { display:flex; grid-row:2; grid-column:4; border:0; padding:0; align-items:center; gap:10px; }
 #shell .shell-listening .shell-mix { width:88px; grid-template-columns:10px 1fr; gap:3px; }
 #shell .shell-listening .shell-mix > span { grid-row:1/3; }
 #shell .shell-listening .shell-mix small,#shell .shell-listen-latch { display:none; }
 #shell .shell-listening .shell-monitor { width:100px; font-size:10px; }
 #shell .shell-listen-controls { display:flex; gap:4px; }
 #shell .shell-listen-controls .shell-key { padding:4px; font-size:11px; }
 #shell .library { width:244px; }
}
@media(min-width:721px) and (max-width:999px) {
 #shell .shell-responsive-workspace { display:flex; min-height:44px; padding:0 12px; gap:8px; border-bottom:1px solid #303740; }
 #shell .transport { grid-template-columns:196px 160px 1fr 220px; gap:8px; padding:10px; }
 #shell .shell-listening .shell-mix,#shell .shell-listening .shell-monitor { display:none; }
 #shell[data-workspace-mode="split"] > .studio > .main-workspace { display:block; }
 #shell[data-workspace-mode="split"] .rack-section { min-height:100%; height:100%; }
 #shell[data-workspace-mode="split"] .timeline:not(.sequence-collapsed) { min-height:100%; height:max(var(--timeline-expanded-height,0px),100%); }
 #shell[data-workspace-mode="split"] .shell-section-jump { display:flex; justify-content:center; min-height:32px; }
 #shell[data-workspace-mode="split"] .shell-section-jump .shell-key { min-height:32px; padding:4px; font-size:12px; }
}
@media(max-width:720px) {
 #shell { --shell-rail:56px; }
 #shell .app-header { display:flex; height:56px; min-height:56px; padding:0 10px; gap:8px; }
 #shell .brand { width:28px; flex:0 0 28px; }
 #shell .brand > span { display:none; }
 #shell .brand-symbol { width:28px; height:28px; }
 #shell .project-name { min-width:110px; flex:1; }
 #shell .project-name input { height:24px; }
 #shell .shell-document-truth { display:block; line-height:14px; }
 #shell .shell-document-truth > span:nth-child(2),#shell #shell-association { display:none; }
 #shell #save-state { font-size:12px; }
 #shell .shell-history { display:none; }
 #shell .header-actions { margin-left:0; flex-shrink:0; gap:3px; }
 #shell .header-actions [data-shell-action="projects"] { width:48px; padding:3px; }
 #shell .header-actions [data-shell-action="commands"] { width:44px; padding:3px; font-size:0; }
 #shell .header-actions [data-shell-action="commands"] span { display:none; }
 #shell .header-actions [data-shell-action="commands"] .icon { display:block; width:18px; height:18px; margin:auto; }
 #shell .shell-responsive-workspace { display:flex; min-height:44px; max-height:44px; padding:0 10px; justify-content:space-between; align-items:center; border-bottom:1px solid #343c47; background:#12151a; }
 #shell .shell-responsive-workspace .shell-key { min-height:44px; padding:6px; }
 #shell .transport { grid-template-columns:68px 88px 64px 44px 52px; grid-template-rows:48px 48px; gap:0 6px; justify-content:space-between; padding:8px 10px; }
 #shell .shell-play-keys { grid-column:1/3; grid-row:1; gap:5px; }
 #shell .shell-play-keys [data-action="rewind"] { display:none; }
 #shell .shell-play-keys .icon-button { width:44px; min-width:44px; }
 #shell .shell-play-keys .play-button { width:52px; min-width:52px; }
 #shell .shell-ledger { grid-column:3/6; grid-row:1; position:relative; padding-right:42px; }
 #shell #position-display { font-size:19px; height:28px; }
 #shell #shell-elapsed { font-size:12px; }
 #shell .shell-more-transport { display:block; position:absolute; right:0; top:0; min-height:44px; padding:4px; width:40px; font-size:10px; }
 #shell .shell-bay-helper { display:contents; }
 #shell .shell-health { grid-row:2; grid-column:4; min-height:44px; width:44px; line-height:1.2; white-space:normal; }
 #shell .shell-bay-helper .shell-key { grid-row:2; grid-column:5; width:52px; min-height:44px; }
 #shell .shell-clock { grid-row:2; grid-column:1; }
 #shell .shell-clock-top > .shell-key { display:none; }
 #shell #tempo { width:64px; font-size:22px; height:28px; }
 #shell .tempo-control { font-size:11px; }
 #shell .shell-narrow-range { display:block; grid-row:2; grid-column:2; width:88px; min-height:44px; padding:4px; }
 #shell .shell-narrow-listen { display:block; grid-row:2; grid-column:3; width:64px; min-height:44px; padding:4px; }
 #shell .shell-workbench-nav { display:none; }
 #shell[data-workspace-mode="split"] .rack-section { min-height:100%; height:100%; scroll-margin-top:0; }
 #shell[data-workspace-mode="split"] .timeline { min-height:100%; scroll-margin-top:0; }
 #shell[data-workspace-mode="split"] .shell-section-jump { display:flex; justify-content:center; min-height:32px; }
 #shell .shell-section-jump .shell-key { min-height:32px; padding:4px; font-size:12px; }
 #shell .shell-project-nav { display:none; }
 #shell .shell-project-page-select { display:flex; }
 #shell .shell-modal input,#shell .shell-modal select,#shell .shell-modal textarea { font-size:16px; min-height:44px; }
}

#shell .header-actions [data-shell-action="commands"] { display:flex; align-items:center; justify-content:center; gap:6px; }
#shell .shell-modal button:disabled { color:#aeb8c8; opacity:1; background:#1a202a; border-color:#343e4d; }

#shell .shell-document-truth { gap:3px; }
#shell .shell-bay-helper .shell-key,#shell .shell-health { min-height:36px; }
#shell .shell-bay-helper { height:36px; }
#shell #position-display { height:44px; }
#shell .shell-listening { grid-template-rows:44px 32px; position:relative; }
#shell .shell-listening > .shell-mix { grid-column:1; grid-row:1; }
#shell .shell-listen-controls { grid-column:2; grid-row:1/3; }
#shell .shell-listen-latch { grid-column:1; grid-row:2; min-height:32px; }
#shell .shell-range-readout { min-height:44px; }
@media(max-width:1279px) and (min-width:721px) { #shell .shell-listening { display:flex; } #shell #position-display { height:28px; } }
@media(max-width:720px) {
 #shell .shell-ledger { padding-right:42px; }
 #shell #position-display { height:44px; padding-bottom:14px; }
 #shell #shell-elapsed { position:absolute; top:28px; pointer-events:none; }
 #shell .shell-listening { display:none; }
}
@media(max-height:680px) and (min-width:721px) {
 #shell { --shell-rail:48px; --shell-bridge:96px; }
 #shell .transport { grid-template-rows:44px 32px; padding:6px 16px; gap:6px 12px; }
 #shell .studio > .main-workspace { display:block; overflow-y:auto; }
 #shell[data-workspace-mode="split"] .rack-section { min-height:100%; height:100%; }
 #shell[data-workspace-mode="split"] .timeline:not(.sequence-collapsed) { min-height:100%; }
}

#shell > .studio > .main-workspace { overflow-y:auto; }
#shell .timeline.sequence-collapsed { height:44px; min-height:44px; max-height:44px; flex:0 0 44px; }
#shell .shell-modal input::placeholder,#shell .search-box input::placeholder { color:#aeb8c7; opacity:1; }
#shell .shell-modal ::selection,#shell .project-name ::selection,#shell .search-box ::selection { background:#cefa75; color:#151b0c; }
#shell .shell-modal,#shell .library-list { scrollbar-color:#525d6e #111419; }

#shell .shell-persistence-status:empty { display:none; }
#shell .shell-modal .shell-persistence-status { color:#f5c57b; font-size:12px; }

#shell .shell-modal .shell-project-page-select { display:none; }
#shell .shell-modal .shell-mix label { flex-direction:row; align-items:center; gap:8px; margin:4px 0; }
#shell .shell-modal .shell-mix [data-shell-meter] { min-width:180px; }
@media(max-width:720px) { #shell .shell-modal .shell-project-page-select { display:flex; } }

#shell .shell-listen-state { display:block; font-size:10px; color:#cefa75; }

@media(max-height:680px) and (max-width:720px) {
 #shell { --shell-rail:48px; --shell-bridge:96px; }
 #shell .app-header { height:48px; min-height:48px; }
 #shell .shell-responsive-workspace { height:40px; min-height:40px; max-height:40px; }
 #shell .shell-responsive-workspace .shell-key { min-height:40px; }
 #shell .transport { grid-template-rows:44px 44px; padding:4px 10px; }
}

@media(min-width:641px) and (max-width:719px) { #shell .library { width:244px; } }

#shell .library-device::before { content:''; width:6px; height:6px; flex:0 0 6px; background:var(--item-color); }
#shell #shell-tempo-error { position:absolute; bottom:100%; left:calc(50% - 110px); z-index:15; background:#351a24; color:#ffb0c1; padding:6px 12px; font:12px var(--shell-font); }
#shell #shell-tempo-error[hidden] { display:none; }
