/* 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; }

/* ---- 게임 모드 만들기 ---- */
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .8s linear infinite; display: inline-block; }
.card-soft { padding: 14px; border-radius: var(--r2, 14px); background: color-mix(in srgb, var(--c1) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c1) 30%, transparent); }
.textarea.sm { min-height: 0; padding: 9px 12px; font-size: 14px; }
.scen-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scen-mode button { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface); color: var(--text2); }
.scen-mode button.on { border-color: color-mix(in srgb, var(--c1) 70%, transparent); background: color-mix(in srgb, var(--c1) 18%, transparent); color: #fff; }
.scen-mode button.locked { opacity: .7; }
.g-prog { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.g-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--c1), var(--c2, #ec4899)); transition: width .4s; }
.g-warn { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); color: #fcd34d; }
.g-warn.err { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.45); color: #fca5a5; }
.g-miss-tag { color: #fbbf24; }
.g-scene { border: 1px solid var(--line2); border-radius: 14px; background: var(--surface); overflow: hidden; }
.g-scene.open { border-color: color-mix(in srgb, var(--c1) 55%, transparent); }
.g-scene-h { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: none; border: 0; color: inherit; }
.g-scene-b { padding: 4px 12px 14px; }
.g-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--c1) 30%, transparent); flex: none; }
.g-q { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; }
.g-choice, .g-ending { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.g-ending.k-happy { border-color: rgba(236,72,153,.4); }
.g-ending.k-bad { border-color: rgba(100,116,139,.5); }
.g-abc { width: 24px; height: 24px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.08); flex: none; align-self: center; }
.g-score { width: 76px !important; flex: none; }
.g-kind { font-size: 12px; font-weight: 700; white-space: nowrap; align-self: center; }
.g-media { position: relative; width: 96px; height: 120px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex: none; cursor: pointer; background: rgba(255,255,255,.04); border: 1px dashed var(--line2); color: var(--muted); }
.g-media.sm { width: 64px; height: 80px; }
.g-media.miss { border-color: rgba(245,158,11,.6); }
.g-media img, .g-media video { width: 100%; height: 100%; object-fit: cover; }
.g-media-l { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 10px; line-height: 1.2; padding: 0 2px; }
.g-media-vid { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; padding: 2px 4px; display: flex; }
.g-media .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; }

/* ---- 게임 모드 플레이 ---- */
.g-bar { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--c1) 8%, var(--bg, #0b0a12)); font-size: 12.5px; }
.g-bar-l { display: flex; align-items: center; min-width: 0; white-space: nowrap; font-weight: 700; flex: 0 1 auto; overflow: hidden; }
.g-bar-p { flex: 1; min-width: 40px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.g-bar-p i { display: block; height: 100%; background: linear-gradient(90deg, var(--c1), var(--c2, #ec4899)); transition: width .5s; }
.g-bar-r { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,.06); border: 1px solid var(--line2); border-radius: 99px; padding: 3px 9px; color: var(--text); font-size: 12px; flex: none; }
.g-choices { display: flex; flex-direction: column; gap: 6px; margin: 0 12px 8px; padding: 10px; border-radius: 16px; background: color-mix(in srgb, var(--c1) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c1) 40%, transparent); animation: fadeUp .25s ease; }
.g-choice-btn { display: flex; gap: 10px; align-items: center; text-align: left; padding: 11px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line2); color: var(--text); font-size: 14.5px; line-height: 1.4; transition: transform .1s, border-color .15s; }
.g-choice-btn:hover { border-color: color-mix(in srgb, var(--c1) 60%, transparent); }
.g-choice-btn:active { transform: scale(.98); }
.g-end-tag { align-self: flex-start; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 99px; margin-bottom: 4px; background: rgba(255,255,255,.08); }
.g-end-tag.k-happy, .g-endcard.k-happy .g-endcard-k { background: rgba(236,72,153,.2); color: #f9a8d4; }
.g-end-tag.k-normal, .g-endcard.k-normal .g-endcard-k { background: rgba(250,204,21,.16); color: #fde68a; }
.g-end-tag.k-bad, .g-endcard.k-bad .g-endcard-k { background: rgba(100,116,139,.25); color: #cbd5e1; }
.g-endcard { align-self: center; width: min(360px, 92%); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin: 10px auto 4px; padding: 18px 16px; border-radius: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 20%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--c1) 45%, transparent); animation: fadeUp .35s ease; }
.g-endcard-k { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.g-endcard-t { font-size: 19px; }
.g-rec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.g-rec-end { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: var(--surface); padding: 0; color: var(--text); }
.g-rec-end img, .g-rec-end video { width: 100%; height: 100%; object-fit: cover; }
.g-rec-end.locked { opacity: .55; }
.g-rec-end.k-happy { border-color: rgba(236,72,153,.5); }
.g-rec-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--muted); }
.g-rec-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 18px 6px 6px; background: linear-gradient(transparent, rgba(0,0,0,.8)); text-align: left; }
.g-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.g-gallery button { aspect-ratio: 1; border-radius: 10px; overflow: hidden; padding: 0; border: 1px solid var(--line); background: #000; }
.g-gallery img, .g-gallery video { width: 100%; height: 100%; object-fit: cover; }
.g-viewer { display: flex; align-items: center; justify-content: center; z-index: 200; background: rgba(0,0,0,.92); }
.g-viewer img, .g-viewer video { max-width: 96vw; max-height: 90vh; border-radius: 12px; }
.scen-found { color: #f9a8d4; }

/* ---- 소개 화면 큰 사진 (커버 있든 없든 같은 크기) ---- */
.cp-hero { position: relative; aspect-ratio: 4 / 5; max-height: 78vh; width: 100%; background: var(--grad) center / cover no-repeat; display: flex; align-items: flex-end; justify-content: center; }
.cp-hero > .cp-initial { position: absolute; inset: 0; display: grid; place-items: center; }
.cp-hero-info { position: relative; width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 64px 16px 16px; background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.55) 38%, rgba(0,0,0,.88) 100%); color: #fff; }
.cp-hero-name { margin: 0; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.cp-hero-tag { margin: 0; font-size: 14.5px; line-height: 1.45; color: rgba(255,255,255,.9); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.cp-hero-stats { color: rgba(255,255,255,.78); }
.cp-hero-stats .link { color: #fff; }
.cp-hero-av { flex: none; width: 64px; height: 64px; border-radius: 18px; border: 2px solid rgba(255,255,255,.85); background: var(--grad) center / cover no-repeat; color: #fff; font-size: 24px; font-weight: 800; box-shadow: 0 6px 20px rgba(0,0,0,.45); cursor: zoom-in; padding: 0; }
.cp-hero:not(.has-cover) { cursor: zoom-in; }
.cp-hero .btn-soft { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(6px); }
.img-zoom { position: fixed; inset: 0; z-index: 210; background: rgba(0,0,0,.94); display: grid; place-items: center; padding: 16px; cursor: zoom-out; animation: fadeUp .18s ease; }
.img-zoom img { max-width: 100%; max-height: 92vh; border-radius: 14px; object-fit: contain; }
button.card-thumb { padding: 0; background: none; cursor: zoom-in; }
.img-zoom-nav { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; padding: 6px 10px; border-radius: 99px; background: rgba(255,255,255,.12); color: #fff; }
.img-zoom-nav button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 22px; line-height: 1; }
.img-zoom-nav button:disabled { opacity: .35; }

/* ---- 단축어 · 규칙 칩 ---- */
.tool.on { background: color-mix(in srgb, var(--c1) 22%, transparent); border-color: color-mix(in srgb, var(--c1) 55%, transparent); color: #fff; }
.cmd-menu { margin: 0 0 8px; padding: 6px; border-radius: 16px; background: var(--surface2, #1b1826); border: 1px solid var(--line2); max-height: 46vh; overflow-y: auto; animation: fadeUp .18s ease; box-shadow: 0 -8px 30px rgba(0,0,0,.35); }
.cmd-menu-h { padding: 4px 6px 6px; }
.icon-btn.sm { width: 28px; height: 28px; }
.cmd-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: none; border: 0; color: var(--text); text-align: left; }
.cmd-item:hover, .cmd-item:focus-visible { background: rgba(255,255,255,.06); }
.cmd-item.on { background: color-mix(in srgb, var(--c1) 12%, transparent); }
.cmd-emoji { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.06); flex: none; font-size: 15px; }
.rule-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 6px; }
.rule-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--c1) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c1) 45%, transparent); color: #fff; }

/* ---- 처음 안내 ---- */
.guide { position: fixed; inset: 0; z-index: 220; background: rgba(0,0,0,.72); animation: fadeIn .2s ease; cursor: pointer; }
.guide-close { position: absolute; transform: translateX(-50%); white-space: nowrap; margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-weight: 700; font-size: 14px; color: rgba(255,255,255,.95); }
.guide-ring { position: absolute; border-radius: 999px; border: 2px solid rgba(255,255,255,.9); box-shadow: 0 0 0 4px rgba(255,255,255,.12); pointer-events: none; }
.guide-line { position: absolute; width: 2px; margin-left: -1px; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.85) 0 4px, transparent 4px 8px); pointer-events: none; }
.guide-tip { position: absolute; display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border-radius: 14px; background: rgba(22, 19, 34, .92); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 8px 24px rgba(0,0,0,.4); color: #fff; font-size: 13.5px; line-height: 1.4; pointer-events: none; }
.guide-tip b { color: #f472b6; font-size: 15px; }
.guide-ex { color: rgba(255,255,255,.75); }
.guide-center { display: grid; place-items: center; padding: 20px; cursor: default; }
.guide-card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 22px 20px; border-radius: 22px; background: var(--surface2, #1b1826); border: 1px solid var(--line2); }
.guide-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.5; color: var(--text2); }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* ---- 도움말 ---- */
.help-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.help-cmds { display: flex; flex-direction: column; gap: 6px; }
.help-cmd { display: flex; flex-direction: column; gap: 2px; }
.help-cmd code { font-size: 13px; font-weight: 700; color: var(--text); font-family: inherit; }

/* ---- 연결중 화면 ---- */
.connect { position: fixed; top: var(--app-top, 0px); left: 0; right: 0; height: var(--app-h, 100dvh); z-index: 60; display: grid; place-items: center; background: #0b0a12; overflow: hidden; transition: opacity .35s ease; }
@media (min-width: 1024px) { .connect { left: var(--side); } }
.connect.out { opacity: 0; pointer-events: none; }
.connect-bg { position: absolute; inset: 0; background: center / cover no-repeat; filter: brightness(.38) blur(1px); transform: scale(1.04); }
.connect-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #fff; }
.connect-av { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin-bottom: 8px; }
.connect-av i { position: absolute; inset: 0; border-radius: 50%; background: rgba(255,255,255,.14); animation: ripple 1.8s ease-out infinite; }
.connect-av i:nth-child(2) { animation-delay: .9s; }
.connect-av span { position: relative; width: 112px; height: 112px; border-radius: 50%; border: 4px solid #fff; background: var(--grad) center / cover no-repeat; display: grid; place-items: center; font-size: 40px; font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.connect-name { font-size: 20px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.connect-txt { color: rgba(255,255,255,.75); }
.connect-dots { display: flex; gap: 5px; margin-top: 6px; }
.connect-dots i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: cdot 1s ease-in-out infinite; }
.connect-dots i:nth-child(2) { animation-delay: .15s; } .connect-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ripple { 0% { transform: scale(.85); opacity: .9 } 100% { transform: scale(1.5); opacity: 0 } }
@keyframes cdot { 0%,100% { transform: scale(.7); opacity: .5 } 50% { transform: scale(1.15); opacity: 1 } }

/* ---------- PC 대화 오른쪽 패널 (≥1200px) ---------- */
:root { --cs-w: 372px; }
.chat-side { display: none; }
@media (min-width: 1200px) {
  .chat.has-side { right: var(--cs-w); }
  .chat-side { display: flex; flex-direction: column; position: fixed; z-index: 21; top: var(--app-top, 0px); right: 0; width: var(--cs-w); height: var(--app-h, 100dvh); border-left: 1px solid var(--line); background: rgba(12, 11, 19, 0.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); animation: csIn .25s ease; }
}
@keyframes csIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.cs-head { flex: none; display: flex; align-items: center; gap: 4px; height: 60px; padding: 0 8px 0 10px; border-bottom: 1px solid var(--line); }
.cs-tabs { flex: 1; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.cs-tabs::-webkit-scrollbar { display: none; }
.cs-tabs button { flex: none; height: 34px; padding: 0 11px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: all .2s; }
.cs-tabs button:hover { color: var(--text); }
.cs-tabs button.on { background: var(--surface3); color: var(--text); }
.cs-close { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.cs-close:hover { background: var(--surface2); color: var(--text); }
.cs-body { flex: 1; overflow-y: auto; padding: 14px; overscroll-behavior: contain; }
.cs-body .card { padding: 14px; }
.cs-body .mt-12:first-child { margin-top: 0; }
.cs-hero { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r3); overflow: hidden; background: var(--grad) center / cover no-repeat; display: flex; align-items: flex-end; justify-content: center; }
.cs-hero .cp-initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; }
.cs-hero-info { position: relative; width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 40px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.82)); color: #fff; }
.cs-prog { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r3); background: var(--surface); border: 1px solid var(--line); }
.cs-path { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--line2); display: flex; flex-direction: column; gap: 10px; }
.cs-path li { display: flex; flex-direction: column; gap: 2px; }
.cs-body .g-gallery { grid-template-columns: repeat(3, 1fr); }
/* 오른쪽 패널 정보 탭: 소개 페이지 묶음을 좁은 폭에 맞춤 */
.cs-info > .mt-12, .cs-info > .mt-16, .cs-info > section { margin-top: 0 !important; }
.cs-info .similar .sim-row { grid-auto-columns: 128px; }
.cs-info .h3 { font-size: 16px; }
.guide-line { z-index: 1; }
.guide-tip { z-index: 2; }
.guide-close { z-index: 3; }
@media (max-width: 380px) { .guide-tip { padding: 7px 10px; font-size: 12.5px; } .guide-tip b { font-size: 14px; } }
/* 오른쪽 패널: 시나리오는 옆으로 넘기지 않고 한 줄씩 아래로 */
.cs-info .scen-list.compact { flex-direction: column; overflow: visible; scroll-snap-type: none; }
.cs-info .scen-list.compact .scen-card { flex: none; width: 100%; }
/* 시나리오 카드 아래 정보(선택형·장르·인원)가 좁으면 다음 줄로 */
.scen-card .tiny.muted.row { flex-wrap: wrap; row-gap: 4px; }
.scen-card .tiny.muted.row > * { white-space: nowrap; }

/* ---------- 내 AI 키 (BYOK) ---------- */
.byok-provs { display: flex; flex-wrap: wrap; gap: 6px; }
.byok-prov { height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface2); border: 1px solid var(--line); color: var(--text2); }
.byok-prov.on { background: color-mix(in srgb, var(--c1) 22%, var(--surface2)); border-color: color-mix(in srgb, var(--c1) 60%, transparent); color: #fff; }
.byok-msg { padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; word-break: break-word; }
.byok-msg.ok { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.35); color: #bbf7d0; }
.byok-msg.err { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); color: #fecaca; }
.byok-warn { color: #fca5a5; }

/* ---------- 메뉴 정리: 포인트·이벤트·바로가기 ---------- */
.point-chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: color-mix(in srgb, var(--c1) 16%, var(--surface2)); border: 1px solid color-mix(in srgb, var(--c1) 40%, transparent); color: #fff; white-space: nowrap; }
.icon-link { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--text2); }
.icon-link:hover { background: var(--surface2); color: var(--text); }
.icon-link .tab-dot { top: 5px; right: 5px; }
.side-sep { height: 1px; margin: 8px 10px; background: var(--line); }
.side-link { position: relative; }
.side-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--err); margin-left: auto; }
.quick-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick-link { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--text2); text-align: center; }
.quick-link:hover { border-color: var(--line2); color: var(--text); }
.quick-link .tab-dot { top: 8px; right: 14px; }
.me-mail { flex: none; }
.me-mail-n { position: absolute; top: 0; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--err); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.menu-wallet { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; background: color-mix(in srgb, var(--c1) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c1) 30%, transparent); }
.menu-wallet b { font-size: 16px; }

/* ---- admin writer: body editor / link picker / AI write ---- */
.be-bar{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:4px;border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:var(--surface)}
.be-bar button{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;padding:5px 9px;border-radius:7px;background:transparent;color:var(--text);border:0;cursor:pointer}
.be-bar button:hover,.be-bar button.on{background:var(--bg-soft,rgba(127,127,127,.12))}
.be-bar .grow{flex:1}
.body-ed .textarea{border-top-left-radius:0;border-top-right-radius:0}
.be-preview{border:1px solid var(--line);border-radius:0 0 10px 10px;padding:14px 16px;min-height:160px;max-height:420px;overflow:auto;background:var(--bg)}
.lp-chars{display:flex;flex-direction:column;max-height:200px;overflow:auto;border:1px solid var(--line);border-radius:10px}
.link-picker .cp-search{display:flex;align-items:center;gap:6px}
.link-picker .cp-search input{border:0;outline:0;background:transparent;flex:1;color:inherit}
.link-picker code{font-size:11.5px;padding:1px 5px;border-radius:5px;background:var(--surface)}
.ai-write{padding:10px 12px;border:1px dashed var(--line);border-radius:10px;background:var(--surface)}
.guest-lock p{margin:0}
.composer-row .icon-btn.locked{opacity:.55}

/* ---- admin: per-language images / retranslate ---- */
.l10n-imgs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.l10n-img{display:flex;flex-direction:column;gap:4px;min-width:0}
.l10n-img-box{display:flex;align-items:center;justify-content:center;aspect-ratio:4/5;border:1px dashed var(--line);border-radius:10px;background:var(--surface) center/cover no-repeat;cursor:pointer;overflow:hidden;text-align:center;padding:6px}
.l10n-img-box.has{border-style:solid}
.l10n-img-box .col{gap:4px;align-items:center}
.l10n-img .link-btn{display:inline-flex;align-items:center;gap:3px;align-self:flex-start}
.retranslate{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px dashed var(--line);border-radius:10px}
.retranslate .btn{align-self:flex-start}

/* ---- NPC 말풍선 (주인공과 따로) ---- */
.msg-col .bubble + .bubble, .msg-col .bubble + .npc-say, .msg-col .npc-say + .bubble, .msg-col .npc-say + .npc-say { margin-top: 6px; }
.npc-say { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.npc-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); padding-left: 2px; }
.npc-dot { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; }
.bubble.npc { border-left: 3px solid var(--c1); background: color-mix(in srgb, var(--surface2) 88%, white 4%); }

/* 도우미형 히미루 (P4-25) */
.cc-kind { display: inline-flex; align-items: center; gap: 3px; align-self: flex-start; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #0b3b2e; background: #6ee7b7; }
.badge-helper { background: rgba(110, 231, 183, .2); color: #6ee7b7; }
.msg .bubble strong { font-weight: 800; }

/* ---------- 확인 창 (P4-26) ---------- */
.dlg-overlay { align-items: center; z-index: 120; padding: 20px; }
.dlg { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px 16px; box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: pop .18s both; text-align: center; }
.dlg-icon { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c1) 18%, transparent); color: color-mix(in srgb, var(--c1) 50%, white); }
.dlg.danger .dlg-icon { background: color-mix(in srgb, var(--err) 16%, transparent); color: var(--err); }
.dlg-title { margin: 0 0 6px; font-size: 18px; font-weight: 800; line-height: 1.35; }
.dlg-body { color: var(--text2); font-size: 14.5px; line-height: 1.6; white-space: pre-line; text-align: left; }
.dlg-title + .dlg-body { margin-top: 4px; }
.dlg-list { margin: 0; padding: 10px 12px; list-style: none; border-radius: 14px; background: var(--surface2); display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.dlg-list li { padding-left: 22px; position: relative; }
.dlg-list li.bad::before { content: '✕'; position: absolute; left: 2px; color: var(--err); font-weight: 800; }
.dlg-list li.keep::before { content: '✓'; position: absolute; left: 2px; color: #34d399; font-weight: 800; }
.dlg-check { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 14px; text-align: left; }
.dlg-btns { display: flex; gap: 8px; margin-top: 18px; }
.dlg-btns .btn { flex: 1; justify-content: center; }
@media (max-width: 380px) { .dlg-btns { flex-direction: column-reverse; } }
.room-row { position: relative; }
.room-leave { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--text3, #888); background: transparent; border: 0; cursor: pointer; }
.room-leave:hover { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }

/* ---------- 선택 모드 연출 (P4-26) ---------- */
.g-mood { display: inline-flex; gap: 1px; flex: none; }
.g-mood svg { color: rgba(255,255,255,.25); }
.g-mood svg.on { color: #f472b6; fill: #f472b6; }
.g-q-head { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; color: inherit; padding: 0 2px 4px; cursor: pointer; }
.g-q-k { color: color-mix(in srgb, var(--c1) 55%, white); font-weight: 700; }
.g-q-t { display: block; line-height: 1.45; margin-top: 2px; }
.g-choices.folded { padding-bottom: 8px; }
.g-scenecard { position: relative; margin: 18px auto 10px; width: min(100%, 520px); border-radius: 18px; overflow: hidden; background: var(--surface2); border: 1px solid var(--line); }
.g-scenecard img, .g-scenecard video { display: block; width: 100%; max-height: 340px; object-fit: cover; }
.g-scenecard-cap { display: flex; align-items: center; gap: 6px; padding: 10px 14px; font-size: 13px; color: var(--text2); }
.g-scenecard img + .g-scenecard-cap, .g-scenecard video + .g-scenecard-cap { position: absolute; left: 0; right: 0; bottom: 0; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); padding-top: 28px; }
.g-skip-row { display: flex; justify-content: flex-end; padding: 0 14px 6px; }
.g-skip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c1) 45%, transparent); background: color-mix(in srgb, var(--c1) 14%, transparent); color: color-mix(in srgb, var(--c1) 45%, white); cursor: pointer; }
.g-moodfx { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); z-index: 90; padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14.5px; background: rgba(20,14,30,.88); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 8px; animation: moodfx 2.6s ease both; pointer-events: none; white-space: nowrap; }
.g-moodfx.up { box-shadow: 0 0 40px rgba(244,114,182,.45); }
.g-moodfx.down { box-shadow: 0 0 30px rgba(148,163,184,.3); }
.g-moodfx-e { font-size: 20px; }
@keyframes moodfx { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.9); } 12% { opacity: 1; transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -16px); } }
.g-endcard.k-secret, .g-rec-end.k-secret { border-color: rgba(167,139,250,.6); box-shadow: 0 0 30px rgba(167,139,250,.25); }
.msg-sys { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 6px auto; font-size: 12px; color: var(--text3, #8a8a99); }
.dlg .btn-danger { background: var(--err); color: #fff; }
.g-endcard .row { flex-wrap: wrap; }
.g-endcard .row .btn.grow { min-width: 0; white-space: nowrap; }
.g-scenecard { flex: none; } .g-scenecard img { min-height: 160px; background: var(--surface2); }

/* ---------- 카드 사진 · 대표 장르 (P4-27) ---------- */
.portrait { position: relative; overflow: hidden; }
.portrait-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait > span { position: relative; z-index: 1; }
.cc-genre { position: absolute; left: 8px; bottom: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 3px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: rgba(12, 10, 20, .62); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 크리에이터 (P4-27) */
.creator-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; text-decoration: none; }
.creator-box .avatar { width: 44px; height: 44px; flex: none; }
.cr-head { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.cr-av { width: 84px; height: 84px; flex: none; font-size: 30px; }
.cr-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.cr-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; }
.cr-stats > div + div { border-left: 1px solid var(--line); }
.cr-stats b { font-size: 18px; }
.cr-stats span { font-size: 12px; color: var(--text2); }
.cr-bio { padding: 14px 16px; font-size: 14px; line-height: 1.6; }
.cr-scen { display: flex; align-items: center; gap: 12px; padding: 12px; color: inherit; text-decoration: none; }
.cr-scen .sp-av { width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--grad) center / cover no-repeat; display: grid; place-items: center; font-weight: 800; }
/* 태그 펼쳐보기 · 태그 사전 */
.chip-more { display: inline-flex; align-items: center; gap: 4px; border-style: dashed; }
.tag-panel { padding: 14px; }
.tag-grp-h { display: block; margin-bottom: 6px; font-weight: 700; }
.tag-pick summary { cursor: pointer; list-style: none; }
.adm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.adm-tag.off { opacity: .45; }
.adm-tag-n { background: none; border: 0; color: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.adm-tag .select.xs { height: 24px; padding: 0 4px; font-size: 11px; width: auto; }
.adm-tag-x { background: none; border: 0; color: var(--text2); cursor: pointer; display: grid; place-items: center; }
.portrait > span.cc-genre { font-size: 11.5px; font-weight: 700; color: #fff; }
.portrait > span.cc-genre { position: absolute; left: 8px; bottom: 8px; }

/* 만들기 화면 저장 바: 휴대폰 아래 탭 위에 고정 (P4-28) */
@media (max-width: 1023px) { .savebar { bottom: calc(var(--tab) + var(--safe-b) + 10px); padding: 10px; margin-left: -10px; margin-right: -10px; border-radius: 18px; background: rgba(12, 11, 19, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); } }
/* 저장 전 미리 대화 (P4-28) */
.try-chat { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.try-chat .try-b { max-width: 92%; white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.try-chat .bubble.me { align-self: flex-end; }
.try-chat .bubble.ai { align-self: flex-start; }
/* 접는 칸 · 만든 직후 카드 (P4-29) */
.fold { padding: 0; overflow: hidden; }
.fold-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 16px 18px; background: none; border: 0; color: inherit; cursor: pointer; }
.fold-t { margin: 0; }
.fold-ic { flex: none; transition: transform .2s; color: var(--text2); }
.fold.open .fold-ic { transform: rotate(180deg); }
.fold-b { padding: 0 18px 18px; }
.fold.plain .fold-b { padding: 0 0 4px; }
.fold.plain .fold-b > section.card, .fold.plain .fold-b > div > section.card { margin-top: 0 !important; border: 0; background: none; box-shadow: none; }
.made-card { position: relative; flex: none; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 22%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--c1) 40%, transparent); }
.made-x { position: absolute; top: 10px; right: 10px; background: none; border: 0; color: var(--text2); cursor: pointer; }
.fold .sec-title { display: none; }
.doc-table-wrap { overflow-x: auto; margin: 6px 0 12px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doc-table th, .doc-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; color: var(--text2); }
.doc-table th { background: var(--surface2); color: var(--text); font-weight: 700; white-space: nowrap; }
/* 앨범 도구 막대: 휴대폰에서 두 줄로 (삭제 버튼이 화면 밖으로 숨지 않게) */
@media (max-width: 1023px) { .a-toolbar { flex-wrap: wrap; justify-content: center; overflow-x: visible; width: calc(100vw - 16px); row-gap: 8px; } .a-toolbar .a-move { max-width: 130px; } }
/* 첫 방문 동의 시트 (P4-30) */
.consent-sheet { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab) + var(--safe-b) + 10px); width: min(560px, calc(100vw - 20px)); padding: 16px 18px 14px; border-radius: 18px; background: rgba(22, 19, 34, 0.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,0.55); animation: csUp 0.35s ease; }
.consent-sheet.in-chat { bottom: calc(var(--safe-b) + 84px); }
.consent-sheet .cs-text { margin: 0 0 6px; font-size: 14px; line-height: 1.55; }
.consent-sheet .cs-text a { color: var(--accent, #f6a); text-decoration: underline; text-underline-offset: 3px; }
.consent-sheet .cs-ai { margin: 0 0 12px; }
.consent-sheet .cs-btn { width: 100%; }
@media (min-width: 1024px) { .consent-sheet { bottom: 22px; } .consent-sheet.in-chat { bottom: 110px; } }
@keyframes csUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* 관리자 · 이미지 점검 */
.mau-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mau-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.mau-card.block { border-color: rgba(255, 80, 90, 0.7); }
.mau-card.warn { border-color: rgba(255, 190, 70, 0.6); }
.mau-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #111; cursor: zoom-in; }
.mau-body { padding: 8px 10px 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.mau-risk { font-weight: 700; }
.mau-risk.block { color: #ff6b74; } .mau-risk.warn { color: #ffc15a; } .mau-risk.ok { color: #6be3a0; }
.mau-acts { display: flex; gap: 6px; flex-wrap: wrap; }
/* 사진 전체 화면 보기 */
.media-zoom { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.92); display: grid; place-items: center; padding: max(12px, var(--safe-t, 0px)) 12px max(12px, var(--safe-b, 0px)); animation: csFade .2s ease; cursor: zoom-out; }
.media-zoom img, .media-zoom video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.media-zoom-x { position: absolute; top: calc(var(--safe-t, 0px) + 12px); right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.14); color: #fff; font-size: 18px; cursor: pointer; }
.g-scenecard img, .g-scenecard video, .msg-scene { cursor: zoom-in; }
@keyframes csFade { from { opacity: 0 } to { opacity: 1 } }
/* 앨범 관리: 앨범별 펼치기 */
.a-sec-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: inherit; cursor: pointer; font: inherit; }
.a-sec-head.on { border-color: rgba(190, 120, 255, 0.45); }
.a-sec-thumbs { display: flex; flex: none; }
.a-sec-thumbs img { width: 34px; height: 44px; object-fit: cover; border-radius: 7px; border: 2px solid var(--bg); margin-left: -10px; background: var(--surface2); }
.a-sec-thumbs img:first-child { margin-left: 0; }
.a-sec-chev { flex: none; transition: transform .2s; opacity: .7; }
.a-sec-head.on .a-sec-chev { transform: rotate(180deg); }
/* 둘러보기 이야기형·도우미형 (P4-32) */
.kind-seg{display:inline-flex;max-width:100%;overflow-x:auto}
.lobby-sub{display:block;margin-top:2px}
/* 새 첫 화면 (dev 미리 보기) */
.hero-motto{font-size:14px;letter-spacing:.04em;color:var(--muted)}
.paths{display:grid;gap:12px}
@media (min-width:720px){.paths{grid-template-columns:1fr 1fr}}
.path-card{position:relative;display:flex;flex-direction:column;gap:6px;padding:22px 22px 22px;border-radius:var(--r3);border:1px solid var(--line);background:var(--surface);color:inherit;text-decoration:none;transition:transform .2s,border-color .2s}
.path-card p{margin:0;color:var(--muted)}
.path-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--c1) 60%,var(--line))}
.path-story{background:radial-gradient(120% 140% at 0% 0%,color-mix(in srgb,var(--c2) 22%,transparent),transparent 60%),var(--surface)}
.path-helper{background:radial-gradient(120% 140% at 0% 0%,color-mix(in srgb,var(--c1) 22%,transparent),transparent 60%),var(--surface)}
.path-go{position:absolute;right:18px;top:20px;opacity:.6}
.helper-grid{display:grid;gap:10px;grid-template-columns:1fr}
@media (min-width:640px){.helper-grid{grid-template-columns:1fr 1fr}}
@media (min-width:1100px){.helper-grid{grid-template-columns:repeat(3,1fr)}}
.helper-card{display:flex;gap:12px;align-items:center;padding:12px;border-radius:var(--r3);border:1px solid var(--line);background:var(--surface);color:inherit;text-decoration:none}
.helper-card:hover{border-color:color-mix(in srgb,var(--c1) 60%,var(--line))}
.helper-av{flex:none;width:56px;height:56px;border-radius:16px;background:var(--surface2,#222) center/cover}
.helper-soon .chips{margin-top:6px}
.about-card{text-align:center;padding:40px 22px;border-radius:var(--r4);border:1px solid var(--line);background:radial-gradient(120% 120% at 50% 0%,color-mix(in srgb,var(--c1) 28%,transparent),transparent 65%),var(--surface)}
.about-mark{font-size:clamp(34px,7vw,56px);font-weight:800;letter-spacing:.04em;margin-bottom:6px}
.about-body{max-width:560px;margin:14px auto 0;line-height:1.8;color:var(--text)}
.about-motto{margin-top:18px;color:var(--muted)}
.safe-list{display:grid;gap:10px}
@media (min-width:720px){.safe-list{grid-template-columns:1fr 1fr}}
.safe-item{display:flex;gap:12px;align-items:center;padding:16px;border-radius:var(--r3);border:1px solid var(--line);background:var(--surface)}
.safe-item svg{flex:none;color:var(--c1)}
.helper-note{padding:6px 14px;color:var(--muted);border-bottom:1px solid var(--line);background:var(--surface)}
.crisis-band{display:flex;gap:10px;align-items:center;margin:6px 12px;padding:10px 12px;border-radius:12px;background:color-mix(in srgb,var(--c1) 14%,var(--surface));border:1px solid color-mix(in srgb,var(--c1) 40%,var(--line))}
.path-ic{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:14px;margin-bottom:6px;color:#fff;background:linear-gradient(135deg,var(--c1),var(--c2))}
.path-helper .path-ic{background:linear-gradient(135deg,var(--c2),var(--c1))}
/* PC: 가로로 넘치던 칩 줄은 줄바꿈 (모바일은 그대로 옆으로 밀기) */
@media (min-width:900px) and (hover:hover){.cat-bar{flex-wrap:wrap;overflow-x:visible}}
/* 둘러보기 위쪽 종류 탭 (전체·이야기형·도우미형) */
.kind-tabs{display:flex;gap:4px;margin:4px 0 12px;border-bottom:1px solid var(--line)}
.kind-tabs button{display:inline-flex;align-items:center;gap:6px;padding:10px 14px 11px;background:none;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;color:var(--muted);font-size:15px;font-weight:700;cursor:pointer}
.kind-tabs button:hover{color:var(--text)}
.kind-tabs button.on{color:var(--text);border-bottom-color:var(--c1)}
.kind-tabs button.on svg{color:var(--c1)}
/* 가로 줄 화살표 (PC 마우스 환경에서만 보임) */
.hs-wrap{position:relative}
.hs-arrow{display:none}
@media (hover:hover) and (pointer:fine) and (min-width:900px){
  .hs-arrows .hs-arrow{display:flex;align-items:center;justify-content:center;position:absolute;top:calc(50% - 26px);z-index:3;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:color-mix(in srgb,var(--bg,#0b0b10) 82%,transparent);backdrop-filter:blur(8px);color:var(--text);cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.45);opacity:0;transition:opacity .2s,transform .2s}
  .hs-arrows:hover .hs-arrow{opacity:1}
  .hs-arrows .hs-arrow:hover{transform:scale(1.08);border-color:var(--c1)}
  .hs-arrows .hs-arrow.l{left:-14px}
  .hs-arrows .hs-arrow.r{right:-14px}
}
/* 잠긴 앨범: 흐린 미리보기가 살짝 비치게, 잠금 표시는 한 줄로 */
.a-tile .a-blur { filter: blur(6px) saturate(1.15) brightness(.95); transform: scale(1.12); }
.a-tile.locked::after { background: linear-gradient(180deg, rgba(10,9,16,.05) 40%, rgba(10,9,16,.45)); }
.a-lock { white-space: nowrap; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; }
.a-lock svg { flex: none; }
.hs-wrap > .scen-list.compact, .hs-wrap > .sim-row, .hs-wrap > .resume-row, .hs-wrap > .card-strip { scroll-behavior: smooth; }
