:root {
  color-scheme: dark;
  --case: #e7e3da;
  --case-dark: #b3ada2;
  --ink: #151311;
  --panel: #242320;
  --screen: #120805;
  --screen-line: #ff6b18;
  --screen-blue: #7edbff;
  --orange: #ff7417;
  --mpc-red: #d71935;
  --mpc-blue: #00a8ff;
  --led-green: #21e15c;
  --led-amber: #ffb02e;
  --amber: #f6ad4a;
  --red: #c72820;
  --green: #68d778;
  --blue: #58a6ff;
  --purple: #7c4fd7;
  --muted: #777167;
  --shadow: rgba(0, 0, 0, 0.42);
  font-family: "Helvetica Neue", Helvetica, Arial, "Swiss 721", ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.16), transparent 42%),
    linear-gradient(180deg, #b0b2ac, #8f918c);
  color: var(--ink);
  display: grid;
  place-items: start center;
  padding: 12px 10px 34px;
  perspective: 1800px;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid rgba(0, 0, 0, 0.32);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.22) 38%, transparent 40%),
    linear-gradient(180deg, #f0ebe2 0%, #c8c0b6 58%, #958c80 100%);
  color: #211d18;
  min-height: 30px;
  border-radius: 5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -4px 0 rgba(0,0,0,0.24),
    0 5px 8px rgba(0,0,0,0.3);
}

button:active,
button.on {
  transform: translateY(3px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), transparent 40%),
    linear-gradient(180deg, #ff8d2b, var(--orange) 62%, #9b3907);
  color: #160b04;
  box-shadow:
    inset 0 3px 5px rgba(0,0,0,0.42),
    inset 0 -1px 0 rgba(255,255,255,0.18),
    0 1px 2px rgba(0,0,0,0.28);
}

.machine {
  width: min(812px, 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, rgba(255,255,255,0.18), transparent 14%, transparent 86%, rgba(0,0,0,0.12)),
    linear-gradient(180deg, #f7f2e9 0%, var(--case) 44%, #d0c9be 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 13px;
  padding: 11px;
  box-shadow:
    0 2px 0 #9d968c,
    0 9px 0 #777066,
    0 18px 0 #524d47,
    0 44px 82px rgba(0, 0, 0, 0.48),
    0 30px 90px rgba(0, 0, 0, 0.38),
    inset 0 2px 0 rgba(255, 255, 255, 0.72),
    inset 0 -12px 24px rgba(0,0,0,0.16),
    inset 10px 0 18px rgba(255,255,255,0.13),
    inset -10px 0 18px rgba(0,0,0,0.08);
  overflow: hidden;
  transform: rotateX(3.2deg) rotateZ(-0.18deg) scale(0.91);
  transform-origin: top center;
}

.machine.playing {
  box-shadow:
    0 2px 0 #a39c92,
    0 9px 0 #7b746a,
    0 18px 0 #56504a,
    0 46px 88px rgba(0, 0, 0, 0.52),
    0 0 42px rgba(255,116,23,0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.78),
    inset 0 -12px 24px rgba(0,0,0,0.16),
    inset 10px 0 18px rgba(255,255,255,0.13),
    inset -10px 0 18px rgba(0,0,0,0.08);
}

.machine::after {
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.55),
    0 1px 2px rgba(0,0,0,0.45),
    0 36px 46px rgba(0,0,0,0.22);
}

.machine::before,
.machine::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f6f0e5, #8b8479 48%, #2a2825 100%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.55), 0 1px 2px rgba(0,0,0,0.45);
}

.machine::before {
  left: 12px;
}

.machine::after {
  right: 12px;
}

.machine > * {
  position: relative;
  z-index: 1;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.18), transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,0.55);
}

.topbar {
  order: 1;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 10px;
  min-height: 54px;
}

.brand-title {
  font-size: clamp(25px, 4.4vw, 42px);
  line-height: 0.85;
  color: var(--mpc-blue);
  font-weight: 950;
  letter-spacing: 0.1em;
  text-shadow: 1px 1px 0 #07334b, 2px 2px 0 rgba(0, 0, 0, 0.24), 0 -1px 0 rgba(255,255,255,0.45);
}

.version-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--orange);
  letter-spacing: 0.08em;
  box-shadow: none;
}

.brand-sub {
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: 0.42em;
  color: #3b342b;
  font-weight: 800;
}

.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  padding: 3px;
  border-radius: 7px;
  background: rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 2px 4px rgba(0,0,0,0.18);
}

.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.actions button,
.seq-tools button,
.sampler-actions button,
.file-button {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24), transparent 38%),
    linear-gradient(180deg, #46413a, #211f1c 72%, #11100f);
  color: #ffded0;
  border-color: #ad2a236c;
  font-size: 11px;
  padding: 0 11px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -4px 0 rgba(0,0,0,0.58),
    0 5px 8px rgba(0,0,0,0.38);
}

.panel {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), rgba(0,0,0,0.06)),
    rgba(80, 76, 69, 0.28);
  border: 1px solid rgba(0,0,0,0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 7px rgba(0,0,0,0.14),
    0 1px 0 rgba(255,255,255,0.38),
    0 8px 14px rgba(0,0,0,0.08);
}

.transport-panel {
  order: 2;
  position: sticky;
  top: 8px;
  z-index: 25;
  margin-top: 8px;
  padding: 8px;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  gap: 8px;
  align-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 36%),
    linear-gradient(180deg, #c5c0b7, #a9a39a);
  border-color: rgba(0,0,0,0.18);
}

.screen {
  min-height: 118px;
  width: 280px;
  padding: 9px;
  display: grid;
  gap: 6px;
  background:
    linear-gradient(135deg, rgba(126,219,255,0.08), transparent 34%),
    radial-gradient(circle at 18% 8%, rgba(0,168,255,0.12), transparent 42%),
    radial-gradient(circle at 90% 100%, rgba(255,116,23,0.12), transparent 36%),
    var(--screen);
  color: var(--screen-blue);
  border-radius: 7px;
  border: 3px solid #25211d;
  box-shadow:
    inset 0 0 28px #000,
    inset 0 2px 0 rgba(255,255,255,0.06),
    0 0 0 4px #3a352f,
    0 5px 10px rgba(0,0,0,0.24);
  font-family: "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  cursor: default;
}

.screen-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.screen-main {
  color: var(--screen-blue);
  font-size: 22px;
  font-weight: 800;
  text-shadow: 0 0 9px rgba(126,219,255,0.5);
}

.screen-state {
  min-width: 46px;
  padding: 4px 5px;
  border-radius: 3px;
  color: #0c160f;
  background: linear-gradient(180deg, #b7f3ff, #49b9ed);
  font-weight: 900;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,168,255,0.25);
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.screen-card {
  min-height: 32px;
  padding: 4px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(126,219,255,0.1), rgba(0,0,0,0.22)),
    #091419;
  border: 1px solid rgba(126,219,255,0.22);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.5);
}

.screen-card span {
  color: rgba(126,219,255,0.58);
  font-size: 7px;
  font-weight: 900;
}

.screen-card b {
  color: #d8f7ff;
  font-size: 10px;
}

.screen-card.is-blue {
  border-color: rgba(0,168,255,0.58);
}

.screen-playlist {
  min-height: 27px;
  display: grid;
  grid-template-columns: 1fr repeat(4, 12px);
  align-items: center;
  gap: 5px;
  padding: 4px 5px;
  border-radius: 4px;
  background: #070d12;
  border: 1px solid rgba(255,116,23,0.22);
  color: #d8f7ff;
  overflow: hidden;
}

.screen-playlist span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-playlist i {
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--screen-blue), #146d9f);
  opacity: 0.55;
}

.machine.playing .screen-playlist i:nth-child(2) { animation: meter 0.58s steps(2) infinite; }
.machine.playing .screen-playlist i:nth-child(3) { animation: meter 0.42s steps(2) infinite reverse; }
.machine.playing .screen-playlist i:nth-child(4) { animation: meter 0.68s steps(2) infinite; }
.machine.playing .screen-playlist i:nth-child(5) { animation: meter 0.36s steps(2) infinite reverse; }

@keyframes meter {
  0%, 100% { transform: scaleY(0.35); opacity: 0.42; }
  50% { transform: scaleY(1); opacity: 1; }
}

.screen-step {
  color: rgba(126,219,255,0.74);
  font-size: 9px;
}

.hardware-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 6px;
  align-items: start;
}

.control-cluster {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 82px;
}

.control-cluster label,
.knob-label {
  color: #2b261f;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.control-cluster input[type="range"],
.control-cluster input[type="number"],
.control-cluster span {
  width: 62px;
  min-height: 18px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.28);
  border-radius: 3px;
  background: #ece7dd;
  color: #211d18;
  font-size: 10px;
  font-weight: 800;
}

.control-cluster input[type="range"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.knob-mount,
.knob-slot {
  position: relative;
  width: 62px;
  min-height: 84px;
  display: grid;
  justify-items: center;
  align-content: start;
}

.knob-scale {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translateX(-50%);
  pointer-events: none;
}

.knob-scale i {
  --deg: calc(-120deg + (var(--tick) * 30deg));
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 5px;
  background: #3a352e;
  transform: rotate(var(--deg)) translateY(-27px);
  transform-origin: 0 27px;
  opacity: 0.78;
}

.knob {
  --angle: -135deg;
  position: relative;
  width: 52px;
  height: 52px;
  margin-top: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.42) 0 10%, transparent 12%),
    conic-gradient(from 210deg, #10100f, #56514a, #d2cbc0, #5c574f, #171615, #10100f),
    radial-gradient(circle at 48% 52%, #777168 0 28%, #3e3b36 54%, #151413 100%);
  border: 2px solid #1b1a18;
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,0.2),
    inset 0 -7px 10px rgba(0,0,0,0.48),
    0 0 0 5px rgba(0,0,0,0.08),
    0 7px 11px rgba(0,0,0,0.45);
  cursor: ns-resize;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.knob::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.24);
  background: repeating-conic-gradient(from 225deg, rgba(0,0,0,0.42) 0 2deg, transparent 2deg 15deg);
}

.knob-cap {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: rotate(var(--angle));
}

.knob-cap span {
  position: absolute;
  left: 50%;
  top: 5px;
  width: 3px;
  height: 13px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(180deg, #fffaf0, #b9b0a2);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.45);
}

.knob-value {
  min-height: 14px;
  margin-top: 3px;
  padding: 1px 4px;
  border-radius: 2px;
  background: #1a1713;
  color: var(--orange);
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.transport-stack {
  align-self: end;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.edit-transport {
  display: flex;
  gap: 6px;
  padding-right: 1px;
}

.transport {
  display: flex;
  gap: 7px;
  align-items: end;
}

.transport button,
.edit-transport button {
  width: 42px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 1;
  text-align: center;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.2) 38%, transparent 39%),
    linear-gradient(180deg, #f0ebe1, #c8c1b6 58%, #92897f);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.74),
    inset 0 -5px 0 rgba(0,0,0,0.22),
    0 6px 9px rgba(0,0,0,0.36);
}

.transport .rec {
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0;
  color: white;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28), transparent 34%),
    linear-gradient(180deg, #ff483d, var(--red) 58%, #891911);
}

.edit-transport .mini-transport {
  width: 43px;
  height: 24px;
  min-height: 24px;
  align-self: center;
  border-radius: 5px;
  color: #ffdcc6;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), transparent 36%),
    linear-gradient(180deg, #4b4640, #23201d 70%, #11100f);
  border-color: rgba(255,116,23,0.38);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -3px 0 rgba(0,0,0,0.5),
    0 4px 7px rgba(0,0,0,0.32);
}

.edit-transport .mini-transport:active {
  transform: translateY(3px);
}

.transport button:active,
.transport button.on,
.edit-transport button:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 4px 8px rgba(0,0,0,0.5),
    inset 0 -1px 0 rgba(255,255,255,0.16),
    0 2px 3px rgba(0,0,0,0.26);
}

.mixer-panel {
  order: 3;
  margin-top: 8px;
  padding: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), rgba(0,0,0,0.06)),
    #b8b1a7;
}

.mixer-panel::before,
.pads::before {
  content: "";
  display: block;
  grid-column: 1 / -1;
  height: 6px;
  margin: 0 0 7px;
  border-radius: 2px;
  background:
    linear-gradient(90deg,
      var(--mpc-red) 0 23.5%,
      transparent 23.5% 25%,
      var(--led-amber) 25% 48.5%,
      transparent 48.5% 50%,
      var(--led-green) 50% 73.5%,
      transparent 73.5% 75%,
      var(--mpc-blue) 75% 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.38), 0 2px 5px rgba(0,0,0,0.16);
}

.tracks {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
}

.track {
  position: relative;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.12), transparent 34%, rgba(0,0,0,0.06)),
    linear-gradient(180deg, #c3bdb2, #9f978b);
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 4px;
  padding: 5px;
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 128px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -4px 7px rgba(0,0,0,0.12),
    0 2px 3px rgba(0,0,0,0.13);
}

.track::before {
  display: none;
}

.track .track-name {
  width: 100%;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.04) 38%, transparent 40%),
    linear-gradient(180deg, #33c3ff, var(--mpc-blue) 64%, #075b89 100%);
  color: #061923;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #07557f;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    inset 0 -3px 0 rgba(0,55,88,0.58),
    0 3px 5px rgba(0,0,0,0.28);
}

.lane-led,
.lane-power {
  width: 9px;
  height: 9px;
  min-height: 9px;
  border-radius: 50%;
  padding: 0;
  background: radial-gradient(circle at 35% 35%, #26301d, #090b08);
  border: 1px solid #050505;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}

.lane-led {
  flex: 0 0 auto;
  background: radial-gradient(circle, var(--led-green) 0 28%, #0e5f24 50%, #081008 100%);
  box-shadow: 0 0 7px rgba(33,225,92,0.62), inset 0 1px 1px rgba(255,255,255,0.5);
}

.lane-power,
.lane-power {
  position: absolute;
  right: 5px;
  top: 9px;
}

.lane-power.on {
  background: radial-gradient(circle, var(--orange) 0 34%, #8d3105 58%, #120904 100%);
  box-shadow: 0 0 7px rgba(255,116,23,0.65), inset 0 1px 1px rgba(255,255,255,0.5);
}

.track.hit .lane-led {
  background: radial-gradient(circle at 38% 35%, #f7fff1 0 16%, #73ff91 32%, #0b8d36 64%, #061008 100%);
  box-shadow:
    0 0 5px #dfffe4,
    0 0 14px rgba(33,225,92,0.95),
    inset 0 1px 1px rgba(255,255,255,0.78);
}

.track.hit .track-name {
  filter: brightness(1.24) saturate(1.2);
}

.track.selected {
  outline: 2px solid rgba(0,168,255,0.65);
  outline-offset: 1px;
}

.track.muted {
  opacity: 0.58;
}

.track .kit-select {
  width: 100%;
  min-height: 18px;
  border-radius: 3px;
  border: 1px solid #070706;
  background: linear-gradient(180deg, #efe9de, #bdb5aa);
  color: #17120e;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.58), 0 2px 4px rgba(0,0,0,0.18);
}

.track button {
  width: 100%;
  min-height: 30px;
  font-size: 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.15), transparent 38%),
    linear-gradient(180deg, #3f3c37, #22201d 72%, #0e0d0c);
  color: #f1ebe0;
  border: 1px solid #090807;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), inset 0 -3px 0 rgba(0,0,0,0.55), 0 4px 7px rgba(0,0,0,0.28);
}

.channel-main-knob {
  position: relative;
  width: 52px;
  min-height: 58px;
  display: grid;
  justify-items: center;
  align-content: start;
}

.track .knob {
  width: 30px;
  height: 30px;
  margin-top: 4px;
}

.track .knob-label {
  margin-top: 2px;
  font-size: 7px;
}

.track .knob-value {
  margin-top: 1px;
  font-size: 8px;
}

.fader-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  width: 31px;
  height: 55px;
  padding: 7px 0 4px;
  margin-bottom: 11px;
  border-radius: 3px;
  background:
    linear-gradient(90deg, #777167, #bdb6ac 45%, #777167 100%);
  box-shadow: inset 0 0 5px rgba(0,0,0,0.35);
}

.fader {
  writing-mode: vertical-lr;
  direction: rtl;
  appearance: none;
  width: 24px;
  height: 43px;
  background: transparent;
  accent-color: #f4eee4;
  cursor: ns-resize;
}

.fader::-webkit-slider-runnable-track {
  width: 5px;
  height: 43px;
  border-radius: 5px;
  background: #111;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.9);
}

.fader::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 11px;
  margin-left: -9px;
  border-radius: 2px;
  border: 1px solid #7b746b;
  background: linear-gradient(180deg, #f2eee7, #b9b2a8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 2px 4px rgba(0,0,0,0.45);
}

.pitch-fader-wrap::after {
  content: "PITCH";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  color: #201b16;
  background: rgba(229, 222, 211, 0.86);
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 6px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.sound-file {
  display: none;
}

.track .sound-load {
  min-height: 24px;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.08) 34%, transparent 42%),
    linear-gradient(180deg, #32beff, var(--mpc-blue) 68%, #075f91);
  color: #061a23;
  border-color: #064d76;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -3px 0 rgba(0,55,88,0.58),
    0 4px 7px rgba(0,0,0,0.28);
}

.track .lane-power {
  width: 9px;
  height: 9px;
  min-height: 9px;
  padding: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #26301d, #090b08);
  border: 1px solid #050505;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}

.track .lane-power.on {
  background: radial-gradient(circle, var(--orange) 0 34%, #8d3105 58%, #120904 100%);
  box-shadow: 0 0 7px rgba(255,116,23,0.65), inset 0 1px 1px rgba(255,255,255,0.5);
}

.track .track-name:active,
.track .sound-load:active {
  transform: translateY(3px);
}

.sound-load.drop-ready,
.sampler-panel.drop-ready {
  outline: 2px solid var(--mpc-blue);
  outline-offset: 2px;
}

.mix-fx-panel {
  order: 8;
  margin-top: 8px;
  padding: 8px 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), rgba(0,0,0,0.08)),
    #b9b3aa;
  border: 2px solid rgba(255,116,23,0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -4px 8px rgba(0,0,0,0.15),
    0 0 0 2px rgba(255,116,23,0.1),
    0 8px 16px rgba(0,0,0,0.1);
}

.mix-fx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mix-fx-head h2 {
  margin: 0;
  color: #24201b;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.2em;
}

.mix-fx-head p {
  margin: 4px 0 0;
  color: #514b43;
  font-size: 11px;
  font-weight: 800;
}

.mix-fx-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mix-fx-controls select {
  min-height: 30px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.35);
  background: #eee9df;
  color: #1f1b17;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 0 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.18), 0 1px 0 rgba(255,255,255,0.45);
}

.mix-btn {
  min-height: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), transparent 38%),
    linear-gradient(180deg, #46413a, #211f1c 72%, #11100f);
  color: #ffded0;
  font-size: 10px;
}

.mix-btn.on {
  background: linear-gradient(180deg, var(--mpc-blue), #0c5b84);
  color: white;
}

.fx-panel {
  order: 7;
  margin-top: 8px;
  padding: 8px 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), rgba(0,0,0,0.1)),
    linear-gradient(180deg, #cec8be, #aaa297);
  border: 2px solid rgba(255,116,23,0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.48),
    inset 0 -4px 8px rgba(0,0,0,0.15),
    0 0 0 2px rgba(255,116,23,0.1),
    0 8px 16px rgba(0,0,0,0.1);
}

.fx-panel.collapsed .fx-strip {
  display: none;
}

.fx-panel.collapsed {
  padding-bottom: 7px;
}

.machine.rack-collapsed .mix-fx-panel,
.machine.rack-collapsed .template-panel,
.machine.rack-collapsed .fx-strip {
  display: none;
}

.machine.rack-collapsed .fx-panel {
  min-height: 64px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255,116,23,0.18), transparent 18%, transparent 82%, rgba(0,168,255,0.14)),
    repeating-linear-gradient(90deg, rgba(83,45,17,0.16) 0 3px, rgba(255,188,104,0.08) 3px 7px),
    linear-gradient(180deg, #d3ccc1, #9d958a);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.42),
    inset 0 -8px 14px rgba(0,0,0,0.28),
    0 8px 0 #6e675f,
    0 20px 34px rgba(0,0,0,0.28);
}

.machine.rack-collapsed .fx-panel::after {
  content: "GR4600 MASTER / FX RACK";
  justify-self: center;
  align-self: end;
  margin-top: 5px;
  color: rgba(33,29,24,0.52);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.22em;
}

.fx-collapse {
  min-width: 72px;
  color: #101808;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.32), transparent 38%),
    linear-gradient(180deg, #33c3ff, var(--mpc-blue) 68%, #075f91);
}

.fx-head,
.fx-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.fx-head h2 {
  margin: 0;
  color: #2a241d;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.18em;
}

.fx-head p {
  margin: 3px 0 0;
  color: #4d463d;
  font-size: 11px;
  font-weight: 700;
}

.fx-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.fx-btn {
  min-width: 76px;
  background: #2a2926;
  color: #ffe2d1;
}

.slice-menu {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border-radius: 5px;
  background: linear-gradient(180deg, #35322e, #191817);
  color: #ffdcc6;
  border: 1px solid rgba(0,0,0,0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), inset 0 -3px 0 rgba(0,0,0,0.5), 0 4px 7px rgba(0,0,0,0.28);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.slice-menu select {
  min-height: 22px;
  border: 1px solid #070706;
  border-radius: 3px;
  background: #101808;
  color: #b5e36b;
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 900;
}

.fx-strip {
  margin-top: 8px;
  justify-content: flex-start;
  align-items: stretch;
  display: grid;
  grid-template-columns: 340px 82px 1fr;
}

.fx-control {
  min-width: 82px;
  grid-column: 2;
}

.fx-note {
  min-height: 26px;
  min-width: 152px;
  align-self: center;
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: #14110d;
  color: var(--orange);
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  grid-column: 3;
}

.fx-screen {
  width: min(340px, 100%);
  grid-column: 1;
  grid-row: 1;
  min-height: 96px;
  padding: 6px;
  border-radius: 5px;
  background: linear-gradient(180deg, #22211e, #11100e);
  border: 2px solid #36322d;
  box-shadow:
    inset 0 0 0 1px #000,
    inset 0 0 18px rgba(0,0,0,0.85),
    0 0 0 3px #4d4841,
    0 5px 10px rgba(0,0,0,0.26);
  cursor: none;
}

#fxDisplay {
  display: block;
  width: 100%;
  height: 84px;
  border-radius: 2px;
  background: #101808;
  image-rendering: pixelated;
  cursor: none;
}

.sampler-panel {
  order: 5;
  margin-top: 8px;
  padding: 9px;
  background:
    linear-gradient(180deg, #202020, #111),
    #181818;
  color: #ddd7cc;
  border: 3px solid var(--mpc-blue);
  box-shadow:
    inset 0 0 0 2px rgba(0,168,255,0.34),
    inset 0 1px 0 rgba(255,255,255,0.16),
    0 0 0 2px rgba(0,168,255,0.16),
    0 1px 0 rgba(255,255,255,0.32),
    0 8px 14px rgba(0,0,0,0.14);
}

.sampler-panel.drop-ready #wave {
  border-color: var(--mpc-blue);
  box-shadow: 0 0 0 2px rgba(0,168,255,0.22);
}

.sampler-head,
.seq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
}

.sampler-head::before,
.seq-head::before,
.template-head::before,
.fx-head::before {
  content: "READY";
  min-width: 44px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding-left: 12px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 9px 50%, var(--led-green) 0 3px, transparent 4px),
    linear-gradient(180deg, #2a2925, #121110);
  color: #d8d1c7;
  border: 1px solid rgba(0,0,0,0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 1px 0 rgba(255,255,255,0.25);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.sampler-head.ready-collapsed::before,
.seq-head.ready-collapsed::before,
.template-head.ready-collapsed::before,
.fx-head.ready-collapsed::before {
  content: "";
  min-width: 18px;
  width: 18px;
  height: 18px;
  padding-left: 0;
  cursor: context-menu;
  background:
    radial-gradient(circle at 50% 50%, #d7ffb7 0 18%, var(--led-green) 32%, #0e5f28 70%, #050706 100%),
    #121110;
  box-shadow:
    0 0 8px rgba(33,225,92,0.72),
    inset 0 1px 1px rgba(255,255,255,0.34),
    0 1px 0 rgba(255,255,255,0.22);
}

.sampler-head h2,
.seq-title {
  margin: 0;
  color: var(--orange);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.22em;
}

.sampler-head p {
  margin: 2px 0 0;
  color: #888ea0;
  font-size: 10px;
}

.sampler-actions {
  display: grid;
  grid-template-columns: minmax(150px, auto) repeat(4, minmax(54px, auto)) minmax(80px, auto);
  gap: 4px;
  align-items: center;
  justify-content: end;
}

.sampler-panel {
  padding: 7px 9px 8px;
}

.sample-key-box {
  min-height: 42px;
  display: grid;
  grid-template-columns: 24px 1fr 52px 24px;
  grid-template-rows: 13px 1fr;
  gap: 3px;
  align-items: center;
  padding: 4px 6px;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(126,219,255,0.1), transparent 38%),
    linear-gradient(180deg, #111820, #070b10);
  border: 1px solid rgba(0,168,255,0.45);
  box-shadow: inset 0 0 14px rgba(0,0,0,0.72), 0 4px 8px rgba(0,0,0,0.24);
}

.sample-key-box span {
  grid-column: 1 / -1;
  color: #7edbff;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.sample-key-box input {
  width: 100%;
  accent-color: var(--mpc-blue);
}

.sample-key-box strong {
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: #05080d;
  color: #d8f7ff;
  border: 1px solid rgba(126,219,255,0.22);
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.sample-key-box button {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  font-size: 12px;
}

.sampler-actions .on,
.template-actions button:active {
  background: linear-gradient(180deg, var(--mpc-red), #8e1525);
  color: white;
}

.sampler-actions button,
.sampler-actions .file-button,
.cut-switch {
  min-height: 26px;
  white-space: nowrap;
  font-size: 8px;
}

#sampleRunBtn,
#sampleStretchBtn,
.fx-btn,
.mix-btn,
.cut-switch {
  position: relative;
  padding-left: 20px;
}

#sampleRunBtn::before,
#sampleStretchBtn::before,
.fx-btn::before,
.mix-btn::before,
.cut-switch::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #364038, #080908);
  border: 1px solid #050505;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.75);
}

#sampleRunBtn.on::before,
#sampleStretchBtn.on::before,
.fx-btn.on::before,
.mix-btn.on::before,
.cut-switch:has(input:checked)::before {
  background: radial-gradient(circle at 38% 35%, #d7ffb7 0 20%, var(--led-green) 32%, #0e5f28 70%, #050706 100%);
  box-shadow: 0 0 8px rgba(33,225,92,0.75), inset 0 1px 1px rgba(255,255,255,0.42);
}

.cut-switch {
  display: inline-grid;
  grid-template-columns: 1fr 14px;
  align-items: center;
  gap: 5px;
  padding: 0 8px 0 22px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,0.42);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 38%),
    linear-gradient(180deg, #34312d, #191716);
  color: #ffdcc6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -3px 0 rgba(0,0,0,0.42), 0 4px 7px rgba(0,0,0,0.28);
  font-weight: 950;
  letter-spacing: 0.06em;
}

.cut-switch input {
  accent-color: var(--orange);
}

.file-button {
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  cursor: pointer;
  padding: 0 11px;
}

.file-button input {
  display: none;
}

.sampler-edit {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.stretch-switch {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d8f7ff;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.stretch-switch input {
  accent-color: var(--mpc-blue);
}

.sample-display {
  position: relative;
  margin-top: 4px;
  min-height: 156px;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(126,219,255,0.08), transparent 18%),
    #07080b;
  border: 1px solid #252936;
  box-shadow:
    inset 0 1px 0 rgba(126,219,255,0.14),
    inset 0 -18px 28px rgba(0,0,0,0.55),
    0 5px 10px rgba(0,0,0,0.22);
  overflow: hidden;
}

.sampler-mini-screen {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 8px;
  right: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  pointer-events: none;
}

.sampler-mini-screen div {
  min-height: 26px;
  padding: 4px 6px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(126,219,255,0.11), rgba(0,0,0,0.08)),
    rgba(5, 11, 16, 0.86);
  border: 1px solid rgba(126,219,255,0.22);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.72);
}

.sampler-mini-screen span,
.sampler-mini-screen strong {
  display: block;
  font-family: "Courier New", monospace;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.sampler-mini-screen span {
  color: rgba(126,219,255,0.62);
  font-size: 7px;
  font-weight: 900;
}

.sampler-mini-screen strong {
  margin-top: 2px;
  color: #d8f7ff;
  font-size: 10px;
  font-weight: 950;
  text-shadow: 0 0 8px rgba(126,219,255,0.38);
}

#wave {
  display: block;
  width: 100%;
  height: 156px;
  margin-top: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: none;
}

.sample-slice-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 4px;
}

.sample-slice-controls label {
  display: grid;
  grid-template-columns: 42px 1fr 34px;
  align-items: center;
  gap: 5px;
  color: #c9d1dc;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.sample-slice-controls span {
  color: var(--orange);
  font-family: "Courier New", monospace;
}

.template-panel {
  order: 9;
  margin-top: 8px;
  padding: 8px 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), rgba(0,0,0,0.08)),
    #b9b3aa;
  border: 2px solid rgba(255,116,23,0.5);
}

.template-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.template-head h2 {
  margin: 0;
  color: #24201b;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.2em;
}

.template-head p {
  margin: 4px 0 0;
  color: #514b43;
  font-size: 11px;
  font-weight: 800;
}

.template-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.template-actions input,
.template-actions select {
  min-height: 30px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.35);
  background: #eee9df;
  color: #1f1b17;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 0 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.18), 0 1px 0 rgba(255,255,255,0.45);
}

.template-actions button {
  min-height: 30px;
  background: linear-gradient(180deg, #34312d, #1f1e1b);
  color: #ffded0;
  font-size: 10px;
}

.sequencer-panel {
  order: 4;
  margin-top: 8px;
  padding: 8px;
  background:
    linear-gradient(180deg, #202020, #111),
    #181818;
  color: #ddd7cc;
  border: 2px solid rgba(255,116,23,0.58);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -6px 12px rgba(0,0,0,0.26),
    0 0 0 2px rgba(255,116,23,0.08),
    0 8px 16px rgba(0,0,0,0.12);
}

.seq-tools {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: auto auto minmax(118px, 0.55fr) minmax(170px, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.length-group {
  display: grid;
  grid-template-columns: repeat(4, 38px);
  gap: 4px;
  padding: 3px;
  background: #2a2926;
  border-radius: 4px;
  border: 1px solid #0008;
  justify-self: center;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.16);
}

.length-btn {
  min-height: 26px;
  min-width: 0;
  width: 38px;
  font-size: 10px;
  padding-inline: 0;
}

.pattern-open-btn {
  min-height: 28px;
  width: 76px;
  justify-self: end;
  color: #eaf9ff;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), transparent 38%),
    linear-gradient(180deg, #1389c7, #075b86 72%, #043852);
  border-color: rgba(126,219,255,0.42);
}

.seq-zoom-control {
  min-height: 28px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.24)),
    #131313;
  border: 1px solid rgba(126,219,255,0.28);
  color: #7edbff;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.12em;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.62);
}

.seq-zoom-control input {
  width: 100%;
  accent-color: var(--mpc-blue);
}

.seq-legend {
  width: 100%;
  max-width: 238px;
  min-height: 24px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  justify-self: end;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(0,0,0,0.22)),
    #131313;
  border: 1px solid rgba(255,116,23,0.32);
  color: #ffb37c;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.1em;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.62);
}

.seq-hidden-action {
  display: none;
}

.grid {
  --steps: 16;
  --step-w: 36px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: 82px repeat(var(--steps), minmax(var(--step-w), 1fr));
  gap: 3px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scrollbar-color: var(--orange) #111;
  scrollbar-width: thin;
}

.grid:not(.long-pattern) {
  grid-template-columns: 82px repeat(var(--steps), minmax(0, 1fr));
}

.seq-zoom-control.disabled {
  opacity: 0.45;
}

.seq-zoom-control.disabled input {
  cursor: not-allowed;
}

.grid::-webkit-scrollbar {
  height: 8px;
}

.grid::-webkit-scrollbar-track {
  background: #111;
  border-radius: 10px;
}

.grid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--orange), #ffbc7b);
  border-radius: 10px;
}

.grid-label {
  min-height: 20px;
  display: grid;
  align-items: center;
  justify-items: center;
  color: #f0d8bd;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.step-label[data-group="1"] {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 2px;
}

.step {
  min-height: 16px;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent 38%),
    linear-gradient(180deg, #252831, #111218);
  border: 1px solid #2d3140;
  color: #6f7484;
  display: grid;
  place-items: center;
  font-size: 8px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -2px 0 rgba(0,0,0,0.48),
    0 2px 3px rgba(0,0,0,0.28);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;
}

.step[data-group="1"] {
  background: #1c1d22;
  border-color: #383c4d;
}

.step.bar-start {
  box-shadow: inset 2px 0 0 rgba(255, 116, 23, 0.68);
}

.step.bar-end {
  box-shadow: inset -2px 0 0 rgba(255, 116, 23, 0.68);
}

.step.bar-start.bar-end {
  box-shadow:
    inset 2px 0 0 rgba(255, 116, 23, 0.68),
    inset -2px 0 0 rgba(255, 116, 23, 0.68);
}

.step.on {
  background:
    linear-gradient(180deg, #ffb35d, var(--orange) 52%, #9e3b07);
  border-color: #ffb076;
  color: #190b02;
  transform: translateY(2px);
  box-shadow:
    inset 0 2px 5px rgba(0,0,0,0.5),
    0 1px 2px rgba(0,0,0,0.2);
}

.step.playing {
  outline: 2px solid rgba(255,255,255,0.92);
  outline-offset: 1px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.85), rgba(255,176,46,0.68) 26%, transparent 52%),
    linear-gradient(180deg, #ffce7b, var(--orange) 58%, #9e3b07);
  transform: translateY(3px);
  box-shadow:
    0 0 8px rgba(255,255,255,0.7),
    0 0 18px rgba(255,116,23,0.78),
    inset 0 4px 7px rgba(0,0,0,0.58),
    0 1px 2px rgba(0,0,0,0.18);
}

.step.track-selected {
  border-color: rgba(0,168,255,0.74);
}

.pads {
  order: 6;
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(0,0,0,0.2)),
    linear-gradient(180deg, #c5bdb2, #9f968b);
  padding: 7px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.3),
    inset 0 -5px 12px rgba(0,0,0,0.26),
    0 7px 14px rgba(0,0,0,0.18);
}

.pad-unit {
  --bank-color: var(--mpc-blue);
  min-width: 0;
  padding: 4px;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24), transparent 42%),
    linear-gradient(180deg, #b9b1a7, #8d857b);
  border: 1px solid rgba(0,0,0,0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.36),
    inset 0 -4px 7px rgba(0,0,0,0.2),
    0 4px 7px rgba(0,0,0,0.28);
}

.pad-unit.bank-b {
  --bank-color: var(--orange);
}

.pad-mini {
  min-height: 29px;
  display: grid;
  place-items: center;
  align-items: center;
  margin-bottom: 3px;
}

.pad-mini::after {
  content: "PAN";
  margin-top: 1px;
  color: #2a251f;
  font-size: 6px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.pad-mini-knob {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.86), transparent 15%),
    conic-gradient(from -55deg, #111, #4e4a43, #d5cec4, #3f3b36, #10100f);
  border: 1px solid #111;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.28),
    inset 0 -4px 7px rgba(0,0,0,0.58),
    0 3px 5px rgba(0,0,0,0.36);
}

.pad-mini-knob::after {
  content: "";
  display: block;
  width: 3px;
  height: 8px;
  margin: 3px auto 0;
  border-radius: 2px;
  background: var(--bank-color);
  box-shadow: 0 0 6px color-mix(in srgb, var(--bank-color), transparent 28%);
}

.pads button {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.92;
  min-height: 58px;
  padding: 5px 4px 6px;
  display: grid;
  justify-items: center;
  align-content: center;
  grid-template-rows: 4px 1fr 10px;
  gap: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05) 30%, transparent 42%),
    radial-gradient(circle at 48% 0%, rgba(255,255,255,0.18), transparent 44%),
    linear-gradient(180deg, #343230, #171615 66%, #090908);
  color: #e9e0d5;
  border-color: #060504;
  border-radius: 7px;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.12em;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.34),
    inset 0 -6px 0 rgba(0,0,0,0.66),
    0 6px 0 #090807,
    0 9px 12px rgba(0,0,0,0.34);
  text-shadow: 0 1px 0 rgba(0,0,0,0.75);
}

.pads button > span:last-child {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 10px;
  line-height: 1;
  text-align: center;
  font-family: "Helvetica Neue", Helvetica, Arial, "Swiss 721", ui-sans-serif, system-ui, sans-serif;
  font-weight: 950;
}

.track-row-label {
  position: relative;
  display: block;
}

.row-select {
  width: 100%;
  min-height: 20px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), transparent 38%),
    linear-gradient(180deg, var(--track-color), color-mix(in srgb, var(--track-color), #000 42%));
  color: #130801;
  font-size: 8px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -2px 0 rgba(0,0,0,0.36), 0 2px 3px rgba(0,0,0,0.24);
}

.track-row-label.selected .row-select {
  outline: 2px solid var(--mpc-blue);
  outline-offset: 1px;
}

.step-menu {
  position: fixed;
  z-index: 50;
  display: grid;
  gap: 4px;
  padding: 7px;
  border-radius: 6px;
  background: linear-gradient(180deg, #2c2925, #121110);
  border: 1px solid rgba(255,116,23,0.5);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

.step-menu[hidden] {
  display: none;
}

.step-menu button {
  min-height: 24px;
  font-size: 9px;
  color: #ffdcc6;
  background: linear-gradient(180deg, #4b4640, #201e1b);
}

.sound-browser {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: min(540px, calc(100vw - 36px));
  padding: 12px;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.2)),
    linear-gradient(180deg, #22211f, #11100f);
  border: 2px solid rgba(0,168,255,0.82);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -5px 12px rgba(0,0,0,0.5),
    0 18px 38px rgba(0,0,0,0.58),
    0 0 0 3px rgba(0,168,255,0.16);
  color: #f2eadf;
}

.sound-browser[hidden] {
  display: none;
}

.sound-browser.piano-mode {
  border-color: rgba(0,168,255,0.95);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -5px 12px rgba(0,0,0,0.5),
    0 18px 44px rgba(0,0,0,0.62),
    0 0 0 3px rgba(0,168,255,0.2),
    0 0 24px rgba(0,168,255,0.18);
}

.sound-browser-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.sound-browser-head strong {
  display: block;
  color: var(--orange);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.sound-browser-head span {
  display: block;
  margin-top: 3px;
  color: #92d8ff;
  font-family: "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

#soundPianoRoll {
  display: block;
  width: 100%;
  height: 86px;
  border: 1px solid #263446;
  border-radius: 5px;
  background: #081018;
  box-shadow: inset 0 0 18px rgba(0,0,0,0.78);
}

.sound-keys {
  display: grid;
  grid-template-columns: repeat(12, minmax(32px, 1fr));
  gap: 3px;
  margin-top: 8px;
  max-height: 142px;
  overflow-y: auto;
  padding: 5px;
  border-radius: 5px;
  background: #07090c;
  border: 1px solid rgba(126,219,255,0.2);
}

.sound-keys button {
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  gap: 1px;
  font-size: 8px;
  letter-spacing: 0.04em;
  color: #061923;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.52), transparent 42%),
    linear-gradient(180deg, #f7f3ea, #bdb6aa);
}

.sound-keys button span,
.sound-keys button small {
  display: block;
  line-height: 1;
  pointer-events: none;
}

.sound-keys button small {
  min-width: 15px;
  padding: 2px 3px;
  border-radius: 2px;
  background: rgba(0,0,0,0.18);
  color: #0b2430;
  font-size: 7px;
  font-weight: 950;
}

.sound-keys button.black {
  color: #f0e9df;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), transparent 36%),
    linear-gradient(180deg, #2e2b27, #090807);
}

.sound-keys button.black small {
  background: rgba(126,219,255,0.12);
  color: #9ce8ff;
}

.sound-keys button.selected {
  outline: 2px solid var(--mpc-blue);
  outline-offset: -2px;
  filter: brightness(1.12) saturate(1.15);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.3),
    inset 0 -4px 0 rgba(0,0,0,0.34),
    0 0 12px rgba(0,168,255,0.45);
}

.sound-eq,
.mini-fx-rack {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.sound-eq {
  padding: 7px;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(126,219,255,0.08), transparent 28%),
    linear-gradient(180deg, #17242b, #081116);
  border: 1px solid rgba(126,219,255,0.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -10px 18px rgba(0,0,0,0.5),
    0 6px 12px rgba(0,0,0,0.26);
}

.mini-fx-rack {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eq-graph-wrap {
  min-height: 176px;
  border-radius: 5px;
  background: #061018;
  border: 1px solid rgba(126,219,255,0.28);
  overflow: hidden;
  box-shadow: inset 0 0 22px rgba(0,0,0,0.82);
}

#soundEqCanvas {
  display: block;
  width: 100%;
  height: 176px;
  cursor: crosshair;
}

.eq-band-controls,
.eq-freq-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.sound-eq label,
.mini-vst {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 6px;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), transparent 35%),
    linear-gradient(180deg, #2a2926, #12110f);
  border: 1px solid rgba(255,116,23,0.38);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -4px 8px rgba(0,0,0,0.45),
    0 4px 8px rgba(0,0,0,0.3);
  color: #ffdcc6;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.eq-band:nth-child(1) { border-color: #a56bff; }
.eq-band:nth-child(2) { border-color: #ff4ca3; }
.eq-band:nth-child(3) { border-color: #ff7b4a; }
.eq-band:nth-child(4) { border-color: #f5df35; }
.eq-band:nth-child(5) { border-color: #30e56b; }
.eq-band:nth-child(6) { border-color: #34c8ff; }

.eq-freq-controls label {
  min-height: 48px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 35%),
    linear-gradient(180deg, #172127, #0d1114);
  border-color: rgba(126,219,255,0.2);
}

.sound-eq input {
  width: 100%;
  accent-color: var(--mpc-blue);
}

.sound-eq span {
  min-height: 15px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: #101808;
  color: #b5e36b;
  font-family: "Courier New", monospace;
  font-size: 8px;
}

.mini-vst strong {
  color: var(--orange);
  font-size: 9px;
}

.mini-vst button,
.mini-vst select {
  min-height: 20px;
  width: 100%;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 8px;
}

.mini-vst select {
  background: #101808;
  color: #b5e36b;
  border: 1px solid #000;
  font-weight: 900;
}

.sound-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 6px;
  max-height: 118px;
  overflow: auto;
  margin-top: 9px;
}

.sound-list button {
  min-height: 28px;
  padding: 0 8px;
  color: #ffdcc6;
  font-size: 8px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), transparent 38%),
    linear-gradient(180deg, #3f3a34, #171513);
}

.pads button::before {
  content: "";
  width: 86%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--bank-color), color-mix(in srgb, var(--bank-color), #fff 22%));
  box-shadow: 0 1px 0 rgba(255,255,255,0.35), 0 0 8px color-mix(in srgb, var(--bank-color), transparent 35%);
}

.pad-unit:nth-child(1) { --bank-color: var(--mpc-blue); }
.pad-unit:nth-child(2) { --bank-color: var(--mpc-red); }
.pad-unit:nth-child(3) { --bank-color: var(--led-amber); }
.pad-unit:nth-child(4) { --bank-color: var(--led-green); }
.pad-unit:nth-child(5) { --bank-color: var(--mpc-blue); }
.pad-unit:nth-child(6) { --bank-color: #a56bff; }
.pad-unit:nth-child(7) { --bank-color: #ff7db8; }
.pad-unit:nth-child(8) { --bank-color: #f4efe6; }

.pads button:active {
  transform: translateY(3px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 38%),
    linear-gradient(180deg, #191817, #060606);
  color: #fff0dc;
  box-shadow: inset 0 5px 8px rgba(0,0,0,0.74), 0 2px 3px rgba(0,0,0,0.36);
}

.pads button.selected {
  outline: 2px solid #f6f2e8;
  outline-offset: 2px;
  border-color: #fff3d8;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.24),
    inset 0 -5px 0 rgba(0,0,0,0.48),
    0 0 0 3px color-mix(in srgb, var(--bank-color), transparent 66%),
    0 7px 12px rgba(0,0,0,0.44);
}

.pads button.hit {
  transform: translateY(3px);
  filter: brightness(1.18) saturate(1.18);
  box-shadow:
    inset 0 4px 8px rgba(0,0,0,0.55),
    inset 0 -1px 0 rgba(255,255,255,0.16),
    0 0 16px rgba(0,168,255,0.42),
    0 2px 4px rgba(0,0,0,0.36);
}

.pads button.hit .pad-slot i {
  transform: translate(-50%, 5px);
  background: var(--orange);
  box-shadow: 0 0 12px rgba(255,116,23,0.8);
}

.pads button:active .pad-slot i {
  transform: translate(-50%, 5px);
  background: var(--orange);
}

.pad-slot {
  position: relative;
  width: 18px;
  height: 38px;
  border-radius: 2px;
  background: #10100f;
  border: 1px solid #050505;
  box-shadow: inset 0 1px 5px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.08);
}

.pad-slot i {
  position: absolute;
  left: 50%;
  top: 11px;
  width: 28px;
  height: 9px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: #d8d2c7;
  border: 1px solid #81796d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 3px rgba(0,0,0,0.38);
}

.export-dialog,
.pattern-dialog {
  width: min(360px, 92vw);
  border: 1px solid #ff74175c;
  border-radius: 12px;
  background: #181715;
  color: #eee7dc;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.58);
}

.pattern-dialog {
  width: min(680px, 92vw);
}

.pattern-dialog h2 {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-align: center;
}

.pattern-browser {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  align-items: stretch;
}

.pattern-sidebar,
.pattern-workspace {
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(0,0,0,0.28)),
    #111213;
  border: 1px solid rgba(255,116,23,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -8px 16px rgba(0,0,0,0.22);
}

.pattern-sidebar {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.pattern-sidebar strong {
  color: #7edbff;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.pattern-sidebar select {
  width: 100%;
  min-height: 212px;
  border: 1px solid rgba(126,219,255,0.28);
  border-radius: 5px;
  background: #070b10;
  color: #d8f7ff;
  font: 900 10px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0.06em;
  padding: 5px;
}

.pattern-workspace {
  padding: 10px;
  display: grid;
  gap: 9px;
}

.pattern-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.pattern-quick button,
.pattern-actions button {
  min-height: 28px;
  font-size: 9px;
}

.pattern-lane {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 5px;
  background: #080a0d;
  border: 1px solid rgba(126,219,255,0.22);
}

.pattern-lane span {
  color: var(--orange);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.pattern-lane input {
  min-height: 28px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  background: #15191f;
  color: #d8f7ff;
  padding: 0 8px;
  font-weight: 900;
}

.dialog-note,
.pattern-status {
  color: #d5c9bd;
  font-size: 12px;
  line-height: 1.4;
}

.pattern-status {
  min-height: 30px;
  display: grid;
  place-items: center;
  margin-top: 10px;
  border-radius: 5px;
  background: #101808;
  color: #b5e36b;
  font-family: "Courier New", monospace;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.pattern-timeline {
  min-height: 34px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 5px;
  border-radius: 5px;
  background: #07090c;
  border: 1px solid rgba(255,116,23,0.22);
}

.pattern-timeline i {
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(126,219,255,0.24), transparent 46%),
    linear-gradient(180deg, #262b31, #11151a);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 2px 5px rgba(0,0,0,0.3);
}

.pattern-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  flex-wrap: wrap;
}

.help-dialog {
  width: min(920px, 92vw);
  border: 1px solid #00a8ff66;
  border-radius: 12px;
  background: #181715;
  color: #eee7dc;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.58);
  font-family: "Helvetica Neue", Helvetica, Arial, "Swiss 721", ui-sans-serif, system-ui, sans-serif;
}

.help-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.help-dialog h2 {
  margin: 0 0 14px;
  color: var(--mpc-blue);
  font-size: 15px;
  letter-spacing: 0.18em;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.help-grid section {
  padding: 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #272522, #171614);
  border: 1px solid rgba(255,255,255,0.08);
}

.help-grid h3 {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.help-grid p {
  margin: 0;
  color: #d8d0c5;
  font-size: 13px;
  line-height: 1.5;
}

.help-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 9px;
  color: #0a0d0f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.help-flow span {
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 3px;
  background: linear-gradient(180deg, #40c1ff, #008ed1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -2px 0 rgba(0,0,0,0.25);
}

.help-flow b {
  width: 14px;
  height: 2px;
  background: var(--orange);
  box-shadow: 0 0 6px rgba(255,116,23,0.45);
}

.export-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.export-dialog h2 {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 14px;
  letter-spacing: 0.18em;
}

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.dialog-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 820px) {
  body {
    padding: 10px;
  }

  .topbar,
  .transport-panel {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    justify-self: start;
  }

  .actions {
    justify-content: flex-start;
  }

  .tracks,
  .pads {
    grid-template-columns: repeat(4, 1fr);
  }

  .fx-head,
  .fx-strip {
    flex-wrap: wrap;
  }

  .fx-screen,
  .fx-note {
    flex: 1 1 220px;
  }

  .sampler-head,
  .seq-head {
    align-items: stretch;
  }

  .sampler-actions {
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .sample-key-box {
    grid-column: 1 / -1;
  }

  .sampler-mini-screen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seq-tools {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .length-group {
    justify-self: stretch;
    grid-template-columns: repeat(4, 1fr);
  }

  .length-btn,
  .pattern-open-btn,
  .seq-zoom-control,
  .seq-legend {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }

  .grid {
    gap: 3px;
    grid-template-columns: 72px repeat(16, minmax(24px, 1fr));
    overflow-x: auto;
  }

  .pattern-browser {
    grid-template-columns: 1fr;
  }
}
