body {
    margin: 0;
    background: #f5f6f8;
    font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    color: #222;
}

.contact-page {
    min-height: 100vh;
    padding: 32px 16px;
    box-sizing: border-box;
}

.contact-form-section {
    max-width: 980px;
    margin: 0 auto;
}

.contact-form-section h1 {
    margin: 0 0 24px;
    font-size: 32px;
    text-align: center;
}

.contact-form-section p {
    margin: 0;
    line-height: 1.8;
}

.confirm-lead {
    margin: 0 0 32px;
    text-align: center;
    font-size: 16px;
}

.form-section-card,
.confirm-list,
.thanks-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.form-section-card {
    padding: 24px;
    margin-bottom: 24px;
}

.form-section-card h2 {
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.form-group input,
.form-group select,
.form-group textarea,
input,
textarea,
select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd4dc;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #4f7cff;
    box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.12);
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.error-box {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #f3b4b4;
    background: #fff3f3;
    border-radius: 10px;
}

.error-box ul {
    margin: 0;
    padding-left: 18px;
}

.error-text {
    margin-top: 6px;
    color: #c62828;
    font-size: 13px;
}

.form-subsection {
    margin-top: 20px;
    padding: 16px;
    background: #fafbfc;
    border: 1px solid #e8ebef;
    border-radius: 12px;
}

.form-subsection-title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
}

.conditional-block {
    margin-top: 14px;
    padding-left: 14px;
    border-left: 4px solid #e4e8ef;
}

.medical-history-item {
    margin-bottom: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #dde3ea;
    border-radius: 12px;
}

.form-button {
    margin-top: 18px;
    text-align: center;
}

.form-button button,
.submit-area button,
.thanks-button {
    display: inline-block;
    min-width: 220px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    background: #1f6feb;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.form-button button:hover,
.submit-area button:hover,
.thanks-button:hover {
    opacity: 0.92;
}

.form-button .remove-history {
    min-width: auto;
    background: #6b7280;
    padding: 11px 18px;
    font-size: 14px;
}

.back-button {
    background: #6b7280;
}

.submit-area {
    margin-top: 28px;
    text-align: center;
}

.confirm-section .confirm-list {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px;
}

.confirm-group {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.confirm-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.confirm-group h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
}

.confirm-group p {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.8;
}

.confirm-group a {
    color: #007bff;
    text-decoration: none;
}

.confirm-group a:hover {
    text-decoration: underline;
}

.thanks-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 64px 40px;
    text-align: center;
}

.thanks-section h1 {
    margin-bottom: 20px;
    font-size: 42px;
    font-weight: 700;
}

.thanks-section .confirm-lead {
    margin-bottom: 40px;
    font-size: 20px;
}

.thanks-section .confirm-list {
    max-width: 640px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.thanks-section .confirm-group {
    padding-bottom: 24px;
}

.thanks-section .confirm-group h2 {
    font-size: 26px;
}

.thanks-section .confirm-group p {
    font-size: 18px;
}

.thanks-action {
    margin-top: 40px;
}

.thanks-button {
    min-width: auto;
    padding: 16px 40px;
    border-radius: 999px;
    font-size: 18px;
}

@media (max-width: 768px) {
    .contact-page {
        padding: 20px 12px;
    }

    .contact-form-section h1 {
        font-size: 28px;
    }

    .form-section-card,
    .confirm-section .confirm-list,
    .thanks-section {
        padding: 20px 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .confirm-group h2 {
        font-size: 20px;
    }

    .thanks-section h1 {
        font-size: 32px;
    }

    .thanks-section .confirm-lead {
        font-size: 18px;
    }

    .thanks-section .confirm-group h2 {
        font-size: 22px;
    }

    .thanks-section .confirm-group p {
        font-size: 16px;
    }
}