body.has-dsp-panel {
  overflow: hidden;
}

.dsp-toggle.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.dsp-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.dsp-panel[hidden] {
  display: none;
}

.dsp-panel__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(6, 10, 8, 0.78);
  cursor: default;
  backdrop-filter: blur(5px);
}

.dsp-panel__surface {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  padding: 22px;
  overflow-y: auto;
  border: 1px solid rgba(99, 242, 135, 0.34);
  border-radius: 10px;
  color: var(--color-text);
  background:
    linear-gradient(145deg, rgba(99, 242, 135, 0.075), transparent 32%),
    #191d1b;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.52);
}

.dsp-panel__header,
.dsp-section__heading,
.dsp-actions,
.dsp-width {
  display: flex;
  align-items: center;
}

.dsp-panel__header {
  justify-content: space-between;
  gap: 18px;
}

.dsp-panel__header .eyebrow {
  margin: 0 0 3px;
}

.dsp-panel__header h2,
.dsp-section h3 {
  margin: 0;
}

.dsp-panel__header h2 {
  font-size: clamp(24px, 4vw, 34px);
}

.dsp-panel__close {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.dsp-panel__close:hover,
.dsp-panel__close:focus-visible {
  border-color: rgba(99, 242, 135, 0.55);
  color: #08150c;
  background: var(--color-mint);
  outline: 0;
}

.dsp-panel__intro {
  margin: 10px 0 18px;
  color: var(--color-muted);
}

.dsp-panel__unavailable {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(227, 165, 61, 0.36);
  border-radius: 8px;
  color: #f0d49a;
  background: rgba(227, 165, 61, 0.1);
}

.dsp-section {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.dsp-section + .dsp-section {
  margin-top: 14px;
}

.dsp-section__heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dsp-section h3 {
  font-size: 17px;
}

.dsp-preset {
  display: grid;
  grid-template-columns: auto minmax(130px, 180px);
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 750;
}

.dsp-preset select {
  min-height: 40px;
  padding: 7px 32px 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--color-text);
  background: #222825;
  font: inherit;
}

.equalizer-bands {
  display: grid;
  gap: 10px;
}

.equalizer-band {
  display: grid;
  grid-template-columns: 70px minmax(120px, 1fr) 62px;
  align-items: center;
  gap: 12px;
  min-height: 42px;
}

.equalizer-band__frequency {
  color: var(--color-text);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.equalizer-band__frequency small {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.equalizer-band input,
.dsp-width input {
  width: 100%;
  accent-color: var(--color-mint);
  cursor: pointer;
}

.equalizer-band output,
.dsp-width output {
  color: var(--color-mint);
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dsp-panel.is-eq-bypassed .equalizer-bands {
  opacity: 0.5;
}

.dsp-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.dsp-actions button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.dsp-actions button:hover,
.dsp-actions button:focus-visible,
.dsp-actions button.is-active {
  border-color: rgba(99, 242, 135, 0.55);
  color: #08150c;
  background: var(--color-mint);
  outline: 0;
}

.dsp-modules {
  display: grid;
  gap: 9px;
}

.dsp-switch {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.dsp-switch:focus-within,
.dsp-switch:hover {
  border-color: rgba(99, 242, 135, 0.32);
  background: rgba(99, 242, 135, 0.055);
}

.dsp-switch input {
  width: 22px;
  height: 22px;
  margin: 0 auto;
  accent-color: var(--color-mint);
}

.dsp-switch span,
.dsp-switch strong,
.dsp-switch small {
  display: block;
}

.dsp-switch small {
  margin-top: 2px;
  color: var(--color-muted);
  line-height: 1.35;
}

.dsp-width {
  display: grid;
  grid-template-columns: 70px minmax(120px, 1fr) 52px;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px 4px 64px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 750;
}

.dsp-width input:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

@media (max-width: 620px) {
  .dsp-panel {
    align-items: end;
    padding: 0;
  }

  .dsp-panel__surface {
    width: 100%;
    max-height: min(88vh, 780px);
    padding: 18px 14px calc(18px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 14px 14px 0 0;
  }

  .dsp-section {
    padding: 14px 11px;
  }

  .dsp-section__heading {
    display: grid;
  }

  .dsp-preset {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .equalizer-band {
    grid-template-columns: 58px minmax(90px, 1fr) 58px;
    gap: 8px;
  }

  .dsp-width {
    grid-template-columns: 54px minmax(90px, 1fr) 46px;
    gap: 8px;
    padding-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dsp-panel *,
  .dsp-panel *::before,
  .dsp-panel *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
