:root {
  --panel: rgba(12, 16, 18, 0.78);
  --panel-edge: #2a4a3c;
  --ink: #b8f5d4;
  --accent: #5dffc2;
  --accent-dim: rgba(93, 255, 194, 0.35);
  --danger: #ff5a5a;
  --jack: #0a0e0c;
  --radius: 6px;
  --gap: 4px;
  --led-color: var(--accent);

  --tone-source: #e8c547;
  --tone-source-dim: rgba(232, 197, 71, 0.35);
  --tone-source-edge: #5a4a1e;
  --tone-media: #e89a6a;
  --tone-media-dim: rgba(232, 154, 106, 0.35);
  --tone-media-edge: #5a3a28;
  --tone-filter: #e86b8a;
  --tone-filter-dim: rgba(232, 107, 138, 0.35);
  --tone-filter-edge: #5a2838;
  --tone-process: #b89af0;
  --tone-process-dim: rgba(184, 154, 240, 0.35);
  --tone-process-edge: #3a2a5a;
  --tone-mod: #7dffb3;
  --tone-mod-dim: rgba(125, 255, 179, 0.35);
  --tone-mod-edge: #2a4a38;
  --tone-time: #5eb8e8;
  --tone-time-dim: rgba(94, 184, 232, 0.35);
  --tone-time-edge: #1e3a4a;
  --tone-control: #7a9fff;
  --tone-control-dim: rgba(122, 159, 255, 0.35);
  --tone-control-edge: #283a5a;
  --tone-visual: #c9a0e8;
  --tone-visual-dim: rgba(201, 160, 232, 0.35);
  --tone-visual-edge: #3a2a4a;
}

* {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  box-sizing: border-box;
  user-select: none;
}

body,
html,
app {
  margin: 0px;
  padding: 0px;
  overflow: hidden;
  border: none;
}
input {
  outline: none;
}
button,
input[type="checkbox"] {
  cursor: pointer;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

component select,
component select option,
.ui-select,
.ui-select option {
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.55) !important;
  max-width: calc(100% - 7px);
  outline: none;
  color: var(--ink);
  height: 22px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: capitalize;
  padding-left: 4px;
}

component {
  color: var(--ink);
}

app canvas.linesCanvas {
  z-index: 1;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  pointer-events: none;
  touch-action: none;
}

.line {
  position: absolute;
  width: 1px;
  margin-top: -1px;
  background-color: red;
  pointer-events: none;
  border-radius: 31px;
  border: 2px solid darkred;
  touch-action: none;
}

app {
  --scale: 1;
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100vw;
  background-image: url(carpet.jpg);
  background-position: 0 0;
  background-size: 100% auto;
  height: 100vh;
  border-top: 1px solid gray;
}

app .mainContainer {
  position: absolute;
  width: 400vw;
  height: 400vh;
  z-index: 1;
  top: -500px;
  left: -500px;
  filter: blur(0px);
  background-size: 25%;
  transition: filter 0.1s ease-out;
}

.remote-cursor {
  --cursor-hue: 120;
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 50%;
  background: hsl(var(--cursor-hue), 85%, 55%);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: 50;
  transform: translateZ(0);
}

.remote-cursor-label {
  position: absolute;
  left: 12px;
  top: -2px;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 2px;
  color: #111;
  background: hsl(var(--cursor-hue), 85%, 70%);
  pointer-events: none;
}

.paletteOverlay {
  position: fixed;
  inset: 0;
  z-index: 4;
  background: rgba(5, 8, 7, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 200ms ease-out,
    visibility 200ms;
}
.paletteOverlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.buttons {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  width: min(640px, 92vw);
  max-height: min(74vh, 620px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  touch-action: none;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease-out,
    visibility 220ms;
  background: linear-gradient(
    180deg,
    rgba(8, 12, 14, 0.9) 0%,
    rgba(12, 16, 18, 0.94) 28%,
    rgba(12, 16, 18, 0.97) 100%
  );
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(93, 255, 194, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.buttons.visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.buttons.modulePalette::before {
  content: "";
  display: block;
  height: 3px;
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    var(--tone-source) 0%,
    var(--tone-media) 14%,
    var(--tone-filter) 28%,
    var(--tone-process) 42%,
    var(--tone-mod) 56%,
    var(--tone-time) 70%,
    var(--tone-control) 84%,
    var(--tone-visual) 100%
  );
  opacity: 0.85;
}

.paletteHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 12px 8px 0 16px;
}
.paletteTitle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--ink);
}
.paletteClose {
  appearance: none;
  -webkit-appearance: none;
  pointer-events: all;
  touch-action: auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  color: rgba(184, 245, 212, 0.55);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 120ms ease,
    color 120ms ease;
}
.paletteClose:hover {
  color: var(--accent);
  background: rgba(93, 255, 194, 0.1);
}

.paletteSearchWrap {
  position: sticky;
  top: 0;
  z-index: 2;
  flex-shrink: 0;
  padding: 10px 14px 8px;
  background: linear-gradient(
    180deg,
    rgba(12, 16, 18, 0.98) 0%,
    rgba(12, 16, 18, 0.88) 100%
  );
  border-bottom: 1px solid rgba(42, 74, 60, 0.65);
  backdrop-filter: blur(8px);
}

.paletteSearch {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 34px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%235dffc2' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E")
      no-repeat 11px 50%,
    rgba(0, 0, 0, 0.45);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}
.paletteSearch::placeholder {
  color: rgba(184, 245, 212, 0.45);
}
.paletteSearch:focus {
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.35),
    0 0 0 2px var(--accent-dim);
}

.paletteChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 14px 10px;
  border-bottom: 1px solid rgba(42, 74, 60, 0.45);
}

.paletteChip {
  appearance: none;
  -webkit-appearance: none;
  pointer-events: all;
  touch-action: auto;
  height: 26px;
  padding: 0 11px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: rgba(184, 245, 212, 0.72);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}
.paletteChip:hover {
  color: var(--ink);
  border-color: rgba(93, 255, 194, 0.35);
  background: rgba(10, 24, 18, 0.85);
}
.paletteChip.active {
  color: #0a0e0c;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-dim);
}
.paletteChip.tone-source.active {
  color: #1a1408;
  background: var(--tone-source);
  border-color: var(--tone-source);
  box-shadow: 0 0 12px var(--tone-source-dim);
}
.paletteChip.tone-media.active {
  color: #1a1008;
  background: var(--tone-media);
  border-color: var(--tone-media);
  box-shadow: 0 0 12px var(--tone-media-dim);
}
.paletteChip.tone-filter.active {
  color: #1a0810;
  background: var(--tone-filter);
  border-color: var(--tone-filter);
  box-shadow: 0 0 12px var(--tone-filter-dim);
}
.paletteChip.tone-process.active {
  color: #120a1a;
  background: var(--tone-process);
  border-color: var(--tone-process);
  box-shadow: 0 0 12px var(--tone-process-dim);
}
.paletteChip.tone-mod.active {
  color: #081a10;
  background: var(--tone-mod);
  border-color: var(--tone-mod);
  box-shadow: 0 0 12px var(--tone-mod-dim);
}
.paletteChip.tone-time.active {
  color: #081418;
  background: var(--tone-time);
  border-color: var(--tone-time);
  box-shadow: 0 0 12px var(--tone-time-dim);
}
.paletteChip.tone-control.active {
  color: #0a1018;
  background: var(--tone-control);
  border-color: var(--tone-control);
  box-shadow: 0 0 12px var(--tone-control-dim);
}
.paletteChip.tone-visual.active {
  color: #140a1a;
  background: var(--tone-visual);
  border-color: var(--tone-visual);
  box-shadow: 0 0 12px var(--tone-visual-dim);
}
.paletteChip.tone-meta.active {
  color: #0a0e0c;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}

.paletteGrid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
  padding: 4px 14px 16px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-edge) transparent;
}

.paletteSectionHeader {
  grid-column: 1 / -1;
  position: sticky;
  top: -1px;
  z-index: 1;
  margin: 8px 0 -2px;
  padding: 6px 2px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    rgba(12, 16, 18, 1) 0%,
    rgba(12, 16, 18, 0.92) 75%,
    rgba(12, 16, 18, 0) 100%
  );
}
.paletteSectionHeader:first-of-type {
  margin-top: 0;
}
.paletteGrid::-webkit-scrollbar {
  width: 6px;
}
.paletteGrid::-webkit-scrollbar-thumb {
  background: var(--panel-edge);
  border-radius: 3px;
}

.paletteCard {
  appearance: none;
  -webkit-appearance: none;
  pointer-events: all;
  touch-action: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  text-align: left;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: 0.2px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    transform 100ms ease,
    border-color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease;
}
.paletteCard:hover {
  transform: translateY(-1px);
  background: rgba(10, 24, 18, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 4px 14px rgba(0, 0, 0, 0.35);
}
.paletteCard:active {
  transform: translateY(0);
}
.paletteCard:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 2px var(--accent-dim);
}

.paletteCardDot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px currentColor;
}
.paletteCard.tone-source {
  border-color: var(--tone-source-edge);
}
.paletteCard.tone-source .paletteCardDot {
  background: var(--tone-source);
  box-shadow: 0 0 8px var(--tone-source-dim);
}
.paletteCard.tone-source:hover {
  border-color: var(--tone-source);
  color: var(--tone-source);
}
.paletteCard.tone-media {
  border-color: var(--tone-media-edge);
}
.paletteCard.tone-media .paletteCardDot {
  background: var(--tone-media);
  box-shadow: 0 0 8px var(--tone-media-dim);
}
.paletteCard.tone-media:hover {
  border-color: var(--tone-media);
  color: var(--tone-media);
}
.paletteCard.tone-filter {
  border-color: var(--tone-filter-edge);
}
.paletteCard.tone-filter .paletteCardDot {
  background: var(--tone-filter);
  box-shadow: 0 0 8px var(--tone-filter-dim);
}
.paletteCard.tone-filter:hover {
  border-color: var(--tone-filter);
  color: var(--tone-filter);
}
.paletteCard.tone-process {
  border-color: var(--tone-process-edge);
}
.paletteCard.tone-process .paletteCardDot {
  background: var(--tone-process);
  box-shadow: 0 0 8px var(--tone-process-dim);
}
.paletteCard.tone-process:hover {
  border-color: var(--tone-process);
  color: var(--tone-process);
}
.paletteCard.tone-mod {
  border-color: var(--tone-mod-edge);
}
.paletteCard.tone-mod .paletteCardDot {
  background: var(--tone-mod);
  box-shadow: 0 0 8px var(--tone-mod-dim);
}
.paletteCard.tone-mod:hover {
  border-color: var(--tone-mod);
  color: var(--tone-mod);
}
.paletteCard.tone-time {
  border-color: var(--tone-time-edge);
}
.paletteCard.tone-time .paletteCardDot {
  background: var(--tone-time);
  box-shadow: 0 0 8px var(--tone-time-dim);
}
.paletteCard.tone-time:hover {
  border-color: var(--tone-time);
  color: var(--tone-time);
}
.paletteCard.tone-control {
  border-color: var(--tone-control-edge);
}
.paletteCard.tone-control .paletteCardDot {
  background: var(--tone-control);
  box-shadow: 0 0 8px var(--tone-control-dim);
}
.paletteCard.tone-control:hover {
  border-color: var(--tone-control);
  color: var(--tone-control);
}
.paletteCard.tone-visual {
  border-color: var(--tone-visual-edge);
}
.paletteCard.tone-visual .paletteCardDot {
  background: var(--tone-visual);
  box-shadow: 0 0 8px var(--tone-visual-dim);
}
.paletteCard.tone-visual:hover {
  border-color: var(--tone-visual);
  color: var(--tone-visual);
}
.paletteCard.tone-meta .paletteCardDot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-dim);
}
.paletteCard.tone-meta:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.paletteCardText {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.paletteCardLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.paletteCardTone {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(184, 245, 212, 0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paletteEmpty {
  grid-column: 1 / -1;
  padding: 28px 12px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: rgba(184, 245, 212, 0.45);
}

.historyPanel {
  position: fixed;
  top: calc(44px + env(safe-area-inset-top, 0px));
  right: 8px;
  width: 280px;
  z-index: 2;
  pointer-events: none;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 200ms ease-out,
    opacity 200ms ease-out,
    visibility 200ms;
}
.historyPanel.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}
.cablePanel,
.perfPanel {
  position: fixed;
  top: calc(44px + env(safe-area-inset-top, 0px));
  right: 8px;
  width: 280px;
  z-index: 2;
  pointer-events: none;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 200ms ease-out,
    opacity 200ms ease-out,
    visibility 200ms;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  padding: 10px;
  color: var(--ink);
  font-size: 12px;
  max-height: min(60vh, 420px);
  box-sizing: border-box;
}
.cablePanel.visible,
.perfPanel.visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}
.cablePanel label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.cablePanel label span {
  opacity: 0.8;
  color: var(--accent);
}
.cablePanel input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 6px;
}
.perfHead {
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.9;
}
.perfSummary {
  line-height: 1.45;
  opacity: 0.95;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--panel-edge);
}
.perfSummary .warn {
  color: var(--danger);
}
.perfList {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}
.perfHint {
  margin-top: 6px;
  font-size: 10px;
  opacity: 0.65;
  line-height: 1.35;
}
.perfHint.warn {
  color: var(--danger);
  opacity: 0.95;
}
.perfRow {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 52px 52px 44px;
  gap: 6px;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px solid rgba(10, 42, 10, 0.8);
  font-variant-numeric: tabular-nums;
}
.perfRowHead {
  opacity: 0.55;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom-color: var(--panel-edge);
}
.perfRow:last-child {
  border-bottom: none;
}
.perfRow .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.perfRow .ms {
  color: var(--accent);
  opacity: 0.95;
  text-align: right;
}
.perfRow .n {
  opacity: 0.75;
  font-size: 11px;
  text-align: right;
}
.perfRow .dim {
  opacity: 0.45;
  color: var(--ink);
}
.perfEmpty {
  opacity: 0.55;
  padding: 8px 0;
}
.historyList {
  overflow-y: auto;
  max-height: 40vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}
.historyRow {
  text-align: left;
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: none;
  border-bottom: 1px solid #0a2a0a;
  font-size: 12px;
  padding: 10px 20px;
  cursor: pointer;
}
.historyRow.current {
  background: rgba(93, 255, 194, 0.18);
  color: #fff;
}
.historyRow.future {
  opacity: 0.4;
}


component.text textarea {
  width: 100%;
  height: 100%;
}

component {
  background-size: 225%;
  background-position-x: var(--posX);
  background-position-y: var(--posY);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--accent-dim);
  position: absolute;
  border-radius: var(--radius);
  border: 1px solid var(--panel-edge);
  width: 180px;
  height: auto;
  min-height: 80px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

component.tone-source {
  --accent: var(--tone-source);
  --accent-dim: var(--tone-source-dim);
  --panel-edge: var(--tone-source-edge);
  --led-color: var(--tone-source);
}
component.tone-media {
  --accent: var(--tone-media);
  --accent-dim: var(--tone-media-dim);
  --panel-edge: var(--tone-media-edge);
  --led-color: var(--tone-media);
}
component.tone-filter {
  --accent: var(--tone-filter);
  --accent-dim: var(--tone-filter-dim);
  --panel-edge: var(--tone-filter-edge);
  --led-color: var(--tone-filter);
}
component.tone-process {
  --accent: var(--tone-process);
  --accent-dim: var(--tone-process-dim);
  --panel-edge: var(--tone-process-edge);
  --led-color: var(--tone-process);
}
component.tone-mod {
  --accent: var(--tone-mod);
  --accent-dim: var(--tone-mod-dim);
  --panel-edge: var(--tone-mod-edge);
  --led-color: var(--tone-mod);
}
component.tone-time {
  --accent: var(--tone-time);
  --accent-dim: var(--tone-time-dim);
  --panel-edge: var(--tone-time-edge);
  --led-color: var(--tone-time);
}
component.tone-control {
  --accent: var(--tone-control);
  --accent-dim: var(--tone-control-dim);
  --panel-edge: var(--tone-control-edge);
  --led-color: var(--tone-control);
}
component.tone-visual {
  --accent: var(--tone-visual);
  --accent-dim: var(--tone-visual-dim);
  --panel-edge: var(--tone-visual-edge);
  --led-color: var(--tone-visual);
}

component.active {
  outline: 2px solid var(--accent);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 18px var(--accent-dim);
}

component.grabbed {
  outline: 2px solid hsl(var(--grab-hue), 85%, 55%);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 18px hsl(var(--grab-hue), 85%, 35%);
}

.component-header {
  height: 26px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--panel-edge);
  user-select: none;
  width: 100%;
}

.component-header .header-left {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  max-width: calc(100% - 22px);
  flex: 1;
  min-width: 0;
}

.component-header .component-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  flex-shrink: 1;
  min-width: 0;
}

.component-header .header-left select,
.component-header .header-left .ui-select,
.component-header .header-left .bpmRateSelect {
  flex-shrink: 0;
  max-width: 90px;
}

.component-header .header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.component-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 6px;
  overflow: hidden;
  width: 100%;
  min-height: 0;
}

.component-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

component icon {
  position: relative;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  filter: none;
  flex-shrink: 0;
}
component.mic icon:after {
  content: "🎤";
}
component.webcamplayer icon:after {
  content: "🤳🏻";
}

component.peakdetectorcomponent icon:after {
  content: "⛰️";
}

component.compressor icon:after {
  content: "➗";
}

component.WebRTCSender icon:after {
  content: "📭";
}
component.reverb icon:after {
  content: "⛪";
}
component.constantvaluenode icon:after {
  content: "🅺";
}
component.Sequencer icon:after {
  content: "📈";
}
component.Arpeggiator icon:after {
  content: "🎶";
}
component.PolySequencer icon:after {
  content: "📊";
}
component.PhoneSensors icon:after {
  content: "📱";
}
component.SampleHold icon:after {
  content: "\1F3B2";
}
component.SequentialSwitch icon:after {
  content: "\1F500";
}
component.SequentialDemux icon:after {
  content: "\1F503";
}
component.Kick808 icon:after {
  content: "\1F941";
}
component.Snare808 icon:after {
  content: "\1F3B5";
}
component.Clap808 icon:after {
  content: "\1F44F";
}
component.HiHat808 icon:after {
  content: "\1F4A8";
}
component.Cowbell808 icon:after {
  content: "\1F514";
}
component.Cymbal808 icon:after {
  content: "\1F941";
}
component.Rim808 icon:after {
  content: "\1F3B5";
}
component.Clave808 icon:after {
  content: "\1F4A5";
}
component.Tom808 icon:after {
  content: "\1F941";
}
component.HandDrum icon:after {
  content: "\1F44A";
}
component.Freeverb icon:after {
  content: "\1F30A";
}
component.MoogLadder icon:after {
  content: "\1F916";
}
component.Phaser icon:after {
  content: "\1F300";
}
component.Wavefolder icon:after {
  content: "\1F4C8";
}
component.ScanlineSynth icon:after {
  content: "\1F4FA";
}

component.audioplayer icon:after {
  content: "🎶";
}

component.KeyboardComponent icon:after {
  content: "⌨";
}

component.WebRTCReceiver icon:after {
  content: "📨";
}
component.memorycomponent icon:after {
  content: "📼";
}
component.bpmoutputcomponent icon:after {
  content: "🎵";
}

component.distortion icon:after {
  content: "🤘";
}

component.ImagePlayerWorkletVersion icon:after {
  content: "🖼️";
}

component.merger icon:after {
  content: "🍲";
}

component.imagemaker icon:after {
  content: "📷";
}

component.CanvasPlotter icon:after {
  content: "✏️";
}

component.output icon:after {
  content: "🔊";
}

component.numberdisplay icon:after {
  content: "🔢";
}

component.JoystickComponent icon:after {
  content: "🎮";
}

component.oscillator icon:after {
  content: "🚴🏿";
}

component.NoiseGenWithWorklet icon:after {
  content: "👾";
}

component.PerlinNoise icon:after {
  content: "\1F32B";
}

component.Mouse icon:after {
  content: "🖱️";
}

component.amp icon:after {
  content: "📢";
}

component.delay icon:after {
  content: "⏰";
}

component.filter icon:after {
  content: "🤖";
}
component.midi icon:after {
  content: "🎹";
}
component.midifileplayer icon:after {
  content: "🎼";
}
component.midifileplayer {
  width: 180px;
  min-height: 120px;
}

component.midifileplayer input.outputButton:after {
  display: none;
}
component.CustomProcessorComponent icon:after {
  content: "🧮";
}
component.Mixer icon:after {
  content: "🎚️";
}

component.envelopegenerator icon:after {
  content: "〽️";
}
component.Midi {
  height: auto;
  min-height: 120px;
  width: 180px;
}

component.Midi .ui-display {
  width: 100%;
  margin: 4px 0 2px;
}

component.Midi .display {
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

component.Midi outputs {
  gap: 3px;
  margin-top: 4px;
}

component.Midi .outputJackRow {
  min-height: 18px;
}

component.Midi .jack-label {
  min-width: 52px;
  font-size: 10px;
}
component.NumberDisplayComponent {
  height: auto;
  min-height: 56px;
  width: 190px;
}

component.memorycomponent {
  height: auto;
  min-height: 56px;
  width: 240px;
}

component.JoystickComponent {
  height: auto;
  min-height: 200px;
  width: 220px;
}

component.JoystickComponent .display {
  margin: 0;
  font-size: 11px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

component.CustomProcessorComponent {
  width: 240px;
  height: auto;
  min-height: 160px;
}

.CustomProcessorComponent audioparamrow {
  width: min-content;
}

component.CustomProcessorComponent .inputsDiv {
  display: grid;
  grid-template-columns: repeat(3, min-content);
  gap: 4px;
  width: auto;
  align-content: start;
}

component.Mixer {
  width: 260px;
  height: auto;
  min-height: 200px;
}

component.Mixer .mixerChSelect {
  max-width: 72px;
}

component.Mixer .inputsDiv {
  display: none;
}

component.Mixer .faders,
component.Mixer .mixer-strips {
  display: flex;
  flex-direction: row;
  gap: 6px;
  justify-content: space-around;
  align-items: flex-end;
  width: 100%;
  margin-top: 0;
  padding: 4px 0;
  flex: 1;
}

component.Mixer .mixer-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 40px;
}

component.Mixer .mixer-strip-master {
  border-left: 1px solid var(--panel-edge);
  padding-left: 6px;
  margin-left: 2px;
}

component.Mixer .mixer-strip button.input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
}

component.Mixer .mixer-strip .jack-row {
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

component.Mixer .mixer-strip .jack-label {
  font-size: 9px;
  max-width: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
}

component.Mixer .mixer-strip .mixer-audio-in button.input {
  border-color: var(--accent);
}

component.Mixer .mixer-strip-spacer {
  width: 36px;
  height: 18px;
  flex-shrink: 0;
}

component.Mixer .mixer-strip .ui-slider-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  color: var(--ink);
  gap: 2px;
}

component.Mixer .mixer-strip .ui-slider-vertical input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 16px;
  height: 90px;
  padding: 0;
  margin: 0;
  accent-color: var(--accent);
}

component.Mixer .mixer-strip .mixer-gain-val {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  opacity: 0.85;
  line-height: 1;
  min-height: 1em;
  text-align: center;
}

textarea {
  height: 76px;
  width: calc(100% - 10px);
  left: 5px;
  background: rgba(0, 0, 0, 0.55);
  position: relative;
  border-color: var(--panel-edge);
  color: var(--ink);
  border-radius: var(--radius);
  border-left-width: 1px;
  outline: none;
  border-right-width: 1px;
  border-top-width: 1px;
  margin-top: 5px;
  resize: none;
}

component.text {
  width: 180px;
  height: auto;
  min-height: 80px;
}

component.text textarea {
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  margin: 0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-edge);
  color: var(--ink);
  font-size: 11px;
  font-family: inherit;
  border-radius: var(--radius);
  padding: 4px 6px;
  resize: none;
}

component.multiplexor {
  height: auto;
  min-height: 200px;
  width: 220px;
}

component.Demultiplexor {
  height: auto;
  min-height: 200px;
  width: 220px;
}

component.Demultiplexor icon:after {
  content: "\1F50C";
}

component .display {
  margin-top: 0;
  margin-left: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.ui-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  width: 100%;
}

component.multiplexor .display {
  font-weight: bold;
  font-size: 24px;
  margin: 0 !important;
}

component p {
  padding: 5px;
  margin-top: 0px;
  font-size: 11px;
  margin-bottom: 5px;
}

component.envelopegenerator {
  width: 176px;
  height: auto;
  min-height: 200px;
}
component.KeyboardComponent {
  width: 300px;
  height: auto;
  min-height: 160px;
}

component.PolyphonicKeyboard {
  width: 300px;
  height: auto;
  min-height: 140px;
}

component.PolyphonicKeyboard .poly-piano {
  position: relative;
  width: calc(17 * 14px);
  height: 52px;
  margin: 6px auto 4px;
  user-select: none;
  touch-action: none;
}

component.PolyphonicKeyboard .poly-piano-whites {
  display: flex;
  flex-direction: row;
  height: 100%;
}

component.PolyphonicKeyboard .poly-key {
  box-sizing: border-box;
  border: 1px solid var(--panel-edge);
  cursor: pointer;
}

component.PolyphonicKeyboard .poly-key.white {
  width: 14px;
  height: 52px;
  background: #e8ebe6;
  border-radius: 0 0 2px 2px;
}

component.PolyphonicKeyboard .poly-key.black {
  position: absolute;
  top: 0;
  width: 9px;
  height: 30px;
  background: #1a1f1c;
  border-radius: 0 0 2px 2px;
  z-index: 2;
}

component.PolyphonicKeyboard .poly-key.white.pressed {
  background: var(--accent);
}

component.PolyphonicKeyboard .poly-key.black.pressed {
  background: var(--accent);
  border-color: var(--accent);
}

component.KeyboardComponent outputs {
  display: grid;
  grid-template-columns: repeat(10, 18px);
  gap: 12px 6px;
  flex-direction: unset;
  position: relative;
  right: 0;
  bottom: 0;
  margin: 6px auto 4px auto;
  z-index: 2;
}

component.KeyboardComponent .outputJackRow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

component.KeyboardComponent .outputJackRow .jack-label,
component.KeyboardComponent .outputJackRow .ui-led {
  display: none;
}

component.KeyboardComponent input.outputButton {
  position: relative;
  overflow: visible;
}

component.PolyphonicKeyboard outputs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: flex-end;
  margin-top: auto;
}

component.PolyphonicKeyboard .outputJackRow .ui-led {
  display: none;
}

component input.outputButton.active {
  border-color: var(--accent);
  outline: none;
  box-shadow:
    0 0 0 1px var(--accent),
    0 0 12px var(--accent);
  background: radial-gradient(circle at 40% 35%, var(--accent) 0%, #0d3a2c 75%);
}

component input.outputButton.active:after {
  color: var(--accent) !important;
}

component.imagemaker {
  width: 320px;
  height: auto;
  min-height: 180px;
}

component.Shader {
  width: 420px;
  height: auto;
  min-height: 240px;
}

component.Shader textarea {
  height: 90px;
  font-size: 10px;
  font-family: monospace;
  width: calc(100% - 230px);
}

component.Shader button.togglefullscreen {
  width: max-content;
  margin: 5px;
  right: 0px;
  position: absolute;
}

component.Shader label.camToggle {
  position: absolute;
  right: 8px;
  top: 28px;
  z-index: 2;
  font-size: 11px;
  color: lightgreen;
}

component.Shader pre.shaderError {
  display: none;
  position: absolute;
  left: 5px;
  bottom: 4px;
  right: 220px;
  max-height: 48px;
  overflow: auto;
  margin: 0;
  padding: 2px 4px;
  font-size: 9px;
  color: #f66;
  background: rgba(0, 0, 0, 0.7);
  z-index: 3;
}

component.Shader canvas.shaderCanvas {
  bottom: 2px;
  right: 2px;
  position: absolute;
  width: 213px;
  height: 120px;
  border: 1px solid gray;
  pointer-events: none;
  touch-action: none;
}

component.imagemaker button.togglefullscreen {
  width: max-content;
  margin: 5px;
  right: 0px;
  position: absolute;
}

component.CanvasPlotter {
  width: 500px;
  height: auto;
  min-height: 180px;
}

component.CanvasPlotter canvas.canvasPlotterCanvas {
  top: 31px;
  left: 172px;
  position: absolute;
  width: 320px;
  height: 180px;
  border: 1px solid gray;
  pointer-events: none;
  background: #000;
}

component.Recorder {
  width: 295px;
  min-height: 220px;
}

component.Recorder canvas.recorderCanvas {
  display: block;
  width: 280px;
  height: 80px;
  margin: 4px 0;
  border: 1px solid gray;
  background: #000;
  cursor: crosshair;
}

component.Recorder .recorderControls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin: 4px 0;
}

component.Recorder .recorderControls button {
  font-size: 11px;
  padding: 2px 8px;
  cursor: pointer;
}

component.Recorder .recorderRecBtn.active {
  background: #c22;
  color: #fff;
}

component.Recorder .recorderPlayBtn.active {
  background: #2a6;
  color: #fff;
}

component.Recorder .recorderDuration {
  font-size: 11px;
  opacity: 0.85;
  margin: 2px 0 4px;
}

component.Recorder .moduleToggles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0;
  font-size: 11px;
}

component.Recorder .moduleToggles label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

component.CanvasPlotter .plotterToggles,
component.Mulberry32 .moduleToggles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0;
  font-size: 11px;
}

component.CanvasPlotter .plotterToggles label,
component.Mulberry32 .moduleToggles label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

component.imagemaker canvas {
  bottom: 2px;
  right: 2px;
  position: absolute;
  border: 1px solid gray;
  pointer-events: none;
  touch-action: none;
}

component select.seatSelect {
  position: relative;
  top: 0;
  left: 0;
  bottom: auto;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  height: 20px;
  padding: 0 4px;
  font-size: 10px;
  letter-spacing: 0.5px;
  border: 1px solid var(--panel-edge);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.75) !important;
  color: var(--accent);
  box-shadow: inset 0 0 6px rgba(93, 255, 194, 0.15);
}

component select.seatSelect:focus {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

component.ImagePlayerWorkletVersion canvas {
  z-index: 0;
  left: 2px;
  top: 2px;
  position: absolute;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  pointer-events: none;
}

component.Sequencer,
component.PolySequencer {
  width: 272px;
  height: auto;
  min-height: 240px;
  overflow: hidden;
}

component.Sequencer .seqSyncToggle,
component.Sequencer .seqRecToggle,
component.PolySequencer .seqSyncToggle,
component.Arpeggiator .seqSyncToggle {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0 5px;
  height: 18px;
  border: 1px solid var(--panel-edge);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 0 6px rgba(93, 255, 194, 0.08);
}

component.Sequencer .seqSyncToggle.on,
component.PolySequencer .seqSyncToggle.on,
component.Arpeggiator .seqSyncToggle.on {
  border-color: var(--accent);
  box-shadow:
    inset 0 0 6px var(--accent-dim),
    0 0 6px var(--accent-dim);
}

component.Sequencer .seqRecToggle.on {
  border-color: #c22;
  box-shadow:
    inset 0 0 6px rgba(204, 34, 34, 0.45),
    0 0 6px rgba(204, 34, 34, 0.35);
}

component.Sequencer .seqSyncToggle label,
component.Sequencer .seqRecToggle label,
component.PolySequencer .seqSyncToggle label,
component.Arpeggiator .seqSyncToggle label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.55;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

component.Sequencer .seqRecToggle label {
  color: #c22;
}

component.Sequencer .seqSyncToggle.on label,
component.PolySequencer .seqSyncToggle.on label,
component.Arpeggiator .seqSyncToggle.on label {
  opacity: 1;
}

component.Sequencer .seqRecToggle.on label {
  opacity: 1;
}

component.Sequencer .seqSyncToggle input,
component.Sequencer .seqRecToggle input,
component.PolySequencer .seqSyncToggle input,
component.Arpeggiator .seqSyncToggle input {
  width: 11px;
  height: 11px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

component.Sequencer .seqRecToggle input {
  accent-color: #c22;
}

component.Arpeggiator {
  width: 200px;
  height: auto;
  min-height: 180px;
}

component.Arpeggiator .display {
  font-weight: bold;
  font-size: 16px;
  margin: 0 !important;
}

component.PolySequencer {
  width: 340px;
  min-height: 180px;
  max-width: min(92vw, 1100px);
  overflow: visible;
}

component.PolySequencer .polyStepsSelect {
  max-width: 58px;
  margin-left: 4px;
}

component.PolySequencer .seqGridWrap {
  overflow-x: auto;
  max-width: 100%;
}

component.PolySequencer .component-body,
component.PolySequencer .component-main {
  overflow: visible;
}

component.Sequencer div.buttonsContainer {
  display: grid;
  grid-template-columns: repeat(16, 15px);
  grid-template-rows: repeat(13, 15px);
  gap: 1px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: content-box;
  flex: 0 0 auto;
}

component.Sequencer .seqButton,
component.PolySequencer .seqButton {
  width: 12px;
  height: 12px;
  min-width: 0;
  min-height: 0;
  max-width: 12px;
  max-height: 12px;
  padding: 0;
  margin: 0;
  line-height: 0;
  font-size: 0;
  border: 1px solid var(--panel-edge);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

component.Sequencer .seqButton:hover,
component.PolySequencer .seqButton:hover {
  background: #0a1812;
  border-color: var(--accent);
}

component.Sequencer .seqButton.active,
component.PolySequencer .seqButton.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 5px var(--accent-dim);
}

component.Sequencer .seqButton.seqColumnPlaying,
component.PolySequencer .seqButton.seqColumnPlaying {
  box-shadow:
    inset 0 0 0 1px #fff,
    0 0 6px var(--accent-dim);
  border-color: #fff;
}

component.Sequencer .inputsDiv,
component.PolySequencer .inputsDiv {
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
}

component.PolySequencer div.buttonsContainer {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: content-box;
  flex: 0 0 auto;
}

component.PolySequencer .seqLane {
  display: grid;
  grid-template-columns: repeat(16, 15px) auto;
  gap: 1px;
  align-items: center;
  width: max-content;
}

component.PolySequencer .seqButton.seqBarStart {
  border-left-color: var(--accent);
}

component.PolySequencer .seqLane .outputJackRow.polySeqOut {
  margin-left: 4px;
  gap: 4px;
}

component.PolySequencer .seqLane .polySeqOut .jack-label {
  max-width: 14px;
  font-size: 9px;
}

component.PolySequencer .seqLane .outputButton {
  margin: 0;
  justify-self: center;
}

component.PolySequencer .seqLane .outputButton:after {
  display: none;
}

component input.outputButton:after {
  display: none;
}

/* Keyboard: letter labels above jack (grid is dense; span labels hidden) */
component.KeyboardComponent input.outputButton:after {
  display: block;
  content: var(--label);
  position: absolute;
  top: -12px;
  left: 50% !important;
  transform: translateX(-50%);
  text-align: center;
  line-height: 9px;
  width: auto;
  font-size: 10px;
  pointer-events: none;
  text-shadow: -1px 0px 3px black;
}

component input[type="file"] {
  position: relative;
  top: 5px;
  left: 5px;
  z-index: 99;
  display: none;

  width: 142px;
  overflow: visible;
  height: 35px;
  border: none;
  outline: none;
}

component .inputsDiv {
  position: relative;
  overflow: visible;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  flex: 0 0 auto;
  pointer-events: none;
  touch-action: none;
}

component .inputsDiv * {
  pointer-events: all;
  touch-action: auto;
}

outputs {
  display: flex;
  flex-direction: column;
  align-self: flex-end;
  margin-top: auto;
  gap: 4px;
  flex: 0 0 auto;
  z-index: 5;
}

component .outputJackRow {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

component .outputJackRow[hidden] {
  display: none !important;
}

component .outputJackRow .jack-label {
  flex: 0 1 auto;
  text-align: right;
  max-width: 90px;
  white-space: nowrap;
}

component .outputButton,
component input.outputButton.jack {
  position: relative;
  overflow: visible;
  right: 0;
  bottom: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 1px 0;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    #0a0c0b 38%,
    #1a2220 42%,
    #2a3330 55%,
    #1a2220 70%
  );
  border: 2px solid #3a4540;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.8),
    0 1px 0 rgba(255, 255, 255, 0.06);
  outline: none;
}

component .outputButton:hover,
component input.outputButton.jack:hover {
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 8px var(--accent-dim);
}

component .outputButton.active,
component input.outputButton.jack.active {
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 0 1px var(--accent),
    0 0 10px var(--accent);
  background: radial-gradient(circle at 40% 35%, var(--accent) 0%, #0d3a2c 75%);
}

component .outputButton.connected,
component input.outputButton.jack.connected {
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 0 1px var(--accent),
    0 0 8px rgba(0, 200, 120, 0.35);
}

component .outputButton.connected.active,
component input.outputButton.jack.connected.active {
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 0 1px var(--accent),
    0 0 12px var(--accent);
}

component button.playButton,
component .triggerInputFile {
  display: block;
  position: relative;
  left: 0;
  top: 0;
  height: 26px;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--panel-edge);
  color: var(--ink);
  border-radius: var(--radius);
  font-size: 11px;
  margin-bottom: 4px;
}

component button.playButton:hover,
component .triggerInputFile:hover {
  border-color: var(--accent);
  color: var(--accent);
}

component button.input {
  line-height: 0px;
  width: 72px;
  min-width: 72px;
  height: 22px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--panel-edge);
  color: var(--ink);
  text-align: left;
  border-radius: var(--radius);
  font-size: 10px;
  letter-spacing: 0.3px;
  padding-left: 6px;
}
component button.input:hover {
  background: #0a1812;
  border: 1px solid var(--accent);
  color: var(--accent);
}

component button.input.connected {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

component audioParamRow.jack-row,
component .jack-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: 100%;
}

component button.input.jack {
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    #0a0c0b 38%,
    #1a2220 42%,
    #2a3330 55%,
    #1a2220 70%
  );
  border: 2px solid #3a4540;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.8),
    0 1px 0 rgba(255, 255, 255, 0.06);
  color: transparent;
  font-size: 0;
  text-indent: -9999px;
}

component button.input.jack:hover {
  border-color: var(--accent);
  background: radial-gradient(
    circle at 50% 50%,
    #0a0c0b 38%,
    #1a2220 42%,
    #2a3330 55%,
    #1a2220 70%
  );
  color: transparent;
}

component button.input.jack.connected {
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 0 1px var(--accent),
    0 0 8px rgba(0, 200, 120, 0.35);
}

component .jack-label {
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
}

component input[type="number"],
component input[type="text"] {
  width: calc(100% - 76px);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.55);
  border-radius: var(--radius);
  border: 1px solid var(--panel-edge);
  color: var(--ink);
  font-size: 11px;
  padding: 2px 4px;
}

component.Compressor {
  height: auto;
  min-height: 180px;
  width: 200px;
}
component.filter {
  height: auto;
  min-height: 160px;
  width: 190px;
}

component.AudioPlayer {
  height: auto;
  min-height: 200px;
  width: 180px;
}

audioparamrow {
  display: flex;
  gap: 4px;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.05);
}
component.visualizer canvas {
  position: relative;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

component.numberdisplaycomponent .display,
component.memorycomponent .display,
component.bpmoutputcomponent .display {
  font-size: 20px;
  display: flex;
  justify-content: flex-end;
  margin-right: 0;
  align-items: center;
  color: var(--accent);
  margin-top: 0;
  font-variant-numeric: tabular-nums;
}
component.bpmoutputcomponent .ui-display {
  position: relative;
  left: 0;
  bottom: 0;
  margin: 0;
}
component.bpmoutputcomponent .display {
  text-align: left;
  margin-right: unset;
  position: static;
  bottom: unset;
  left: unset;
}

component.NumberDisplayComponent .component-body,
component.memorycomponent .component-body,
component.countercomponent .component-body,
component.bpmoutputcomponent .component-body {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
}

component.NumberDisplayComponent .inputsDiv,
component.memorycomponent .inputsDiv,
component.countercomponent .inputsDiv,
component.bpmoutputcomponent .inputsDiv {
  width: auto;
}

.bpmRateSelect {
  margin: 0;
  font-size: 10px;
  max-width: 50px;
  height: 18px;
}

component.countercomponent .display {
  text-align: right;
}
component.memorycomponent .display {
  margin-right: 0px;
  text-align: right;
  max-width: 80px;
}

/* component.JoystickComponent input.outputButton:after {
  content: var(--letter);
  left: -19px;
  position: absolute;
  text-align: right;
  width: 20px;
} */

component.WebRTCSender,
component.WebRTCReceiver {
  padding: 0;
  height: auto;
  min-height: 100px;
  width: 200px;
}
component.WebRTCReceiver {
  padding-top: 0;
  height: auto;
  min-height: 100px;
}

component.WebRTCSender input {
  width: calc(100% - 5px);
}

component.WebRTCReceiver input[type="text"] {
  width: 100%;
}

component.WebRTCReceiver:not(.mine),
component.WebRTCSender:not(.mine) {
  background-image: none;
  background: #eeb3c8;
}
component.WebRTCReceiver:not(.mine) *,
component.WebRTCSender:not(.mine) * {
  pointer-events: none;
  touch-action: none;
}

*:after {
  color: lightgreen;
}

app > .mainContainer > canvas.imgMakerCanvas,
app > .mainContainer > canvas.shaderCanvas {
  width: 100vw;
  height: 100vw;
  left: 0px;
  position: fixed;
  z-index: -1;
  top: 0px;
}

.messageBox {
  top: -50vh;
  width: max-content;
  padding: 10px;
  color: lightgreen;
  max-width: 450px;
  height: max-content;
  position: fixed;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  border-radius: 5px;
  border: 3px solid gray;
  transition: all 0.35s ease-in-out;
  z-index: 999;
  line-height: 14px;
  font-size: 13px;
}

.messageBox.visible {
  top: calc(48px + env(safe-area-inset-top, 0px));
}

component button.infoButton {
  width: 16px;
  height: 16px;
  position: relative;
  left: 0;
  top: 0;
  font-size: 11px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--panel-edge);
  color: var(--ink);
  border-radius: 3px;
  cursor: pointer;
}

component.constantvaluenode {
  height: 36px;
}

component.constantvaluenode button.input.offset {
  display: none;
}
component.constantvaluenode input.offset {
  margin: 0 auto;
  margin-bottom: 2px;
}

component.rackcover {
  z-index: 2;
  resize: both;
  box-shadow: none;
  /* pointer-events: none; */

  border: none;
  width: 180px;
  height: 100px;
  background-position: calc(100% - var(--posX)) calc(100% - var(--posY));
  background-image: url(aluminium.jpg);
  backdrop-filter: none;
}

component.Mat {
  z-index: 0;
  resize: both;
  min-width: 200px;
  min-height: 160px;
  width: 360px;
  height: 240px;
  box-shadow: none;
  border: 2px dashed color-mix(in srgb, var(--mat-color, #4a5c48) 65%, #fff);
  background: var(--mat-color, #4a5c48);
  backdrop-filter: none;
  overflow: hidden;
}

component.Mat .inputsDiv,
component.Mat .component-main {
  display: none;
}

component.Mat .matColor {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--panel-edge);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.selection-box {
  position: fixed;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 1000;
  display: none;
  border: 1px solid var(--accent, #7ec8a3);
  background: color-mix(in srgb, var(--accent, #7ec8a3) 18%, transparent);
}

.selection-box.visible {
  display: block;
}

component .deleteButton {
  width: 18px;
  height: 16px;
  position: relative;
  right: 0;
  top: 0;
  font-size: 10px;
  display: none;
  padding: 0;
  line-height: 14px;
  border: 1px solid #aa0000;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

component:hover .deleteButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

component .deleteButton:hover {
  background: rgba(250, 0, 0, 0.5);
}

.ImagePlayerWorkletVersion button.triggerInputFile {
  width: max-content;
}
.webcamplayer canvas {
  width: 100%;
  height: 100%;
}
component.ScanlineSynth canvas.scanlineCanvas {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  background: #000;
}
component.PerlinNoise canvas.perlinCanvas {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  background: #000;
}
.mic select {
  margin-top: 33px;
  left: 5px;
  position: relative;
  width: calc(100% - 10px);
}

app.zooming .mainContainer {
  filter: blur(calc(var(--scale) * 6px));
}

component.PadSampler {
  height: 300px;
}

component.spectrum2image {
  width: 520px;
  height: 390px;
}

footer {
  background: var(--panel) !important;
  backdrop-filter: blur(10px);
  color: var(--ink);
  border: 1px solid var(--panel-edge);
  border-radius: 0 0 var(--radius) var(--radius);
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  gap: 6px;
  width: 100vw;
  box-sizing: border-box;
  padding: 6px 8px;
  padding-top: calc(6px + env(safe-area-inset-top, 0px));
  padding-left: calc(8px + env(safe-area-inset-left, 0px));
  padding-right: calc(8px + env(safe-area-inset-right, 0px));
  z-index: 3;
  min-height: 36px;
  height: auto;
  align-items: center;
  flex-wrap: wrap;
  border-top-width: 0px;
  border-right-width: 0px;
  border-left-width: 0px;
  flex-direction: row;
  justify-content: flex-end;
  user-select: none;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(93, 255, 194, 0.08);
}

footer connectedUsers {
  font-size: 11px;
  margin-right: 5px;
  line-height: 22px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  position: relative;
  color: var(--accent);
  letter-spacing: 0.3px;
}

footer .sysStatus,
footer button.openPerf {
  font-size: 11px;
  line-height: 22px;
  margin-right: 8px;
  color: var(--accent);
  letter-spacing: 0.3px;
  white-space: nowrap;
  opacity: 0.9;
}

footer .sysStatus.dim,
footer button.openPerf.dim {
  opacity: 0.45;
  color: var(--ink);
}

footer .sysStatus.warn,
footer button.openPerf.warn {
  color: var(--danger);
  opacity: 1;
}

footer button.openPerf {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  height: auto;
  min-height: 26px;
  padding: 0 6px;
  cursor: pointer;
}

footer button.openPerf:hover {
  border-color: var(--panel-edge);
  background: rgba(0, 0, 0, 0.35);
}

footer button,
footer select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.4px;
  height: 26px;
  min-height: 26px;
  padding: 0 10px;
  line-height: 24px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

footer button {
  width: max-content;
}

footer button:hover:not(:disabled),
footer select:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #0a1812;
}

footer button:active:not(:disabled) {
  background: rgba(93, 255, 194, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

footer button:disabled {
  opacity: 0.35;
  color: var(--ink);
  border-color: var(--panel-edge);
  cursor: default;
}

footer select {
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 50%,
    calc(100% - 7px) 50%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  padding-right: 22px;
}

footer select option {
  background: #0c1012;
  color: var(--ink);
}

footer .patchName {
  text-transform: capitalize;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  line-height: 26px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.5px;
}
footer #samplePatchSelect {
  flex: 1 1 140px;
  min-width: 0;
  max-width: 220px;
}
.openButtons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  margin-right: auto;
  letter-spacing: 0.3px;
  font-weight: 600;
  color: var(--accent);
  border-color: var(--accent-dim);
  background: linear-gradient(180deg, rgba(93, 255, 194, 0.1) 0%, rgba(0, 0, 0, 0.55) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 12px rgba(93, 255, 194, 0.08);
}
.openButtons:hover:not(:disabled) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px var(--accent-dim);
}
.openButtonsIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1;
  background: var(--accent);
  color: #0a0e0c;
}

button.play {
  width: 36px;
  min-width: 36px;
  padding: 0;
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  border-color: var(--accent-dim);
}

button.play.on {
  background: rgba(93, 255, 194, 0.12);
}

button.stop {
  width: 36px;
  min-width: 36px;
  padding: 0;
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  border-color: var(--accent-dim);
}

footer .transport {
  display: flex;
  align-items: center;
  gap: 6px;
}

footer .transportBpm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 6px 0 8px;
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.55);
  font-size: 10px;
  letter-spacing: 0.4px;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

footer .transportBpm span {
  opacity: 0.65;
}

footer .transportBpm input,
footer #bpmButton[type="number"] {
  width: 40px;
  height: 22px;
  min-height: 22px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.3px;
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}

footer .transportBpm input::-webkit-outer-spin-button,
footer .transportBpm input::-webkit-inner-spin-button,
footer #bpmButton[type="number"]::-webkit-outer-spin-button,
footer #bpmButton[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

footer .transportPos {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.55);
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

footer .transportMetric {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

footer .transportLabel {
  font-size: 9px;
  letter-spacing: 0.6px;
  opacity: 0.55;
}

footer .transportBarVal,
footer .transportBeatVal {
  color: var(--accent);
  font-size: 12px;
  min-width: 1.2em;
}

footer .transportDots {
  display: inline-flex;
  gap: 3px;
}

footer .transportDots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--panel-edge);
}

footer .transportDots i.on {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-dim);
}

.seqButton {
  /* sized under component.Sequencer .seqButton — keep fallback tiny */
  width: 12px;
  height: 12px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--panel-edge);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.55);
}
.seqButton:hover {
  background: #0a1812;
  border: 1px solid var(--accent);
}

.seqButton.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent-dim);
}

.seqButton.seqColumnPlaying {
  box-shadow:
    inset 0 0 0 1px #fff,
    0 0 8px var(--accent-dim);
  border-color: #fff;
}

component.drawer icon {
  display: none;
}

component.LargeVisualizer {
  width: 1030px;
  height: 180px;
}

component.LargeVisualizer input.speed {
  height: 20px;
  width: 70px;
  padding-left: 5px;
}
component.LargeVisualizer canvas {
  background-color: black;
}
component.LargeVisualizer p {
  margin: 0px;
}
component.LargeVisualizer .inputsDiv {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
}

component.drawer {
  width: 270px;
  height: auto;
  min-height: 120px;
}
component.drawer canvas {
  cursor: crosshair;
  left: 0;
  top: 0;
  position: relative;
  width: 100%;
  height: 100%;
}
@media (max-width: 768px) {
  footer {
    flex-wrap: wrap;
    height: auto;
    gap: 6px;
    row-gap: 6px;
    justify-content: flex-start;
    flex-direction: row;
  }
  footer button,
  footer select {
    min-height: 40px;
    font-size: 14px;
  }
  footer .transport {
    flex: 1 1 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  footer .transportBpm,
  footer .transportPos {
    height: 40px;
  }
  footer .transportBpm input,
  footer #bpmButton[type="number"] {
    height: 36px;
    min-height: 36px;
    font-size: 14px;
    width: 48px;
  }
  button.openButtons {
    font-size: 16px;
    padding: 10px 12px;
    margin-right: 0;
  }
  footer #samplePatchSelect {
    flex: 1 1 140px;
    min-width: 0;
    max-width: 100%;
  }
  footer connectedUsers {
    max-width: 40vw;
  }
  footer .patchName {
    padding-left: 3px;
    text-align: left;
    max-width: 40vw;
  }
  .buttons {
    max-height: min(72vh, 640px);
  }
  .paletteSearch {
    height: 40px;
    font-size: 14px;
  }
  .paletteChip {
    height: 32px;
    font-size: 11px;
    padding: 0 12px;
  }
  .paletteGrid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 6px;
    padding: 10px 10px 14px;
  }
  .paletteCard {
    min-height: 46px;
    font-size: 12px;
  }
}

/* —— Shared widgets —— */
.ui-knob {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ui-knob-dial {
  --angle: -135deg;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #2a3832 0%, #0c1210 70%), var(--jack);
  border: 1px solid var(--panel-edge);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.4);
  position: relative;
  cursor: ns-resize;
  touch-action: none;
  flex-shrink: 0;
}

.ui-knob-dial::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 9px;
  margin-left: -1px;
  margin-top: -9px;
  background: var(--accent);
  border-radius: 1px;
  transform-origin: bottom center;
  transform: rotate(var(--angle));
  box-shadow: 0 0 6px var(--accent-dim);
  pointer-events: none;
}

.ui-knob-pointer {
  display: none;
}

.ui-knob-value {
  width: 48px !important;
  height: 20px;
  font-size: 10px !important;
  text-align: center;
  padding: 0 3px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  border: 1px solid var(--panel-edge) !important;
  border-radius: 3px !important;
  color: var(--ink) !important;
  flex-shrink: 0;
}

.ui-knob-value:focus {
  border-color: var(--accent) !important;
}

.ui-slider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ui-slider-label {
  font-size: 10px;
  color: var(--ink);
  opacity: 0.85;
}

.ui-slider input[type="range"] {
  accent-color: var(--accent);
}

.ui-led {
  --led-color: var(--accent);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #1a2220;
  border: 1px solid var(--panel-edge);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.ui-led.on,
.ui-led.pulse {
  background: var(--led-color);
  border-color: var(--led-color);
  box-shadow:
    0 0 8px var(--led-color),
    0 0 2px #fff;
}

.ui-led.pos {
  background: rgb(40, 200, 80);
  border-color: rgb(40, 200, 80);
  opacity: var(--led-a, 1);
  box-shadow: 0 0 calc(4px + 10px * var(--led-a, 1)) rgb(40, 200, 80);
}

.ui-led.neg {
  background: rgb(220, 50, 50);
  border-color: rgb(220, 50, 50);
  opacity: var(--led-a, 1);
  box-shadow: 0 0 calc(4px + 10px * var(--led-a, 1)) rgb(220, 50, 50);
}

.ui-led.trig {
  background: rgb(40, 220, 80);
  border-color: rgb(220, 80);
  opacity: 1;
  box-shadow:
    0 0 14px rgb(40, 220, 80),
    0 0 3px #fff;
}

component.oscillator {
  height: 125px;
  width: 200px;
}

component.Amp {
  height: auto;
  min-height: 100px;
  width: 170px;
}

component.delay {
  height: auto;
  min-height: 100px;
  width: 175px;
}

component.reverb {
  height: auto;
  min-height: 100px;
  width: 170px;
}

component.distortion {
  height: auto;
  min-height: 110px;
  width: 180px;
}

component.Freeverb {
  height: auto;
  min-height: 110px;
  width: 180px;
}

component.MoogLadder {
  height: auto;
  min-height: 110px;
  width: 180px;
}

component.Phaser {
  height: auto;
  min-height: 110px;
  width: 175px;
}

component.Wavefolder {
  height: auto;
  min-height: 100px;
  width: 170px;
}

component.Cymbal808,
component.Rim808,
component.Clave808,
component.Tom808,
component.HandDrum {
  height: auto;
  min-height: 100px;
  width: 175px;
}

component.constantvaluenode {
  height: auto;
  min-height: 90px;
  width: 140px;
}

component.output {
  width: 100px;
  height: 50px;
}

component canvas {
  border-radius: 3px;
  border: 1px solid var(--panel-edge);
}

component.drawer canvas,
component.visualizer canvas,
component.LargeVisualizer canvas,
component.Shader canvas,
component.imagemaker canvas,
component.CanvasPlotter canvas {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}

component.KeyboardComponent {
  width: 255px;
  height: auto;
  min-height: 160px;
  background: linear-gradient(
    160deg,
    rgba(18, 24, 22, 0.9),
    rgba(8, 12, 10, 0.85)
  );
}

component.deleteButton {
  filter: grayscale(0.2);
}

component.infoButton {
  opacity: 0.7;
}

component.infoButton:hover {
  opacity: 1;
}
