.scroller {
  max-block-size: 9rem;
  overflow: auto;
  padding: 0.75rem 1rem;
  background: white;
  color: black;
  border: 1px solid silver;
  scroll-timeline-name: --panel;
  scroll-timeline-axis: block;
}

.mark {
  position: sticky;
  top: 0;
  padding: 0.25rem 0.5rem;
  margin-block-end: 0.5rem;
  background: #e8f0fe;
  border: 1px solid silver;
  width: max-content;
}

@supports (animation-timeline: scroll()) {
  .mark {
    animation: label linear both;
    animation-timeline: --panel;
  }
}

@keyframes label {
  from {
    opacity: 0.35;
  }
  to {
    opacity: 1;
    background: #c8e6c9;
  }
}