:root {
  color-scheme: dark;
  --bg: #070808;
  --case: #222728;
  --strip: #141a1b;
  --line: #354347;
  --text: #edf8f2;
  --muted: #8fa49e;
  --green: #55f0a7;
  --red: #ff5d57;
  --amber: #ffc857;
  --blue: #69a7ff;
  --box-label-col: minmax(190px, 0.52fr);
  --box-main-col: minmax(620px, 1.7fr);
  --box-status-col: minmax(112px, 0.3fr);
  --box-gap: 12px;
  --box-pad: 12px;
  --track-name-col: 170px;
  --track-switch-col: 42px;
  --track-tools-col: 150px;
  --track-steps-col: minmax(508px, 1fr);
  --track-snap-col: 112px;
  --track-length-col: 184px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(85, 240, 167, 0.16), transparent 28rem),
    linear-gradient(135deg, #141819, #050606 65%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.mobile-support-lock {
  display: none;
}

body[data-ui-mode="hardware"] {
  --bg: #030506;
  --case: #3a3d39;
  --strip: #242723;
  --line: #777d73;
  --text: #f5f6ea;
  --muted: #bec5bb;
  --green: #31f6ff;
  --amber: #ff4fb8;
  --blue: #48e6ff;
  background:
    radial-gradient(ellipse at 50% -18%, rgba(255, 255, 236, 0.22), transparent 38rem),
    radial-gradient(ellipse at 72% 8%, rgba(255, 255, 255, 0.12), transparent 22rem),
    radial-gradient(ellipse at 15% 24%, rgba(0, 0, 0, 0.18), transparent 26rem),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.075) 0 1px, rgba(0, 0, 0, 0.035) 1px 2px, rgba(255, 255, 255, 0.025) 2px 4px, transparent 4px 7px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 28%, rgba(0, 0, 0, 0.18) 72%, rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #686e66 0%, #333832 48%, #111412 100%);
}

body[data-ui-mode="hardware"] .machine-header,
body[data-ui-mode="hardware"] .sequencer-panel,
body[data-ui-mode="hardware"] .kit-panel,
body[data-ui-mode="hardware"] .project-panel,
body[data-ui-mode="hardware"] .global-snapshot-panel,
body[data-ui-mode="hardware"] .machine-module {
  border-color: rgba(246, 248, 234, 0.28);
  background:
    radial-gradient(ellipse at 52% -16%, rgba(255, 255, 255, 0.24), transparent 42%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.18), transparent 15rem),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, rgba(0, 0, 0, 0.04) 1px 2px, rgba(255, 255, 255, 0.025) 2px 5px, transparent 5px 8px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.13), transparent 34%, rgba(0, 0, 0, 0.2) 78%, rgba(255, 255, 255, 0.06)),
    linear-gradient(180deg, #565c54 0%, #353b36 45%, #1a1e1b 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    inset 0 -30px 54px rgba(0, 0, 0, 0.32),
    inset 0 20px 34px rgba(255, 255, 255, 0.065),
    0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 62px rgba(0, 0, 0, 0.48);
}

body[data-ui-mode="hardware"] .step.is-active,
body[data-ui-mode="hardware"] .bass-step.is-active,
body[data-ui-mode="hardware"] .triplet-step.is-active {
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, 0.2),
    0 0 18px rgba(49, 246, 255, 0.34);
}

body[data-ui-mode="hardware"] .machine-header {
  position: relative;
  border-radius: 12px;
}

body[data-ui-mode="hardware"] .machine-header::before,
body[data-ui-mode="hardware"] .sequencer-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(230, 235, 226, 0.12);
  border-radius: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.58);
  background:
    radial-gradient(circle at 12px 12px, rgba(245, 242, 220, 0.42) 0 1.5px, rgba(0, 0, 0, 0.38) 2px 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 12px) 12px, rgba(245, 242, 220, 0.42) 0 1.5px, rgba(0, 0, 0, 0.38) 2px 3px, transparent 3.5px),
    radial-gradient(circle at 12px calc(100% - 12px), rgba(245, 242, 220, 0.32) 0 1.5px, rgba(0, 0, 0, 0.34) 2px 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), rgba(245, 242, 220, 0.32) 0 1.5px, rgba(0, 0, 0, 0.34) 2px 3px, transparent 3.5px);
  pointer-events: none;
}

body[data-ui-mode="hardware"] .machine-header::after,
body[data-ui-mode="hardware"] .sequencer-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.28)),
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.38), transparent 48%);
  mix-blend-mode: screen;
  opacity: 0.32;
  pointer-events: none;
}

body[data-ui-mode="hardware"] .machine-header,
body[data-ui-mode="hardware"] .sequencer-panel {
  position: relative;
}

body[data-ui-mode="hardware"] h1 {
  color: #dffbff;
  text-shadow:
    0 0 14px rgba(49, 246, 255, 0.22),
    0 0 34px rgba(255, 79, 184, 0.1);
}

body[data-ui-mode="hardware"] .eyebrow,
body[data-ui-mode="hardware"] .panel-kicker {
  color: #31f6ff;
  text-shadow: 0 0 12px rgba(49, 246, 255, 0.52);
}

body[data-ui-mode="hardware"] .bpm-control input,
body[data-ui-mode="hardware"] .swing-control select,
body[data-ui-mode="hardware"] .autofill-control select,
body[data-ui-mode="hardware"] .kit-save-form input,
body[data-ui-mode="hardware"] .kit-panel select,
body[data-ui-mode="hardware"] .project-save-form input,
body[data-ui-mode="hardware"] .project-panel select,
body[data-ui-mode="hardware"] .midi-toolbar input,
body[data-ui-mode="hardware"] .midi-toolbar select,
body[data-ui-mode="hardware"] .machine-module select,
body[data-ui-mode="hardware"] .machine-module input[type="number"] {
  border-color: rgba(49, 246, 255, 0.44);
  background:
    repeating-linear-gradient(180deg, rgba(124, 248, 255, 0.05) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, rgba(49, 246, 255, 0.07), rgba(0, 0, 0, 0.18)),
    #020607;
  color: #7cf8ff;
  font-family: "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(49, 246, 255, 0.45);
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.78),
    inset 0 0 16px rgba(49, 246, 255, 0.08),
    0 0 10px rgba(49, 246, 255, 0.08);
}

body[data-ui-mode="hardware"] .transport-button,
body[data-ui-mode="hardware"] .module-nav-button,
body[data-ui-mode="hardware"] .page-button,
body[data-ui-mode="hardware"] .snapshot-slot,
body[data-ui-mode="hardware"] .global-snapshot-slot,
body[data-ui-mode="hardware"] .generate-sample,
body[data-ui-mode="hardware"] .clear-sequence,
body[data-ui-mode="hardware"] .clear-automation,
body[data-ui-mode="hardware"] .kit-panel button,
body[data-ui-mode="hardware"] .project-panel button {
  border-color: rgba(49, 246, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.44)),
    #070a0b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -8px 18px rgba(0, 0, 0, 0.35),
    0 4px 0 rgba(0, 0, 0, 0.46),
    0 9px 18px rgba(0, 0, 0, 0.22);
  transition: transform 120ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

body[data-ui-mode="hardware"] .transport-button:hover,
body[data-ui-mode="hardware"] .module-nav-button:hover,
body[data-ui-mode="hardware"] .page-button:hover,
body[data-ui-mode="hardware"] .snapshot-slot:hover,
body[data-ui-mode="hardware"] .global-snapshot-slot:hover,
body[data-ui-mode="hardware"] .generate-sample:hover,
body[data-ui-mode="hardware"] .clear-sequence:hover,
body[data-ui-mode="hardware"] .clear-automation:hover {
  border-color: rgba(49, 246, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -8px 18px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(49, 246, 255, 0.18);
}

body[data-ui-mode="hardware"] .transport-button:active,
body[data-ui-mode="hardware"] .module-nav-button:active,
body[data-ui-mode="hardware"] .page-button:active,
body[data-ui-mode="hardware"] .snapshot-slot:active,
body[data-ui-mode="hardware"] .global-snapshot-slot:active,
body[data-ui-mode="hardware"] .generate-sample:active,
body[data-ui-mode="hardware"] .clear-sequence:active,
body[data-ui-mode="hardware"] .clear-automation:active {
  transform: translateY(3px) scale(0.99);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -5px 12px rgba(0, 0, 0, 0.38),
    0 1px 0 rgba(0, 0, 0, 0.52);
}

body[data-ui-mode="hardware"] .transport-button.play {
  background:
    radial-gradient(circle at 50% 18%, rgba(236, 255, 244, 0.28), transparent 62%),
    linear-gradient(180deg, #7dffbd, #28c87c);
  color: #06110b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 0 20px rgba(85, 240, 167, 0.28);
}

body[data-ui-mode="hardware"] .transport-button.play.is-playing {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.22), transparent 62%),
    linear-gradient(180deg, #ff837e, #d93631);
  color: #170404;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 20px rgba(255, 93, 87, 0.28);
}

body[data-ui-mode="hardware"] .transport-button.stop {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.22), transparent 62%),
    linear-gradient(180deg, #ff69bc, #b41668);
  color: #17020d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 20px rgba(255, 79, 184, 0.26);
}

body[data-ui-mode="hardware"] input[type="range"] {
  appearance: none;
  min-height: 30px;
  padding: 6px 0;
  background: transparent;
  cursor: pointer;
}

body[data-ui-mode="hardware"] input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border: 0;
  border-radius: 3px;
  background-image: url("assets/ui/fader-h-body.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 14px;
  box-shadow:
    0 0 0 1px rgba(230, 235, 226, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.34);
}

body[data-ui-mode="hardware"] input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -5px;
  border: 0;
  border-radius: 4px;
  background-image: url("assets/ui/fader-h-cap.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  box-shadow:
    0 4px 9px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(238, 242, 226, 0.08);
  transition: transform 120ms ease, box-shadow 160ms ease;
}

body[data-ui-mode="hardware"] input[type="range"]:active::-webkit-slider-thumb {
  transform: scale(1.04);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.62),
    0 0 14px rgba(85, 240, 167, 0.18);
}

body[data-ui-mode="hardware"] input[type="range"]::-moz-range-track {
  height: 14px;
  border: 0;
  border-radius: 3px;
  background-image: url("assets/ui/fader-h-body.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 14px;
  box-shadow: 0 0 0 1px rgba(230, 235, 226, 0.08);
}

body[data-ui-mode="hardware"] input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background-image: url("assets/ui/fader-h-cap.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  box-shadow:
    0 6px 10px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(238, 242, 226, 0.08);
}

.drum-insert-rack input[type="range"],
.drum-density-control input[type="range"],
.transition-control input[type="range"],
.bass-module input[type="range"],
.synth-panel input[type="range"],
.mix-panel input[type="range"],
.midi-transform-panel input[type="range"] {
  appearance: none;
  min-height: 28px;
  padding: 6px 0;
  background: transparent;
  cursor: pointer;
}

.drum-insert-rack input[type="range"]::-webkit-slider-runnable-track,
.drum-density-control input[type="range"]::-webkit-slider-runnable-track,
.transition-control input[type="range"]::-webkit-slider-runnable-track,
.bass-module input[type="range"]::-webkit-slider-runnable-track,
.synth-panel input[type="range"]::-webkit-slider-runnable-track,
.mix-panel input[type="range"]::-webkit-slider-runnable-track,
.midi-transform-panel input[type="range"]::-webkit-slider-runnable-track {
  height: 14px;
  border: 0;
  border-radius: 3px;
  background-image: url("assets/ui/fader-h-body.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 14px;
  box-shadow:
    0 0 0 1px rgba(230, 235, 226, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.34);
}

.drum-insert-rack input[type="range"]::-webkit-slider-thumb,
.drum-density-control input[type="range"]::-webkit-slider-thumb,
.transition-control input[type="range"]::-webkit-slider-thumb,
.bass-module input[type="range"]::-webkit-slider-thumb,
.synth-panel input[type="range"]::-webkit-slider-thumb,
.mix-panel input[type="range"]::-webkit-slider-thumb,
.midi-transform-panel input[type="range"]::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -5px;
  border: 0;
  border-radius: 4px;
  background-image: url("assets/ui/fader-h-cap.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
  box-shadow:
    0 4px 9px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(238, 242, 226, 0.08);
  appearance: none;
}

body[data-ui-mode="hardware"] .step,
body[data-ui-mode="hardware"] .bass-step,
body[data-ui-mode="hardware"] .triplet-step {
  border-color: rgba(49, 246, 255, 0.16);
  border-radius: 5px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 40%),
    #040708;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -8px 12px rgba(0, 0, 0, 0.4),
    0 3px 0 rgba(0, 0, 0, 0.5);
  transition: transform 90ms ease, box-shadow 140ms ease, background 140ms ease;
}

body[data-ui-mode="hardware"] .step:active,
body[data-ui-mode="hardware"] .bass-step:active,
body[data-ui-mode="hardware"] .triplet-step:active {
  transform: scale(0.94);
}

body[data-ui-mode="hardware"] .step.is-active,
body[data-ui-mode="hardware"] .bass-step.is-active,
body[data-ui-mode="hardware"] .triplet-step.is-active {
  border-color: rgba(49, 246, 255, 0.86);
  background:
    radial-gradient(circle at 50% 28%, rgba(236, 251, 255, 0.38), transparent 45%),
    linear-gradient(180deg, rgba(49, 246, 255, 0.9), rgba(0, 118, 148, 0.86));
  animation: padPulse 1.5s ease-in-out infinite;
}

body[data-ui-mode="hardware"] .track-row:nth-child(even) .step.is-active,
body[data-ui-mode="hardware"] .track-row:nth-child(even) .bass-step.is-active,
body[data-ui-mode="hardware"] .track-row:nth-child(even) .triplet-step.is-active {
  border-color: rgba(255, 79, 184, 0.82);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.32), transparent 45%),
    linear-gradient(180deg, rgba(255, 79, 184, 0.9), rgba(148, 13, 87, 0.86));
}

body[data-ui-mode="hardware"] .snare-fx-knob,
body[data-ui-mode="hardware"] .module-knob,
body[data-ui-mode="hardware"] .bass-module input[type="range"] + output {
  filter: drop-shadow(0 0 10px rgba(255, 79, 184, 0.12));
}

body[data-ui-mode="hardware"] .snare-fx-dial {
  border: 0;
  background-image: url("assets/ui/knob-minimoog-main.png");
  background-repeat: no-repeat;
  background-position: 0 var(--knob-frame-y, -1400px);
  background-size: 28px 2828px;
  box-shadow:
    0 0 0 1px rgba(255, 176, 173, 0.32),
    0 5px 8px rgba(0, 0, 0, 0.5);
}

body[data-ui-mode="hardware"] .snare-fx-dial::before {
  display: none;
}

body[data-ui-mode="hardware"] .snare-fx-dial::after {
  display: none;
}

body[data-ui-mode="hardware"] .track-row,
body[data-ui-mode="hardware"] .sequencer-ruler {
  border-color: rgba(226, 232, 224, 0.16);
  background:
    linear-gradient(90deg, transparent 0 calc(100% - 1px), rgba(255, 255, 255, 0.04) calc(100% - 1px)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, rgba(238, 244, 234, 0.05), rgba(0, 0, 0, 0.22)),
    rgba(8, 11, 11, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -10px 20px rgba(0, 0, 0, 0.16);
}

body[data-ui-mode="hardware"] .drum-tool-panel,
body[data-ui-mode="hardware"] .machine-panel,
body[data-ui-mode="hardware"] .bass-panel,
body[data-ui-mode="hardware"] .synth-panel,
body[data-ui-mode="hardware"] .project-memory,
body[data-ui-mode="hardware"] .kit-memory {
  border-color: rgba(246, 248, 234, 0.2);
  background:
    radial-gradient(ellipse at 50% -12%, rgba(255, 255, 255, 0.15), transparent 44%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.09), transparent 10rem),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.055) 0 1px, rgba(0, 0, 0, 0.032) 1px 2px, rgba(255, 255, 255, 0.018) 2px 5px, transparent 5px 8px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09), transparent 34%, rgba(0, 0, 0, 0.14) 78%, rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, #3b423c, #1b201d 82%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -20px 34px rgba(0, 0, 0, 0.24),
    0 12px 28px rgba(0, 0, 0, 0.22);
}

body[data-ui-mode="hardware"] .drum-insert-rack,
body[data-ui-mode="hardware"] .drum-balance-control,
body[data-ui-mode="hardware"] .drum-level-strip {
  border-color: rgba(246, 248, 234, 0.18);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.044) 0 1px, rgba(0, 0, 0, 0.028) 1px 2px, transparent 2px 7px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 42%, rgba(0, 0, 0, 0.1)),
    linear-gradient(180deg, rgba(244, 239, 218, 0.07), rgba(0, 0, 0, 0.2)),
    #202520;
}

body[data-ui-mode="hardware"] .sample-drop {
  border-color: rgba(49, 246, 255, 0.46);
  background:
    repeating-linear-gradient(180deg, rgba(49, 246, 255, 0.08) 0 1px, transparent 1px 5px),
    rgba(0, 11, 13, 0.84);
  color: #71faff;
  text-shadow: 0 0 10px rgba(49, 246, 255, 0.56);
}

@keyframes padPulse {
  0%,
  100% {
    filter: brightness(0.98);
  }
  50% {
    filter: brightness(1.18);
  }
}

@keyframes transitionBlink {
  0%,
  100% {
    border-color: rgba(255, 200, 87, 0.95);
    box-shadow: 0 0 10px rgba(255, 200, 87, 0.18);
    filter: brightness(1);
  }
  50% {
    border-color: rgba(85, 240, 167, 0.98);
    box-shadow: 0 0 22px rgba(85, 240, 167, 0.32);
    filter: brightness(1.28);
  }
}

.app-shell {
  width: min(1480px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.machine-header,
.sequencer-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.16)),
    #202627;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 22px 60px rgba(0, 0, 0, 0.34);
}

.machine-header {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 126px minmax(520px, auto) 98px;
  gap: 18px;
  align-items: center;
  margin-bottom: 12px;
  padding: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.title-transport-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.title-transport-actions .transport-button {
  min-height: 38px;
  padding: 0 13px;
}

.home-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(85, 240, 167, 0.34);
  border-radius: 6px;
  background: rgba(7, 10, 11, 0.76);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.home-link:hover,
.home-link:focus-visible {
  border-color: rgba(85, 240, 167, 0.76);
  box-shadow: 0 0 16px rgba(85, 240, 167, 0.18);
  outline: none;
}

.transport-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
  align-self: center;
  min-width: 0;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  align-self: start;
  justify-self: end;
  min-width: 0;
}

.transport {
  display: grid;
  grid-template-columns: minmax(118px, auto) repeat(6, minmax(78px, auto));
  gap: 10px;
  align-items: center;
  justify-content: end;
}

button,
input,
select {
  font: inherit;
}

.bpm-control,
.swing-control,
.density-control,
.autofill-control,
.transition-control {
  display: grid;
  gap: 5px;
}

.bpm-control span,
.swing-control span,
.density-control span,
.autofill-control span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.bpm-control input,
.swing-control select,
.autofill-control select {
  width: 86px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #3f5153;
  border-radius: 6px;
  background: #070a0b;
  color: var(--text);
  font-weight: 900;
}

.swing-control select {
  width: 104px;
}

.autofill-control select {
  width: 114px;
}

.density-control input {
  width: 118px;
  min-height: 28px;
  accent-color: var(--amber);
}

.density-control output {
  color: var(--amber);
  font-weight: 950;
}

.density-control small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
}

.transport-button {
  min-width: 92px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 950;
}

.transport-button.play {
  background: linear-gradient(180deg, #7dffbd, #28c87c);
  color: #06110b;
}

.transport-button.play.is-playing {
  background: linear-gradient(180deg, #ff837e, #d93631);
  color: #170404;
}

.transport-button.stop {
  background: linear-gradient(180deg, #ff837e, #d93631);
  color: #170404;
}

.transport-button.reset {
  min-width: 84px;
  min-height: 36px;
  align-self: end;
  background: #070a0b;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0;
}

.transport-button.mute-reset {
  border-color: rgba(255, 200, 87, 0.44);
  color: rgba(255, 200, 87, 0.8);
}

.transport-button.solo-reset {
  border-color: rgba(255, 93, 87, 0.44);
  color: rgba(255, 93, 87, 0.8);
}

.transport-button.reset.is-confirmed {
  border-color: rgba(85, 240, 167, 0.9);
  color: #7dffbd;
  box-shadow: 0 0 14px rgba(85, 240, 167, 0.22);
}

.ui-mode-toggle {
  min-width: 94px;
  min-height: 36px;
  align-self: center;
  border-color: rgba(105, 167, 255, 0.46);
  background: #070a0b;
  color: #b8d6ff;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.ui-mode-toggle[aria-pressed="true"] {
  border-color: rgba(255, 79, 184, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 79, 184, 0.26), rgba(8, 10, 11, 0.92));
  color: #ffd6ef;
  box-shadow: 0 0 16px rgba(255, 79, 184, 0.2);
}

.page-switch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  grid-column: 1 / -1;
  min-height: 34px;
  align-items: center;
  margin-bottom: 8px;
}

.page-button {
  min-width: 62px;
  min-height: 34px;
  border: 1px solid rgba(143, 164, 158, 0.36);
  border-radius: 6px;
  background: #070a0b;
  color: var(--muted);
  cursor: pointer;
  font-weight: 950;
}

.page-button.is-active {
  border-color: rgba(85, 240, 167, 0.68);
  background: rgba(85, 240, 167, 0.13);
  color: var(--green);
}

.page-button.is-disabled,
.page-button:disabled {
  cursor: not-allowed;
  opacity: 0.32;
}

.kit-panel,
.project-panel {
  display: grid;
  grid-template-columns: var(--box-label-col) var(--box-main-col) var(--box-status-col);
  gap: var(--box-gap);
  align-items: center;
  margin-bottom: 12px;
  padding: var(--box-pad);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(0, 0, 0, 0.13)),
    #202627;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 12px 34px rgba(0, 0, 0, 0.18);
}

.project-panel {
  border-color: rgba(105, 167, 255, 0.28);
  background:
    linear-gradient(90deg, rgba(105, 167, 255, 0.08), rgba(85, 240, 167, 0.05)),
    #111819;
}

.module-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #161d1e;
}

.drum-cutoff-control {
  --knob-angle: 135deg;
  --knob-frame-y: -5200px;
  display: grid;
  grid-template-rows: 14px 72px 13px;
  gap: 6px;
  align-items: center;
  justify-items: center;
  min-width: 0;
  min-height: 116px;
  padding: 10px 9px;
  border: 1px solid rgba(105, 167, 255, 0.34);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 22%, rgba(105, 167, 255, 0.12), transparent 45%),
    #070a0b;
}

.drum-cutoff-control::before {
  content: "";
  grid-row: 2;
  grid-column: 1;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background-image: url("assets/ui/knob-minimoog-main.png");
  background-repeat: no-repeat;
  background-position: 0 var(--knob-frame-y);
  background-size: 58px 5858px;
  box-shadow:
    0 0 0 1px rgba(230, 235, 226, 0.14),
    0 7px 12px rgba(0, 0, 0, 0.5);
}

.drum-cutoff-control::after {
  display: none;
}

.header-drum-cutoff {
  width: 104px;
  align-self: center;
  justify-self: center;
  margin-right: 10px;
}

.drum-cutoff-control > span:first-child,
.drum-cutoff-control output {
  color: var(--blue);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.drum-cutoff-control input {
  grid-row: 2;
  grid-column: 1;
  z-index: 3;
  width: 64px;
  height: 64px;
  margin: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  appearance: none;
}

.drum-cutoff-control input::-webkit-slider-thumb {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  appearance: none;
}

.drum-cutoff-control input::-moz-range-thumb {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.module-nav-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  min-width: 0;
}

.module-nav-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(143, 164, 158, 0.36);
  border-radius: 6px;
  background: #070a0b;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.module-nav-switches {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  gap: 4px;
}

.module-nav-switches .module-toggle {
  width: 34px;
  min-width: 34px;
  height: 44px;
}

.module-nav-button.is-active {
  border-color: rgba(85, 240, 167, 0.72);
  background: rgba(85, 240, 167, 0.13);
  color: var(--green);
  box-shadow: 0 0 14px rgba(85, 240, 167, 0.13);
}

.app-page[hidden] {
  display: none;
}

.app-page {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.machine-module {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: end;
  min-height: 128px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(105, 167, 255, 0.08), transparent 44%),
    #202627;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 16px 44px rgba(0, 0, 0, 0.24);
}

.machine-module h2 {
  margin: 0 0 7px;
  font-size: 1.28rem;
  letter-spacing: 0;
}

.machine-module p:not(.panel-kicker) {
  max-width: 30ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.bass-module {
  grid-template-columns: minmax(150px, 0.8fr) minmax(240px, 1.2fr);
}

.bass-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(74px, 1fr));
  gap: 8px;
  align-items: end;
}

.bass-controls label {
  display: grid;
  gap: 5px;
}

.bass-controls span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bass-controls select,
.bass-controls input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(143, 164, 158, 0.38);
  border-radius: 6px;
  background: #070a0b;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
}

.bass-controls select {
  padding: 0 8px;
}

.bass-controls input {
  accent-color: var(--green);
}

.bass-pattern {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(16, minmax(28px, 1fr));
  gap: 6px;
}

.bass-snapshots {
  grid-column: 1 / -1;
  justify-self: end;
  width: min(260px, 100%);
}

.bass-chain-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(120px, 150px) minmax(260px, 1fr);
  gap: 10px;
  align-items: end;
  justify-content: end;
}

.bass-chain-control {
  display: grid;
  gap: 5px;
}

.bass-chain-control span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bass-chain-control select {
  min-height: 36px;
  border: 1px solid rgba(143, 164, 158, 0.38);
  border-radius: 6px;
  background: #070a0b;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
}

.bass-chain-builder {
  display: grid;
  gap: 6px;
}

.bass-chain-sources,
.bass-chain-slots {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}

.bass-chain-slots {
  min-height: 34px;
  padding: 4px;
  border: 1px dashed rgba(143, 164, 158, 0.28);
  border-radius: 6px;
  background: rgba(7, 10, 11, 0.52);
}

.chain-source,
.chain-slot {
  min-height: 28px;
  border: 1px solid rgba(143, 164, 158, 0.3);
  border-radius: 4px;
  background: #070a0b;
  color: rgba(143, 164, 158, 0.72);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 950;
}

.chain-source.has-snapshot,
.chain-slot.has-snapshot {
  border-color: rgba(255, 200, 87, 0.5);
  color: var(--amber);
}

.chain-source:not(.has-snapshot) {
  cursor: not-allowed;
  opacity: 0.34;
}

.chain-slot.is-selected {
  border-color: rgba(85, 240, 167, 0.76);
  background: rgba(85, 240, 167, 0.15);
  color: var(--green);
}

.chain-slot.is-current {
  outline: 2px solid var(--red);
  outline-offset: 1px;
  box-shadow: 0 0 8px rgba(255, 93, 87, 0.24);
}

.chain-empty {
  grid-column: 1 / -1;
  align-self: center;
  color: rgba(143, 164, 158, 0.62);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.bass-step {
  position: relative;
  min-height: 34px;
  border: 1px solid rgba(143, 164, 158, 0.28);
  border-radius: 4px;
  background: #070a0b;
  color: rgba(237, 248, 242, 0.82);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 950;
}

.bass-step[data-cutoff]:not([data-cutoff=""]) {
  background:
    linear-gradient(0deg, rgba(105, 167, 255, 0.32) 0 var(--cutoff-level, 0%), transparent var(--cutoff-level, 0%) 100%),
    #070a0b;
}

.bass-step[data-cutoff]:not([data-cutoff=""])::before {
  content: attr(data-cutoff);
  position: absolute;
  right: 3px;
  top: 3px;
  color: #b8d6ff;
  font-size: 0.54rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 6px rgba(105, 167, 255, 0.58);
}

.bass-module:has(.bass-cutoff-draw.is-active) .bass-step {
  cursor: ns-resize;
}

.bass-step:nth-child(4n+1) {
  border-color: rgba(255, 200, 87, 0.42);
}

.bass-step.is-active {
  border-color: rgba(85, 240, 167, 0.72);
  background: linear-gradient(180deg, rgba(85, 240, 167, 0.72), rgba(30, 132, 82, 0.9));
  color: #06110b;
  box-shadow: 0 0 10px rgba(85, 240, 167, 0.26);
}

.bass-step.is-active[data-cutoff]:not([data-cutoff=""]) {
  background:
    linear-gradient(0deg, rgba(105, 167, 255, 0.48) 0 var(--cutoff-level, 0%), transparent var(--cutoff-level, 0%) 100%),
    linear-gradient(180deg, rgba(85, 240, 167, 0.72), rgba(30, 132, 82, 0.9));
}

.bass-step.is-accent:not([data-tie="true"])::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(255, 200, 87, 0.58);
}

.bass-step[data-tune-label]:not([data-tune-label="0"])::before {
  content: attr(data-tune-label);
  position: absolute;
  left: 50%;
  top: -15px;
  transform: translateX(-50%);
  color: #a9cfff;
  font-size: 0.64rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 6px rgba(105, 167, 255, 0.55);
}

.bass-step[data-tie="true"] {
  border-style: dashed;
}

.bass-step[data-tie="true"]::after {
  content: "T";
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  color: var(--amber);
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 6px rgba(255, 200, 87, 0.6);
}

.bass-step.is-current {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

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

.midi-transform-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(96px, 0.7fr) minmax(76px, 0.45fr) auto minmax(132px, 0.9fr) minmax(132px, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(255, 200, 87, 0.24);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 200, 87, 0.08), rgba(105, 167, 255, 0.05)),
    #111819;
}

.midi-transform-panel label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.midi-transform-panel span {
  overflow: hidden;
  color: var(--amber);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.midi-transform-panel select,
.midi-transform-panel input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(255, 200, 87, 0.36);
  border-radius: 6px;
  background: #070a0b;
  color: var(--text);
  font-weight: 900;
}

.midi-transform-panel input[type="range"] {
  accent-color: var(--amber);
}

.module-switches {
  display: grid;
  grid-template-columns: repeat(2, 40px);
  gap: 6px;
  margin-right: auto;
}

.module-action {
  min-width: 96px;
  min-height: 40px;
  border: 1px solid rgba(85, 240, 167, 0.48);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(85, 240, 167, 0.18), rgba(8, 10, 11, 0.9));
  color: var(--green);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 950;
}

.module-inline-control {
  display: grid;
  min-width: 86px;
  min-height: 40px;
  gap: 2px;
  align-content: center;
  padding: 4px 10px;
  border: 1px solid rgba(143, 164, 158, 0.32);
  border-radius: 6px;
  background: rgba(8, 10, 11, 0.76);
}

.module-inline-control span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 950;
  text-transform: uppercase;
}

.module-inline-control select {
  width: 100%;
  min-width: 54px;
  border: 0;
  border-radius: 4px;
  background: #edf8f2;
  color: #06110b;
  appearance: auto;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.2;
}

.module-inline-control select option {
  background: #edf8f2;
  color: #06110b;
}

.machine-module.is-armed {
  border-color: rgba(85, 240, 167, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(85, 240, 167, 0.18),
    0 0 22px rgba(85, 240, 167, 0.13),
    0 16px 44px rgba(0, 0, 0, 0.24);
}

.machine-module.is-armed .module-action {
  background: linear-gradient(180deg, #7dffbd, #28c87c);
  color: #06110b;
}

.bass-clear {
  border-color: rgba(255, 93, 87, 0.56);
  color: #ffc4c1;
  background:
    linear-gradient(180deg, rgba(255, 93, 87, 0.2), rgba(8, 10, 11, 0.9));
}

.bass-cutoff-draw {
  border-color: rgba(105, 167, 255, 0.58);
  color: #b8d6ff;
}

.bass-cutoff-draw.is-active {
  border-color: rgba(105, 167, 255, 0.86);
  background: linear-gradient(180deg, rgba(105, 167, 255, 0.34), rgba(8, 10, 11, 0.9));
  color: #d8e8ff;
  box-shadow: 0 0 12px rgba(105, 167, 255, 0.18);
}

.machine-module.is-armed .bass-clear {
  background:
    linear-gradient(180deg, rgba(255, 93, 87, 0.28), rgba(8, 10, 11, 0.9));
  color: #ffc4c1;
}

.synth-module {
  --midi-vzoom: 1;
  grid-template-columns: minmax(180px, 0.45fr) minmax(520px, 1fr);
}

.midi-clip-panel {
  align-self: stretch;
  padding: 10px;
  border: 1px solid rgba(143, 164, 158, 0.28);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(85, 240, 167, 0.06), rgba(7, 10, 11, 0.72)),
    #111819;
}

.midi-clip-panel dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.midi-clip-panel div {
  display: grid;
  grid-template-columns: minmax(78px, 1fr) minmax(76px, auto);
  gap: 8px;
  align-items: center;
}

.midi-clip-panel dt {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.midi-clip-panel dd {
  min-width: 76px;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid rgba(85, 240, 167, 0.22);
  border-radius: 4px;
  background: #070a0b;
  color: var(--green);
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 950;
  text-align: right;
}

.midi-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  grid-column: 1 / -1;
  gap: 8px;
  align-items: end;
}

.midi-toolbar label {
  display: grid;
  gap: 5px;
}

.midi-toolbar span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.midi-toolbar input,
.midi-toolbar select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(143, 164, 158, 0.38);
  border-radius: 6px;
  background: #070a0b;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
}

.midi-toolbar input {
  padding: 0 8px;
}

.midi-record.is-active {
  border-color: rgba(255, 93, 87, 0.76);
  background: linear-gradient(180deg, rgba(255, 93, 87, 0.42), rgba(8, 10, 11, 0.9));
  color: #ffd5d3;
}

.midi-play.is-active {
  border-color: rgba(255, 93, 87, 0.82);
  background: linear-gradient(180deg, rgba(255, 93, 87, 0.38), rgba(8, 10, 11, 0.9));
  color: #ffd5d3;
}

.midi-transport-button {
  min-width: 82px;
  letter-spacing: 0.02em;
}

.midi-play {
  border-color: rgba(85, 240, 167, 0.54);
  background: linear-gradient(180deg, rgba(85, 240, 167, 0.24), rgba(8, 10, 11, 0.9));
  color: var(--green);
}

.main-play-button {
  min-width: 118px;
  min-height: 58px;
  align-self: stretch;
  border-color: rgba(85, 240, 167, 0.76);
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.main-play-button.is-playing {
  border-color: rgba(255, 93, 87, 0.82);
  background: linear-gradient(180deg, rgba(255, 93, 87, 0.36), rgba(8, 10, 11, 0.9));
  color: #ffd5d3;
}

.midi-record {
  border-color: rgba(255, 93, 87, 0.58);
  color: #ffb0ad;
}

.midi-overdub {
  border-color: rgba(255, 200, 87, 0.52);
  color: var(--amber);
}

.midi-overdub.is-active {
  border-color: rgba(255, 200, 87, 0.82);
  background: linear-gradient(180deg, rgba(255, 200, 87, 0.34), rgba(8, 10, 11, 0.9));
  color: #ffe6a8;
  box-shadow: 0 0 12px rgba(255, 200, 87, 0.18);
}

.transition-trigger {
  border-color: rgba(105, 167, 255, 0.68);
  color: #cfe2ff;
}

.transition-break-stack {
  display: grid;
  gap: 5px;
  align-self: stretch;
}

.break-toggle {
  width: 74px;
  min-height: 24px;
  padding: 4px 8px;
  border-color: rgba(255, 200, 87, 0.54);
  color: rgba(255, 232, 170, 0.78);
  font-size: 0.66rem;
  white-space: nowrap;
}

.break-toggle.is-active {
  border-color: rgba(255, 200, 87, 0.94);
  background: linear-gradient(180deg, rgba(255, 200, 87, 0.28), rgba(8, 10, 11, 0.92));
  color: #fff0b8;
  box-shadow: 0 0 14px rgba(255, 200, 87, 0.18);
}

.transition-trigger:hover,
.transition-trigger:focus-visible {
  border-color: rgba(105, 167, 255, 0.95);
  box-shadow: 0 0 16px rgba(105, 167, 255, 0.2);
  outline: none;
}

.transition-trigger.is-triggered {
  border-color: rgba(255, 200, 87, 0.95);
  background: linear-gradient(180deg, rgba(255, 200, 87, 0.34), rgba(8, 10, 11, 0.9));
  color: #ffe6a8;
  box-shadow: 0 0 18px rgba(255, 200, 87, 0.24);
}

.transition-trigger.is-active {
  animation: transitionBlink 620ms steps(2, end) infinite;
  background: linear-gradient(180deg, rgba(255, 200, 87, 0.28), rgba(8, 10, 11, 0.9));
  color: #fff2c2;
}

.transition-control {
  width: 76px;
}

.transition-control input[type="range"] {
  width: 100%;
  min-height: 34px;
  accent-color: var(--blue);
}

.transition-sample-slots {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  gap: 8px;
  justify-self: stretch;
  min-height: 46px;
}

.transition-sample-drop {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 46px;
  padding: 7px 10px;
  border: 1px dashed rgba(105, 167, 255, 0.48);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(105, 167, 255, 0.12), rgba(7, 10, 11, 0.88));
  color: #cfe2ff;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1.1;
  overflow: hidden;
  text-align: center;
  text-transform: uppercase;
}

.transition-sample-drop span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transition-sample-drop.is-dragging,
.transition-sample-drop.has-sample {
  border-color: rgba(85, 240, 167, 0.8);
  color: var(--green);
  box-shadow: 0 0 14px rgba(85, 240, 167, 0.14);
}

.midi-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-column: span 2;
  min-width: 218px;
  min-height: 40px;
  border: 1px solid rgba(143, 164, 158, 0.38);
  border-radius: 6px;
  overflow: hidden;
  background: #070a0b;
}

.midi-tool {
  border: 0;
  border-right: 1px solid rgba(143, 164, 158, 0.22);
  background: rgba(8, 10, 11, 0.9);
  color: #b8d6ff;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 950;
  min-width: 0;
  padding: 0 8px;
  text-transform: uppercase;
}

.midi-tool:last-child {
  border-right: 0;
}

.midi-tool.is-active {
  background:
    linear-gradient(180deg, rgba(85, 240, 167, 0.34), rgba(8, 10, 11, 0.92));
  color: #7dffbd;
  box-shadow: inset 0 0 0 1px rgba(85, 240, 167, 0.42);
}

.prophet-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1.05fr repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(221, 190, 112, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(86, 45, 22, 0.54), rgba(18, 22, 21, 0.1) 12%, rgba(18, 22, 21, 0.1) 88%, rgba(86, 45, 22, 0.54)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, rgba(0, 0, 0, 0.02) 1px 5px),
    linear-gradient(180deg, #232a2a, #111718 48%, #0b0f10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -18px 32px rgba(0, 0, 0, 0.26),
    0 14px 32px rgba(0, 0, 0, 0.26);
}

.prophet-title,
.prophet-section {
  position: relative;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(220, 229, 219, 0.16);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.18)),
    rgba(5, 8, 9, 0.76);
}

.prophet-title {
  display: grid;
  align-content: center;
  gap: 5px;
  border-color: rgba(221, 190, 112, 0.42);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 200, 87, 0.16), transparent 58%),
    #080b0b;
}

.prophet-title span,
.prophet-section h3,
.prophet-section span,
.prophet-knob-control output {
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.prophet-title span {
  color: rgba(255, 226, 157, 0.74);
  font-size: 0.62rem;
}

.prophet-title strong {
  color: #f2e3bd;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.36rem;
  letter-spacing: 0.03em;
  line-height: 1;
}

.prophet-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.prophet-filter,
.prophet-env {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.prophet-section h3 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: #f1d799;
  font-size: 0.68rem;
}

.prophet-section label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.prophet-section span {
  overflow: hidden;
  color: rgba(226, 232, 222, 0.74);
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prophet-section select {
  min-height: 36px;
  border: 1px solid rgba(221, 190, 112, 0.34);
  border-radius: 5px;
  background: #050707;
  color: #f2e3bd;
  font-weight: 900;
}

.prophet-knob-control {
  --knob-frame-y: -5200px;
  grid-template-rows: 12px 58px 12px;
  justify-items: center;
}

.prophet-knob-control::before {
  content: "";
  grid-row: 2;
  grid-column: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-image: url("assets/ui/knob-minimoog-main.png");
  background-position: 0 var(--knob-frame-y);
  background-repeat: no-repeat;
  background-size: 52px 5252px;
  box-shadow:
    0 0 0 1px rgba(230, 235, 226, 0.14),
    0 7px 12px rgba(0, 0, 0, 0.52);
}

.prophet-knob-control input {
  grid-row: 2;
  grid-column: 1;
  z-index: 2;
  width: 58px;
  height: 58px;
  margin: 0;
  cursor: pointer;
  opacity: 0;
  appearance: none;
}

.prophet-knob-control output {
  color: rgba(255, 226, 157, 0.82);
  font-size: 0.54rem;
}

.prophet-env input {
  width: 100%;
  min-height: 34px;
  accent-color: #f1d799;
}

.prophet-program {
  align-content: start;
}

.polyfive-architecture {
  display: grid;
  grid-column: 1 / -1;
  gap: 5px;
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(85, 240, 167, 0.28);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(85, 240, 167, 0.08), rgba(0, 0, 0, 0.2)),
    #060909;
}

.polyfive-architecture strong {
  color: #7dffbd;
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.polyfive-architecture span {
  color: rgba(226, 232, 222, 0.7);
  white-space: normal;
}

.prophet-program .pcm-drop-zone {
  grid-column: 1 / -1;
  min-height: 62px;
  padding: 8px;
  border: 1px dashed rgba(85, 240, 167, 0.42);
  border-radius: 5px;
  background: rgba(5, 8, 9, 0.72);
}

.prophet-program .pcm-drop-zone input {
  width: 100%;
}

.prophet-program .pcm-drop-zone strong,
.prophet-program .pcm-drop-zone small {
  overflow: hidden;
  color: #7dffbd;
  font-size: 0.62rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prophet-program .user-pcm-delete {
  min-height: 36px;
  border-color: rgba(255, 93, 87, 0.44);
  color: #ffc4c1;
}

.midi-tool[data-tool="erase"] {
  color: #ffeaa0;
}

.midi-tool[data-tool="erase"].is-active {
  background:
    linear-gradient(180deg, rgba(255, 93, 87, 0.42), rgba(8, 10, 11, 0.92));
  color: #ffc4c1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 93, 87, 0.62),
    0 0 12px rgba(255, 93, 87, 0.16);
}

.synth-fx-rack {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(105, 167, 255, 0.24);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(105, 167, 255, 0.06), rgba(85, 240, 167, 0.04)),
    #111819;
}

.synth-fx-rack label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.synth-fx-rack span {
  overflow: hidden;
  color: #b8d6ff;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.synth-fx-rack input,
.synth-fx-rack select {
  width: 100%;
}

.synth-fx-rack input {
  accent-color: #69a7ff;
}

.synth-fx-rack select {
  min-height: 28px;
  border: 1px solid rgba(105, 167, 255, 0.42);
  border-radius: 6px;
  background: #070b0c;
  color: var(--text);
  font-weight: 900;
}

.machine-module input[type="range"].is-lfo-moving,
.synth-fx-rack input[type="range"].is-lfo-moving {
  accent-color: var(--amber);
  filter: drop-shadow(0 0 8px rgba(255, 200, 87, 0.28));
}

.synth-lfo-rack {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 200, 87, 0.24);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 200, 87, 0.07), rgba(105, 167, 255, 0.04)),
    #101617;
}

.synth-lfo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.synth-lfo-head strong {
  color: #ffc857;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.synth-lfo-head span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.synth-lfo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.synth-lfo-row {
  display: grid;
  grid-template-columns: 48px minmax(128px, 1fr) 78px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(143, 164, 158, 0.22);
  border-radius: 6px;
  background: rgba(7, 10, 11, 0.72);
}

.synth-lfo-row span {
  color: #ffc857;
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.synth-lfo-row select {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255, 200, 87, 0.24);
  border-radius: 4px;
  background: #070a0b;
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 850;
}

.synth-lfo-row input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 24px;
  accent-color: #ffc857;
}

.midi-editor {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 70px minmax(520px, 1fr);
  min-height: calc(430px * var(--midi-vzoom));
  border: 1px solid rgba(143, 164, 158, 0.28);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: auto;
  background: #070a0b;
}

.midi-editor.is-panning {
  cursor: grabbing;
  user-select: none;
}

.midi-editor.is-cutting,
.midi-editor.is-cutting .midi-note-block {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='none' stroke='%23ffc857' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M11 11 23 3M11 17l12 8M10 13.8l7.5.2'/%3E%3Ccircle cx='7' cy='10' r='4' fill='%23070a0b' stroke='%23ffc857' stroke-width='2.2'/%3E%3Ccircle cx='7' cy='18' r='4' fill='%23070a0b' stroke='%23ffc857' stroke-width='2.2'/%3E%3C/svg%3E") 7 14, crosshair;
}

.midi-grid-area {
  position: relative;
  display: grid;
  grid-template-rows: 28px minmax(calc(330px * var(--midi-vzoom)), 1fr) 70px;
  --midi-zoom: 1;
  min-width: max(520px, calc(100% * var(--midi-zoom)));
}

.midi-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ff1f73;
  box-shadow:
    0 0 0 1px rgba(255, 31, 115, 0.28),
    0 0 12px rgba(255, 31, 115, 0.72);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-1px);
  z-index: 8;
}

.midi-playhead.is-visible {
  opacity: 1;
}

.midi-playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #ff1f73;
  transform: translateX(-50%);
}

.midi-insert-line {
  position: absolute;
  top: 28px;
  bottom: 70px;
  width: 2px;
  background: #ffc857;
  box-shadow:
    0 0 0 1px rgba(255, 200, 87, 0.24),
    0 0 12px rgba(255, 200, 87, 0.58);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-1px);
  z-index: 7;
}

.midi-insert-line.is-visible {
  opacity: 0.95;
}

.midi-insert-line::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid #ffc857;
  transform: translateX(-50%);
}

.midi-ruler {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(143, 164, 158, 0.22);
  background: #111819;
}

.midi-ruler span {
  position: absolute;
  top: 12px;
  transform: translateX(4px);
  color: var(--amber);
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.midi-ruler span::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -12px;
  width: 1px;
  height: 28px;
  background: rgba(143, 164, 158, 0.28);
}

.midi-ruler span.is-bar {
  color: rgba(237, 248, 242, 0.92);
}

.midi-ruler span.is-bar::before {
  background: rgba(237, 248, 242, 0.48);
}

.midi-loop-range {
  position: absolute;
  top: 3px;
  height: 18px;
  border: 2px solid rgba(237, 248, 242, 0.88);
  border-radius: 3px;
  background: rgba(85, 240, 167, 0.08);
  cursor: grab;
  pointer-events: auto;
  z-index: 3;
}

.midi-loop-range:active {
  cursor: grabbing;
}

.midi-loop-handle {
  position: absolute;
  top: -2px;
  width: 9px;
  height: 18px;
  background: rgba(237, 248, 242, 0.9);
  cursor: ew-resize;
  z-index: 4;
}

.midi-loop-handle.is-start {
  left: -2px;
}

.midi-loop-handle.is-end {
  right: -2px;
}

.midi-keyboard {
  display: grid;
  grid-template-rows: repeat(49, 1fr);
  align-self: start;
  height: calc(330px * var(--midi-vzoom));
  margin-top: 28px;
  border-right: 1px solid rgba(143, 164, 158, 0.28);
}

.midi-key {
  display: flex;
  align-items: center;
  min-height: 7px;
  padding-left: 6px;
  border-bottom: 1px solid rgba(7, 10, 11, 0.7);
  background: #d9e7e1;
  color: #07100d;
  font-size: 0.52rem;
  font-weight: 950;
}

.midi-key.is-black {
  background: #161d1e;
  color: rgba(237, 248, 242, 0.68);
}

.piano-roll {
  position: relative;
  display: grid;
  grid-template-rows: repeat(49, 1fr);
  min-height: calc(330px * var(--midi-vzoom));
  --snap-width: 1.5625%;
  --bar-width: 25%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 200, 87, 0.18) 0 1px, transparent 1px var(--bar-width)),
    repeating-linear-gradient(90deg, rgba(85, 240, 167, 0.075) 0 1px, transparent 1px var(--snap-width)),
    #0a0f10;
}

.piano-row {
  min-height: 7px;
  border-bottom: 1px solid rgba(143, 164, 158, 0.09);
}

.midi-note-block {
  position: absolute;
  min-width: 22px;
  height: 2.05%;
  border: 1px solid rgba(85, 240, 167, 0.88);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(85, 240, 167, 0.78), rgba(30, 132, 82, 0.88));
  color: #06110b;
  cursor: pointer;
  overflow: hidden;
  font-size: 0.52rem;
  font-weight: 950;
  line-height: 1;
  text-align: left;
}

.midi-note-block.is-selected {
  border-color: rgba(255, 200, 87, 0.95);
  box-shadow: 0 0 10px rgba(255, 200, 87, 0.28);
}

.midi-selection-box {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(255, 200, 87, 0.86);
  background: rgba(255, 200, 87, 0.12);
  pointer-events: none;
}

.midi-note-resize {
  position: absolute;
  top: 0;
  right: 0;
  width: 7px;
  height: 100%;
  border-left: 1px solid rgba(6, 17, 11, 0.38);
  background: rgba(237, 248, 242, 0.32);
  cursor: ew-resize;
}

.velocity-lane {
  position: relative;
  min-height: 70px;
  border-top: 1px solid rgba(143, 164, 158, 0.22);
  --snap-width: 1.5625%;
  --bar-width: 25%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 200, 87, 0.16) 0 1px, transparent 1px var(--bar-width)),
    repeating-linear-gradient(90deg, rgba(255, 200, 87, 0.08) 0 1px, transparent 1px var(--snap-width)),
    #080c0d;
}

.velocity-lane::before {
  content: attr(data-label);
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 1;
  color: rgba(143, 164, 158, 0.72);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  pointer-events: none;
  text-transform: uppercase;
}

.velocity-bar {
  position: absolute;
  bottom: 0;
  min-width: 9px;
  width: 10px;
  border: 1px solid rgba(255, 200, 87, 0.75);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(255, 200, 87, 0.92), rgba(163, 107, 29, 0.86));
  cursor: ns-resize;
}

.velocity-bar::after {
  content: attr(data-value);
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  color: rgba(6, 17, 11, 0.86);
  font-size: 0.48rem;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
  text-shadow: none;
  writing-mode: vertical-rl;
}

.velocity-bar.is-selected {
  border-color: rgba(85, 240, 167, 0.9);
  background: linear-gradient(180deg, rgba(85, 240, 167, 0.9), rgba(30, 132, 82, 0.9));
}

.velocity-bar.controller-probability {
  border-color: rgba(255, 97, 97, 0.86);
  background: linear-gradient(180deg, rgba(255, 97, 97, 0.9), rgba(128, 31, 39, 0.9));
}

.velocity-bar.controller-duration {
  border-color: rgba(92, 184, 255, 0.86);
  background: linear-gradient(180deg, rgba(92, 184, 255, 0.9), rgba(28, 82, 138, 0.9));
}

.velocity-bar.controller-probability::after,
.velocity-bar.controller-duration::after {
  color: rgba(237, 248, 242, 0.88);
}

.midi-note-readout {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(85, 240, 167, 0.24);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(85, 240, 167, 0.1), rgba(5, 8, 9, 0.88));
  color: rgba(237, 248, 242, 0.82);
  font-size: 0.66rem;
  font-weight: 850;
  white-space: nowrap;
}

.midi-note-readout strong {
  color: var(--accent);
  font-weight: 950;
}

.midi-selected-note {
  color: #d8fff0;
}

.midi-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.pcm-drop-zone {
  min-width: 160px;
  border: 1px dashed rgba(85, 240, 167, 0.42);
  background:
    linear-gradient(180deg, rgba(85, 240, 167, 0.1), rgba(8, 10, 11, 0.8));
  cursor: pointer;
}

.pcm-drop-zone input {
  display: none;
}

.pcm-drop-zone strong {
  display: block;
  max-width: 150px;
  overflow: hidden;
  color: #d8fff0;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcm-drop-zone small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 850;
}

.pcm-drop-zone.is-dragging {
  border-color: rgba(255, 200, 87, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 200, 87, 0.2), rgba(8, 10, 11, 0.9));
  box-shadow: 0 0 16px rgba(255, 200, 87, 0.2);
}

.user-pcm-library {
  min-width: 180px;
}

.user-pcm-delete {
  min-width: 96px;
  border-color: rgba(255, 93, 87, 0.56);
  color: #ffc4c1;
  background:
    linear-gradient(180deg, rgba(255, 93, 87, 0.2), rgba(8, 10, 11, 0.9));
}

.panel-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kit-panel strong,
.project-panel strong {
  display: block;
  font-size: 0.92rem;
}

.memory-header,
.memory-main,
.memory-save,
.memory-browser,
.memory-status {
  min-width: 0;
}

.memory-header {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 74px;
  padding: 8px 10px;
  border: 1px solid rgba(143, 164, 158, 0.14);
  border-radius: 7px;
  background: rgba(5, 8, 9, 0.22);
}

.memory-header small {
  color: rgba(143, 164, 158, 0.78);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.25;
}

.memory-save {
  display: grid;
  align-content: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.memory-main {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(360px, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 74px;
  padding: 8px;
  border: 1px solid rgba(143, 164, 158, 0.14);
  border-radius: 7px;
  background: rgba(5, 8, 9, 0.18);
}

.memory-browser {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.memory-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74px;
  gap: 6px;
}

.kit-save-form,
.project-save-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 82px;
  gap: 8px;
  align-items: center;
}

.memory-spacer {
  min-height: 40px;
}

.kit-save-form input,
.kit-save-form button,
.kit-panel select,
.project-save-form input,
.project-save-form button,
.project-panel select,
.kit-load-button,
.kit-folder-button,
.project-folder-button,
.kit-export-button,
.kit-import-button,
.project-load-button,
.project-duplicate-button,
.sequence-export-button,
.project-delete-button,
.kit-delete-button {
  min-height: 40px;
  border: 1px solid rgba(143, 164, 158, 0.38);
  border-radius: 6px;
  background: #070a0b;
  color: var(--text);
  font-weight: 850;
}

.kit-save-form input,
.project-save-form input {
  min-width: 0;
  padding: 0 10px;
}

.kit-save-form button,
.project-save-form button,
.kit-load-button,
.kit-folder-button,
.project-folder-button,
.kit-export-button,
.kit-import-button,
.project-load-button,
.project-duplicate-button,
.sequence-export-button,
.project-delete-button,
.kit-delete-button {
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.memory-actions button {
  min-width: 0;
  padding: 0 8px;
  font-size: 0.72rem;
}

.memory-actions .project-duplicate-button {
  font-size: 0.72rem;
}

.kit-panel button:disabled,
.project-panel button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.38;
}

.kit-panel label,
.project-panel label {
  display: grid;
  gap: 5px;
}

.kit-panel label span,
.project-panel label span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kit-panel select,
.project-panel select {
  width: 100%;
  padding: 0 8px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.kit-panel select option,
.project-panel select option {
  font-size: 1.25rem;
  line-height: 1.65;
}

.length-input {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(143, 164, 158, 0.28);
  border-radius: 5px;
  background: #070a0b;
  color: var(--text);
  font-weight: 950;
  text-align: center;
}

.global-snapshot-panel {
  display: grid;
  grid-template-columns: var(--box-label-col) var(--box-main-col) var(--box-status-col);
  gap: var(--box-gap);
  align-items: center;
  margin-bottom: 12px;
  padding: var(--box-pad);
  border: 1px solid rgba(85, 240, 167, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(85, 240, 167, 0.08), transparent 42%),
    #161d1e;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.global-snapshot-panel > span {
  display: grid;
  align-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(85, 240, 167, 0.16);
  border-radius: 7px;
  background: rgba(5, 8, 9, 0.22);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.global-snapshot-slots {
  display: grid;
  grid-column: 2 / 4;
  grid-template-columns: repeat(8, minmax(28px, 1fr));
  gap: 5px;
  min-height: 44px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(143, 164, 158, 0.14);
  border-radius: 7px;
  background: rgba(5, 8, 9, 0.18);
}

.global-snapshot-slot {
  min-height: 30px;
  border: 1px solid rgba(143, 164, 158, 0.3);
  border-radius: 4px;
  background: #070a0b;
  color: rgba(143, 164, 158, 0.72);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 950;
}

.global-snapshot-slot.is-saved {
  border-color: rgba(85, 240, 167, 0.68);
  background: rgba(85, 240, 167, 0.12);
  color: var(--green);
  box-shadow: 0 0 8px rgba(85, 240, 167, 0.18);
}

.global-snapshot-slot.is-active,
.snapshot-slot.is-active {
  border-color: #fff0a8;
  background:
    linear-gradient(180deg, rgba(255, 226, 117, 0.48), rgba(255, 200, 87, 0.2)),
    rgba(255, 200, 87, 0.2);
  color: #fff7ca;
  outline: 2px solid rgba(255, 226, 117, 0.98);
  outline-offset: 2px;
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(255, 200, 87, 0.48),
    0 0 18px rgba(255, 200, 87, 0.48);
  text-shadow: 0 0 8px rgba(255, 247, 202, 0.58);
}

.global-snapshot-slot.is-previous:not(.is-active),
.snapshot-slot.is-previous:not(.is-active) {
  animation: previousSnapshotBlink 1.05s ease-in-out infinite;
  border-color: rgba(255, 200, 87, 0.74);
}

@keyframes previousSnapshotBlink {
  0%,
  100% {
    box-shadow: 0 0 7px rgba(255, 200, 87, 0.18);
    filter: brightness(1);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 200, 87, 0.34),
      0 0 14px rgba(255, 200, 87, 0.42);
    filter: brightness(1.45);
  }
}

.kit-load-button,
.project-load-button,
.kit-save-form button[type="submit"],
.project-save-form button[type="submit"] {
  border-color: rgba(255, 200, 87, 0.52);
  color: var(--amber);
}

.project-duplicate-button {
  border-color: rgba(105, 167, 255, 0.52);
  color: var(--blue);
}

.sequence-export-button {
  border-color: rgba(143, 164, 158, 0.5);
  color: #c7d8d3;
}

.project-delete-button,
.kit-delete-button {
  border-color: rgba(255, 96, 96, 0.56);
  color: #ffb0a8;
}

.kit-folder-button {
  border-color: rgba(143, 164, 158, 0.56);
  color: #c7d8d3;
}

.project-folder-button {
  border-color: rgba(143, 164, 158, 0.56);
  color: #c7d8d3;
}

.kit-export-button {
  border-color: rgba(105, 167, 255, 0.52);
  color: var(--blue);
}

.kit-import-button {
  border-color: rgba(85, 240, 167, 0.52);
  color: var(--green);
}

.kit-import-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.kit-status,
.project-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.memory-status {
  align-self: center;
  min-height: 74px;
  padding: 7px 8px;
  border: 1px solid rgba(143, 164, 158, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(85, 240, 167, 0.055), transparent),
    rgba(5, 8, 9, 0.48);
  color: rgba(143, 164, 158, 0.9);
  font-size: 0.66rem;
  line-height: 1.25;
  display: grid;
  align-content: center;
}

.sequencer-panel {
  padding: var(--box-pad);
  overflow-x: auto;
}

.sequencer-ruler,
.track-row {
  display: grid;
  grid-template-columns:
    var(--track-name-col)
    var(--track-switch-col)
    var(--track-tools-col)
    var(--track-steps-col)
    var(--track-snap-col)
    var(--track-length-col);
  gap: 8px;
  align-items: center;
  min-width: 1206px;
}

.sequencer-ruler {
  margin-bottom: 8px;
  padding: 0 12px 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.sequencer-ruler > span,
.sequencer-ruler .ruler-steps {
  min-height: 22px;
  padding: 5px 7px;
  border: 1px solid rgba(143, 164, 158, 0.12);
  border-radius: 5px;
  background: rgba(5, 8, 9, 0.18);
  color: rgba(143, 164, 158, 0.78);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.ruler-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.ruler-steps span {
  text-align: left;
}

.track-list {
  display: grid;
  gap: 8px;
}

.track-row {
  --track-color: var(--green);
  --track-color-rgb: 85, 240, 167;
  --track-color-dark: #1e563c;
  padding: 10px 12px;
  border: 1px solid rgba(var(--track-color-rgb), 0.2);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(var(--track-color-rgb), 0.08), transparent 38%),
    var(--strip);
}

.track-switches {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(2, 36px);
  gap: 5px;
  align-self: center;
  align-content: center;
  height: 77px;
  padding: 4px;
  border: 1px solid rgba(143, 164, 158, 0.12);
  border-radius: 6px;
  background: rgba(5, 8, 9, 0.2);
}

.track-toggle,
.module-toggle {
  min-height: 0;
  border: 1px solid rgba(143, 164, 158, 0.36);
  border-radius: 6px;
  background: #070a0b;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 950;
}

.module-toggle {
  min-width: 40px;
}

.mute-toggle {
  border-color: rgba(255, 200, 87, 0.36);
  background: rgba(255, 200, 87, 0.07);
  color: rgba(255, 200, 87, 0.72);
}

.mute-toggle.is-active {
  border-color: rgba(255, 200, 87, 0.92);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 235, 148, 0.28), transparent 72%),
    rgba(255, 200, 87, 0.2);
  color: #ffeaa0;
  box-shadow:
    inset 0 0 10px rgba(255, 200, 87, 0.16),
    0 0 12px rgba(255, 200, 87, 0.2);
}

.solo-toggle {
  border-color: rgba(255, 93, 87, 0.34);
  background: rgba(255, 93, 87, 0.07);
  color: rgba(255, 93, 87, 0.7);
}

.solo-toggle.is-active {
  border-color: rgba(255, 93, 87, 0.92);
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 150, 145, 0.28), transparent 72%),
    rgba(255, 93, 87, 0.2);
  color: #ffb0ad;
  box-shadow:
    inset 0 0 10px rgba(255, 93, 87, 0.16),
    0 0 12px rgba(255, 93, 87, 0.2);
}

.track-row.is-muted {
  opacity: 0.62;
}

.track-row.is-solo {
  border-color: rgba(255, 93, 87, 0.68);
}

.machine-module.is-muted {
  opacity: 0.66;
}

.machine-module.is-solo {
  border-color: rgba(255, 93, 87, 0.68);
}

.track-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  align-content: center;
  align-self: center;
  height: 77px;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(var(--track-color-rgb), 0.2);
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(var(--track-color-rgb), 0.13), transparent 68%),
    rgba(5, 8, 9, 0.22);
}

.track-head > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 4px 8px;
  align-items: center;
}

.track-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(var(--track-color-rgb), 0.58);
  border-radius: 6px;
  color: var(--track-color);
  font-size: 0.7rem;
  font-weight: 950;
}

.track-head strong {
  grid-column: 1;
  display: block;
  overflow: hidden;
  color: var(--track-color);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-head small {
  grid-column: 1;
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-color-control {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  align-items: center;
  justify-items: center;
  width: 62px;
  height: 100%;
  cursor: pointer;
}

.track-color-control input {
  width: 58px;
  height: 58px;
  padding: 0;
  border: 1px solid rgba(var(--track-color-rgb), 0.72);
  border-radius: 9px;
  background: transparent;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.42),
    0 0 10px rgba(var(--track-color-rgb), 0.18);
  cursor: pointer;
}

.track-color-control input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.track-color-control input::-webkit-color-swatch {
  border: 0;
  border-radius: 4px;
}

.track-head em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--amber);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.1;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.snare-fx-knob {
  --knob-angle: 0deg;
  --knob-level: 37.5%;
  display: grid;
  grid-template-areas:
    "dial"
    "label"
    "value";
  justify-items: center;
  gap: 2px;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: stretch;
  width: 42px;
  min-height: 77px;
  height: 77px;
  border: 1px solid rgba(255, 93, 87, 0.4);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 93, 87, 0.08), transparent),
    #070a0b;
  color: #ffb0ad;
  cursor: ns-resize;
  font: inherit;
  padding: 5px 4px;
}

.snare-fx-dial {
  grid-area: dial;
  position: relative;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background-image: url("assets/ui/knob-minimoog-main.png");
  background-repeat: no-repeat;
  background-position: 0 var(--knob-frame-y, -1400px);
  background-size: 28px 2828px;
  box-shadow: 0 0 0 1px rgba(255, 176, 173, 0.32);
}

.snare-fx-dial::before {
  display: none;
}

.snare-fx-dial::after {
  display: none;
}

.snare-fx-label {
  grid-area: label;
  color: var(--muted);
  font-size: 0.48rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.snare-fx-value {
  grid-area: value;
  color: #ffb0ad;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
}

.sample-tools {
  display: grid;
  grid-template-columns: 50px 42px 50px;
  grid-template-rows: repeat(3, 23px);
  gap: 4px 5px;
  align-self: stretch;
  align-items: stretch;
  align-content: center;
  min-width: 0;
  height: 77px;
  padding: 0;
}

.drum-tool-panel {
  display: grid;
  grid-template-columns: var(--box-label-col) minmax(780px, 2.52fr);
  gap: var(--box-gap);
  align-items: stretch;
  margin-bottom: 12px;
}

.drum-tool-group,
.drum-inspector {
  min-width: 0;
  border: 1px solid rgba(143, 164, 158, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 29, 31, 0.94), rgba(7, 10, 11, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.drum-tool-group {
  display: grid;
  grid-template-columns: minmax(86px, 0.7fr) minmax(118px, 1fr);
  gap: 8px 10px;
  align-content: center;
  align-items: end;
  padding: 10px;
}

.draw-grid-control,
.drum-density-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.draw-grid-control select {
  width: 100%;
}

.drum-density-control input {
  width: 100%;
}

.drum-density-control output {
  color: var(--amber);
  font-weight: 950;
}

.drum-tool-group .tool-hint,
.drum-tool-group .shortcut-hint {
  grid-column: 1 / -1;
}

.drum-inspector {
  display: grid;
  grid-template-columns: minmax(218px, 0.52fr) 54px minmax(330px, 1fr) 248px;
  grid-template-rows: 144px 50px;
  column-gap: 12px;
  row-gap: 8px;
  align-items: start;
  padding: 10px;
}

.tool-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tool-hint,
.inspector-track small {
  overflow: hidden;
  color: rgba(143, 164, 158, 0.86);
  font-size: 0.68rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-hint {
  overflow: hidden;
  border: 1px solid rgba(49, 246, 255, 0.22);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(49, 246, 255, 0.06), rgba(8, 10, 11, 0.76)),
    #070a0b;
  color: rgba(143, 164, 158, 0.9);
  font-size: 0.66rem;
  font-weight: 850;
}

.shortcut-hint summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 0 9px;
  color: var(--cyan);
  cursor: pointer;
  font-weight: 950;
  letter-spacing: 0.04em;
  list-style: none;
  text-transform: uppercase;
}

.shortcut-hint summary::-webkit-details-marker {
  display: none;
}

.shortcut-hint summary::after {
  content: "+";
  color: var(--amber);
  font-size: 0.88rem;
  line-height: 1;
}

.shortcut-hint[open] summary::after {
  content: "-";
}

.shortcut-hint div {
  display: grid;
  gap: 4px;
  padding: 0 9px 9px;
}

.shortcut-hint span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-hint[open] span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.drum-draw-quantize {
  min-height: 34px;
  border: 1px solid rgba(85, 240, 167, 0.34);
  border-radius: 6px;
  background: #070a0b;
  color: var(--green);
  font-weight: 900;
}

.inspector-track {
  --track-color: var(--green);
  --track-color-rgb: 85, 240, 167;
  --track-color-dark: #1e563c;
  grid-row: 1 / 3;
  align-self: stretch;
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  height: 202px;
  padding: 8px;
  border: 1px solid rgba(var(--track-color-rgb), 0.32);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(var(--track-color-rgb), 0.1), rgba(5, 8, 9, 0.26) 42%),
    rgba(5, 8, 9, 0.26);
  box-shadow:
    inset 3px 0 0 var(--track-color),
    0 0 16px rgba(var(--track-color-rgb), 0.08);
}

.inspector-track strong {
  overflow: hidden;
  color: var(--track-color);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drum-insert-rack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px 7px;
  padding: 7px;
  border: 1px solid rgba(105, 167, 255, 0.28);
  border-radius: 6px;
  background: rgba(5, 8, 9, 0.58);
}

.drum-insert-rack > .tool-label {
  grid-column: 1 / -1;
}

.drum-insert-rack label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.drum-insert-rack label span {
  color: rgba(143, 164, 158, 0.86);
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drum-insert-rack input {
  width: 100%;
  accent-color: var(--blue);
}

.drum-waveform {
  grid-column: 3;
  grid-row: 1;
  align-self: stretch;
  width: 100%;
  height: 144px;
  border: 1px solid rgba(105, 167, 255, 0.36);
  border-radius: 6px;
  background: #050809;
  cursor: grab;
  touch-action: none;
}

.drum-level-strip {
  --panel-pad-x: 12px;
  --panel-pad-y: 10px;
  --panel-gap: 8px;
  --module-h: 150px;
  --module-label-h: 14px;
  --meter-w: minmax(96px, 1fr);
  --level-w: 46px;
  --balance-w: 64px;
  position: relative;
  grid-column: 4;
  grid-row: 1 / 3;
  align-self: stretch;
  display: grid;
  grid-template-columns: var(--meter-w) var(--level-w) var(--balance-w);
  grid-template-rows: 18px 158px;
  gap: var(--panel-gap);
  align-items: start;
  align-content: start;
  justify-items: center;
  justify-content: center;
  height: 202px;
  min-height: 0;
  padding: var(--panel-pad-y) var(--panel-pad-x);
  border: 1px solid rgba(143, 164, 158, 0.34);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(237, 248, 242, 0.08), rgba(0, 0, 0, 0.18)),
    #141a1b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -12px 22px rgba(0, 0, 0, 0.22);
}

.drum-level-strip .tool-label {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: start;
  padding-left: 16px;
  text-align: left;
}

.hardware-panel {
  --panel-pad-x: 12px;
  --panel-pad-y: 10px;
  --panel-gap: 8px;
  --module-h: 150px;
  --module-label-h: 14px;
  --module-pad-x: 5px;
  --module-pad-y: 6px;
  --screw-size: 8px;
  --screw-inset: 7px;
  --control-gap: 8px;
}

.hardware-panel-title {
  line-height: 1;
}

.hardware-screw {
  position: absolute;
  z-index: 3;
  width: var(--screw-size);
  height: var(--screw-size);
  pointer-events: none;
}

.hardware-screw-tl {
  left: var(--screw-inset);
  top: var(--screw-inset);
}

.hardware-screw-tr {
  right: var(--screw-inset);
  top: var(--screw-inset);
}

.hardware-screw-bl {
  left: var(--screw-inset);
  bottom: var(--screw-inset);
}

.hardware-screw-br {
  right: var(--screw-inset);
  bottom: var(--screw-inset);
}

.hardware-module {
  display: grid;
  grid-template-rows: var(--module-label-h) minmax(0, 1fr);
  gap: var(--control-gap);
  align-items: center;
  justify-items: center;
  height: var(--module-h);
  min-height: var(--module-h);
  padding: var(--module-pad-y) var(--module-pad-x);
}

.hardware-module-label {
  grid-row: 1;
  align-self: start;
  line-height: 1;
}

.hardware-vu,
.hardware-knob {
  justify-self: center;
}

.plate-screw {
  position: absolute;
  z-index: 3;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(12, 15, 14, 0.94);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 0 41%, rgba(42, 48, 45, 0.9) 42% 58%, transparent 59%),
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.78), transparent 24%),
    radial-gradient(circle, #d6dccf 0 28%, #7d867e 29% 52%, #141817 53% 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.plate-screw-tl {
  left: 7px;
  top: 7px;
}

.plate-screw-tr {
  right: 7px;
  top: 7px;
}

.plate-screw-bl {
  left: 7px;
  bottom: 7px;
}

.plate-screw-br {
  right: 7px;
  bottom: 7px;
}

.mix-module {
  position: relative;
  z-index: 1;
  align-self: start;
  align-content: stretch;
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(143, 164, 158, 0.2);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(237, 248, 242, 0.045), rgba(0, 0, 0, 0.2)),
    rgba(5, 8, 9, 0.46);
}

.mix-module-label {
  color: rgba(143, 164, 158, 0.86);
  font-size: 0.52rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.meter-module {
  grid-column: 1;
  grid-row: 2;
  gap: 6px;
  padding-left: 8px;
  padding-right: 8px;
}

.vu-meter {
  --vu-frame-y: 0px;
  position: relative;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  display: block;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border: 1px solid rgba(230, 235, 226, 0.12);
  border-radius: 5px;
  background-image: url("assets/ui/vu-vintage.png");
  background-repeat: no-repeat;
  background-position: 0 var(--vu-frame-y);
  background-size: 78px 3978px;
  box-shadow:
    0 0 0 1px rgba(255, 238, 186, 0.08),
    0 0 0 3px #111716,
    0 0 0 4px rgba(238, 242, 226, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.48);
}

.vu-scale {
  display: none;
}

.vu-ticks {
  display: none;
}

.vu-ticks span {
  width: 1px;
  height: 11px;
  background: rgba(53, 35, 17, 0.72);
  transform-origin: bottom center;
}

.vu-ticks span:nth-child(1) {
  transform: rotate(-30deg);
}

.vu-ticks span:nth-child(2) {
  height: 8px;
  transform: rotate(-16deg);
}

.vu-ticks span:nth-child(4) {
  height: 8px;
  transform: rotate(16deg);
}

.vu-ticks span:nth-child(5) {
  transform: rotate(30deg);
}

.vu-arc {
  display: none;
}

.vu-arc::before,
.vu-arc::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 1px;
  height: 12px;
  background: rgba(53, 35, 17, 0.72);
  transform-origin: bottom center;
}

.vu-arc::before {
  left: 10px;
  transform: rotate(-24deg);
}

.vu-arc::after {
  right: 10px;
  transform: rotate(24deg);
}

.vu-needle {
  display: none;
}

.vu-pivot {
  display: none;
}

.drum-level-control {
  --level-thumb-y: 42px;
  position: relative;
  grid-column: 2;
  grid-row: 2;
  grid-template-rows: 14px minmax(0, 1fr);
  gap: 8px;
  cursor: default;
}

.drum-level-control::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 29px;
  z-index: 1;
  width: 20px;
  height: 108px;
  border: 0;
  border-radius: 4px;
  background-image: url("assets/ui/fader-v-body.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 108px;
  box-shadow:
    0 0 0 1px rgba(230, 235, 226, 0.08),
    0 4px 9px rgba(0, 0, 0, 0.34);
  pointer-events: none;
  transform: translateX(-50%);
}

.drum-level-control::after {
  content: "";
  position: absolute;
  left: 50%;
  top: var(--level-thumb-y);
  z-index: 2;
  width: 28px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background-image: url("assets/ui/fader-v-cap.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px 24px;
  box-shadow:
    0 4px 9px rgba(0, 0, 0, 0.54),
    0 0 0 1px rgba(238, 242, 226, 0.08);
  pointer-events: none;
  transform: translateX(-50%);
}

#drumLevelInput {
  position: relative;
  z-index: 3;
  justify-self: center;
  width: 34px;
  height: 116px;
  margin: 0;
  accent-color: var(--green);
  align-self: center;
  direction: rtl;
  writing-mode: vertical-lr;
  opacity: 0;
  appearance: slider-vertical;
}

#drumLevelInput::-webkit-slider-runnable-track {
  width: 34px;
  height: 116px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#drumLevelInput::-webkit-slider-thumb {
  width: 34px;
  height: 116px;
  border: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
}

#drumLevelInput::-moz-range-track {
  width: 34px;
  height: 116px;
  border: 0;
  background: transparent;
}

#drumLevelInput::-moz-range-thumb {
  width: 34px;
  height: 116px;
  border: 0;
  background: transparent;
}

#drumLevelValue {
  display: none;
}

.drum-inspector-play {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  margin-right: 0;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(85, 240, 167, 0.55);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.2), transparent 58%),
    linear-gradient(180deg, rgba(85, 240, 167, 0.34), rgba(7, 10, 11, 0.92));
  color: var(--green);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 950;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 16px rgba(85, 240, 167, 0.12);
}

.drum-inspector-play:hover {
  border-color: var(--green);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 22px rgba(85, 240, 167, 0.22);
}

.drum-lfo-matrix {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  display: none;
  gap: 4px;
  justify-items: center;
  min-width: 0;
  padding: 5px 4px;
  border: 1px solid rgba(105, 167, 255, 0.28);
  border-radius: 6px;
  background: rgba(5, 8, 9, 0.58);
}

.drum-lfo-matrix .tool-label {
  font-size: 0.52rem;
  line-height: 1;
}

.drum-lfo-knob {
  --knob-level: 0%;
  --knob-frame-y: 0px;
  width: 34px;
  height: 34px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background-image: url("assets/ui/knob-minimoog-main.png");
  background-repeat: no-repeat;
  background-position: 0 var(--knob-frame-y);
  background-size: 34px 3434px;
  box-shadow: 0 0 0 1px rgba(105, 167, 255, 0.34);
  cursor: ns-resize;
  appearance: none;
}

.drum-lfo-knob::-webkit-slider-runnable-track {
  width: 34px;
  height: 34px;
  background: transparent;
}

.drum-lfo-knob::-webkit-slider-thumb {
  width: 34px;
  height: 34px;
  margin-top: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  appearance: none;
}

.drum-lfo-knob::-moz-range-track {
  background: transparent;
}

.drum-lfo-knob::-moz-range-thumb {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

body[data-ui-mode="hardware"] .drum-lfo-knob {
  box-shadow:
    0 0 0 1px rgba(238, 242, 226, 0.16),
    0 7px 12px rgba(0, 0, 0, 0.5);
}

.drum-lfo-matrix select {
  width: 100%;
  min-height: 24px;
  border: 1px solid rgba(105, 167, 255, 0.32);
  border-radius: 4px;
  background: #070a0b;
  color: #cfe2ff;
  font-size: 0.55rem;
  font-weight: 900;
}

.drum-envelope-readout {
  grid-column: 3;
  grid-row: 2;
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  gap: 6px;
  align-items: center;
  align-content: center;
  align-self: stretch;
  height: 50px;
  min-height: 0;
  margin-top: 0;
  padding: 5px 8px;
  border: 1px solid rgba(255, 200, 87, 0.26);
  border-radius: 6px;
  background: rgba(5, 8, 9, 0.58);
}

.drum-envelope-readout strong {
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.35;
}

.drum-curve-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.drum-curve-toggle button {
  min-height: 24px;
  border: 1px solid rgba(255, 200, 87, 0.28);
  border-radius: 4px;
  background: rgba(7, 10, 11, 0.84);
  color: rgba(255, 200, 87, 0.72);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 950;
}

.drum-curve-toggle button.is-active {
  border-color: var(--amber);
  background: rgba(255, 200, 87, 0.2);
  color: var(--amber);
  box-shadow: 0 0 12px rgba(255, 200, 87, 0.12);
}

.drum-balance-control {
  --balance-frame-y: -3200px;
  position: relative;
  grid-column: 3;
  grid-row: 2;
  grid-template-rows: 14px 18px 58px;
  gap: 8px;
  align-content: start;
  align-items: center;
  justify-items: center;
  margin: 0;
  padding: 6px 7px 8px;
  cursor: default;
}

.balance-knob-sprite {
  grid-column: 1;
  grid-row: 3;
  position: relative;
  z-index: 3;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-image: url("assets/ui/knob-minimoog-main.png");
  background-repeat: no-repeat;
  background-size: 52px 5252px;
  background-position: 0 var(--balance-frame-y);
  box-shadow:
    0 0 0 1px rgba(230, 235, 226, 0.14),
    0 8px 12px rgba(0, 0, 0, 0.48);
  pointer-events: none;
}

.balance-knob-sprite::after {
  content: "";
  position: absolute;
  inset: 4px 7px auto;
  height: 10px;
  border-top: 1px solid rgba(238, 242, 226, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.balance-scale {
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-self: center;
  width: 50px;
  color: rgba(85, 240, 167, 0.84);
  font-family: "Courier New", monospace;
  font-size: 0.6rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.drum-balance-control input {
  grid-column: 1;
  grid-row: 3;
  position: relative;
  z-index: 5;
  align-self: center;
  justify-self: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: ns-resize;
  opacity: 0;
  appearance: none;
}

.drum-balance-control input::-webkit-slider-runnable-track {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
}

.drum-balance-control input::-webkit-slider-thumb {
  width: 48px;
  height: 48px;
  margin-top: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  appearance: none;
}

.drum-balance-control input::-moz-range-track {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
}

.drum-balance-control input::-moz-range-thumb {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.drum-balance-control output {
  display: none;
}

body[data-ui-mode="hardware"] .drum-balance-control {
  border-color: rgba(230, 235, 226, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.24)),
    #0a0d0d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.55);
}

body[data-ui-mode="hardware"] .balance-center-mark,
body[data-ui-mode="hardware"] .balance-edge-row {
  color: rgba(230, 235, 226, 0.82);
}

body[data-ui-mode="hardware"] .drum-balance-control input {
  border-color: rgba(238, 242, 226, 0.42);
}

body[data-ui-mode="hardware"] .drum-balance-control input::-webkit-slider-runnable-track {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

body[data-ui-mode="hardware"] .drum-balance-control input::-webkit-slider-thumb {
  width: 46px;
  height: 46px;
  margin-top: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  appearance: none;
}

body[data-ui-mode="hardware"] .drum-balance-control input::-moz-range-track {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

body[data-ui-mode="hardware"] .drum-balance-control input::-moz-range-thumb {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.generate-sample,
.clear-sequence,
.clear-automation {
  grid-column: 3;
}

.sample-drop {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  grid-row: 1 / 4;
  height: 77px;
  min-height: 0;
  margin: 0;
  padding: 0 5px;
  border: 1px dashed rgba(85, 240, 167, 0.42);
  border-radius: 6px;
  background: rgba(5, 8, 9, 0.72);
  color: var(--green);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
}

.generate-sample,
.clear-sequence,
.clear-automation {
  position: relative;
  min-width: 0;
  min-height: 23px;
  height: 23px;
  padding: 0 4px;
  border: 1px solid rgba(255, 200, 87, 0.52);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 200, 87, 0.24), rgba(8, 10, 11, 0.9));
  color: var(--amber);
  cursor: pointer;
  font-size: 0.49rem;
  font-weight: 950;
}

.generate-sample:hover {
  border-color: var(--amber);
  background-color: rgba(255, 200, 87, 0.12);
}

.clear-sequence {
  border-color: rgba(255, 93, 87, 0.64);
  background:
    linear-gradient(180deg, rgba(255, 93, 87, 0.28), rgba(8, 10, 11, 0.9));
  color: #ffc4c1;
}

.clear-sequence:hover {
  border-color: var(--red);
  background-color: rgba(255, 93, 87, 0.12);
}

.clear-automation {
  border-color: rgba(49, 246, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(49, 246, 255, 0.2), rgba(8, 10, 11, 0.9));
  color: #b9fbff;
}

.clear-automation:hover {
  border-color: var(--cyan);
  background-color: rgba(49, 246, 255, 0.12);
}

.clear-automation.has-undo {
  border-color: rgba(85, 240, 167, 0.82);
  color: #ddfff0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 11px rgba(85, 240, 167, 0.22);
}


.sample-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.sample-drop span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.sample-drop.is-dragging {
  border-color: var(--green);
  background: rgba(85, 240, 167, 0.12);
}

.has-sample .sample-drop {
  border-style: solid;
  border-color: rgba(105, 167, 255, 0.72);
  color: var(--blue);
  line-height: 1;
  box-shadow: inset 0 0 14px rgba(105, 167, 255, 0.1);
}

.has-sample .sample-drop span {
  font-size: 0;
}

.has-sample .sample-drop span::before {
  content: "\2713";
  color: var(--blue);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1;
}

.step-stack {
  display: grid;
  grid-template-rows: 52px 18px;
  gap: 7px;
  align-self: center;
  height: 77px;
  min-width: 0;
  overflow: visible;
}

.steps {
  display: grid;
  grid-template-columns: repeat(16, minmax(26px, 1fr));
  gap: 5px;
  overflow: visible;
}

.triplet-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 0 1px 2px;
}

.triplet-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.triplet-step {
  min-height: 18px;
  border: 1px solid rgba(105, 167, 255, 0.24);
  border-radius: 3px;
  background: rgba(7, 10, 11, 0.94);
  cursor: pointer;
  padding: 0;
}

.triplet-step::before {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  margin: 5px auto 0;
  border-radius: 50%;
  background: rgba(105, 167, 255, 0.42);
}

.triplet-step.is-active {
  border-color: var(--green);
  background: linear-gradient(180deg, #7dffbd, #28c87c);
  box-shadow: 0 0 10px rgba(85, 240, 167, 0.32);
}

.triplet-step.is-active::before {
  background: #06110b;
}

.triplet-step.is-current {
  outline: none;
}

.triplet-step.is-disabled {
  cursor: not-allowed;
  opacity: 0.18;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(143, 164, 158, 0.06),
      rgba(143, 164, 158, 0.06) 3px,
      rgba(0, 0, 0, 0.12) 3px,
      rgba(0, 0, 0, 0.12) 6px
    ),
    #070a0b;
}

.step.is-reference,
.triplet-step.is-reference {
  border-style: dashed;
}

.step.is-reference::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 2px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 200, 87, 0.12);
}

.track-snapshots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  align-self: stretch;
  align-content: center;
  padding: 5px 4px;
  border: 1px solid rgba(143, 164, 158, 0.12);
  border-radius: 6px;
  background: rgba(5, 8, 9, 0.2);
}

.synth-snapshots {
  grid-column: 1 / -1;
  justify-self: end;
  width: min(320px, 100%);
}

.snapshot-slot {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid rgba(143, 164, 158, 0.3);
  border-radius: 4px;
  background: #070a0b;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 950;
}

.snapshot-slot.is-saved {
  border-color: rgba(85, 240, 167, 0.68);
  background: rgba(85, 240, 167, 0.12);
  color: var(--green);
  box-shadow: 0 0 8px rgba(85, 240, 167, 0.18);
}

.snapshot-slot.is-active {
  border-color: #fff0a8;
  background:
    linear-gradient(180deg, rgba(255, 226, 117, 0.48), rgba(255, 200, 87, 0.2)),
    rgba(255, 200, 87, 0.2);
  color: #fff7ca;
  outline: 2px solid rgba(255, 226, 117, 0.98);
  outline-offset: 2px;
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(255, 200, 87, 0.48),
    0 0 18px rgba(255, 200, 87, 0.48);
  text-shadow: 0 0 8px rgba(255, 247, 202, 0.58);
}

.step {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 26px;
  align-self: center;
  margin: 0;
  border: 1px solid rgba(143, 164, 158, 0.22);
  border-radius: 3px;
  background: #070a0b;
  cursor: pointer;
  padding: 0;
}

.step[data-ratchet-label]:not([data-ratchet-label=""])::after {
  content: attr(data-ratchet-label);
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  color: var(--amber);
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 6px rgba(255, 200, 87, 0.6);
}

.step[data-ratchet-mode="triple"]::after {
  color: #69a7ff;
  text-shadow: 0 0 6px rgba(105, 167, 255, 0.65);
}

.step[data-ratchet-mode="pitch-up"]::after {
  color: #55f0a7;
  text-shadow: 0 0 6px rgba(85, 240, 167, 0.65);
}

.step[data-ratchet-mode="pitch-down"]::after {
  color: #ff8c87;
  text-shadow: 0 0 6px rgba(255, 93, 87, 0.62);
}

.step[data-pitch]::before {
  content: attr(data-pitch-label);
  position: absolute;
  left: 50%;
  top: -15px;
  transform: translateX(-50%);
  color: rgba(143, 164, 158, 0.74);
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
}

.step[data-pitch^="-"] {
  box-shadow: inset 0 0 0 1px rgba(255, 93, 87, 0.52);
}

.step[data-pitch^="-"]::before {
  color: #ffaaa6;
}

.step[data-pitch="1"],
.step[data-pitch="2"],
.step[data-pitch="3"],
.step[data-pitch="4"],
.step[data-pitch="5"],
.step[data-pitch="6"],
.step[data-pitch="7"],
.step[data-pitch="8"],
.step[data-pitch="9"],
.step[data-pitch="10"],
.step[data-pitch="11"],
.step[data-pitch="12"] {
  box-shadow: inset 0 0 0 1px rgba(105, 167, 255, 0.56);
}

.step[data-pitch="1"]::before,
.step[data-pitch="2"]::before,
.step[data-pitch="3"]::before,
.step[data-pitch="4"]::before,
.step[data-pitch="5"]::before,
.step[data-pitch="6"]::before,
.step[data-pitch="7"]::before,
.step[data-pitch="8"]::before,
.step[data-pitch="9"]::before,
.step[data-pitch="10"]::before,
.step[data-pitch="11"]::before,
.step[data-pitch="12"]::before {
  color: #a9cfff;
}

.step[data-pitch="0"]::before {
  content: "";
}

.step.is-active[data-velocity]::before {
  content: attr(data-velocity-label);
  position: absolute;
  left: 50%;
  top: -15px;
  transform: translateX(-50%);
  color: #ffeaa0;
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 6px rgba(255, 200, 87, 0.64);
}

.step.is-active[data-velocity="25"]::before,
.step.is-active[data-velocity="30"]::before,
.step.is-active[data-velocity="35"]::before,
.step.is-active[data-velocity="40"]::before,
.step.is-active[data-velocity="45"]::before,
.step.is-active[data-velocity="50"]::before,
.step.is-active[data-velocity="55"]::before,
.step.is-active[data-velocity="60"]::before,
.step.is-active[data-velocity="65"]::before,
.step.is-active[data-velocity="70"]::before,
.step.is-active[data-velocity="75"]::before,
.step.is-active[data-velocity="80"]::before,
.step.is-active[data-velocity="85"]::before,
.step.is-active[data-velocity="90"]::before,
.step.is-active[data-velocity="95"]::before {
  color: #8fa49e;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
}

.track-row[data-track="2"] .step.is-active[data-snare-label]::before {
  content: attr(data-snare-label);
  top: -16px;
  color: #ffeaa0;
  font-size: 0.58rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.step[data-flam="true"]::after {
  content: "F";
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  color: #ffb0ad;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 6px rgba(255, 93, 87, 0.66);
}

.step[data-flam="true"] {
  box-shadow: inset 0 0 0 1px rgba(255, 93, 87, 0.56);
}

.step[data-snare-roll="2"]::after,
.step[data-snare-roll="3"]::after,
.step[data-snare-roll="4"]::after,
.step[data-snare-roll="5"]::after,
.step[data-snare-roll="6"]::after {
  content: "R" attr(data-snare-roll);
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  color: #ffb0ad;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 6px rgba(255, 93, 87, 0.66);
}

.step[data-snare-roll="2"],
.step[data-snare-roll="3"],
.step[data-snare-roll="4"],
.step[data-snare-roll="5"],
.step[data-snare-roll="6"] {
  box-shadow: inset 0 0 0 1px rgba(255, 93, 87, 0.56);
}

.step:nth-child(4n+1) {
  border-color: rgba(255, 200, 87, 0.34);
}

.step:nth-child(16n+1) {
  border-color: rgba(105, 167, 255, 0.5);
}

.step.is-active {
  background: linear-gradient(180deg, #7dffbd, #28c87c);
  border-color: var(--green);
  box-shadow: 0 0 10px rgba(85, 240, 167, 0.32);
}

.track-row .step.is-active,
.track-row .triplet-step.is-active,
body[data-ui-mode="hardware"] .track-row .step.is-active,
body[data-ui-mode="hardware"] .track-row .triplet-step.is-active {
  border-color: var(--track-color);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.34), transparent 45%),
    linear-gradient(180deg, var(--track-color), var(--track-color-dark));
  box-shadow:
    0 0 11px rgba(var(--track-color-rgb), 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.step.is-current {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.step.is-disabled {
  cursor: not-allowed;
  opacity: 0.22;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(143, 164, 158, 0.08),
      rgba(143, 164, 158, 0.08) 4px,
      rgba(0, 0, 0, 0.12) 4px,
      rgba(0, 0, 0, 0.12) 8px
    ),
    #070a0b;
}

.row-controls label {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.row-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-self: stretch;
  align-items: start;
  align-content: center;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(143, 164, 158, 0.12);
  border-radius: 6px;
  background: rgba(5, 8, 9, 0.2);
}

.length-input {
  width: 100%;
  min-height: 24px;
  padding: 0 6px;
  border: 1px solid rgba(143, 164, 158, 0.38);
  border-radius: 6px;
  background: #070a0b;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
}

.length-control {
  display: grid;
  grid-template-columns: 32px 116px;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

.length-quick-buttons {
  display: grid;
  grid-template-columns: repeat(5, 20px);
  gap: 4px;
  justify-content: start;
}

.length-quick-buttons button {
  min-width: 20px;
  min-height: 24px;
  padding: 0;
  border: 1px solid rgba(143, 164, 158, 0.42);
  border-radius: 4px;
  background: rgba(5, 8, 9, 0.9);
  color: rgba(237, 248, 242, 0.84);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
}

.length-quick-buttons button:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.row-controls span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.track-row.is-selected {
  border-color: rgba(var(--track-color-rgb), 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(var(--track-color-rgb), 0.16),
    0 0 20px rgba(var(--track-color-rgb), 0.08);
}

.track-list .track-row .step.is-active,
.track-list .track-row .triplet-step.is-active,
body[data-ui-mode="hardware"] .track-list .track-row:nth-child(n) .step.is-active,
body[data-ui-mode="hardware"] .track-list .track-row:nth-child(n) .triplet-step.is-active {
  border-color: var(--track-color) !important;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.34), transparent 45%),
    linear-gradient(180deg, var(--track-color), var(--track-color-dark)) !important;
  box-shadow:
    0 0 11px rgba(var(--track-color-rgb), 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

@media (max-width: 820px) {
  body {
    overflow-x: hidden;
  }

  .mobile-support-lock {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    align-content: center;
    gap: 1rem;
    padding: 2rem;
    background:
      radial-gradient(circle at 50% 0%, rgba(85, 240, 167, 0.14), transparent 18rem),
      linear-gradient(135deg, #141819, #050606 65%);
  }

  .mobile-support-lock h1 {
    max-width: 12ch;
    margin: 0;
    color: var(--text);
    font-size: clamp(2.4rem, 15vw, 4.4rem);
    line-height: 0.95;
  }

  .mobile-support-lock p:not(.eyebrow) {
    max-width: 32rem;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
  }

  .app-shell {
    display: none;
  }

  .machine-header {
    grid-template-columns: 1fr;
  }

  .module-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .module-nav-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bass-module,
  .machine-module {
    grid-template-columns: 1fr;
  }

  .bass-controls {
    grid-template-columns: repeat(2, 1fr);
  }

  .kit-panel,
  .project-panel {
    grid-template-columns: 1fr;
  }

  .kit-save-form,
  .project-save-form {
    grid-template-columns: 1fr;
  }

  .midi-transform-panel {
    grid-template-columns: 1fr;
  }

  .transport {
    flex-wrap: wrap;
  }

  .drum-tool-panel,
  .drum-inspector {
    grid-template-columns: 1fr;
  }

  .drum-waveform,
  .drum-envelope-readout,
  .drum-level-strip,
  .drum-balance-control {
    grid-column: auto;
    grid-row: auto;
  }

  .track-row {
    grid-template-columns: minmax(120px, 0.9fr) auto minmax(118px, 0.9fr) minmax(260px, 2fr) minmax(54px, 0.35fr) minmax(82px, 0.55fr);
  }
}

select {
  font-size: 0.95rem;
}

select option {
  font-size: 1.25rem;
  line-height: 1.65;
}
