body {
  font-family: system-ui, sans-serif;
  margin: 2rem;
}

.scroll-shadow {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0;

  /* 4 Layer: 2 weiße Blend-Gradienten (folgen dem Inhalt, "local") +
     2 Schatten-Gradienten (bleiben am Container-Rand, "scroll"). Solange
     lokaler und Scroll-Layer sich überlappen, ist am Rand nichts zu sehen —
     erst wenn dort noch Inhalt kommt, wird der Schatten sichtbar. */
  background:
    linear-gradient(to right, #fff 30%, transparent) 0 0,
    linear-gradient(to right, transparent, #fff 70%) 100% 0,
    linear-gradient(to right, rgba(0, 0, 0, 0.25), transparent) 0 0,
    linear-gradient(to left, rgba(0, 0, 0, 0.25), transparent) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}

.item {
  flex: 0 0 100px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #eee;
  border-radius: 0.5rem;
  font-size: 1.5rem;
}
