:root {
  color-scheme: dark;
  --bg: #050606;
  --rail: #0c0e0d;
  --rail-2: #121514;
  --line: #2b302c;
  --line-strong: #5d6862;
  --text: #f2f5ef;
  --muted: #9aa39b;
  --dim: #69726b;
  --panel: #2f3431;
  --panel-dark: #151918;
  --cap: #dce0d9;
  --blue: #b5cbff;
  --green: #bfe6d0;
  --warn: #f3df8b;
  --status-h: 132px;
  --detail-h: 30px;
  --rail-w: 286px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, sans-serif;
  overflow: hidden;
  max-width: 100vw;
}

body.review-mode {
  overflow: visible;
}

.app {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  grid-template-rows: var(--status-h) minmax(0, 1fr) var(--detail-h);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 32%),
    var(--bg);
}

.preset-rail {
  grid-row: 1 / -1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 220px),
    var(--rail);
}

.rail-head {
  padding: 16px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.rail-title {
  margin-bottom: 12px;
  color: var(--text);
  font: 700 13px/1 "Avenir Next Condensed", "Helvetica Neue", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-label {
  display: block;
  margin-bottom: 6px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#preset-search {
  width: 100%;
  height: 34px;
  color: var(--text);
  background: #060706;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  outline: none;
}

#preset-search:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 2px rgba(181, 203, 255, 0.12);
}

.preset-list {
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

.preset-row {
  width: 100%;
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 4px;
  margin: 0;
  padding: 7px 9px 7px 11px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 3px;
  text-align: left;
  cursor: pointer;
}

.preset-row:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
}

.preset-row:focus-visible {
  outline: 2px solid rgba(181, 203, 255, 0.65);
  outline-offset: 1px;
}

.preset-row.selected {
  background: rgba(181, 203, 255, 0.1);
  border-color: rgba(181, 203, 255, 0.28);
  border-left-color: var(--blue);
}

.preset-row-main,
.preset-row-meta {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.preset-row-slot {
  color: var(--blue);
  font: 700 12px/1 "SF Mono", Menlo, Consolas, monospace;
}

.preset-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.preset-row-meta {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(430px, 34vw, 620px);
  align-items: center;
  gap: 22px;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 65%),
    #080909;
}

.preset-status {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 18px;
}

.slot-readout,
.name-readout,
.fx-readout {
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
  letter-spacing: 0;
}

.slot-readout {
  color: var(--blue);
  font-size: clamp(24px, 3.3vw, 58px);
  font-weight: 800;
  line-height: 0.95;
  text-shadow: 0 0 10px rgba(132, 170, 255, 0.45);
}

.name-readout {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: clamp(30px, 4.3vw, 72px);
  font-weight: 800;
  line-height: 0.95;
}

.fx-readout {
  max-width: none;
  color: var(--green);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  min-width: 0;
  text-transform: uppercase;
}

.fx-card {
  min-width: 0;
  min-height: 74px;
  padding: 8px 9px 7px;
  border: 1px solid rgba(191, 230, 208, 0.22);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(191, 230, 208, 0.08), rgba(191, 230, 208, 0.015)),
    #070a08;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.fx-card.off {
  color: var(--muted);
  border-color: rgba(154, 163, 155, 0.16);
  background: #070807;
}

.fx-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
}

.fx-label {
  color: var(--blue);
  font: 800 11px/1 "SF Mono", Menlo, Consolas, monospace;
}

.fx-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font: 800 12px/1 "SF Mono", Menlo, Consolas, monospace;
}

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

.fx-value {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.fx-value-label,
.fx-empty {
  color: var(--muted);
  font: 700 9px/1 "Avenir Next", "Helvetica Neue", sans-serif;
  letter-spacing: 0.06em;
}

.fx-value-number {
  color: var(--green);
  font: 800 12px/1 "SF Mono", Menlo, Consolas, monospace;
}

.fx-empty {
  display: block;
  margin-top: 9px;
}

.detail-strip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  background: #070807;
}

.details-toggle {
  appearance: none;
  min-height: 22px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: 700 10px/1 "Avenir Next", "Helvetica Neue", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.details-readout {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.details-open {
  --detail-h: 54px;
}

[hidden] {
  display: none !important;
}

.help-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(181, 203, 255, 0.42);
  border-radius: 50%;
  color: var(--blue);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.08), transparent 35%),
    #0a0d0c;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font: 900 22px/1 "SF Mono", Menlo, Consolas, monospace;
  cursor: pointer;
}

.help-button:hover,
.help-button:focus-visible {
  border-color: rgba(181, 203, 255, 0.72);
  outline: none;
  box-shadow:
    0 0 0 3px rgba(181, 203, 255, 0.16),
    0 14px 32px rgba(0, 0, 0, 0.5);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 8%, rgba(181, 203, 255, 0.16), transparent 30%),
    rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
}

.intro-card,
.quick-card {
  width: min(1040px, calc(100vw - 40px));
  border: 1px solid rgba(216, 225, 220, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 180px),
    #0c0f0e;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.intro-card {
  position: relative;
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: clamp(22px, 2.8vw, 36px);
}

.modal-close {
  appearance: none;
  position: absolute;
  top: 18px;
  right: 18px;
  height: 34px;
  padding: 0 13px;
  color: var(--muted);
  background: #070807;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 800 10px/1 "Avenir Next", "Helvetica Neue", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible,
.intro-dismiss:focus-visible,
.quick-result:focus-visible,
#quick-input:focus {
  outline: none;
  border-color: rgba(181, 203, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(181, 203, 255, 0.14);
}

.intro-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font: 900 14px/1 "SF Mono", Menlo, Consolas, monospace;
  text-transform: uppercase;
}

.intro-card h1 {
  max-width: 820px;
  margin: 0 0 22px;
  color: var(--text);
  font: 900 clamp(36px, 4.2vw, 58px) / 0.92 "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro-section {
  max-width: 900px;
}

.intro-section h2,
.shortcut-panel h2,
.future-panel h2 {
  margin: 0 0 12px;
  color: var(--text);
  font: 900 clamp(18px, 1.8vw, 24px) / 1 "Avenir Next", "Helvetica Neue", sans-serif;
  letter-spacing: 0;
}

.intro-copy {
  color: #d9ded7;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.intro-copy p {
  margin: 0 0 13px;
}

.intro-lower {
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(300px, 1.05fr);
  gap: 24px;
  margin-top: 18px;
  align-items: start;
}

.shortcut-panel,
.future-panel {
  min-width: 0;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.shortcut-tile {
  min-height: 48px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 7px 12px;
  border: 1px solid rgba(181, 203, 255, 0.22);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(181, 203, 255, 0.1), rgba(181, 203, 255, 0.02)),
    #080a09;
}

.shortcut-tile kbd {
  color: var(--blue);
  font: 900 clamp(22px, 2.3vw, 32px) / 0.95 "SF Mono", Menlo, Consolas, monospace;
  text-shadow: 0 0 10px rgba(132, 170, 255, 0.36);
  white-space: nowrap;
}

.shortcut-tile span {
  color: var(--text);
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 800;
  line-height: 1.22;
}

.future-card {
  padding: 13px 16px;
  border: 1px solid rgba(216, 225, 220, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
}

.future-card ul {
  margin: 0;
  padding-left: 19px;
  color: #d9ded7;
  font-size: clamp(15px, 1.15vw, 16px);
  line-height: 1.42;
}

.future-card li + li {
  margin-top: 7px;
}

.intro-dismiss {
  appearance: none;
  margin-top: 2px;
  min-height: 42px;
  padding: 0 18px;
  color: #071009;
  background: var(--green);
  border: 1px solid rgba(191, 230, 208, 0.8);
  border-radius: 5px;
  font: 900 13px/1 "Avenir Next", "Helvetica Neue", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.quick-card {
  max-width: 680px;
  padding: 18px;
}

.quick-card label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font: 800 11px/1 "Avenir Next", "Helvetica Neue", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#quick-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  color: var(--text);
  background: #050606;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font: 800 23px/1 "SF Mono", Menlo, Consolas, monospace;
}

.quick-results {
  max-height: 390px;
  overflow: auto;
  margin-top: 12px;
}

.quick-result {
  appearance: none;
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
}

.quick-result.selected,
.quick-result:hover {
  background: rgba(181, 203, 255, 0.1);
  border-color: rgba(181, 203, 255, 0.26);
}

.quick-slot {
  color: var(--blue);
  font: 900 18px/1 "SF Mono", Menlo, Consolas, monospace;
}

.quick-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
}

.quick-meta,
.quick-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-empty {
  padding: 22px 4px 6px;
}

.stage {
  min-width: 0;
  min-height: 0;
  padding: 16px 18px;
  overflow: auto;
  display: grid;
  justify-items: center;
  align-content: center;
}

.review-mode .preset-rail,
.review-mode .status-strip,
.review-mode .detail-strip,
.review-mode .help-button,
.review-mode .modal-backdrop {
  display: none;
}

.review-mode .app {
  display: block;
  height: auto;
  min-height: auto;
  overflow: visible;
}

.review-mode .stage {
  padding: 0;
  display: block;
  overflow: visible;
}

.review-mode .panel {
  width: min(2400px, 100vw);
}

.panel {
  width: calc(100vw - var(--rail-w) - 36px);
  max-width: 3200px;
  aspect-ratio: 2000 / 1200;
  position: relative;
  background: #050605;
  container-type: inline-size;
}

@media (max-height: 1500px) {
  .panel {
    max-width: 2100px;
  }
}

@media (max-height: 1000px) {
  .panel {
    max-width: 1380px;
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  :root {
    --status-h: 158px;
  }

  .status-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 980px) {
  :root {
    --rail-w: 100vw;
    --status-h: 146px;
  }

  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 168px var(--status-h) minmax(0, 1fr) var(--detail-h);
  }

  .preset-rail {
    grid-row: 1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-head {
    padding: 10px 12px 8px;
  }

  .rail-title,
  .search-label {
    display: none;
  }

  .preset-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
  }

  .preset-row {
    width: 190px;
    flex: 0 0 190px;
  }

  .status-strip {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 6px;
    padding: 10px 12px;
  }

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

  .fx-card {
    min-height: 58px;
    padding: 6px;
  }

  .fx-name,
  .fx-value-number {
    font-size: 10px;
  }

  .stage {
    padding: 10px;
  }

  .panel {
    width: calc(100vw - 20px);
    max-width: none;
  }
}

@media (max-height: 860px) and (min-width: 761px) {
  .modal-backdrop {
    padding: 12px;
  }

  .intro-card {
    max-height: calc(100vh - 24px);
    padding: 18px 24px;
  }

  .intro-card h1 {
    margin-bottom: 12px;
    font-size: clamp(32px, 3.4vw, 44px);
  }

  .intro-copy {
    font-size: 15px;
    line-height: 1.32;
  }

  .intro-copy p {
    margin-bottom: 8px;
  }

  .intro-lower {
    gap: 20px;
    margin-top: 12px;
  }

  .intro-section h2,
  .shortcut-panel h2,
  .future-panel h2 {
    margin-bottom: 8px;
    font-size: 20px;
  }

  .shortcut-grid {
    gap: 6px;
  }

  .shortcut-tile {
    min-height: 38px;
    padding: 5px 11px;
  }

  .shortcut-tile kbd {
    font-size: 26px;
  }

  .future-card {
    padding: 10px 14px;
  }

  .future-card ul {
    font-size: 15px;
    line-height: 1.34;
  }

  .future-card li + li {
    margin-top: 5px;
  }

  .intro-dismiss {
    min-height: 38px;
    margin-top: 8px;
  }
}

@media (max-width: 760px) {
  .modal-backdrop {
    align-items: stretch;
    justify-items: start;
    overflow: auto;
    padding: 14px;
  }

  .intro-card {
    width: 362px;
    min-width: 0;
    max-width: calc(100% - 28px);
    max-height: calc(100vh - 28px);
    padding: 22px;
    overflow-x: hidden;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }

  .intro-card h1 {
    max-width: calc(100% - 76px);
    font-size: clamp(31px, 10.5vw, 42px);
    overflow-wrap: anywhere;
  }

  .intro-lower,
  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .shortcut-tile {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .modal-backdrop {
    padding: 14px;
  }

  .intro-card {
    width: 362px;
    padding: 22px;
  }

  .intro-card h1 {
    font-size: 42px;
  }

  .intro-copy {
    font-size: 16px;
  }

  .shortcut-tile {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}

.base,
.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.base {
  display: block;
  user-select: none;
}

.layer {
  pointer-events: none;
}

.debug-layer {
  opacity: 0;
}

.show-debug .debug-layer {
  opacity: 1;
}

.sprite {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.section-line {
  background: rgba(216, 225, 220, 0.78);
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.section-heading {
  color: rgba(225, 232, 229, 0.9);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(8px, 0.82cqw, 18px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.neutral-knob {
  width: 2.9%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(95, 105, 102, 0.74) 0 16%, transparent 17%),
    radial-gradient(circle at 50% 58%, #252b29 0 50%, #111514 74%, #050606 100%);
  box-shadow:
    inset 0 5px 8px rgba(255, 255, 255, 0.05),
    inset 0 -8px 12px rgba(0, 0, 0, 0.58),
    0 6px 11px rgba(0, 0, 0, 0.42);
}

.neutral-knob::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 18%;
  width: 5%;
  height: 33%;
  border-radius: 99px;
  background: rgba(102, 119, 115, 0.45);
  transform: translateX(-50%);
}

.knob-pointer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4.8%;
  height: 36%;
  border-radius: 999px;
  background: linear-gradient(#a5b2ad, #63736e);
  transform: translate(-50%, -100%) rotate(var(--angle));
  transform-origin: 50% 100%;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
}

.switch-slot {
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 20% 80%, rgba(255, 255, 255, 0.04)),
    #060807;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.06),
    inset 0 -2px 5px rgba(0, 0, 0, 0.9),
    0 2px 4px rgba(0, 0, 0, 0.38);
}

.switch-slot.horizontal {
  border-radius: 10px;
}

.lever-cap {
  border-radius: 999px;
  background:
    linear-gradient(90deg, #9da59f 0, #f8faf6 36%, #dfe3dc 58%, #828c86 100%);
  box-shadow:
    inset 2px 0 3px rgba(255, 255, 255, 0.6),
    inset 0 -3px 6px rgba(0, 0, 0, 0.18),
    0 2px 4px rgba(0, 0, 0, 0.68);
}

.lever-cap.vertical {
  border-radius: 999px;
}

.lever-cap.horizontal {
  border-radius: 999px;
  background:
    linear-gradient(#f8faf6 0, #e0e4dd 54%, #9ba49e 100%);
}

.led {
  border-radius: 50%;
}

.led.off {
  background:
    radial-gradient(circle at 35% 30%, rgba(150, 160, 158, 0.48) 0 18%, transparent 20%),
    radial-gradient(circle, #151917 0 48%, #060706 68%, #303632 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.led.on {
  background:
    radial-gradient(circle at 45% 38%, #f7fbff 0 28%, #b8d0ff 42%, #4968a7 72%, #1b2436 100%);
  box-shadow:
    0 0 7px rgba(149, 186, 255, 0.95),
    0 0 15px rgba(97, 145, 244, 0.62);
}

.seq-step,
.panel-button {
  border-radius: 4px;
  background:
    linear-gradient(#202730, #0d1116);
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.08),
    inset 0 -3px 4px rgba(0, 0, 0, 0.5);
}

.seq-step.on {
  background:
    linear-gradient(#f2f7ff 0 18%, #b8ccff 19% 62%, #526ca8 100%);
  box-shadow:
    inset 0 1px 4px rgba(255, 255, 255, 0.72),
    inset 0 -4px 5px rgba(41, 56, 86, 0.72),
    0 0 12px rgba(117, 165, 255, 0.8);
}

.display-mask {
  border-radius: 4px;
  background:
    linear-gradient(180deg, #090c0e, #020303);
  border: 1px solid rgba(65, 72, 73, 0.75);
  box-shadow:
    inset 0 0 12px rgba(0, 0, 0, 0.95),
    0 1px 2px rgba(255, 255, 255, 0.04);
}

.display-text {
  display: grid;
  place-items: center;
  color: #d4deff;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: clamp(8px, 0.72cqw, 16px);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-shadow:
    0 0 6px rgba(143, 172, 255, 0.95),
    0 0 14px rgba(95, 133, 240, 0.8);
  letter-spacing: 0;
}

.sprite[data-label]::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  display: none;
  transform: translateX(-50%);
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  font-size: clamp(8px, 0.7cqw, 12px);
  white-space: nowrap;
  z-index: 10;
}

.show-debug .sprite[data-label]::after {
  display: block;
}

.grid-section,
.grid-control,
.grid-label,
.grid-print-label,
.grid-led,
.grid-knob-state,
.grid-switch-cap,
.grid-step.on,
.grid-display-text,
.grid-print-sprite,
.grid-step-group-mark,
.grid-bracket-mark {
  position: absolute;
}

.grid-section {
  border-left: 2px solid rgba(215, 224, 220, 0.82);
  opacity: 1;
  pointer-events: none;
}

.show-debug .grid-section {
  opacity: 1;
  border: 2px solid var(--section-color);
  background: color-mix(in srgb, var(--section-color) 18%, transparent);
}

.grid-debug-box {
  position: absolute;
  border: 1px solid var(--debug-color, rgba(255, 255, 255, 0.85));
  background: color-mix(in srgb, var(--debug-color, #fff) 10%, transparent);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.38);
}

.grid-debug-box.section {
  border-width: 2px;
  background: transparent;
}

.grid-debug-box.label,
.grid-debug-box.print {
  --debug-color: rgba(120, 220, 255, 0.92);
  border-style: dashed;
  background: rgba(120, 220, 255, 0.1);
}

.grid-debug-box.print {
  --debug-color: rgba(255, 235, 100, 0.92);
}

.grid-debug-box::after,
.grid-debug-point::after {
  content: attr(data-debug-id);
  position: absolute;
  left: 0;
  top: -10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 1px 2px;
  font: 600 clamp(3px, 0.25cqw, 5.5px) Arial, Helvetica, sans-serif;
  line-height: 1;
  white-space: nowrap;
  display: none;
}

.show-debug-labels .grid-debug-box::after,
.show-debug-labels .grid-debug-point::after {
  display: block;
}

.grid-debug-point {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--debug-color, #fff);
  background: rgba(255, 255, 255, 0.75);
}

.grid-label {
  display: grid;
  place-items: start center;
  color: rgba(225, 231, 228, 0.92);
  font: 700 clamp(5px, 0.47cqw, 9.5px) Arial, Helvetica, sans-serif;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: pre-line;
  pointer-events: none;
}

.grid-print-label {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(225, 231, 228, 0.92);
  font: 700 clamp(5px, 0.45cqw, 9px) Arial, Helvetica, sans-serif;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  white-space: pre-line;
  pointer-events: none;
}

.grid-print-label.scale {
  display: grid;
  align-content: space-between;
  justify-items: start;
  font-size: clamp(4px, 0.32cqw, 6.4px);
  line-height: 1;
}

.grid-print-label[data-label-id="voiceModeText"],
.grid-print-label[data-label-id="lfoModeText"],
.grid-print-label[data-label-id="fxTypeText"],
.grid-print-label[data-label-id="fxOnText"] {
  font-size: clamp(3.8px, 0.3cqw, 6px);
}

.grid-print-label[data-label-id="voiceModeText"] {
  font-size: clamp(3.5px, 0.26cqw, 5.2px);
}

.grid-print-label[data-label-id="voiceModeText"],
.grid-print-label[data-label-id="egTargetText"],
.grid-print-label[data-label-id="lfoTargetText"],
.grid-print-label[data-label-id="lfoModeText"],
.grid-print-label[data-label-id="fxTypeText"],
.grid-print-label[data-label-id="fxOnText"] {
  justify-items: start;
}

.grid-print-label[data-label-id="egTargetText"],
.grid-print-label[data-label-id="lfoTargetText"] {
  font-size: clamp(3.8px, 0.31cqw, 6.2px);
}

.grid-print-label.controlLabel {
  font-size: clamp(5px, 0.38cqw, 7.5px);
  line-height: 1;
}

.grid-print-label.heading {
  font-size: clamp(7px, 0.6cqw, 12px);
}

.grid-print-sprite {
  display: block;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.grid-control {
  pointer-events: none;
}

.grid-knob {
  border-radius: 50%;
  background: url("../assets/generated/panel-control-sprites/knob-base.png") center / 100% 100% no-repeat;
}

.grid-knob.static::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 18%;
  width: 5.5%;
  height: 34%;
  border-radius: 999px;
  background: linear-gradient(#98a9a3, #667872);
  transform: translateX(-50%);
}

.grid-knob-state::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 18%;
  width: 5.5%;
  height: 34%;
  border-radius: 999px;
  background: linear-gradient(#98a9a3, #667872);
  transform: translateX(-50%);
}

.grid-knob-state {
  border-radius: 50%;
  pointer-events: auto;
}

.grid-knob-state::after {
  transform: translateX(-50%) rotate(var(--angle));
  transform-origin: 50% 94%;
  background: linear-gradient(#aab5b0, #65736f);
}

.grid-symbol-stack {
  position: absolute;
  display: grid;
  align-content: space-between;
  justify-items: center;
  pointer-events: none;
}

.grid-symbol {
  display: block;
  width: 100%;
  height: 30%;
  overflow: visible;
  fill: none;
  stroke: rgba(238, 242, 239, 0.98);
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.grid-symbol path {
  vector-effect: non-scaling-stroke;
}

.grid-step-group-mark,
.grid-bracket-mark {
  height: max(1px, 0.12cqw);
  background: rgba(215, 224, 220, 0.82);
  box-shadow: 0 0 1px rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.grid-step-group-mark::before,
.grid-step-group-mark::after,
.grid-bracket-mark::before,
.grid-bracket-mark::after {
  content: "";
  position: absolute;
  top: 0;
  width: max(1px, 0.08cqw);
  height: max(4px, 0.36cqw);
  background: rgba(215, 224, 220, 0.82);
}

.grid-step-group-mark::before,
.grid-bracket-mark::before {
  left: 0;
}

.grid-step-group-mark::after,
.grid-bracket-mark::after {
  right: 0;
}

.grid-switch {
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07), transparent 22% 78%, rgba(255, 255, 255, 0.04)),
    #050706;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.05),
    inset 0 -2px 6px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.22);
}

.grid-switch.horizontal {
  border-radius: 9px;
}

.grid-switch-cap {
  border-radius: 999px;
  background: url("../assets/generated/panel-control-sprites/vertical-cap.png") center / 100% 100% no-repeat;
  pointer-events: auto;
}

.grid-switch-cap.horizontal {
  background-image: url("../assets/generated/panel-control-sprites/horizontal-cap.png");
}

.grid-led {
  border-radius: 50%;
}

.grid-led.off {
  background: url("../assets/generated/panel-control-sprites/led-off.png") center / 100% 100% no-repeat;
}

.grid-led.on {
  background: url("../assets/generated/panel-control-sprites/led-on.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 0 4px rgba(149, 186, 255, 0.62));
}

.grid-button,
.grid-step {
  border-radius: 4px;
  background: url("../assets/generated/panel-control-sprites/button-off.png") center / 100% 100% no-repeat;
}

.grid-step.on {
  border-radius: 4px;
  background: url("../assets/generated/panel-control-sprites/step-on.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 0 4px rgba(117, 165, 255, 0.6));
  pointer-events: none;
}

.grid-step {
  background-image: url("../assets/generated/panel-control-sprites/step-off.png");
}

.grid-display {
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(34, 38, 38, 0.72), rgba(4, 5, 5, 0.96) 18% 82%, rgba(18, 20, 20, 0.86)),
    #030404;
  border: 1px solid rgba(6, 8, 8, 0.95);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.05),
    inset 0 -5px 7px rgba(0, 0, 0, 0.9);
}

.grid-display.scope::before {
  content: "";
  position: absolute;
  left: 11.5%;
  top: 20.5%;
  width: 77%;
  height: 55%;
  background: #000;
  border: 1px solid rgba(45, 50, 50, 0.7);
  box-shadow: inset 0 0 9px rgba(0, 0, 0, 0.98);
}

.grid-display.scope::after {
  content: "";
  position: absolute;
  left: 1%;
  right: 1%;
  bottom: 0;
  height: 5%;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.08));
}

.grid-display-text {
  display: grid;
  place-items: center;
  color: #d4deff;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: clamp(7px, 0.72cqw, 16px);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-shadow:
    0 0 6px rgba(143, 172, 255, 0.95),
    0 0 14px rgba(95, 133, 240, 0.8);
}

.grid-display-text.multi {
  font-size: 12px;
}

.grid-display-text.waveform {
  font-size: 14px;
  letter-spacing: 0;
}

.grid-joystick {
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 45%, #121514 0 16%, #050606 17% 34%, transparent 35%),
    radial-gradient(circle, transparent 0 38%, #171b1a 39% 62%, #050606 70% 100%);
  box-shadow: inset 0 0 7px rgba(255, 255, 255, 0.05), 0 4px 9px rgba(0, 0, 0, 0.55);
}

.grid-knob-state[data-label]::before,
.grid-switch-cap[data-label]::before {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  display: none;
  transform: translateX(-50%);
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: white;
  font-size: clamp(8px, 0.7cqw, 12px);
  white-space: nowrap;
  z-index: 20;
}

.show-state-labels .grid-knob-state[data-label]::before,
.show-state-labels .grid-switch-cap[data-label]::before {
  display: block;
}
