:root {
    --page-bg: #ffffff;
    --surface: #f7fafc;
    --border: #cfdbe8;
    --text-strong: #0d141c;
    --text-muted: #4d7399;
    --brand: #1280ed;
    --radius: 8px;
    --container-max: 960px;
    --gap-lg: 20px;
    --gap-md: 16px;
    --gap-sm: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text-strong);
    font-family: "Noto Sans KR", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.5;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
}

.section {
    padding: 20px 0;
}

/* 헤더 */
.section-support-header h1 {
    margin: 0 0 12px 0;
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
}

.section-support-header h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
}

/* FAQ 카테고리 */
.faq-category {
    display: grid;
    width: 600px;
    /* 기본 설정: 자식 요소의 크기에 맞춰 자동으로 열을 생성 (1행 배치) */
    grid-template-columns: repeat(auto-fit, minmax(100px, auto));
    gap: 8px;
    padding: 0 0 12px 0;
}

.faq-category__btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all .15s ease;
    text-align: center;
    /* Grid 셀 안에서 텍스트 중앙 정렬 */
}

.faq-category__btn:hover {
    border-color: var(--brand);
    color: var(--text-strong);
}

.faq-category__btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(18, 128, 237, 0.25);
}

.faq-category__btn--active {
    background: var(--brand);
    border-color: var(--brand);
    color: #f7fafc;
}

/* 1. 640px 이하: 3열(3컬럼) 배치 */
@media (max-width: 640px) {
    .faq-category {
        width:inherit;
        grid-template-columns: repeat(3, 1fr);
        /* 정확히 3등분 */
    }

    .faq-category__btn {
        font-size: 12px;
        /* 좁은 공간 대응 */
        padding: 0 5px;
    }
}

/* 2. 480px 이하: 2열(2컬럼) 배치 */
@media (max-width: 480px) {
    .faq-category {
        width: inherit;
        grid-template-columns: repeat(2, 1fr);
        /* 정확히 2등분 */
    }

    .faq-category__btn {
        font-size: 13px;
        /* 공간 확보 시 폰트 복구 */
    }
}

/* FAQ 리스트 */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 16px;
}

.faq-item.is-open {
    border-color: rgba(18, 128, 237, 0.45);
}

.faq-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    cursor: pointer;
}

.faq-q {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.faq-toggle {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    transition: transform .22s ease;
}

.faq-toggle svg {
    display: block;
    width: 100%;
    height: 100%;
}

.faq-toggle.is-open {
    transform: rotate(180deg);
}

/* 답변: 텍스트 + 슬라이드 */
.faq-a {
    margin: 0 0 0 0;
    font-size: 14px;
    color: var(--text-muted);

    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 320ms ease, opacity 220ms ease, transform 320ms ease;
    will-change: max-height, opacity, transform;
}

.faq-item.is-open .faq-a {
    opacity: 1;
    transform: translateY(0);
}

/* 카테고리 필터 */
.faq-item.is-hidden {
    display: none;
}

/* Fade Up */
.motion-fade-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 520ms ease, transform 520ms ease;
    will-change: opacity, transform;
}

.motion-fade-up.is-inview {
    opacity: 1;
    transform: translateY(0);
}

/* 폼 */
.form-grid {
    max-width: 480px;
    display: grid;
    gap: 16px;
}

.form-grid p {
    margin: 0;
}

.form-field {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--text-muted);
}

/* 메시지 textarea 부모(label) 가득 + 리사이즈 금지 */
.form-grid label[aria-label="메시지"] {
    display: block;
    /* label이 폭을 가짐 */
    width: 100%;
}

.form-textarea {
    display: block;
    width: 100%;
    /* 부모(label) 가득 채움 */
    box-sizing: border-box;
    resize: none;
    /* 사용자 크기조절 금지 */
    font-family: inherit;
    font-size: inherit;
    /* 기존 유지(필요하면 그대로 두면 됨) */
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 144px;
    padding: 12px 16px;
    color: var(--text-strong);
}

.send-row {
    padding: 12px 0;
}


.send-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 84px;
    padding: 0 16px;
    border-radius: var(--radius);
    background: var(--brand);
    color: #f7fafc;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;

    border: 0;
    cursor: pointer;

    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
    will-change: transform, filter;
}

.send-button:visited {
    color: #f7fafc;
}

.send-button:hover {
    transform: translateY(-2px);
    filter: brightness(0.98);
    box-shadow: 0 10px 22px rgba(13, 20, 28, 0.14);
}

.send-button:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(13, 20, 28, 0.12);
}

.send-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(18, 128, 237, 0.25), 0 10px 22px rgba(13, 20, 28, 0.14);
}

/* 대체 연락 수단 */
.alt-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 640px) {
    .alt-grid {
        grid-template-columns: 1fr;
    }
}


.alt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 17px;
    display: flex;
    flex-direction: column;
    gap: 12px;

    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    will-change: transform;
}

.alt-card svg {
    width: 24px;
    height: 24px;
}

.alt-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.alt-desc {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.alt-card:hover {
    transform: translateY(-2px);
    border-color: rgba(18, 128, 237, 0.35);
    box-shadow: 0 10px 22px rgba(13, 20, 28, 0.12);
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.form-consent input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.form-consent__link {
    margin-left: 8px;
    text-decoration: underline;
    cursor: pointer;
}

/* 에러 문구 */
.form-error {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.35;
    color: #d32f2f;
    display: none;
}

/* 에러 활성화 */
.form-error.is-visible {
    display: block;
}

/* 동의 라인 */
.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.4;
}

/* 체크박스 크게 */
.form-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--color-pointColor);
}

/* (필수) strong 대신 */
.form-consent__required {
    display: inline-block;
    border-radius: 6px;
    font-size: 16px;
    background: rgba(211, 47, 47, 0.12);
    color: #d32f2f;
}

/* 내용보기 링크 */
.form-consent__link {
    margin-left: 8px;
    text-decoration: underline;
    cursor: pointer;
}

.faq-a p {
    min-height: 1.2em;
}