.contact-container {
    max-width: 1020px;
    margin: 80px auto 50px auto;
    padding: 0 20px;
}

.contact-header .contact-title {
    font-size: 40px;
    font-family: "Zen Kaku Gothic New", Medium;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    position: relative;
    color: #000000;
}

.contact-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 1px;
    width: 100%;
    background-color: #ccc;
}

.contact-bullet {
    color: #dc000c;
    font-size: 28px;
    line-height: 1;
    position: relative;
    top: -7px;
}

.contact-txt {
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.8;
    font-family: "Zen Kaku Gothic New", "游ゴシック", sans-serif;
    letter-spacing: 0.1em;
    margin-top: 51px;
    margin-bottom: 80px;
}

/* 横並びフォーム */
.form-row-horizontal {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 5px;
}

/* ラベルボックス（物件名）*/
.form-label-box-property {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 280px;
    height: 70px;
    background-color: #f5f5f5;
    font-weight: 500;
    text-align: left;
    border-radius: 4px;
    padding-left: 30px;
    gap: 25px;
    font-size: 16px;
}

.form-label-box-property.required::after {
    content: " 必須";
    color: #fff;
    background-color: #dc000c;
    font-size: 13px;
    padding: 2px 6px;
    margin-left: auto;
    margin-right: 20px;
}

/* ラベルボックス（お問い合わせ内容） */
.form-label-box-inquiry {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 280px;
    height: 378px;
    background-color: #f5f5f5;
    font-weight: 500;
    text-align: left;
    border-radius: 4px;
    padding-left: 30px;
    gap: 25px;
    font-size: 16px;
}

.form-label-box-inquiry.required::after {
    content: " 必須";
    color: #fff;
    background-color: #dc000c;
    font-size: 13px;
    padding: 2px 6px;
    margin-left: auto;
    margin-right: 20px;
}

/* 入力欄（共通） */
.form-row-horizontal .form-input-horizontal {
    flex: 1;
    font-size: 16px;
    background-color: #fff;
    border: none;
    border-bottom: 2px solid #ccc;
    padding: 25px 10px;
    border-radius: 0;
    transition: border-color 0.15s ease;
}

.form-input-horizontal:focus {
    outline: none;
    border-bottom-color: #ccc;
}

.form-divider {
    height: 2px;
    background-color: #ccc;
    width: calc(100% - 295px);
    margin-left: 295px;
    margin-top: 0;
    margin-bottom: 0;
}

/* お問い合わせ内容ブロック */
.form-input-inquiry {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 2px solid #ccc;
}

.checkbox-section {
    margin-bottom: 15px;
}

.checkbox-title {
    font-weight: 500;
    margin-bottom: 25px;
    font-size: 16px;
}

/* チェックボックス群 */
.checkbox-section {
    margin-bottom: 15px;
}

.checkbox-title {
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 16px;
}

.checkbox-note {
    font-size: 14px;
    color: #666;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #fff;
    padding: 2px 4px;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #28a745;
}

/* 自由記入欄 */
.form-input-other {
    width: 667px;
    height: 92px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 16px;
    border-radius: 4px;
    resize: none;
}

.btn-submit {
    background-color: #dc000c;
    color: white;
    font-size: 16px;
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-submit:hover {
    opacity: 0.9;
}

.contact-subtitle {
    font-size: 16px;
    font-weight: 500;
    margin: 60px 0 20px 0;
    padding-left: 10px;
    font-family: "DNP 秀英角ゴシック銀 Std, B", sans-serif;
}

/* ラベルボックス （名前・フリガナ・メアド・電話番号用）*/
.form-label-box-customer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 280px;
    height: 99px;
    background-color: #f5f5f5;
    font-weight: 500;
    text-align: left;
    border-radius: 4px;
    padding-left: 30px;
    font-size: 16px;
    gap: 25px;
}

.form-label-box-customer.required::after {
    content: " 必須";
    color: #fff;
    background-color: #dc000c;
    font-size: 13px;
    padding: 2px 6px;
    margin-left: auto;
    margin-right: 20px;
}

/* ボックス型入力欄 */
.form-row-horizontal .form-input-customer-name,
.form-row-horizontal .form-input-customer-furigana,
.form-row-horizontal .form-input-customer-mail,
.form-row-horizontal .form-input-customer-phonNum {
    width: 689px;
    height: 72px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 16px;
    border-radius: 4px;
    resize: none;
    margin-top: 15px;
    letter-spacing: 0.1em;
}

/* ラベルボックス（住所用） */
.form-label-box-customer-address {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 280px;
    height: 425px;
    background-color: #f5f5f5;
    font-weight: 500;
    text-align: left;
    border-radius: 4px;
    padding-left: 30px;
    font-size: 16px;
}

.form-input-customer-address-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* 各行（郵便番号、都道府県など） */
.form-subrow {
    display: flex;
    align-items: center;
    gap: 20px;
}

.form-divider-address {
    height: 2px;
    background-color: #ccc;
    margin-top: 0;
    margin-bottom: 15px;
}

/* 各項目名 */
.form-sublabel {
    width: 110px;
    font-size: 16px;
    font-weight: 500;
    margin-left: 10px;
    white-space: nowrap;
}
/* 入力欄 */
.form-input-customer-address-group .form-input-customer-address {
    width: 506px;
    height: 72px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
    letter-spacing: 0.1em;
}

.form-input-customer-address {
    transform: translateX(40px);
}

/* 郵便番号のブロック */
.form-subrow.postcode {
    margin-top: 15px;
}

/* 都道府県のブロック */
.form-subrow.prefecture {
    margin-top: 20px;
}

/* ▼ セレクトボックス本体 */
.form-input-customer-select {
    width: 230px;
    height: 72px;
    padding: 10px 40px 10px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpolygon points='6,0 12,12 0,12' fill='%23666'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpolygon points='0,0 12,0 6,12' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 13px 8px;
    background-position: right 12px top 33%, /* ▲ */ right 12px bottom 28%; /* ▼ */
    transform: translateX(40px);
}

/* 初期状態の文字を薄くする */
.form-input-customer-select option[value=""] {
    color: #999;
}

.form-input-customer-select:valid {
    color: #000;
}

.form-input-customer-select:invalid {
    color: #999;
}

/* フォーカス時 */
.form-input-customer-address:focus,
.form-input-customer-address select:focus {
    outline: none;
    border-color: #000000;
}

/* チェックボックス全体のエリア */
.privacy-consent {
    margin-top: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 30px;
}

/* チェックボックス */
.privacy-checkbox {
    width: 22px;
    height: 22px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #333;
}

/* テキスト部分 */
.privacy-text {
    font-size: 16px;
    color: #333;
    font-family: "DNP 秀英角ゴシック銀 Std", B;
    color: #d71122;
    font-weight: 500;
    letter-spacing: 0.12em;
}

/* 必須マーク */
.required-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 21px;
    background-color: #d71122;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    margin-right: 8px;
}

.contact-submit-btn {
    display: inline-block;
    width: 400px;
    height: 70px;
    background-color: #d71122;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    padding: 16px 60px;
    border: none;
    cursor: pointer;
    margin: 40px auto 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 連絡方法 */
.form-input-customer-contactmethod {
    display: flex;
    align-items: center;
    gap: 40px;
    height: 72px;
    padding: 10px 20px;
    background-color: #fff;
    color: #0b0b0b;
    font-family: "DNP 秀英角ゴシック銀 Std", "B", sans-serif;
    font-size: 16px;
    margin-top: 15px;
    letter-spacing: 0.1em;
}

.form-input-customer-contactmethod label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "DNP 秀英角ゴシック銀 Std", "B", sans-serif;
    font-size: 16px;
    font-weight: 500;
}

.form-input-customer-contactmethod input[type="radio"] {
    transform: scale(1.5);
    cursor: pointer;
}

/* メールマガジン */
.form-input-customer-mailmagazine {
    display: flex;
    align-items: center;
    gap: 40px;
    height: 72px;
    padding: 10px 20px;
    background-color: #fff;
    margin-top: 15px;
    letter-spacing: 0.1em;
}

.form-input-customer-mailmagazine label {
    font-family: "DNP 秀英角ゴシック銀 Std", "B", sans-serif;
    font-size: 16px;
    color: #0b0b0b;
    font-weight: 500;
}

.form-input-customer-mailmagazine label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-input-customer-mailmagazine input[type="radio"] {
    transform: scale(1.5);
    cursor: pointer;
}

/* 住所と電話番号の間の余白を詰める */
.form-label-box-customer-address {
    margin-bottom: 0 !important;
}

.form-input-customer-address-group {
    margin-bottom: 0 !important;
}

.form-divider-address:last-child {
    margin-bottom: 0 !important;
}

/* 住所ブロック全体の後の余白を詰める */
.form-row-horizontal + .form-row-horizontal {
    margin-top: 0 !important;
}

/* 名前専用の横並びラッパー */
.name-row .name-input-wrapper,
.furigana-row .furigana-input-wrapper {
    display: flex;
    gap: 20px;
    width: 689px;
    margin-top: 15px;
}

/* 姓・名の入力欄*/
.name-row .name-input,
.furigana-row .furigana-input {
    flex: 1;
    height: 72px;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    font-size: 16px;
    border-radius: 7px;
    letter-spacing: 0.1em;
}

.pc-only { display: inline; }
.sp-only { display: none; }

@media screen and (min-width: 520px) and (max-width: 959px) {
}

@media screen and (max-width: 519px) {
    /* 全体の横幅調整 */
    .contact-container {
        padding: 0 20px;
        margin: 50px auto;
    }

    /* 各フォーム行（横並び→縦並び） */
    .form-row-horizontal {
        display: block;
    }

    /* ラベルと入力欄を縦に積む */
    .form-label-box-customer,
    .form-label-box-customer-request.required,
    .form-label-box-inquiry {
        width: 100%;
        display: block;
        height: auto;
        padding: 15px 20px;
        text-align: left;
    }

    /* 各入力欄を幅100%に */
    .contact-container input.form-input-customer-mail,
    .contact-container input.form-input-customer-phone_num,
    .contact-container input.form-input-customer-password,
    .contact-container input.form-input-customer-preferred_area,
    .contact-container input.form-input-customer-request,
    .form-input-other {
        width: 100%;
        height: auto;
        margin-top: 10px;
    }

    .form-label-box-customer.required,
    .form-label-box-customer-request.required,
    .form-label-box-inquiry.required,
    .form-label-box-property.required {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .form-label-box-customer.required::after,
    .form-label-box-customer-request.required::after,
    .form-label-box-inquiry.required::after,
    .form-label-box-property.required::after {
        margin-left: auto;
        margin-right: 10px;
        position: relative;
        right: 0;
    }
    /* 区切り線を非表示に */
    .form-divider,
    .form-divider-address {
        display: none;
    }

    /* 送信ボタンも中央配置 */
    .contact-submit-btn {
        width: 100%;
        max-width: 100%;
        height: 60px;
        font-size: 16px;
    }

    /* チェックボックス・プライバシー同意も調整 */
    .privacy-consent {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 50px;
        text-align: left;
    }

    .privacy-text {
        font-size: 14px;
        line-height: 1.6;
    }

    .form-input-customer-phonNum {
        width: 100% !important;
        height: auto;
        margin-top: 10px;
        box-sizing: border-box;
    }

    .form-row-horizontal .form-input-horizontal {
        border-bottom: none;
    }

    .form-label-box-customer-address {
        width: 100% !important;
        height: auto;
        padding: 15px 20px;
        line-height: 1.4;
    }

    /* ---------- 名前入力欄 ---------- */
    .name-input-wrapper {
        width: 100%;
        display: block;
        margin-top: 10px;
    }

    .name-input-wrapper .name-input {
        width: 100%;
        height: auto;
        margin-top: 10px;
        box-sizing: border-box;
    }

    /* ---------- フリガナ入力欄 ---------- */
    .furigana-input-wrapper {
        width: 100%;
        display: block;
        margin-top: 10px;
    }

    .furigana-input-wrapper .furigana-input {
        width: 100%;
        height: auto;
        margin-top: 10px;
        box-sizing: border-box;
    }

    .name-input-wrapper,
    .furigana-input-wrapper {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .name-input-wrapper .name-input {
        width: 100%;
        height: auto;
        margin-top: 10px;
        box-sizing: border-box;
    }

    .name-row .name-input-wrapper,
    .furigana-row .furigana-input-wrapper {
        width: 100% !important;
        display: block !important;
        gap: 0 !important;
    }

    .form-input-customer-name,
    .form-input-customer-furigana {
        width: 100% !important;
        height: auto;
        margin-top: 10px;
    }

    .form-input-customer-address {
        transform: none;
    }

    .form-input-customer-select {
        transform: translateX(20px);
    }

    .pc-only { display: none; }
    .sp-only { display: inline; }

}
