.gallery-thumb {
  appearance: none;
  color: inherit;
}

.gallery-thumb::after {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--yellow);
  background: rgba(0, 0, 0, 0.74);
  color: var(--yellow);
  content: "+";
  font-size: 1.5rem;
  font-weight: 900;
  transform: skewX(5deg);
}

.gallery-dialog {
  width: min(1120px, calc(100vw - 36px));
  max-width: none;
  max-height: calc(100svh - 36px);
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(255, 230, 16, 0.42);
  background: #050505;
  color: var(--text);
  box-shadow: 16px 16px 0 rgba(240, 4, 127, 0.48), var(--shadow);
}

.gallery-dialog::backdrop {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

.gallery-dialog figure {
  display: grid;
  margin: 0;
}

.gallery-dialog img {
  width: 100%;
  max-height: calc(100svh - 120px);
  object-fit: contain;
}

.gallery-dialog figcaption {
  padding: 12px 18px;
  color: var(--muted);
  text-align: center;
}

.gallery-close,
.gallery-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid var(--yellow);
  background: #050505;
  color: var(--yellow);
  font-weight: 900;
}

.gallery-close {
  top: -15px;
  right: -15px;
  width: 46px;
  height: 46px;
  font-size: 1.8rem;
}

.gallery-nav {
  top: 50%;
  width: 48px;
  height: 64px;
  font-size: 2rem;
  transform: translateY(-50%);
}

.gallery-prev {
  left: 14px;
}

.gallery-next {
  right: 14px;
}

@media (max-width: 720px) {
  .gallery-dialog {
    width: calc(100vw - 20px);
  }

  .gallery-close {
    top: 8px;
    right: 8px;
  }

  .gallery-nav {
    width: 42px;
    height: 54px;
  }
}
