/* モーダル（共通） */
#modal {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s;
  z-index: 10000;
}

/* 開いた状態 */
#modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 中身 */
#modal .modal-wrap {
  position: relative;
  max-width: 92%;
  max-height: 92%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  border-radius: 6px;
  background: #fff;
  padding: 6px;
}

/* 画像 */
#modal .modal-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(92vh - 40px);
  border-radius: 4px;
}

/* 閉じるボタン */
#modal .close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  font-size: 22px;
  color: #111;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  user-select: none;
}

/* サムネイルにカーソルを出す */
.img img {
  cursor: zoom-in;
}
