.manual-steer {
  --manual-steer-left: 50%;
  position: absolute;
  left: max(16.5px, env(safe-area-inset-left));
  right: auto;
  top: auto;
  bottom: max(51px, calc(env(safe-area-inset-bottom) + 42px));
  z-index: 18;
  width: clamp(112.5px, 21vw, 165px);
  height: clamp(76.5px, 15vw, 112.5px);
  overflow: hidden;
  border: 5px solid var(--turn-outline);
  border-radius: 22.5px;
  background: var(--yellow);
  box-shadow: 5.25px 5.25px 0 var(--turn-shadow-color);
  touch-action: none;
  cursor: ew-resize;
}

.manual-steer::before,
.manual-steer::after {
  position: absolute;
  top: 50%;
  z-index: 1;
  color: var(--turn-text);
  font-size: max(var(--turn-text-floor, 11px), clamp(1.65rem, 5vw, 3rem));
  font-weight: 1000;
  line-height: 1;
  transform: translateY(-54%);
  pointer-events: none;
}

.manual-steer::before {
  content: "←";
  left: 7%;
}

.manual-steer::after {
  content: "→";
  right: 7%;
}

.manual-steer-knob {
  position: absolute;
  left: var(--manual-steer-left);
  top: 50%;
  z-index: 2;
  width: clamp(49.5px, 9.5vw, 72px);
  aspect-ratio: 1;
  border: 5px solid var(--turn-outline);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 3.75px 5.25px 0 rgb(8 9 10 / 0.35);
  transform: translate(-50%, -50%);
  transition: left 110ms cubic-bezier(0.2, 0.9, 0.25, 1.15), box-shadow 100ms ease;
  pointer-events: none;
}

.manual-steer.is-steering .manual-steer-knob {
  transition: none;
  box-shadow: 1.5px 2.25px 0 rgb(8 9 10 / 0.35);
}

.manual-steer-knob::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  aspect-ratio: 1;
  border: 4px solid var(--turn-outline);
  border-radius: 50%;
  background: var(--turn-surface-page);
  transform: translate(-50%, -50%);
}

:root.turn-left-handed-controls .manual-steer {
  right: max(16.5px, env(safe-area-inset-right));
  left: auto;
}

@media (max-height: 322.5px) {
  .manual-steer {
    bottom: max(43.5px, calc(env(safe-area-inset-bottom) + 37.5px));
    width: clamp(108.75px, 20vw, 142.5px);
    height: clamp(72px, 14vw, 94.5px);
    border-radius: 19.5px;
  }

  .manual-steer-knob {
    width: clamp(46.5px, 8.5vw, 61.5px);
  }
}
