html.modal-is-locked {
  overflow: hidden;
}

.modal,
[data-modal-id] {
  display: none;
}

.modal-overlay,
.modal-wrapper {
  backface-visibility: hidden;
}

.modal,
.modal-wrapper:after {
  vertical-align: middle;
}

.modal-overlay {
  position: fixed;
  z-index: 9999;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-wrapper {
  position: fixed;
  z-index: 10000;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  overflow: auto;
  text-align: center;
  -webkit-overflow-scrolling: touch;
  cursor: pointer !important;
}

.modal-wrapper:after {
  display: inline-block;
  height: 100%;
  margin-left: -0.05em;
  content: "";
}

.modal {
  text-align: center;
  position: relative;
  outline: none;
  width: 90%;
  max-width: 500px;
  margin: 0 auto 10px;
  padding: 25px 0 40px;
  background-color: #FFF;
  border-radius: 10px;
  cursor: default;
}

.modal-is-initialized {
  display: inline-block;
}

.modal-bg.modal-is-opening,
.modal-bg.modal-is-opened {
  filter: blur(3px);
}

.modal-overlay.modal-is-opening,
.modal-overlay.modal-is-closing,
.modal.modal-is-opening,
.modal.modal-is-closing {
  animation-fill-mode: forwards;
}

.modal-overlay.modal-is-opening {
  animation: modal-overlay-opening-keyframes 0.3s;
}

.modal-overlay.modal-is-closing {
  animation: modal-overlay-closing-keyframes 0.3s;
}

.modal.modal-is-opening {
  animation: modal-opening-keyframes 0.3s;
}

.modal.modal-is-closing {
  animation: modal-closing-keyframes 0.3s;
}

.modalClose {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 36px;
  cursor: pointer;
  transition: .2s linear;
  line-height: 1;
  color: #666;
  text-decoration: none;
  user-select: none;
}

.modalClose:hover {
  opacity: 0.6;
}

/****************************************
アニメーション
****************************************/
@keyframes modal-opening-keyframes {
  from {
    transform: scale(1.05);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes modal-closing-keyframes {
  from {
    transform: scale(1);
    opacity: 1;
  }

  to {
    transform: scale(0.95);
    opacity: 0;
  }
}

@keyframes modal-overlay-opening-keyframes {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-overlay-closing-keyframes {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes fadein {
  0% {
    opacity: 0;
  }

  80% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fadeout {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@media only screen and (max-width: 768px) {
  .modal a {
    opacity: 1;
  }

  .modalClose {
    top: 5px;
    right: 5px;
  }
}
