#overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 99998; 
  display: none;

}
 
#popup {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  z-index: 99999;
  display: none;
}



#close-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 32px; height: 32px;
  border: none;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  justify-content: center;
  color: #fff;
  padding: 0px;  
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 1;
}


#overlay, #popup, #close-btn {
  pointer-events: auto !important;
}


/* ミニポップアップ */
#popup-minimized {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10002;
  display: none; /* JSで制御 */
  width: 20%;
}

#minimized-btn {
  background: /*#0073aa*/#008232;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 7px 7px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  font-size: x-small;
}
#minimized-btn:hover {
  opacity: 0.9;
}


.popup-full-image {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 1em;
}
.popup-mini-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

/* pop-up 全体 */
#popup .popup-content {
  display: flex;
  flex-direction: column;    /* 縦に並べる */
  align-items: center;       /* 水平方向中央寄せ */
  justify-content: center;   /* 垂直方向中央寄せ */
  padding-bottom: 0.5rem;
  gap: 0.5rem;               /* 各要素の間隔 */
}

/* 各ブロックの幅調整など */
.popup-image img {
  max-width: 100%;
  height: auto;
}

.popup-body {
  text-align: center;
  max-width: 90%;
}


/* summary ボタン風に */
.popup-summary {
  text-align: center;
  cursor: pointer;
  list-style: none;          /* 既定のマーカーを外す */
  font-weight: bold;
  padding: 0.5rem 0rem;
  width: 100%;
  max-width: 300px;
}

/* マーカーを消す（元のブラウザ既定マーカー） */
.popup-summary {
  list-style: none; /* もともと要らないなら外せます */
}

/* ▶/▼ の自作マーカー */
.popup-summary::before {
  content: "▶　 ";
  display: inline-block;
  transform-origin: center;
  transition: transform 0.2s ease;
}

/* open クラスがついていたら▼に */
.popup-details.open .popup-summary::before {
  content: "▼　";
}

 #more-info .popup-details-content {
  display: none;
}

 /* 折り畳み内コンテンツのレイアウト */
.popup-details-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

 

.popup-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /*gap: 0.75rem;*/
}

/* ラベルと QR イメージはもっと細かく分けてもOK */
.entry-label {
  font-weight: bold;
  padding-top: 10%;
}

.entry-qr img {
  width: 150px;
  height: auto;
}

.entry-download a {
  color: #007acc;
  text-decoration: underline;
}

#popup {
  /* 画面高さの 90% を超えないように */
  max-height: 80vh;
  /* 縦にオーバーフローしたらスクロール */
  overflow-y: auto;

}

.entry-download-extra{
  font-size: 135%;
  text-decoration: underline;
}


@media (max-width: 768px) {
  #popup {
    width: 95%;
    overflow-y: visible;
  }
  #popup .popup-content {
  padding-bottom: 0rem;
  gap: 0rem;
  }
  #close-btn {
    top: -37px;
  }

  #minimized-btn {
  font-size: 65%;
}
}