
.modal_wrapper {
  z-index: 999;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
}

.modal_wrapper:not(:target) {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s, visibility .5s;
}

.modal_wrapper:target {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s, visibility .5s;
}

.modal_wrapper::after {
  display: inline-block;
  height: 100%;
  margin-left: -.05em;
  vertical-align: middle;
  content: ""
}

.modal_wrapper .modal_content {
  display: inline-block;
  z-index: 20;
  position: relative;
}

.modal_overlay {
  z-index: 10;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, .7)
}
  

  .modal_content {
    align-self: center;
    max-width: 780px;
    width: 90%;
    box-sizing: border-box;
    background-color: #fff;
    line-height: 1.4em;
    transition: 0.5s;
    border-radius: 5px;
    padding: 40px 15px 120px;
    height: 85vh;
    height: 85dvh;
  }

  @media(width >= 768px) {
    .modal_content {
      padding: 40px 25px 150px;
    }
  }

  @media(width >= 1024px) {
    .modal_content {
      padding: 60px 35px 150px;
      height: 90vh;
      height: 90dvh;  
    }
  }

  .pt03.modal_content {
    height: 75vh;
    height: 75dvh;
  }

  @media(width >= 768px) {
  .pt03.modal_content {
    height: 50vh;
    height: 50dvh;
  }
}

@media(width >= 1024px) {
  .pt03.modal_content {
    height: 500px;
  }
}
  
  .pt03.modal_content .modal_inner {
    overflow-y: auto;
  }

  .modal_inner {
    height: 100%;
    overflow-y: scroll;
    padding-right: 5px;

    /* モーダル内でスクロールした時
    外側がスクロールするのを防ぐ */
    overscroll-behavior-y: contain;
  }

  
  @media (width <= 768px) {
    .modal_content {
      width: 85%;
    }
  }

  @media(width >= 768px) {
    .modal_inner {
      padding-right: 15px;
    }
  }
 

  .close_button {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 2rem;
    cursor: pointer;
    color: #dc5f5b;
    text-decoration: none;
  }

  @media(width >= 1024px) {
  .close_button {
    top: 20px;
    right: 20px;
    font-size: 3.2rem;
  }
}
  
.close_button:hover {
  color: #dc5f5b !important;
}


  .modal_inner::-webkit-scrollbar {
    width: 6px;
  }
  @media(width >= 768px) {
  .modal_inner::-webkit-scrollbar {
    width: 16px;
  }
}
  .modal_inner::-webkit-scrollbar-thumb {
    background-color: #dc5f5b;
    border-radius: 10px;
  }
  .modal_inner::-webkit-scrollbar-track {
    background-color: #f3f3f3;
    margin-top: 5px;
    margin-bottom: 5px;
  }


 
