:root {
  color-scheme: dark;
  --background: #0d0b16;
  --card: rgba(28, 24, 43, 0.88);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #f7f4ff;
  --muted: #aaa4bc;
  --purple: #9d72ff;
  --purple-light: #c6adff;
  --blue: #5b8dff;
  --danger: #ff6f91;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 80% 0%, rgba(91, 64, 156, 0.17), transparent 36rem),
    linear-gradient(145deg, #0d0b16 0%, #11101b 55%, #0a0912 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
}

.ambient-one {
  top: 12rem;
  left: -10rem;
  background: #744cff;
}

.ambient-two {
  right: -10rem;
  bottom: 8rem;
  background: #265dff;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 36px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: start;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--purple-light);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.22em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.93;
  letter-spacing: -0.065em;
}

h1 span {
  color: var(--purple-light);
  font-weight: 450;
}

.intro {
  max-width: 550px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.connection-panel {
  min-width: 360px;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: rgba(25, 21, 38, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.connection-copy {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 15px;
}

.connection-copy div {
  display: grid;
  gap: 2px;
}

.connection-copy small,
.live-color small {
  color: var(--muted);
}

.pairing-guide {
  position: relative;
  margin: 0 0 14px;
  border: 1px solid rgba(0, 240, 255, 0.13);
  background:
    linear-gradient(110deg, rgba(0, 240, 255, 0.045), transparent 48%),
    #080d0f;
}

.pairing-guide::before {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 38px;
  height: 2px;
  background: var(--purple);
  content: "";
  box-shadow: -38px 0 var(--purple-light);
}

.pairing-guide summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  color: var(--purple-light);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

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

.pairing-guide summary span {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pairing-guide summary span::after {
  color: var(--purple);
  content: "+";
  font-size: 0.9rem;
  line-height: 1;
}

.pairing-guide[open] summary span::after {
  content: "−";
}

.pairing-guide summary small {
  color: #53696b;
  font-size: 0.57rem;
}

.pairing-guide ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(0, 240, 255, 0.1);
  list-style: none;
}

.pairing-guide li {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 34px;
}

.pairing-guide li:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 28px;
  bottom: -8px;
  left: 13px;
  width: 1px;
  background: linear-gradient(var(--purple-light), rgba(0, 240, 255, 0.08));
  content: "";
}

.pairing-step {
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(0, 240, 255, 0.24);
  color: var(--purple-light);
  background: #0b1416;
  font-size: 0.58rem;
  font-weight: 900;
  box-shadow: inset 2px 0 var(--purple);
}

.pairing-step.ready {
  border-color: rgba(0, 168, 255, 0.55);
  color: #8edcff;
  box-shadow: inset 2px 0 #008cff, 0 0 10px rgba(0, 140, 255, 0.18);
}

.pairing-guide li > span:last-child {
  display: grid;
  gap: 2px;
}

.pairing-guide li strong {
  color: #dce9e7;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pairing-guide li small {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #787387;
  box-shadow: 0 0 0 5px rgba(120, 115, 135, 0.12);
}

.status-dot.connected {
  background: #61e6ab;
  box-shadow: 0 0 0 5px rgba(97, 230, 171, 0.13), 0 0 14px rgba(97, 230, 171, 0.6);
}

.status-dot.working {
  background: var(--purple-light);
  box-shadow: 0 0 0 5px rgba(198, 173, 255, 0.13);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  to { opacity: 0.45; }
}

.button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  font-weight: 700;
  transition: 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.11);
}

.button:focus-visible,
.color-button:focus-visible,
.effect-button:focus-visible,
.mode-button:focus-visible,
input:focus-visible,
.cue select:focus-visible,
.drop-zone:focus-within {
  outline: 2px solid var(--purple-light);
  outline-offset: 3px;
}

.button.primary {
  width: 100%;
  background: linear-gradient(135deg, #8f64f5, #6f55d8);
  box-shadow: 0 8px 24px rgba(111, 85, 216, 0.27);
}

.button.primary:hover {
  background: linear-gradient(135deg, #a27aff, #7e61eb);
}

.button.ghost {
  width: 100%;
}

.hidden {
  display: none !important;
}

.card {
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(20px);
}

.is-disabled > *:not(.section-heading) {
  pointer-events: none;
  opacity: 0.34;
}

.section-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.section-heading.compact {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 5px;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.step {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(198, 173, 255, 0.25);
  border-radius: 12px;
  color: var(--purple-light);
  background: rgba(157, 114, 255, 0.08);
  font-size: 0.74rem;
  font-weight: 800;
}

.drop-zone {
  display: flex;
  min-height: 116px;
  gap: 18px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px dashed rgba(198, 173, 255, 0.34);
  border-radius: 18px;
  background: rgba(157, 114, 255, 0.045);
  cursor: pointer;
  transition: 180ms ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--purple-light);
  background: rgba(157, 114, 255, 0.1);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.drop-zone > span:last-child {
  display: grid;
  gap: 5px;
}

.drop-zone small {
  color: var(--muted);
}

.drop-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: var(--purple-light);
  background: rgba(157, 114, 255, 0.13);
  font-size: 1.45rem;
}

.song-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}

.song-actions span {
  color: var(--muted);
  font-size: 0.8rem;
}

.song-actions .button {
  min-width: 132px;
}

.waveform-wrap {
  padding: 10px 12px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #11101b;
  overflow: hidden;
}

#waveform {
  display: block;
  width: 100%;
  height: 210px;
  touch-action: none;
  cursor: crosshair;
}

.timeline-times {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  color: #777184;
  font-size: 0.72rem;
}

.selection-row {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

.range-copy {
  display: grid;
  min-width: 220px;
  gap: 4px;
  margin-right: auto;
}

.label,
.selection-row label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.selection-row label {
  display: grid;
  gap: 6px;
}

.selection-row input {
  width: 100px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.show-mode-section,
.effect-section {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.show-mode-section > div:first-child,
.effect-section > div:first-child {
  display: grid;
  gap: 5px;
}

.show-mode-section small,
.effect-section small,
.automatic-panel small {
  color: var(--muted);
}

.mode-picker,
.effect-picker {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.mode-button,
.effect-button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
}

.mode-button:hover,
.effect-button:hover {
  color: var(--text);
}

.mode-button.selected,
.effect-button.selected {
  border-color: rgba(198, 173, 255, 0.2);
  color: var(--text);
  background: rgba(157, 114, 255, 0.19);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
}

.automatic-panel {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(198, 173, 255, 0.16);
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(157, 114, 255, 0.1), rgba(91, 141, 255, 0.06));
}

.automatic-panel > div {
  display: grid;
  gap: 4px;
}

.automatic-panel .button {
  width: auto;
  min-width: 150px;
}

.palette {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.palette.is-inactive {
  filter: grayscale(1);
  opacity: 0.28;
  pointer-events: none;
}

.spectrum-palette-note {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 240, 255, 0.18);
  color: var(--muted);
  background: linear-gradient(100deg, rgba(0, 240, 255, 0.06), rgba(255, 43, 214, 0.05));
  font-size: 0.76rem;
  line-height: 1.45;
}

.spectrum-palette-note + .palette {
  margin-top: 10px;
}

.spectrum-palette-note.hidden + .palette {
  margin-top: 20px;
}

.spectrum-palette-note .button.primary {
  width: auto;
  flex: 0 0 auto;
}

.color-button.random-color {
  --swatch: #b980ff;
  border-color: rgba(198, 173, 255, 0.18);
  background: linear-gradient(120deg, rgba(255, 51, 79, 0.1), rgba(57, 119, 255, 0.12), rgba(160, 76, 255, 0.12));
}

.color-button.random-color .swatch {
  background: conic-gradient(#ff0000, #ffff00, #00ff00, #0000ff, #a000ff, #ffffff, #ff0000);
}

.color-button {
  display: flex;
  min-height: 52px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 700;
  transition: 160ms ease;
}

.color-button:hover {
  border-color: var(--swatch);
  background: color-mix(in srgb, var(--swatch) 12%, transparent);
  transform: translateY(-1px);
}

.swatch {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 13px color-mix(in srgb, var(--swatch) 58%, transparent);
}

.transport {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

audio {
  width: 100%;
  height: 42px;
}

.stop-button {
  height: 42px;
}

.live-color {
  display: flex;
  min-width: 120px;
  gap: 9px;
  align-items: center;
}

.live-color > span {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background: #08070c;
  transition: 140ms linear;
}

.live-color div {
  display: grid;
}

.cue-list {
  display: grid;
  gap: 8px;
}

.cue {
  display: grid;
  grid-template-columns: auto 1fr minmax(105px, auto) auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.cue-swatch {
  width: 12px;
  height: 32px;
  border-radius: 8px;
  background: var(--swatch);
  box-shadow: 0 0 14px color-mix(in srgb, var(--swatch) 42%, transparent);
}

.cue-swatch.spectrum-swatch {
  background: linear-gradient(180deg, #ff2bd6, #7b5cff 48%, #00f0ff);
}

.cue strong {
  display: block;
  margin-bottom: 2px;
}

.cue small {
  color: var(--muted);
}

.cue button,
.cue select {
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.cue select {
  min-height: 32px;
  color: var(--text);
}

.cue button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.cue .delete:hover {
  color: var(--danger);
}

.empty-state {
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

footer {
  padding: 16px 8px 0;
  color: #706a7d;
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

/* Audio source and live microphone ----------------------------------------- */

.source-mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.source-mode-button {
  display: grid;
  min-height: 84px;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid rgba(0, 240, 255, 0.14);
  border-radius: 2px;
  color: var(--muted);
  background: #0a0e11;
  cursor: pointer;
  text-align: left;
}

.source-mode-button strong {
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.source-mode-button small {
  line-height: 1.4;
}

.source-mode-button:hover,
.source-mode-button.selected {
  border-color: rgba(0, 240, 255, 0.42);
  background: linear-gradient(110deg, rgba(0, 240, 255, 0.08), rgba(255, 43, 214, 0.04));
}

.source-mode-button.selected {
  box-shadow: inset 4px 0 var(--purple), 3px 3px 0 rgba(0, 240, 255, 0.08);
}

.source-mode-button:focus-visible,
.microphone-controls select:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 3px;
}

.microphone-status {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(0, 240, 255, 0.1);
  background: #080d0f;
}

.microphone-status > div {
  display: grid;
  gap: 3px;
}

.microphone-status small {
  color: var(--muted);
}

.mic-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  background: #596366;
  box-shadow: 0 0 0 4px rgba(89, 99, 102, 0.12);
}

.mic-status-dot.working {
  background: var(--purple-light);
  box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.1), 0 0 12px rgba(0, 240, 255, 0.45);
  animation: pulse 0.75s infinite alternate;
}

.mic-status-dot.live {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 59, 92, 0.1), 0 0 12px rgba(255, 59, 92, 0.5);
}

.mic-live-badge {
  margin-left: auto;
  padding: 5px 8px;
  border: 1px solid rgba(255, 59, 92, 0.55);
  color: #ff8a9f;
  background: rgba(255, 59, 92, 0.09);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.microphone-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.microphone-settings,
.microphone-section {
  margin-top: 18px;
  border: 1px solid rgba(0, 240, 255, 0.1);
  background: rgba(8, 13, 15, 0.72);
}

.microphone-settings summary,
.microphone-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
}

.microphone-settings summary {
  color: var(--purple-light);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  list-style: none;
  text-transform: uppercase;
}

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

.microphone-settings summary span::after {
  margin-left: 8px;
  color: var(--purple);
  content: "+";
}

.microphone-settings[open] summary span::after {
  content: "−";
}

.microphone-settings summary small,
.microphone-section-heading small {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.microphone-settings .microphone-controls {
  padding: 16px;
  border-top: 1px solid rgba(0, 240, 255, 0.08);
}

.microphone-section-heading strong {
  color: var(--purple-light);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.microphone-light-style {
  padding-bottom: 16px;
}

.microphone-light-style .effect-section {
  margin: 0;
  padding: 16px;
  border-top: 1px solid rgba(0, 240, 255, 0.08);
}

.microphone-color-label {
  display: block;
  margin: 2px 16px 10px;
}

.microphone-light-style .spectrum-palette-note,
.microphone-light-style .microphone-palette {
  margin-right: 16px;
  margin-left: 16px;
}

.microphone-levels {
  padding-bottom: 16px;
}

.microphone-controls > label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.microphone-controls label > span:first-child {
  display: flex;
  justify-content: space-between;
}

.microphone-controls output {
  color: var(--purple-light);
}

.microphone-controls .control-hint {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.microphone-controls select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 1px;
  color: var(--text);
  background: #080d0f;
}

.microphone-controls input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
}

.microphone-controls .raw-audio-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  column-gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 240, 255, 0.1);
  background: #080d0f;
  cursor: pointer;
}

.raw-audio-option input {
  grid-row: 1 / 3;
  align-self: center;
  accent-color: var(--purple-light);
}

.raw-audio-option small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.4;
  text-transform: none;
}

.microphone-meters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 16px;
}

.microphone-meters > div {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.microphone-meters i {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.1);
  background: #05080a;
}

.microphone-meters b {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--purple-light), var(--purple));
  transition: width 80ms linear;
}

.microphone-palette .color-button.selected {
  border-color: var(--swatch);
  background: color-mix(in srgb, var(--swatch) 14%, #0c1114);
  box-shadow: inset 0 -3px var(--swatch);
}

.microphone-transport {
  display: grid;
  grid-template-columns: minmax(160px, auto) minmax(160px, auto) 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.microphone-transport .button.primary {
  width: auto;
}

.microphone-transport .live-color {
  justify-self: end;
}

.button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding-top: 32px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
  }

  .connection-panel {
    min-width: 0;
  }

  .card {
    padding: 20px;
    border-radius: 19px;
  }

  #waveform {
    height: 170px;
  }

  .selection-row {
    flex-wrap: wrap;
  }

  .range-copy {
    width: 100%;
  }

  .selection-row label {
    flex: 1;
  }

  .selection-row input {
    width: 100%;
  }

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

  .show-mode-section,
  .effect-section,
  .automatic-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .mode-picker,
  .effect-picker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .automatic-panel .button {
    width: 100%;
  }

  .spectrum-palette-note {
    align-items: stretch;
    flex-direction: column;
  }

  .spectrum-palette-note .button.primary {
    width: 100%;
  }

  .song-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .transport {
    grid-template-columns: 1fr auto;
  }

  .transport audio,
  .live-color {
    grid-column: 1 / -1;
  }

  .live-color {
    grid-row: 2;
  }

  .stop-button {
    grid-row: 2;
    grid-column: 2;
  }

  .cue {
    grid-template-columns: auto 1fr auto;
  }

  .cue select {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .cue .jump {
    grid-column: 2;
    grid-row: 3;
  }

  .cue .delete {
    grid-column: 3;
    grid-row: 3;
  }

  .source-mode-picker,
  .microphone-controls {
    grid-template-columns: 1fr;
  }

  .source-mode-button small,
  .source-card .section-heading p,
  .microphone-card > .section-heading p,
  .microphone-light-style .effect-section > div > small {
    display: none;
  }

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

  .microphone-transport {
    position: sticky;
    z-index: 10;
    top: 0;
    grid-template-columns: 1fr 1fr;
    padding-top: 12px;
    background: var(--card);
  }

  .microphone-transport .live-color {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
}

/* Cyberpunk / industrial theme ------------------------------------------------ */

:root {
  --background: #06080a;
  --card: rgba(10, 14, 17, 0.96);
  --card-border: rgba(0, 240, 255, 0.16);
  --text: #e8f1ef;
  --muted: #7f9394;
  --purple: #ff2bd6;
  --purple-light: #00f0ff;
  --blue: #00a8ff;
  --danger: #ff3b5c;
  --acid: #d9ff43;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

body {
  background:
    linear-gradient(rgba(6, 8, 10, 0.44), rgba(6, 8, 10, 0.68)),
    linear-gradient(90deg, rgba(0, 240, 255, 0.018) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgba(0, 240, 255, 0.018) 1px, transparent 1px) 0 0 / 64px 64px,
    radial-gradient(circle at 76% -10%, rgba(255, 43, 214, 0.08), transparent 32rem),
    url("assets/lucy-david-background.jpg") center top / cover no-repeat fixed,
    #06080a;
}

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

body::before {
  opacity: 0.22;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(200, 255, 250, 0.022) 4px
  );
}

body::after {
  opacity: 0.07;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 17px, rgba(0, 240, 255, 0.08) 18px),
    repeating-linear-gradient(25deg, transparent 0 29px, rgba(255, 43, 214, 0.05) 30px);
  mask-image: linear-gradient(to bottom, black, transparent 46%);
}

.ambient {
  width: 18rem;
  height: 30rem;
  border-radius: 0;
  opacity: 0.07;
  filter: blur(110px);
}

.ambient-one {
  background: #00f0ff;
}

.ambient-two {
  background: #ff2bd6;
}

.shell {
  padding-top: 52px;
}

.eyebrow,
.label,
.selection-row label {
  color: var(--purple-light);
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1,
h2 {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1 {
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: -0.075em;
  text-shadow: 3px 0 rgba(0, 240, 255, 0.22);
}

h1 span {
  color: var(--text);
  font-weight: 650;
  text-shadow: 3px 0 rgba(255, 43, 214, 0.3);
}

h2 {
  text-transform: uppercase;
  letter-spacing: 0.03em !important;
}

.intro {
  max-width: 610px;
  font-size: 0.95rem;
}

.connection-panel,
.card {
  position: relative;
  border-radius: 3px;
  background: var(--card);
  box-shadow: 7px 7px 0 rgba(0, 240, 255, 0.025);
  backdrop-filter: none;
}

.connection-panel::before,
.card::before {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 54px;
  height: 2px;
  background: var(--purple-light);
  content: "";
  box-shadow: 54px 0 var(--purple);
}

.connection-copy strong,
.live-color strong {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-dot,
.status-dot.connected,
.status-dot.working {
  border-radius: 1px;
}

.status-dot.connected {
  background: var(--acid);
  box-shadow: 0 0 0 4px rgba(217, 255, 67, 0.09), 0 0 12px rgba(217, 255, 67, 0.45);
}

.button {
  border-color: rgba(0, 240, 255, 0.14);
  border-radius: 2px;
  color: #c7d4d2;
  background: #11171a;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.button:hover {
  border-color: rgba(0, 240, 255, 0.48);
  color: #ffffff;
  background: #151e21;
  transform: translate(-1px, -1px);
}

.button.primary,
.button.primary:hover {
  color: #031012;
  background: var(--purple-light);
  box-shadow: 4px 4px 0 rgba(255, 43, 214, 0.5);
}

.button.primary:hover {
  background: #70f8ff;
  box-shadow: 2px 2px 0 rgba(255, 43, 214, 0.65);
}

.step {
  border-color: rgba(0, 240, 255, 0.3);
  border-radius: 1px;
  color: var(--purple-light);
  background: rgba(0, 240, 255, 0.055);
  box-shadow: inset 3px 0 var(--purple);
}

.drop-zone {
  border-color: rgba(0, 240, 255, 0.32);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.025), transparent 42%),
    rgba(0, 0, 0, 0.16);
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--purple-light);
  background: rgba(0, 240, 255, 0.06);
}

.drop-icon {
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 1px;
  color: var(--purple-light);
  background: #0d1719;
  box-shadow: 3px 3px 0 rgba(255, 43, 214, 0.22);
}

.waveform-wrap {
  border-color: rgba(0, 240, 255, 0.15);
  border-radius: 1px;
  background: #080b0d;
  box-shadow: inset 0 0 28px rgba(0, 240, 255, 0.025);
}

.timeline-times {
  color: #587072;
}

.selection-row input {
  border-color: rgba(0, 240, 255, 0.16);
  border-radius: 1px;
  color: var(--purple-light);
  background: #080d0f;
}

.show-mode-section,
.effect-section,
.transport {
  border-color: rgba(0, 240, 255, 0.1);
}

.mode-picker,
.effect-picker {
  border: 1px solid rgba(0, 240, 255, 0.08);
  border-radius: 2px;
  background: #080d0f;
}

.mode-button,
.effect-button {
  border-radius: 1px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mode-button.selected,
.effect-button.selected {
  border-color: rgba(0, 240, 255, 0.34);
  color: var(--purple-light);
  background: rgba(0, 240, 255, 0.09);
  box-shadow: inset 0 -2px var(--purple);
}

.automatic-panel {
  border-color: rgba(255, 43, 214, 0.28);
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(255, 43, 214, 0.055), transparent 38%),
    #0a0e11;
}

.color-button {
  border-radius: 1px;
  background: #0c1114;
  font-size: 0.76rem;
  letter-spacing: 0.025em;
}

.color-button.random-color {
  border-color: rgba(255, 43, 214, 0.25);
  background: linear-gradient(120deg, rgba(255, 43, 214, 0.08), rgba(0, 240, 255, 0.07));
}

.swatch,
.live-color > span {
  border-radius: 1px;
}

.cue {
  border-color: rgba(0, 240, 255, 0.08);
  border-radius: 1px;
  background: #0a0e11;
}

.cue:hover {
  border-color: rgba(0, 240, 255, 0.2);
}

.cue-swatch,
.cue button,
.cue select,
.empty-state {
  border-radius: 1px;
}

.cue button,
.cue select {
  border: 1px solid rgba(0, 240, 255, 0.1);
  background: #10171a;
}

.empty-state {
  border-color: rgba(0, 240, 255, 0.14);
  background: rgba(0, 0, 0, 0.12);
}

footer {
  color: #4d6264;
  letter-spacing: 0.025em;
}

@media (max-width: 760px) {
  .shell {
    padding-top: 28px;
  }

  .card {
    border-radius: 2px;
  }
}
