#popup {
  display: none; /* label でコントロールするので input は非表示に */
}

.popup-open {
  cursor: pointer; /* マウスオーバーでカーソルの形状を変えることで、クリックできる要素だとわかりやすいように */
}

/*
.popup-overlay {
  display: none;
}
*/
.popup-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity .3s ease,
    visibility .3s ease;

  z-index: 99999;
  background-color: #00000070;
  position: fixed;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
}

#popup:checked ~ .popup-overlay {
/*  display: block;*/
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  z-index: 99999;
  background-color: #00000070;
  position: fixed;
  width: 100%;
  height: 100vh;
  top: 0;
  left: 0;
}

.popup-window {
  width: 100vw;
  max-width: 560px;
  padding: 20px;
  background-color: #ffffff;
background:none;
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* ??追加 */
  max-height: 100vh;
  overflow-y: auto;

  opacity: 0;
  transform: translate(-50%, -45%);
  transition:
    opacity .3s ease,
    transform .3s ease;
}

#popup:checked ~ .popup-overlay .popup-window {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.box_srcollbar_popup {
  overflow-y: auto;
  flex: 1;
}

.popup-text {
  margin: 0;
}

.popup-text:not(:last-of-type) {
  margin-bottom: 1em
}

.popup-close {
  cursor: pointer;


  position: absolute;
  top: 10px;   /* マイナスやめる */
  right: 10px;
}


#cboxPost {
 opacity: 0;
  transform: translateY(20px);

  transition:
    opacity .3s ease,
    transform .3s ease;
bottom:0;
}

#popup:checked ~ .popup-overlay #popupPost{
  opacity: 1;
  transform: translateY(0);

}
#popup:checked ~ .popup-overlay #cboxPost {
  display: block;

  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;

  background: #fff;
  padding: 12px 5px;


  z-index: 100000; /* overlayより上 */
}


.box_srcollbar_popup {
	overflow:auto;
	padding:5px;line-height:2em;
	background-color:#FFF;
	border-radius:12px;padding:20px;

border:5px solid #acdb7a;
  max-height: 80vh;

}


#popupPost{position:absolute; bottom:0; left:0; width:100%; padding:10px; background-color:#fff;color:#467c00;font-weight:bold;text-align:center;
	border-top:5px solid #acdb7a;display:block;
line-height:1.5em;
}
#popupPost a{border-bottom:1px solid #ea7115;color:#ea7115;font-weight:bold;}
#popup_a{font-size:1.3em;}



.popup-bg-close{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  cursor: pointer;
}
.popup-window{
  z-index: 2;
}

#popupPost{
  z-index: 2;
}


@media (min-width: 0px) and (max-width: 320px) {
.box_srcollbar_popup {
  max-height: 70vh;
}

}

