#synth {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin: 1.5rem auto;
  padding: 1.5rem 1.75rem;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  backdrop-filter: blur(3px) saturate(140%);
  -webkit-backdrop-filter: blur(3px) saturate(140%);
  box-shadow: 0 0 70px rgba(168, 85, 247, 0.08), 0 20px 50px rgba(0, 0, 0, 0.45);
}

#synth-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--fg-dim);
}

#synth-wave {
  color: var(--accent-2);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#synth-scope {
  display: block;
  width: 100%;
  max-width: 560px;
  height: 80px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
}

/* Class, not id -- #beats-keys reuses this same layout via class="synth-keys". */
.synth-keys {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
}

.synth-key {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.4rem;
  border-radius: 0 0 4px 4px;
  cursor: pointer;
  user-select: none;
  transition: background 0.08s ease, transform 0.08s ease;
}

.synth-key.white {
  width: 32px;
  height: 130px;
  background: rgba(231, 226, 245, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.3);
}

.synth-key.white .synth-key-label {
  color: #1a1425;
}

.synth-key.black {
  width: 22px;
  height: 84px;
  background: #17101f;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.synth-key.black .synth-key-label {
  color: var(--fg-dim);
}

.synth-key-label {
  font-size: 0.65rem;
  text-transform: uppercase;
}

.synth-key.active.white {
  background: var(--accent);
  transform: translateY(2px);
}

.synth-key.active.black {
  background: var(--accent-2);
  transform: translateY(2px);
}

#synth-hint {
  font-size: 0.78rem;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
  text-align: center;
}

@media (max-width: 700px) {
  #synth {
    margin: 3.5rem 1rem 1.5rem;
    padding: 1rem;
  }
}
