.msp-dialog-open,
.msp-dialog-open body {
  overflow: hidden;
}

.msp-content-gallery {
  display: grid;
  gap: 1rem;
}

.msp-content-gallery__slider {
  border-radius: var(--radius-md);
}

.msp-content-gallery__track {
  overflow: hidden;
}

.msp-content-gallery__slide {
  display: flex;
}

.msp-content-gallery__link {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(20, 58, 90, 0.1);
}

.msp-content-gallery__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

.msp-content-gallery .splide__arrows {
  pointer-events: none;
}

.msp-content-gallery .splide__arrow {
  pointer-events: auto;
  width: 2.7rem;
  height: 2.7rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(20, 58, 90, 0.08);
  box-shadow: 0 10px 24px rgba(20, 58, 90, 0.14);
  opacity: 1;
}

.msp-content-gallery .splide__arrow svg {
  fill: var(--color-text);
}

.msp-content-gallery .splide__pagination {
  position: static;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0 0.5rem;
}

.msp-content-gallery .splide__pagination__page {
  width: 0.7rem;
  height: 0.7rem;
  margin: 0;
  background: rgba(20, 58, 90, 0.18);
  opacity: 1;
  transform: none;
}

.msp-content-gallery .splide__pagination__page.is-active {
  width: 1.5rem;
  border-radius: 999px;
  background: var(--color-secondary);
  transform: none;
}

.msp-content-gallery__dialog {
  width: min(94vw, 86rem);
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.msp-content-gallery__dialog::backdrop {
  background: rgba(7, 22, 38, 0.82);
  backdrop-filter: blur(0.25rem);
}

.msp-content-gallery__dialog-shell {
  position: relative;
  display: grid;
  gap: 0.9rem;
  padding: clamp(1rem, 2vw, 1.25rem);
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(12, 32, 51, 0.96);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}

.msp-content-gallery__dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  cursor: pointer;
}

.msp-content-gallery__dialog-close span {
  font-size: 1.7rem;
  line-height: 1;
}

.msp-content-gallery__dialog-image {
  display: block;
  width: 100%;
  max-height: 82vh;
  border-radius: calc(var(--radius-md) - 0.25rem);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.msp-content-gallery__dialog-caption {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

@media (max-width: 48rem) {
  .msp-content-gallery .splide__arrow {
    width: 2.35rem;
    height: 2.35rem;
  }

  .msp-content-gallery__image {
    aspect-ratio: 1 / 1;
  }
}
