/* ===== modal wrapper ===== */
.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  z-index: 999999;
  overflow-y: auto;
}

/* ===== modal background ===== */
.modal-content {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0,0,0,0.9);
  animation: modalopen 1s;
}

/* ===== modal box ===== */
.stage {
  width: 800px;
  max-width: 90%;
  background-color: #fff;
  padding: 2rem 2rem  7rem;
  border-radius: 1rem;
  position: relative;
  margin: 2rem auto;
  text-align: center;
}

.stage h2 {
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.stage p {
  text-align: left;
  font-size: 1.2rem;
  line-height: 1.8;
}

/* ===== links ===== */
.stage .m_link {
  display: block;
}

.stage .m_link li {
  margin-top: 2rem;
  text-align: center;
}

.stage .m_link li a {
  color: #0068b7;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.3s;
}

.stage .m_link li a:hover {
  opacity: 0.7;
}

.stage .m_link li span {
  display: block;
  font-size: 0.9rem;
}

/* ===== close button ===== */
.modalClose {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2rem;
  margin: auto;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
  background-color: transparent;
  border: 0;
}

.modalClose span {
  display: block;
  text-align: center;
  position: absolute;
  top: 105%;
  font-size: 0.9rem;
  color: #000;
  white-space: nowrap;
}

.modalClose::before,
.modalClose::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  height: 3px;
  background-color: #000;
}

.modalClose::before { transform: rotate(45deg); }
.modalClose::after  { transform: rotate(-45deg); }

/* ===== animation ===== */
@keyframes modalopen {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== responsive ===== */
@media (max-width: 640px) {
  .stage { padding: 2rem 1rem 7rem;}
  .stage h2 { font-size: 1.4rem; }
  .stage p,
  .stage .m_link li a { font-size: 1rem; }
  .stage .m_link li span { font-size: 0.8rem; }
  .modalClose {
    width: 2.5rem;
    height: 2.5rem;
  }
}
