/* himiru design system — dark, soft glass, brand gradient (var(--c1) → var(--c2) are set per site) */
:root {
  --bg: #0a0910;
  --bg2: #110f1a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface2: rgba(255, 255, 255, 0.075);
  --surface3: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #f5f3ff;
  --text2: #c9c5dc;
  --muted: #8f8aa6;
  --faint: #5f5a74;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;
  --grad: linear-gradient(135deg, var(--c1), var(--c2));
  --r1: 10px;
  --r2: 14px;
  --r3: 20px;
  --r4: 28px;
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.6);
  --glow: 0 10px 40px -10px color-mix(in srgb, var(--c1) 70%, transparent);
  --side: 252px;
  --tab: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', 'Apple SD Gothic Neo', 'Segoe UI', sans-serif;
}
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overflow-x: hidden; overflow-wrap: anywhere; }
/* 한국어는 단어 중간에서 줄바꿈하지 않음 (일본어는 띄어쓰기가 없어 적용하면 안 됨) */
html:lang(ko) body { word-break: keep-all; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: color-mix(in srgb, var(--c1) 45%, transparent); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--c1) 80%, white); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- splash ---------- */
#splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); transition: opacity 0.55s ease; }
#splash.out { opacity: 0; pointer-events: none; }
.splash-inner { text-align: center; animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.splash-word { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.splash-logo { max-height: 56px; margin: 0 auto; }
.splash-sub { margin-top: 10px; color: var(--muted); font-size: 14px; letter-spacing: 0.02em; animation: fade 1.2s 0.3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- ambient background ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35; }
.ambient i:nth-child(1) { width: 520px; height: 520px; background: var(--c1); top: -180px; left: -120px; animation: drift 22s ease-in-out infinite; }
.ambient i:nth-child(2) { width: 460px; height: 460px; background: var(--c2); top: 30%; right: -200px; opacity: 0.22; animation: drift 26s ease-in-out infinite reverse; }
.ambient i:nth-child(3) { width: 380px; height: 380px; background: #3b82f6; bottom: -200px; left: 30%; opacity: 0.12; animation: drift 30s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, 30px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- typography ---------- */
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.15; font-weight: 800; letter-spacing: -0.035em; margin: 0; }
.h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.25; font-weight: 750; letter-spacing: -0.03em; margin: 0; }
.h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.lead { font-size: clamp(15px, 1.6vw, 18px); color: var(--text2); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.pre { white-space: pre-line; }

/* ---------- buttons ---------- */
.btn { --h: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: 15px; white-space: nowrap; transition: transform 0.15s ease, background 0.2s, box-shadow 0.2s, opacity 0.2s; user-select: none; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-soft { background: var(--surface2); border: 1px solid var(--line); }
.btn-soft:hover { background: var(--surface3); }
.btn-ghost { color: var(--text2); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-danger { background: color-mix(in srgb, var(--err) 16%, transparent); color: var(--err); }
.btn-white { background: #fff; color: #111; }
.btn-lg { --h: 54px; padding: 0 28px; font-size: 16px; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-xs { --h: 30px; padding: 0 11px; font-size: 12.5px; gap: 5px; }
.btn-xs svg { width: 14px; height: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); padding: 20px; }
.card-pad-lg { padding: 28px; }
.glass { background: rgba(18, 16, 28, 0.72); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: 1px solid var(--line); }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); font-size: 13px; color: var(--text2); }
.chip svg { width: 14px; height: 14px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--surface2); color: var(--text2); white-space: nowrap; }
.badge-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge-err { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }
.badge-brand { background: color-mix(in srgb, var(--c1) 22%, transparent); color: color-mix(in srgb, var(--c1) 40%, white); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot-warn { background: var(--warn); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 16px; }
.label { font-size: 13px; font-weight: 650; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.help { font-size: 12.5px; color: var(--muted); }
.input, .textarea, .select { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r2); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line2); outline: none; font-size: 16px; transition: border 0.2s, background 0.2s, box-shadow 0.2s; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { border-color: color-mix(in srgb, var(--c1) 70%, white); background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 18%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .input-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.input-wrap .input-btn:hover { color: var(--text); background: var(--surface); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238f8aa6' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.select option { background: #1a1726; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text2); padding: 6px 0; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1.5px solid var(--line2); display: grid; place-items: center; transition: all 0.15s; margin-top: 1px; }
.check .box svg { width: 14px; height: 14px; opacity: 0; color: #fff; }
.check input:checked + .box { background: var(--grad); border-color: transparent; }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--c1); outline-offset: 2px; }
.toggle { position: relative; width: 46px; height: 28px; flex: none; border-radius: 999px; background: var(--surface3); transition: background 0.2s; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.22s cubic-bezier(0.3, 0.7, 0.4, 1.2); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.toggle[aria-checked='true'] { background: var(--grad); }
.toggle[aria-checked='true']::after { transform: translateX(18px); }
.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.seg button { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: all 0.2s; }
.seg button[aria-pressed='true'] { background: var(--surface3); color: var(--text); }
.form-error { display: flex; gap: 8px; align-items: center; padding: 11px 14px; border-radius: var(--r2); background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); font-size: 13.5px; }
.form-error svg { width: 16px; height: 16px; flex: none; }
.color-input { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 8px 0 6px; border-radius: var(--r2); border: 1px solid var(--line2); background: rgba(255, 255, 255, 0.04); }
.color-input input[type='color'] { width: 36px; height: 36px; border: 0; padding: 0; border-radius: 10px; background: none; cursor: pointer; }
.color-input input[type='color']::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type='color']::-webkit-color-swatch { border: 0; border-radius: 10px; }
.color-input input[type='text'] { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-family: ui-monospace, monospace; font-size: 14px; text-transform: lowercase; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15); }
.swatch[aria-pressed='true'] { border-color: #fff; }
.upload { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r2); border: 1px dashed var(--line2); background: rgba(255, 255, 255, 0.02); }
.upload-thumb { width: 64px; height: 64px; flex: none; border-radius: 12px; background: var(--surface2) center / contain no-repeat; display: grid; place-items: center; color: var(--faint); }
.upload-thumb.wide { width: 120px; }

/* ---------- app shell ---------- */
.shell { min-height: 100dvh; }
.main { padding-bottom: calc(var(--tab) + var(--safe-b) + 24px); }
.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 18px; }
.page-narrow { max-width: 560px; }
.topbar { position: sticky; top: 0; z-index: 30; height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 18px; background: rgba(10, 9, 16, 0.7); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.topbar.scrolled { border-color: var(--line); }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -0.045em; }
.logo img { height: 28px; width: auto; }
.logo .word { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(12, 11, 19, 0.82); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--faint); transition: color 0.2s; }
.tab svg { width: 23px; height: 23px; stroke-width: 1.9; }
.tab.on { color: var(--text); }
.tab.on svg { color: color-mix(in srgb, var(--c1) 45%, white); }
.tab-create { position: relative; }
.tab-create .fab { width: 50px; height: 50px; margin-top: -22px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow), 0 0 0 5px var(--bg); transition: transform 0.2s; }
.tab-create .fab svg { width: 26px; height: 26px; color: #fff; stroke-width: 2.4; }
.tab-create:active .fab { transform: scale(0.94); }
.sidebar { display: none; }
@media (min-width: 1024px) {
  .tabbar, .topbar.mobile-only { display: none; }
  .main { margin-left: var(--side); padding-bottom: 40px; }
  .page { padding: 36px 40px; }
  .sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: var(--side); display: flex; flex-direction: column; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: rgba(12, 11, 19, 0.6); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
  .sidebar .logo { padding: 2px 12px 22px; }
  .side-cta { margin: 0 4px 18px; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-link { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 12px; font-weight: 600; color: var(--muted); transition: all 0.15s; }
  .side-link svg { width: 20px; height: 20px; }
  .side-link:hover { background: var(--surface); color: var(--text); }
  .side-link.on { background: var(--surface2); color: var(--text); }
  .side-link.on svg { color: color-mix(in srgb, var(--c1) 45%, white); }
  .side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
}
.desktop-only { display: none !important; }
@media (min-width: 1024px) { .desktop-only { display: revert !important; } .mobile-only { display: none !important; } }
.user-pill { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 750; color: #fff; background: var(--grad); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }

/* language menu */
.lang { position: relative; }
.lang-menu { position: absolute; z-index: 60; min-width: 160px; padding: 6px; border-radius: 14px; box-shadow: var(--shadow); animation: pop 0.16s ease both; }
.lang-menu.down { top: calc(100% + 6px); right: 0; }
.lang-menu.up { bottom: calc(100% + 6px); left: 0; }
.lang-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 550; color: var(--text2); }
.lang-item:hover { background: var(--surface2); color: var(--text); }
.lang-item svg { width: 16px; height: 16px; color: var(--c1); }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- landing ---------- */
.hero { position: relative; display: grid; gap: 40px; align-items: center; padding: 28px 0 24px; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr 0.9fr; gap: 56px; padding: 40px 0 48px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--text2); }
.eyebrow b { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; }
.hero-tag { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: color-mix(in srgb, var(--c1) 45%, white); text-transform: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { flex: 1 1 auto; }
@media (min-width: 560px) { .hero-actions .btn { flex: 0 0 auto; } }
.trust { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 15px; height: 15px; color: color-mix(in srgb, var(--c1) 50%, white); }

/* phone mockup */
.phone-wrap { position: relative; display: flex; justify-content: center; }
.phone-wrap::before { content: ''; position: absolute; inset: 10% 8%; background: var(--grad); filter: blur(70px); opacity: 0.35; border-radius: 50%; }
.phone { position: relative; width: min(340px, 100%); height: 560px; border-radius: 40px; padding: 10px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.phone-screen { height: 100%; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(180deg, #15121f, #0d0b14); }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 18px 16px 12px; border-bottom: 1px solid var(--line); }
.phone-head .avatar { width: 40px; height: 40px; }
.phone-name { font-weight: 700; font-size: 15px; }
.phone-status { font-size: 11.5px; color: var(--ok); display: flex; align-items: center; gap: 5px; }
.phone-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.phone-body { flex: 1; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; justify-content: flex-end; }
.phone-input { margin: 10px 12px 14px; height: 42px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 16px; font-size: 13px; color: var(--faint); }
.phone-input i { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; }
.phone-input i svg { width: 15px; height: 15px; color: #fff; }

/* chat bubbles (shared with chat page later) */
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 18px; font-size: 13.5px; line-height: 1.55; animation: bubble 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.bubble.ai { align-self: flex-start; background: var(--surface2); border: 1px solid var(--line); border-top-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--grad); color: #fff; border-top-right-radius: 6px; }
.bubble em { font-style: italic; color: color-mix(in srgb, var(--c2) 35%, #e9e4ff); opacity: 0.9; }
.bubble.me em { color: rgba(255, 255, 255, 0.85); }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 15px; border-radius: 18px; border-top-left-radius: 6px; background: var(--surface2); border: 1px solid var(--line); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes bubble { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

.section { padding: 44px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 28px; display: flex; flex-direction: column; gap: 10px; }
.features { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { position: relative; padding: 22px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform 0.25s, border-color 0.25s, background 0.25s; }
.feature:hover { transform: translateY(-3px); border-color: var(--line2); background: var(--surface2); }
.feature-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: color-mix(in srgb, var(--c1) 18%, transparent); color: color-mix(in srgb, var(--c1) 40%, white); }
.feature-ic svg { width: 22px; height: 22px; }
.feature p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.steps { display: grid; gap: 12px; counter-reset: s; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 22px; border-radius: var(--r3); background: linear-gradient(180deg, var(--surface2), transparent); border: 1px solid var(--line); }
.step-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--grad); color: #fff; margin-bottom: 14px; }
.step p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.final { position: relative; overflow: hidden; text-align: center; padding: 44px 22px; border-radius: var(--r4); background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--c1) 35%, transparent), transparent 60%), var(--surface); border: 1px solid var(--line); }
.footer { padding: 32px 0 12px; color: var(--faint); font-size: 12.5px; display: flex; flex-direction: column; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- empty / soon ---------- */
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-art { position: relative; width: 96px; height: 96px; border-radius: 30px; display: grid; place-items: center; background: color-mix(in srgb, var(--c1) 14%, transparent); color: color-mix(in srgb, var(--c1) 45%, white); margin-bottom: 6px; }
.empty-art::after { content: ''; position: absolute; inset: -14px; border-radius: 40px; border: 1px dashed color-mix(in srgb, var(--c1) 35%, transparent); }
.empty-art svg { width: 40px; height: 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.page-head p { margin: 4px 0 0; }
.create-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--r3); border: 1.5px dashed color-mix(in srgb, var(--c1) 45%, transparent); background: color-mix(in srgb, var(--c1) 6%, transparent); transition: background 0.2s; }
.create-card:hover { background: color-mix(in srgb, var(--c1) 11%, transparent); }
.create-card .plus { width: 56px; height: 56px; flex: none; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); }

/* ---------- auth ---------- */
.auth { max-width: 420px; margin: 0 auto; padding: 24px 18px 40px; }
.auth-head { text-align: center; margin: 12px 0 26px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.social { display: flex; flex-direction: column; gap: 10px; }
.btn-google { background: #fff; color: #1f1f1f; }
.social .btn[disabled] { opacity: 0.38; filter: grayscale(0.4); }
.btn-kakao { background: #fee500; color: #191600; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; margin: 22px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.agree { margin-top: 18px; padding: 14px 16px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); }
.agree .all { font-weight: 700; color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 6px; }

/* ---------- modal / sheet ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(5, 4, 10, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s both; }
.sheet { width: 100%; max-height: 88dvh; overflow: auto; border-radius: 26px 26px 0 0; padding: 10px 20px calc(24px + var(--safe-b)); background: #15121f; border: 1px solid var(--line); animation: up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: var(--line2); margin: 2px auto 14px; }
@media (min-width: 640px) { .overlay { align-items: center; } .sheet { max-width: 520px; border-radius: 24px; padding: 24px; animation: pop 0.2s both; } .sheet-grip { display: none; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.guide-steps { counter-reset: g; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.guide-steps li { counter-increment: g; position: relative; padding-left: 38px; font-size: 14px; color: var(--text2); }
.guide-steps li::before { content: counter(g); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 750; background: var(--surface3); color: var(--text); }
.guide-steps code, .code { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12.5px; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); color: var(--text); word-break: break-all; }
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r2); background: color-mix(in srgb, var(--warn) 9%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 22%, transparent); color: color-mix(in srgb, var(--warn) 55%, white); font-size: 13px; }
.note svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.note-info { background: color-mix(in srgb, var(--c1) 9%, transparent); border-color: color-mix(in srgb, var(--c1) 22%, transparent); color: color-mix(in srgb, var(--c1) 35%, white); }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab) + var(--safe-b) + 14px); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
@media (min-width: 1024px) { .toasts { bottom: 28px; } }
.toast { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 14px; font-size: 14px; font-weight: 550; background: #221e30; border: 1px solid var(--line2); box-shadow: var(--shadow); animation: up 0.25s both; }
.toast svg { width: 17px; height: 17px; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--err); }

/* ---------- setup wizard ---------- */
.setup { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 20px 16px 40px; }
.setup-top { width: 100%; max-width: 640px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.setup-card { width: 100%; max-width: 640px; padding: 26px 22px; border-radius: var(--r4); }
@media (min-width: 640px) { .setup-card { padding: 34px 36px; } }
.stepper { display: flex; align-items: center; gap: 6px; margin-bottom: 26px; }
.stepper .s { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.stepper .bar { height: 4px; border-radius: 99px; background: var(--surface3); overflow: hidden; }
.stepper .bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width 0.4s ease; }
.stepper .s.done .bar i, .stepper .s.on .bar i { width: 100%; }
.stepper .lbl { font-size: 11.5px; font-weight: 650; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .s.on .lbl, .stepper .s.done .lbl { color: var(--text2); }
.setup-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; }
.brand-preview { border-radius: var(--r3); padding: 22px; border: 1px solid var(--line); background: radial-gradient(100% 120% at 0% 0%, color-mix(in srgb, var(--c1) 30%, transparent), transparent 60%), radial-gradient(100% 120% at 100% 100%, color-mix(in srgb, var(--c2) 22%, transparent), transparent 60%), var(--bg2); }
.provider { padding: 16px; border-radius: var(--r3); border: 1px solid var(--line); background: var(--surface); }
.provider + .provider { margin-top: 12px; }
.provider-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--surface3); font-weight: 800; font-size: 14px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }

/* ---------- admin ---------- */
.adm { min-height: 100dvh; }
.adm-side { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: 264px; padding: 18px 12px; overflow-y: auto; background: #0e0c16; border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform 0.25s ease; }
.adm-side.open { transform: none; box-shadow: var(--shadow); }
.adm-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, 0.5); }
.adm-main { min-height: 100dvh; }
.adm-top { position: sticky; top: 0; z-index: 20; height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: rgba(10, 9, 16, 0.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.adm-body { padding: 20px 16px 60px; max-width: 1180px; }
@media (min-width: 1024px) {
  .adm-side { transform: none; }
  .adm-scrim, .adm-menu-btn { display: none; }
  .adm-main { margin-left: 264px; }
  .adm-body { padding: 28px 36px 60px; }
}
.adm-group { margin-top: 18px; }
.adm-group-t { padding: 0 12px 6px; font-size: 11px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.adm-link { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 550; color: var(--muted); transition: all 0.15s; }
.adm-link svg { width: 17px; height: 17px; flex: none; }
.adm-link:hover { background: var(--surface); color: var(--text); }
.adm-link.on { background: var(--surface2); color: var(--text); }
.adm-link.on svg { color: color-mix(in srgb, var(--c1) 45%, white); }
.adm-link .phase { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--faint); }
.adm-h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.adm-h h1 { font-size: 24px; font-weight: 780; letter-spacing: -0.03em; margin: 0; }
.adm-h p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.grid-4 { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 18px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); }
.stat-l { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-l svg { width: 15px; height: 15px; }
.stat-v { font-size: 28px; font-weight: 780; letter-spacing: -0.03em; margin-top: 6px; }
.sec-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sec-t h2 { font-size: 16px; font-weight: 720; margin: 0; letter-spacing: -0.02em; }
.table-wrap { overflow-x: auto; border-radius: var(--r3); border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 650; font-size: 12px; color: var(--muted); padding: 11px 14px; background: var(--surface); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check-item:last-child { border-bottom: 0; }
.check-ic { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.check-ic svg { width: 16px; height: 16px; }
.check-ic.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.check-ic.no { background: var(--surface2); color: var(--faint); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars i { width: 100%; max-width: 28px; border-radius: 6px 6px 3px 3px; background: var(--grad); min-height: 3px; opacity: 0.85; }
.bars span { font-size: 10.5px; color: var(--faint); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.savebar { position: sticky; bottom: 16px; z-index: 10; display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.phase-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--c1) 16%, transparent); color: color-mix(in srgb, var(--c1) 40%, white); font-size: 12px; font-weight: 700; }
.l10n-tabs { display: flex; gap: 4px; }
.l10n-tabs button { height: 26px; padding: 0 9px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--faint); background: var(--surface); }
.l10n-tabs button[aria-pressed='true'] { color: var(--text); background: var(--surface3); }
.skeleton { border-radius: var(--r2); background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ======================= P1: 공용 ======================= */
.mb-12 { margin-bottom: 12px; }
.mt-12 { margin-top: 12px; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.link, .link-btn { color: color-mix(in srgb, var(--c1) 45%, white); font-weight: 600; }
.link-btn { font-size: 13.5px; padding: 8px; }
.req { color: var(--err); margin-left: 2px; }
.plus { color: var(--ok); }
.minus { color: var(--text2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line2); font-size: 13.5px; font-weight: 600; color: var(--text2); transition: all 0.15s; }
.pick:hover { background: var(--surface2); }
.pick.on { background: color-mix(in srgb, var(--c1) 24%, transparent); border-color: color-mix(in srgb, var(--c1) 60%, transparent); color: #fff; }
.pick:disabled { opacity: 0.5; }
.meter { height: 6px; border-radius: 99px; background: var(--surface2); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width 0.4s; }
.menu-list { display: flex; flex-direction: column; }
.menu-list > button, .menu-list > a { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 6px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 550; width: 100%; }
.menu-list > *:last-child { border-bottom: 0; }
.menu-list > * > .tiny { margin-left: auto; }
.menu-list .on { color: color-mix(in srgb, var(--c1) 45%, white); }
.menu-list .danger { color: var(--err); }
.menu-list .mi { width: 18px; text-align: center; font-size: 16px; }
.room-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface2); font-size: 12px; font-weight: 700; }
.menu-card { padding: 4px 18px; }
.menu-card .list-row svg:last-child { color: var(--faint); }
.me-stats a.stat:hover { background: var(--surface2); }

/* ======================= 만들기 ======================= */
.create-steps { display: flex; gap: 6px; margin-bottom: 22px; }
.create-steps i { flex: 1; height: 4px; border-radius: 99px; background: var(--surface2); transition: background 0.3s; }
.create-steps i.on { background: var(--grad); }
.create .eyebrow { height: 24px; padding: 0 10px; font-size: 11px; font-weight: 750; letter-spacing: 0.08em; margin-bottom: 10px; }
.create h1 + p { margin: 6px 0 0; }
.photo-pick { display: flex; align-items: center; gap: 16px; }
.photo-pick.big { flex-direction: column; align-items: stretch; gap: 10px; }
.pp-frame { position: relative; width: 96px; height: 120px; flex: none; border-radius: 18px; border: 1.5px dashed var(--line2); background: var(--surface) center / cover no-repeat; color: var(--muted); display: grid; place-items: center; overflow: hidden; transition: border-color 0.2s; }
.pp-frame:hover { border-color: color-mix(in srgb, var(--c1) 60%, transparent); }
.photo-pick.big .pp-frame { width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 52vh; border-radius: 24px; }
.pp-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); }
.spin-dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.8s linear infinite; }
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-pick button { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line2); transition: all 0.15s; }
.mode-pick button b { display: flex; align-items: center; gap: 4px; font-size: 14.5px; }
.mode-pick button span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.mode-pick button.on { border-color: color-mix(in srgb, var(--c1) 70%, transparent); background: color-mix(in srgb, var(--c1) 14%, transparent); }
.mode-pick button.adult.on { border-color: color-mix(in srgb, var(--err) 70%, transparent); background: color-mix(in srgb, var(--err) 12%, transparent); }
.ai-btn { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--c1) 40%, white); background: color-mix(in srgb, var(--c1) 16%, transparent); }
.ai-btn:hover { background: color-mix(in srgb, var(--c1) 26%, transparent); }
.ai-btn:disabled { opacity: 0.6; }
.gen-wait { min-height: 52vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.gen-wait p { margin: 0; max-width: 320px; }
.gen-orb { width: 132px; height: 132px; border-radius: 40px; display: grid; place-items: center; background: var(--grad); box-shadow: var(--glow); overflow: hidden; animation: breathe 1.8s ease-in-out infinite; color: #fff; margin-bottom: 10px; }
.gen-orb svg { width: 46px; height: 46px; }
.gen-orb img { width: 100%; height: 100%; object-fit: cover; }
@keyframes breathe { 0%, 100% { transform: scale(1); filter: saturate(1); } 50% { transform: scale(1.06); filter: saturate(1.3); } }
.char-preview { border-radius: var(--r4); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.cp-cover { aspect-ratio: 16 / 10; background: var(--grad) center / cover no-repeat; display: grid; place-items: center; }
.cp-cover.tall { aspect-ratio: 4 / 4.2; }
.cp-initial { font-size: 72px; font-weight: 800; color: rgba(255, 255, 255, 0.9); }
.cp-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.cp-name { font-size: 22px !important; font-weight: 750; }
.cp-first { max-width: 100%; white-space: pre-line; }
.create-card.locked { border-style: solid; border-color: var(--line2); background: var(--surface); }
.create-card.locked .plus { background: var(--surface3); box-shadow: none; }
.savebar .btn-primary { box-shadow: var(--glow); }

/* ======================= 목록 ======================= */
.char-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .char-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .char-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.char-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r3); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform 0.2s, border-color 0.2s; }
.char-card:hover { transform: translateY(-2px); border-color: var(--line2); }
.cc-link { display: flex; flex-direction: column; }
.portrait { aspect-ratio: 4 / 5; background: var(--grad) center / cover no-repeat; display: grid; place-items: center; }
.portrait span { font-size: 44px; font-weight: 800; color: rgba(255, 255, 255, 0.9); }
.room-row .portrait, .resume-card .portrait { width: 52px; height: 52px; aspect-ratio: auto; border-radius: 16px; flex: none; }
.room-row .portrait span, .resume-card .portrait span { font-size: 20px; }
.cc-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-tag { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; line-height: 1.4; }
.cc-edit { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(10, 9, 16, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; }
.explore-bar { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 860px) { .explore-bar { flex-direction: row; align-items: center; justify-content: space-between; } }
.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line2); color: var(--muted); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 15px; color: var(--text); }
.room-row, .resume-card { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r3); transition: background 0.15s; }
.room-row:hover { background: var(--surface); }
.resume-card { background: color-mix(in srgb, var(--c1) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c1) 35%, transparent); }

/* ======================= 대화 ======================= */
.main-chat { padding-bottom: 0 !important; }
.chat { display: flex; flex-direction: column; height: 100dvh; max-width: 860px; margin: 0 auto; }
.chat-top { flex: none; display: flex; align-items: center; gap: 4px; height: 60px; padding: 0 8px; border-bottom: 1px solid var(--line); background: rgba(10, 9, 16, 0.8); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.chat-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 12px; }
.chat-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-who:hover { background: var(--surface); }
.chat-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 14px 12px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg.me { justify-content: flex-end; }
.msg .avatar { width: 34px; height: 34px; font-size: 14px; }
.msg-col { display: flex; flex-direction: column; gap: 6px; max-width: min(84%, 620px); }
.msg.me .msg-col { align-items: flex-end; }
.msg .bubble { max-width: 100%; text-align: left; white-space: pre-wrap; font-size: 15px; line-height: 1.62; cursor: pointer; }
.msg.f-s .bubble { font-size: 13.5px; }
.msg.f-l .bubble { font-size: 17px; }
.msg .bubble em { font-style: normal; color: #c4b5fd; opacity: 0.95; }
.msg .bubble.me em { color: rgba(255, 255, 255, 0.78); }
.bubble.streaming::after { content: ''; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; opacity: 0.6; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.msg-img { max-width: 240px; max-height: 300px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); }
.load-older { align-self: center; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--muted); }
.chat-err { align-self: center; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 12px 14px; border-radius: var(--r2); background: color-mix(in srgb, var(--err) 10%, transparent); border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); font-size: 13.5px; text-align: center; }
.composer { flex: none; padding: 8px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: rgba(10, 9, 16, 0.85); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.composer-tools { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.composer-tools::-webkit-scrollbar { display: none; }
.tool { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--text2); }
.tool:hover { background: var(--surface2); }
.tool:disabled { opacity: 0.45; }
.composer-hint { margin-left: auto; flex: none; white-space: nowrap; padding-left: 8px; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer-input { flex: 1; min-height: 44px; max-height: 160px; resize: none; padding: 11px 14px; border-radius: 22px; background: var(--surface2); border: 1px solid var(--line2); outline: none; font-size: 16px; line-height: 1.45; color: var(--text); }
.composer-input:focus { border-color: color-mix(in srgb, var(--c1) 60%, white); }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--text2); background: var(--surface); }
.icon-btn.locked { opacity: 0.45; }
.send-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--glow); transition: transform 0.15s, opacity 0.15s; }
.send-btn:disabled { opacity: 0.35; box-shadow: none; }
.send-btn:active { transform: scale(0.94); }
.send-btn.stop { background: var(--surface3); box-shadow: none; }
.composer-img { position: relative; display: inline-block; margin-bottom: 8px; }
.composer-img img { height: 72px; border-radius: 12px; }
.composer-img button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #000; color: #fff; }
.suggest-item { text-align: left; padding: 13px 15px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line2); font-size: 14.5px; line-height: 1.5; transition: all 0.15s; }
.suggest-item:hover { border-color: color-mix(in srgb, var(--c1) 55%, transparent); background: color-mix(in srgb, var(--c1) 10%, transparent); }
.suggest-item em { font-style: normal; color: #c4b5fd; }
.memory-box { padding: 14px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; font-size: 14px; line-height: 1.6; min-height: 100px; }
.color-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.color-row input { width: 30px; height: 30px; border: 0; padding: 0; background: none; border-radius: 8px; cursor: pointer; }
.guest-bar { flex: none; padding: 8px 14px; font-size: 12.5px; text-align: center; color: var(--text2); background: color-mix(in srgb, var(--c1) 12%, transparent); border-bottom: 1px solid var(--line); }
@media (min-width: 1024px) {
  .chat-list { padding: 24px 28px 14px; }
  .composer { padding: 10px 24px 16px; }
}

/* ======================= 마이 ======================= */
.free-box b { font-variant-numeric: tabular-nums; }
.points-hero { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 22%, transparent), color-mix(in srgb, var(--c2) 14%, transparent)); }
.points-v { font-size: 40px; font-weight: 800; letter-spacing: -0.04em; }
.points-v small { font-size: 20px; margin-left: 4px; opacity: 0.7; }
