:root {
    color-scheme: light;
    --page-bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f7faff;
    --ink: #182230;
    --muted: #5f6f83;
    --line: #d8e2f0;
    --line-strong: #b8c7db;
    --navy: #163b73;
    --navy-dark: #102b54;
    --blue: #1f6feb;
    --blue-dark: #1557b0;
    --blue-soft: #eaf3ff;
    --danger: #c7352b;
    --shadow: 0 18px 48px rgba(29, 54, 92, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page-bg);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "맑은 고딕", "Malgun Gothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 0%, rgba(31, 111, 235, 0.09), transparent 31rem),
        var(--page-bg);
    line-height: 1.65;
    word-break: keep-all;
}

button,
input,
textarea {
    font: inherit;
}

button,
label,
input[type="radio"] {
    -webkit-tap-highlight-color: transparent;
}

.consult-page {
    width: min(100% - 32px, 860px);
    margin: 0 auto;
    padding: 36px 0 48px;
}

.consult-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    min-height: 250px;
    padding: 38px 40px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--navy-dark), var(--navy) 58%, #2369c7);
    border-radius: 28px;
    box-shadow: 0 22px 52px rgba(16, 43, 84, 0.23);
}

.consult-hero::before,
.consult-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.consult-hero::before {
    width: 310px;
    height: 310px;
    top: -190px;
    right: -80px;
    background: rgba(255, 255, 255, 0.10);
}

.consult-hero::after {
    width: 210px;
    height: 210px;
    right: 120px;
    bottom: -155px;
    background: rgba(255, 255, 255, 0.07);
}

.consult-hero__copy,
.consult-hero__badge {
    position: relative;
    z-index: 1;
}

.consult-eyebrow {
    margin: 0 0 13px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    opacity: 0.84;
}

.consult-hero h1 {
    margin: 0;
    font-size: clamp(31px, 5vw, 46px);
    line-height: 1.23;
    letter-spacing: -0.045em;
}

.consult-hero__description {
    max-width: 560px;
    margin: 17px 0 0;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.88);
}

.consult-hero__badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 3px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.consult-hero__badge span {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    color: var(--navy-dark);
    background: #ffffff;
    border-radius: 50%;
    font-size: 13px;
}

.answer-guide {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 19px 22px;
    margin: 18px 0;
    background: var(--blue-soft);
    border: 1px solid #c6ddfb;
    border-radius: 18px;
}

.answer-guide__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    color: #ffffff;
    background: var(--blue);
    border-radius: 50%;
    font-size: 15px;
    font-weight: 900;
}

.answer-guide h2 {
    margin: 0 0 3px;
    color: var(--navy);
    font-size: 16px;
    line-height: 1.4;
}

.answer-guide p {
    margin: 0;
    color: #3e5d80;
    font-size: 14px;
}

.consult-form {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.form-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 28px;
    color: var(--muted);
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.form-topline p {
    margin: 0;
}

.required-guide {
    white-space: nowrap;
}

.required-guide span,
.field-label b {
    color: var(--danger);
}

.form-section {
    padding: 30px 30px 32px;
    border-bottom: 1px solid var(--line);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.section-number {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: var(--navy);
    border-radius: 11px;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 7px 16px rgba(22, 59, 115, 0.18);
}

.section-heading h2 {
    margin: 0;
    color: var(--navy-dark);
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.field {
    display: block;
    min-width: 0;
}

.field--wide {
    grid-column: 1 / -1;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: #253d5b;
    font-size: 15px;
    font-weight: 800;
}

.field-label em {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 7px;
    color: #62748a;
    background: #edf1f6;
    border-radius: 999px;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.field input,
.field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 13px 14px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field textarea {
    min-height: 150px;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #8b99aa;
}

.field input:hover,
.field textarea:hover {
    border-color: #8da5c2;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.13);
}

.field small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.option-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.option-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 17px 15px;
    background: #ffffff;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.option-card:hover {
    border-color: #7fa8df;
    transform: translateY(-1px);
}

.option-card:has(input:checked) {
    background: var(--blue-soft);
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.10);
}

.option-card input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--blue);
}

.option-card__body {
    display: block;
    min-width: 0;
}

.option-card__body strong,
.option-card__body small {
    display: block;
}

.option-card__body strong {
    color: #233b59;
    font-size: 14px;
    line-height: 1.45;
}

.option-card__body small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.password-control {
    position: relative;
    display: block;
}

.password-control input {
    padding-right: 68px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 50px;
    padding: 7px 8px;
    color: var(--navy);
    background: #edf4fd;
    border: 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: #dceafd;
}

.password-toggle:focus-visible,
.option-card:focus-within {
    outline: 3px solid rgba(31, 111, 235, 0.22);
    outline-offset: 2px;
}

.submit-panel {
    padding: 28px 30px 30px;
    background: linear-gradient(180deg, #fbfdff, #f4f8fd);
}

.submit-panel h2 {
    margin: 0;
    color: var(--navy-dark);
    font-size: 18px;
    letter-spacing: -0.02em;
}

.submit-panel > div > p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.form-status {
    min-height: 24px;
    margin: 18px 0 10px;
    color: #53677f;
    text-align: center;
    font-size: 13px;
}

.form-status.is-error {
    color: var(--danger);
    font-weight: 800;
}

.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    min-height: 58px;
    padding: 15px 20px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), #175fca);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(31, 111, 235, 0.24);
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.submit-button:hover:not(:disabled) {
    filter: brightness(0.96);
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(31, 111, 235, 0.28);
}

.submit-button:focus-visible {
    outline: 4px solid rgba(31, 111, 235, 0.22);
    outline-offset: 3px;
}

.submit-button:disabled {
    color: #eef2f7;
    background: #98a5b6;
    box-shadow: none;
    cursor: wait;
    transform: none;
}

.privacy-note,
.script-warning {
    margin: 18px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.script-warning {
    padding: 12px;
    color: var(--danger);
    background: #fff0ef;
    border: 1px solid #f3c2be;
    border-radius: 12px;
    font-weight: 800;
}

.honeypot,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.consult-error-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.connection-error {
    width: min(100%, 680px);
    padding: 30px;
    background: #ffffff;
    border: 1px solid #efb9b5;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.connection-error__eyebrow {
    margin: 0 0 6px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 900;
}

.connection-error h1 {
    margin: 0 0 13px;
    color: #8f2720;
    font-size: 26px;
}

.connection-error p {
    margin: 8px 0;
}

.connection-error code {
    padding: 2px 6px;
    background: #f1f4f8;
    border-radius: 6px;
}

@media (max-width: 760px) {
    .consult-page {
        width: min(100% - 24px, 860px);
        padding-top: 18px;
    }

    .consult-hero {
        display: block;
        min-height: 0;
        padding: 30px 26px;
        border-radius: 22px;
    }

    .consult-hero__description {
        font-size: 15px;
    }

    .consult-hero__badge {
        margin-top: 22px;
        margin-bottom: 0;
    }

    .field-grid,
    .option-grid {
        grid-template-columns: 1fr;
    }

    .field--wide {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    body {
        word-break: normal;
    }

    .consult-page {
        width: 100%;
        padding: 0 0 28px;
    }

    .consult-hero {
        padding: 27px 20px 25px;
        border-radius: 0 0 24px 24px;
    }

    .consult-hero h1 {
        font-size: 31px;
    }

    .consult-hero__badge {
        font-size: 13px;
    }

    .answer-guide {
        margin: 14px 12px;
        padding: 16px;
        border-radius: 15px;
    }

    .consult-form {
        margin: 0 12px;
        border-radius: 20px;
    }

    .form-topline {
        align-items: flex-start;
        padding: 15px 18px;
        font-size: 12px;
    }

    .form-section {
        padding: 25px 18px 27px;
    }

    .section-heading {
        gap: 11px;
        margin-bottom: 20px;
    }

    .section-number {
        width: 31px;
        height: 31px;
        border-radius: 10px;
    }

    .section-heading h2 {
        font-size: 20px;
    }

    .section-heading p {
        font-size: 13px;
    }

    .field-grid {
        gap: 18px;
    }

    .field input,
    .field textarea {
        font-size: 16px;
    }

    .submit-panel {
        padding: 25px 18px 22px;
    }

    .privacy-note {
        padding: 0 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
