.gallery__link {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  position: relative;
}

.gallery__link .img {
  width: calc((100% - 15px) / 4);
  height: 200px;
  overflow: hidden; 
  /* border-radius: 5px; */
  position: relative;
}

.gallery__link .img:last-child::after {
  content: "全てを見る　→";
  font-family: A1Mincho, serif !important;
  font-weight: 600;
  font-size: 1.2vw;
  color: #fff;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.3);
  /* border-radius: 5px; */
}

.gallery__link .img.big {
  width: 100%;
  height: auto;
}

.gallery__link .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.js-gallery-open {
  cursor: pointer;
}

@media screen and (max-width: 1023px) {
  .gallery__link .img {
    width: calc((100% - 5px) / 2);
    height: 130px;
  }
  .gallery__link .img:last-child::after {
    font-size: 3.46667vw;
  }
}

.gallery__modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 40px;
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s;
}

.gallery__modal.is-open {
  z-index: 10000;
  visibility: visible;
  opacity: 1;
}

.gallery__modal .modal {
  width: calc(100% - 160px);
  height: calc(100% - 160px);
  background-color: #fff;
  /* border-radius: 20px; */
  padding: 40px;
  position: relative;
}

.js-gallery-close {
  cursor: pointer;
  color: #333;
  font-size: 2.5vw;
  line-height: 1;
  position: absolute;
  top: 20px;
  right: 20px;
}

.gallery__modal .modal .content {
  width: calc(100% - 60px);
  padding: 20px;
  height: calc(100% - 40px);
  overflow-y: scroll;
  overflow-x: hidden;
}

@media screen and (max-width: 1023px) {
  .js-gallery-close {
    font-size: 5vw;
  }

  .gallery__modal {
    padding: 40px 20px;
  }

  .gallery__modal .modal {
    padding: 70px 20px 40px;
    width: calc(100% - 80px);
  }

  .gallery__modal .modal .content {
    padding: 0;
    width: 100%;
    height: 100%;
  }
}

@media screen and (max-width: 580px) {
  .js-gallery-close {
    font-size: 7vw;
  }
  .gallery__modal .modal {
    padding: 60px 20px 40px;
  }
}

main.hotels_detail .gallery .child .items .item {
  border-bottom: none !important;
}

.modula-best-grid-gallery .fancybox__content {
  cursor: default !important;
  pointer-events: none !important;
}