:root{
  --color-black: #222A26;
  --color-blue: #017486;
  --color-navy: #024B57;
}
html{
  scroll-behavior: smooth;
  font-size: 2.6667vw; /* 375px design: 1rem = 10px at 375px width */
}
body{
  color: var(--color-black);
  font-size: 1.4rem;
}
strong{
  font-weight: inherit;
  color: var(--color-blue);
}
@media screen and (min-width: 768px){
  html{
    font-size: min(.83vw, 10px); /* 1rem = 10px at 1200px width */
  }
  body{
    font-size: 1.6rem;
  }
  .sp{
    display: none;
  }
}
@media screen and (max-width: 767px){
  .pc{
    display: none;
  }
}


.edf-header{
  border-bottom: .05rem solid;
  padding: 3.6rem 0 .5rem;
  &-inner{
    position: relative;
  }
  h1{
    margin: 0;
    font-size: 2.7rem;
    font-weight: 500;
    letter-spacing: .3em;
    text-align: center;
  }
  a{
    position: absolute;
    top: 1.4rem;
    left: 1rem;
    width: 2.2rem;
    aspect-ratio: 1/1;
    background: url(../images/form-close.svg) 50%/contain no-repeat;
    span{
      display: none;
    }
  }
}
@media (min-width: 768px){
  .edf-header{
    padding: 2.3rem 0 1.2rem;
    &-inner{
      width: 120rem;
    }
    h1{
      font-size: 3.8rem;
    }
    a{
      left: auto;
      right: 1.5rem;
    }
  }
}

.edf-wrap{
  overflow: hidden;
}
.edf-inner{
  width: 35.1rem;
  margin: 4.5rem auto;
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  > h3{
    margin-bottom: 2.2rem;
    padding-bottom: .7rem;
    background: linear-gradient(90deg, white, #017486, white) 50% 100%/32.8rem .1rem no-repeat;
    color: var(--color-navy);
    font-size: 1.8rem;
    line-height: 1.34;
    text-align: center;
    white-space: pre-line;
  }
  > p{
    white-space: pre-line;
  }
  > ul{
    list-style: none;
    margin: 1.9rem 0;
    padding: 0;
    li{
      margin-top: 1.2rem;
      padding-left: 2.7rem;
      background: url(../images/form-list.webp) 0 50%/1.3rem no-repeat;
      color: var(--color-navy);
      font-size: 1.8rem;
      font-weight: 500;
      line-height: 1.3;
    }
  }
}
.edf-totop{
  display: block;
  margin-top: 8rem;
  border: 1px solid;
  padding: 1.8rem;
  background: url(../images/arrow.svg) right 2rem top 50%/.6rem no-repeat;
  color: var(--color-navy);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-align: center;
  text-decoration: none;
  &:hover{
    color: var(--color-blue);
  }
}
.edf-cnt2{
  font-size: 1.6rem;
  letter-spacing: .05em;
  span{
    font-weight: 700;
    letter-spacing: .15em;
  }
}
.edf-first{
  display: block;
  width: 34rem;
  height: 7rem;
  margin: 1rem auto;
  background: url(../images/form-first-sp.webp) 50%/contain no-repeat;
  filter: drop-shadow(.2rem .2rem .3rem rgb(0 0 0/25%));
  &:hover{
    opacity: .8;
  }
}
h3.edf-secondttl{
  margin: 3rem auto 4rem;
  width: 33.5rem;
  border-block: 1px solid;
  padding: .9rem 0;
  background: none;
  color: var(--color-navy);
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
}
@media (min-width: 768px){
  .edf-inner{
    width: 90rem;
    margin-top: 10rem;
    >h3{
      padding-bottom: .9rem;
      background-size: 53.4rem .1rem;
      font-size: 3.6rem;
      letter-spacing: .1em;
    }
    > ul{
      margin: 4rem 0 2rem;
      li{
        margin-top: 1.8rem;
        font-size: 2.2rem;
        padding-left: 3rem;
        background-size: 1.5rem;
      }
    }
  }
  .edf-cnt1{
    margin-top: 8rem;
  }
  .edf-cnt2{
    font-size: 2rem;
    span{
      font-size: 2.5rem;
    }
  }
  .edf-totop{
    width: 50rem;
    margin: 15rem auto 0;
    font-size: 2.5rem;
  }
  h3.edf-medicinettl{
    font-size: 2.7rem;
    line-height: 1.6;
  }
  .edf-first{
    width: 50rem;
    height: 8rem;
    margin-top: 4rem;
    background-image: url(../images/form-first.webp);
  }
  h3.edf-secondttl{
    margin: 8rem auto 4rem;
    width: 80rem;
    padding: .1rem 0 .7rem;
    font-size: 3.6rem;
    letter-spacing: .1em;
  }
}

.mw_wp_form_input .only-confirm{
  display: none;
}
.mw_wp_form_confirm .only-input{
  display: none;
}

[type="text"],
[type="tel"],
[type="email"],
[type="number"],
[type="url"],
[type="date"],
select,
textarea{
  width: 100%;
  border: 1px solid #aaaaaa;
  border-radius: .3rem;
  padding: 1.2rem 1.5rem;
  background: white;
  font-size: 1.6rem;
  line-height: 1.5;
  &::placeholder{
    color: #DCDCDC;
  }
}
.mwform-radio-field,
.mwform-checkbox-field{
  label{
    display: block;
    border: 1px solid #aaaaaa;
    border-radius: .5rem;
    padding: .8rem;
    &:has(:checked){
      border-color: #000;
      color: #000;
    }
  }
  input{
    display: none;
  }  
}
.mwform-radio-field-text,
.mwform-checkbox-field-text{
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: 1.5rem;
  line-height: 1.3;
  [name="q14"] + &{
    font-size: 1.4rem;
  }
  &::before{
    content: '';
    flex: auto 0 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid #707070;
  }
  :checked + &::before{
    border: none;
    background: url(../images/form-check.svg) 50%/contain no-repeat;
  }
}
@media (min-width: 768px){
  .mwform-radio-field,
  .mwform-checkbox-field{
    label{
      padding: .2rem .8rem;
    }
  }
  .mwform-radio-field-text,
  .mwform-checkbox-field-text{
    font-size: 2rem;
    [name="q14"] + &{
      font-size: 2rem;
    }
  }
}

.require{
  flex: auto 0 0;
  margin-left: .4rem;
  border-radius: 2rem;
  padding: .1rem .5rem;
  background: #D90D0D;
  color: white;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .05em;
}

.edf-ttl{
  display: flex;
  align-items: flex-start;
  margin-top: 3rem;
  &:has(+ .edf-txt1, + .edf-txt2){
    margin-bottom: 0;
  }
  .q{
    flex: 3.6rem 0 0;
    margin-right: 1rem;
    line-height: 3.6rem;
    background: var(--color-blue);
    color: white;
    font-size: 1.6rem;
    font-weight: 500;
    text-align: center;
  }
  .t{
    flex: auto 1 1;
    margin-top: .5rem;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.4;
    span{
      font-size: 1.2rem;
    }
  }
  .require{
    margin-top: .8rem;
  }
}
.edf-txt1{
  margin: 0 0 .5rem .5rem;
  font-size: 1.4rem;
}
.edf-txt2{
  margin: 0 0 .5rem 4.6rem;
  font-size: 1.4rem;
}
.edf-field{
  font-size: 1.5rem;
}
@media (min-width: 768px){
  .require{
    margin-left: 1rem;
  }

  .edf-ttl{
    .q{
      flex-basis: 4.5rem;
      margin-right: 1.6rem;
      line-height: 4.5rem;
      font-size: 2.2rem;
      font-weight: 600;
    }
    .t{
      flex-grow: 0;
      font-size: 2.4rem;
      span{
        font-size: 1.4rem;
      }
    }
    .require{
      margin-top: 1.4rem;
    }
  }
  .edf-txt1{
    margin: .5rem 0 .5rem .6rem;
    font-size: 1.8rem;
    letter-spacing: .05em;
  }
  .edf-txt2{
    margin: 0 0 2rem 6rem;
    font-size: 1.6rem;
  }
  .edf-field{
    font-size: 2rem;
  }
}


.edf-toggle-target{
  /* jsで切り替え */
  margin-top: 1rem;
  border: 1px solid #000;
  border-radius: .5rem;
  padding: 1.2rem 1.5rem;
  .mw_wp_form_confirm &{
    display: block !important;
    border: none;
    padding: 0 1.5rem;
  }
  p{
    margin: 0 .4rem .9rem;
    font-size: 1.2rem;
    letter-spacing: .05em;
  }
  input[type="text"],
  textarea{
    border-radius: .5rem;
    border: none;
    background: #F6F6F6;
  }
}
@media (min-width: 768px){
  .edf-toggle-target{
    p{
      margin: 0 .4rem .7rem;
      font-size: 1.8rem;
    }
  }
}

.edf-other{
  position: relative;
  .error{
    position: absolute;
    bottom: -2rem;
  }
  .mwform-radio-field:has(+ input),
  .mwform-checkbox-field:has(+ input){
    label{
      padding-bottom: 8.2rem;
    }
  }
  textarea{
    position: absolute;
    z-index: 1;
    bottom: 1.2rem;
    left: 1.2rem;
    width: calc(100% - 3rem);
    border-radius: .5rem;
    border: none;
    padding: 1rem;
    background: #F6F6F6;
    line-height: 1.3;
    resize: none;
  }
}

.edf-kikkake{
  label:has([value="知人の紹介"]){
    anchor-name: --q-chijin;
  }
}
.edf-hasso{
  label:has([value="その他"]){
    anchor-name: --q-hasso;
  }
}
.edf-kikkake-chijin{
  position-anchor: --q-chijin;
  top: anchor(--q-chijin top);
  bottom: anchor(--q-chijin bottom);
  left: calc(anchor(--q-chijin left) + 15rem);
  input{
    width: 15rem;
  }
}
.edf-hasso-ta{
  position-anchor: --q-hasso;
  top: anchor(--q-hasso top);
  bottom: anchor(--q-hasso bottom);
  left: calc(anchor(--q-hasso left) + 12rem);
  input{
    width: 20rem;
  }
}
.edf-kikkake-chijin,
.edf-hasso-ta{
  display: block;
  position: absolute;
  z-index: 1;
  width: fit-content;
  height: fit-content;
  margin: auto;
  font-size: 1.5rem;
  input{
    border-radius: .5rem;
    border: none;
    padding: 0 1rem;
    background: #F6F6F6;
    line-height: 3rem;
  }
}
@media (min-width: 768px){
  .edf-kikkake-chijin{
    input{
      width: 23rem;
    }
  }
  .edf-hasso-ta{
    input{
      width: 30rem;
    }
  }
  .edf-kikkake-chijin,
  .edf-hasso-ta{
    font-size: 2rem;
    input{
      line-height: 2.4rem;
    }
  }
}

/* 薬table */
.edf-table{
  table-layout: fixed;
  width: calc(100% + 1.6rem);
  margin-left: -0.8rem;
  border-spacing: 0;
  thead{
    th{
      border-right: 1px solid white;
      padding: .7rem 0;
      background: linear-gradient(#002F34, #007F84);
      color: white;
      font-size: 1.4rem;
      font-weight: 400;
      span{
        font-size: 1rem;
      }
      &:first-child{
        width: 20rem;
        padding-left: 1rem;
        text-align: left;
      }
      &:nth-child(2){
        width: 8.2rem;
      }
    }
  }
  tbody{
    tr:nth-child(even){
      th,
      td{
        background: #F9F9F9;
      }
    }
    th,
    td{
      border-right: 1px solid #E2E2E2;
      border-bottom: 1px solid #E2E2E2;
      padding: 1rem .8rem;
    }
    th{
      border-left: 1px solid #E2E2E2;
      font-size: 1.4rem;
      font-weight: 400;
      line-height: 1.3;
      text-align: left;
    }
    td:nth-child(2){
      font-size: 1rem;
      text-align: right;
      span{
        font-size: 1.8rem;
      }
    }
    td:nth-child(3){
      padding: 1rem .4rem;
      text-align: center;
      button{
        width: 2rem;
        height: 2rem;
        margin: 0;
        border: none;
        padding: 0;
        background: 50%/contain no-repeat;
        overflow: hidden;
        white-space: nowrap;
        text-indent: 2rem;
        &.edf-minus{
          background-image: url(../images/form-minus.svg);
        }
        &.edf-plus{
          background-image: url(../images/form-plus.svg);
        }
      }
      input{
        width: 2.5rem;
        border: none;
        padding: 0;
        background: none;
        font-size: 1.8rem;
        text-align: center;
        &::-webkit-inner-spin-button,
        &::-webkit-outer-spin-button {
          -webkit-appearance: none;
          margin: 0;
        }
        -moz-appearance: textfield;
      }
    }
  }
  tfoot{
    th,
    td{
      border-bottom: 1px solid #E2E2E2;
      padding-top: 1rem;
      vertical-align: bottom;
    }
    th{
      padding-left: 1rem;
      font-size: 1.4rem;
      font-weight: 400;
      text-align: left;
    }
    td{
      font-size: 1.4rem;
      text-align: right;
      white-space: nowrap;
      span{
        margin-right: .5rem;
        font-size: 2rem;
      }
      &:nth-child(3){
        padding-right: 1rem;
      }
    }
  }
}
.edf-postage{
  display: flex;
  justify-content: space-between;
  margin: .5rem 0 2rem;
  border-bottom: 1px solid #E2E2E2;
  padding: 0 1rem;
  dt{
    font-size: 1.4rem;
  }
  dd{
    font-size: 1.3rem;
    text-align: right;
  }
}
.edf-total{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 1rem;
  border-bottom: 1px solid #767B79;
  padding: 0 1rem;
  dt{
    font-size: 1.4rem;
    font-weight: 600;
  }
  dd{
    font-size: 2.2rem;
    font-weight: 600;
    span{
      margin-right: 1rem;
      font-size: 3.2rem;
    }
  }
}
.edf-item-txt1{
  margin-top: .9rem;
  color: var(--color-blue);
  font-size: 1.8rem;
  font-weight: 600;
}
.edf-item-txt2{
  margin-top: 1rem;
  font-size: 1.4rem;
  font-weight: 500;
  white-space: pre-line;
}
.edf-item-txt3{
  margin-top: 1rem;
  font-size: 1.2rem;
  font-weight: 500;
  white-space: pre-line;
}
@media (min-width: 768px){
  .edf-table{
    width: 100%;
    margin-left: 0;
    thead{
      th{
        &:first-child{
          width: 65rem;
        }
        &:nth-child(2){
          width: 12rem;
        }
      }
    }
    tbody{
      th,
      td{
        padding: .8rem;
      }
      td:nth-child(2){
        padding-right: 2rem;
        font-size: 1.5rem;
        span{
          font-size: 2rem;
        }
      }
      td:nth-child(3){
        input{
          width: 3.6rem;
          font-size: 2rem;
        }
      }
    }
    tfoot{
      th{
        padding-left: .8rem;
      }
      td{
        &:nth-child(2){
          padding-right: 2.2rem;
        }
        &:nth-child(3){
          padding-right: 3.5rem;
        }
      }
    }
  }
  .edf-postage{
    margin: .9rem 0 1.7rem;
    padding: 0 1.4rem .9rem .8rem;
    dd{
      font-size: 1.4rem;
    }
  }
  .edf-total{
    align-items: center;
    padding: 0 1.4rem 0 .8rem;
  }
  .edf-item-txt1{
    margin-top: 3rem;
    font-size: 2.1rem;
  }
  .edf-item-txt2{
    font-size: 1.6rem;
  }
  .edf-item-txt3{
    font-size: 1.6rem;
  }
}

.edf-date{
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: 13rem 1fr;
  grid-template-rows: auto auto;
  gap: 0 1.2rem;
  border: 1px solid #aaaaaa;
  border-radius: .5rem;
  padding: .8rem .8rem .8rem 1.4rem;
  background: white;
  + .edf-date{
    margin-top: 1rem;
  }
  [type="text"],
  select{
    appearance: initial;
    border: none;
    border-bottom: 1px solid #707070;
    border-radius: 0;
    padding: .3rem 0 .2rem .5rem;
    background: url(../images/form-drop.svg) right 1rem top 50%/.6rem no-repeat;
    font-size: 1.4rem;
  }
  &::before{
    content: '';
    display: block;
    position: absolute;
    top: .8rem;
    left: .8rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid #707070;
  }

  .mw_wp_form_confirm &{
    border: none;
    &::before{
      display: none;
    }
  }
}
.edf-date-day,
.edf-date-time{
  font-size: 1.5rem;
}
.edf-date-day{
  margin-left: 2.2rem;
  .mw_wp_form_confirm &{
    margin-left: 0;
  }
}
@media (min-width: 768px){
  .edf-date{
    grid-template-columns: 40rem 40rem;
    gap: 0 3rem;
    padding: .2rem 0 1.5rem 3.6rem;
    + .edf-date{
      margin-top: .8rem;
    }
    [type="text"],
    select{
      margin-top: -2rem;
      padding: 0 7rem 0 0;
      font-size: 2.3rem;
      text-align: right;
    }
  }
  .edf-date-day,
  .edf-date-time{
    margin-left: 0;
    font-size: 2rem;
  }
}

.edf-label{
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: .05em;
}
.edf-name{
  display: grid;
  grid-template-columns: 3.8rem 12rem 5.3rem 12rem;
  align-items: center;
  gap: .6rem 0;
  font-size: 1.5rem;
}
.edf-birth{
  display: flex;
  align-items: center;
  gap: .7rem;
  > span{
    position: relative;
    .error{
      position: absolute;
      bottom: -2rem;
      white-space: nowrap;
    }
  }
  [name="birth-y"]{
    width: 12rem;
  }
  [name="birth-m"],
  [name="birth-d"]{
    width: 6rem;
    margin-left: .2rem;
  }
}
.edf-address{
  font-size: 1.5rem;
  [name="zip"]{
    width: 16.4rem;
    margin-left: .8rem;
  }
  input{
    margin-top: .6rem;
  }
}
.edf-heiwei{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.8rem;
  > div > span{
    display: block;
    position: relative;
    .error{
      position: absolute;
      bottom: -2rem;
    }
  }
  input{
    width: 12rem;
    margin-right: .3rem;
  }
}
@media (min-width: 768px){
  .edf-label{
    gap: 0;
    margin: 1.5rem 0 .8rem;
    font-size: 2rem;
  }
  [name="tel"],
  [name="email"]{
    width: 45.5rem;
  }

  .mw_wp_form_confirm .edf-name span{
    font-size: 2rem;
  }
  .mw_wp_form_confirm .edf-address{
    font-size: 2rem;
  }

  .edf-heiwei{
    grid-template-columns: 16rem 16rem;
    gap: 3rem;
  }
}

.edf-consent{
  margin-top: 8rem;
  h3{
    width: 32rem;
    margin: 0 auto;
    border-block: 1px solid #006475;
    padding: .8rem;
    color: var(--color-navy);
    font-size: 2.2rem;
    letter-spacing: .15em;
    text-align: center;
    line-height: 1.3;
  }
  h4{
    margin: 2.9rem 0 1rem;
    color: #000;
    font-size: 1.6rem;
  }
  h3 + h4{
    margin-top: 1.1rem;
  }
  p{
    font-size: 1.4rem;
    line-height: 1.43;
    white-space: pre-line;
  }
}
.edf-consent-btn{
  position: relative;
  display: flex;
  align-items: center;
  margin: 4rem 0;
  label{
    border: none;
    padding: 0;
  }
  .mwform-checkbox-field-text{
    font-size: 1.6rem;
    font-weight: 700;
    white-space: nowrap;
  }
  .require{
    margin-left: -0.2rem;
  }
  .error{
    position: absolute;
    bottom: -2rem;
  }
}
@media (min-width: 768px){
  .edf-consent{
    margin-top: 10rem;
    h3{
      width: 50rem;
      padding: 0 0 .7rem;
      font-size: 3.6rem;
      letter-spacing: .1em;
    }
    h4{
      margin: 5rem 0 1.3rem;
      font-size: 2rem;
    }
    h3 + h4{
      margin-top: 5rem;
    }
    p{
      font-size: 1.6rem;
    }
  }
  .edf-consent-btn{
    margin: 3rem 0 5rem;
    .mwform-checkbox-field-text{
      font-size: 2rem;
    }
    .require{
      margin-left: 0;
    }
    .error{
      position: absolute;
      bottom: -2rem;
    }
  }
}

[type="submit"]{
  display: block;
  width: 35rem;
  margin: 7rem auto 0;
  border: none;
  padding: 2rem;
  background: radial-gradient(closest-side ellipse at center, #017486, #002F34) 50%/41rem 34rem;
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-align: center;
  outline: none;
  cursor: pointer;
  transition: opacity .35s ease-in-out;
  &:hover{
    opacity: .8;
  }
}
[name="submitBack"]{
  margin-top: 4rem;
  background: #777;
}
@media (min-width: 768px){
  [type="submit"]{
    width: 50rem;
    margin-top: 8rem;
    padding: 2.5rem;
    background-size: 60rem 42rem;
    font-size: 2.5rem;
  }
}