#modal {
  display: none;
  z-index: 400;
  position: fixed;
  top: 0;
  left: 0;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

#modal .modal-wrap {
  position: relative;
  z-index: 11;
  display: flex;
  flex-direction: column;
  margin: calc(20px + 0.6vw) 0;
  padding: calc(12px + 0.6vw);
  width: fit-content;
  max-width: 90%;
  height: fit-content;
  background-color: var(--mono16);
  border-radius: 24px;
  box-shadow: 2.2px 2.8px 18px 0.8px rgba(0, 0, 0, 0.4);
  text-align: left;
}

#modal .background-button {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(80, 80, 80, 0.9);
}

#modal .modal-wrap .modal-contents {
  display: none;
  padding: calc(40px + 2vw) calc(50px + 3vw) calc(60px + 3vw) calc(50px + 3vw);
  box-sizing: border-box;
}

button.close-x {
  z-index: 500;
  align-self: flex-end;
  position: fixed;
}

@media all and (max-width:1024px) {
  #modal .modal-wrap {
    padding: calc(12px + 0.6vw);
    width: 80%;
  }

  #modal .modal-wrap .modal-contents {
    padding-left: calc(20px + 2vw);
    padding-right: calc(20px + 2vw);
  }
}

@media all and (max-width:768px) {
  #modal .modal-wrap {
    padding: calc(12px + 0.6vw);
    width: 90%;
  }

  #modal .modal-wrap .modal-contents {
    padding-left: 0;
    padding-right: 0;
  }
}

@media all and (max-width:540px) {
  #modal .modal-wrap {
    margin-bottom: 90px;
  }
}