.track {
  display: grid;
  gap: 0.75rem;
  padding: 0.5rem;
  font: 0.75rem system-ui, sans-serif;
  background-color: whitesmoke;
  container-type: inline-size;
}

.ball {
  inline-size: 6rem;
  padding: 0.25rem 0;
  text-align: center;
  color: white;
  background-color: teal;
  border-radius: 1rem;
  animation: move 1.5s ease-in-out infinite;
}

.alt {
  animation-direction: alternate;
}

@keyframes move {
  to {
    translate: calc(100cqi - 6rem);
  }
}