.reference-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #c4a15b transparent;
}

.reference-track > .reference-slide {
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.reference-slide > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reference-slide img {
  max-width: 100%;
  height: auto;
}

.reference-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.25rem;
}

.reference-controls[hidden] {
  display: none;
}

.reference-controls button {
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid #c4a15b;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.4rem;
  cursor: pointer;
}

.reference-controls button:disabled {
  visibility: hidden;
}

.reference-controls button:hover {
  background: #c4a15b;
  color: #101111;
}

.reference-controls button:focus-visible, .reference-track:focus-visible {
  outline: 2px solid #c4a15b;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .reference-track {
    scroll-behavior: auto;
  }

}

@media (min-width: 801px) {
  .reference-carousel {
    position: relative;
    padding-inline: 64px;
  }

  .reference-controls {
    padding: 0;
  }

  .reference-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .reference-controls [data-reference-prev] {
    left: 0;
  }

  .reference-controls [data-reference-next] {
    right: 0;
  }

  /* Den Zähler weiterhin für Screenreader bereitstellen. */
  .reference-controls [data-reference-status] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

}

@media (min-width: 801px) {
  .reference-controls button {
    top: 0;
    bottom: 0;
    transform: none;
    width: 52px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    background: rgba(196, 161, 91, 0.035);
    color: #c4a15b;
    transition: background-color 180ms ease;
  }

  .reference-controls button:hover, .reference-controls button:focus-visible {
    background: rgba(196, 161, 91, 0.16);
    color: #c4a15b;
  }

  .reference-controls button:focus-visible {
    outline: 2px solid #c4a15b;
    outline-offset: 2px;
  }

}

@media (min-width: 801px) and (prefers-reduced-motion: reduce) {
  .reference-controls button {
    transition: none;
  }

}
