#custom-lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background:  none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#custom-lightbox.hidden {
  display: none;
}

.hidden {
  display: none;
}



.lightbox-content {
  width: 730px;
  height: 730px;
  max-width: 90vw;
  max-height: 90vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  overflow: visible;
  position: relative;
  border-radius: 0px;
  border: 0.5px solid rgba(0, 0, 0, 1);
  z-index: 2;
}

@media (max-width: 640px) {
.lightbox-content {
  max-width: 80vw;
  max-height: 80vw;
}
}

/* #lightbox-image {
  image-rendering: auto;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-position: center;
  display: block;
} */

#lightbox-image {
  image-rendering: auto;
  object-fit: contain;
/*   max-width: 90vw;
  max-height: 90vh; */
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
}


/* オーバーレイ */
/* .lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(220, 220, 220, 0.8);
  z-index: 1;
  mix-blend-mode: multiply;
} */

/* overlay は全画面に表示されるように */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(218, 218, 218, 1);
  mix-blend-mode: multiply;
  z-index: 9998; /* lightbox より下 */
  pointer-events: auto; /* ← これでクリックを受け付ける */
  cursor: pointer;
  backdrop-filter: blur(8px); /* ← ここでぼかす */
}


/* 共通ボタンスタイル */
#custom-lightbox .lightbox-content button {
  position: absolute;
  background: none;
  border: none;
  color: black;
  font-size: 24px;
  padding: 10px 14px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}
#custom-lightbox .lightbox-content button:hover {
  color: rgba(0, 0, 0, 0.5);
}

/* 閉じるボタン（上・中央揃え） */
.lightbox-close {
  top: -50px;
  right: -16px;
}

/* 左右ボタン（左右に外出し） */
.lightbox-prev {
  left: -48px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: -48px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 640px) {
  .lightbox-prev {
    left: -40px;
  }
  .lightbox-next {
    right: -40px;
  }
}