/* 画面全体のオーバーレイ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
}

/* モーダル本体 */
.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  width: 90%;             /* ← ここが重要！100% → 90% に変更 */
  max-width: 900px;
  max-height: 90%;
  
  overflow-x: hidden;     /* ← 横スクロール禁止 */
  overflow-y: auto;       /* ← 必要な時だけ縦スクロール */

  background: #000000;
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}

/* 閉じるボタン */
.modal-close {
  display: block;
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  color: #ffffff;
}

/* 画像ラッパー */
.modal-inner {
  display: flex;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.modal-link {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 4.2em;
  margin: 0 auto;
  text-align: center;
  font-size: var(--txt-size14);
  border: 1px solid #fff;
}

.modal-link-caution {
  display: block;
  font-size: 0.75em;
  margin-top: 0.3em;
}

.link-inactive {
  pointer-events: none;
  opacity: 0.6;
}

/* SP */
@media screen and (max-width:767px){
  .modal-inner {
    flex-flow: column;
    gap: 1.1em;
    padding: 60vw 10vw;
  }
  .modal-link {
    width: 94%;
  }
}

/* タブレット・PC */
@media screen and (min-width:768px){
  .modal-inner {
    gap: 2em;
    padding: 18vw 6vw;
  }
  .modal-link {
    width: 23em;
    white-space: nowrap;
  }
}