/* =============================================================================
   문자 재판매 플랫폼 - 공통 스타일
   CDN 의존 없이 동작하도록 자체 작성한다.
   ========================================================================== */

:root {
    --brand:        #5B5BD6;
    --brand-dark:   #4747B8;
    --brand-light:  #EEF0FF;
    --accent:       #7C6BFF;

    --ink:          #12142B;
    --ink-2:        #3A3D5C;
    --muted:        #7A7F9A;
    --line:         #E6E8F0;

    --bg:           #FFFFFF;
    --bg-soft:      #F6F7FB;
    --bg-dark:      #14162B;

    --ok:           #12A150;
    --warn:         #C77700;
    --danger:       #D92D20;

    --radius:       14px;
    --radius-sm:    10px;
    --shadow:       0 1px 2px rgba(18,20,43,.04), 0 8px 24px rgba(18,20,43,.06);
    --shadow-lg:    0 12px 40px rgba(18,20,43,.10);
    --wrap:         1160px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
                 "Malgun Gothic", "맑은 고딕", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── 버튼 ────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }

.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ── 상단 네비게이션 ──────────────────────────────────────────────────── */

.gnb {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.88); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.gnb-inner { display: flex; align-items: center; gap: 36px; height: 68px; }

/* 로고 — 말풍선 심볼 + 글자.
   심볼은 currentColor 를 쓰므로 어두운 배경에서는 .logo 의 색만 바꾸면 따라온다 */
.logo {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 19px; font-weight: 800; letter-spacing: -0.03em;
    color: var(--ink); text-decoration: none;
}
.logo-sym {
    width: 1.32em; height: 1.32em; flex: none;
    color: var(--brand);            /* 심볼 배경색 */
    border-radius: 0.29em;
}
.logo-name { font-weight: inherit; letter-spacing: inherit; }
.logo span, .logo-name span { color: var(--brand); }

.gnb-menu { display: flex; gap: 28px; font-size: 15px; font-weight: 500; flex: 1; }
.gnb-menu a { color: var(--ink-2); padding: 6px 0; }
.gnb-menu a:hover, .gnb-menu a.on { color: var(--brand); }

.gnb-actions { display: flex; align-items: center; gap: 10px; }

/* ── 히어로 ──────────────────────────────────────────────────────────── */

.hero {
    background:
        radial-gradient(1000px 420px at 82% -8%, #EDE7FF 0%, rgba(237,231,255,0) 62%),
        radial-gradient(760px 380px at 8% 8%, #E8F0FF 0%, rgba(232,240,255,0) 58%),
        var(--bg-soft);
    padding: 76px 0 84px;
    overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }

.pill {
    display: inline-flex; align-items: center; gap: 7px;
    background: #fff; border: 1px solid var(--line); color: var(--brand);
    font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 46px; margin: 22px 0 18px; letter-spacing: -0.035em; line-height: 1.28;
}
.hero h1 em { font-style: normal; color: var(--brand); }

.hero-desc { color: var(--muted); font-size: 16px; margin-bottom: 30px; }

.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

.hero-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--ink-2); }
.hero-checks span::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: 6px; }

/* 목업 */
.phone {
    width: 280px; margin: 0 auto; background: #10121F; border-radius: 40px;
    padding: 12px; box-shadow: var(--shadow-lg);
}
.phone-screen { background: #F2F4F9; border-radius: 30px; padding: 18px 14px; min-height: 420px; }
.bubble {
    background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
    font-size: 13px; color: var(--ink-2); box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.bubble strong { display: block; font-size: 12px; color: var(--brand); margin-bottom: 4px; }

/* ── 지표 바 ─────────────────────────────────────────────────────────── */

.stats { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 26px 0; }
.stats-grid div + div { border-left: 1px solid var(--line); }
.stats dt { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.stats dd { margin: 0; font-size: 20px; font-weight: 700; }

/* ── 섹션 공통 ───────────────────────────────────────────────────────── */

.sec { padding: 92px 0; }
.sec.soft { background: var(--bg-soft); }
.sec.dark { background: var(--bg-dark); color: #fff; }

.sec-head { text-align: center; margin-bottom: 52px; }
.sec-tag {
    display: inline-block; color: var(--brand); font-size: 13px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px;
}
.sec-head h2 { font-size: 34px; letter-spacing: -0.035em; }
.sec-head p { color: var(--muted); margin-top: 14px; font-size: 16px; }

/* ── 카드 ────────────────────────────────────────────────────────────── */

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow);
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }

.card-ico {
    width: 42px; height: 42px; border-radius: 12px; background: var(--brand-light);
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
    font-size: 20px;
}

.tagline { color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 4px; }

/* 기능 그리드 (작은 아이템) */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feat {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 20px 18px;
}
.feat b { display: block; font-size: 15px; margin-bottom: 6px; }
.feat span { color: var(--muted); font-size: 13px; }

/* ── 단계 ────────────────────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step-no { color: var(--brand); font-weight: 800; font-size: 13px; margin-bottom: 10px; }
.step b { display: block; font-size: 16px; margin-bottom: 6px; }
.step span { color: var(--muted); font-size: 14px; }

/* ── 요금 ────────────────────────────────────────────────────────────── */

.price-box {
    background: linear-gradient(135deg, #1B1D33 0%, #262A4D 100%);
    border-radius: 20px; padding: 46px; color: #fff;
    display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center;
}
.price-box h2 { font-size: 30px; margin-bottom: 14px; }
.price-box p { color: #A9AECB; font-size: 15px; margin-bottom: 26px; }

.price-list { background: rgba(255,255,255,.06); border-radius: var(--radius); padding: 8px 20px; }
.price-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.08);
}
.price-row:last-child { border-bottom: 0; }
.price-row .nm { font-size: 15px; font-weight: 600; }
.price-row .nm small { display: block; color: #8E93B5; font-weight: 400; font-size: 12px; margin-top: 2px; }
.price-row .vl { font-size: 20px; font-weight: 700; color: #9BB4FF; }

/* ── FAQ ─────────────────────────────────────────────────────────────── */

.faq { max-width: 760px; margin: 0 auto; }
.faq details {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    margin-bottom: 10px; padding: 18px 22px;
}
.faq summary {
    cursor: pointer; font-weight: 600; font-size: 15px; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 20px; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* ── CTA ─────────────────────────────────────────────────────────────── */

.cta { text-align: center; padding: 80px 0; background: var(--bg-soft); }
.cta h2 { font-size: 32px; margin-bottom: 12px; }
.cta p { color: var(--muted); margin-bottom: 28px; }
.cta-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── 푸터 ────────────────────────────────────────────────────────────── */

.foot { background: #fff; border-top: 1px solid var(--line); padding: 46px 0 36px; }
.foot-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 30px; }
.foot-info { font-size: 13px; color: var(--muted); line-height: 1.9; }
.foot-tel { font-size: 24px; font-weight: 800; color: var(--ink); }
.foot-copy { border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; color: var(--muted); }

/* ── 반응형 ──────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
    .hero-grid, .price-box { grid-template-columns: 1fr; }
    .cards-3, .cards-4, .feat-grid, .steps, .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid div:nth-child(3) { border-left: 0; }
    .hero h1 { font-size: 34px; }
    .sec-head h2 { font-size: 26px; }
    .gnb-menu { display: none; }
    .sec { padding: 60px 0; }
}

@media (max-width: 560px) {
    .cards-3, .cards-4, .feat-grid, .steps, .stats-grid { grid-template-columns: 1fr; }
    .stats-grid div + div { border-left: 0; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
    .price-box { padding: 30px 24px; }
}

/* =============================================================================
   인증 화면 (로그인 / 회원가입)
   ========================================================================== */

.auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(800px 400px at 50% -10%, #EDE7FF 0%, rgba(237,231,255,0) 60%),
        var(--bg-soft);
}
.auth-box { width: 100%; max-width: 420px; }

.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head .logo { font-size: 24px; display: inline-block; margin-bottom: 8px; }
.auth-head p { color: var(--muted); font-size: 14px; }

.auth-card {
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    padding: 32px; box-shadow: var(--shadow);
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input, .select, .textarea {
    width: 100%; padding: 12px 14px; font-size: 14px; font-family: inherit;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,91,214,.12);
}
.textarea { resize: vertical; line-height: 1.6; }

.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

.auth-foot { text-align: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--brand); font-weight: 600; }

/* 알림 박스 */
.alert { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 14px; margin-bottom: 18px; }
.alert-ok   { background: #E9F8EF; border: 1px solid #BCE5CC; color: #0B6B37; }
.alert-err  { background: #FEF0EF; border: 1px solid #F5C9C6; color: #9B221B; }
.alert-warn { background: #FFF7E8; border: 1px solid #F3DDB0; color: #8A5A00; }
.alert ul { margin: 0; padding-left: 18px; }

/* =============================================================================
   서비스 화면 (로그인 후)
   ========================================================================== */

.app-body { background: var(--bg-soft); min-height: 100vh; }

/* 상단 바 */
.app-gnb { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.app-gnb-top { display: flex; align-items: center; gap: 30px; height: 62px; }
.app-gnb-menu { display: flex; gap: 4px; flex: 1; }
.app-gnb-menu a {
    padding: 9px 15px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--ink-2);
}
.app-gnb-menu a:hover { background: var(--bg-soft); color: var(--ink); }
.app-gnb-menu a.on { background: var(--brand-light); color: var(--brand); font-weight: 600; }

.app-gnb-right { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.balance-chip {
    background: var(--brand-light); color: var(--brand); font-weight: 700;
    padding: 7px 14px; border-radius: 999px; font-size: 14px;
}
.linkbtn { background: none; border: 0; color: var(--muted); font-size: 14px; cursor: pointer; font-family: inherit; padding: 0; }
.linkbtn:hover { color: var(--ink); }

/* 메뉴 글자가 두 줄로 깨지지 않게 */
.app-gnb-menu a, .app-gnb-right > * { white-space: nowrap; }
@media (max-width: 1240px) and (min-width: 961px) {
    .app-gnb-top { gap: 18px; }
    .app-gnb-menu { gap: 2px; }
    .app-gnb-menu a { padding: 9px 10px; font-size: 14.5px; }
}

/* 계정 메뉴 ('OOO님' 클릭) */
.me-menu { position: relative; }
.me-menu > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 10px; margin: 0 -10px; border-radius: 9px; user-select: none;
}
.me-menu > summary::-webkit-details-marker { display: none; }
.me-menu > summary:hover, .me-menu[open] > summary { background: var(--bg-soft); color: var(--ink); }
.me-caret { width: 12px; height: 12px; transition: transform .18s ease; }
.me-menu[open] .me-caret { transform: rotate(180deg); }
.me-drop {
    position: absolute; top: calc(100% + 8px); right: -10px; min-width: 188px; z-index: 60;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
    padding: 6px; display: flex; flex-direction: column;
    animation: fadeUp .16s ease-out both;
}
.me-drop a {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
    font-size: 14px; color: var(--ink-2); text-decoration: none;
}
.me-drop a .ico { width: 17px; height: 17px; color: var(--muted); flex: none; }
.me-drop a:hover, .me-drop a.on { background: var(--bg-soft); color: var(--ink); }
.me-drop a:hover .ico, .me-drop a.on .ico { color: var(--brand); }
.me-drop em {
    margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: #fff;
    background: var(--danger); border-radius: 999px; padding: 2px 7px; line-height: 1.4;
}
.me-drop .me-drop-admin { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; padding-top: 12px; color: var(--brand); font-weight: 600; }
.me-drop .me-drop-admin .ico { color: var(--brand); }

@media (max-width: 560px) {
    .gnb-actions .gnb-admin { display: none; }   /* 한 줄에 안 들어감 — 내 서비스 > 하위 메뉴에서 이동 */
}

/* 본문 */
.app-main { padding: 30px 0 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

.back-link { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.back-link:hover { color: var(--ink); }

/* 패널 */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.grid-2 > .panel + .panel, .grid-3 > .panel + .panel { margin-top: 0; }   /* 나란히 놓일 땐 칸 간격(gap)이 대신한다 */
.panel-head {
    padding: 18px 22px; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel-head h2 { font-size: 16px; }
.panel-body { padding: 22px; }
.panel-foot { padding: 16px 22px; border-top: 1px solid var(--line); }

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-eq { align-items: stretch; }   /* 나란한 카드 높이를 맞춘다 */

/* 통계 카드 */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px; box-shadow: var(--shadow);
}
.stat dt { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.stat dd { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat dd.brand { color: var(--brand); }
.stat dd.ok { color: var(--ok); }
.stat dd.danger { color: var(--danger); }

/* 테이블 */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
    background: var(--bg-soft); color: var(--muted); font-weight: 500; font-size: 13px;
    padding: 11px 18px; text-align: left; white-space: nowrap;
}
.tbl td { padding: 13px 18px; border-top: 1px solid var(--line); }
.tbl tbody tr:hover { background: #FAFBFE; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.tbl-scroll { overflow-x: auto; }

/* 뱃지 */
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-gray  { background: #EEF0F5; color: #5A6079; }
.badge-ok    { background: #E4F6EC; color: #0B6B37; }
.badge-warn  { background: #FFF2DC; color: #8A5A00; }
.badge-danger{ background: #FDE8E7; color: #9B221B; }
.badge-info  { background: #E7EEFF; color: #2A4BC0; }
.badge-brand { background: var(--brand-light); color: var(--brand); }

/* 빈 상태 */
.empty { padding: 56px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.empty a { color: var(--brand); font-weight: 600; }

/* 폼 보조 */
.radio-row { display: flex; gap: 18px; margin-bottom: 14px; }
.counter { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 7px; }
.counter b { color: var(--brand); }
.notice-list { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--muted); }
.notice-list li { padding: 3px 0; }
.notice-list li::before { content: "·"; margin-right: 6px; }

.sticky-side { position: sticky; top: 82px; }

.quick-amounts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.quick-amounts button {
    border: 1px solid var(--line); background: #fff; border-radius: 8px;
    padding: 7px 12px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--ink-2);
}
.quick-amounts button:hover { border-color: var(--brand); color: var(--brand); }

.kv { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }

.msg-preview {
    background: var(--bg-soft); border-radius: var(--radius-sm); padding: 16px;
    font-size: 14px; white-space: pre-wrap; line-height: 1.7;
}

.pager { padding: 16px 22px; border-top: 1px solid var(--line); }

@media (max-width: 960px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .app-gnb-menu { overflow-x: auto; }
    .sticky-side { position: static; }
}

/* =============================================================================
   추가 컴포넌트 — 통계 · 템플릿 · 알림 · 안내 페이지 · 오류 화면
   ========================================================================== */

/* ── 탭 ─────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; background: var(--bg-soft); padding: 4px; border-radius: var(--radius-sm); }
.tabs a {
    padding: 7px 14px; border-radius: 7px; font-size: 14px; font-weight: 500;
    color: var(--muted); white-space: nowrap;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: var(--shadow); }
.tab-badge {
    display: inline-block; margin-left: 5px; padding: 1px 6px; border-radius: 20px;
    background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
}

/* ── KPI 카드 ───────────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow);
}
.kpi dt { font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.kpi dd { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.kpi dd small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }

/* ── 막대 차트 ──────────────────────────────────────────────────────── */
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.legend .sw-ok   { background: var(--ok); }
.legend .sw-fail { background: var(--danger); }
.legend .sw-etc  { background: #C6CADB; }

.chart {
    display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    gap: 3px; height: 220px; align-items: end;
}
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 6px; }
.bar-stack {
    flex: 1; width: 100%; max-width: 30px; display: flex; flex-direction: column;
    justify-content: flex-end; border-radius: 4px; overflow: hidden; background: var(--bg-soft);
}
.bar-stack .sg { display: block; width: 100%; }
.bar-stack .ok   { background: var(--ok); }
.bar-stack .fail { background: var(--danger); }
.bar-stack .etc  { background: #C6CADB; }
.bar-col em {
    font-style: normal; font-size: 10px; color: var(--muted);
    white-space: nowrap; overflow: hidden;
}
.bar-col:hover .bar-stack { opacity: .82; }

/* ── 가로 미터 ──────────────────────────────────────────────────────── */
.meter + .meter { margin-top: 16px; }
.meter-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.meter-top span { color: var(--muted); font-size: 13px; }
.meter-bar { height: 9px; background: var(--bg-soft); border-radius: 20px; overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--brand); border-radius: 20px; }

/* ── 정의 목록 ──────────────────────────────────────────────────────── */
.deflist { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0; font-size: 14px; }
.deflist dt { color: var(--muted); padding: 10px 16px 10px 0; border-top: 1px solid var(--line); }
.deflist dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); text-align: right; }
.deflist dt:first-of-type, .deflist dd:first-of-type { border-top: 0; }

/* ── 템플릿 ─────────────────────────────────────────────────────────── */
.tpl-list { display: flex; flex-direction: column; gap: 14px; }
.tpl { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.tpl:hover { border-color: #CDD2E4; }
.tpl-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 8px; }
.tpl-top b { font-size: 15px; }
.tpl p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.tpl-act { display: flex; align-items: center; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
    padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 20px;
    font-size: 13px; font-family: inherit; color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--brand-light); border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* ── 알림 ───────────────────────────────────────────────────────────── */
.bell { position: relative; font-size: 17px; line-height: 1; text-decoration: none; }
.bell i {
    position: absolute; top: -7px; right: -9px; min-width: 17px; height: 17px;
    padding: 0 4px; border-radius: 20px; background: var(--danger); color: #fff;
    font-size: 10px; font-style: normal; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.me { color: var(--muted); }
.me:hover, .me.on { color: var(--ink); }

.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { border-top: 1px solid var(--line); }
.alert-list li:first-child { border-top: 0; }
.alert-list li.unread { background: #FBFCFF; }
.alert-list a { display: block; padding: 16px 22px; }
.alert-list a:hover { background: var(--bg-soft); }
.alert-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.alert-top b { font-size: 14px; }
.alert-list li.unread .alert-top b { color: var(--brand); }
.alert-top time { margin-left: auto; font-size: 12px; color: var(--muted); }
.alert-list p { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ── 앱 보조 메뉴 ───────────────────────────────────────────────────── */
.app-gnb-sub { border-top: 1px solid var(--line); background: var(--bg-soft); }
.app-gnb-sub .wrap { display: flex; gap: 18px; padding-top: 9px; padding-bottom: 9px; overflow-x: auto; }
.app-gnb-sub a { font-size: 13px; color: var(--muted); white-space: nowrap; }
.app-gnb-sub a:hover, .app-gnb-sub a.on { color: var(--brand); font-weight: 600; }
.sub-sep { width: 1px; height: 12px; background: var(--line); flex: none; align-self: center; }

/* ── 모바일 메뉴 토글 ───────────────────────────────────────────────── */
.gnb-toggle { display: none; }
.gnb-burger { display: none; cursor: pointer; padding: 8px; }
.gnb-burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.gnb-burger span + span { margin-top: 4px; }

/* ── 폼 보조 ────────────────────────────────────────────────────────── */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.note {
    background: var(--bg-soft); border-radius: var(--radius-sm); padding: 14px 16px;
    font-size: 13px; color: var(--ink-2); line-height: 1.8;
}

/* ── 요금 플랜 ──────────────────────────────────────────────────────── */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 920px; margin: 0 auto; }
.plan {
    position: relative; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 30px 26px; text-align: center; box-shadow: var(--shadow);
}
.plan.best { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.plan-flag {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
    padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}
.plan-code { font-size: 12px; font-weight: 700; color: var(--brand); letter-spacing: .08em; }
.plan h3 { margin: 4px 0 14px; font-size: 18px; }
.plan-price { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; }
.plan-price small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.plan-limit { color: var(--muted); font-size: 13px; margin-top: 4px; }
.plan ul { list-style: none; padding: 0; margin: 20px 0 0; text-align: left; }
.plan li { font-size: 14px; color: var(--ink-2); padding: 7px 0 7px 22px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

.calc-out {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--brand-light); border-radius: var(--radius-sm);
    padding: 18px 22px; margin: 6px 0 10px;
}
.calc-out span { font-size: 14px; color: var(--ink-2); }
.calc-out strong { font-size: 26px; font-weight: 800; color: var(--brand); letter-spacing: -0.02em; }

/* ── 이용안내 단계 ──────────────────────────────────────────────────── */
.guide-steps { max-width: 860px; margin: 0 auto; }
.gstep { display: flex; gap: 22px; padding: 26px 0; border-top: 1px solid var(--line); }
.gstep:first-child { border-top: 0; padding-top: 0; }
.gstep-no {
    flex: none; width: 46px; height: 46px; border-radius: 14px;
    background: var(--brand-light); color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px;
}
.gstep-body h3 { margin: 0 0 7px; font-size: 18px; }
.gstep-body > p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.8; }
.gstep-body ul { list-style: none; margin: 0; padding: 0; }
.gstep-body li {
    font-size: 14px; color: var(--muted); line-height: 1.8;
    padding-left: 15px; position: relative;
}
.gstep-body li::before { content: "·"; position: absolute; left: 3px; }

/* ── 오류 화면 ──────────────────────────────────────────────────────── */
.errpage {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg-soft); padding: 24px;
}
.errbox {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 52px 44px; text-align: center; max-width: 480px;
}
.errcode { font-size: 56px; font-weight: 800; color: var(--brand); letter-spacing: -0.04em; line-height: 1; }
.errbox h1 { margin: 16px 0 10px; font-size: 21px; }
.errbox p { margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.errbtns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── 반응형 ─────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
    .kpis { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
    .gnb-burger { display: block; }
    .gnb-menu, .app-gnb-menu { display: none; width: 100%; }
    .gnb-toggle:checked ~ .gnb-menu,
    .gnb-toggle:checked ~ .app-gnb-menu {
        display: flex; flex-direction: column; gap: 2px;
        padding: 10px 0 4px; border-top: 1px solid var(--line); margin-top: 10px;
    }
    .gnb-inner, .app-gnb-top { flex-wrap: wrap; }

    .kpis { grid-template-columns: repeat(2, 1fr); }
    .plan-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .chart { height: 170px; }
    .bar-col em { display: none; }
    .gstep { gap: 14px; }
    .deflist { grid-template-columns: 1fr; }
    .deflist dd { text-align: left; padding-top: 0; border-top: 0; }
    .deflist dt { padding-bottom: 3px; }
}

.linkbtn.danger { color: var(--danger); }
.linkbtn.danger:hover { color: #9B221B; }
.alert-info { background: #EEF3FF; border: 1px solid #C3D2F5; color: #2A4BC0; }

/* ── 2차 인증 ───────────────────────────────────────────────────────── */
.mfa-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 24px; letter-spacing: .28em; text-align: center;
}

.mfa-steps { margin: 0 0 22px; padding-left: 20px; }
.mfa-steps li { margin-bottom: 12px; line-height: 1.7; }
.mfa-steps li b { display: block; font-size: 15px; }
.mfa-steps li span { color: var(--muted); font-size: 13px; }

.qr { display: inline-block; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qr svg { display: block; width: 200px; height: 200px; }

.codes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.codes code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #fff; border: 1px solid var(--line); border-radius: 8px;
    padding: 10px 6px; text-align: center; font-size: 14px; letter-spacing: .04em;
}

@media (max-width: 860px) {
    .codes { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================================================
   마감 — 모션 · 접근성 · 반응형 보정
   여기 있는 규칙은 앞선 선언을 덮어쓰므로 파일 맨 끝에 둔다.
   ========================================================================== */

/* ── 모션 ───────────────────────────────────────────────────────────── */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 첫 화면은 바로 보이는 자리라 JS 없이 CSS 로만 띄운다 */
.hero-grid > div:first-child > * { animation: fadeUp .55s ease-out both; }
.hero-grid > div:first-child > *:nth-child(1) { animation-delay: .02s; }
.hero-grid > div:first-child > *:nth-child(2) { animation-delay: .08s; }
.hero-grid > div:first-child > *:nth-child(3) { animation-delay: .14s; }
.hero-grid > div:first-child > *:nth-child(4) { animation-delay: .20s; }
.hero-grid > div:first-child > *:nth-child(5) { animation-delay: .26s; }
.hero .phone { animation: fadeUp .7s .12s ease-out both; }

/* 스크롤 진입 효과.
   JS 가 <html> 에 js-reveal 을 붙였을 때만 숨긴다 —
   스크립트가 막히면 그냥 처음부터 보이게 하기 위함이다. */
.js-reveal .reveal { opacity: 0; transform: translateY(16px); }
.js-reveal .reveal.in {
    opacity: 1; transform: none;
    transition: opacity .5s ease-out, transform .5s ease-out;
}
/* ui.js 안전장치 — 전환이 멈춰도 결국은 보이게 */
.js-reveal .reveal.reveal-done { opacity: 1; transform: none; transition: none; }

/* 알림·오류 메시지는 눈에 띄어야 한다 */
.alert { animation: fadeUp .35s ease-out both; }
.errbox { animation: fadeUp .45s ease-out both; }

/* 버튼 안 로딩 표시 (form submit 시 JS 가 붙인다) */
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading::after {
    content: ""; width: 13px; height: 13px; border-radius: 50%;
    border: 2px solid currentColor; border-top-color: transparent;
    animation: spin .6s linear infinite;
}

/* ── 마이크로 인터랙션 ──────────────────────────────────────────────── */

.gnb-menu a, .app-gnb-menu a, .app-gnb-sub a, .linkbtn, .back-link, .me,
.tabs a, .foot-copy a, .price-row, .alert-list a {
    transition: color .15s ease, background-color .15s ease, opacity .15s ease;
}

.card, .feat, .step, .plan, .tpl, .panel, .chip, .quick-amounts button {
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

/* 클릭할 수 있는 카드만 살짝 떠오르게 한다 */
.card:hover, .plan:hover, .step:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.feat:hover { border-color: #CDD2E4; transform: translateY(-2px); }
.chip:active { transform: translateY(1px); }

.btn-primary:hover { box-shadow: 0 6px 18px rgba(91,91,214,.28); }

.tbl tbody tr { transition: background-color .12s ease; }

.faq details { transition: border-color .18s ease, box-shadow .18s ease; }
.faq details[open] { border-color: #CDD2E4; box-shadow: var(--shadow); }
.faq summary::after { transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq p { animation: fadeIn .28s ease-out both; }

.bar-stack .sg { transition: opacity .2s ease; }
.meter-bar i { transition: width .6s cubic-bezier(.22,.61,.36,1); }

/* 뱃지가 새로 뜰 때 눈에 걸리도록 */
.bell i { animation: fadeUp .4s .2s ease-out both; }

/* ── 접근성 ─────────────────────────────────────────────────────────── */

/* 키보드 사용자에게 초점 위치를 보여준다 (마우스 클릭에는 뜨지 않는다) */
:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

.btn:focus-visible { outline-offset: 3px; }

/* 키보드로만 닿는 본문 바로가기 */
.skip {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--brand); color: #fff; padding: 10px 18px;
    border-radius: 0 0 8px 0; font-size: 14px; font-weight: 600;
}
.skip:focus { left: 0; }

/* 움직임을 불편해하는 사용자는 모션을 모두 끈다 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .js-reveal .reveal { opacity: 1; transform: none; }
    .card:hover, .plan:hover, .step:hover, .feat:hover { transform: none; }
}

/* ── 반응형 보정 ────────────────────────────────────────────────────── */

/* 가로 스크롤 방지 — 목업 기기는 화면보다 커지면 안 된다 */
.phone { max-width: 100%; }
body { overflow-x: hidden; }

/*
 * 메뉴 접기 기준을 960px 로 맞춘다.
 * (기존 .gnb-menu 숨김이 960px 인데 버거는 860px 이라
 *  861~960px 구간에서 네비게이션이 통째로 사라지던 문제)
 */
@media (max-width: 960px) {
    .gnb-burger { display: block; order: 3; margin-left: auto; }
    .gnb-menu, .app-gnb-menu { display: none; width: 100%; }

    .gnb-toggle:checked ~ .gnb-menu,
    .gnb-toggle:checked ~ .app-gnb-menu {
        display: flex; flex-direction: column; gap: 2px;
        padding: 12px 0 6px; border-top: 1px solid var(--line); margin-top: 10px;
        animation: fadeUp .25s ease-out both;
    }

    .gnb-inner, .app-gnb-top { flex-wrap: wrap; gap: 12px; }
    .gnb-inner { height: auto; padding-top: 12px; padding-bottom: 12px; }
    .gnb-actions { margin-left: auto; }

    .gnb-menu a, .app-gnb-menu a { padding: 11px 4px; }

    /* 앱 헤더: 1줄 = 로고 + 메뉴 버튼, 2줄 = 잔액·알림·계정·로그아웃, 펼친 메뉴는 그 아래 */
    .app-gnb-top { height: auto; min-height: 62px; padding-top: 12px; padding-bottom: 12px; row-gap: 10px; }
    .app-gnb-top .logo { order: 0; }
    .app-gnb-top .gnb-burger { order: 1; }
    .app-gnb-right { order: 2; width: 100%; gap: 16px; }
    .app-gnb-right form { margin-left: auto; }
    .app-gnb-top .app-gnb-menu { order: 3; }
    .gnb-toggle:checked ~ .app-gnb-menu { margin-top: 0; }
}

@media (max-width: 860px) {
    /* 위 960px 블록이 처리하므로 여기서는 되돌리지 않는다 */
    .kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .wrap { padding: 0 20px; }

    .hero { padding: 54px 0 60px; }
    .hero h1 { font-size: 29px; }
    .hero-desc { font-size: 15px; }
    .hero-cta .btn { flex: 1 1 100%; }

    .sec { padding: 48px 0; }
    .sec-head { margin-bottom: 34px; }
    .sec-head h2 { font-size: 23px; }
    .sec-head p { font-size: 15px; }

    .cta h2 { font-size: 24px; }

    .kpis { grid-template-columns: repeat(2, 1fr); }
    .kpi { padding: 14px 16px; }
    .kpi dd { font-size: 20px; }

    .page-head h1 { font-size: 20px; }
    .panel-body, .panel-head, .panel-foot { padding-left: 16px; padding-right: 16px; }
    .tbl th, .tbl td { padding-left: 12px; padding-right: 12px; }

    .errbox { padding: 38px 24px; }
    .errcode { font-size: 44px; }

    .plan { padding: 26px 20px; }
    .plan-price { font-size: 32px; }

    .calc-out { flex-direction: column; gap: 6px; text-align: center; }

    .tabs { width: 100%; overflow-x: auto; }
    .mfa-code { font-size: 20px; letter-spacing: .2em; }
    .qr svg { width: 100%; height: auto; max-width: 200px; margin: 0 auto; }
}

/* 아주 좁은 화면(갤럭시 폴드 등) */
@media (max-width: 380px) {
    .kpis, .codes { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr; }
}

/* ── MMS 첨부 미리보기 ──────────────────────────────────────────────── */
.mms-preview { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.mms-preview img {
    width: 92px; height: 92px; object-fit: cover;
    border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.mms-preview[hidden] { display: none; }

/* =============================================================================
   아이콘 · 이미지 슬롯
   ========================================================================== */

/* ── SVG 아이콘 기본 ─────────────────────────────────────────────────── */
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.btn .ico { width: 18px; height: 18px; transition: transform .18s ease; }
.btn:hover .ico { transform: translateX(3px); }

/* 카드 아이콘 — 색만 바꿔 쓰는 변형 */
.card-ico { color: var(--brand); }
.card-ico .ico { width: 22px; height: 22px; }
.card-ico.ico-yellow { background: #FFF5D6; color: #B7791F; }
.card-ico.ico-violet { background: #F1ECFF; color: #7C5CE0; }
.card-ico.ico-red    { background: #FDECEC; color: #D92D20; }
.card-ico.ico-green  { background: #E6F6EE; color: #12A150; }

/* 이미지가 들어오면 같은 자리에 들어간다 */
.card-art { width: 72px; height: 72px; object-fit: contain; margin: -6px 0 10px -6px; display: block; }

/* ── 히어로 ──────────────────────────────────────────────────────────── */
.hero-checks span::before { content: none; }
.hero-checks span { display: inline-flex; align-items: center; gap: 6px; }
.hero-checks .ico { color: var(--brand); width: 17px; height: 17px; stroke-width: 2.4; }

.hero-visual { position: relative; }
.hero-art {
    display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto;
    filter: drop-shadow(0 24px 40px rgba(71, 71, 184, .18));
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.float-chip {
    position: absolute; z-index: 2;
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
    border: 1px solid var(--line); border-radius: 14px;
    padding: 10px 14px 10px 10px;
    box-shadow: 0 10px 30px rgba(18, 20, 43, .10);
    font-size: 13px; line-height: 1.35; white-space: nowrap;
    animation: fadeUp .6s ease-out both, floaty 5s ease-in-out infinite;
}
.float-chip b { display: block; color: var(--ink); font-weight: 700; }
.float-chip em { display: block; font-style: normal; color: var(--muted); font-size: 12px; }

.chip-ico {
    width: 34px; height: 34px; border-radius: 10px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-light); color: var(--brand);
}
.chip-ico .ico { width: 19px; height: 19px; }
.chip-ico.ok { background: #E6F6EE; color: #12A150; }

/*
 * 휴대폰(또는 이미지) 테두리 기준 배치.
 * 카드가 화면 안쪽 글자를 가리지 않도록 테두리에 36px 정도만 걸친다.
 * 서로 다른 박자로 떠 있게 해서 기계적으로 보이지 않게 한다.
 */
.hero-stage { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; }
.chip-a { top: 7%;     right: calc(100% - 36px); animation-delay: .35s, 0s; }
.chip-b { bottom: 24%; left: calc(100% - 36px);  animation-delay: .5s, 1.2s; }
.chip-c { bottom: 4%;  right: calc(100% - 52px); animation-delay: .65s, 2.4s; }

/*
 * 이미지(hero-phone)가 들어오면 휴대폰 그림보다 훨씬 넓다.
 * 바깥에 걸치면 화면 밖으로 밀려나므로, 이미지 가장자리 안쪽 여백에 붙인다.
 * (생성 이미지는 휴대폰 둘레에 빈 공간이 있어 글자를 가리지 않는다)
 */
.hero-stage:has(> .hero-art) .chip-a { right: auto; left: -4%;  top: 12%; }
.hero-stage:has(> .hero-art) .chip-b { left: auto;  right: -4%; bottom: 26%; }
.hero-stage:has(> .hero-art) .chip-c { right: auto; left: 4%;   bottom: 8%; }

/* ── 지표 바 ─────────────────────────────────────────────────────────── */
.stats-grid > div { display: flex; flex-direction: column; align-items: center; }
.stat-ico { width: 22px; height: 22px; color: var(--brand); margin-bottom: 8px; opacity: .9; }

/* ── 기능 그리드 ─────────────────────────────────────────────────────── */
.feat-ico {
    width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-light); color: var(--brand);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.feat-ico .ico { width: 20px; height: 20px; }
.feat:hover .feat-ico { background: var(--brand); color: #fff; transform: rotate(-6deg); }

/* ── 이용 단계 ───────────────────────────────────────────────────────── */
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.step-top .step-no { margin: 0; }
.step-ico {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-light), #fff);
    border: 1px solid #DCDDFB; color: var(--brand);
}
.step-ico .ico { width: 21px; height: 21px; }

/* ── 요금 플랜 ───────────────────────────────────────────────────────── */
.plan-ico {
    width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-light); color: var(--brand);
}
.plan-ico .ico { width: 24px; height: 24px; }
.plan.best .plan-ico { background: var(--brand); color: #fff; }

/* ── 앱 헤더 알림 벨 ─────────────────────────────────────────────────── */
.bell { display: inline-flex; color: var(--ink-2); }
.bell .ico { width: 21px; height: 21px; }
.bell:hover, .bell.on { color: var(--brand); }

/* ── 반응형 ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .hero-visual { margin-top: 12px; }
}

/* 휴대폰 양옆 여백이 좁아 카드가 화면 밖으로 나간다 — 하나만 위쪽에 걸친다 */
@media (max-width: 560px) {
    .float-chip { font-size: 12px; padding: 8px 10px 8px 8px; }
    .chip-ico { width: 28px; height: 28px; }
    .chip-a { top: -22px; right: auto; left: -8px; }
    .chip-b, .chip-c { display: none; }
    .hero-visual { margin-top: 36px; }
}


/* =============================================================================
   이미지 자리 (public/images 에 파일을 넣으면 자동 적용)
   ========================================================================== */

/* ── 히어로 배경 ──────────────────────────────────────────────────────── */
.hero { position: relative; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 0; opacity: .5; pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
}

/* ── 화면 미리보기 ────────────────────────────────────────────────────── */
.shot {
    border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
    background: #fff; box-shadow: var(--shadow-lg);
}
.shot-bar {
    display: flex; align-items: center; gap: 7px;
    padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #D9DCE8; }
.shot-bar i:first-child { background: #FF9A8B; }
.shot-bar i:nth-child(2) { background: #FFD27A; }
.shot-bar i:nth-child(3) { background: #9BE2B0; }
.shot-bar span { margin-left: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.shot-art { display: block; width: 100%; height: auto; }

.shot-notes {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px;
    margin-top: 20px; font-size: 14px; color: var(--ink-2);
}
.shot-notes .ico { width: 16px; height: 16px; color: var(--brand); vertical-align: -3px; margin-right: 4px; }

/* 이미지가 없을 때 보여줄 화면 모형 */
.mock { display: grid; grid-template-columns: 190px 1fr; gap: 18px; padding: 18px; background: var(--bg-soft); }
.mock-side { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.mock-main { display: flex; flex-direction: column; gap: 14px; }
.mock-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.mock-line { display: block; height: 10px; border-radius: 999px; background: #E9EBF4; }
.mock-line.dark { background: #CFD3E6; height: 12px; margin-bottom: 14px; }
.mock-line.on { background: var(--brand-light); }
.mock-line.w30 { width: 30%; } .mock-line.w40 { width: 40%; } .mock-line.w50 { width: 50%; }
.mock-line.w60 { width: 60%; } .mock-line.w70 { width: 70%; } .mock-line.w80 { width: 80%; } .mock-line.w90 { width: 90%; }
.mock-box { height: 104px; border-radius: 10px; background: linear-gradient(180deg, #F3F4FB, #EDEFF9); border: 1px dashed #DDE0EE; }
.mock-row { display: flex; gap: 8px; margin-top: 14px; }
.mock-pill { width: 74px; height: 30px; border-radius: 999px; background: #EDEFF9; }
.mock-pill.on { background: var(--brand); }
.mock-stats { display: flex; gap: 26px; flex-wrap: wrap; }
.mock-stats b { font-size: 26px; letter-spacing: -0.03em; color: var(--ink); }
.mock-stats em { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 3px; font-weight: 600; }

@media (max-width: 720px) {
    .mock { grid-template-columns: 1fr; }
    .mock-side { flex-direction: row; overflow: hidden; }
    .mock-side .mock-line { height: 28px; }
}

/* ── CTA 배경 ─────────────────────────────────────────────────────────── */
.cta { position: relative; overflow: hidden; }
.cta > .wrap { position: relative; z-index: 1; }
.cta-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; z-index: 0; opacity: .92; pointer-events: none;
}

/* 배경 이미지가 깔리면 글자를 흰색으로 (없으면 원래 대로 진한 글자) */
.cta:has(.cta-bg)::before {
    content: ""; position: absolute; inset: 0; z-index: 0;
    background: linear-gradient(90deg, rgba(18,20,43,.55), rgba(18,20,43,.28));
}
.cta:has(.cta-bg) h2 { color: #fff; }
.cta:has(.cta-bg) p { color: rgba(255,255,255,.88); }
.cta:has(.cta-bg) .btn-ghost {
    background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.5);
}
.cta:has(.cta-bg) .btn-ghost:hover { background: rgba(255,255,255,.24); }

/* ── 안내 페이지 머리말 옆 그림 ───────────────────────────────────────── */
.pagehead { margin-bottom: 34px; }
.pagehead .sec-head { margin-bottom: 0; }
.pagehead.has-art {
    display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: center; text-align: left;
}
.pagehead.has-art .sec-head { text-align: left; }
.pagehead-art { justify-self: end; }
.pagehead-art .art { width: 100%; max-width: 300px; height: auto; }
.pagehead-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 128px; height: 128px; border-radius: 34px;
    background: linear-gradient(140deg, var(--brand-light), #fff);
    border: 1px solid var(--line); box-shadow: var(--shadow);
}
.pagehead-ico .ico { width: 58px; height: 58px; color: var(--brand); }

@media (max-width: 860px) {
    .pagehead.has-art { grid-template-columns: 1fr; text-align: center; }
    .pagehead.has-art .sec-head { text-align: center; }
    .pagehead-art { display: none; }
}

/* ── 로그인·회원가입 옆 패널 ──────────────────────────────────────────── */
.auth-visual { display: none; }

@media (min-width: 1000px) {
    .auth-wrap { display: grid; grid-template-columns: 1fr 1fr; padding: 0; align-items: stretch; }
    .auth-wrap .auth-box { justify-self: center; align-self: center; padding: 40px 20px; }

    .auth-visual {
        display: flex; align-items: center; position: relative; overflow: hidden;
        background:
            radial-gradient(700px 420px at 18% 12%, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 60%),
            linear-gradient(150deg, var(--brand) 0%, #4340A8 55%, #2B2A6B 100%);
        color: #fff; padding: 64px 56px;
    }
    .auth-visual-art {
        position: absolute; inset: 0; width: 100%; height: 100%;
        object-fit: cover; opacity: .34;
    }
    .auth-visual-text { position: relative; z-index: 1; max-width: 420px; }
    .auth-visual-text .logo { color: #fff; font-size: 22px; }
    .auth-visual-text .logo span,
    .auth-visual-text .logo .logo-name span { color: #C7C8FF; }
    .auth-visual-text .logo-sym { color: rgba(255, 255, 255, .22); }
    .auth-visual-text h2 {
        font-size: 34px; line-height: 1.32; letter-spacing: -0.035em; margin: 26px 0 14px;
    }
    .auth-visual-text p { color: rgba(255,255,255,.82); line-height: 1.75; }
    .auth-checks { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 12px; }
    .auth-checks li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: rgba(255,255,255,.92); }
    .auth-checks .ico { width: 18px; height: 18px; color: #A9F0C6; flex: none; }
}


/* =============================================================================
   문자 발송 화면 — 단계 · 이미지 넣기 · 휴대폰 미리보기
   ========================================================================== */

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { display: flex; align-items: center; gap: 9px; }

.step-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
}
.panel-head .opt { font-size: 12px; font-weight: 500; color: var(--muted); }

.type-badge {
    background: var(--brand-light); color: var(--brand); font-weight: 700;
    font-size: 12px; padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.type-badge.ghost { background: var(--bg-soft); color: var(--ink-2); }

.counter.over b { color: var(--danger); }

/* ── 이미지 넣기 ───────────────────────────────────────────────────── */
.filebox {
    display: flex; align-items: center; gap: 14px; cursor: pointer;
    border: 1.5px dashed var(--line); border-radius: var(--radius-sm);
    padding: 18px; transition: border-color .15s ease, background .15s ease;
}
.filebox:hover { border-color: var(--brand); background: var(--bg-soft); }
.filebox[hidden] { display: none; }
.filebox-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px;
    background: var(--brand-light); color: var(--brand); flex: none;
}
.filebox-ico .ico { width: 20px; height: 20px; }
.filebox-text b { display: block; font-size: 14px; }
.filebox-text em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.mms-preview > div b { display: block; font-size: 13px; margin-bottom: 6px; word-break: break-all; }

/* ── 휴대폰 미리보기 ───────────────────────────────────────────────── */
.msg-preview-phone {
    border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
    background: #fff; box-shadow: var(--shadow);
}
.mp-top {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.mp-back { color: var(--muted); font-size: 17px; line-height: 1; }
.mp-top b { font-weight: 600; }

.mp-screen { padding: 16px 14px 20px; background: #EEF1F7; min-height: 190px; }
.mp-bubble {
    background: #fff; border-radius: 4px 16px 16px 16px; padding: 13px 15px;
    font-size: 14px; line-height: 1.65; color: var(--ink);
    box-shadow: 0 1px 2px rgba(18,20,43,.07);
    max-width: 100%;
}
/* 줄바꿈은 본문에만 살린다 (말풍선 전체에 주면 태그 사이 들여쓰기까지 줄바꿈이 된다) */
#mpBody { display: block; white-space: pre-wrap; word-break: break-all; }
.mp-bubble img { display: block; width: 100%; border-radius: 10px; margin-bottom: 10px; }
.mp-bubble img[hidden] { display: none; }
.mp-bubble strong { display: block; margin-bottom: 6px; }
.mp-bubble strong[hidden] { display: none; }
.mp-empty { color: var(--muted); }
.mp-time { display: block; margin-top: 7px; font-size: 11px; color: var(--muted); }

.mp-facts { display: flex; gap: 10px; margin-top: 14px; }
.mp-facts > div {
    flex: 1; background: var(--bg-soft); border-radius: var(--radius-sm);
    padding: 10px 12px; text-align: center;
}
.mp-facts span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.mp-facts b { font-size: 15px; white-space: nowrap; }
.mp-facts b em { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: 2px; font-weight: 600; }

.kv.total { border-top: 1px solid var(--line); }
.kv.total dt { color: var(--ink-2); font-weight: 600; }
.kv.total dd b { color: var(--brand); font-size: 17px; }

.lab-opt { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--bg-soft); padding: 2px 7px; border-radius: 999px; margin-left: 4px; }
.check-notes { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.check-notes li { position: relative; padding-left: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.check-notes li::before { content: ""; position: absolute; left: 0; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.check-notes li.warn { color: var(--warn); }
.check-notes li.warn::before { background: var(--warn); }

/* 패널 머리말 안의 검색 폼 — 좁은 화면에서 버튼과 겹치지 않게 줄바꿈 */
.panel-head { flex-wrap: wrap; }
.head-search { display: flex; gap: 8px; flex: 1 1 200px; min-width: 0; }
.head-search .input { width: 100%; max-width: 220px; min-width: 0; }

/* 격자 칸은 기본적으로 내용 너비보다 작아지지 않는다.
   그래서 넓은 표가 들어가면 칸이 벌어져 화면 전체가 옆으로 밀렸다.
   가로 스크롤(.tbl-scroll)이 제 역할을 하도록 칸이 줄어들 수 있게 한다. */
.grid-2 > *, .grid-3 > *, .grid-eq > * { min-width: 0; }
.panel { min-width: 0; }

/* ── 화면 미리보기 (움직이는 모형) ─────────────────────────────────────
 *
 * 이미지 대신 HTML·CSS 로 그린다. 해상도에 상관없이 선명하고 용량이 없다.
 *
 * 한 바퀴 9초. 모든 조각이 같은 길이(--pv-t)로 돌고, 시작 시간만
 * animation-delay 로 어긋나게 둔다. 주기가 같아서 한 번 벌어진 간격은
 * 계속 유지된다 — 순서대로 채워지고 순서대로 지워진다.
 *
 *   0~2초   메시지 세 줄이 차례로 써진다
 *   1.6~3초 수신자가 하나씩 선택된다
 *   3.4초   발송 버튼이 채워진다
 *   4.4초   결과(꺾은선·막대·도넛)가 그려진다
 *   그 뒤   유지하다 처음으로 돌아간다
 */
.pv {
    --pv-t: 9s;
    --pv-skel: #E6E8F0;
    --pv-skel-2: #EFF1F7;

    display: grid;
    grid-template-columns: 178px 1fr;
    gap: 14px;
    padding: 14px;
    background: var(--bg-soft);
    font-size: 12px;
}

/* 왼쪽 메뉴 ---------------------------------------------------------- */
.pv-side {
    display: flex; flex-direction: column; gap: 6px;
    padding: 14px 12px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.pv-logo {
    display: grid; place-items: center;
    width: 34px; height: 34px; margin-bottom: 12px;
    border-radius: 10px; background: var(--brand); color: #fff;
}
.pv-logo .ico { width: 18px; height: 18px; }

.pv-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 9px; color: #B9BDCE;
}
.pv-item .ico { width: 15px; height: 15px; flex: none; }
.pv-item.on { background: var(--brand-light); color: var(--brand); }
.pv-item.on .pv-b { background: #C3C4F0; }

.pv-me {
    display: flex; align-items: center; gap: 9px;
    margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line);
}

/* 회색 막대·동그라미 ------------------------------------------------- */
.pv-b {
    display: block; width: var(--w, 60px); max-width: 100%;
    height: 8px; border-radius: 99px; background: var(--pv-skel);
}
.pv-b.sm { height: 6px; background: var(--pv-skel-2); }
.pv-b.tail { flex: none; }
.pv-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--pv-skel); }
.pv-hl { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }

/* 오른쪽 본문 -------------------------------------------------------- */
.pv-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.pv-top {
    display: flex; align-items: center; gap: 9px;
    padding: 12px 16px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.pv-top .pv-avatar {
    margin-left: auto;
    width: 24px; height: 24px; border-radius: 50%;
    background: linear-gradient(140deg, var(--brand), var(--accent));
}

.pv-body { display: grid; grid-template-columns: 1.05fr .95fr; gap: 12px; min-width: 0; }

.pv-card {
    display: flex; flex-direction: column; gap: 12px;
    padding: 16px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    min-width: 0;
}
.pv-card-h { display: flex; align-items: center; gap: 10px; }
.pv-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; }
.pv-ico .ico { width: 15px; height: 15px; }
.pv-ico.brand { background: var(--brand); color: #fff; }
.pv-ico.soft { background: var(--brand-light); color: var(--brand); }

/* 메시지 입력칸 ------------------------------------------------------ */
.pv-editor {
    position: relative;
    display: flex; flex-direction: column; gap: 9px; justify-content: flex-start;
    min-height: 74px; padding: 13px;
    border: 1px solid var(--line); border-radius: 10px; background: #FCFCFE;
}
.pv-type { width: 0; }
.pv-caret {
    position: absolute; left: 13px; top: 13px;
    width: 1.5px; height: 10px; background: var(--brand);
}

.pv-meta { display: flex; align-items: center; gap: 8px; }
.pv-byte { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.pv-chip {
    margin-left: auto;
    padding: 2px 8px; border-radius: 99px;
    background: var(--brand-light); color: var(--brand);
    font-size: 10.5px; font-weight: 700;
}

/* 발송 버튼 ---------------------------------------------------------- */
.pv-send {
    position: relative; overflow: hidden;
    display: grid; place-items: center;
    height: 38px; border-radius: 10px;
    background: var(--brand-dark); color: #fff;
}
.pv-fill {
    position: absolute; inset: 0 auto 0 0;
    width: 0; background: var(--accent);
}
.pv-send-t {
    position: relative;
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 700; letter-spacing: -.01em;
}
.pv-send-t .ico { width: 14px; height: 14px; }

/* 수신자 목록 -------------------------------------------------------- */
.pv-count {
    margin-left: auto; flex: none;
    color: var(--brand); font-size: 12.5px; font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.pv-search {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 11px;
    border: 1px solid var(--line); border-radius: 9px; color: #C2C6D6;
}
.pv-search .ico { width: 13px; height: 13px; flex: none; }

.pv-list { display: flex; flex-direction: column; gap: 9px; }
.pv-row { display: flex; align-items: center; gap: 10px; }
.pv-row .pv-hl { gap: 4px; }
.pv-check {
    flex: none; width: 15px; height: 15px; border-radius: 4px;
    border: 1.5px solid var(--pv-skel); background: #fff;
}

/* 결과 카드 ---------------------------------------------------------- */
.pv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pv-card.sm { gap: 3px; padding: 14px; }
.pv-card.sm .pv-ico { margin-bottom: 5px; }
.pv-stat-v {
    color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.pv-stat-v em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 1px; }
.pv-stat-l { color: var(--muted); font-size: 11px; }

.pv-line { width: 100%; height: 34px; margin-top: 8px; }
.pv-line path { stroke-dasharray: 180; stroke-dashoffset: 180; }

/* 막대는 폭을 묶어둔다 — 풀어두면 카드가 넓어질 때 납작한 덩어리로 보인다 */
.pv-bars {
    display: flex; align-items: flex-end; justify-content: center;
    gap: 6px; height: 34px; margin-top: 8px;
}
.pv-bars i {
    flex: 1 1 0; min-width: 6px; max-width: 13px;
    height: 0; border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, var(--accent), var(--brand));
}

.pv-donut { width: 42px; height: 42px; margin-top: 6px; }
.pv-donut-v { stroke-dasharray: 107; stroke-dashoffset: 107; }

/* ── 움직임 ─────────────────────────────────────────────────────────── */
.pv-type,
.pv-caret,
.pv-check,
.pv-fill,
.pv-count,
.pv-line path,
.pv-bars i,
.pv-donut-v {
    animation-duration: var(--pv-t);
    animation-timing-function: ease-out;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
}

/* 메시지 세 줄이 차례로 써진다 */
@keyframes pvType {
    0%, 2%   { width: 0; }
    12%      { width: var(--w); }
    90%      { width: var(--w); }
    96%, 100% { width: 0; }
}
.pv-type { animation-name: pvType; }
.pv-editor .pv-type:nth-child(1) { animation-delay: .1s; }
.pv-editor .pv-type:nth-child(2) { animation-delay: .7s; }
.pv-editor .pv-type:nth-child(3) { animation-delay: 1.3s; }

/* 글자 쓰는 자리 표시 — 줄을 따라 내려갔다가 사라진다 */
@keyframes pvCaret {
    0%, 22%  { opacity: 1; transform: translate(0, 0); }
    8%       { transform: translate(0, 0); }
    9%, 15%  { transform: translate(0, 14px); }
    16%, 22% { transform: translate(0, 28px); }
    24%, 100% { opacity: 0; transform: translate(0, 28px); }
}
.pv-caret {
    animation-name: pvCaret;
    animation-timing-function: steps(1, end);
    animation-delay: .1s;
}

/* 수신자가 하나씩 선택된다 */
@keyframes pvCheck {
    0%, 4% { background: #fff; border-color: var(--pv-skel); transform: scale(1); }
    9%     { transform: scale(1.22); }
    12%    { background: var(--brand); border-color: var(--brand); transform: scale(1); }
    90%    { background: var(--brand); border-color: var(--brand); }
    95%, 100% { background: #fff; border-color: var(--pv-skel); }
}
.pv-check { animation-name: pvCheck; }
.pv-list .pv-row:nth-child(1) .pv-check { animation-delay: 1.6s; }
.pv-list .pv-row:nth-child(2) .pv-check { animation-delay: 1.78s; }
.pv-list .pv-row:nth-child(3) .pv-check { animation-delay: 1.96s; }
.pv-list .pv-row:nth-child(4) .pv-check { animation-delay: 2.14s; }
.pv-list .pv-row:nth-child(5) .pv-check { animation-delay: 2.32s; }
.pv-list .pv-row:nth-child(6) .pv-check { animation-delay: 2.5s; }

/* 고른 수 표시 */
@keyframes pvCount {
    0%, 4%    { opacity: 0; transform: translateY(3px); }
    10%, 90%  { opacity: 1; transform: translateY(0); }
    96%, 100% { opacity: 0; transform: translateY(3px); }
}
.pv-count { animation-name: pvCount; animation-delay: 2.6s; }

/* 발송 버튼이 채워진다 */
@keyframes pvFill {
    0%, 2%    { width: 0; opacity: 1; }
    16%       { width: 100%; opacity: 1; }
    24%, 90%  { width: 100%; opacity: 0; }
    100%      { width: 0; opacity: 0; }
}
.pv-fill { animation-name: pvFill; animation-delay: 3.4s; }

/* 결과가 그려진다 */
@keyframes pvDraw {
    0%, 3%    { stroke-dashoffset: 180; }
    26%, 90%  { stroke-dashoffset: 0; }
    97%, 100% { stroke-dashoffset: 180; }
}
.pv-line path { animation-name: pvDraw; animation-delay: 4.4s; }

@keyframes pvBar {
    0%, 3%    { height: 0; }
    20%, 90%  { height: var(--h); }
    97%, 100% { height: 0; }
}
.pv-bars i { animation-name: pvBar; }
.pv-bars i:nth-child(1) { animation-delay: 4.4s; }
.pv-bars i:nth-child(2) { animation-delay: 4.5s; }
.pv-bars i:nth-child(3) { animation-delay: 4.6s; }
.pv-bars i:nth-child(4) { animation-delay: 4.7s; }
.pv-bars i:nth-child(5) { animation-delay: 4.8s; }
.pv-bars i:nth-child(6) { animation-delay: 4.9s; }
.pv-bars i:nth-child(7) { animation-delay: 5s; }

@keyframes pvDonut {
    0%, 3%    { stroke-dashoffset: 107; }
    26%, 90%  { stroke-dashoffset: 9; }
    97%, 100% { stroke-dashoffset: 107; }
}
.pv-donut-v { animation-name: pvDonut; animation-delay: 4.4s; }

/* 움직임을 줄이는 설정 — 다 그려진 상태로 멈춘다 */
@media (prefers-reduced-motion: reduce) {
    .pv-type, .pv-caret, .pv-check, .pv-fill, .pv-count,
    .pv-line path, .pv-bars i, .pv-donut-v { animation: none; }

    .pv-type { width: var(--w); }
    .pv-caret { opacity: 0; }
    .pv-check { background: var(--brand); border-color: var(--brand); }
    .pv-fill { width: 0; }
    .pv-line path { stroke-dashoffset: 0; }
    .pv-bars i { height: var(--h); }
    .pv-donut-v { stroke-dashoffset: 9; }
}

/* 좁은 화면 --------------------------------------------------------- */
@media (max-width: 900px) {
    .pv { grid-template-columns: 1fr; }
    .pv-side { display: none; }
    .pv-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .pv { padding: 10px; gap: 10px; }
    .pv-stats { grid-template-columns: 1fr; }
    .pv-top { padding: 10px 12px; }
}
