@charset "UTF-8";

/* ==========================================================
   CTAフォーム（2問選択 → LINE追加）
   - cta-form.js がフォームのHTMLを自動で追加します
   - SPデザイン基準：375 × 667
   - どの端末でもスクロールせずにLINEボタンが押せるよう、
     カードは画面の高さに収め、ボタンは常にカード下部に固定
   ========================================================== */

.ctaForm {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    height: 100dvh;
    padding: 8px 16px 32px;
    padding: max(8px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    font-family: Hiragino Sans, Hiragino Kaku Gothic ProN, Hiragino Kaku Gothic Std, Yu Gothic, YuGothic, Meiryo, sans-serif;
    letter-spacing: .02em;
    color: #333;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: opacity .25s, visibility .25s;
    transition: opacity .25s, visibility .25s
}

.ctaForm.is-open {
    opacity: 1;
    visibility: visible
}

.ctaForm *,
.ctaForm *::before,
.ctaForm *::after {
    box-sizing: border-box
}

.ctaForm[hidden] {
    display: none !important
}

.ctaForm :where(p, fieldset, legend, label, span, a, button) {
    margin: 0;
    padding: 0
}

.ctaForm__overlay {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(160, 160, 160, .78)
}

/* ---------- カード ---------- */
.ctaForm__card {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    width: 100%;
    max-width: 358px;
    height: 627px;
    max-height: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    -webkit-transform: translateY(16px);
    transform: translateY(16px);
    -webkit-transition: -webkit-transform .25s;
    transition: transform .25s;
    outline: none
}

.ctaForm.is-open .ctaForm__card {
    -webkit-transform: translateY(0);
    transform: translateY(0)
}

.ctaForm__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    background: #e2e2e2;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none
}

.ctaForm__close::before,
.ctaForm__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background: #fff;
    border-radius: 1px
}

.ctaForm__close::before {
    -webkit-transform: translate(-50%, -50%) rotate(45deg);
    transform: translate(-50%, -50%) rotate(45deg)
}

.ctaForm__close::after {
    -webkit-transform: translate(-50%, -50%) rotate(-45deg);
    transform: translate(-50%, -50%) rotate(-45deg)
}

/* 設問エリア：高さが足りない端末ではこの中だけスクロール（ボタンは常に表示） */
.ctaForm__body {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 48px 24px 16px
}

.ctaForm__group {
    margin: 0;
    padding: 0;
    border: none;
    min-width: 0
}

.ctaForm__group + .ctaForm__group {
    margin-top: 25px
}

.ctaForm__group + .ctaForm__group .ctaForm__heading {
    height: 32px;
    line-height: 32px
}

.ctaForm__heading {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 8px;
    height: 31px;
    line-height: 31px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    color: #fff;
    background: #e88073;
    border-radius: 16px;
    white-space: nowrap
}

.ctaForm__note {
    margin: 7px 0 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    color: #b5b5b5
}

.ctaForm__options {
    display: grid;
    gap: 9px;
    margin: 17px 0 0;
    padding: 0;
    list-style: none
}

.ctaForm__note + .ctaForm__options {
    margin-top: 14px
}

.ctaForm__options--2col {
    grid-template-columns: 1fr 1fr;
    -webkit-column-gap: 16px;
    column-gap: 16px;
    row-gap: 8px
}

.ctaForm__option {
    position: relative;
    display: block;
    margin: 0
}

.ctaForm__option input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none
}

.ctaForm__option span {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 39px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    color: #333;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-transition: background-color .15s, border-color .15s, color .15s;
    transition: background-color .15s, border-color .15s, color .15s
}

.ctaForm__options--2col .ctaForm__option span {
    height: 34px
}

.ctaForm__option input:checked + span {
    color: #118461;
    background: #d8f3ea;
    border-color: #39a785
}

.ctaForm__option input:focus-visible + span {
    outline: 2px solid #39a785;
    outline-offset: 2px
}

@media (hover: hover) {
    .ctaForm__option span:hover {
        border-color: #39a785
    }
}

/* 未回答のままボタンを押したとき */
.ctaForm__group.is-error .ctaForm__heading {
    -webkit-animation: ctaFormShake .4s;
    animation: ctaFormShake .4s
}

@-webkit-keyframes ctaFormShake {
    0%, 100% { -webkit-transform: translateX(0); transform: translateX(0) }
    25% { -webkit-transform: translateX(-5px); transform: translateX(-5px) }
    75% { -webkit-transform: translateX(5px); transform: translateX(5px) }
}

@keyframes ctaFormShake {
    0%, 100% { -webkit-transform: translateX(0); transform: translateX(0) }
    25% { -webkit-transform: translateX(-5px); transform: translateX(-5px) }
    75% { -webkit-transform: translateX(5px); transform: translateX(5px) }
}

/* ---------- LINEボタン（常にカード下部） ---------- */
.ctaForm__footer {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    padding: 8px 24px 28px
}

.ctaForm__submit {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 100%;
    height: 55px;
    padding: 0 26px 0 46px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    background: #e06150;
    border: 2px solid #e66f5f;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .25);
    -webkit-tap-highlight-color: transparent;
    -webkit-transition: background-color .2s, border-color .2s, opacity .2s;
    transition: background-color .2s, border-color .2s, opacity .2s
}

.ctaForm__submit[aria-disabled="true"] {
    background: #9a9a9a;
    border-color: #b3b3b3;
    cursor: default
}

@media (hover: hover) {
    .ctaForm__submit:not([aria-disabled="true"]):hover {
        opacity: .85
    }
}

.ctaForm__submit-icon {
    position: absolute;
    top: 50%;
    left: 13px;
    width: 28px;
    height: 26px;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%)
}

.ctaForm__submit-arrow {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 8px;
    height: 8px;
    border-top: 1.5px solid #fff;
    border-right: 1.5px solid #fff;
    -webkit-transform: translateY(-50%) rotate(45deg);
    transform: translateY(-50%) rotate(45deg)
}

/* ---------- 高さが低い端末（SE・ブラウザUI表示中など）は詰めて表示 ---------- */
@media (max-height: 640px) {
    .ctaForm__body {
        padding-top: 44px
    }

    .ctaForm__group + .ctaForm__group {
        margin-top: 18px
    }

    .ctaForm__options {
        gap: 7px;
        margin-top: 12px
    }

    .ctaForm__note + .ctaForm__options {
        margin-top: 10px
    }

    .ctaForm__options--2col {
        row-gap: 7px
    }

    .ctaForm__option span {
        height: 35px
    }

    .ctaForm__options--2col .ctaForm__option span {
        height: 32px
    }

    .ctaForm__footer {
        padding-bottom: 20px
    }
}

@media (max-height: 560px) {
    .ctaForm__body {
        padding-top: 42px
    }

    .ctaForm__heading,
    .ctaForm__group + .ctaForm__group .ctaForm__heading {
        height: 28px;
        line-height: 28px;
        font-size: 15px
    }

    .ctaForm__note {
        margin-top: 4px
    }

    .ctaForm__group + .ctaForm__group {
        margin-top: 14px
    }

    .ctaForm__options {
        gap: 6px;
        margin-top: 9px
    }

    .ctaForm__note + .ctaForm__options {
        margin-top: 7px
    }

    .ctaForm__options--2col {
        row-gap: 6px
    }

    .ctaForm__option span {
        height: 32px;
        font-size: 13px
    }

    .ctaForm__options--2col .ctaForm__option span {
        height: 30px
    }

    .ctaForm__footer {
        padding: 6px 24px 16px
    }

    .ctaForm__submit {
        height: 50px;
        font-size: 16px
    }
}

/* 背景スクロール固定 */
body.is-ctaForm-open {
    overflow: hidden
}

.ctaForm__submit-iconText {
    fill: #e06150;
    -webkit-transition: fill .2s;
    transition: fill .2s
}

.ctaForm__submit[aria-disabled="true"] .ctaForm__submit-iconText {
    fill: #9a9a9a
}


/* 文言が長い場合は少し小さく */
.ctaForm__submit.is-long {
    font-size: 15px
}
