@media (min-width: 768px) {
  .modal-dialog {
    width: 70%
  }
}
/* Keep gallery images inside the available modal and viewport. */
.blueimp-gallery .modal-body img {
  max-width: 100%;
  max-height: calc(100vh - 220px);
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Display the gallery thumbnails from left to right. */
#links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

/* Keep thumbnails small while allowing the gallery to wrap on narrow screens. */
#links a {
  display: block;
  flex: 0 0 220px;
}

#links a img {
  display: block;
  width: 220px;
  height: auto;
}
