:root {
  color-scheme: dark;
  --bg: #101211;
  --panel: #191d1b;
  --panel-2: #121615;
  --ink: #f4efe5;
  --muted: #aeb8b4;
  --line: rgba(244, 239, 229, .16);
  --accent: #e0b963;
  --accent-2: #71b7a8;
  --danger: #d77b6f;
  --solo: #56a8ff;
  --hardware: #171819;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    linear-gradient(120deg, rgba(113, 183, 168, .14), transparent 36%),
    linear-gradient(220deg, rgba(224, 185, 99, .13), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(16px, 4vw, 44px);
  background: rgba(16, 18, 17, .84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  color: inherit;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}

.header-note,
.eyebrow {
  color: var(--accent-2);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.sequencer-shell {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 20px clamp(10px, 2.4vw, 28px) 32px;
}

.top-deck {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.hero {
  max-width: 980px;
  margin-bottom: 0;
}

.hero--instrument {
  max-width: fit-content;
}

.instrument-badge {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  width: min(440px, 100%);
  padding: 13px 18px 12px;
  overflow: hidden;
  color: rgba(120, 255, 230, .94);
  font-family: "Courier New", ui-monospace, monospace;
  background:
    radial-gradient(circle at 18% 20%, rgba(120, 255, 230, .16), transparent 28%),
    linear-gradient(180deg, #09221f, #020807 72%, #010403);
  border: 1px solid rgba(120, 255, 230, .24);
  border-radius: 10px;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, .34),
    0 0 28px rgba(40, 220, 190, .12),
    inset 0 1px 0 rgba(160, 255, 240, .12),
    inset 0 -1px 4px rgba(0, 0, 0, .95),
    inset 0 0 22px rgba(0, 0, 0, .82);
}

.instrument-badge::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(120, 255, 230, .1);
  border-radius: 7px;
  pointer-events: none;
}

.instrument-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(180, 255, 245, .035) 50%, rgba(0, 0, 0, .035) 50%),
    linear-gradient(90deg, transparent, rgba(180, 255, 245, .08), transparent);
  background-size: 100% 4px, 100% 100%;
  mix-blend-mode: screen;
  opacity: .75;
  pointer-events: none;
}

.instrument-badge__label,
.instrument-badge__status {
  position: relative;
  z-index: 1;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .7;
}

h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(120, 255, 230, .98);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-weight: 900;
  line-height: .9;
  letter-spacing: .04em;
  text-shadow:
    0 0 3px rgba(180, 255, 245, .95),
    0 0 10px rgba(120, 255, 230, .72),
    0 0 26px rgba(40, 220, 190, .35);
}

.instrument-badge__maker {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 217, 95, .9);
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-shadow: 0 0 12px rgba(255, 190, 35, .22);
}

.instrument-badge__status {
  color: rgba(120, 255, 230, .66);
  font-size: .62rem;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #111614;
  color: var(--ink);
}

button {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .9);
  box-shadow:
    0 3px 0 #020202,
    0 8px 12px rgba(0, 0, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .1),
    inset 0 -1px 0 rgba(0, 0, 0, 1);
}

button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(113, 183, 168, .72);
  outline-offset: 2px;
}

.transport-button { background: rgba(113, 183, 168, .12); }

.transport-button--play.is-active {
  color: #86ff9d;
  border-color: rgba(90, 255, 130, .56);
  background: linear-gradient(180deg, rgba(58, 120, 70, .55), rgba(12, 38, 18, .92));
  box-shadow:
    0 3px 0 #021204,
    0 9px 14px rgba(0, 0, 0, .45),
    0 0 16px rgba(88, 255, 126, .36),
    inset 0 0 0 1px rgba(105, 255, 145, .42),
    inset 0 1px 0 rgba(255, 255, 255, .16);
}

.transport-button--stop.is-active {
  color: #ff8e87;
  border-color: rgba(255, 90, 80, .58);
  background: linear-gradient(180deg, rgba(118, 34, 30, .64), rgba(38, 5, 4, .94));
  box-shadow:
    0 3px 0 #160202,
    0 9px 14px rgba(0, 0, 0, .45),
    0 0 16px rgba(255, 70, 55, .34),
    inset 0 0 0 1px rgba(255, 90, 80, .45),
    inset 0 1px 0 rgba(255, 255, 255, .14);
}

.export-button--all,
.export-lane {
  color: #ff8e87;
  border-color: rgba(255, 90, 80, .4);
  box-shadow:
    0 3px 0 #160202,
    0 8px 13px rgba(0, 0, 0, .42),
    0 0 12px rgba(255, 70, 55, .2),
    inset 0 0 0 1px rgba(255, 90, 80, .42),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

.export-button--all,
.export-button--solo {
  min-height: 44px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.export-button--solo {
  color: #8fc8ff;
  border-color: rgba(86, 168, 255, .44);
  box-shadow:
    0 3px 0 #020916,
    0 8px 13px rgba(0, 0, 0, .42),
    0 0 12px rgba(86, 168, 255, .24),
    inset 0 0 0 1px rgba(86, 168, 255, .5),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(104px, auto) 66px repeat(5, minmax(56px, auto));
  gap: 8px;
  align-content: start;
  align-items: end;
  min-width: 0;
  padding: 12px;
  margin-bottom: 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(120, 255, 230, .08), transparent 34%),
    linear-gradient(180deg, #1b1d1d, #0a0d0c);
  border: 1px solid rgba(120, 255, 230, .14);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    inset 0 -1px 0 rgba(0, 0, 0, .95),
    0 16px 34px rgba(0, 0, 0, .28);
}

.toolbar button,
.toolbar input,
.toolbar select {
  min-height: 36px;
}

.toolbar button {
  padding: 7px 8px;
}

.toolbar .export-button--all,
.toolbar .export-button--solo {
  min-height: 36px;
  padding-inline: 8px;
  font-size: .72rem;
  white-space: nowrap;
}

.toolbar #export-all {
  grid-column: 1 / span 3;
}

.toolbar #export-solo {
  grid-column: 4 / span 3;
}

.field { display: grid; gap: 4px; }

.field span,
.lane-control span,
.editor label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.field--wide { min-width: 0; }
.field--short { width: auto; }

select,
input {
  width: 100%;
  padding: 9px;
}

.status {
  grid-column: 7 / -1;
  align-self: stretch;
  min-height: 36px;
  margin: 0;
  padding: 6px 9px;
  overflow: hidden;
  color: rgba(120, 255, 230, .72);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: .74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  background:
    linear-gradient(180deg, rgba(5, 18, 16, .92), rgba(1, 6, 5, .95));
  border: 1px solid rgba(120, 255, 230, .14);
  border-radius: 7px;
  text-shadow: 0 0 8px rgba(40, 220, 190, .24);
}

.performance-deck {
  display: grid;
  grid-template-columns: max-content minmax(300px, 380px);
  gap: 12px;
  align-items: start;
}

.grid-panel,
.editor {
  background: linear-gradient(180deg, rgba(24, 26, 26, .96), rgba(13, 15, 14, .98));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    inset 0 -1px 0 rgba(0, 0, 0, .9),
    0 20px 60px rgba(0, 0, 0, .24);
}

.grid-panel {
  overflow-x: auto;
  overflow-y: hidden;
  width: fit-content;
  max-width: 100%;
  padding: 8px;
  background:
    radial-gradient(circle at 14% 8%, rgba(40, 210, 190, .08), transparent 28%),
    linear-gradient(180deg, rgba(20, 24, 23, .98), rgba(9, 11, 10, .98));
  border-color: rgba(120, 255, 230, .14);
}

.step-numbers { display: none; }

.lane-row {
  display: grid;
  grid-template-columns: 190px max-content;
  gap: 6px;
  width: fit-content;
  min-width: 0;
  margin-bottom: 6px;
  align-items: stretch;
  padding: 6px;
  border: 1px solid rgba(120, 255, 230, .09);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(18, 22, 21, .84), rgba(9, 10, 10, .88));
  box-shadow:
    inset 0 1px 0 rgba(160, 255, 240, .05),
    inset 0 -1px 2px rgba(0, 0, 0, .72);
}

.lane-control {
  display: grid;
  grid-template-columns: 96px 1fr;
  grid-template-areas:
    "name name"
    "route actions";
  gap: 4px;
  align-content: start;
  padding: 5px;
  background: linear-gradient(180deg, #161918, #0c100f);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .05),
    inset 0 -1px 0 rgba(0, 0, 0, .95);
}

.lane-control.is-muted { box-shadow: inset 3px 0 0 rgba(215, 70, 70, .75), inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 -1px 0 rgba(0, 0, 0, .95); }
.lane-control.is-solo { box-shadow: inset 3px 0 0 rgba(86, 168, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 -1px 0 rgba(0, 0, 0, .95); }
.lane-control label { display: grid; gap: 2px; }
.lane-control .lane-name {
  grid-area: name;
}
.lane-control .lane-name span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.lane-route {
  grid-area: route;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 3px;
}
.lane-control input,
.lane-control select {
  min-height: 25px;
  padding: 3px 6px;
  font-size: .76rem;
}

.lane-name input {
  font-weight: 800;
}

.lane-route span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.lane-control .lane-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
  align-items: center;
}

.lane-control .lane-actions label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: .78rem;
}

.lane-button,
.hardware-button {
  min-width: 0;
  min-height: 25px;
  padding: 4px 5px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #303030 0%, #151515 38%, #050505 100%);
  color: rgba(245, 245, 245, .72);
  font-size: .58rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  box-shadow:
    0 3px 0 #020202,
    0 7px 10px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -1px 0 rgba(0, 0, 0, 1);
}

.lane-button--mute.is-on {
  color: #ff8e87;
  box-shadow:
    0 3px 0 #160202,
    0 0 12px rgba(255, 70, 55, .42),
    inset 0 0 0 2px rgba(255, 90, 80, .72),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

.lane-button--solo.is-on {
  color: #8fc8ff;
  box-shadow:
    0 3px 0 #020916,
    0 0 12px rgba(86, 168, 255, .48),
    inset 0 0 0 2px rgba(86, 168, 255, .76),
    inset 0 1px 0 rgba(255, 255, 255, .12);
}

.lane-control .export-lane {
  color: #ff8e87;
  letter-spacing: .04em;
}

.note-name {
  align-self: center;
  color: var(--accent-2);
  font-size: .72rem;
  font-weight: 800;
}

.digitakt-steps {
  display: grid;
  grid-template-columns: repeat(16, 38px);
  gap: 5px;
  width: fit-content;
  padding: 7px 8px 10px;
  background:
    linear-gradient(180deg, rgba(24, 27, 27, .96), rgba(14, 15, 15, .98));
  border: 1px solid rgba(120, 255, 230, .08);
  border-radius: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    inset 0 -1px 0 rgba(0, 0, 0, .9),
    0 18px 40px rgba(0, 0, 0, .34);
}

.step-cell {
  display: grid;
  grid-template-rows: 12px 38px;
  gap: 3px;
}

.condition-display {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 38px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  cursor: default;
  overflow: hidden;
  background: linear-gradient(180deg, #081614 0%, #020807 100%);
  color: rgba(120, 255, 230, 0);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .25px;
  box-shadow:
    inset 0 1px 1px rgba(160, 255, 240, .06),
    inset 0 -1px 3px rgba(0, 0, 0, .95),
    inset 0 0 8px rgba(0, 0, 0, .85),
    0 3px 5px rgba(0, 0, 0, .45);
}

.condition-display::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(180, 255, 245, .07), rgba(180, 255, 245, .015) 45%, rgba(0, 0, 0, .35));
  border: 1px solid rgba(120, 255, 230, .08);
  pointer-events: none;
}

.condition-display::after {
  content: attr(data-label);
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 100%;
  opacity: 0;
  color: currentColor;
  text-transform: uppercase;
  pointer-events: none;
}

.step-cell.is-on .condition-display {
  cursor: pointer;
  color: rgba(120, 255, 230, .95);
  background:
    radial-gradient(circle at center, rgba(40, 210, 190, .22), transparent 72%),
    linear-gradient(180deg, #08201d 0%, #03100e 100%);
  box-shadow:
    inset 0 0 5px rgba(120, 255, 230, .16),
    inset 0 -1px 3px rgba(0, 0, 0, .95),
    0 0 5px rgba(120, 255, 230, .24),
    0 0 12px rgba(40, 220, 190, .14),
    0 3px 5px rgba(0, 0, 0, .45);
  text-shadow:
    0 0 3px rgba(120, 255, 230, .9),
    0 0 8px rgba(40, 220, 190, .55),
    0 0 14px rgba(40, 220, 190, .25);
}

.step-cell.is-on .condition-display::after { opacity: 1; }
.step-cell.is-on .condition-display[data-condition="always"] { color: rgba(120, 255, 230, .48); }

.dt-step {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(180deg, #303030 0%, #151515 35%, #050505 100%);
  box-shadow:
    0 4px 0 #020202,
    0 9px 13px rgba(0, 0, 0, .75),
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(0, 0, 0, 1);
  color: rgba(245, 245, 245, .34);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.dt-step::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 5px;
  background: linear-gradient(180deg, #242424 0%, #181818 55%, #0f0f0f 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, .08),
    inset 0 -3px 5px rgba(0, 0, 0, .7);
}

.dt-step::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 6px;
  border: 2px solid rgba(235, 235, 235, .18);
  border-radius: 5px;
  pointer-events: none;
}

.dt-step span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 100%;
  color: currentColor;
}

.step-cell:nth-child(4n + 1) .dt-step span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 25px;
  transform: translateX(-50%);
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: .45;
}

.velocity-pips {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  height: 2px;
  width: 0;
  background-image: radial-gradient(circle, currentColor 0 1.25px, transparent 1.35px);
  background-size: 6px 2px;
  background-repeat: repeat-x;
  background-position: left center;
  opacity: 0;
  pointer-events: none;
}

.dt-step[data-velocity="0"] { color: rgba(245, 245, 245, .34); }

.dt-step.is-on {
  color: rgba(255, 217, 95, var(--step-alpha, .9));
  box-shadow:
    0 4px 0 #020202,
    0 9px 13px rgba(0, 0, 0, .75),
    0 0 15px rgba(255, 185, 30, var(--step-glow, .35)),
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(0, 0, 0, 1);
}

.dt-step.is-on::after {
  border-color: rgba(255, 217, 95, var(--step-alpha, .75));
}

.dt-step.is-on .velocity-pips {
  width: var(--pip-width, 12px);
  opacity: var(--step-alpha, .85);
}

.dt-step[data-velocity="25"] {
  color: rgba(255, 185, 45, .55);
  box-shadow:
    0 4px 0 #020202,
    0 9px 13px rgba(0, 0, 0, .75),
    0 0 5px rgba(255, 160, 20, .12),
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -1px 0 rgba(0, 0, 0, 1);
}

.dt-step[data-velocity="25"] .velocity-pips { width: 3px; opacity: .55; }

.dt-step[data-velocity="50"] {
  color: rgba(255, 200, 65, .78);
  box-shadow:
    0 4px 0 #020202,
    0 9px 13px rgba(0, 0, 0, .75),
    0 0 9px rgba(255, 175, 25, .25),
    inset 0 1px 0 rgba(255, 255, 255, .15),
    inset 0 -1px 0 rgba(0, 0, 0, 1);
}

.dt-step[data-velocity="50"] .velocity-pips { width: 8px; opacity: .78; }

.dt-step[data-velocity="75"] {
  color: rgba(255, 215, 85, .95);
  box-shadow:
    0 4px 0 #020202,
    0 9px 13px rgba(0, 0, 0, .75),
    0 0 13px rgba(255, 185, 30, .38),
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -1px 0 rgba(0, 0, 0, 1);
}

.dt-step[data-velocity="75"] .velocity-pips { width: 13px; opacity: .95; }

.dt-step[data-velocity="100"] {
  color: #ffd95f;
  box-shadow:
    0 4px 0 #020202,
    0 9px 13px rgba(0, 0, 0, .75),
    0 0 18px rgba(255, 190, 35, .55),
    0 0 28px rgba(255, 150, 10, .22),
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 -1px 0 rgba(0, 0, 0, 1);
}

.dt-step[data-velocity="100"] .velocity-pips { width: 18px; opacity: 1; }
.dt-step[data-velocity="25"]::after { border-color: rgba(255, 185, 45, .38); }
.dt-step[data-velocity="50"]::after { border-color: rgba(255, 200, 65, .65); }
.dt-step[data-velocity="75"]::after { border-color: rgba(255, 215, 85, .88); }

.dt-step[data-velocity="100"]::after {
  border-color: #ffd95f;
  box-shadow:
    inset 0 0 5px rgba(255, 220, 95, .55),
    0 0 7px rgba(255, 220, 95, .95),
    0 0 16px rgba(255, 180, 30, .7);
}

.dt-step:active { transform: translateY(3px); }

.dt-step.is-selected {
  outline: 2px solid rgba(113, 183, 168, .82);
  outline-offset: 3px;
}

.dt-step.is-playhead {
  box-shadow:
    0 4px 0 #020202,
    0 9px 13px rgba(0, 0, 0, .75),
    0 0 0 3px rgba(215, 123, 111, .95),
    0 0 20px rgba(215, 123, 111, .42),
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 -1px 0 rgba(0, 0, 0, 1);
}

.selected-step-panel {
  position: sticky;
  top: 76px;
  min-width: 0;
  max-height: calc(100vh - 92px);
  margin-bottom: 0;
  padding: 12px;
  overflow: auto;
  color: rgba(120, 255, 230, .9);
  background:
    radial-gradient(circle at 18% 20%, rgba(40, 210, 190, .12), transparent 32%),
    linear-gradient(180deg, #081614 0%, #020807 100%);
  border-color: rgba(120, 255, 230, .18);
  box-shadow:
    inset 0 1px 1px rgba(160, 255, 240, .08),
    inset 0 -1px 3px rgba(0, 0, 0, .95),
    inset 0 0 18px rgba(0, 0, 0, .82),
    0 14px 30px rgba(0, 0, 0, .25);
}

.editor-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.editor-kicker {
  margin: 0 0 3px;
  color: rgba(120, 255, 230, .58);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.editor h2 {
  margin: 0 0 2px;
  color: rgba(120, 255, 230, .95);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 1rem;
  letter-spacing: .02em;
  text-shadow:
    0 0 3px rgba(120, 255, 230, .9),
    0 0 12px rgba(40, 220, 190, .35);
}

.selected-label {
  margin: 0;
  color: rgba(255, 217, 95, .9);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: .78rem;
  text-shadow: 0 0 9px rgba(255, 190, 35, .24);
}

.editor-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.editor-block {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(120, 255, 230, .16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(13, 30, 27, .9), rgba(2, 8, 7, .86));
  box-shadow:
    inset 0 1px 0 rgba(160, 255, 240, .08),
    inset 0 -1px 3px rgba(0, 0, 0, .75),
    0 8px 18px rgba(0, 0, 0, .18);
}

.editor-block--level {
  grid-template-columns: 1fr 1fr;
}

.editor-block--trig {
  grid-template-columns: 1fr;
}

.editor-block--time {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.editor label {
  display: grid;
  gap: 5px;
  margin-bottom: 0;
  color: rgba(120, 255, 230, .58);
  font-family: "Courier New", ui-monospace, monospace;
}

.editor .active-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(120, 255, 230, .14);
  border-radius: 7px;
  background: rgba(2, 8, 7, .72);
}

.editor input[type="checkbox"] { width: auto; }

.meter-field {
  position: relative;
}

.meter-field > span {
  display: block;
}

.meter-field input[type="number"] {
  min-height: 34px;
  padding-right: 46px;
}

input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 217, 95, .78) 0 calc(var(--value, 0) * 1%), rgba(255, 217, 95, .08) 0 100%),
    linear-gradient(180deg, #081614, #020807);
  box-shadow:
    inset 0 1px 1px rgba(160, 255, 240, .06),
    inset 0 -1px 3px rgba(0, 0, 0, .95),
    inset 0 0 8px rgba(0, 0, 0, .85);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 10px;
  height: 20px;
  border: 1px solid rgba(255, 217, 95, .74);
  border-radius: 4px;
  background: linear-gradient(180deg, #ffd95f, #775515);
  box-shadow:
    0 0 8px rgba(255, 217, 95, .42),
    inset 0 1px 0 rgba(255, 255, 255, .28);
}

input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 20px;
  border: 1px solid rgba(255, 217, 95, .74);
  border-radius: 4px;
  background: linear-gradient(180deg, #ffd95f, #775515);
}

.meter-field--chance input[type="range"] {
  background:
    linear-gradient(135deg, rgba(86, 168, 255, .76) 0 calc(var(--value, 0) * 1%), rgba(86, 168, 255, .08) 0 100%),
    linear-gradient(180deg, #081614, #020807);
}

.meter-field--chance input[type="range"]::-webkit-slider-thumb {
  border-color: rgba(86, 168, 255, .78);
  background: linear-gradient(180deg, #8fc8ff, #164d82);
  box-shadow: 0 0 8px rgba(86, 168, 255, .38);
}

.microtiming-tool {
  --micro-position: 50%;
  display: grid;
  grid-template-columns: minmax(122px, .86fr) minmax(118px, .78fr);
  gap: 8px;
  align-items: stretch;
}

.microtiming-slider {
  background:
    linear-gradient(90deg, rgba(86, 168, 255, .42), rgba(120, 255, 230, .16) 50%, rgba(255, 217, 95, .42)),
    linear-gradient(180deg, #081614, #020807);
}

.microtiming-slider::-webkit-slider-thumb {
  border-color: rgba(120, 255, 230, .78);
  background: linear-gradient(180deg, #78ffe6, #14665c);
  box-shadow: 0 0 8px rgba(120, 255, 230, .38);
}

.microtiming-ruler {
  position: relative;
  min-height: 72px;
  padding: 4px 8px 0;
  border: 1px solid rgba(120, 255, 230, .2);
  border-radius: 7px;
  background: linear-gradient(180deg, #f4f4ef, #d8d9d2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),
    inset 0 -2px 4px rgba(0, 0, 0, .18),
    0 5px 12px rgba(0, 0, 0, .28);
}

.microtiming-display {
  display: grid;
  place-items: center;
  width: min(88px, 100%);
  min-height: 20px;
  margin: 2px auto 8px;
  padding: 2px 5px;
  color: #f5fff9;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: .66rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 5px rgba(245, 255, 249, .46);
  background: linear-gradient(180deg, #242727, #050606);
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .8),
    inset 0 0 7px rgba(120, 255, 230, .16);
}

.microtiming-pointer {
  position: absolute;
  top: 30px;
  left: var(--micro-position);
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #111;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .2));
}

.microtiming-ticks {
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 10px;
  height: 18px;
  border-bottom: 3px solid #171717;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), #111 calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, #171717 0 2px, transparent 2px calc(10% - 1px), #171717 calc(10% - 1px) 10%);
}

.microtiming-ticks::before,
.microtiming-ticks::after {
  content: "";
  position: absolute;
  inset: 7px 0 0;
  background: repeating-linear-gradient(90deg, #171717 0 1px, transparent 1px 5%);
  opacity: .75;
}

.editor-fields > label:not(.active-toggle),
.microtiming-tool,
.editor-fields select {
  min-width: 0;
}

.retrig-field select {
  min-height: 39px;
  color: rgba(245, 255, 252, .96);
}

.retrig-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}

.retrig-stack .retrig-field {
  min-width: 0;
}

.cc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cc-header h3 {
  margin: 0;
  color: rgba(120, 255, 230, .72);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: .95rem;
}

.cc-lock {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.cc-lock button {
  padding: 8px;
  color: var(--danger);
}

@media (max-width: 1240px) {
  .performance-deck {
    grid-template-columns: 1fr;
  }

  .selected-step-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 1100px) {
  .top-deck {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: minmax(220px, 1fr) auto 72px repeat(2, auto);
  }

  .lane-row {
    grid-template-columns: 214px max-content;
  }

  .editor-fields { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .editor-header { display: grid; }
  .top-deck {
    gap: 8px;
  }

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

  .toolbar .field--wide,
  .toolbar .status,
  .toolbar .export-button--all,
  .toolbar .export-button--solo {
    grid-column: 1 / -1;
  }

  .editor-block--level,
  .editor-block--time,
  .microtiming-tool {
    grid-template-columns: minmax(0, 1fr);
  }
}
