#mail_form {
  position: absolute;
  z-index: 4;
  top: 220px;
  width: 712px;
  height: fit-content;
  margin: 0 106px;
  padding: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image: url(../img/form_bg.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

#mail_form > p {
  font-size: 30px;
}

#affiliation {
  margin: 5% 0 7%;
}

#affiliation > img {
  width: 17%;
  margin: 0 10px;
  height: fit-content;
}

.item {
  margin-bottom: 20px;
}

.item p, .item label {
  font-size: min(20px, 5vw);
  text-align: center;
}

#prefecture {
  margin-bottom: 8px;
}

.date {
  width: 240px;
  justify-content: space-around;
}

.invalid {
  border: 2.5px solid rgb(245, 0, 0, 0.6);
}

.reset {
  width: 150px;
  margin: 50px 0;
  padding-top: 2px;
  font-size: 24px;
  color: white;
  background-color: #857b7b;
  border-radius: 8%;
}

.char-count {
  color: cadetblue;
  font-size: small;
  text-align: end;
  padding-right: 3.5px;
}

@media screen and (max-width:1023px) {
  #mail_form {
    width: 630px;
    margin: 0 19px;
  }
}
@media screen and (max-width:767px) {
  #mail_form {
    width: 80%;
    padding: 5%;
    margin: 0 5%;
  }
  #affiliation > img {
    width: min(108px,24%);
    margin: 0 2%;
  }
  #mail_form > p {
    font-size: min(30px, 4.5vw);
  }
}
@media screen and (max-width:540px) {
  #mail_form > p {
    font-size: min(30px, 5vw);
  }
}
