:root {
    --bg: #fff7f3;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --accent: #ff4d6d;
    --accent-2: #4d7cff;
    --accent-soft: #ffe3ea;
    --ink: #2b2240;
    --muted: #6b6480;
    --line: #f0e6e0;
    --grad: linear-gradient(100deg, #ff4d6d 0%, #ff6b9d 45%, #4d7cff 100%);
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 12px rgba(43, 34, 64, 0.05);
    --shadow-md: 0 12px 32px rgba(43, 34, 64, 0.09);
    --shadow-glow: 0 14px 34px rgba(255, 77, 109, 0.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
    background:
        radial-gradient(1200px 600px at 8% -10%, #ffe6ee 0%, rgba(255,230,238,0) 55%),
        radial-gradient(1000px 560px at 100% -5%, #e7eeff 0%, rgba(231,238,255,0) 50%),
        var(--bg);
    background-attachment: fixed;
    color: var(--ink);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); color: var(--accent); }

/* 진입 애니메이션 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes floatBlob { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(0,-18px) scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── 네비게이션 ── */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 2rem;
    max-width: 1080px;
    margin: 0 auto;
}
.brand { font-size: 1.4rem; font-weight: 800; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--muted); font-weight: 600; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }

/* ── 히어로 ── */
.hero {
    position: relative;
    text-align: center;
    padding: 5.5rem 2rem 4rem;
    max-width: 800px;
    margin: 0 auto;
    overflow: visible;
}
.hero::before {
    content: "";
    position: absolute;
    top: -60px; left: 50%; transform: translateX(-50%);
    width: 460px; height: 460px; max-width: 92vw;
    background: radial-gradient(circle at 35% 35%, rgba(255,77,109,0.22), rgba(255,77,109,0) 62%),
                radial-gradient(circle at 70% 60%, rgba(77,124,255,0.20), rgba(77,124,255,0) 60%);
    filter: blur(8px);
    z-index: -1;
    animation: floatBlob 9s ease-in-out infinite;
}
.hero > * { animation: fadeUp 0.7s cubic-bezier(.2,.7,.3,1) both; }
.hero h1 { animation-delay: 0.06s; }
.hero .subtitle { animation-delay: 0.12s; }
.hero .cta { animation-delay: 0.18s; }
.badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(6px);
    border: 1px solid var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.4rem;
    box-shadow: var(--shadow-sm);
}
.hero h1 { font-size: 3.2rem; font-weight: 800; line-height: 1.22; letter-spacing: -0.02em; }
.accent {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.subtitle { font-size: 1.18rem; color: var(--muted); margin: 1.3rem 0 2.4rem; }
.cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

.btn {
    padding: 0.85rem 1.8rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
    display: inline-block;
}
.btn:focus-visible { outline: 3px solid rgba(77,124,255,0.45); outline-offset: 2px; }
.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(255, 77, 109, 0.4); filter: brightness(1.05) saturate(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: rgba(255,255,255,0.85); border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ── 특징 카드 ── */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    max-width: 980px;
    margin: 1.5rem auto 3.5rem;
    padding: 0 2rem;
}
.card {
    position: relative;
    background: var(--card);
    padding: 2rem 1.9rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    animation: fadeUp 0.7s cubic-bezier(.2,.7,.3,1) both;
}
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.16s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--accent-soft); }
.card .icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; border-radius: 16px; font-size: 1.7rem;
    background: linear-gradient(150deg, #fff1f5, #eef2ff);
    border: 1px solid var(--line);
    margin-bottom: 0.9rem;
}
.card h3 { margin-bottom: 0.4rem; font-size: 1.12rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); }

/* ── 데모 채팅 ── */
.demo {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 2rem 4.5rem;
    text-align: center;
}
.demo h2 { font-size: 1.8rem; margin-bottom: 1.5rem; letter-spacing: -0.01em; }
.chat {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    min-height: 220px;
    max-height: 360px;
    overflow-y: auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: var(--shadow-md);
}
.msg {
    padding: 0.65rem 1rem;
    border-radius: 14px;
    max-width: 80%;
    white-space: pre-wrap;
    word-break: break-word;
}
.msg.bot { background: #f3f0ff; color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.tip { background: #fff7e6; color: #8a6d00; align-self: flex-start; font-size: 0.9rem; }

.chat-form { display: flex; gap: 0.6rem; margin-top: 1rem; }
.chat-form input {
    flex: 1;
    padding: 0.85rem 1.1rem;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    font-size: 1rem;
    outline: none;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.chat-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,77,109,0.12); }

/* ── 푸터 ── */
.footer {
    text-align: center;
    padding: 2.4rem 2rem;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,0.5);
}
.footer a { transition: color 0.15s; }
.footer a:hover { color: var(--accent); }

@media (max-width: 600px) {
    .hero { padding: 4rem 1.4rem 3rem; }
    .hero h1 { font-size: 2.25rem; }
    .subtitle { font-size: 1.05rem; }
    .cta .btn { width: 100%; }
}

/* ── 회원가입(auth) 페이지 ── */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 3rem 1.5rem 4rem;
}
.auth-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(43, 34, 64, 0.06);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}
.auth-card h1 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.auth-sub { color: var(--muted); margin-bottom: 1.75rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
.auth-form input {
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s;
}
.auth-form input:focus { border-color: var(--accent); }
.auth-form .btn { margin-top: 0.5rem; width: 100%; }

.form-msg { margin: 1rem 0 0; font-size: 0.93rem; min-height: 1.2em; text-align: center; }
.form-msg.info { color: var(--muted); }
.form-msg.success { color: #1a8f4c; }
.form-msg.error { color: var(--accent); }

.auth-foot { margin-top: 1.5rem; text-align: center; color: var(--muted); font-size: 0.92rem; }
.auth-foot a, .brand a { color: var(--accent); font-weight: 700; }

/* ── 캐릭터 선택 페이지 ── */
.chars-wrap { max-width: 920px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; text-align: center; }
.chars-wrap h1 { font-size: 1.9rem; margin-bottom: 0.4rem; }
.chars-sub { color: var(--muted); margin-bottom: 2rem; }
.chars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.1rem;
}
.loading { grid-column: 1 / -1; color: var(--muted); }
.char-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.7rem 1.2rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    text-align: center;
}
.char-card:hover { transform: translateY(-6px); border-color: var(--accent-soft); box-shadow: var(--shadow-md); }
.char-emoji { font-size: 2.6rem; margin-bottom: 0.5rem; }
.char-name { font-weight: 800; font-size: 1.15rem; }
.char-job { color: var(--accent-2); font-weight: 600; font-size: 0.9rem; margin: 0.25rem 0; }
.char-tagline { color: var(--muted); font-size: 0.88rem; }

/* ── 채팅방 페이지 ── */
.room-title { color: var(--ink); font-weight: 700; font-size: 0.98rem; }
.room-wrap { max-width: 720px; margin: 0 auto; padding: 1.5rem 1rem 2rem; display: flex; flex-direction: column; height: calc(100vh - 70px); }
.room-chat { flex: 1; max-height: none; margin-bottom: 0.5rem; }

/* ── API 문서 페이지 ── */
.copy-btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
.api-doc { max-width: 860px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.api-hero { text-align: center; padding: 1.5rem 0 2rem; }
.api-hero h1 { font-size: 2rem; }
.api-desc { color: var(--muted); margin: 0.4rem 0 1.1rem; }
.api-meta { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.pill {
    background: #ffe3ea; color: var(--accent); font-weight: 700;
    font-size: 0.82rem; padding: 0.32rem 0.8rem; border-radius: 999px;
}
.pill-url { background: #e7eeff; color: var(--accent-2); font-family: ui-monospace, monospace; }

.api-section-title { margin: 1.8rem 0 0.9rem; font-size: 1.3rem; }
.api-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    padding: 1.3rem 1.4rem; margin-bottom: 1rem;
    box-shadow: 0 6px 18px rgba(43, 34, 64, 0.04);
}
.api-card h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.api-auth code, .ep-path, .doc-links code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--muted); font-size: 0.92rem; }

.endpoint { padding: 1.1rem 1.3rem; }
.ep-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.method {
    font-weight: 800; font-size: 0.78rem; letter-spacing: 0.03em;
    padding: 0.28rem 0.6rem; border-radius: 7px; color: #fff;
}
.m-get { background: #1a8f4c; }
.m-post { background: var(--accent-2); }
.m-delete { background: #e03131; }
.m-put, .m-patch { background: #f08c00; }
.ep-path { font-size: 1rem; font-weight: 600; color: var(--ink); }
.lock { font-size: 0.8rem; color: #b07a00; background: #fff7e6; padding: 0.2rem 0.5rem; border-radius: 6px; }
.ep-summary { color: var(--muted); margin: 0.55rem 0 0.2rem; }
.ep-detail { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.7rem; }
.ep-label { display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; }
.ep-block pre, .api-doc pre {
    background: #0f1730; color: #d7e0f5; border-radius: 10px;
    padding: 0.85rem 1rem; overflow-x: auto; font-size: 0.86rem; line-height: 1.5;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin: 0;
}
.doc-links { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.doc-links a { color: var(--accent); font-weight: 600; }

/* 복사 토스트 */
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
    background: #1a8f4c; color: #fff; padding: 0.8rem 1.3rem; border-radius: 12px;
    font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-err { background: #e03131; }

/* ── 실시간 음성 대화 페이지 ── */
.voice-link { padding: 0.5rem 1rem; font-size: 0.9rem; }
.voice-wrap {
    max-width: 560px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem;
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.voice-emoji { font-size: 3rem; margin: 0.5rem 0 1rem; transition: transform 0.3s; }
.voice-emoji.live { transform: scale(1.1); }

.orb {
    width: 150px; height: 150px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 50% 40%, #ffd9e1, #ffe7ec);
    margin: 0.5rem 0 1.2rem; transition: background 0.3s;
}
.orb-core {
    width: 96px; height: 96px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 30px rgba(255, 77, 109, 0.35);
}
.orb-connect .orb-core { animation: pulse 1.2s ease-in-out infinite; opacity: 0.6; }
.orb-listen { background: radial-gradient(circle at 50% 40%, #d9f2e3, #e9f8ef); }
.orb-listen .orb-core { background: linear-gradient(135deg, #34d399, #4d7cff); animation: breathe 2s ease-in-out infinite; }
.orb-speak .orb-core { animation: pulse 0.6s ease-in-out infinite; }

@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.06); opacity: 1; } }

.voice-status { font-size: 1.1rem; font-weight: 600; color: var(--ink); min-height: 1.5em; margin-bottom: 1rem; }
.voice-transcript {
    width: 100%; background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 16px; padding: 1rem; min-height: 120px; max-height: 38vh;
    overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem;
    text-align: left; margin-bottom: 1.2rem;
}
.voice-transcript:empty { display: none; }
.voice-controls { display: flex; gap: 0.7rem; }
.voice-btn { padding: 0.85rem 1.8rem; }
.voice-hint { color: var(--muted); font-size: 0.85rem; margin-top: 1rem; }

/* ── 게스트 로그인 ── */
.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.2rem 0 0.9rem; color: var(--muted); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-guest { width: 100%; }

/* ── 더보기 페이지 ── */
.more-wrap { max-width: 480px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.more-wrap h1 { font-size: 1.7rem; margin-bottom: 1.25rem; }
.more-user {
    display: flex; align-items: center; gap: 1rem; background: var(--card);
    border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; margin-bottom: 1.25rem;
}
.more-avatar {
    width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 1.7rem; background: #ffe3ea; flex-shrink: 0;
}
.more-name { font-weight: 800; font-size: 1.1rem; }
.more-email { color: var(--muted); font-size: 0.88rem; }
.more-list { display: flex; flex-direction: column; gap: 0.6rem; }
.more-item {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 1rem 1.2rem; font-size: 1rem; font-weight: 600; color: var(--ink);
    cursor: pointer; width: 100%; text-align: left; transition: border-color 0.15s, transform 0.15s;
}
.more-item:hover { border-color: var(--accent); transform: translateX(2px); }
.more-item .chev { color: var(--muted); font-size: 1.2rem; }
.more-item.danger { color: #e03131; }
.more-item.danger:hover { border-color: #e03131; }

/* ── 내 정보 성별 선택 ── */
.gender-field { display: flex; flex-direction: column; gap: 0.5rem; }
.gender-label { font-weight: 600; font-size: 0.92rem; }
.gender-options { display: flex; gap: 0.5rem; }
.gender-chip { flex: 1; }
.gender-chip input { position: absolute; opacity: 0; pointer-events: none; }
.gender-chip span {
    display: block; text-align: center; padding: 0.7rem 0.5rem; border: 1.5px solid var(--line);
    border-radius: 12px; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.15s;
}
.gender-chip input:checked + span {
    border-color: var(--accent); background: #ffe3ea; color: var(--accent);
}

/* ── 소셜 로그인 버튼 ── */
.social-login { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.9rem; }
.social-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    padding: 0.8rem 1rem; border-radius: 12px; font-weight: 700; font-size: 0.98rem;
    border: 1.5px solid var(--line); transition: transform 0.15s, box-shadow 0.15s; cursor: pointer;
}
.social-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(43,34,64,0.1); }
.social-ico {
    width: 22px; height: 22px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem;
}
.social-btn.google { background: #fff; color: #3c4043; border-color: #dadce0; }
.social-btn.google .social-ico { background: #fff; color: #4285f4; border: 1px solid #dadce0; }
.social-btn.apple { background: #000; color: #fff; border-color: #000; }
.social-btn.apple .social-ico::before { content: "\F8FF"; font-size: 1.1rem; }
.social-btn.kakao { background: #fee500; color: #191600; border-color: #fee500; }
.social-btn.kakao .social-ico { background: #191600; color: #fee500; }

/* ── api.md 렌더링 본문 ── */
.md-body { line-height: 1.7; }
.md-body h1 { font-size: 1.9rem; margin: 0.5rem 0 1rem; }
.md-body h2 { font-size: 1.35rem; margin: 1.8rem 0 0.7rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--line); }
.md-body h3 { font-size: 1.1rem; margin: 1.3rem 0 0.5rem; color: var(--accent); }
.md-body p { margin: 0.5rem 0; }
.md-body ul { margin: 0.5rem 0 0.5rem 1.3rem; }
.md-body li { margin: 0.25rem 0; }
.md-body hr { border: none; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.md-body a { color: var(--accent); font-weight: 600; }
.md-body code { background: #f3eef0; color: #c2255c; padding: 0.12rem 0.4rem; border-radius: 6px; font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.md-body pre { background: #0f1730; border-radius: 10px; padding: 0.9rem 1.1rem; overflow-x: auto; margin: 0.6rem 0; }
.md-body pre code { background: none; color: #d7e0f5; padding: 0; font-size: 0.86rem; line-height: 1.5; }
.md-body blockquote { border-left: 3px solid var(--accent); background: var(--bg-soft); padding: 0.5rem 1rem; margin: 0.6rem 0; color: var(--muted); border-radius: 0 8px 8px 0; }

/* ── 좌측 사이드바 ── */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 40;
    background: rgba(255,255,255,0.82); backdrop-filter: blur(10px);
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column; padding: 1.2rem 0.9rem;
}
.sb-brand { font-size: 1.35rem; font-weight: 800; padding: 0.3rem 0.6rem 1rem; letter-spacing: -0.01em; }
.sb-brand a { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sb-user {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.6rem;
    background: linear-gradient(150deg, #fff5f8, #eef2ff);
    border: 1px solid var(--line); border-radius: 14px; margin-bottom: 1rem;
}
.sb-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid var(--line); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.sb-name { font-weight: 700; font-size: 0.95rem; }
.sb-sub { color: var(--muted); font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.sb-nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.sb-nav a {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; border-radius: 12px;
    color: var(--ink); font-weight: 600; font-size: 0.95rem; transition: background 0.15s, color 0.15s;
}
.sb-nav a span { width: 1.3rem; text-align: center; }
.sb-nav a:hover { background: var(--bg-soft); color: var(--accent); }
.sb-nav a.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.sb-bottom { display: flex; flex-direction: column; gap: 0.2rem; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.sb-bottom button {
    display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.8rem; border-radius: 12px;
    background: none; border: none; cursor: pointer; color: var(--ink); font-weight: 600; font-size: 0.95rem; text-align: left;
}
.sb-bottom button span { width: 1.3rem; text-align: center; }
.sb-bottom button:hover { background: var(--bg-soft); }
.sb-bottom button.danger { color: #e03131; }

/* ── 캐릭터 공개/비공개 토글 ── */
.cc-visibility { display: flex; flex-direction: column; gap: 0.5rem; }
.cc-visibility .gender-label { font-size: 1rem; font-weight: 800; color: var(--ink); }
.cc-vis-toggle { display: flex; gap: 0.5rem; }
.cc-vis-btn {
    flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem;
    padding: 0.8rem 0.9rem; border: 1.5px solid var(--line); border-radius: 14px;
    background: var(--card); cursor: pointer; text-align: left; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.cc-vis-btn:hover { border-color: var(--accent); }
.cc-vis-btn.active {
    border-color: var(--accent); background: #fff5f8;
    box-shadow: 0 0 0 3px rgba(255,77,109,0.12);
}
.cc-vis-title { font-weight: 800; font-size: 0.95rem; color: var(--ink); }
.cc-vis-btn.active .cc-vis-title { color: var(--accent); }
.cc-vis-desc { font-size: 0.78rem; color: var(--muted); }

/* ── 채팅(대화) 리스트 페이지 ── */
.chats-page { max-width: 640px; margin: 0 auto; padding: 1.4rem 1rem 3rem; }
.chats-page h1 { font-size: 1.5rem; font-weight: 800; margin: 0 0 0.3rem; }
.chats-page .chats-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.2rem; }
.chats-list { display: flex; flex-direction: column; gap: 0.5rem; }
.chat-row {
    display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 0.9rem; border-radius: 16px;
    background: var(--card); border: 1px solid var(--line); color: var(--ink);
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s; min-width: 0;
}
.chat-row:hover { background: var(--bg-soft); box-shadow: 0 6px 18px rgba(43,34,64,0.07); transform: translateY(-1px); }
.chat-av {
    width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
    background: #ffe3ea; display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.chat-body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 0.15rem; }
.chat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.chat-name { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-time { color: var(--muted); font-size: 0.74rem; flex-shrink: 0; }
.chat-last { color: var(--muted); font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-chev { color: var(--muted); font-size: 1.2rem; flex-shrink: 0; }
.chats-empty {
    text-align: center; color: var(--muted); padding: 3rem 1rem; line-height: 1.6;
}
.chats-empty a { color: var(--accent); font-weight: 700; }

.sb-toggle {
    display: none; position: fixed; top: 12px; left: 12px; z-index: 45;
    width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line);
    background: var(--card); font-size: 1.3rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.sb-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 39;
    opacity: 0; transition: opacity 0.2s;
}

/* 데스크톱: 본문을 사이드바만큼 밀기 */
@media (min-width: 861px) {
    body.has-sidebar { padding-left: 240px; }
}
/* 모바일: 드로어 */
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.25s; box-shadow: 2px 0 20px rgba(0,0,0,0.12); }
    .sidebar.open { transform: translateX(0); }
    .sb-toggle { display: flex; align-items: center; justify-content: center; }
    .sb-overlay.show { display: block; opacity: 1; }
    body.has-sidebar .chars-wrap, body.has-sidebar .auth-wrap { padding-top: 4rem; }
}

/* ── 캐릭터 만들기 ── */
.create-card { max-width: 480px; }
.auth-form textarea {
    padding: 0.8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px;
    font-size: 1rem; outline: none; font-family: inherit; resize: vertical;
}
.auth-form textarea:focus { border-color: var(--accent); }
.cc-avatar-row { display: flex; gap: 1rem; align-items: center; }
.cc-avatar {
    position: relative; width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0;
    background: #ffe3ea; display: flex; align-items: center; justify-content: center;
    font-size: 2.4rem; cursor: pointer; overflow: hidden; border: 2px solid var(--line);
}
.cc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cc-avatar-edit {
    position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; border: 2px solid #fff;
}
.cc-emoji-field { flex: 1; }

/* 커스텀 캐릭터 카드 */
.char-card { position: relative; }
.char-link { display: block; color: inherit; }
.char-avatar {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 0.5rem; overflow: hidden;
    border: 2px solid var(--line);
}
.char-avatar img { width: 100%; height: 100%; object-fit: cover; }
.char-create { display: flex; flex-direction: column; justify-content: center; border-style: dashed; }
.mine-badge {
    font-size: 0.68rem; background: #ffe3ea; color: var(--accent); font-weight: 700;
    padding: 0.1rem 0.4rem; border-radius: 6px; vertical-align: middle;
}
.char-del {
    position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px;
    background: rgba(255,255,255,0.9); border: 1px solid var(--line); cursor: pointer; font-size: 0.9rem;
}
.char-del:hover { border-color: #e03131; background: #fff0f0; }

/* ── API 문서 상단바(사이드바와 함께) ── */
.api-topbar { display: flex; align-items: center; justify-content: flex-end; gap: 0.8rem; margin-bottom: 0.8rem; }
.api-swagger { color: var(--muted); font-weight: 600; }
.api-swagger:hover { color: var(--accent); }
@media (max-width: 860px) {
    body.has-sidebar .api-doc { padding-top: 3.8rem; }
}

/* ── 캐릭터 만들기: 만화 아바타 갤러리 ── */
.cc-avatar-top { display: flex; justify-content: center; margin-bottom: 0.5rem; }
.cc-avatar-big {
    width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
    border: 3px solid var(--accent); background: var(--bg-soft);
}
.cc-avatar-big img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-gallery-field { display: flex; flex-direction: column; gap: 0.5rem; }
.cc-group-title { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0.3rem 0 0.3rem; }
.cc-gallery { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cc-avatar-pick {
    width: 52px; height: 52px; border-radius: 50%; overflow: hidden; cursor: pointer;
    border: 2px solid var(--line); transition: transform 0.12s, border-color 0.12s;
}
.cc-avatar-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-avatar-pick:hover { transform: scale(1.06); }
.cc-avatar-pick.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,77,109,0.25); }

/* ── 직접 이미지 업로드: 원형 아이콘 ── */
.cc-upload-circle {
    width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border: 2px dashed var(--accent-2); background: var(--bg-soft);
    color: var(--accent-2); transition: transform 0.12s, background 0.15s, border-color 0.15s;
    overflow: hidden;
}
.cc-upload-circle:hover { transform: scale(1.06); background: #eef3ff; border-color: var(--accent); color: var(--accent); }
.cc-upload-ico { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.cc-upload-circle.has-img { border-style: solid; border-color: var(--accent); }
.cc-upload-circle.has-img .cc-upload-ico { display: none; }
.cc-upload-circle img { width: 100%; height: 100%; object-fit: cover; }

/* ── 관리자 대시보드 ── */
.admin-tag { font-size: 0.65rem; background: var(--accent); color: #fff; padding: 0.1rem 0.4rem; border-radius: 6px; vertical-align: middle; font-weight: 700; }
.admin-main { max-width: 980px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.admin-title { font-size: 1.8rem; margin-bottom: 0.3rem; }
.admin-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.admin-h2 { font-size: 1.2rem; margin: 1.8rem 0 0.9rem; }
.admin-h2 .est { font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.admin-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem 1.4rem;
    box-shadow: 0 6px 18px rgba(43,34,64,0.04);
}
.admin-card.highlight { border-color: rgba(255,77,109,0.3); background: linear-gradient(160deg, #fff, #fff5f7); }
.ac-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.ac-cost { font-size: 1.9rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.ac-usd { color: var(--accent-2); font-weight: 600; font-size: 0.95rem; margin-top: 0.2rem; }
.ac-meta { color: var(--muted); font-size: 0.8rem; margin-top: 0.6rem; }
.ac-num { font-size: 1.8rem; font-weight: 800; color: var(--ink); }
.admin-note { margin-top: 1.6rem; color: var(--muted); font-size: 0.82rem; line-height: 1.6; background: var(--bg-soft); padding: 0.9rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); }

/* ── 공식 캐릭터 배지 ── */
.official-badge {
    font-size: 0.68rem; background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #fff; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 6px; vertical-align: middle;
}
h1 .official-badge { font-size: 0.55em; }

/* ── AI 이미지 생성 섹션 (다듬은 디자인) ── */
.cc-aigen {
    background: linear-gradient(150deg, #fff6f8 0%, #f4f1ff 100%);
    border: 1px solid #f3e6ee;
    border-radius: 18px;
    padding: 1.25rem 1.2rem 1.1rem;
    display: flex; flex-direction: column; gap: 0.85rem;
    box-shadow: 0 8px 24px rgba(255, 77, 109, 0.08);
}
.cc-aigen > .gender-label {
    font-size: 1rem; font-weight: 800; color: var(--ink);
}

/* 세그먼트 토글 (실제인물 / 만화캐릭터) */
.cc-style-toggle {
    display: flex; gap: 0.3rem; background: #fff; padding: 0.3rem;
    border-radius: 14px; border: 1px solid var(--line);
    box-shadow: inset 0 1px 3px rgba(43,34,64,0.04);
}
.cc-style-btn {
    flex: 1; padding: 0.62rem 0.5rem; border: none; background: transparent;
    border-radius: 11px; font-weight: 700; font-size: 0.93rem; cursor: pointer;
    color: var(--muted); transition: color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.12s;
}
.cc-style-btn:hover { color: var(--accent); }
.cc-style-btn.active {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #fff; box-shadow: 0 5px 14px rgba(255,77,109,0.30);
}

/* 입력창 */
.cc-aigen textarea {
    width: 100%; padding: 0.95rem 1.05rem; border: 1.5px solid #efe1e9; border-radius: 14px;
    font-size: 1rem; font-family: inherit; line-height: 1.55; outline: none; resize: vertical;
    min-height: 96px; background: #fff; color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cc-aigen textarea::placeholder { color: #bcb2c6; }
.cc-aigen textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,77,109,0.13); }

/* 생성 버튼 */
.cc-aigen-btn {
    width: 100%; padding: 0.9rem 1rem; border: none; border-radius: 14px; cursor: pointer;
    font-weight: 800; font-size: 1.02rem; color: #fff; letter-spacing: 0.01em;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 20px rgba(255,77,109,0.30);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    display: flex; align-items: center; justify-content: center; gap: 0.45rem;
}
.cc-aigen-btn:hover { transform: translateY(-2px); box-shadow: 0 13px 28px rgba(255,77,109,0.38); }
.cc-aigen-btn:active { transform: translateY(0); }
.cc-aigen-btn:disabled { opacity: 0.65; cursor: progress; transform: none; box-shadow: none; }
.cc-aigen-hint { color: var(--muted); font-size: 0.83rem; text-align: center; margin-top: -0.1rem; }

/* ── 캐릭터 디테일 이미지 (단일 입력 → 추가, 최대 5개 갤러리) ── */
.cc-detail-field {
    display: flex; flex-direction: column; gap: 0.7rem;
    background: linear-gradient(150deg, #fff6f8 0%, #f4f1ff 100%);
    border: 1px solid #f3e6ee; border-radius: 18px; padding: 1.25rem 1.2rem 1.1rem;
    box-shadow: 0 8px 24px rgba(255, 77, 109, 0.08);
}
.cc-detail-field .gender-label { font-size: 1rem; font-weight: 800; color: var(--ink); }
.cc-detail-field #detail-count { color: var(--muted); font-weight: 700; font-size: 0.88rem; }
.cc-detail-field code {
    background: #fff; color: var(--accent); padding: 0.05rem 0.32rem;
    border-radius: 6px; font-size: 0.85em;
}
.cc-detail-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0.6rem;
}
.cc-detail-gallery:empty { display: none; }
.cc-detail-cell {
    position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;
    border: 1.5px solid #efe1e9; background: #fff;
}
.cc-detail-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-detail-x {
    position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: none;
    border-radius: 50%; background: rgba(43,34,64,0.62); color: #fff; cursor: pointer;
    font-size: 0.8rem; line-height: 1; display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.cc-detail-x:hover { background: var(--accent); }
.cc-detail-field textarea {
    width: 100%; padding: 0.8rem 0.95rem; border: 1.5px solid #efe1e9; border-radius: 14px;
    font-size: 0.97rem; font-family: inherit; line-height: 1.5; outline: none; resize: vertical;
    min-height: 64px; background: #fff; color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cc-detail-field textarea::placeholder { color: #bcb2c6; }
.cc-detail-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,77,109,0.13); }
.cc-detail-field textarea:disabled { background: #f6f2f8; cursor: not-allowed; }

/* ── 캐릭터 이미지 미리보기: 크게 + 작은(목록) 미리보기 ── */
.cc-avatar-top { align-items: center; gap: 1.4rem; }
.cc-avatar-big { width: 140px; height: 140px; }
.cc-avatar-mini-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.cc-avatar-mini {
    width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
    border: 2px solid var(--line); background: var(--bg-soft);
}
.cc-avatar-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-avatar-mini-label { font-size: 0.72rem; color: var(--muted); font-weight: 600; }

/* ── 관리자 캐릭터/유저 리스트 ── */
.char-list, .user-list { display: flex; flex-direction: column; gap: 0.65rem; }
.char-row, .user-row {
    display: flex; align-items: center; gap: 1rem; background: var(--card);
    border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem 1rem;
}
.cl-avatar {
    width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: #ffe3ea; display: flex; align-items: center; justify-content: center;
}
.cl-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cl-emoji { font-size: 1.6rem; }
.cl-info { flex: 1; min-width: 0; }
.cl-name { font-weight: 800; }
.cl-job { color: var(--muted); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-badge { font-size: 0.68rem; padding: 0.1rem 0.45rem; border-radius: 6px; font-weight: 700; vertical-align: middle; }
.t-builtin { background: #e7eeff; color: #4d7cff; }
.t-official { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #fff; }
.t-user { background: #e9f8ef; color: #1a8f4c; }
.cl-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.cl-btn { padding: 0.5rem 0.85rem; font-size: 0.85rem; }
.char-type-badge { font-size: 0.55em; background: #e7eeff; color: #4d7cff; padding: 0.15rem 0.5rem; border-radius: 8px; vertical-align: middle; }

/* 유저 리스트 */
.user-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: #ffe3ea; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.user-email { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta { color: var(--muted); font-size: 0.78rem; flex-shrink: 0; text-align: right; }
.prov-badge { font-size: 0.66rem; padding: 0.08rem 0.4rem; border-radius: 5px; font-weight: 700; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); }

/* ── 유저 리스트: 채팅횟수/사용금액 ── */
.user-stats { flex-shrink: 0; text-align: right; min-width: 90px; }
.us-chat { font-size: 0.85rem; color: var(--ink); font-weight: 600; }
.us-cost { font-size: 0.9rem; color: var(--accent); font-weight: 800; margin-top: 0.1rem; }
.us-est { font-size: 0.62rem; color: var(--muted); font-weight: 600; background: var(--bg-soft); padding: 0.05rem 0.3rem; border-radius: 5px; vertical-align: middle; }
@media (max-width: 520px) { .user-meta { display: none; } }

/* ── 음성통화 기록 모니터링 ── */
.vl-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.vl-head .admin-title { margin: 0; }
.vl-auto { margin-left: auto; font-size: 0.88rem; color: var(--muted); display: flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.vl-refresh { padding: 0.45rem 0.9rem; font-size: 0.88rem; }
.vl-errors { display: flex; flex-direction: column; gap: 0.3rem; max-height: 240px; overflow-y: auto; }
.vl-err-line {
    background: #2b1416; color: #ffb3b3; border-radius: 8px; padding: 0.5rem 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; line-height: 1.45; word-break: break-all;
}
.vl-empty { color: var(--muted); padding: 0.8rem; background: var(--bg-soft); border-radius: 10px; font-size: 0.9rem; }
.vl-sessions { display: flex; flex-direction: column; gap: 0.6rem; }
.vl-sess { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.85rem 1rem; }
.vl-sess-top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.vl-status { font-size: 0.7rem; font-weight: 800; padding: 0.12rem 0.5rem; border-radius: 6px; }
.st-ok { background: #e9f8ef; color: #1a8f4c; }
.st-warn { background: #fff7e6; color: #b07a00; }
.st-err { background: #ffe3e3; color: #e03131; }
.vl-char { font-weight: 800; }
.vl-time { color: var(--muted); font-size: 0.82rem; margin-left: auto; }
.vl-sess-meta { display: flex; gap: 0.8rem; flex-wrap: wrap; color: var(--muted); font-size: 0.8rem; margin-top: 0.3rem; }
.vl-sid { font-family: ui-monospace, monospace; }
.vl-summary { margin-top: 0.45rem; font-size: 0.83rem; color: var(--ink); background: var(--bg-soft); border-radius: 8px; padding: 0.4rem 0.7rem; }
.vl-ongoing { color: #b07a00; }

/* ── API 문서 마지막 업데이트 표시 ── */
.doc-updated {
    margin-right: auto; color: var(--muted); font-size: 0.82rem; font-weight: 600;
    background: var(--bg-soft); border: 1px solid var(--line); padding: 0.3rem 0.7rem; border-radius: 999px;
}
@media (max-width: 520px) { .doc-updated { font-size: 0.72rem; } }

/* ── 정책 문서 페이지 (CSAE / 개인정보) ── */
.policy-wrap { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.policy-wrap h1 { font-size: 1.9rem; margin-bottom: 0.4rem; }
.policy-updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.8rem; }
.policy-wrap h2 { font-size: 1.2rem; margin: 1.8rem 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--line); }
.policy-wrap h3 { font-size: 1.02rem; margin: 1.1rem 0 0.4rem; }
.policy-wrap p { margin: 0.5rem 0; color: var(--ink); }
.policy-wrap ul { margin: 0.5rem 0 0.8rem 1.3rem; }
.policy-wrap li { margin: 0.3rem 0; }
.policy-wrap a { color: var(--accent); font-weight: 600; }
.policy-wrap .lead { font-size: 1.05rem; color: var(--muted); margin-bottom: 1.2rem; }
.policy-callout {
    background: #fff5f7; border: 1px solid #f3d6e0; border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0; padding: 1rem 1.2rem; margin: 1.2rem 0;
}
.policy-callout strong { color: var(--accent); }
.policy-table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.92rem; }
.policy-table th, .policy-table td { border: 1px solid var(--line); padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
.policy-table th { background: var(--bg-soft); font-weight: 700; }
.policy-foot { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }

/* ── 고객센터 (FAQ + 문의) ── */
.faq { display: flex; flex-direction: column; gap: 0.55rem; }
.faq-item {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 0.2rem;
}
.faq-item summary {
    cursor: pointer; padding: 0.9rem 1rem; font-weight: 700; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; color: var(--accent); font-size: 1.2rem; flex-shrink: 0; }
.faq-item[open] summary::after { content: "－"; }
.faq-item p { padding: 0 1rem 1rem; color: var(--muted); margin: 0; }
.faq-item p a { color: var(--accent); }
.support-form select {
    padding: 0.8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px;
    font-size: 1rem; outline: none; background: #fff; font-family: inherit;
}
.support-form select:focus { border-color: var(--accent); }
.support-form textarea {
    padding: 0.8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px;
    font-size: 1rem; outline: none; font-family: inherit; resize: vertical;
}
.support-form textarea:focus { border-color: var(--accent); }
.support-form .btn { width: 100%; margin-top: 0.3rem; }

/* ── 포인트 충전(credits) 페이지 ── */
.credits-wrap { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 1.25rem; }
.credit-balance-card {
    background: linear-gradient(110deg, var(--accent), var(--accent-2));
    color: #fff; border-radius: 20px; padding: 1.75rem 2rem;
    box-shadow: 0 12px 30px rgba(255, 77, 109, 0.25);
}
.credit-balance-label { font-weight: 700; font-size: 0.95rem; opacity: 0.92; }
.credit-balance-label em { font-style: normal; opacity: 0.7; font-size: 0.85rem; }
.credit-balance { font-size: 2.4rem; font-weight: 800; line-height: 1.2; margin-top: 0.25rem; }
.credit-balance strong { font-weight: 800; }
.credit-card {
    background: var(--card); border: 1px solid var(--line); border-radius: 20px;
    box-shadow: 0 10px 30px rgba(43, 34, 64, 0.06); padding: 1.75rem;
}
.credit-card h2 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.credit-card h2 em { font-style: normal; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.credit-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin: 0.5rem 0 1rem; }
.credit-amount {
    padding: 0.8rem 0.4rem; border: 1.5px solid var(--line); border-radius: 12px;
    background: #fff; color: var(--ink); font-weight: 700; font-size: 0.95rem; cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.credit-amount:hover { border-color: var(--accent); color: var(--accent); }
.credit-amount.active { border-color: var(--accent); background: #ffe3ea; color: var(--accent); }
.credit-custom { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; margin-bottom: 1rem; }
.credit-custom input {
    padding: 0.8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; font-size: 1rem; outline: none;
}
.credit-custom input:focus { border-color: var(--accent); }
.credit-card .btn { width: 100%; }
.credit-history { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; }
.credit-empty { color: var(--muted); text-align: center; padding: 1.5rem 0; }
.credit-row {
    display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
    padding: 0.85rem 0; border-top: 1px solid var(--line);
}
.credit-row:first-child { border-top: none; }
.credit-row-main { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.credit-tag {
    flex-shrink: 0; font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px;
}
.credit-row.is-charge .credit-tag { background: #e3f4ea; color: #1a8f4c; }
.credit-row.is-use .credit-tag { background: #ffe3ea; color: var(--accent); }
.credit-memo { color: var(--ink); font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit-row-side { text-align: right; flex-shrink: 0; }
.credit-delta { display: block; font-weight: 800; }
.credit-row.is-charge .credit-delta { color: #1a8f4c; }
.credit-row.is-use .credit-delta { color: var(--accent); }
.credit-when { display: block; color: var(--muted); font-size: 0.78rem; }
@media (max-width: 480px) {
    .credit-amounts { grid-template-columns: repeat(2, 1fr); }
}
