.rail {
  display: flex;
  gap: 0.75rem;
  max-inline-size: 100%;
  overflow-x: auto;
  padding: 0.75rem;
  background: white;
  color: black;
  border: 1px solid silver;
}

.card {
  flex: 0 0 6rem;
  block-size: 5rem;
  display: grid;
  place-items: center;
  background: whitesmoke;
  border: 1px solid silver;
}

.card--focus {
  view-timeline-name: --focus;
  view-timeline-axis: x;
  background: #fff3e0;
}

@supports (animation-timeline: view()) {
  .card--focus {
    animation: pop linear both;
    animation-timeline: --focus;
    animation-range: entry;
  }
}

@keyframes pop {
  from {
    scale: 0.85;
    opacity: 0.4;
  }
}