
#open-lightbox{
  position: absolute;
  top: 10px;
  right: 20px;
  color: #c82424;
  font-weight: bold;
  font-size: 14px;
}

/* 背景オーバーレイ */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0); /* 初期は透明 */
  z-index: 1000;
  transition: 0.3s ease;
}

/* 表示状態 */
.lightbox-overlay.show {
  background: rgba(0,0,0,0.6);
}

/* ポップアップ本体 */
.lightbox-content {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8); /* 小さめスタート */
  opacity: 0; /* 初期は透明 */
  background: #fff;
  padding: 3%;
  max-width: 900px;
  width: 80%;
  max-height: 80vh;        /* 画面高さの80％までに制限 */
  overflow-y: auto;        /* 中身がはみ出たら縦スクロール */
  overflow-x: hidden;      /* 横スクロールは隠す */
  border-radius: 1%;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;  /* padding込みで高さ計算 */
}

/* 表示状態 */
.lightbox-overlay.show .lightbox-content {
  transform: translate(-50%, -50%) scale(1); /* 元サイズ */
  opacity: 1; /* 不透明 */
}
/* 閉じるボタン */
.lightbox-close {
  display: block;
  width: 100px;
  text-align: center;
  padding: 6px 12px;
  background: #e74c3c;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  margin: 20px auto;
}

.lightbox-close:hover {
  background: #c0392b;
}


/* ブレイクポイント毎のデザイン */
@media (max-width:768px) {
  #open-lightbox{
    position: absolute;
    top: 10px;
  right: auto;
  left: 10px;
    color: #c82424;
    font-weight: bold;
    font-size: 14px;
  }

  /* 背景オーバーレイ */
  .lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0); /* 初期は透明 */
    z-index: 1000;
    transition: 0.3s ease;
  }

  /* 表示状態 */
  .lightbox-overlay.show {
    background: rgba(0,0,0,0.6);
  }

  /* ポップアップ本体 */
  .lightbox-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8); /* 小さめスタート */
    opacity: 0; /* 初期は透明 */
    background: #fff;
    padding: 3%;
    max-width: 900px;
    width: 80%;
    max-height: 80vh;        /* 画面高さの80％までに制限 */
    overflow-y: auto;        /* 中身がはみ出たら縦スクロール */
    overflow-x: hidden;      /* 横スクロールは隠す */
    border-radius: 1%;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;  /* padding込みで高さ計算 */
  }

  /* 表示状態 */
  .lightbox-overlay.show .lightbox-content {
    transform: translate(-50%, -50%) scale(1); /* 元サイズ */
    opacity: 1; /* 不透明 */
  }
  /* 閉じるボタン */
  .lightbox-close {
    display: block;
    width: 100px;
    text-align: center;
    padding: 6px 12px;
    background: #e74c3c;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    margin: 20px auto;
  }

  .lightbox-close:hover {
    background: #c0392b;
  }
}
