/* 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; }
/* 대화 화면에는 아래 탭이 없으므로 알림을 입력창 위로 */
.chat-shell .toasts { bottom: calc(var(--safe-b) + 128px); }
@media (min-width: 1024px) { .chat-shell .toasts { bottom: 130px; } }
/* 대화 화면: 문서 스크롤을 잠그고 보이는 영역(자판 제외)에 딱 맞춤 */
html.chat-lock, html.chat-lock body { overflow: hidden; overscroll-behavior: none; height: 100%; }
.chat { position: fixed; left: 0; right: 0; top: var(--app-top, 0px); height: var(--app-h, 100dvh); margin: 0 auto; z-index: 20; }
@media (min-width: 1024px) { .chat { left: var(--side); } }

/* ======================= P1 관리자 ======================= */
.table tr.row-link { cursor: pointer; }
.table tr.row-link:hover td { background: var(--surface); }
.input-unit { position: relative; display: block; }
.input-unit .input { padding-right: 52px; }
.input-unit i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--muted); pointer-events: none; }
.fx-input { width: 64px; height: 26px; padding: 0 6px; margin: 0 4px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--line2); color: var(--text); font-size: 12px; }
.adm-chat { display: flex; flex-direction: column; gap: 14px; }
.adm-msg { max-width: 80%; display: flex; flex-direction: column; gap: 4px; }
.adm-msg.me { align-self: flex-end; align-items: flex-end; }
.adm-msg-b { padding: 10px 14px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--line); white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.adm-msg.me .adm-msg-b { background: color-mix(in srgb, var(--c1) 22%, transparent); border-color: color-mix(in srgb, var(--c1) 40%, transparent); }

/* ======================= P2 상점 · 결제 ======================= */
.shop-wallet { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 20%, transparent), color-mix(in srgb, var(--c2) 12%, transparent)); }
.shop-tabs { width: 100%; display: flex; }
.shop-tabs button { flex: 1; }
.pkg { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); transition: all 0.15s; }
.pkg:hover { border-color: color-mix(in srgb, var(--c1) 55%, transparent); background: color-mix(in srgb, var(--c1) 8%, transparent); }
.pkg-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c1) 18%, transparent); color: color-mix(in srgb, var(--c1) 45%, white); }
.pkg-p { font-size: 19px; font-weight: 780; letter-spacing: -0.02em; }
.pkg-bonus { color: var(--ok); font-weight: 650; }
.pkg-price { font-weight: 700; white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: var(--surface2); font-size: 14px; }
.plan-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }
.plan { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); }
.plan.best { border-color: color-mix(in srgb, var(--c1) 65%, transparent); background: color-mix(in srgb, var(--c1) 9%, transparent); box-shadow: var(--glow); }
.plan.on { outline: 2px solid var(--ok); outline-offset: -2px; }
.plan-flag { position: absolute; top: -10px; right: 16px; height: 22px; padding: 0 10px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 750; display: inline-flex; align-items: center; }
.plan-price { color: var(--muted); font-size: 13px; }
.plan-price b { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.03em; margin-right: 2px; }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; flex: 1; }
.plan-list li { display: flex; align-items: center; gap: 8px; }
.plan-list li svg { color: var(--ok); flex: none; }
.plan-list li.off { color: var(--faint); }
.plan-list li.off svg { color: var(--faint); }
.checkout-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line); }
.checkout-price { font-size: 20px; font-weight: 800; white-space: nowrap; }
.prov { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: var(--r2); background: var(--surface); border: 1px solid var(--line2); text-align: left; }
.prov.on { border-color: color-mix(in srgb, var(--c1) 70%, transparent); background: color-mix(in srgb, var(--c1) 12%, transparent); }
.prov:disabled { opacity: 0.45; }
.toss-box { background: #fff; border-radius: var(--r2); overflow: hidden; min-height: 40px; }
.pay-result { position: relative; overflow: hidden; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; background: var(--c1); animation: fall 1.8s ease-in forwards; }
.confetti i:nth-child(3n) { background: var(--c2); }
.confetti i:nth-child(4n) { background: #fbbf24; }
.confetti i:nth-child(5n) { background: #34d399; }
@keyframes fall { to { transform: translateY(520px) rotate(540deg); opacity: 0; } }

/* ======================= 공개 로비 (P2-2a) ======================= */
.search-wide { max-width: none; width: 100%; }
.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text2); white-space: nowrap; transition: all 0.15s; }
.cat-chip.on { background: var(--grad); color: #fff; border-color: transparent; }
.chip.on { background: color-mix(in srgb, var(--c1) 22%, transparent); color: var(--text); border-color: color-mix(in srgb, var(--c1) 45%, transparent); }
button.chip, a.chip { cursor: pointer; }
.tag-cloud .chip { height: 28px; font-size: 12.5px; }
.lobby-sec { margin-top: 28px; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -4px; padding-left: 4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.hs-item { flex: none; width: 42vw; max-width: 200px; scroll-snap-align: start; }
@media (min-width: 720px) { .hs-item { width: 190px; } }
.hs-item .char-card { height: 100%; }
.lobby-card .cc-stats { margin-top: 2px; }
.rank-badge { position: absolute; top: 8px; left: 8px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: rgba(10, 9, 16, 0.65); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rank-badge.top { background: var(--grad); box-shadow: var(--glow); }
.like-fab { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: rgba(10, 9, 16, 0.55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform 0.15s; }
.like-fab:active { transform: scale(0.9); }
.like-fab.on svg { fill: #ff5c8a; color: #ff5c8a; }
.news-dot { position: absolute; top: 48px; right: 8px; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: var(--err); color: #fff; }
.tabs3 { display: flex; width: 100%; }
.tabs3 button { flex: 1; }
.post-card { padding: 16px; }
.post-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--r2); display: block; }
.cmt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.cmt .avatar { flex: none; }
.cmt-form { display: flex; gap: 8px; }
.cmt-form .input { flex: 1; }
.creator-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lvl { background: color-mix(in srgb, var(--c1) 18%, transparent); color: color-mix(in srgb, var(--c1) 45%, white); }
.lvl4, .lvl5 { background: var(--grad); color: #fff; }
.gap-6 { gap: 6px; }
.mb-8 { margin-bottom: 8px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.seg button { white-space: nowrap; }
.page-head .seg { flex: none; }

/* ======================= 앨범 · 팩 (P2-2b) ======================= */
.a-grid { display: grid; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 720px) { .a-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .a-grid.wide { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.a-sk { aspect-ratio: 3 / 4; height: auto !important; }
.a-tile { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface2); border: 1px solid var(--line); display: block; width: 100%; padding: 0; }
.a-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a-tile .a-blur { filter: blur(14px) saturate(1.2); transform: scale(1.25); }
.a-tile .a-ph { position: absolute; inset: 0; background: var(--grad); opacity: 0.35; }
.a-tile.locked::after { content: ''; position: absolute; inset: 0; background: rgba(10, 9, 16, 0.35); }
.a-tile.sel { outline: 3px solid var(--c1); outline-offset: -3px; }
.a-lock { position: absolute; left: 6px; bottom: 6px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(234, 179, 8, 0.9); }
.a-lock.t-keyword { background: rgba(168, 85, 247, 0.9); }
.a-lock.t-affinity { background: rgba(236, 72, 153, 0.9); }
.a-lock.t-day { background: rgba(59, 130, 246, 0.9); }
.a-vid { position: absolute; right: 6px; top: 6px; z-index: 1; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 6px; font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.6); }
.a-check { position: absolute; left: 6px; top: 6px; z-index: 1; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.aff-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r2); background: color-mix(in srgb, var(--c1) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c1) 25%, transparent); font-size: 13.5px; font-weight: 600; }
.aff-bar svg { color: #ff5c8a; }
.viewer { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.94); display: grid; place-items: center; padding: 48px 8px 56px; }
.v-media { max-width: 100%; max-height: calc(100dvh - 110px); object-fit: contain; border-radius: 8px; }
.v-close { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.1); z-index: 2; }
.v-count { position: absolute; top: max(20px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); font-size: 13px; color: rgba(255, 255, 255, 0.8); }
.v-title { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; margin: 0; }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.08); border-radius: 12px; }
.v-nav.l { left: 8px; } .v-nav.r { right: 8px; }
@media (pointer: coarse) { .v-nav { display: none; } }
.unlock-fx { position: relative; width: min(340px, 92vw); padding: 28px 22px 22px; border-radius: var(--r3); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; overflow: hidden; }
.ufx-img { width: 140px; height: 180px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: var(--surface2); margin: 0 auto; position: relative; }
.ufx-img img { width: 100%; height: 100%; object-fit: cover; }
.ufx-img .a-blur { filter: blur(12px); transform: scale(1.2); }
.unlock-fx .ufx-img { box-shadow: var(--glow); animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.stars { position: absolute; left: 50%; top: 110px; width: 0; height: 0; pointer-events: none; }
.stars i { position: absolute; width: 10px; height: 10px; background: #fbbf24; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); animation: burst 0.9s ease-out forwards; }
.stars i:nth-child(3n) { background: var(--c1); } .stars i:nth-child(4n) { background: var(--c2); }
@keyframes burst { from { transform: rotate(var(--a)) translateY(0) scale(0.4); opacity: 1; } to { transform: rotate(var(--a)) translateY(-130px) scale(1.1); opacity: 0; } }
.a-toolbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 18px; max-width: calc(100vw - 16px); overflow-x: auto; }
@media (min-width: 1024px) { .a-toolbar { bottom: 20px; } }
.a-move { width: auto; height: 34px; min-width: 120px; font-size: 13px; padding-top: 0; padding-bottom: 0; }
.wrap-seg { flex-wrap: wrap; border-radius: 18px; }
.drop-on { outline: 2px dashed var(--c1); outline-offset: 4px; }
.group-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tabs3 button .tiny { opacity: 0.7; margin-left: 2px; }
.tool.locked { opacity: 0.6; }

/* ======================= 소통 (P3-1) ======================= */
.doc p { margin: 0 0 6px; line-height: 1.7; font-size: 14.5px; color: var(--text2); white-space: pre-wrap; }
.doc .doc-h { margin: 18px 0 8px; font-size: 16px !important; }
.doc .doc-li { padding-left: 4px; }
.doc > div { margin-bottom: 10px; }
.faq-q { width: 100%; text-align: left; gap: 10px; }
.faq-a { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r2); background: var(--surface2); color: var(--text2); }
.msg-row { width: 100%; }
.msg-body { padding: 4px 0 16px 20px; border-bottom: 1px solid var(--line); }
.tk-msg { max-width: 88%; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tk-msg.me { align-self: flex-end; background: color-mix(in srgb, var(--c1) 14%, transparent); border-color: color-mix(in srgb, var(--c1) 30%, transparent); }
.tk-msg.admin { align-self: flex-start; }
.tab-ic { position: relative; display: inline-flex; }
.tab-dot { position: absolute; top: -1px; right: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); box-shadow: 0 0 0 2px var(--bg); }
.banner { position: relative; margin-bottom: 16px; border-radius: var(--r3); overflow: hidden; }
.banner-in { display: flex; align-items: flex-end; width: 100%; min-height: 110px; aspect-ratio: 16 / 5; padding: 16px 18px; text-align: left; background: var(--grad) center / cover no-repeat; color: #fff; border: 0; }
@media (max-width: 600px) { .banner-in { aspect-ratio: 16 / 7; } }
.banner-txt { display: flex; flex-direction: column; gap: 2px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.banner-txt b { font-size: 17px; }
.banner-dots { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 5px; }
.banner-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); cursor: pointer; }
.banner-dots i.on { background: #fff; width: 18px; border-radius: 4px; }
.popup { position: relative; width: min(380px, 92vw); border-radius: var(--r3); overflow: hidden; display: flex; flex-direction: column; }
.popup-img { width: 100%; max-height: 60vh; object-fit: cover; display: block; cursor: pointer; }
.popup-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.popup-foot { display: flex; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); }
.popup-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); color: #fff; z-index: 1; }
.agree-links { padding: 4px 0 0 30px; }
.adm-tk { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .adm-tk { grid-template-columns: 360px 1fr; } }
.adm-tk-list { max-height: 70vh; overflow: auto; }
.adm-tk-row { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid transparent; }
.adm-tk-row.on { background: var(--surface2); border-color: var(--line2); }
.promo-thumb { width: 72px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--grad); display: block; }

/* 캐릭터별 AI 모델 고르기 */
.model-pick{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}
.model-pick button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;line-height:1.45;text-align:left;padding:10px 12px;border-radius:12px;border:1px solid var(--line,rgba(255,255,255,.12));background:transparent;color:inherit;cursor:pointer}
.model-pick button[aria-pressed=true]{border-color:var(--brand,#c084fc);background:rgba(192,132,252,.12)}
.model-pick b{display:flex;gap:6px;align-items:center;font-size:14px}

/* 목소리 고르기 */
.voice-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.voice-item{display:flex;align-items:stretch;border:1px solid var(--line,rgba(255,255,255,.12));border-radius:12px;overflow:hidden}
.voice-item.on{border-color:var(--brand,#c084fc);background:rgba(192,132,252,.12)}
.voice-pick{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:10px 12px;background:none;border:0;color:inherit;text-align:left;cursor:pointer;line-height:1.4}
.voice-play{width:44px;display:grid;place-items:center;background:rgba(255,255,255,.05);border:0;border-left:1px solid var(--line,rgba(255,255,255,.12));color:inherit;cursor:pointer}
.voice-play:disabled{opacity:.4}
.voice-play .spin{width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.chip.on{border-color:var(--brand,#c084fc);background:rgba(192,132,252,.18)}

/* 친구 초대 */
.invite-hero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px}
.invite-rules{list-style:none;padding:0;margin:4px 0 8px;display:flex;flex-direction:column;gap:4px;font-size:14px;color:var(--text2)}
.invite-rules li::before{content:'✓ ';color:var(--brand,#c084fc)}
.invite-code{display:flex;align-items:center;gap:10px;padding:10px 14px;border:1px dashed var(--line);border-radius:14px;background:var(--surface2)}
.invite-code b{font-size:22px;letter-spacing:3px}
.invite-hero .row{width:100%}

/* ---------- 대화 공유 ---------- */
.share-days { display: flex; flex-wrap: wrap; gap: 6px; max-height: 210px; overflow-y: auto; padding: 2px; }
.share-days .chip { height: 34px; }
.share-done { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--c1) 14%, transparent); text-align: center; }
.share-done svg { color: var(--c1); }
.share-url { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; word-break: break-all; user-select: all; }
.note-line { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(239, 68, 68, 0.1); color: #fca5a5; }
.share-page { padding-bottom: 40px; }
.share-head { display: flex; align-items: center; gap: 12px; }
.share-head .h3 { margin: 0; }
.share-msgs { display: flex; flex-direction: column; gap: 10px; padding: 16px 2px; }
.share-msgs .bubble { cursor: default; white-space: pre-wrap; }
.day-sep { display: flex; justify-content: center; margin: 8px 0; }
.day-sep span { font-size: 12px; color: var(--muted); padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.share-locked { position: relative; margin: 16px 0; min-height: 360px; }
.share-blur { filter: blur(8px); opacity: 0.6; pointer-events: none; display: flex; flex-direction: column; gap: 12px; padding: 12px 0; user-select: none; }
.share-lock { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(320px, 90%); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.share-lock svg { color: var(--c2); }
.share-cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.share-item { display: flex; align-items: center; gap: 10px; }
.share-item.dim { opacity: 0.55; }
.seg-full { display: flex; width: 100%; }
.seg-full button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.seg button:disabled { opacity: 0.5; cursor: not-allowed; }
.card-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.card-thumb { position: relative; flex: none; width: 46%; scroll-snap-align: start; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.card-strip.story .card-thumb { width: 36%; }
.card-thumb img { display: block; width: 100%; height: auto; }
.card-thumb span { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; }

/* ---------- 이벤트 ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ev-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: inherit; text-decoration: none; transition: transform 0.15s; }
.ev-card:hover { transform: translateY(-2px); }
.ev-card.dim { opacity: 0.55; }
.ev-cover { position: relative; aspect-ratio: 1200 / 630; background: var(--grad) center / cover no-repeat; display: grid; place-items: center; color: rgba(255, 255, 255, 0.85); }
.ev-cover > svg { width: 40px; height: 40px; }
.ev-dday { position: absolute; top: 10px; left: 10px; backdrop-filter: blur(6px); background: rgba(10, 9, 16, 0.6); color: #fff; }
.ev-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.ev-reward { color: color-mix(in srgb, var(--c1) 40%, white); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-detail { display: flex; flex-direction: column; gap: 10px; }
.ev-hero { width: 100%; border-radius: 14px; display: block; }
.ev-summary { margin: 4px 0; font-size: 16px; color: var(--text2); }
.ev-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: color-mix(in srgb, var(--c1) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c1) 30%, transparent); }
.sheet .grid-2 > *, .sheet .grid-3 > * { min-width: 0; }
.sheet input[type='datetime-local'] { width: 100%; min-width: 0; }

/* ---------- 오늘의 보상 ---------- */
.rw-card { display: flex; flex-direction: column; gap: 12px; }
.rw-row { display: flex; align-items: center; gap: 12px; }
.rw-month { display: grid; grid-template-columns: repeat(16, 1fr); gap: 5px; }
.rw-month i { aspect-ratio: 1; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line); }
.rw-month i.on { background: var(--grad); border-color: transparent; }
.rw-month i.today { outline: 2px solid color-mix(in srgb, var(--c1) 70%, white); outline-offset: 1px; }
.rw-month i.future { opacity: 0.4; }

/* ---------- 선물 ---------- */
.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gift-card { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; min-width: 0; }
.gift-card:hover { border-color: color-mix(in srgb, var(--c1) 50%, transparent); }
.gift-img { aspect-ratio: 1; border-radius: 10px; background: var(--grad) center / cover no-repeat; display: grid; place-items: center; color: rgba(255, 255, 255, 0.85); }
.gift-price { font-weight: 700; color: color-mix(in srgb, var(--c1) 40%, white); }
.gift-heart { color: #f472b6; }
.gift-slide { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 1; }
.gift-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gs-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: #fff; display: grid; place-items: center; }
.gs-nav.l { left: 8px; } .gs-nav.r { right: 8px; }
.gs-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.gs-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); }
.gs-dots i.on { background: #fff; }
.sup-rank { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--surface2); }
.sup-rank.r1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1205; }
.sup-rank.r2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #111; }
.sup-rank.r3 { background: linear-gradient(135deg, #f0a46b, #b45309); color: #1a0d03; }
.sup-me { background: color-mix(in srgb, var(--c1) 10%, transparent); border-radius: 10px; }
.gift-thumb-ed { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); display: grid; place-items: center; background: var(--surface); cursor: pointer; }
.gift-thumb-ed img { width: 100%; height: 100%; object-fit: cover; }
.gift-thumb-ed button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; display: grid; place-items: center; }

/* ---------- 교감도 ---------- */
.aff-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #f9a8d4; background: rgba(244, 114, 182, 0.12); border: 1px solid rgba(244, 114, 182, 0.25); flex: none; }
.aff-head { display: flex; align-items: center; gap: 14px; }
.aff-big { width: 44px; height: 44px; color: #f472b6; fill: rgba(244, 114, 182, 0.25); }
.aff-stats { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text2); }
.aff-stats span { display: inline-flex; align-items: center; gap: 5px; }
.aff-track { position: relative; height: 10px; border-radius: 999px; background: var(--surface2); margin: 10px 8px 4px; }
.aff-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #f472b6, var(--c2)); }
.aff-dot { position: absolute; top: 50%; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--bg2); border: 2px solid var(--line2); }
.aff-dot.on { background: #f472b6; border-color: #fff; }
.aff-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.aff-step { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.aff-step.on { color: var(--text); border-color: rgba(244, 114, 182, 0.4); background: rgba(244, 114, 182, 0.08); }
.aff-convert { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); }
.aff-num { color: #f9a8d4; }

/* ===== P4-4 자동 대화 · 답변 넘겨보기 · 단계 · 출석 길 · 연출 ===== */
.auto-bar { display: flex; align-items: center; gap: 10px; margin: 0 12px 6px; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--c1) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c1) 35%, transparent); color: var(--text); animation: fadeUp 0.2s ease; }
.auto-bar svg { color: color-mix(in srgb, var(--c1) 60%, white); flex: none; }
.auto-dots { display: inline-block; width: 18px; }
.auto-dots::after { content: '…'; animation: autoDots 1.2s steps(4) infinite; display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; }
@keyframes autoDots { to { width: 1.2em; } }
.auto-mark { align-self: flex-end; display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); opacity: 0.85; }
.auto-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auto-mode button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; border-radius: 14px; text-align: left; background: var(--surface); border: 1.5px solid var(--line); transition: all 0.15s; }
.auto-mode button.on { border-color: color-mix(in srgb, var(--c1) 70%, white); background: color-mix(in srgb, var(--c1) 12%, var(--surface)); }
.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.concept { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); transition: all 0.15s; }
.concept .ce { font-size: 22px; line-height: 1; }
.concept.on { border-color: color-mix(in srgb, var(--c1) 70%, white); background: color-mix(in srgb, var(--c1) 12%, var(--surface)); transform: translateY(-1px); }
.auto-cost { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); }
.gap-14 { gap: 14px; }
.alt-nav { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--muted); }
.alt-nav button { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--text2); }
.alt-nav button:disabled { opacity: 0.35; }
.alt-nav .tiny { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.msg.fresh .bubble { animation: freshIn 0.6s ease; box-shadow: 0 0 0 2px rgba(244, 114, 182, 0.35); }
@keyframes freshIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
.stage-tag { color: #f9a8d4; font-weight: 700; }
.stage-pill { flex: none; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: #fff; background: linear-gradient(90deg, #f472b6, var(--c2)); box-shadow: 0 4px 14px rgba(244, 114, 182, 0.3); }
.aff-nextbar { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(244, 114, 182, 0.07); border: 1px solid rgba(244, 114, 182, 0.2); }
.aff-meter { position: relative; height: 8px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.aff-meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #f472b6, var(--c2)); transition: width 0.5s ease; }
.aff-meter i.ghost { background: repeating-linear-gradient(45deg, rgba(244, 114, 182, 0.55) 0 6px, rgba(244, 114, 182, 0.25) 6px 12px); border-radius: 0 999px 999px 0; animation: ghostPulse 1.4s ease-in-out infinite; }
@keyframes ghostPulse { 50% { opacity: 0.55; } }
.aff-sname { color: var(--text); font-size: 13px; }
.stage-edit td { background: var(--surface); }
/* 단계 달성 연출 */
.stage-fx { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: rgba(10, 6, 18, 0.55); backdrop-filter: blur(3px); animation: fadeIn 0.25s ease; cursor: pointer; }
.stage-fx.out { animation: fadeOut 0.45s ease forwards; }
.sf-hearts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sf-hearts i { position: absolute; bottom: -40px; left: var(--x); font-style: normal; color: #f472b6; font-size: calc(26px * var(--s)); animation: sfRise 2.6s ease-in var(--d) forwards; opacity: 0; }
@keyframes sfRise { 0% { opacity: 0; transform: translateY(0) scale(0.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-105vh) scale(1.2) rotate(20deg); } }
.sf-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 34px; border-radius: 24px; text-align: center; background: linear-gradient(160deg, rgba(244, 114, 182, 0.25), rgba(30, 20, 45, 0.95)); border: 1px solid rgba(244, 114, 182, 0.45); box-shadow: 0 20px 60px rgba(244, 114, 182, 0.35); animation: sfPop 0.55s cubic-bezier(0.2, 1.4, 0.4, 1); max-width: 86vw; }
.sf-k { font-size: 13px; font-weight: 700; color: #f9a8d4; letter-spacing: 0.04em; }
.sf-n { font-size: 30px; font-weight: 900; background: linear-gradient(90deg, #fff, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sf-d { font-size: 13.5px; color: var(--text2); }
@keyframes sfPop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
/* 하트 퐁퐁 */
.heart-burst { position: fixed; left: 50%; bottom: 30%; z-index: 9998; pointer-events: none; }
.heart-burst i { position: absolute; left: 0; bottom: 0; font-style: normal; color: #f472b6; font-size: 22px; opacity: 0; animation: hbUp 1.3s ease-out var(--d) forwards; }
.heart-burst b { position: absolute; left: 0; bottom: 30px; transform: translateX(-50%); white-space: nowrap; font-size: 22px; font-weight: 900; color: #fff; text-shadow: 0 2px 12px rgba(244, 114, 182, 0.9); animation: hbText 1.4s ease-out forwards; }
@keyframes hbUp { 0% { opacity: 0; transform: translate(0, 0) scale(0.5); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), -160px) scale(1.3); } }
@keyframes hbText { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.7); } 25% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }
/* 출석: 보너스 길 · 보호권 */
.rw-path { display: grid; grid-template-columns: repeat(auto-fit, minmax(34px, 1fr)); gap: 6px; }
.rw-step { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.rw-step i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--muted); background: var(--surface2); border: 1.5px solid var(--line); }
.rw-step small { font-size: 10.5px; color: var(--muted); }
.rw-step.on i { color: #fff; background: var(--grad); border-color: transparent; }
.rw-step.today i { border-color: color-mix(in srgb, var(--c1) 70%, white); color: var(--text); animation: todayPulse 1.6s ease-in-out infinite; }
.rw-step.bonus i { font-size: 16px; border-style: dashed; border-color: #fbbf24; }
.rw-step.bonus small { color: #fbbf24; font-weight: 700; }
@keyframes todayPulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 25%, transparent); } }
.rw-month i.shield { background: rgba(96, 165, 250, 0.55); border-color: transparent; }
/* 홈: 이벤트 배너 · 이어서 대화 */
.ev-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 16px; color: #fff; background: linear-gradient(100deg, #f472b6, var(--c2)); box-shadow: 0 8px 24px rgba(244, 114, 182, 0.25); }
.ev-banner .tiny { opacity: 0.9; }
.ev-b-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, 0.2); flex: none; }
.resume-strip { margin-bottom: 18px; }
.resume-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.resume-row::-webkit-scrollbar { display: none; }
.resume-item { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; width: 240px; max-width: 72vw; min-width: 0; overflow: hidden; scroll-snap-align: start; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.15s; }
.resume-item:hover { border-color: var(--line2); }
.resume-item.first { border-color: color-mix(in srgb, var(--c1) 45%, transparent); background: color-mix(in srgb, var(--c1) 8%, var(--surface)); }
.resume-item .portrait { width: 52px; height: 52px; flex: none; border-radius: 14px; aspect-ratio: auto; }
@media (prefers-reduced-motion: reduce) { .stage-fx, .sf-card, .sf-hearts i, .heart-burst i, .heart-burst b, .rw-step.today i, .aff-meter i.ghost, .msg.fresh .bubble { animation: none !important; } .sf-hearts, .heart-burst i { display: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== P4-5 시나리오 · P4-6 대화 내보내기 · 작은 개선 ===== */
.gap-10 { gap: 10px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scen-list { display: flex; flex-direction: column; gap: 8px; }
.scen-list.compact { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.scen-list.compact::-webkit-scrollbar { display: none; }
.scen-list.compact .scen-card { flex: 0 0 min(280px, 80vw); scroll-snap-align: start; }
.scen-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.15s, transform 0.15s; }
.scen-card:hover { border-color: var(--line2); }
.scen-card.on { border-color: color-mix(in srgb, var(--c1) 55%, transparent); background: color-mix(in srgb, var(--c1) 9%, var(--surface)); }
.scen-emoji { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; font-size: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 25%, transparent), color-mix(in srgb, var(--c2) 25%, transparent)); }
.scen-emoji.sm { width: 36px; height: 36px; font-size: 18px; border-radius: 11px; }
.scen-preview { margin: 4px 0 2px; font-size: 12.5px; color: var(--text2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: italic; }
.scen-hint { display: flex; flex-direction: column; gap: 10px; margin: 6px 4px 10px; padding: 12px; border-radius: 18px; background: color-mix(in srgb, var(--c1) 7%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--c1) 40%, transparent); animation: fadeUp 0.3s ease; }
.scen-hint b svg { color: color-mix(in srgb, var(--c1) 60%, white); }
.scen-tag { color: #fcd34d; font-weight: 700; }
.scen-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.scen-row:last-of-type { border-bottom: 0; }
.scen-row.off { opacity: 0.55; }
.scen-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; border-radius: 14px; border: 1.5px dashed var(--line2); color: var(--text2); background: var(--surface); }
.scen-empty:hover { border-color: color-mix(in srgb, var(--c1) 50%, transparent); color: var(--text); }
.scen-ai { display: flex; gap: 8px; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--c1) 8%, var(--surface)); }
.scen-ai .input { flex: 1; min-width: 0; }
.my-bond { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; color: #f9a8d4; background: rgba(244, 114, 182, 0.1); border: 1px solid rgba(244, 114, 182, 0.28); }
.my-bond b { color: #fff; }
.exp-ranges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.exp-range { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 14px; text-align: left; background: var(--surface); border: 1.5px solid var(--line); transition: all 0.15s; }
.exp-range.on { border-color: color-mix(in srgb, var(--c1) 70%, white); background: color-mix(in srgb, var(--c1) 12%, var(--surface)); }
.exp-range:disabled { opacity: 0.4; }
.exp-price { margin-top: 4px; font-weight: 800; color: color-mix(in srgb, var(--c1) 50%, white); }
.exp-formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.exp-format { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 14px; text-align: center; background: var(--surface); border: 1.5px solid var(--line); }
.exp-format svg { color: var(--text2); }
.exp-format.on { border-color: color-mix(in srgb, var(--c1) 70%, white); background: color-mix(in srgb, var(--c1) 12%, var(--surface)); }
.exp-format.on svg { color: color-mix(in srgb, var(--c1) 55%, white); }
.exp-row { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--surface); }
.list-row.off { opacity: 0.55; }
.typing-wrap { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
@media (max-width: 420px) { .exp-ranges, .exp-formats { gap: 6px; } .exp-range, .exp-format { padding: 10px 8px; } .scen-ai { flex-direction: column; } }

.resume-item > .col { min-width: 0; overflow: hidden; flex: 1; }
.resume-item .clamp1 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume-strip { min-width: 0; max-width: 100%; overflow: hidden; }
.resume-row { max-width: 100%; }

/* ---- 소개 사진·영상 ---- */
.intro-gallery { position: relative; margin: 0 -4px; }
.ig-row { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 4px 6px; scrollbar-width: none; }
.ig-row::-webkit-scrollbar { display: none; }
.ig-item { position: relative; flex: 0 0 auto; height: 220px; aspect-ratio: 0.75; border-radius: 14px; overflow: hidden; border: 1px solid var(--line, rgba(255,255,255,.08)); background: rgba(255,255,255,.04); padding: 0; cursor: zoom-in; scroll-snap-align: start; }
.ig-item img, .ig-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-item:hover img, .ig-item:hover video { transform: scale(1.03); transition: transform .3s; }
.ig-badge { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font-size: 11px; color: #fff; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.ig-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; }
.ig-nav.l { left: 4px; } .ig-nav.r { right: 4px; }
@media (max-width: 520px) { .ig-item { height: 180px; } }
.im-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.im-item, .im-add { position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.04); border: 1px solid var(--line, rgba(255,255,255,.08)); }
.im-item img, .im-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.im-tools { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.im-tools button { width: 24px; height: 24px; border-radius: 8px; border: 0; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; cursor: pointer; }
.im-tools button:disabled { opacity: .3; cursor: default; }
.im-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-style: dashed; color: var(--muted, #aaa); cursor: pointer; }
.im-add:hover { border-color: var(--brand, #a855f7); color: var(--brand, #a855f7); }

/* ---- 관리자: 히미루 고르기 (초성 검색) · 선물 AI ---- */
.char-picker { position: relative; }
.cp-cur { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer; min-width: 0; }
.cp-av { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.08) center/cover; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.cp-pop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); min-width: 240px; background: var(--card, #17121f); border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.45); overflow: hidden; }
.cp-search { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.cp-search input { flex: 1; background: none; border: 0; outline: 0; color: inherit; font: inherit; }
.cp-list { max-height: 280px; overflow-y: auto; padding: 4px; }
.cp-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: inherit; text-align: left; cursor: pointer; }
.cp-row:hover, .cp-row.on { background: rgba(168,85,247,.14); }
.gift-ai { display: flex; gap: 8px; align-items: center; }
.gift-ai .input { flex: 1; min-width: 0; }
@media (max-width: 520px) { .gift-ai { flex-direction: column; align-items: stretch; } }
.cp-pop { position: static; margin-top: 6px; box-shadow: none; }

/* ---- 소개 더하기 (P4-8) ---- */
.cp-banner { position: relative; aspect-ratio: 16 / 8; background: var(--grad) center / cover no-repeat; margin-bottom: 34px; }
.cp-banner-av { position: absolute; left: 18px; bottom: -30px; width: 76px; height: 76px; border-radius: 22px; border: 3px solid var(--bg, #0d0a12); background: var(--grad) center / cover; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.voice-sample { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(168,85,247,.45); background: rgba(168,85,247,.12); color: inherit; font-size: 13px; cursor: pointer; }
.voice-sample.on { background: var(--grad); border-color: transparent; color: #fff; }
.vs-wave { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.vs-wave i { width: 2px; background: currentColor; border-radius: 1px; animation: vsw .8s ease-in-out infinite; }
.vs-wave i:nth-child(2) { animation-delay: .15s } .vs-wave i:nth-child(3) { animation-delay: .3s } .vs-wave i:nth-child(4) { animation-delay: .45s }
@keyframes vsw { 0%,100% { height: 3px } 50% { height: 12px } }
.profile-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pc-row { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line, rgba(255,255,255,.07)); min-width: 0; }
.pc-row dt { font-size: 11px; color: var(--muted, #999); margin: 0; }
.pc-row dd { font-size: 14px; font-weight: 600; margin: 2px 0 0; overflow-wrap: anywhere; }
.world-head { background: none; border: 0; color: inherit; padding: 0; cursor: pointer; width: 100%; }
.world-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.world-body.open { display: block; }
.rot180 { transform: rotate(180deg); transition: transform .2s; }
.sample-chat { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.18); }
.sc-me { display: flex; justify-content: flex-end; }
.sc-ai { display: flex; gap: 8px; align-items: flex-start; }
.sc-av { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--grad) center / cover; display: grid; place-items: center; font-size: 12px; color: #fff; }
.sample-chat .bubble { max-width: 85%; cursor: default; }
.sample-chat .act { color: var(--muted, #aaa); }
.creator-note { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg, rgba(168,85,247,.12), rgba(236,72,153,.08)); }
.cn-q { flex: 0 0 auto; color: var(--brand, #a855f7); margin-top: 2px; }
.sim-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sim-row::-webkit-scrollbar { display: none; }
.sim-card { flex: 0 0 auto; width: 128px; display: flex; flex-direction: column; gap: 4px; scroll-snap-align: start; min-width: 0; }
.sim-img { position: relative; aspect-ratio: 3/4; border-radius: 14px; background: var(--grad) center / cover; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; }
.sim-19 { position: absolute; top: 6px; right: 6px; }
.cmt-pinned { background: rgba(168,85,247,.08); border: 1px solid rgba(168,85,247,.25); border-radius: 12px; padding: 10px; }
.pin-ic { color: var(--brand, #a855f7); }
.cover-pick { position: relative; aspect-ratio: 16 / 7; border-radius: 14px; border: 1px dashed var(--line, rgba(255,255,255,.18)); background: rgba(255,255,255,.03) center / cover; display: grid; place-items: center; cursor: pointer; }
.cover-pick.has { border-style: solid; cursor: default; }
.cover-tools { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; }
.pc-edit { display: grid; grid-template-columns: 1fr 2fr auto; gap: 6px; align-items: center; }
.sd-edit { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line, rgba(255,255,255,.07)); }

/* ---- 이모티콘 (P4-8) ---- */
.emo-picker { margin: 0 0 8px; border-radius: 16px; background: var(--card, #17121f); border: 1px solid var(--line, rgba(255,255,255,.1)); overflow: hidden; animation: fadeUp .18s ease; }
.ep-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); overflow-x: auto; scrollbar-width: none; }
.ep-tab { position: relative; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; border: 0; background: none; color: inherit; display: grid; place-items: center; cursor: pointer; padding: 3px; }
.ep-tab img { width: 100%; height: 100%; object-fit: contain; }
.ep-tab.on { background: rgba(168,85,247,.18); }
.ep-tab.shop { color: var(--brand, #a855f7); }
.ep-dot { position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: #ec4899; }
.ep-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px 0; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; padding: 8px; max-height: 210px; overflow-y: auto; }
.ep-item { aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; background: none; padding: 2px; cursor: pointer; }
.ep-item img { width: 100%; height: 100%; object-fit: contain; }
.ep-item:hover { background: rgba(255,255,255,.05); }
.ep-item.on { border-color: var(--brand, #a855f7); background: rgba(168,85,247,.1); }
.ep-empty { display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.ep-preview { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line, rgba(255,255,255,.08)); background: rgba(168,85,247,.06); }
.ep-preview img { width: 52px; height: 52px; object-fit: contain; }
.icon-btn.on { color: var(--brand, #a855f7); }
.msg-emo { display: block; width: 120px; height: 120px; object-fit: contain; margin: 0 0 4px auto; }
.msg.ai .msg-emo { margin-left: 0; }
.emo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.emo-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; border: 1px solid var(--line, rgba(255,255,255,.08)); background: rgba(255,255,255,.03); color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.emo-card:hover { border-color: rgba(168,85,247,.45); }
.ec-thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; aspect-ratio: 1; place-items: center; background: rgba(0,0,0,.15); border-radius: 10px; padding: 6px; }
.ec-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.ec-thumbs.sm { width: 52px; height: 52px; padding: 3px; gap: 2px; flex: 0 0 auto; }
.emo-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.ea-item { position: relative; aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; background: rgba(255,255,255,.03); padding: 4px; cursor: pointer; }
.ea-item img { width: 100%; height: 100%; object-fit: contain; }
.ea-item.on { border-color: var(--brand, #a855f7); }
.ea-item.admin { aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: default; }
.ea-item.admin img { width: 64px; height: 64px; }
.ea-emo { position: absolute; right: 2px; bottom: 0; font-size: 14px; }
.ea-big { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,.18); }
.ea-big img { width: 160px; height: 160px; object-fit: contain; }
.emo-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; color: inherit; cursor: pointer; }
.emo-how { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.emo-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ee-item { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 12px; border: 1px solid var(--line, rgba(255,255,255,.08)); background: rgba(255,255,255,.03); min-width: 0; }
.ee-item.miss { border-color: rgba(245,158,11,.6); }
.ee-img { position: relative; aspect-ratio: 1; background: rgba(0,0,0,.15); border-radius: 8px; }
.ee-img img { width: 100%; height: 100%; object-fit: contain; }
.ee-del, .ee-ai { position: absolute; top: 4px; width: 24px; height: 24px; border-radius: 8px; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ee-del { right: 4px; } .ee-ai { left: 4px; }
.input.xs, .select.xs { padding: 5px 8px; font-size: 12px; height: auto; min-height: 0; }
.ee-add { aspect-ratio: auto; min-height: 160px; }
.ok-text { color: #22c55e; }
.search-box { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line, rgba(255,255,255,.1)); background: rgba(255,255,255,.03); }
.search-box input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: inherit; font: inherit; }
@media (max-width: 520px) { .profile-card { grid-template-columns: 1fr 1fr; } .emo-list { grid-template-columns: 1fr 1fr; } }

/* ---- 둘러보기: 인기 시나리오 · 관계 배지 ---- */
.scen-pop { width: 220px; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; border: 1px solid var(--line, rgba(255,255,255,.08)); background: linear-gradient(160deg, rgba(168,85,247,.10), rgba(236,72,153,.05)); color: inherit; min-width: 0; }
.scen-pop:hover { border-color: rgba(168,85,247,.45); }
.sp-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sp-av { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--grad) center / cover; display: grid; place-items: center; font-size: 11px; color: #fff; }
.sp-foot { margin-top: auto; align-items: center; }
.chip-xs { padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 11px; }
.cc-bond { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(90deg, rgba(236,72,153,.75), rgba(168,85,247,.75)); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---- 마이: 내 크리에이터 페이지 바로가기 ---- */
.creator-entry { display: flex; align-items: center; gap: 12px; color: inherit; background: linear-gradient(135deg, rgba(168,85,247,.16), rgba(236,72,153,.10)); border-color: rgba(168,85,247,.35); }
.creator-entry:hover { border-color: rgba(168,85,247,.6); }
.ce-ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; }
.later-note { align-items: center; color: var(--muted, #aaa); }

/* ---- 오픈 전 잠금 ---- */
.preopen { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 20px 40px; gap: 24px; }
.po-top { position: absolute; top: 16px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; }
.po-card { max-width: 520px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 24px; border-radius: 24px; border: 1px solid var(--line, rgba(255,255,255,.1)); background: rgba(23,18,31,.7); backdrop-filter: blur(12px); }
.po-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.po-title { margin: 4px 0 0; }
.po-note { padding: 10px 14px; border-radius: 12px; background: rgba(245,158,11,.12); color: #fbbf24; }
.po-foot a { color: inherit; }
.preopen-row.on { background: rgba(245,158,11,.08); border-radius: 12px; }

/* ---- 시나리오 장면 사진·영상 (대화창) ---- */
.msg-scene { display: block; width: min(280px, 68vw); max-height: 380px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); background: #000; cursor: zoom-in; margin-bottom: 4px; }
video.msg-scene { cursor: default; }
.scen-photo { display: flex; gap: 12px; align-items: center; }
.scen-photo-box { position: relative; width: 96px; height: 120px; border-radius: 14px; overflow: hidden; border: 1px dashed var(--line); background: var(--bg-2, rgba(127,127,127,.08)); display: flex; align-items: center; justify-content: center; flex: none; cursor: pointer; color: var(--muted); }
.scen-photo-box img, .scen-photo-box video { width: 100%; height: 100%; object-fit: cover; }
.scen-photo-box .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; }
.scen-thumb { width: 44px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
