.modal {
  line-height: 1.6;
}
.modal h2 {
  font-weight: bold;
  text-align: center;
  padding: 0 0 5%;
}
.modal .thumb {
  width: 100%;
  margin: 0 0 5%;
}
.modal .comment {
  padding: 0 0 5%;
}
.modal .seibun {
  font-size: .8em;
  padding: 0 0 5%;
}
.modal .caution {
  font-size: .8em;
  color: #f13e76;
}
.modal .checkbox {
  display: none;
}

/* Gray background */
.modal .modal-overlay {
  opacity: 0;
  transition: all 0.3s ease;
  width: 50%;
  position: absolute;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: -100;
  transform: scale(1);
  display: flex;
  background-color: rgba(255,255,255,0.9);
}

/* Box */
.modal .modal-wrap {
  padding: 40px 50px;
  width: 600px;
  margin: 0 auto;
  align-self: flex-start;
  border-radius: 2px;
  transition: all 0.5s ease;
}
.modal .modal-wrap.small {
  width: 30%;
}
.modal .modal-wrap.full {
  width: 100%;
  height: 100%;
}

.modal .modal-wrap.a-center {
  align-self: center;
}
.modal .modal-wrap.from-left {
  transform: translateX(-100%);
}
.modal .modal-wrap.from-right {
  transform: translateX(100%);
}
.modal .modal-wrap.from-top {
  transform: translateY(-100%);
}
.modal .modal-wrap.from-bottom {
  transform: translateY(100%);
}


/* Close button */
.modal .modal-overlay .close {
  position: absolute;
  right: 5%;
  top: 2.5%;
  font-size: 40px;
  width: 30px;
  height: 30px;
  color: #282c34;
}

.modal .modal-overlay .close:hover {
  cursor: pointer;
  color: #4b5361;
}


 .modal .o-close {
   width: 100%;
   height: 100%;
   position: fixed;
   left: 0;
   top: 0;
   z-index: -100;
 }

.modal input:checked ~ .o-close {
  z-index: 9998;
}
.modal input:checked ~ .modal-overlay{
  transform: scale(1);
  opacity:1;
  z-index: 9997;
  overflow: auto;
}
.modal input:checked ~ .modal-overlay .modal-wrap {
  transform: translateY(0);
  z-index: 9999;
}

/* Responsive Design */
/* Tablet size */
@media (max-width: 800px) {
  .modal .modal-wrap {
    width: 80%;
    padding: 20px;
  }
}

/* Phone size */
@media (max-width: 500px) {
  .modal .modal-wrap {
    width: 90%;
  }
}

@media all and (max-width: 1100px) {
  .modal .modal-wrap {
    width: 100%;
  }
  .modal .modal-overlay .close {
    position: absolute;
    right: 5%;
    top: 0;
    font-size: 40px;
    width: 30px;
    height: 30px;
    color: #282c34;
  }
}
