@media print,
all and (min-width: 641px) {

  /* body.contact #title {
    background-image: url(../images/contact/title-bg.jpg);
  } */


  .contact-link {
    display: flex;
    justify-content: center;
    gap: 0 30px;
    margin-bottom: 50px;

    >li {
      >a {
        display: inline-block;
        font-weight: bold;
        border: 1px solid #469936;
        text-decoration: none !important;
        line-height: 1.45;
        width: 300px;
        padding: 12px 15px 12px 35px;
        box-sizing: border-box;
        text-align: center;
        position: relative;

        &:before {
          content: "";
          width: 10px;
          height: 16px;
          background-color: #469936;
          clip-path: polygon(0 0, 100% 50%, 0 100%);
          position: absolute;
          top: 50%;
          left: 16px;
          translate: 0 -50%;
          transition: opacity 0.3s ease-in-out;
          opacity: 0;
        }

        &:hover {
          background-color: #f2f7e2;

          &:before {
            opacity: 1;
          }
        }
      }

      &.on {
        >a {
          background-color: #f2f7e2;

          &:before {
            opacity: 1;
          }
        }
      }
    }
  }


  .contact-s_title {
    color: #215231;
    font-size: 125%;
    /* 20px */
    font-weight: bold;
    padding-bottom: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #215231;
  }

  .contact-tel {
    .label {
      display: inline-block;
      position: relative;
      padding-left: 85px;
      font-size: 150%;
      line-height: 1.45;
      color: #225332;
      font-weight: bold;

      &:after {
        content: "TEL";
        display: inline-block;
        color: #ffffff;
        background-color: #225332;
        line-height: 1.2;
        font-size: 75%;
        font-weight: bold;
        padding: 6px 15px;
        position: absolute;
        top: 0;
        left: 0;
      }
    }
  }

  .excontact-box {
    display: inline-flex;
    flex-wrap: wrap;
    max-width: 800px;
    padding: 28px 45px 22px 45px;
    margin-inline: auto;
    box-sizing: border-box;
    gap: 0 40px;
    background-color: #ffeec6;

    .one-block {
      display: flex;
      gap: 0 15px;
    }

    .label {
      display: inline-block;
      color: #ffffff;
      line-height: 1.2;
      font-size: 112.5%;
      font-weight: bold;
      padding: 4px 15px;
      background-color: #225332;
      align-self: flex-start;
    }

    .time {
      order: 2;

      img {
        margin-top: 4px;
      }
    }

    .fax {
      width: 100%;
      order: 3;
    }

    img {
      align-self: center;
    }
  }
}

@media only screen and (max-width: 640px) {

  /* body.contact #title {
    background-image: url(../images/contact/title-bg.jpg);
  } */


  .contact-link {
    margin-bottom: 45px;

    >li {
      &:not(:last-child) {
        margin-bottom: 15px;
      }

      >a {
        display: block;
        font-weight: bold;
        border: 1px solid #469936;
        text-decoration: none !important;
        line-height: 1.45;
        width: 300px;
        padding: 12px 15px 12px 35px;
        text-align: center;
        margin-inline: auto;
        box-sizing: border-box;
        position: relative;

        &:before {
          content: "";
          width: 10px;
          height: 16px;
          background-color: #469936;
          clip-path: polygon(0 0, 100% 50%, 0 100%);
          position: absolute;
          top: 50%;
          left: 16px;
          translate: 0 -50%;
          transition: opacity 0.3s ease-in-out;
          opacity: 0;
        }
      }

      &.on {
        >a {
          background-color: #f2f7e2;

          &:before {
            opacity: 1;
          }
        }
      }
    }
  }

  .contact-s_title {
    color: #215231;
    font-size: 125%;
    /* 20px */
    font-weight: bold;
    padding-bottom: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #215231;
  }

  .contact-tel {
    .label {
      display: inline-block;
      position: relative;
      padding-left: 80px;
      font-size: 125%;
      line-height: 1.6;
      color: #225332;
      font-weight: bold;

      &:after {
        content: "TEL";
        display: inline-block;
        color: #ffffff;
        background-color: #225332;
        line-height: 1.2;
        font-size: 80%;
        font-weight: bold;
        padding: 6px 15px;
        position: absolute;
        top: 0;
        left: 0;
      }
    }
  }


  .excontact-box {
    max-width: 350px;
    padding: 28px 15px 22px 15px;
    margin-inline: auto;
    gap: 0 50px;
    box-sizing: border-box;
    background-color: #ffeec6;

    .one-block {
      display: flex;
      gap: 0 15px;

      &:not(:last-of-type) {
        margin-bottom: 15px;
      }

      &:first-of-type {
        margin-bottom: 10px;
      }
    }

    .label {
      display: inline-block;
      color: #ffffff;
      line-height: 1.2;
      font-size: 87.5%;
      font-weight: bold;
      width: 50px;
      padding: 4px 5px;
      box-sizing: border-box;
      background-color: #225332;
      align-self: flex-start;
      text-align: center;


    }

    .time {
      img {
        margin-top: 4px;
      }
    }

    img {
      align-self: center;
    }
  }
}

/* ↓ form styles */

.contactform-box form {
  margin-bottom: 40px;
}

.contactform-box .form-navi {
  display: flex;
  justify-content: center;
  gap: 0 25px;
}

.contactform-box .form-navi .input-submit {
  display: inline-block;
  font-size: 125%;
  /* 20px */
  font-weight: bold;
  line-height: 1.5;
  text-decoration: none !important;
  color: #ffffff;
  background-color: #215231;
  border: none;
  padding: 15px 50px 15px 50px;
  position: relative;
  transition: 0.3s;
  cursor: pointer;
}

.contactform-box .form-navi .input-submit:hover {
  opacity: 0.6;
}

#content table.formtable th {
  font-weight: bold;
  padding: 15px 25px;
}

#content table.formtable td {
  padding-block: 15px;
}

#content table.formtable .input-text,
#content table.formtable .input-tel,
#content table.formtable .input-email,
#content table.formtable textarea,
#content table.formtable select {
  width: 100%;
  padding: 5px 10px;
  box-sizing: border-box;
}

#content table.formtable .input-text[name=grade] {
  width: auto;
}

#content table.formtable .input-text:focus,
#content table.formtable textarea:focus,
#content table.formtable .input-text[disabled] {
  background-color: #f8f7f7;
}

#content table.formtable .input-text.name1,
#content table.formtable .input-text.name2,
#content table.formtable .input-text.kana1,
#content table.formtable .input-text.kana2,
#content table.formtable .input-text.ins01,
#content table.formtable .input-text.ins02,
#content table.formtable .input-text.cal,
#content table.formtable .input-text.word,
#content table.formtable .input-text.roomnum,
#content table.formtable .input-text.old,
#content table.formtable .input-text.zipcode1,
#content table.formtable .input-text.zipcode2,
#content table.formtable .input-text.nowjob2 {
  width: auto;
}

#content table.formtable .input-text[readonly] {
  background-color: #ededed;
}

#content table.formtable .message:after {
  display: none;
}

#content table.formtable:not(.confirm) th:before {
  content: "任意";
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
  padding: 1px 6px;
  color: #999999;
  font-size: 80%;
  font-weight: bold;
  letter-spacing: 1pt;
  line-height: 1.5;
  text-align: center;
  background-color: #ffffff;
}

#content table.formtable:not(.confirm) th.rqs:before {
  content: "必須";
  color: #FF1D25;
}

.error-top {
  padding: 10px 15px;
  border: 1px solid #E60012;
}

.error {
  color: #E60012;
}

textarea {
  vertical-align: middle;
}

#contact-link {
  display: none;
}

.input_p {
  position: relative;
}

.input_p .cal-icon {
  display: inline-block;
  width: 30px;
  aspect-ratio: 19/20;
  margin-bottom: 0;
  vertical-align: middle;
  margin: 0 0 0 15px;
}

.input_p .cal-icon>a {
  display: block;
  width: 100%;
  height: 100%;
  background: url(../images/common/icon_calendar.svg) no-repeat center/contain;
  transition: 0.3s ease-in-out;
}

.input_p .cal-icon>a:hover {
  opacity: 0.6;
}

#contact-index #content input.input {
  border: 1.5px solid #8e8e8e;
}

form .observation-formbox {
  transition: opacity 0.3s ease-in-out;
}

form {
  &:not(.check-observation) {
    .observation-formbox {
      opacity: 0.3;

      .cal-icon {
        opacity: 0;
      }

      .formErrorContent {
        display: none;
      }
    }
  }
}

#content form tbody td {
  text-align: left;
}



@media print,
all and (min-width: 751px) {
  .formError.inline {
    margin: 0 10px 10px;
  }

  .formError.inline .formErrorContent {
    min-width: 80px;
  }

  #content table.formtable {
    margin-bottom: 60px;
  }

  #content table.formtable th {
    min-width: 100px;
    width: 300px;
    text-align: left;
  }

  #content table.formtable select {
    width: auto;
  }

  .message-area .fax {
    margin-left: 36px;
  }

  .message-area table.contact {
    border-top: 1px solid #939393;
  }

  .message-area table.contact th {
    color: #ff8700;
    background-color: #fff6e9;
    border-bottom: 1px solid #939393;
    font-weight: bold;
    padding: 10px 20px;
  }

  .message-area table.contact td {
    border-bottom: 1px solid #939393;
    padding: 10px 30px;
  }
}

@media only screen and (max-width: 750px) {
  #footer .container-inner {
    padding-bottom: 40px;
  }

  .formError.inline {
    margin: 10px;
  }

  .contactform-box .form-navi .input-submit {
    margin-right: 5px;
    padding: 10px 20px 10px 30px;
    font-size: 112.5%;
    /* 18px */
    background-size: 20px 2px;
  }

  .contactform-box .form-navi .input-submit:last-child {
    margin-right: 0;
  }

  #content table.formtable {
    margin-bottom: 35px;
  }

  #content table.formtable .input-text,
  #content table.formtable textarea,
  #content table.formtable select {
    border: 1px solid #dddce0;
  }

  #content table.formtable select {
    width: auto;
  }

  #content table.formtable .input-text.name1,
  #content table.formtable .input-text.name2,
  #content table.formtable .input-text.kana1,
  #content table.formtable .input-text.kana2,
  #content table.formtable .input-text.ins01,
  #content table.formtable .input-text.ins02,
  #content table.formtable .input-text.cal,
  #content table.formtable .input-text.word,
  #content table.formtable .input-text.roomnum,
  #content table.formtable .input-text.old,
  #content table.formtable .input-text.zipcode1,
  #content table.formtable .input-text.zipcode2,
  #content table.formtable select {
    /*width: 75%;*/
    max-width: 75%;
    margin-bottom: 10px;
  }

  #content table.formtable .input-text.zipcode1,
  #content table.formtable .input-text.zipcode2 {
    width: auto;
  }

  #content table.formtable .input-text.age {
    width: auto;
  }

  #content table.formtable:not(.confirm) th {
    padding-left: 60px;
    position: relative;
  }

  #content table.formtable:not(.confirm) th:before {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    margin-bottom: -50%;
  }

  #content table.formtable.sp-tblock {
    border: none;
  }

  #content table.formtable.sp-tblock tr th {
    display: block;
    padding: 5px 15px;
    border: none;
  }

  #content table.formtable.sp-tblock tr td {
    display: block;
    padding: 20px 15px;
    border: none;
  }

  #content table.formtable.sp-tblock tr:last-child th,
  #content table.formtable.sp-tblock tr:last-child td {
    border-bottom: none;
  }

  #content table.formtable.sp-tblock:not(.confirm) th {
    padding-left: 60px;
  }

  .message-area table.contact {
    border-top: 1px solid #939393;
    line-height: 1.65;
  }

  .message-area table.contact th {
    width: 125px;
    box-sizing: border-box;
    color: #ff8700;
    background-color: #fff6e9;
    border-bottom: 1px solid #939393;
    font-weight: bold;
    padding: 10px 12px;
  }

  .message-area table.contact td {
    border-bottom: 1px solid #939393;
    padding: 10px 15px;
  }
}