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

    /* common style start */
    :root {
        --main-width: 100%;
    }
    .main-form__div--OnOff{
        width: 100%;
    }
    input, textarea, select{
        font-size: 4.5vw;
    }
    /* common style end */

    /* header start */
    header{
        padding: 2%;
    }
    .header-logo{
        width: 25%;
    }
    .header-form_scroll{
        width: 40%;
        display: flex;
    }
    /* header end */

    /* main-top start */
    .main-top{
        position: relative;
    }
    .main-top .main-btn{
        position: absolute;
        bottom: 5%;
        margin: auto;
    }
    .main-top .main-btn img:hover{
        opacity: 1;
    }
    /* main-top end */

    /* form start */
    .main-form{
        padding: 1%;
    }
    .main-form__a--line>img{
        width: 75%;
    }
    .main-form__form{
        padding: 10px 5px 10px;
        border-radius: 15px;
        position: relative;
    }
    .main-form__img--ribbon{
        width: 25%;
    }
    .main-form__legend--center{
        text-align: left;
        width: 100%;
    }
    .main-form__legend{
        width: 100%;
    }
    .main-form__legend--center>span:nth-of-type(1){
        font-size: 6vw;
        line-height: 8vw;
    }
    .main-form__legend--center>span:nth-of-type(2){
        font-size: 4vw;
        display: block;
        text-align: center;
        margin-top: 15%;
    }
    .main-form__item{
        margin: 15px auto;
    }
    .main-form__item--name:has(.err)::before{
        content: "※使用できない文字が含まれています。\A漢字・ひらがな・カタカナで入力してください。";
        white-space: pre;
    }
    .main-form__item--name:has(.empty)::before{
        content: "お名前を入力してください！";
    }
    .main-form__item--name::before{
        right: initial;
        left: 0;
        bottom: 0;
        font-size: 3vw;
    }
    .main-form__item:has(.err) input[name=user_first_name]{
        margin-bottom: 9vw;
    }
    .main-form__item--tel:has(.err)::before{
        content: "※半角数字10桁もしくは11桁で電話番号を入力してください。\A　ハイフンは不要です。";
        white-space: pre;
    }
    .main-form__item--tel::before{
        right: initial;
        left: 0;
        bottom: 0;
        font-size: 3vw;
    }
    input[name=user_tel].err{
        margin-bottom: 9vw;
    }
    .main-form__item--postal:has(.err)::before{
        content: "※半角数字7桁で郵便番号を入力してください。\A　ハイフンは不要です。";
        white-space: pre;
    }
    .main-form__item--postal::before{
        right: initial;
        left: 0;
        bottom: 0;
        font-size: 3vw;
    }
    input[name=user_postal].err{
        margin-bottom: 9vw;
    }
    .main-form__item--email:has(.err)::before{
        content: "正しいメールアドレスを入力してください！\A記号、スペースなど使用できない文字が含まれています。";
        white-space: pre;
    }
    .main-form__item--email::before{
        right: initial;
        left: 0;
        bottom: 0;
        font-size: 3vw;
    }
    input[name=user_email].err{
        margin-bottom: 9vw;
    }
    .main-form__item--service:has(.err)::before{
        content: "※ご希望のサービスを1つ以上選択してください。";
        white-space: pre;
        transform: translateY(100%);
    }
    .main-form__item--service::before{
        right: initial;
        left: 0;
        bottom: 0;
        font-size: 3vw;
    }
    .main-form__item--service:has(.err){
        margin-bottom: 9vw;
    }
    .main-form__item--agree:has(.err)::before{
        white-space: pre;
        left: 50%;
        transform: translate(-50%,100%);
    }
    .main-form__item--agree::before{
        right: initial;
        left: 0;
        bottom: 0;
        font-size: 3vw;
    }
    .main-form__item--agree:has(.err){
        margin-bottom: 9vw;
    }
    .main-form__item--wrap{
        padding: 5px 10px 25px;
        font-size: 4.5vw;
    }
    .main-form__item--agree{
        font-size: 3.5vw;
    }
    input[name=user_last_name],
    input[name=user_first_name],
    input[name=user_postal]{
        width: 100%;
    }
    input[name=user_first_name]{
        margin-left: 0%;
        margin-top: 15px;
    }
    .main-form__item--ServiceConsultation{
        display: initial;
    }
        .main-form__item--ServiceConsultation>div{
            margin: 15px auto;
        }
    .main-form__item--service{
        padding: 0px;
    }
    .main-form__item--consultation{
        padding: 0px;
        display: block;
    }
    .main-form__item--service label,
    .main-form__item--consultation label{
        padding: 3%;
        height: 50px;
    }
    .main-form__item--consultation label:first-of-type~label{
        margin-top: 10px;
    }
    .main-form__item--service label>span{
        margin: 0px 0px 0px 10%;
    }
    .main-form__item--service label::before,
    .main-form__item--agree label::before{
        width: 25px;
        height: 25px;
    }
    .main-form__item--service label>span::before{
        width: 25px;
        height: 25px;
    }
    .main-form__item--consultation label{
        width: 100%;
    }
    .main-form__item--consultation label::before{
        width: 28px;
        height: 28px;
    }
    .main-form__item--consultation label>span{
        flex-wrap: nowrap;
        margin: 0px 0px 0px 5%;
        width: initial;
    }
    .main-form__item--consultation label>span::before{
        width: 42px;
        height: 30px;
    }
    .main-form__item--cashBack>img{
        width: 100%;
    }

    form div.form__submit{
        width: fit-content;
        margin-top: 15px;
    }
    form div.form__submit>img{
        max-width: 100%;
    }
    /* form end */

    /* main-agency start */
    .main-agency__div{
        font-size: 6vw;
    }
    .main-agency__div>span:nth-of-type(1){
        font-size: 6vw;
    }
    .main-agency__div>span:nth-of-type(2){
        font-size: 4.5vw;
    }
    .main-agency{
        padding: 1% 2%;
    }
    .main-agency>figure{
        padding: 2%;
        display: block;
        text-align: center;
        box-shadow: 2px 2px 4px 3px #BEBEAB;
    }
    .main-agency>figure:nth-child(odd),
    .main-agency>figure:nth-child(even){
        margin: 15px auto 0px;
    }
    .main-agency>figure>figcaption{
        text-align: left;
    }
    .main-agency>figure>figcaption>dl>dt{
        font-size: 6vw;
        justify-content: center;
    }
    .main-agency>figure>figcaption>dl>dt::before{
        width: 50px;
        height: 50px;
    }
    .main-agency>figure>figcaption>dl>dd{
        font-size: 4.5vw;
        line-height: 1.5;
    }
    .main-agency>figure>img{
        width: 100%;
        height: auto;
    }
    .main-agency>figure:nth-of-type(1)>img{
        width: 80%;
    }
    .main-agency>figure:nth-of-type(2)>img,
    .main-agency>figure:nth-of-type(3)>img{
        width: 50%;
    }
    /* main-agency end */

    /* flow start */
    .main-flow{
        padding: 0 2%;
    }
    .main-flow__div{
        font-size: 7.5vw;
        border-width: 5px;
        padding: 0 10px;
    }
    .main-flow>ul{
        display: initial;
    }
    .main-flow>ul>li{
        width: 100%;
        margin: 25px auto;
        padding: 30px 5px 20px;
        font-size: 4.1vw;
    }
    .main-flow>ul>li>p{
        margin-bottom: 10px;
    }
    .main-flow>ul>li>figure{
        margin: 0px;
        display: initial;
    }
    .main-flow>ul>li img{
        width: 65%;
    }
    .main-flow>ul>li a>img:hover{
        opacity: 1;
    }
    .main-flow>ul>li:nth-of-type(1)~* img{
        width: 50%;
        margin-top: 10px;
    }
    .main-flow>ul>li::before{
        font-size:inherit;
    }
    /* flow end */

    /* qa start */
    .main-qa{
        margin-top: 15px;
        padding-top: 15px;
    }
    .main-qa__div{
        font-size: 7.5vw;
        padding: 0 10px;
        border-width: 5px;
        margin-bottom: 15px;
    }
    .main-qa__dl{
        width: 95%;
    }
    .main-qa__dl>dt,
    .main-qa__dl>dd{
        font-size: 4.5vw;
    }
    .main-qa__dl>dt::before,
    .main-qa__dl>dd::before{
        width: 35px;
        height: 35px;
    }
    .main-qa__dl>dt>span,
    .main-qa__dl>dd>span{
        width: calc(100% - 45px);
    }
    /* qa end */

    /* footer start */
    .footer {
        width: 100%;
        padding: 15px 0px 0px;
    }
    .footer-logo>img{
        width: 50%;
    }
    .footer-links>a{
        font-size: 3.5vw;
    }
    .footer-copyright{
        font-size: 4vw;
    }
    /* footer end */
}