/* Cover preview: cursor zones on desktop, native swipe on touch devices. */
.cover-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.cover-gallery-track {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.cover-gallery-track::-webkit-scrollbar { display: none; }
.cover-gallery-slide {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
}
.cover-gallery-slide img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: none;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
.cover-gallery-background {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}
.cover-gallery-background img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}
@media (hover: hover) and (pointer: fine) {
  .cover-gallery--layered:not([data-cover-input="touch"]) .cover-gallery-track {
    display: grid;
    overflow: hidden;
  }
  .cover-gallery--layered:not([data-cover-input="touch"]) .cover-gallery-slide {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateX(-6%);
    pointer-events: none;
    transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out);
  }
  .cover-gallery--layered:not([data-cover-input="touch"]) .cover-gallery-slide:last-child {
    transform: translateX(6%);
  }
  .cover-gallery--layered:not([data-cover-input="touch"]) .cover-gallery-slide[aria-hidden="false"] {
    opacity: 1;
    transform: none;
  }
  .cover-gallery--layered:focus-within .cover-gallery-slide { transition: none; }
}
.cover-gallery-dots {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 5px;
  z-index: 1;
  pointer-events: none;
}
.cover-gallery-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.4;
  transition: opacity 120ms var(--ease-out);
}
.cover-gallery-dot.is-active { opacity: 1; }
.cover-gallery:focus-visible {
  outline: 1px solid var(--hover-outline);
  outline-offset: -1px;
}
.cover-gallery-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .cover-gallery-dot { transition: none; }
  .cover-gallery--layered .cover-gallery-slide {
    transform: none !important;
    transition: opacity 120ms var(--ease-out) !important;
  }
  .cover-gallery--layered:focus-within .cover-gallery-slide { transition: none !important; }
}
