body {
  font-size: 14px;
}

#close {
  cursor: pointer;
  width: 200px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
  padding: 12px 0;
  margin: 16px auto 0;
}

#open{
  cursor: pointer;
}

#mask {
  background: rgba(0, 0, 0, 0.4);
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 1;
}

#modal {
  background: #fff;
  width: 90vw;
  max-width: 990px;
  padding: 20px;
  border-radius: 4px;
  position: fixed;
  top: 0;
  left: 0px;
  right: 0;
  margin: 0 auto;
  transition: transform 0.4s;
  z-index: 2;
}

#modal > p {
  margin: 0 0 20px;
}

#mask.hidden {
  display: none;
}

#modal.hidden {
  transform: translate(0, -3000px);
}

@media screen and (max-width: 768px){
  #modal {
    top: 10%;
    z-index: 999;
}
}