.ai-gallery {
  position: relative;
  margin: 1.25rem 0 1.35rem;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, .9);
  border-radius: .8rem;
  background: #087fd5;
  box-shadow: 0 18px 38px rgba(23, 23, 25, .18);
  cursor: pointer;
}

.ai-gallery:focus-visible {
  outline: 3px solid #111;
  outline-offset: 4px;
}

.ai-gallery-viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #06101a;
  touch-action: pan-y;
}

.ai-gallery-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity .35s ease, transform 1.5s ease;
  pointer-events: none;
}

.ai-gallery-slide.is-active {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
}

.ai-gallery-feedback {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .64);
  font: 700 1.35rem / 1 "DM Sans", sans-serif;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.85);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}

.ai-gallery-feedback.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.ai-gallery-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ai-gallery-slide { transition: none; }
}

@media (max-width: 560px) {
  .ai-gallery { border-width: 5px; }
}
