/* =====================================================================
   MyAI Girl — design system
   Pink · Purple · Violet · White gradients, glass cards, rounded UI
   ===================================================================== */
:root {
  --pink: #ec4899;
  --pink-2: #f472b6;
  --rose: #fb7185;
  --purple: #a855f7;
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --ink: #241336;
  --ink-2: #4b3a63;
  --muted: #7d6e93;
  --line: #eee4fb;
  --bg: #fcf9ff;
  --bg-2: #f6f0ff;
  --card: #ffffff;
  --glass: rgba(255, 255, 255, .62);
  --glass-line: rgba(255, 255, 255, .7);
  --grad: linear-gradient(135deg, #ec4899 0%, #a855f7 55%, #6366f1 100%);
  --grad-soft: linear-gradient(135deg, #fde7f3 0%, #f1e6ff 50%, #e7e9ff 100%);
  --shadow: 0 10px 30px -12px rgba(118, 54, 170, .28);
  --shadow-lg: 0 30px 60px -20px rgba(118, 54, 170, .38);
  --radius: 22px;
  --radius-sm: 14px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5, .display-font { font-family: var(--font-display); letter-spacing: -.02em; }
a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--pink); }
img { max-width: 100%; }
::selection { background: #f9d0e8; }

.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-muted-2 { color: var(--muted) !important; }
.bg-soft { background: var(--grad-soft); }

/* ---------- Buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: .7rem 1.4rem; transition: transform .18s ease, box-shadow .18s ease, background .18s; }
.btn-sm { padding: .42rem .95rem; font-size: .86rem; }
.btn-lg { padding: .95rem 1.9rem; font-size: 1.05rem; }
.btn-grad {
  background: var(--grad); color: #fff; border: 0;
  box-shadow: 0 10px 24px -10px rgba(236, 72, 153, .7);
}
.btn-grad:hover, .btn-grad:focus { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(168, 85, 247, .7); }
.btn-grad:disabled { opacity: .6; transform: none; }
.btn-glass {
  background: rgba(255, 255, 255, .75); color: var(--ink); border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.btn-glass:hover { background: #fff; color: var(--violet); transform: translateY(-2px); }
.btn-soft { background: #f4ecff; color: var(--violet); border: 0; }
.btn-soft:hover { background: #ead9ff; color: var(--violet); }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: var(--radius-sm); border: 1.5px solid var(--line); padding: .72rem 1rem; background: #fff;
}
.form-control:focus, .form-select:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(168, 85, 247, .14); }
.form-label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.form-check-input:checked { background-color: var(--violet); border-color: var(--violet); }

/* ---------- Glass & cards ---------- */
.glass {
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-soft { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.badge-soft { background: #f4ecff; color: var(--violet); font-weight: 600; border-radius: 999px; padding: .38rem .75rem; }
.badge-pink { background: #ffe4f2; color: #db2777; }
.badge-premium { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; font-weight: 700; border-radius: 999px; padding: .32rem .65rem; font-size: .72rem; }

/* ---------- Navbar ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(252, 249, 255, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(238, 228, 251, .8);
}
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 1.05rem; box-shadow: 0 6px 16px -6px rgba(236, 72, 153, .8); }
.site-nav .nav-link { color: var(--ink-2); font-weight: 600; padding: .5rem .9rem !important; border-radius: 999px; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--violet); background: #f4ecff; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 70px 0 90px; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; opacity: .75;
}
.hero::before { width: 520px; height: 520px; background: #fbcfe8; top: -120px; left: -140px; }
.hero::after { width: 560px; height: 560px; background: #ddd6fe; bottom: -200px; right: -120px; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-weight: 800; line-height: 1.04; }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 540px; }
.gemini-badge {
  display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem .45rem .5rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .88rem; box-shadow: var(--shadow);
}
.gemini-badge .dot { width: 26px; height: 26px; border-radius: 50%; background: conic-gradient(from 180deg, #4285f4, #9b72cb, #d96570, #4285f4); display: grid; place-items: center; color: #fff; font-size: .8rem; }
.hero-visual { position: relative; max-width: 460px; margin-inline: auto; }
.hero-img {
  border-radius: 34px; width: 100%; aspect-ratio: 3/4; object-fit: cover; box-shadow: var(--shadow-lg);
  border: 6px solid rgba(255, 255, 255, .85);
}
.hero-bubble {
  position: absolute; padding: .8rem 1rem; max-width: 240px; font-size: .9rem; font-weight: 500;
  animation: float 5s ease-in-out infinite;
}
.hero-bubble.b1 { left: -40px; top: 18%; }
.hero-bubble.b2 { right: -30px; bottom: 16%; animation-delay: -2.5s; }
.hero-stat { position: absolute; right: -14px; top: 6%; padding: .7rem .9rem; animation: float 6s ease-in-out infinite; animation-delay: -1s; }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 3px rgba(34, 197, 94, .22); }
@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
.avatar-stack img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; margin-left: -10px; }
.avatar-stack img:first-child { margin-left: 0; }

/* ---------- Sections ---------- */
section.block { padding: 90px 0; }
.section-eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pink); margin-bottom: .6rem; }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 800; }
.section-sub { color: var(--muted); max-width: 620px; margin-inline: auto; }

.feature-card { padding: 28px; height: 100%; transition: transform .25s, box-shadow .25s; }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature-icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.4rem; color: #fff;
  background: var(--grad); margin-bottom: 18px; box-shadow: 0 10px 20px -8px rgba(168, 85, 247, .7);
}
.feature-icon.alt1 { background: linear-gradient(135deg, #f472b6, #fb7185); }
.feature-icon.alt2 { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.feature-icon.alt3 { background: linear-gradient(135deg, #c084fc, #ec4899); }

/* ---------- Character cards ---------- */
.char-card {
  position: relative; border-radius: var(--radius); overflow: hidden; background: #2a1740; aspect-ratio: 3/4;
  box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease; display: block; color: #fff; isolation: isolate;
}
.char-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); color: #fff; }
.char-card img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; z-index: -2; }
.char-card:hover img.cover { transform: scale(1.06); }
.char-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(36, 19, 54, 0) 40%, rgba(36, 19, 54, .55) 65%, rgba(36, 19, 54, .94) 100%); }
.char-card .cc-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; }
.char-card .cc-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; }
.char-card .cc-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin: 0; display: flex; align-items: center; gap: .4rem; }
.char-card .cc-age { font-weight: 400; opacity: .8; font-size: 1rem; }
.char-card .cc-pers { font-size: .78rem; font-weight: 600; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25); padding: .2rem .6rem; border-radius: 999px; display: inline-block; backdrop-filter: blur(6px); margin-bottom: .45rem; }
.char-card .cc-tag { font-size: .82rem; opacity: .86; line-height: 1.35; margin: .3rem 0 .7rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.char-card .cc-actions { display: flex; gap: .5rem; }
.char-card .cc-actions .btn { flex: 1; padding: .5rem .8rem; font-size: .85rem; }
.fav-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(8px); color: #fff; transition: transform .2s, background .2s;
}
.fav-btn:hover { transform: scale(1.1); background: rgba(255, 255, 255, .35); }
.fav-btn.active { background: #fff; color: var(--pink); }
.online-chip { font-size: .72rem; font-weight: 600; background: rgba(0, 0, 0, .3); padding: .25rem .55rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .35rem; backdrop-filter: blur(6px); }
.online-chip .online-dot { width: 7px; height: 7px; box-shadow: none; }

.filter-bar { padding: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: .86rem;
  padding: .42rem .95rem; border-radius: 999px; cursor: pointer; transition: all .18s; white-space: nowrap;
}
.chip:hover { border-color: var(--purple); color: var(--violet); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.search-input { position: relative; flex: 1 1 240px; }
.search-input i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input input { padding-left: 42px; border-radius: 999px; }
.seg { display: inline-flex; background: #f4ecff; border-radius: 999px; padding: 4px; }
.seg button, .seg a { border: 0; background: transparent; padding: .45rem 1rem; border-radius: 999px; font-weight: 600; color: var(--ink-2); font-size: .9rem; }
.seg .active { background: #fff; color: var(--violet); box-shadow: 0 4px 12px -6px rgba(118, 54, 170, .4); }

/* ---------- Pricing ---------- */
.price-card { padding: 34px 28px; height: 100%; position: relative; transition: transform .25s; }
.price-card:hover { transform: translateY(-6px); }
.price-card.popular { background: linear-gradient(160deg, #2a1740 0%, #4c1d95 100%); color: #fff; border: 0; box-shadow: 0 30px 60px -20px rgba(76, 29, 149, .6); }
.price-card.popular .text-muted-2 { color: #d8c8f5 !important; }
.price-card .price { font-family: var(--font-display); font-size: 3rem; font-weight: 800; line-height: 1; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0 28px; }
.price-card li { padding: .42rem 0; display: flex; gap: .6rem; align-items: flex-start; }
.price-card li i { color: var(--pink); margin-top: 2px; }
.popular-tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-weight: 700; font-size: .78rem; padding: .35rem 1rem; border-radius: 999px; white-space: nowrap; }

/* ---------- Steps / testimonials / FAQ ---------- */
.step-num { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.2rem; }
.testimonial { padding: 26px; height: 100%; }
.testimonial .stars { color: #f59e0b; }
.faq .accordion-item { border: 1px solid var(--line); border-radius: var(--radius-sm) !important; overflow: hidden; margin-bottom: 12px; background: #fff; }
.faq .accordion-button { font-weight: 600; padding: 1.1rem 1.25rem; }
.faq .accordion-button:not(.collapsed) { background: #faf5ff; color: var(--violet); box-shadow: none; }
.faq .accordion-button:focus { box-shadow: none; }

.cta-band { background: var(--grad); border-radius: 30px; color: #fff; padding: 56px 32px; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: rgba(255, 255, 255, .12); right: -100px; top: -140px; }

/* ---------- Footer ---------- */
.site-footer { background: #1b0f2b; color: #cdbfe3; padding: 70px 0 30px; margin-top: 40px; }
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.site-footer a { color: #cdbfe3; display: inline-block; padding: .2rem 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.site-footer .social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: inline-grid; place-items: center; margin-right: 6px; }
.ai-note { font-size: .82rem; color: #a493bf; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 72px); display: grid; place-items: center; padding: 40px 16px; position: relative; }
.auth-wrap::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 20%, #fbcfe8 0, transparent 40%), radial-gradient(circle at 85% 80%, #ddd6fe 0, transparent 45%); z-index: -1; }
.auth-card { width: 100%; max-width: 980px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.auth-card .auth-art { position: relative; background: #2a1740; min-height: 560px; }
.auth-card .auth-art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; opacity: .92; }
.auth-card .auth-art .overlay { position: absolute; inset: auto 0 0 0; padding: 30px; color: #fff; background: linear-gradient(180deg, transparent, rgba(36, 19, 54, .92)); }
.auth-card .auth-form { padding: 44px 40px; background: #fff; }
.auth-card.narrow { max-width: 480px; grid-template-columns: 1fr; }
.pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); }

/* ---------- Legal pages ---------- */
.legal { max-width: 860px; margin: 0 auto; padding: 56px 16px 30px; }
.legal h2 { font-size: 1.35rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.75; }

/* ---------- Toasts & states ---------- */
.toast-wrap { position: fixed; z-index: 2000; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 32px); }
.toast-x { background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-lg); border-left: 4px solid var(--violet); font-weight: 500; animation: toastIn .3s ease; max-width: 380px; }
.toast-x.error { border-left-color: #ef4444; }
.toast-x.success { border-left-color: #22c55e; }
@keyframes toastIn { from { transform: translateY(16px); opacity: 0 } to { transform: none; opacity: 1 } }
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .ei { width: 76px; height: 76px; border-radius: 24px; background: var(--grad-soft); display: grid; place-items: center; font-size: 2rem; color: var(--violet); margin: 0 auto 16px; }
.skeleton { background: linear-gradient(90deg, #f3ecfc 25%, #faf6ff 50%, #f3ecfc 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0 } }
.alert { border-radius: var(--radius-sm); border: 0; }

/* ---------- Age gate ---------- */
.age-gate { position: fixed; inset: 0; z-index: 3000; background: rgba(27, 15, 43, .72); backdrop-filter: blur(10px); display: none; place-items: center; padding: 16px; }
.age-gate.show { display: grid; }
.age-gate .box { max-width: 440px; padding: 34px; text-align: center; background: #fff; }

/* =====================================================================
   Dashboard (user app)
   ===================================================================== */
.app-shell { display: flex; min-height: 100vh; background: var(--bg-2); }
.sidebar {
  width: 264px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line); padding: 20px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 1040;
}
.sidebar .brand { padding: 4px 10px 18px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: .66rem .9rem; border-radius: 14px; color: var(--ink-2); font-weight: 600; font-size: .94rem; margin-bottom: 2px;
}
.side-link i { font-size: 1.1rem; width: 22px; text-align: center; color: var(--muted); }
.side-link:hover { background: #f8f3ff; color: var(--violet); }
.side-link.active { background: var(--grad); color: #fff; box-shadow: 0 10px 20px -10px rgba(168, 85, 247, .8); }
.side-link.active i { color: #fff; }
.side-label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; color: #b3a5c7; text-transform: uppercase; padding: 14px 12px 6px; }
.side-credit { margin-top: auto; padding: 16px; border-radius: 18px; background: var(--grad); color: #fff; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-top {
  height: 68px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(246, 240, 255, .8);
  backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 1020; border-bottom: 1px solid var(--line);
}
.app-content { padding: 26px 24px 40px; flex: 1; }
.credit-pill { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem; font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); }
.credit-pill i { color: var(--pink); }
.user-chip img, .avatar-sm { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.avatar-initial { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; }
.stat-card { padding: 20px; display: flex; gap: 14px; align-items: center; }
.stat-card .si { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 1.3rem; color: #fff; background: var(--grad); flex-shrink: 0; }
.stat-card .sv { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.stat-card .sl { color: var(--muted); font-size: .85rem; font-weight: 500; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; color: var(--ink); transition: background .15s; }
.list-row:hover { background: #faf6ff; color: var(--ink); }
.list-row img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.welcome-card { background: var(--grad); color: #fff; padding: 28px; border-radius: var(--radius); position: relative; overflow: hidden; }
.welcome-card::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .12); right: -60px; top: -90px; }
.sidebar-backdrop { display: none; }
.table-soft { --bs-table-bg: transparent; }
.table-soft th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; border-bottom-color: var(--line); }
.table-soft td { vertical-align: middle; border-bottom-color: var(--line); }

/* ---------- Chat ---------- */
.chat-shell { display: grid; grid-template-columns: 300px 1fr 300px; height: 100vh; background: #fff; }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fff; }
.chat-list .cl-head { padding: 16px; border-bottom: 1px solid var(--line); }
.chat-list .cl-items { overflow-y: auto; flex: 1; padding: 8px; }
.conv-item { display: flex; gap: 10px; padding: 10px; border-radius: 14px; color: var(--ink); align-items: center; position: relative; }
.conv-item:hover { background: #faf6ff; color: var(--ink); }
.conv-item.active { background: #f4ecff; }
.conv-item img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.conv-item .ct { font-weight: 700; font-size: .92rem; }
.conv-item .cs { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: linear-gradient(180deg, #fbf8ff, #f6f0ff); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.chat-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.chat-body { flex: 1; overflow-y: auto; padding: 22px 18px; scroll-behavior: smooth; }
.msg { display: flex; gap: 10px; margin-bottom: 18px; max-width: 760px; }
.msg .avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-top: 2px; }
.msg .bubble { padding: 12px 16px; border-radius: 20px; line-height: 1.55; font-size: .97rem; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.ai .bubble { background: #fff; border: 1px solid var(--line); border-top-left-radius: 6px; box-shadow: 0 4px 14px -10px rgba(118, 54, 170, .35); }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg.user .bubble { background: var(--grad); color: #fff; border-top-right-radius: 6px; }
.msg .bubble em { opacity: .78; }
.msg .meta { display: flex; gap: 4px; margin-top: 4px; opacity: 0; transition: opacity .2s; }
.msg:hover .meta, .msg.touch .meta { opacity: 1; }
.msg.user .meta { justify-content: flex-end; }
.msg .meta button { border: 0; background: transparent; color: var(--muted); font-size: .85rem; padding: 3px 7px; border-radius: 8px; }
.msg .meta button:hover { background: #f1e8ff; color: var(--violet); }
.msg .time { font-size: .72rem; color: #a99bbd; padding: 3px 6px; }
.typing { display: inline-flex; gap: 5px; padding: 16px 18px; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--purple); opacity: .4; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0) } 40% { opacity: 1; transform: translateY(-4px) } }
.chat-input { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .92); border-top: 1px solid var(--line); }
.chat-input form { display: flex; align-items: flex-end; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 24px; padding: 6px 6px 6px 16px; transition: border-color .2s, box-shadow .2s; }
.chat-input form:focus-within { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(168, 85, 247, .12); }
.chat-input textarea { flex: 1; border: 0; resize: none; outline: none; max-height: 140px; padding: 9px 0; font-size: 1rem; background: transparent; line-height: 1.45; }
.chat-input .send { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; padding: 0; display: grid; place-items: center; }
.chat-profile { border-left: 1px solid var(--line); overflow-y: auto; background: #fff; }
.chat-profile .cp-img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.chat-empty { height: 100%; display: grid; place-items: center; text-align: center; padding: 30px; }
.ai-disclaimer { font-size: .74rem; color: var(--muted); text-align: center; margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .chat-shell { grid-template-columns: 280px 1fr; }
  .chat-profile { display: none; }
  .chat-profile.open { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 92vw); z-index: 1060; box-shadow: var(--shadow-lg); }
}
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .28s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(27, 15, 43, .4); z-index: 1035; }
  .auth-card { grid-template-columns: 1fr; max-width: 500px; }
  .auth-card .auth-art { display: none; }
  .hero { padding: 40px 0 60px; }
  .hero-bubble.b1 { left: -6px; }
  .hero-bubble.b2 { right: -6px; }
  .hero-stat { right: 0; }
  section.block { padding: 64px 0; }
}
@media (max-width: 767.98px) {
  .chat-shell { grid-template-columns: 1fr; height: 100dvh; }
  .chat-list { display: none; }
  .chat-shell.show-list .chat-list { display: flex; }
  .chat-shell.show-list .chat-main { display: none; }
  .app-content { padding: 18px 14px 32px; }
  .app-top { padding: 0 14px; }
  .auth-card .auth-form { padding: 32px 22px; }
  .hero-bubble { font-size: .8rem; max-width: 190px; }
  .msg .meta { opacity: 1; }
  .cta-band { padding: 40px 22px; }
  .price-card .price { font-size: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.char-card .cc-actions .btn { white-space: nowrap; }
@media (max-width: 575.98px) {
  .char-card .cc-body { padding: 12px; }
  .char-card .cc-name { font-size: 1.1rem; }
  .char-card .cc-tag { display: none; }
  .char-card .cc-pers { font-size: .68rem; margin-bottom: .3rem; }
  .char-card .cc-actions { margin-top: .5rem; }
  .char-card .cc-actions .btn-glass { display: none; }
  .char-card .online-chip { display: none; }
  .chat-head { padding: 10px 12px; gap: 8px; }
  .chat-head .btn-icon { width: 36px; height: 36px; }
}
