/* ===== BPF 구매 신청 — 공통 변수 ===== */
:root {
    --brand: #333333;
    --brand-tint: rgba(51,51,51,.08);
    --bg-tint: rgba(51,51,51,.07);
    --ink: #1c1e21;
    --ink-2: #5c616b;
    --ink-3: #9aa0aa;
    --line: #e4e6ea;
    --error: #d4503b;
    --success: #1d9e6f;
    --radius: 14px;
    --hero-h: 280px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #fff; }
body {
    font-family: 'AppleSDGothicNeo', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-tint);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.2px;
    word-break: keep-all;
}

/* ===== HERO 배너 ===== */
.hero {
    height: var(--hero-h);
    background: var(--brand);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}
.hero-inner { max-width: 680px; }
.hero .logo {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: #fff;
    margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    overflow: hidden;
}
.hero .logo:empty { display: none; }
.hero .logo img { width: 100%; height: 100%; object-fit: contain; }
.hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.35; }
.hero p  { margin-top: 10px; font-size: 15px; opacity: .92; }

/* ===== 콘텐츠 컨테이너 ===== */
.container { max-width: 680px; margin: 0 auto; padding: 32px 20px 80px; }
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 26px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(28,30,33,.03);
}

/* ===== 섹션 타이틀 ===== */
.sec-title {
    font-size: 18px; font-weight: 700; margin-bottom: 18px;
    display: flex; align-items: center; gap: 8px;
}
.sec-title .num {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--brand); color: #fff;
    font-size: 13px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    flex: none;
}

/* ===== 필드 ===== */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
label.f-label {
    display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
    margin-bottom: 7px;
}
label.f-label .req { color: var(--error); margin-left: 2px; }

/* 툴팁 */
.tip {
    display: inline-flex; width: 16px; height: 16px; border-radius: 50%;
    border: 1px solid var(--ink-3); color: var(--ink-3); font-size: 11px;
    align-items: center; justify-content: center; margin-left: 1px;
    cursor: help; position: relative; vertical-align: -2px; font-style: normal;
}
.tip:hover::after, .tip:focus::after {
    content: attr(data-tip);
    position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%);
    background: var(--ink); color: #fff; font-size: 12px; font-weight: 400;
    line-height: 1.5; padding: 8px 11px; border-radius: 8px;
    white-space: pre-line; width: max-content; max-width: 240px;
    z-index: 10; letter-spacing: 0;
}

input[type=text], input[type=tel], input[type=email], textarea {
    width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
    padding: 13px 14px; font: inherit; font-size: 15.5px; color: var(--ink);
    background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
input.err, textarea.err { border-color: var(--error); }

.f-err {
    display: none; margin-top: 6px; font-size: 13px; color: var(--error);
    align-items: flex-start; gap: 4px;
}
.f-err::before { content: "⚠"; flex: none; }
.f-err.on { display: flex; }
.f-help { margin-top: 6px; font-size: 13px; color: var(--ink-3); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ===== 구매 목적 체크박스 ===== */
.chk-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chk-pill { position: relative; }
.chk-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chk-pill span {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1.5px solid var(--line); border-radius: 999px;
    padding: 9px 16px; font-size: 14.5px; color: var(--ink-2);
    cursor: pointer; user-select: none; background: #fff;
    transition: all .15s;
}
.chk-pill span::before {
    content: ""; width: 16px; height: 16px; border-radius: 4px;
    border: 1.5px solid var(--ink-3); background: #fff; flex: none;
    transition: all .15s;
}
.chk-pill input:checked + span {
    border-color: var(--brand); color: var(--brand);
    background: var(--brand-tint); font-weight: 600;
}
.chk-pill input:checked + span::before {
    background: var(--brand); border-color: var(--brand);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.5 11.2 3.3 8l1.1-1.1 2.1 2.1 5.1-5.1L12.7 5z'/%3E%3C/svg%3E");
    background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.chk-pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ===== 상품 카드 ===== */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.prod-card { position: relative; }
.prod-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.prod-card .p-body {
    display: block; border: 1.5px solid var(--line); border-radius: 12px;
    overflow: hidden; cursor: pointer; background: #fff; transition: all .15s;
}
.prod-card .p-img {
    aspect-ratio: 4/3; background: #eceef1;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-3); font-size: 12px;
}
.prod-card .p-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-card .p-img .ph {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.prod-card .p-img .ph svg { opacity: .45; }
.prod-card .p-name {
    padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--ink-2);
    display: flex; align-items: center; gap: 6px;
}
.prod-card .p-name::after {
    content: ""; width: 15px; height: 15px; border-radius: 4px;
    border: 1.5px solid var(--ink-3); margin-left: auto; flex: none; transition: all .15s;
}
.prod-card input:checked + .p-body {
    border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}
.prod-card input:checked + .p-body .p-name { color: var(--brand); }
.prod-card input:checked + .p-body .p-name::after {
    background: var(--brand); border-color: var(--brand);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.5 11.2 3.3 8l1.1-1.1 2.1 2.1 5.1-5.1L12.7 5z'/%3E%3C/svg%3E");
    background-size: 13px; background-position: center; background-repeat: no-repeat;
}
.prod-card input:focus-visible + .p-body { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ===== 개인정보 동의 ===== */
.agree-box {
    border: 1.5px solid var(--line); border-radius: 12px;
    padding: 16px 18px; background: #fafbfc;
}
.agree-box ul {
    margin: 0 0 12px; padding-left: 0; list-style: none;
    font-size: 13.5px; color: var(--ink-2);
}
.agree-box li { margin-bottom: 4px; padding-left: 14px; position: relative; }
.agree-box li::before { content: "·"; position: absolute; left: 2px; color: var(--ink-3); }
.agree-chk {
    display: flex; align-items: center; gap: 9px;
    font-size: 15px; font-weight: 600; cursor: pointer;
}
.agree-chk input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }

/* ===== 더미 reCAPTCHA ===== */
.captcha-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    margin: 6px 0 18px;
}
.captcha-box {
    width: 304px; height: 78px;
    background: #f9f9f9; border: 1px solid #d3d3d3; border-radius: 3px;
    box-shadow: 0 0 4px 1px rgba(0,0,0,.08);
    display: flex; align-items: center; padding: 0 12px;
    font-family: Roboto, 'Pretendard Variable', sans-serif;
    user-select: none;
}
.captcha-box .c-chk {
    width: 28px; height: 28px; flex: none;
    border: 2px solid #c1c1c1; border-radius: 2px; background: #fff;
    cursor: pointer; position: relative;
    transition: border-color .15s;
    display: flex; align-items: center; justify-content: center;
}
.captcha-box .c-chk:hover { border-color: #b2b2b2; }
.captcha-box .c-chk:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.captcha-box.checking .c-chk { border-color: transparent; }
.captcha-box.checking .c-chk::after {
    content: ""; width: 22px; height: 22px; border-radius: 50%;
    border: 3px solid #d3d3d3; border-top-color: #4a90e2;
    animation: bpf-spin .7s linear infinite;
}
.captcha-box.checked .c-chk { border-color: transparent; }
.captcha-box.checked .c-chk::after {
    content: ""; width: 24px; height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23009e55' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.captcha-box .c-label { margin-left: 12px; font-size: 14px; color: #282828; cursor: pointer; }
.captcha-box .c-logo {
    margin-left: auto; text-align: center; flex: none;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.captcha-box .c-logo .c-mark {
    width: 32px; height: 32px; border-radius: 50%;
    background: conic-gradient(#4a90e2 0 33%, #1aa260 33% 66%, #989898 66% 100%);
    -webkit-mask: radial-gradient(circle 9px at center, transparent 98%, #000 100%);
            mask: radial-gradient(circle 9px at center, transparent 98%, #000 100%);
}
.captcha-box .c-logo .c-name { font-size: 9px; color: #555; }
.captcha-box .c-logo .c-terms { font-size: 7px; color: #9aa0aa; }
.captcha-hint { font-size: 13px; color: var(--ink-3); }
.captcha-hint.ok { color: var(--success); }

/* ===== 제출 버튼 ===== */
.submit-area { margin-top: 8px; }
.btn-submit {
    width: 100%; border: 0; border-radius: 12px; padding: 17px;
    background: var(--brand); color: #fff;
    font: inherit; font-size: 17px; font-weight: 700;
    cursor: pointer; transition: filter .15s, opacity .15s;
    display: flex; align-items: center; justify-content: center; gap: 9px;
}
.btn-submit:hover:not(:disabled) { filter: brightness(.93); }
.btn-submit:disabled { opacity: .45; cursor: not-allowed; }
.btn-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.spinner {
    width: 17px; height: 17px; border-radius: 50%;
    border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
    animation: bpf-spin .7s linear infinite; display: none;
}
.btn-submit.loading .spinner { display: inline-block; }
@keyframes bpf-spin { to { transform: rotate(360deg); } }
.submit-note { margin-top: 10px; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ===== 제출 실패 배너 ===== */
.fail-banner {
    display: none; margin-bottom: 14px; border-radius: 10px;
    background: #fdf0ee; border: 1px solid #f3c9c2; color: var(--error);
    padding: 13px 16px; font-size: 14px;
}
.fail-banner.on { display: block; }

/* ===== 완료 패널 ===== */
.done-panel {
    display: none; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 60px 30px; text-align: center;
    box-shadow: 0 1px 2px rgba(28,30,33,.03);
}
.done-panel.on { display: block; animation: bpf-fade-up .4s ease both; }
@keyframes bpf-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
.done-icon {
    width: 64px; height: 64px; border-radius: 50%;
    margin: 0 auto 22px;
    background: var(--brand-tint);
    display: flex; align-items: center; justify-content: center;
}
.done-icon svg { width: 32px; height: 32px; }
.done-panel h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 14px; }
.done-panel .d-sub { font-size: 15.5px; color: var(--ink-2); margin-bottom: 6px; }
.done-panel .d-close { font-size: 14px; color: var(--ink-3); margin-top: 18px; }

/* ===== 푸터 ===== */
footer { text-align: center; padding: 0 20px 50px; font-size: 12.5px; color: var(--ink-3); }

/* ===== F02 서비스 종료 페이지 ===== */
.bpf-banner {
    position: relative;
    height: 220px;
    background: var(--brand);
    background-size: cover;
    background-position: center;
}
.bpf-banner::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55));
}
.bpf-banner__inner {
    position: relative; z-index: 1;
    max-width: 720px; height: 100%;
    margin: 0 auto; padding: 0 24px;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center; gap: 14px;
    text-align: center;
}
.bpf-banner__logo {
    width: 56px; height: 56px; border-radius: 14px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px; color: var(--brand);
    box-shadow: 0 4px 14px rgba(0,0,0,.25); overflow: hidden;
}
.bpf-banner__logo img { width: 100%; height: 100%; object-fit: contain; }
.bpf-banner__brand {
    color: #fff; font-size: 26px; font-weight: 700; letter-spacing: -0.5px;
}
.bpf-banner__sub { color: rgba(255,255,255,.85); font-size: 14px; }
.bpf-main {
    flex: 1; display: flex;
    align-items: flex-start; justify-content: center;
    padding: 56px 24px 80px;
}
.bpf-closed {
    width: 100%; max-width: 520px;
    background: #fff; border: 1px solid var(--line);
    border-radius: 20px; padding: 56px 40px 48px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(20,30,50,.06);
    margin-top: -64px; position: relative; z-index: 2;
}
.bpf-closed__icon {
    width: 88px; height: 88px; margin: 0 auto 28px; border-radius: 50%;
    background: var(--brand-tint);
    display: flex; align-items: center; justify-content: center;
}
.bpf-closed__icon svg { width: 44px; height: 44px; stroke: var(--brand); }
.bpf-closed__title {
    font-size: 24px; font-weight: 700; color: var(--ink);
    letter-spacing: -0.5px; margin-bottom: 14px;
}
.bpf-closed__desc { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.bpf-closed__divider { width: 40px; height: 1px; background: var(--line); margin: 26px auto; }
.bpf-closed__contact { font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.bpf-footer {
    padding: 28px 24px; text-align: center;
    font-size: 12px; color: var(--ink-3);
    border-top: 1px solid var(--line); background: #fff;
}

/* ===== 반응형 ===== */
@media (max-width: 560px) {
    :root { --hero-h: 220px; }
    .hero h1 { font-size: 22px; }
    .hero p  { font-size: 13.5px; }
    .container { padding: 24px 14px 60px; }
    .card { padding: 22px 18px; }
    .grid2 { grid-template-columns: 1fr; }
    .prod-grid { grid-template-columns: repeat(2, 1fr); }
    .captcha-box { transform: scale(.92); transform-origin: center; }
    .bpf-banner { height: 180px; }
    .bpf-banner__brand { font-size: 22px; }
    .bpf-banner__logo { width: 48px; height: 48px; }
    .bpf-main { padding: 40px 16px 64px; }
    .bpf-closed { padding: 44px 24px 40px; margin-top: -52px; border-radius: 16px; }
    .bpf-closed__icon { width: 72px; height: 72px; margin-bottom: 22px; }
    .bpf-closed__icon svg { width: 36px; height: 36px; }
    .bpf-closed__title { font-size: 20px; }
    .bpf-closed__desc { font-size: 15px; }
}
