.contact-overview .section-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    background: none;
}

.contact-overview h2 {
    color: #153c8a;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 32px;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px #fff, 0 0 2px #fff;
}

.contact-overview p {
    font-size: 1.2rem;
    line-height: 2.2;
    color: var(--text-color);
    margin-bottom: 0;
    letter-spacing: 0.01em;
    background: none;
    text-shadow: 0 2px 8px #fff, 0 0 2px #fff;
}

/* 入力フォーム全体 */
.contact-form-section {
    margin: 32px 0 0 0;
    display: flex;
    justify-content: center;
}

.contact-form {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    background: none;
    border-radius: 8px;
    box-sizing: border-box;
    min-height: 56px;
}

.contact-form-label {
    background: var(--primary-color);
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 16px 28px 16px 18px;
    width: 320px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    box-sizing: border-box;
}

.required-badge {
    background: var(--sub-title-icon);
    color: #fff;
    font-size: 0.95em;
    padding: 2px 10px;
    margin-left: 8px;
    display: inline-block;
}

.optional-badge {
    background: var(--secondary-color);
    color: #fff;
    font-size: 0.95em;
    padding: 2px 10px;
    margin-left: 8px;
    display: inline-block;
}

.contact-form-input,
.contact-form-textarea,
select.contact-form-input {
    flex: 1;
    background: #f2f6ff;
    border: 1.5px solid #bfc6db;
    padding: 10px 18px;
    font-size: 1.1rem;
    color: var(--text-color);
    outline: none;
    height: 56px;
    width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.2s, border 0.2s;
}

.overflow {
    overflow-y: auto;
}

.contact-form-input:focus,
.contact-form-textarea:focus,
select.contact-form-input:focus {
    box-shadow: none;
    border: 2.5px solid #2B30BB;
    outline: none;
}

input:required:invalid:focus,
select:required:invalid:focus,
textarea:required:invalid:focus {
    border: 2.5px solid #2B30BB !important;
    outline: none;
}

.contact-form-input[type="file"] {
    padding: 0;
    height: auto;
    background: none;
    border-radius: 0;
}

.contact-form-file-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.error-message {
    color: red;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.contact-form-file-name {
    color: #888;
    font-size: 1em;
}

/* select用 */
select.contact-form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: center right 16px;
    background-size: 18px 18px;
    padding-right: 40px;
    cursor: pointer;
}

/* textarea用 */
.contact-form-textarea {
    min-height: 300px;
    height: 400px;
    font-family: inherit;
    resize: none;
}

/* お問い合わせ内容のラベル高さをテキストエリアに合わせる */
.contact-form-row textarea.contact-form-textarea {
    height: 400px;
    min-height: 300px;
}

.contact-form-row textarea.contact-form-textarea+label,
.contact-form-row label[for="message"],
.contact-form-row label[for="check-message"] {
    align-items: flex-start;
    height: 400px;
    min-height: 300px;
    display: flex;
}

@media (max-width: 900px) {
    .contact-form-section {
        padding: 0 16px;
    }

    .contact-form-row {
        flex-direction: column;
        align-items: stretch;
        min-height: unset;
    }

    .contact-form-label {
        width: 100%;
        height: 48px;
        font-size: 1rem;
        padding: 12px 16px;
    }

    .contact-form-input,
    .contact-form-textarea,
    select.contact-form-input {
        height: 48px;
        font-size: 1rem;
        padding: 12px 14px;
    }

    .contact-form-row textarea.contact-form-textarea {
        height: 120px;
        min-height: 120px;
    }

    .contact-form-row textarea.contact-form-textarea+label,
    .contact-form-row label[for="message"],
    .contact-form-row label[for="check-message"] {
        height: 48px;
        min-height: 48px;
        align-items: center;
    }

    .contact-form-textarea {
        min-height: 160px;
        height: 160px;
    }

    .contact-overview .section-container {
        text-align: left !important;
    }

    .pc-br {
        display: none;
    }
}

/* inputやtextareaには背景画像を消す */
.contact-form-input[type="text"],
.contact-form-input[type="email"],
.contact-form-input[type="tel"],
.contact-form-input[type="file"],
textarea.contact-form-input {
    background-image: none !important;
}

.contact-privacy-box {
    border: 2px solid var(--primary-color);
    padding: 0px 36px 32px 36px;
    margin: 40px 0 24px 0;
    background: #fff;
    color: var(--text-color);
    font-size: 1.1rem;
    text-align: left;
    max-width: 100%;
}

.contact-privacy-box p {
    margin: 0;
    line-height: 2.1;
    color: var(--text-color);
}

.contact-privacy-check {
    margin-bottom: 32px;
    font-size: 1.1rem;
    text-align: center;
    position: relative;
    padding: 10px 0;
}

.contact-privacy-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary-color);
    vertical-align: middle;
    margin-right: 8px;
    margin-top: -4px;
}

.contact-privacy-check label {
    vertical-align: middle;
}

.contact-confirm-btn-area {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.contact-confirm-btn {
    background: transparent;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 999px;
    padding: 18px 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    z-index: 1;
}

.contact-confirm-btn:hover {
    background: transparent;
}

.contact-confirm-btn-arrow {
    font-size: 1.5em;
    display: inline-block;
    margin-left: 8px;
}

@media (max-width: 900px) {
    .contact-privacy-box {
        padding: 18px 8px;
        font-size: 1rem;
    }

    .contact-confirm-btn {
        font-size: 1rem;
        padding: 14px 24px;
    }
}

.form-error-list,
.form-error-list li,
#form-error-summary ul,
#form-error-summary li {
    color: #e22 !important;
}

.contact-check-section {
    margin: 32px 0 48px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-check-title {
    font-size: 1.0rem;
    font-weight: bold;
    color: #24288a;
    margin-bottom: 36px;
    text-align: center;
    letter-spacing: 0.08em;
}

.contact-check-table-area {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-check-btns {
    display: flex;
    gap: 24px;
    margin-top: 48px;
}

@media (max-width: 400px) {
    .contact-check-btns {
        gap: 10px;
    }
}

.contact-check-back-btn,
.contact-check-submit-btn {
    padding: 18px 48px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-check-back-btn {
    background: transparent;
    color: #fff;
    border: none;
}

.contact-check-back-btn:hover {
    background: transparent;
}

@media (max-width: 400px) {
    .contact-check-back-btn,
    .contact-check-submit-btn {
        font-size: 0.85rem;
    }
}

.contact-check-submit-btn {
    background: transparent;
    color: #fff;
    border: none;
}

.contact-check-submit-btn:hover {
    background: transparent;
}

@media (max-width: 900px) {
    .contact-check-section {
        padding: 0 16px;
    }

    .contact-check-table-area {
        margin: 0;
    }
}

/* 確認画面用のスタイル */
.contact-check-table-area .contact-form-input {
    background-image: none !important;
    padding-right: 18px;
    cursor: default;
}

/* 資料ダウンロード選択セクション */
.download-select-container {
    display: flex;
    justify-content: center;
    gap: 70px;
    margin: 40px 0 80px 0;
    flex-wrap: wrap;
}

.download-card {
    width: 320px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #F2F8FF;
    box-sizing: border-box;
}

.download-card-header {
    background: var(--primary-color);
    color: #fff;
    font-weight: bold;
    font-size: 1.25em;
    padding: 22px 0 20px 0;
    width: 100%;
    text-align: center;
    border-radius: 0;
    margin-bottom: 18px;
    letter-spacing: 0.04em;
}

.download-card-img {
    width: 100%;
    max-width: 220px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.download-card-body ul {
    list-style: disc inside;
    margin-bottom: 16px;
    color: var(--text-color);
    font-size: 0.98em;
    padding-left: 0;
}

.download-btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 8px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}

.download-btn:hover {
    background: var(--secondary-color);
}

@media (max-width: 900px) {
    .download-select-container {
        flex-direction: column;
        gap: 32px;
    }

    .download-card {
        width: 100%;
        min-width: unset;
    }
}

.download-select-section {
    padding: 0 20px;
}

.download-result-section {
    margin-bottom: 48px;
}

.sp-br {
    display: none;
}

@media (max-width: 768px) {

    .sp-br {
        display: block;
    }

    .download-select-section {
        padding: 0 0;
    }

    .download-select-container {
        flex-direction: column;
        gap: 40px;
        align-items: center;
        margin: 32px 0;
    }

    .download-card {
        width: 80vw;
        min-width: unset;
        max-width: 420px;
        margin: 0 0 32px 0;
    }

    .download-card-header {
        font-size: 1.18em;
        padding: 20px 0 18px 0;
        border-radius: 0;
        margin-bottom: 18px;
        letter-spacing: 0.04em;
    }

    .download-card-img {
        width: 70%;
        max-width: 320px;
        margin: 10px auto 30px auto;
        display: block;
        border-radius: 8px;
        box-shadow: 0 1px 8px #0001;
    }
}

@media (max-width: 500px) {

    .contact-check-back-btn,
    .contact-check-submit-btn {
        padding: 18px 30px !important;
    }
}