.lane {
  position: relative;
  overflow: hidden;
  block-size: 3.25rem;
  background: whitesmoke;
  border: 1px solid #ccc;
}

.dot {
  position: absolute;
  inset-block-start: 0.7rem;
  inset-inline-start: 0.25rem;
  inline-size: 1.75rem;
  block-size: 1.75rem;
  background: tomato;
  animation: go 1.8s linear(0, 0.15 15%, 0.85 85%, 1) infinite alternate;
}

@keyframes go {
  to {
    translate: 9rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot {
    animation: none;
  }
}