@media (max-width: 700px) {
  .gallery-modal .modal-header {
    position: static;
    display: block;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .gallery-modal .modal-header > div {
    display: none;
  }

  .gallery-modal .modal-close {
    position: fixed;
    z-index: 30;
    top: auto;
    right: 14px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    left: 14px;
    display: flex;
    width: auto;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid rgb(255 250 240 / 0.62);
    background: rgb(5 5 5 / 0.96);
    color: #fffaf0;
    transform: none;
  }

  .gallery-modal .modal-shell {
    padding-top: 0;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 86px);
  }

  .image-lightbox .lightbox-close {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  }

  .image-lightbox .lightbox-nav {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  }

  .image-lightbox .lightbox-counter {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  }
}
