.tempoControl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tempoControlStack {
  flex-direction: column;
  gap: 10px;
}

.tempoDialRow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tempoValueTop {
  align-items: center;
}

.tempoStepSwitch {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.tempoInputNote {
  justify-self: end;
}

.tempoInputLarge {
  justify-self: center;
}

.tempoStepButton {
  min-width: 52px;
  padding: 6px 10px;
  border: 1px solid #1e7a4f;
  border-radius: 999px;
  background: #eaf7f0;
  color: #165f3f;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.tempoStepButton.isActive {
  background: #1e7a4f;
  border-color: #1e7a4f;
  color: #ffffff;
}

.tempoStepButton:focus-visible {
  outline: 2px solid #1e7a4f;
  outline-offset: 2px;
}

.tempoDial {
  width: 96px;
  height: 96px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #1e7a4f;
  background-color: #ffffff;
  background-image: linear-gradient(90deg, #f5fbff 0 50%, #f9fff2 50 100%);
  color: #165f3f;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-weight: 700;
  font-size: 1.125em;
  cursor: grab;
  touch-action: none;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.tempoDial.isTurningPositive {
  background-color: #ffffff;
  background-image: linear-gradient(90deg, #f0f8ff 0 50%, #ffd59c 50 100%);
  border-color: #d08a2d;
  box-shadow: 0 0 0 3px rgba(255, 197, 128, 0.4);
}

.tempoDial.isTurningNegative {
  background-color: #ffffff;
  background-image: linear-gradient(90deg, #8fd0ff 0 50%, #f9fff2 50 100%);
  border-color: #2b75b4;
  box-shadow: 0 0 0 3px rgba(120, 178, 230, 0.35);
}

.tempoDial:active {
  cursor: grabbing;
}

#beatPreference .tempoDial {
  width: 144px;
  height: 144px;
}

.tempoDialIndicator {
  position: absolute;
  top: 8px;
  width: 4px;
  height: 24px;
  background-color: #1e7a4f;
  border-radius: 2px;
}

#beatPreference .tempoDialIndicator {
  top: 12px;
  height: 32px;
}

.tempoDialLabel {
  letter-spacing: 0.5px;
}

.tempoDialSide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: 0.9em;
  color: #165f3f;
  opacity: 0.85;
}

.tempoDialMinus {
  left: 16px;
}

.tempoDialPlus {
  right: 16px;
}

#tempoInput {
  width: 72px;
  padding: 2px 4px;
  border: 1px solid #666;
  border-radius: 3px;
  background-color: white;
  text-align: center;
}

.tempoValueGroup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
}

.tempoInputLarge {
  font-size: 1.8em;
  font-weight: 700;
  color: darkgreen;
}

.tempoHint {
  margin-top: 4px;
  font-size: 0.75em;
  color: #1e7a4f;
}

#tempoInput::-webkit-outer-spin-button,
#tempoInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#tempoInput {
  -moz-appearance: textfield;
  appearance: textfield;
}
