@charset "UTF-8";
@media screen and (max-width: 767px) {
.modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: flex; /* 中央寄せ */
  justify-content: center;
  align-items: center;
  background-color: rgba(0,0,0,0.8);
  width: 100%;
  height: 100%;
  overflow: auto; 
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* 表示用クラス */
.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  max-width: 100%;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.4s ease;
  margin: 10% auto 5% auto;
}

.modal.show .modal-content {
  transform: scale(1);
  opacity: 1;
}

/* 閉じるボタン */
.close {
  position: fixed;
  top: 0px;
  right: 20px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
}
@media screen and (min-width: 768px) {

.modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: flex; /* 中央寄せ */
  justify-content: center;
  align-items: center;
  background-color: rgba(0,0,0,0.8);
  width: 100%;
  height: 100%;
  overflow: auto; 
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* 表示用クラス */
.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  max-width: 95%;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.4s ease;
  margin: 10% auto 5% auto;
}

.modal.show .modal-content {
  transform: scale(1);
  opacity: 1;
}

/* 閉じるボタン */
.close {
  position: fixed;
  top: 0px;
  right: 20px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

}