/* ========== セクション土台 ========== */
.section.contact {
    padding-block: 7.6rem 9.6rem;
}

.section.thanks {
    padding-block: 7rem 7rem;
}

.contact__top-box {
    display: grid;
    gap: 3rem;
}

.contact__text {
    text-align: center;
    font-size: 16px;
    line-height: 1.74;
}

.contact__text-small {
    font-size: 14px;
}

/* ========== カード/フォームの外枠 ========== */
.contact__container {
    margin-top: 7.6rem;
    background: #F8F0ED;
}

.contact__card {
    display: grid;
    grid-template-columns: minmax(0, var(--card-col-max, 74rem));
    justify-content: center;
    padding: 7rem clamp(1rem, 6vw, 13rem);
    background: #fbf1ee;
}

/* ========== フォーム ========== */
.form {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 5rem;
}

.form__grid {
    display: grid;
    gap: 4.2rem;
}

.form__row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: start;
    gap: 1.4rem;
}

.form__row--textarea {
    align-items: stretch;
}

.form__label {
    font-weight: 500;
    color: #633c37;
    line-height: 1.4;
}

.form__sub {
    display: block;
    font-size: .85em;
    color: #A7A5A5;
    font-weight: 400;
    line-height: 1.8;
}

.form__badge {
    padding: .1em .7em;
    margin-left: .5em;
    font-size: 1.2rem;
    color: #fff;
    background-color: #CA958E;
    border-radius: 3px;
}

.form__control {
    width: 100%;
    background: #fff;
    border: 1px solid #dddddd;
    border-radius: 5px;
    padding: .85rem 1rem;
    font-size: 1.4rem;
    line-height: 1.3;
}

.form__textarea {
    min-height: 8rem;
    resize: vertical;
}

.form__control:focus {
    outline: 3px solid rgba(190, 134, 127, .2);
    border-color: #be867f;
}

::placeholder {
    color: #bdbdbd;
}

/* ========== ポリシータブ/本文 ========== */
.contact__bottom {
    margin-top: 1rem;
}

.form__policy-tabs {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.form__policy-tabs .tab {
    padding: .4rem 4rem;
    border: 1px solid #EADAD6;
    background: #fff;
    font-size: 14px;
    line-height: 1.4;
    border-radius: 999px;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.form__policy-tabs .tab.is-active {
    background: #f4e9e7;
    border-color: #d9c5c1;
    color: #6e5a56;
}

.form__policy-box {
    margin-top: 1rem;
    background: #fff;
    border: 1px solid #e3d5d3;
    border-radius: 0;
    padding: 1.2rem 1.4rem;
    height: 30rem;
    overflow: auto;
    font-size: 14px;
    line-height: 1.8;
}

/* タイトル（JP / EN を一列に） */
.policy-title {
    text-align: center;
    font-family: var(--font-serif-latin, "EB Garamond", "Noto Serif JP", serif);
    color: #633c37;
    font-size: clamp(1.6rem, 1.8vw, 1.9rem);
    font-weight: 500;
    line-height: 1.6;
    margin: 2rem auto 2.2rem;
}

.policy-title__jp,
.policy-title__en,
.policy-title__slash {
    display: inline;
}

.policy-title__slash {
    padding: 0 .4em;
}

/* 本文の入りだけは左インデントを外す */
.form__policy-box p.policy-title__desc {
    padding-left: 0;
}

/* 小見出し */
.policy-list h3 {
    margin-top: 1.8em;
    font-weight: 500;
    color: #633c37;
}

/* リスト装飾（✴︎ と ・） */
.form__policy-box .policy-list {
    margin-top: 3rem;
}

.form__policy-box .policy-list ul {
    list-style: none;
    padding-left: 1.6em;
}

.form__policy-box .policy-list ul li {
    position: relative;
}

.form__policy-box .policy-list ul li::before {
    content: "✴︎";
    position: absolute;
    left: -1em;
    top: .48em;
    color: #BE867F;
    font-size: .9em;
    line-height: 1;
}

.form__policy-box .policy-list ul ul {
    padding-left: .6em;
}

.form__policy-box .policy-list ul ul li::before {
    content: "・";
    color: #a08a84;
}

.policy-enacted {
    margin-top: 1.8em;
}

/* タブ切り替えの非表示 */
.policy-content.is-hidden {
    display: none;
}

/* ========== 同意チェック/ハニーポット ========== */
.form__agree {
    display: grid;
    grid-template-columns: auto 1fr;
    justify-self: center;
    width: fit-content;
    justify-items: start;
    gap: .8rem 1rem;
    color: #6e5a58;
    margin-top: 4rem;
}

.form__agree input[type="checkbox"] {
    -webkit-appearance: checkbox;
    appearance: checkbox;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #B5756E;
}

.form__agree__text {
    word-break: auto-phrase;
    line-height: 1.4;
}

/* 画面外ハニーポット */
.form__hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ========== 送信ボタン（2行ラベル＋無効状態） ========== */
.contact__btn {
    margin-top: 4rem;
    display: block;
    margin-inline: auto;
    text-align: center;
    padding: 1.2rem 6rem;
    border: none;
    border-radius: 6px;
    background: #B5756E;
    color: #fff;
    cursor: pointer;
    transition: opacity .35s ease, transform .06s ease;
}

.contact__btn .main {
    font-size: 19px;
    letter-spacing: .07em;
    line-height: 1.5;
}

.contact__btn .sub {
    display: block;
    font-family: var(--font-sans-latin);
    font-size: 12px;
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: .11em;
    opacity: .9;
}

.contact__btn:hover {
    opacity: 0.5;
}

.contact__btn:active {
    transform: translateY(1px);
}

/* 未同意/無効（JSが disabled / aria-disabled を切り替え） */
.contact__btn[disabled],
.contact__btn[aria-disabled="true"] {
    background: #DCC8C5;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .9;
}

/* ========== Thanks ページ ========== */
.thanks__container {
    margin-top: 0;
}

.thanks__title {
    color: #834842;
    font-family: var(--font-serif-ja);
    letter-spacing: 0.044em;
    font-size: 32px;
    margin-top: 1rem;
    margin-bottom: 7.4rem;
}

.thanks__desc {
    font-size: 17px;
    color: #645959;
    line-height: 2;
}

.thanks__line {
    border: 0;
    height: 1px;
    background: #E9DCDC;
    margin: 4rem 0;
    width: 100%;
}

.thanks__btn__area {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.thanks__btn {
    position: relative;
    display: inline-block;
    text-align: center;
    padding-block: 1.4rem;
    width: 240px;
    border-radius: 6px;
    background: #b5756e;
    color: #fff;
    cursor: pointer;
    transition: opacity .35s ease;
}

.thanks__btn .main {
    font-size: 25px;
    font-family: var(--font-sans-latin);
    letter-spacing: .11em;
    line-height: 1.3;
    font-weight: 300;
}

.thanks__btn .sub {
    display: block;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.3;
    opacity: .9;
}

.thanks__btn::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 1.2em;
    width: 10px;
    height: 10px;
    margin: auto;
    border-top: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
    transform: rotate(45deg);
    box-sizing: border-box;
    transition: transform .25s ease;
}

.thanks__btn:hover::after {
    transform: translateX(7px) rotate(45deg);
}

/* ========== 下段の2リンク＋中央の仕切り線（thanks.html） ========== */
.contact__sub-btn__area {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* 中央は線 */
    align-items: center;
    column-gap: clamp(.8rem, 2vw, 2rem);
    text-align: center;
    margin: 4.7rem auto 11.5rem;
    width: fit-content;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: #b5756e;
}

.contact__sub-btn__area a:first-child {
    justify-self: end;
}

.contact__sub-btn__area a:last-child {
    justify-self: start;
}

.contact__divider {
    display: block;
    width: 1px;
    height: 1.1em;
    /* 文字高さに追従 */
    background: currentColor;
    opacity: .6;
}

/* ========== レスポンシブ ========== */
@media (max-width: 960px) {
    .thanks__btn {
        width: 200px;
    }

    .thanks__btn .main {
        font-size: 23px;
    }
}

@media (max-width: 768px) {

    .section.contact {
        padding-block: 5rem 5rem;
    }

    .section.thanks {
        padding-block: 0rem 4rem;
    }

    .contact__container {
        margin-top: 5rem;
    }

    .contact__card {
        padding: 4rem clamp(1rem, 6vw, 13rem);
    }

    .form {
        gap: 4rem;
    }

    .contact__text {
        text-align-last: left;
        font-size: 14px;
        font-weight: 500;
        color: #645959;
    }

    .form__row {
        grid-template-columns: 1fr;
        gap: .5rem;
    }

    .form__grid {
        gap: 3rem;
    }

    .form__label {
        font-size: 15px;
        font-weight: 600;
    }

    .form__badge {
        font-size: 11px;
    }

    .form__sub {
        font-size: 13px;
        color: #919090;
    }

    .form__policy-tabs {
        gap: .8rem;
    }

    .form__policy-tabs .tab {
        padding: .4rem 2.8rem;
    }

    /* タイトルは2行（スラッシュ非表示） */
    .policy-title__slash {
        display: none;
    }

    .policy-title__en {
        display: block;
    }

    .contact__btn .main {
        font-size: 17px;
    }

    .policy-list h3 {
        font-weight: 600;
    }

    .form__policy-box .policy-list ul {
        padding-left: 1.3rem;
    }

    /* Thanks 文言/ボタン */
    .thanks__title {
        font-size: 24px;
        letter-spacing: 0;
        line-height: 1.5;
        margin-bottom: 4.4rem;
    }

    .thanks__desc {
        font-size: 15px;
        line-height: 1.8;
    }

    .thanks__line {
        margin: 2rem 0;
    }

    .thanks__desc-eg {
        margin-bottom: 1rem;
    }

    .thanks__btn__area {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .thanks__btn {
        padding-block: 1.1rem;
        width: 220px;
    }

    .thanks__btn .main {
        font-size: 22px;
    }

    .thanks__btn .sub {
        font-size: 11px;
        font-weight: 500;
    }

    .thanks__btn::after {
        width: 8px;
        height: 8px;
    }

    /* 下段2リンク：縦積み（仕切り線は非表示） */
    .contact__sub-btn__area {
        grid-template-columns: 1fr;
        row-gap: 1.6rem;
        margin: 2.7rem auto 6rem;
    }

    .contact__divider {
        display: none;
    }

    .contact__sub-btn__area a {
        justify-self: center;
    }
}

/* ========== モーション配慮 ========== */
@media (prefers-reduced-motion: reduce) {

    .contact__btn,
    .thanks__btn,
    .thanks__btn::after {
        transition: none !important;
    }
}