/* Hi-Care 사용자 페이지 디자인 시스템 - 모바일 전용, max-width 430px */
:root {
    --brand: #1565C0;
    --brand-700: #0E4E97;
    --brand-50: #E8F0FB;
    --brand-100: #D6E4F7;
    --ink: #0F1B2D;
    --ink-2: #3B4A60;
    --ink-3: #6B7790;
    --ink-4: #9AA5B9;
    --line: #E5EAF2;
    --line-2: #EEF1F6;
    --bg: #F4F6FA;
    --card: #FFFFFF;
    --success: #1FA971;
    --success-50: #E6F6EE;
    --warn: #E07C2A;
    --warn-50: #FDF1E3;
    --danger: #C84141;
    --danger-50: #FBECEC;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Pretendard', ui-sans-serif, system-ui, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
    letter-spacing: -0.01em;
    min-height: 100vh;
    min-height: 100dvh;
}

.user-shell {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

.user-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 22px 16px;
}

.user-body::-webkit-scrollbar { display: none; }

/* 하단 CTA(dock)가 있는 화면은 셸을 뷰포트 높이에 고정 → 본문만 내부 스크롤,
   dock은 스크롤과 무관하게 하단 고정. 본문과 dock은 별도 영역이라 겹치지 않음.
   dock이 없는 화면(소개 메인·리포트 등)은 기존 문서 스크롤 그대로 유지. */
.user-shell:has(.dock) {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
}

.user-shell:has(.dock) .user-body,
.user-shell:has(.dock) .err-wrap {
    min-height: 0;
}

/* dock 화면 공통 푸터 위치 통일 — 본문을 flex 컬럼으로 두고 푸터를 하단(CTA 바로 위)에 정렬.
   콘텐츠가 짧아도 푸터가 화면 중간에 뜨지 않고, 길면 margin-top:auto가 무력화돼 콘텐츠 바로 아래에 붙음.
   랜딩(lp-body)은 자체 레이아웃이라 제외. */
.user-shell:has(.dock) .user-body:not(.lp-body) {
    display: flex;
    flex-direction: column;
}
.user-shell:has(.dock) .user-body:not(.lp-body) > .site-footer {
    margin-top: auto;
}

/* ---------- App bar ---------- */
.appbar {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 8px 14px;
    flex-shrink: 0;
}

.appbar .iconbtn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    font-size: 20px;
    cursor: pointer;
    text-decoration: none;
}

.appbar .title {
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    margin-left: -4px;
}

.appbar .spacer { flex: 1; }

/* ---------- Dock (bottom CTA) ---------- */
.dock {
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
    flex-shrink: 0;
    background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0));
}

.dock-pair {
    display: grid;
    grid-template-columns: 1fr 4fr;
    gap: 10px;
}

/* ---------- Buttons ---------- */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 56px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: transform .12s ease, background-color .12s ease;
    text-decoration: none;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-primary:active { transform: scale(.98); }

.btn-disabled,
.btn[disabled] {
    background: #E5EAF2;
    color: #A6B0C2;
    cursor: not-allowed;
}

.btn-ghost {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

/* ---------- Typography ---------- */
.page-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin: 6px 2px 10px;
}

.page-sub {
    font-size: 14px;
    color: var(--ink-3);
    margin: 0 2px 24px;
    line-height: 1.6;
}

/* ---------- Round checkbox (form primitive) ---------- */
.ck-round {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #D2D9E4;
    background: #fff;
    flex-shrink: 0;
    box-sizing: border-box;
    display: inline-block;
    vertical-align: middle;
    transition: background-color .15s ease, border-color .15s ease;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23B7C0CE' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5,8.5 6.8,11.6 12.5,5.4'/></svg>");
    background-size: 14px 14px;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.ck-round.is-on {
    background-color: var(--brand);
    border-color: var(--brand);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5,8.5 6.8,11.6 12.5,5.4'/></svg>");
}

/* ---------- Form primitives ---------- */
.field + .field { margin-top: 18px; }

.field-label {
    font-size: 13px;
    color: var(--ink-2);
    font-weight: 700;
    margin: 0 4px 8px;
}

.input {
    width: 100%;
    height: 54px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0 16px;
    font-family: inherit;
    font-size: 16px;
    color: var(--ink);
    outline: none;
}

.input::placeholder { color: #9AA5B9; }

.input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(21, 101, 192, .10);
}

.input.is-invalid {
    border-color: #E0414A;
    box-shadow: 0 0 0 4px rgba(224, 65, 74, .08);
}

.field-error {
    font-size: 12.5px;
    color: #E0414A;
    margin: 6px 4px 0;
    font-weight: 500;
    line-height: 1.4;
    display: none;
}

.field-error.is-show { display: block; }

/* ---------- Info card ---------- */
.info-card {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: var(--brand-50);
}

.info-card .ico {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.info-card .t {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-700);
    letter-spacing: -0.01em;
}

.info-card .d {
    font-size: 12px;
    color: var(--ink-2);
    margin-top: 2px;
    line-height: 1.5;
}

/* ---------- Phone row + carrier (Screen 4) ---------- */
.phone-row { display: flex; gap: 10px; }

.phone-row .carrier {
    flex-shrink: 0;
    width: 120px;
    height: 54px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 0 36px 0 14px;
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236B7790' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><polyline points='4,6 8,10 12,6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
}

.phone-row .carrier:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(21, 101, 192, .10);
}

/* ---------- Badges (Screen 2) ---------- */
.badge-req {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

.badge-opt {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #EEF1F6;
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 700;
}

/* ---------- Consent (Screen 2) ---------- */
.consent-master {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.consent-master .ttl {
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -0.02em;
    flex: 1;
}

.consent-master .prog {
    font-size: 12px;
    color: var(--ink-3);
    font-weight: 600;
    white-space: nowrap;
}

.consent-master .prog b {
    color: var(--brand);
    font-size: 13px;
}

.consent-list {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.consent-item {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 14px;
}

.consent-item-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.consent-item .t {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    flex: 1;
}

.consent-item .chev {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-4);
    font-size: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform .2s ease;
    padding: 0;
}

.consent-item.is-open .chev {
    transform: rotate(180deg);
}

.consent-item-body {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line-2);
    font-size: 12.5px;
    color: var(--ink-2);
    line-height: 1.7;
    max-height: 360px;
    overflow-y: auto;
}

.consent-item-body p { margin: 0 0 4px; }
.consent-item-body table { margin: 6px 0 8px; }
.consent-item-body strong { color: var(--ink); }

.consent-item.is-open .consent-item-body {
    display: block;
}

.consent-item-body h4 {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-2);
    margin: 8px 0 4px;
    letter-spacing: -0.01em;
}

.consent-item-body h4:first-child { margin-top: 0; }

.consent-item-body ul {
    margin: 0 0 4px;
    padding-left: 16px;
}

.consent-item-body li { margin-bottom: 2px; }

.divider-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 4px 12px;
    color: var(--ink-3);
    font-size: 12px;
}

.divider-label::before,
.divider-label::after {
    content: "";
    height: 1px;
    background: var(--line);
    flex: 1;
}

/* ---------- Auth method (Screen 3) ---------- */
.auth-list {
    display: grid;
    gap: 10px;
    margin-top: 2px;
}

.auth-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    cursor: pointer;
}

.auth-item.is-on {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(21, 101, 192, .06);
}

.auth-item .logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.02em;
    color: #fff;
    text-align: center;
    line-height: 1.1;
}

.auth-item .logo.kakao { background: #FEE500; color: #3C1E1E; font-size: 22px; }
.auth-item .logo.pass { background: #ED1C24; font-size: 13px; letter-spacing: .02em; }
.auth-item .logo.toss { background: #0064FF; font-size: 16px; font-family: 'Pretendard'; font-weight: 800; }
.auth-item .logo.naver { background: #03C75A; font-size: 24px; font-weight: 900; }

.auth-item .name {
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    flex: 1;
}

.auth-item .sub {
    font-size: 12px;
    color: var(--ink-3);
    margin-top: 2px;
}

/* ---------- Step cards (Screen 5) ---------- */
.step-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
}

.step-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px 10px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-card .ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--brand-50);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
    position: relative;
}

.step-card .ico .dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    border: 1.5px solid #fff;
}

.step-card .label {
    font-size: 11px;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: .05em;
    margin-bottom: 6px;
}

.step-card .t {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.acknowledge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 4px 4px;
    font-size: 13px;
    cursor: pointer;
    color: var(--ink-2);
}

/* ---------- Loading (Screen 6) ---------- */
.loading-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
}

.loading-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 18px;
    text-align: center;
}

.loading-bar {
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: #E5EAF2;
    overflow: hidden;
    position: relative;
}

.loading-bar::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    animation: hc-slide 1.8s ease-in-out infinite;
}

@keyframes hc-slide {
    0% { left: -40%; }
    100% { left: 100%; }
}

.loading-roll {
    position: relative;
    height: 22px;
    overflow: hidden;
    width: 100%;
    margin-top: 20px;
}

.loading-roll .item {
    position: absolute;
    left: 0;
    right: 0;
    font-size: 14px;
    color: var(--ink-3);
    line-height: 22px;
    text-align: center;
    animation: hc-rollOut 15s infinite;
    opacity: 0;
}

.loading-roll .item:nth-child(1) { animation-delay: 0s; }
.loading-roll .item:nth-child(2) { animation-delay: 3s; }
.loading-roll .item:nth-child(3) { animation-delay: 6s; }
.loading-roll .item:nth-child(4) { animation-delay: 9s; }
.loading-roll .item:nth-child(5) { animation-delay: 12s; }

/* 단일 항목(예: 그룹1) — 순환 애니메이션 없이 고정 표시 */
.loading-roll.is-static { height: auto; }
.loading-roll.is-static .item { position: static; animation: none; opacity: 1; transform: none; }

@keyframes hc-rollOut {
    0%   { opacity: 0; transform: translateY(14px); }
    2%   { opacity: 1; transform: translateY(0); }
    18%  { opacity: 1; transform: translateY(0); }
    20%  { opacity: 0; transform: translateY(-14px); }
    100% { opacity: 0; transform: translateY(-14px); }
}

.loading-foot {
    margin-top: 18px;
    font-size: 11.5px;
    color: var(--ink-4);
    line-height: 1.6;
}

/* ---------- Complete link (Screen 7 — alimtalk option) ---------- */
.complete-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 6px 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: #5C7FB0;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(92, 127, 176, .4);
}

.complete-link:hover {
    color: var(--brand);
    text-decoration-color: var(--brand);
}

.complete-link i { font-size: 12px; }

/* =================================================================== */
/* LANDING                                                              */
/* =================================================================== */
.lp-h {
    font-size: 27px;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin: 0 0 14px;
    text-wrap: balance;
}

.lp-h em {
    font-style: normal;
    color: var(--brand);
    position: relative;
}

.lp-h em::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 7px;
    background: rgba(21, 101, 192, .14);
    border-radius: 2px;
    z-index: -1;
}

.lp-sub {
    font-size: 14px;
    color: var(--ink-3);
    line-height: 1.6;
    margin: 0 0 22px;
}

.lp-promise {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 28px 22px 24px;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, .28) 0%, transparent 55%),
        linear-gradient(160deg, #2A82DC 0%, #1565C0 70%, #0E4E97 100%);
    color: #fff;
}

.lp-promise::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .12) 0%, transparent 70%);
}

.lp-promise-headline {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.35;
    margin: 0 0 18px;
    color: #fff;
    text-wrap: balance;
    position: relative;
    z-index: 1;
}

.lp-promise-headline em {
    font-style: normal;
    color: #FFE066;
}

.lp-promise-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    position: relative;
    z-index: 1;
}

.lp-pstat { text-align: left; }
.lp-pstat + .lp-pstat {
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, .12);
}

.lp-pstat .v {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.lp-pstat .v small {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, .6);
    margin-left: 1px;
}

.lp-pstat .l {
    font-size: 10.5px;
    color: rgba(255, 255, 255, .55);
    margin-top: 4px;
    font-weight: 500;
    letter-spacing: 0;
}

.lp-section-h {
    margin: 28px 2px 14px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.lp-steps {
    position: relative;
    padding-left: 28px;
}

.lp-steps::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 18px;
    width: 1.5px;
    background: linear-gradient(180deg, var(--brand) 0%, #E5EAF2 100%);
}

.lp-step {
    position: relative;
    padding-bottom: 18px;
}

.lp-step:last-child { padding-bottom: 0; }

.lp-step .n {
    position: absolute;
    left: -28px;
    top: 1px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--brand);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.lp-step.is-last .n {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.lp-step .t {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.015em;
}

.lp-step .d {
    margin-top: 4px;
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.5;
}

.lp-trust {
    margin: 26px 0 4px;
    padding: 10px 14px;
    background: #F4F6FA;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: var(--ink-3);
    line-height: 1.5;
}

.lp-trust i {
    color: var(--brand);
    font-size: 14px;
    flex-shrink: 0;
}

.lp-trust b {
    color: var(--ink-2);
    font-weight: 700;
}

/* Landing-specific body: white background, slightly different padding */
.user-body.lp-body {
    background: #fff;
    padding: 16px 22px 16px;
}

.user-body.lp-body + .dock {
    background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0));
}

/* =================================================================== */
/* COMPLETE                                                             */
/* =================================================================== */
.complete {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 8px 20px;
    flex: 1;
}

.success-simple {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--brand-50);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    animation: hc-pop .5s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes hc-pop {
    0%   { transform: scale(.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.complete h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 26px 0 10px;
    line-height: 1.3;
    text-wrap: balance;
}

.complete p {
    font-size: 14px;
    color: var(--ink-3);
    margin: 0 0 18px;
    line-height: 1.55;
    max-width: 280px;
}

/* =================================================================== */
/* UNAVAILABLE / ERROR                                                  */
/* =================================================================== */
.unavailable {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 8px 20px;
    flex: 1;
}

.unavailable .ico {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--warn-50);
    color: var(--warn);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
}

.unavailable h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 26px 0 10px;
    line-height: 1.3;
}

.unavailable p {
    font-size: 14px;
    color: var(--ink-3);
    margin: 0 0 18px;
    line-height: 1.55;
    max-width: 280px;
}

/* =================================================================== */
/* ERROR SCREENS (404 / 500 / Scrape Fail / NoRecord)                   */
/* =================================================================== */
.err-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 24px 12px;
    overflow: auto;
}

.err-wrap::-webkit-scrollbar { display: none; }

.err-illust {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #F4F6FA;
    color: var(--ink-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    margin-bottom: 20px;
    position: relative;
    flex-shrink: 0;
}

.err-illust.is-warn { background: var(--warn-50); color: var(--warn); }
.err-illust.is-fail { background: var(--danger-50); color: var(--danger); }

.err-illust .code {
    position: absolute;
    right: -8px;
    bottom: -4px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 800;
    color: var(--ink-2);
    letter-spacing: .02em;
}

.err-h {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.3;
    margin: 0 0 8px;
    text-wrap: balance;
}

.err-p {
    font-size: 13.5px;
    color: var(--ink-3);
    line-height: 1.55;
    margin: 0 0 18px;
    max-width: 280px;
}

/* ---------- Survey (Screen 7) ---------- */
.sv-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    margin: 0 2px 10px;
}

.sv-eyebrow i { font-size: 11px; }

.sv-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: -4px 2px 18px;
}

.sv-progress .bar {
    flex: 1;
    height: 5px;
    border-radius: 99px;
    background: #E5EAF2;
    overflow: hidden;
}

.sv-progress .bar > span {
    display: block;
    height: 100%;
    background: var(--brand);
    border-radius: 99px;
    transition: width .3s ease;
}

.sv-progress .pct {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.q-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px 16px 16px;
    margin-bottom: 12px;
}

.q-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.q-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--brand-50);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    margin-top: 1px;
}

.q-text { flex: 1; }

.q-text .ttl {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.4;
    color: var(--ink);
}

.q-text .hint {
    font-size: 11.5px;
    color: var(--ink-3);
    margin-top: 3px;
    line-height: 1.45;
    display: flex;
    align-items: center;
    gap: 5px;
}

.q-text .hint i { font-size: 10.5px; }

.q-radio { display: grid; gap: 8px; }
.q-radio.cols-2 { grid-template-columns: 1fr 1fr; }
.q-radio.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.q-opt {
    height: 46px;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2);
    font-family: inherit;
    cursor: pointer;
    padding: 0 6px;
    transition: border-color .12s ease, background-color .12s ease, color .12s ease;
}

.q-opt:hover { border-color: #C8D1E0; }

.q-opt.is-on {
    border-color: var(--brand);
    background: var(--brand-50);
    color: var(--brand);
    font-weight: 700;
}

.q-opt.is-on i { color: var(--brand); }

.q-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.q-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: #fff;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-2);
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.1;
    transition: border-color .12s ease, background-color .12s ease, color .12s ease;
}

.q-chip i { font-size: 11px; color: var(--ink-4); }
.q-chip:hover { border-color: #C8D1E0; }

.q-chip.is-on {
    border-color: var(--brand);
    background: var(--brand-50);
    color: var(--brand);
    font-weight: 700;
}

.q-chip.is-on i { color: var(--brand); }
.q-chip.is-none { font-weight: 700; }

.q-chip.is-none.is-on {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.q-chip.is-none.is-on i { color: #fff; }

.q-foot-note {
    margin: 4px 2px 0;
    padding: 10px 12px;
    background: #F4F6FA;
    border-radius: 10px;
    font-size: 11.5px;
    color: var(--ink-3);
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.q-foot-note i {
    color: var(--ink-3);
    font-size: 13px;
    margin-top: 1px;
    flex-shrink: 0;
}

/* =================================================================== */
/* HOME (서비스 소개 메인 — 루트 /)                                      */
/* =================================================================== */
/* 서비스 소개 상단 헤더 — 브랜드 바 (소개 메인 전용) */
.home-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--line-2);
    flex-shrink: 0;
}

.home-header .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -0.02em;
}

.home-header .brand .mark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1565C0 0%, #2A82DC 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08);
}

.home-header .tagline {
    padding-left: 10px;
    border-left: 1px solid var(--line);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-3);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

/* 참여 방법 강조 배너 (상단) — 전용 링크 안내를 눈에 띄게 */
.home-notice {
    margin: 18px 0 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    text-align: center;
}

.home-notice .t {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--brand-700);
    line-height: 1.5;
}

.home-notice .t b { font-weight: 800; color: var(--brand); }

/* 서비스 소개 스플래시 — 참여 랜딩과 구분되는 중앙 정렬 브랜드 + 라이트 통계 스트립 */
.home-hero {
    text-align: center;
    padding: 28px 8px 4px;
}

.home-hero .hh-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin: 0 0 10px;
    text-wrap: balance;
}

.home-hero .hh-sub {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ink-3);
    margin: 0;
}

/* 라이트 통계 스트립 (흰 카드 · 브랜드 숫자) */
.home-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 4px;
    margin: 20px 0 6px;
}

.home-stat {
    text-align: center;
    position: relative;
}

.home-stat + .home-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: var(--line);
}

.home-stat .v {
    font-size: 23px;
    font-weight: 800;
    color: var(--brand);
    letter-spacing: -0.025em;
    font-variant-numeric: tabular-nums;
}

.home-stat .v small {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
    margin-left: 2px;
}

.home-stat .l {
    font-size: 11.5px;
    color: var(--ink-3);
    margin-top: 3px;
    font-weight: 500;
}

/* 공용 사이트 풋터 — 좌측 정렬·아코디언형 사업자 정보 (소개 메인·참여 플로우 공용) */
.site-footer {
    margin-top: 24px;
    padding: 16px 0 4px;
    border-top: 1px solid var(--line);
}

.site-footer .hf-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
}

.site-footer .hf-link {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.site-footer .hf-link:hover { color: var(--brand); }
.site-footer .hf-links .sep { color: var(--ink-4); }

.site-footer .hf-toggle {
    margin-top: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    text-align: left;
}

.site-footer .hf-toggle i {
    margin-left: auto;
    font-size: 13px;
    color: var(--ink-4);
    transition: transform .2s ease;
}

.site-footer .hf-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

.site-footer .hf-info {
    margin-top: 10px;
}

/* hidden 속성이 덮이지 않도록 명시적 우선 규칙 (기본 닫힘) */
.site-footer .hf-info[hidden] { display: none; }

.site-footer .hf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    line-height: 1.45;
    border: 1px solid var(--line);
}

.site-footer .hf-table th,
.site-footer .hf-table td {
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}

.site-footer .hf-table th {
    width: 40%;
    color: var(--ink);
    font-weight: 600;
    background: #FAFBFD;
}

.site-footer .hf-table td { color: var(--ink-2); }

.site-footer .hf-table tr + tr th,
.site-footer .hf-table tr + tr td {
    border-top: 1px solid var(--line-2);
}

.site-footer .hf-copy {
    margin-top: 4px;
    font-size: 10.5px;
    color: var(--ink-4);
}

/* 약관·처리방침 전문 페이지 본문 */
.legal-doc {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-2);
}

.legal-doc p { margin: 0; }
.legal-doc strong { color: var(--ink); }
.legal-doc table { margin: 6px 0; }

/* 약관·개인정보 레이어 창 (바텀시트형, 430px 중앙 컬럼 폭) */
.legal-layer {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.legal-layer[hidden] { display: none; }

.legal-layer .legal-scrim {
    position: absolute;
    inset: 0;
    background: rgba(15, 27, 45, .45);
    animation: fadeIn .2s ease;
}

.legal-layer .legal-sheet {
    position: relative;
    width: 100%;
    max-width: 430px;
    max-height: 88dvh;
    background: #fff;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: sheetUp .25s cubic-bezier(.2, .9, .3, 1.1);
}

@keyframes sheetUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.legal-layer .legal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.legal-layer .legal-close {
    background: none;
    border: none;
    padding: 4px;
    font-size: 17px;
    color: var(--ink-3);
    cursor: pointer;
    line-height: 1;
}

.legal-layer .legal-body {
    overflow-y: auto;
    padding: 16px 18px calc(20px + env(safe-area-inset-bottom));
}

/* 알림톡 발송 완료 바텀시트 내용 */
.legal-sheet .done-sheet {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px calc(24px + env(safe-area-inset-bottom));
}

.legal-sheet .done-sheet h3 {
    margin: 18px 0 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.legal-sheet .done-sheet p {
    margin: 0 0 28px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-3);
}

/* 분석 영역 카드 목록 (5개 리포트 영역) */
.lp-feats {
    display: grid;
    gap: 10px;
}

.lp-feat {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}

.lp-feat .ico {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.lp-feat .ico.b { background: var(--brand-50); color: var(--brand); }
.lp-feat .ico.g { background: var(--success-50); color: var(--success); }
.lp-feat .ico.o { background: var(--warn-50); color: var(--warn); }
.lp-feat .ico.r { background: var(--danger-50); color: var(--danger); }
.lp-feat .ico.p { background: #F0EBFA; color: #7A4FD1; }

.lp-feat .t {
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.lp-feat .d {
    font-size: 12.5px;
    color: var(--ink-3);
    margin-top: 2px;
    line-height: 1.4;
}
