@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Sora:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg-0: #060b12;
  --bg-1: #0b141d;
  --bg-2: #101c27;
  --panel: rgba(9, 18, 28, 0.84);
  --panel-soft: rgba(255, 255, 255, 0.025);
  --line: rgba(129, 199, 183, 0.14);
  --line-strong: rgba(129, 199, 183, 0.26);
  --text: #ecf5ee;
  --muted: #8ea3a7;
  --mint: #82e9bf;
  --mint-strong: #48c99a;
  --orange: #ff9d5f;
  --amber: #ffd48a;
  --cyan: #7cd8f3;
  --danger: #ff7168;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Sora", "Avenir Next", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(124, 216, 243, 0.16), transparent 26%),
    radial-gradient(circle at 84% 8%, rgba(255, 157, 95, 0.14), transparent 24%),
    radial-gradient(circle at 66% 72%, rgba(130, 233, 191, 0.09), transparent 26%),
    linear-gradient(152deg, var(--bg-0) 0%, var(--bg-1) 42%, #05080d 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at 50% 40%, black 24%, transparent 82%);
  opacity: 0.36;
}

body::after {
  background:
    radial-gradient(circle at center, rgba(130, 233, 191, 0.04), transparent 32%),
    radial-gradient(circle at center, rgba(255, 157, 95, 0.03), transparent 48%);
  animation: roomPulse 11s ease-in-out infinite;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1460px, calc(100vw - 24px));
  margin: 8px auto 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.02), transparent 46%),
    linear-gradient(135deg, rgba(15, 27, 40, 0.9), rgba(6, 12, 18, 0.94)),
    var(--panel);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mint);
}

.hero {
  padding: 8px 12px 9px;
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 8px;
  animation: panelIn 420ms ease both;
}

.hero-brand {
  min-width: 0;
}

.hero-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.hero h1,
.visual-panel h2,
.section-head h2,
.section-head h3,
.pedal-stage h3,
.tape-head h3 {
  margin: 0;
  font-family: "Chakra Petch", "Trebuchet MS", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(1.7rem, 2.9vw, 2.22rem);
  line-height: 0.92;
}

.brand-link {
  color: rgba(236, 245, 238, 0.64);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.brand-link:hover,
.brand-link:focus-visible {
  color: var(--mint);
  outline: none;
}

.status-chip,
.readout {
  padding: 9px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(135deg, rgba(255, 157, 95, 0.08), rgba(130, 233, 191, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.status-label,
.readout-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-chip strong,
.readout strong {
  color: var(--amber);
  font-size: 0.98rem;
}

.transport {
  display: flex;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 2px;
}

.button,
.mini-button,
.fx-button,
.pedal-bypass,
.pedal-stomp {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016)),
    rgba(5, 11, 17, 0.9);
  font: inherit;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.button:hover,
.mini-button:hover,
.fx-button:hover,
.pedal-bypass:hover,
.pedal-stomp:hover,
.button:focus-visible,
.mini-button:focus-visible,
.fx-button:focus-visible,
.pedal-bypass:focus-visible,
.pedal-stomp:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(130, 233, 191, 0.34);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  outline: none;
}

.button {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.button-primary {
  border-color: rgba(255, 212, 138, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 157, 95, 0.32), rgba(124, 216, 243, 0.16)),
    rgba(10, 15, 22, 0.96);
}

.button-ghost {
  color: rgba(236, 245, 238, 0.78);
}

.button.is-active,
.mini-button.is-active,
.micro-button.is-active,
.pedal-bypass.is-active {
  border-color: rgba(130, 233, 191, 0.42);
  background:
    linear-gradient(135deg, rgba(130, 233, 191, 0.22), rgba(124, 216, 243, 0.12)),
    rgba(8, 18, 28, 0.96);
}

.button.is-recording,
.micro-button.is-recording {
  border-color: rgba(255, 113, 104, 0.44);
  background:
    linear-gradient(135deg, rgba(255, 113, 104, 0.24), rgba(255, 157, 95, 0.16)),
    rgba(17, 7, 8, 0.96);
}

.button:disabled,
.mini-button:disabled,
.micro-button:disabled {
  opacity: 0.38;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.mini-button {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.studio-layout {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 2.04fr) minmax(300px, 0.8fr);
  gap: 8px;
  align-items: start;
}

.performance-column,
.drawer-column {
  display: grid;
  gap: 8px;
  align-content: start;
}

.visual-panel,
.rhythm-panel {
  padding: 10px;
}

.signal-head,
.section-head,
.tape-head,
.pedal-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.signal-head {
  justify-content: flex-end;
  margin-bottom: 6px;
}

.signal-head-actions,
.header-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  justify-content: flex-end;
  overflow-x: auto;
  padding-bottom: 2px;
}

.section-head {
  margin-bottom: 8px;
}

.section-head-compact {
  margin-bottom: 6px;
}

.signal-top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(236px, 0.56fr);
  gap: 8px;
  align-items: stretch;
}

.visualizer-block {
  display: grid;
  gap: 6px;
}

#visualizerCanvas {
  display: block;
  width: 100%;
  height: clamp(206px, 24vw, 312px);
  border-radius: 16px;
  background:
    radial-gradient(circle at 15% 25%, rgba(124, 216, 243, 0.1), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(255, 157, 95, 0.09), transparent 24%),
    linear-gradient(160deg, rgba(5, 9, 13, 0.92), rgba(9, 17, 26, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pedal-stage {
  display: grid;
  gap: 0;
  max-width: 278px;
  width: 100%;
  align-self: stretch;
  justify-self: end;
}

.pedal-unit {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding: 8px 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 282px;
  height: 100%;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 36%),
    rgba(20, 30, 38, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 28px rgba(0, 0, 0, 0.24);
}

.pedal-unit::before,
.pedal-unit::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.pedal-unit::before {
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 28%);
}

.pedal-unit::after {
  inset: auto 16px 16px;
  height: 76px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  opacity: 0.44;
}

.pedal-unit.is-bypassed {
  filter: saturate(0.74) brightness(0.88);
}

.pedal-unit.is-bypassed .pedal-screen,
.pedal-unit.is-bypassed .pedal-control {
  opacity: 0.76;
}

.pedal-screen {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  padding: 8px 30px 8px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 10, 15, 0.46);
  margin-bottom: 6px;
}

.pedal-screen-label {
  font-family: "Chakra Petch", "Trebuchet MS", sans-serif;
  font-size: 0.94rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pedal-screen-sub {
  color: rgba(236, 245, 238, 0.72);
  font-size: 0.72rem;
  line-height: 1.35;
}

.pedal-bypass {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 2;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 204, 194, 0.95) 0 22%, rgba(255, 74, 59, 0.98) 34%, rgba(97, 8, 7, 1) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.46),
    0 0 12px rgba(255, 70, 58, 0.42);
  font-size: 0;
}

.pedal-bypass.is-active {
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 35% 30%, rgba(111, 118, 126, 0.52) 0 20%, rgba(28, 34, 38, 0.94) 52%, rgba(8, 10, 12, 1) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.62);
}

.pedal-face {
  flex: 1 1 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-content: start;
  padding-bottom: 74px;
}

.pedal-control {
  display: grid;
  gap: 4px;
  padding: 6px 7px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pedal-control span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pedal-control output {
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 700;
}

.pedal-control input[type="range"] {
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(130, 233, 191, 0.3), rgba(255, 212, 138, 0.35));
}

.pedal-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff5df, #f0b86c);
  border: 2px solid rgba(0, 0, 0, 0.5);
}

.pedal-control input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff5df, #f0b86c);
  border: 2px solid rgba(0, 0, 0, 0.5);
}

.pedal-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  min-height: 62px;
}

.pedal-stomp {
  position: relative;
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.14) 34%, rgba(0, 0, 0, 0.1) 35%, rgba(0, 0, 0, 0.58) 100%);
  box-shadow:
    inset 0 -10px 16px rgba(0, 0, 0, 0.36),
    0 14px 22px rgba(0, 0, 0, 0.24);
}

.pedal-stomp::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.pedal-stomp::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 16px;
  width: 18px;
  height: 6px;
  margin-left: -9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  filter: blur(0.5px);
}

.pedal-unit.pedal-digital {
  background:
    linear-gradient(180deg, rgba(62, 83, 103, 0.16), transparent 28%),
    linear-gradient(135deg, #131a22 0%, #04080e 100%);
}

.pedal-unit.pedal-digital .pedal-screen {
  background:
    linear-gradient(180deg, rgba(61, 255, 181, 0.14), rgba(7, 22, 16, 0.9)),
    rgba(5, 10, 15, 0.5);
  box-shadow: inset 0 0 18px rgba(61, 255, 181, 0.14);
}

.pedal-unit.pedal-ivory {
  color: #1d2528;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 30%),
    linear-gradient(135deg, #f8f5ed 0%, #d6dcd9 100%);
}

.pedal-unit.pedal-ivory .pedal-control,
.pedal-unit.pedal-ivory .pedal-screen {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(0, 0, 0, 0.08);
}

.pedal-unit.pedal-ivory .pedal-screen-sub,
.pedal-unit.pedal-ivory .pedal-control output {
  color: #4c5b61;
}

.pedal-unit.pedal-honeycomb {
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.16) 0 6px, transparent 7px) 0 0 / 34px 34px,
    linear-gradient(135deg, #f3c73b 0%, #cf9a11 100%);
  color: #241805;
}

.pedal-unit.pedal-honeycomb .pedal-control,
.pedal-unit.pedal-honeycomb .pedal-screen {
  background: rgba(255, 250, 218, 0.54);
  border-color: rgba(60, 36, 6, 0.14);
}

.pedal-unit.pedal-honeycomb .pedal-screen-sub,
.pedal-unit.pedal-honeycomb .pedal-control output {
  color: #5f4311;
}

.pedal-unit.pedal-chrome {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 26%),
    linear-gradient(135deg, #77848e 0%, #b6c0c7 34%, #616c74 100%);
  color: #091015;
}

.pedal-unit.pedal-chrome .pedal-control,
.pedal-unit.pedal-chrome .pedal-screen {
  background: rgba(225, 232, 237, 0.56);
  border-color: rgba(0, 0, 0, 0.1);
}

.pedal-unit.pedal-chrome .pedal-screen-sub,
.pedal-unit.pedal-chrome .pedal-control output {
  color: #334148;
}

.pedal-unit.pedal-sunset {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, #8c3726 0%, #d15c37 44%, #f09958 100%);
}

.pedal-unit.pedal-sunset .pedal-screen {
  background:
    linear-gradient(180deg, rgba(255, 233, 173, 0.18), rgba(51, 15, 8, 0.76));
}

.pedal-unit.pedal-surf {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 26%),
    linear-gradient(135deg, #205f65 0%, #3fa6b1 48%, #97ece7 100%);
}

.pedal-unit.pedal-surf .pedal-screen {
  background:
    linear-gradient(180deg, rgba(235, 255, 255, 0.18), rgba(5, 31, 35, 0.76));
}

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

.utility-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 24px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.utility-cluster {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.utility-cluster-transport {
  justify-content: flex-end;
}

.fx-button {
  min-height: 42px;
  padding: 7px 9px;
  border-radius: 12px;
  text-align: left;
  font-weight: 700;
}

.micro-button {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(236, 245, 238, 0.82);
  background: rgba(255, 255, 255, 0.03);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.micro-button-accent {
  border-color: rgba(255, 212, 138, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 157, 95, 0.2), rgba(124, 216, 243, 0.08)),
    rgba(12, 18, 25, 0.94);
}

.micro-button-ghost {
  color: rgba(236, 245, 238, 0.72);
}

.micro-button:hover,
.micro-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(130, 233, 191, 0.28);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
  outline: none;
}

.fx-button span {
  display: block;
  margin-top: 4px;
  color: rgba(236, 245, 238, 0.62);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fx-rise {
  background:
    linear-gradient(135deg, rgba(124, 216, 243, 0.2), rgba(255, 255, 255, 0.04)),
    rgba(8, 18, 28, 0.92);
}

.fx-laser {
  background:
    linear-gradient(135deg, rgba(255, 157, 95, 0.2), rgba(255, 255, 255, 0.04)),
    rgba(8, 18, 28, 0.92);
}

.fx-sub {
  background:
    linear-gradient(135deg, rgba(255, 212, 138, 0.18), rgba(255, 255, 255, 0.04)),
    rgba(8, 18, 28, 0.92);
}

.fx-chord {
  background:
    linear-gradient(135deg, rgba(130, 233, 191, 0.2), rgba(255, 255, 255, 0.04)),
    rgba(8, 18, 28, 0.92);
}

.keyboard-grid {
  position: relative;
  height: clamp(180px, 17vw, 198px);
  margin-top: 6px;
  border-radius: 16px;
  padding: 0 6px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 24%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 16%),
    linear-gradient(180deg, rgba(19, 27, 36, 0.98), rgba(8, 12, 17, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.keyboard-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(130, 233, 191, 0.03), transparent 20%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 18%);
  pointer-events: none;
}

.key {
  position: absolute;
  --note-level: 0;
  --press-top: #fff2cf;
  --press-mid: #ffdca3;
  --press-bottom: #d29b5d;
  --press-edge: rgba(208, 142, 78, 0.68);
  --press-glow: rgba(255, 171, 88, 0.24);
  --dark-press-top: #74818d;
  --dark-press-mid: #2a3139;
  --dark-press-bottom: #05070a;
  --dark-press-edge: rgba(60, 126, 116, 0.72);
  --dark-press-glow: rgba(72, 201, 154, 0.16);
  border: 1px solid rgba(0, 0, 0, 0.18);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transform: translate(var(--translate-x, 0), var(--translate-y, 0));
  transition:
    transform 120ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    filter 140ms ease,
    opacity 140ms ease,
    border-color 140ms ease;
}

.key:hover,
.key:focus-visible {
  --translate-y: 1px;
  outline: none;
}

.key[data-accent="0"] {
  --press-top: #e8f4ff;
  --press-mid: #bedfff;
  --press-bottom: #79aee8;
  --press-edge: rgba(101, 170, 255, 0.66);
  --press-glow: rgba(101, 170, 255, 0.2);
  --dark-press-top: #7c92a8;
  --dark-press-mid: #283444;
  --dark-press-bottom: #060a10;
  --dark-press-edge: rgba(101, 170, 255, 0.52);
  --dark-press-glow: rgba(101, 170, 255, 0.16);
}

.key[data-accent="1"] {
  --press-top: #fff4d6;
  --press-mid: #ffe09a;
  --press-bottom: #dda257;
  --press-edge: rgba(229, 177, 77, 0.66);
  --press-glow: rgba(245, 186, 68, 0.18);
  --dark-press-top: #8a7d63;
  --dark-press-mid: #312918;
  --dark-press-bottom: #090603;
  --dark-press-edge: rgba(229, 177, 77, 0.48);
  --dark-press-glow: rgba(245, 186, 68, 0.14);
}

.key[data-accent="2"] {
  --press-top: #e7fff6;
  --press-mid: #bcf2de;
  --press-bottom: #6cbf9c;
  --press-edge: rgba(92, 201, 153, 0.64);
  --press-glow: rgba(92, 201, 153, 0.18);
  --dark-press-top: #719287;
  --dark-press-mid: #21362f;
  --dark-press-bottom: #040908;
  --dark-press-edge: rgba(92, 201, 153, 0.48);
  --dark-press-glow: rgba(92, 201, 153, 0.14);
}

.key[data-accent="3"] {
  --press-top: #ffeaf0;
  --press-mid: #f9c0cf;
  --press-bottom: #cf7c92;
  --press-edge: rgba(222, 121, 156, 0.62);
  --press-glow: rgba(222, 121, 156, 0.18);
  --dark-press-top: #8d7380;
  --dark-press-mid: #38212c;
  --dark-press-bottom: #0a0407;
  --dark-press-edge: rgba(222, 121, 156, 0.46);
  --dark-press-glow: rgba(222, 121, 156, 0.12);
}

.key[data-accent="4"] {
  --press-top: #f1ecff;
  --press-mid: #d5c5ff;
  --press-bottom: #8d79d8;
  --press-edge: rgba(139, 118, 233, 0.62);
  --press-glow: rgba(139, 118, 233, 0.18);
  --dark-press-top: #847c99;
  --dark-press-mid: #2c2740;
  --dark-press-bottom: #07060c;
  --dark-press-edge: rgba(139, 118, 233, 0.46);
  --dark-press-glow: rgba(139, 118, 233, 0.12);
}

.key[data-accent="5"] {
  --press-top: #e7fbff;
  --press-mid: #bbeefa;
  --press-bottom: #69b7d1;
  --press-edge: rgba(88, 184, 214, 0.62);
  --press-glow: rgba(88, 184, 214, 0.18);
  --dark-press-top: #7592a0;
  --dark-press-mid: #213442;
  --dark-press-bottom: #04080b;
  --dark-press-edge: rgba(88, 184, 214, 0.46);
  --dark-press-glow: rgba(88, 184, 214, 0.12);
}

.key-white {
  top: 0;
  bottom: 8px;
  height: auto;
  padding: 9px 6px 10px;
  border-radius: 0 0 11px 11px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f3f7f3 44%, #d9e1dc 82%, #c4cdc7 100%);
  color: #10161c;
  border-color: rgba(133, 146, 152, 0.42);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.92),
    inset -1px 0 0 rgba(190, 199, 194, 0.85),
    inset 0 10px 12px rgba(255, 255, 255, 0.65),
    inset 0 -14px 18px rgba(45, 55, 61, 0.14),
    0 9px 14px rgba(0, 0, 0, 0.16);
  z-index: 1;
}

.key-black {
  top: -18px;
  height: 66%;
  padding: 7px 5px 8px;
  border-radius: 0 0 9px 9px;
  background:
    linear-gradient(180deg, #5b6773 0%, #202730 16%, #090d12 56%, #020407 100%);
  color: rgba(236, 245, 238, 0.92);
  border-color: rgba(6, 9, 12, 0.96);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.12),
    inset -1px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 10px 10px rgba(255, 255, 255, 0.07),
    inset 0 -14px 18px rgba(0, 0, 0, 0.5),
    0 10px 16px rgba(0, 0, 0, 0.42);
  z-index: 3;
}

.key.is-active {
  --translate-y: 2px;
  filter: saturate(calc(0.96 + var(--note-level) * 0.42)) brightness(calc(0.9 + var(--note-level) * 0.26));
}

.key-white.is-active {
  background:
    linear-gradient(180deg, var(--press-top) 0%, var(--press-mid) 46%, color-mix(in srgb, var(--press-mid) 68%, var(--press-bottom)) 78%, var(--press-bottom) 100%);
  border-color: var(--press-edge);
  box-shadow:
    inset 1px 0 0 rgba(255, 248, 220, 0.9),
    inset -1px 0 0 rgba(203, 139, 74, 0.42),
    inset 0 6px 8px rgba(255, 250, 230, 0.5),
    inset 0 -10px 16px rgba(183, 97, 33, 0.28),
    0 0 0 1px rgba(255, 214, 149, 0.42),
    0 0 calc(8px + var(--note-level) * 18px) var(--press-glow);
}

.key-black.is-active {
  --translate-y: 3px;
  background:
    linear-gradient(180deg, var(--dark-press-top) 0%, var(--dark-press-mid) 18%, #0d1116 60%, var(--dark-press-bottom) 100%);
  color: #03110d;
  border-color: var(--dark-press-edge);
  box-shadow:
    inset 1px 0 0 rgba(208, 255, 240, 0.2),
    inset -1px 0 0 rgba(173, 255, 236, 0.12),
    inset 0 8px 10px rgba(222, 255, 245, 0.12),
    inset 0 -10px 14px rgba(0, 0, 0, 0.34),
    0 0 calc(6px + var(--note-level) * 14px) var(--dark-press-glow);
}

.key.is-scale-muted:not(.is-active) {
  opacity: 1;
  filter: saturate(0.82) brightness(0.86);
}

.key-top {
  display: flex;
  justify-content: center;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.key-bottom {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.key-note {
  font-family: "Chakra Petch", "Trebuchet MS", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.key-hotkey {
  font-size: 0.52rem;
  opacity: 0.72;
}

.control-cluster {
  margin-top: 6px;
  padding: 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.028), transparent 60%), rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 6px;
}

.control-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
}

.control {
  display: grid;
  gap: 6px;
  min-height: 80px;
  padding: 8px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 60%),
    rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(255, 255, 255, 0.06);
  grid-column: span var(--control-span, 1);
}

.control-toggle {
  min-height: 86px;
}

.control-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
}

.control-hint {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.control output {
  color: var(--amber);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control select,
.control input[type="range"] {
  width: 100%;
}

.control select {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 11, 17, 0.88);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.control input[type="range"] {
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(130, 233, 191, 0.24), rgba(255, 212, 138, 0.28));
}

.control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border: 2px solid rgba(5, 11, 17, 0.92);
}

.control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border: 2px solid rgba(5, 11, 17, 0.92);
}

.toggle-shell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-shell input {
  width: 18px;
  height: 18px;
  accent-color: var(--mint);
}

.rhythm-panel {
  padding: 10px;
}

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

.pad-card {
  position: relative;
  overflow: hidden;
  min-height: 90px;
  padding: 10px 10px 11px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 32%),
    linear-gradient(145deg, rgba(255, 157, 95, 0.12), rgba(124, 216, 243, 0.1)),
    rgba(9, 16, 24, 0.92);
  text-align: left;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.pad-card::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 212, 138, 0.66), rgba(124, 216, 243, 0.22));
  opacity: 0.7;
}

.pad-card:hover,
.pad-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(130, 233, 191, 0.3);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
  outline: none;
}

.pad-card.is-selected {
  border-color: rgba(255, 212, 138, 0.34);
  box-shadow: 0 12px 22px rgba(255, 157, 95, 0.14);
}

.pad-card.is-muted {
  filter: saturate(0.54) brightness(0.64);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.pad-card.is-pulsing {
  animation: padBlink 340ms ease;
}

.pad-card small,
.pad-card strong,
.pad-card span {
  display: block;
}

.pad-hotkey {
  color: rgba(236, 245, 238, 0.62);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.pad-title {
  margin-top: 10px;
  font-size: 0.84rem;
}

.pad-subtitle {
  margin-top: 2px;
  color: rgba(236, 245, 238, 0.74);
  font-size: 0.72rem;
}

.pad-params {
  margin-top: 8px;
  color: var(--amber);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sequence-grid {
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(72px, 88px) repeat(16, minmax(0, 1fr));
  gap: 5px;
}

.sequence-row-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font: inherit;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(236, 245, 238, 0.76);
  font-size: 0.76rem;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.sequence-row-label:hover,
.sequence-row-label:focus-visible {
  border-color: rgba(130, 233, 191, 0.22);
  outline: none;
}

.sequence-row-label.is-muted {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.04);
  color: rgba(236, 245, 238, 0.34);
}

.sequence-step {
  min-height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    rgba(5, 11, 17, 0.86);
  cursor: pointer;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.sequence-step:hover,
.sequence-step:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(130, 233, 191, 0.24);
  outline: none;
}

.sequence-step.is-on {
  background:
    linear-gradient(180deg, rgba(255, 212, 138, 0.7), rgba(255, 157, 95, 0.62)),
    rgba(255, 170, 100, 0.22);
  border-color: rgba(255, 212, 138, 0.42);
}

.sequence-step.is-muted {
  opacity: 0.32;
  filter: saturate(0.42) brightness(0.58);
}

.sequence-step.is-on.is-muted {
  background:
    linear-gradient(180deg, rgba(114, 114, 114, 0.4), rgba(46, 46, 46, 0.52)),
    rgba(16, 16, 16, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
}

.sequence-step.is-current {
  box-shadow: 0 0 0 2px rgba(130, 233, 191, 0.5);
}

.sequence-step.is-current.is-muted {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.tempo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  min-width: 166px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    rgba(5, 11, 17, 0.9);
  color: rgba(236, 245, 238, 0.82);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tempo-pill span,
.tempo-pill output {
  flex: 0 0 auto;
}

.tempo-pill output {
  color: var(--amber);
  min-width: 28px;
  text-align: right;
}

.tempo-pill input[type="range"] {
  flex: 1 1 auto;
  min-width: 70px;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(130, 233, 191, 0.24), rgba(255, 212, 138, 0.28));
}

.tempo-pill input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border: 2px solid rgba(5, 11, 17, 0.92);
}

.tempo-pill input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border: 2px solid rgba(5, 11, 17, 0.92);
}

.drawer {
  padding: 0;
  overflow: hidden;
}

.drawer summary {
  list-style: none;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

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

.drawer-summary-shell,
.drawer-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-symbol,
.tape-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-family: "Chakra Petch", "Trebuchet MS", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(236, 245, 238, 0.82);
}

.drawer[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer > .control-grid,
.drawer-stack {
  padding: 8px;
}

.drawer-stack {
  display: grid;
  gap: 8px;
}

.tape-panel {
  padding: 8px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 60%),
    rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.take-meta {
  margin-top: 12px;
  color: rgba(236, 245, 238, 0.74);
  font-size: 0.86rem;
  line-height: 1.5;
}

.take-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.take-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.take-item strong,
.take-item span {
  display: block;
}

.take-item strong {
  margin-bottom: 4px;
}

.take-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.take-actions button {
  min-height: 32px;
}

.event-log {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.event-log-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(236, 245, 238, 0.76);
  font-size: 0.78rem;
}

.event-log-item strong {
  color: var(--amber);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes roomPulse {
  0%,
  100% {
    opacity: 0.44;
    transform: scale(1);
  }

  50% {
    opacity: 0.84;
    transform: scale(1.05);
  }
}

@keyframes padBlink {
  0% {
    transform: scale(1);
    box-shadow: none;
  }

  40% {
    transform: scale(1.02);
    box-shadow: 0 0 0 1px rgba(130, 233, 191, 0.34), 0 0 22px rgba(130, 233, 191, 0.18);
  }

  100% {
    transform: scale(1);
    box-shadow: none;
  }
}

@media (max-width: 1220px) {
  .hero {
    align-items: stretch;
  }

  .studio-layout {
    grid-template-columns: 1fr;
  }

  .drawer-column {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
  }

  .signal-top {
    grid-template-columns: 1fr;
  }

  .pedal-stage {
    max-width: none;
    justify-self: stretch;
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100vw - 16px, 100%);
  }

  .hero,
  .visual-panel,
  .rhythm-panel,
  .drawer summary,
  .drawer > .control-grid,
  .drawer-stack {
    padding-left: 14px;
    padding-right: 14px;
  }

  .meter-stack,
  .fx-strip,
  .pedal-face {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .sequence-grid {
    grid-template-columns: minmax(78px, 92px) repeat(16, minmax(34px, 1fr));
    overflow-x: auto;
    min-width: 820px;
    padding-bottom: 4px;
  }
}

@media (max-width: 620px) {
  .signal-head,
  .signal-head-actions,
  .header-actions,
  .tape-head,
  .utility-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .utility-cluster {
    flex-wrap: wrap;
  }

  .meter-stack,
  .fx-strip,
  .pedal-face,
  .control-grid,
  .control-grid-wide {
    grid-template-columns: 1fr;
  }

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

  .hero-title-row {
    align-items: flex-start;
  }

  .keyboard-grid {
    height: 194px;
  }

  .take-item {
    grid-template-columns: 1fr;
  }
}
