.spevntgal,
.spevntgal *,
.spevntgal *::before,
.spevntgal *::after {
  box-sizing: border-box;
}

.spevntgal {
  --spevntgal-bg: #f3f4f6;
  --spevntgal-text: #111827;
  --spevntgal-muted: #6b7280;
  --spevntgal-control: rgba(17, 24, 39, 0.82);
  --spevntgal-control-text: #ffffff;
  --spevntgal-radius: 16px;

  position: relative;
  width: 100%;
  min-height: 180px;
  overflow: hidden;
  color: var(--spevntgal-text);
  background: var(--spevntgal-bg);
  border-radius: var(--spevntgal-radius);
  touch-action: pan-y;
}

.spevntgal:focus {
  outline: 3px solid rgba(31, 94, 255, 0.45);
  outline-offset: 3px;
}

.spevntgal-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: inherit;
  cursor: grab;
  touch-action: pan-y;
}

.spevntgal-dragging .spevntgal-viewport {
  cursor: grabbing;
}

.spevntgal-track {
  display: flex;
  width: 100%;
  transition: transform 420ms ease;
  will-change: transform;
}

.spevntgal-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
}

.spevntgal-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  touch-action: manipulation;
}

.spevntgal-image-button:focus {
  outline: 3px solid rgba(31, 94, 255, 0.55);
  outline-offset: -3px;
}

.spevntgal-slide img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 180px;
  max-height: 80vh;
  object-fit: contain;
  background: #f8fafc;
  opacity: 0;
  transition: opacity 260ms ease;
}

.spevntgal-image-loaded img {
  opacity: 1;
}

.spevntgal-img-loader,
.spevntgal-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--spevntgal-muted);
  background:
    linear-gradient(
      105deg,
      #eef1f5 0%,
      #eef1f5 38%,
      #ffffff 50%,
      #eef1f5 62%,
      #eef1f5 100%
    );
  background-size: 220% 100%;
  animation: spevntgal-shimmer 1.35s linear infinite;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.spevntgal-image-loaded .spevntgal-img-loader {
  display: none;
}

.spevntgal-loading {
  position: relative;
  width: 100%;
  min-height: 240px;
  border-radius: inherit;
}

@keyframes spevntgal-shimmer {
  from {
    background-position: 220% 0;
  }
  to {
    background-position: -220% 0;
  }
}

.spevntgal-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: clamp(42px, 9vw, 56px);
  height: clamp(42px, 9vw, 56px);
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: var(--spevntgal-control-text);
  background: var(--spevntgal-control);
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1;
  cursor: pointer;
}

.spevntgal-arrow svg,
.spevntgal-modal-arrow svg,
.spevntgal-modal-close svg {
  width: 58%;
  height: 58%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.spevntgal-modal-close svg {
  width: 50%;
  height: 50%;
}

.spevntgal-arrow,
.spevntgal-modal-arrow,
.spevntgal-modal-close {
  font-size: 0;
}

.spevntgal-arrow:focus {
  outline: 3px solid rgba(255,255,255,0.9);
  outline-offset: 3px;
}

.spevntgal-prev {
  left: 10px;
}

.spevntgal-next {
  right: 10px;
}

.spevntgal-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.spevntgal-empty,
.spevntgal-error {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 20px;
  color: var(--spevntgal-muted);
  text-align: center;
}

html.spevntgal-modal-open,
body.spevntgal-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.spevntgal-modal[hidden] {
  display: none;
}

.spevntgal-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vw, 28px);
  overscroll-behavior: contain;
  touch-action: none;
}

.spevntgal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
  pointer-events: all;
}

.spevntgal-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1200px);
  max-height: 94dvh;
  display: grid;
  gap: 10px;
  place-items: center;
  pointer-events: auto;
}

.spevntgal-modal-img {
  display: block;
  max-width: 100%;
  max-height: 84dvh;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  touch-action: pan-y;
}

.spevntgal-modal-title {
  max-width: min(100%, 900px);
  padding: 8px 12px;
  margin: 0;
  color: #fff;
  text-align: center;
  font: 700 16px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-shadow: 0 2px 18px rgba(0,0,0,0.65);
}

.spevntgal-modal-close,
.spevntgal-modal-arrow {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: rgba(17, 24, 39, 0.82);
  cursor: pointer;
  touch-action: manipulation;
}

.spevntgal-modal-close {
  top: 8px;
  right: 8px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 2rem;
}

.spevntgal-modal-arrow {
  top: 50%;
  width: clamp(44px, 9vw, 60px);
  height: clamp(44px, 9vw, 60px);
  transform: translateY(-50%);
  border-radius: 999px;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
}

.spevntgal-modal-prev {
  left: 8px;
}

.spevntgal-modal-next {
  right: 8px;
}

.spevntgal-modal-close:focus,
.spevntgal-modal-arrow:focus {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.spevntgal-img-loader {
  pointer-events: none;
}

@media (max-width: 560px) {
  .spevntgal {
    border-radius: 12px;
  }

  .spevntgal-arrow {
    opacity: 0.92;
  }

  .spevntgal-modal {
    padding: 8px;
  }

  .spevntgal-modal-close {
    top: 4px;
    right: 4px;
  }

  .spevntgal-modal-prev {
    left: 4px;
  }

  .spevntgal-modal-next {
    right: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spevntgal-track,
  .spevntgal-slide img {
    transition: none;
  }

  .spevntgal-img-loader,
  .spevntgal-loading {
    animation: none;
  }
}