.details {
  position: relative;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 60%);
  z-index: 10000;
}

details:not([open]) .modal-overlay {
  display: none;
}

.modal-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  max-width: 500px;
  max-height: 90%;
  pointer-events: none;
  background-color: #fefefe;
  border-radius: 5px;
  transform: translate(-50%, -50%);
  z-index: 10001;
  overflow: hidden;
}

@media screen and (max-width: 840px) {
  .modal-wrapper {
    overflow-y: scroll;
  }
}

.modal-header {
  display: flex;
  padding-right: 10px;
}

.modal-header .space {
  flex: 1;
  pointer-events: all;
}

.modal-header .close {
  font-size: 24px;
  color: black;
  text-decoration: none;
  pointer-events: none;
  cursor: pointer;
}

.modal-content {
  padding: 0 20px 20px;
  pointer-events: all;
}

.modal-content h2 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.2em;
  letter-spacing: -0.02em;
  text-align: center;
}

summary {
  list-style: none;
  cursor: pointer;
}

summary::marker {
  display: none;
}
