.stories {
  width: min(calc(100% - 48px), 1440px);
  margin: clamp(48px, 6vw, 92px) auto 0;
  text-align: center;
}
.stories h2 { margin: 0 auto clamp(40px, 5.3vw, 80px); }
.stories-window {
  --story-width: clamp(168px, 15.65vw, 236px);
  --story-gap: clamp(16px, 2.12vw, 32px);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 20%, black 80%, transparent);
}
.stories-track, .stories-group { display: flex; width: max-content; }
.stories-track { animation: story-scroll 46s linear infinite; }
.stories-group {
  flex: none;
  gap: var(--story-gap);
  padding-right: var(--story-gap);
}
.story {
  margin: 0;
  position: relative;
  width: var(--story-width);
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: #eff4f7;
}
.story img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story figcaption {
  position: absolute;
  bottom: 7%;
  left: 8%;
  color: white;
  background: rgb(12 29 37 / 82%);
  padding: .35em .65em;
  border-radius: .4em;
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 500;
}
@keyframes story-scroll { to { transform: translateX(-33.333333%); } }
.stories-window:focus-visible .stories-track { animation-play-state: paused; }
@media (max-width: 640px) {
  .stories { width: 100%; }
  .stories-window { mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .stories-window { overflow-x: auto; mask-image: none; }
  .stories-track { animation: none; }
  .stories-group[aria-hidden] { display: none; }
}
