/* ============================================================
   TransLuxe AI — site stylesheet
   Dark neon companion-site aesthetic with trans-flag accents
   ============================================================ */

:root {
  --bg: #0c0913;
  --bg-soft: #14101f;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f3eefb;
  --text-dim: #b3a8c9;
  --text-faint: #7d7194;

  /* trans flag palette, neon-tuned */
  --pink: #f5a9b8;
  --pink-hot: #ff5fa2;
  --blue: #5bcefa;
  --purple: #9b5ff7;

  --grad-brand: linear-gradient(135deg, #5bcefa 0%, #f5a9b8 50%, #ff5fa2 100%);
  --grad-cta: linear-gradient(135deg, #ff5fa2, #9b5ff7);
  --shadow-glow: 0 0 40px rgba(255, 95, 162, 0.25);
  --radius: 18px;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(91, 206, 250, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 10%, rgba(255, 95, 162, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(155, 95, 247, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main, nav, footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 32px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
  background: var(--grad-cta);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 60px rgba(255, 95, 162, 0.45); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-card-hover); border-color: var(--pink-hot); }

.btn-sm { padding: 9px 20px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Nav ---------- */
nav {
  position: sticky;
  top: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(12, 9, 19, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.logo .logo-18 {
  -webkit-text-fill-color: var(--text-faint);
  font-size: 0.65rem;
  font-weight: 700;
  vertical-align: super;
  margin-left: 2px;
}

.nav-links { display: flex; gap: clamp(10px, 2vw, 28px); align-items: center; }
.nav-links a { color: var(--text-dim); font-size: 0.95rem; transition: color 0.15s; }
.nav-links a:hover { color: var(--pink); }

/* ---------- Hero ---------- */
.hero {
  padding: 90px 0 70px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #51e87e;
  box-shadow: 0 0 10px #51e87e;
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1px;
  max-width: 850px;
  margin: 0 auto 22px;
}

.hero h1 .grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.sub {
  color: var(--text-dim);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 38px;
}

.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 6vw, 70px);
  margin-top: 60px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat .num {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat .lbl { color: var(--text-faint); font-size: 0.85rem; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }

.section-head { text-align: center; margin-bottom: 50px; }
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.section-head h2 .grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-head p { color: var(--text-dim); max-width: 560px; margin: 0 auto; }

/* ---------- Character grid ---------- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
}

.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
}
.char-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 95, 162, 0.5);
  box-shadow: 0 14px 50px rgba(255, 95, 162, 0.18);
}

.char-visual {
  height: 240px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.char-visual.has-photo {
  background-size: cover !important;
  background-position: center top;
  background-repeat: no-repeat;
}
/* "View profile" hint that fades in on hover */
.char-visual-hint {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 16px 12px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.char-card:hover .char-visual-hint { opacity: 1; transform: translateY(0); }
/* lift the card on hover */
.char-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.char-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
.char-visual .big-initial {
  font-size: 7rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.28);
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.35);
  user-select: none;
}
.char-visual .char-emoji {
  position: absolute;
  bottom: 14px;
  right: 16px;
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}
.char-visual .online-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c8ffd9;
}
.char-visual .online-chip::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: #51e87e;
  box-shadow: 0 0 8px #51e87e;
}

.char-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.char-body h3 { font-size: 1.3rem; font-weight: 700; }
.char-body .char-age { color: var(--text-faint); font-weight: 500; font-size: 1rem; }
.char-body .char-tagline { color: var(--text-dim); font-size: 0.92rem; margin: 8px 0 14px; flex: 1; }

.char-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pink);
  background: rgba(255, 95, 162, 0.1);
  border: 1px solid rgba(255, 95, 162, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: border-color 0.2s, background 0.2s;
}
.feature:hover { border-color: rgba(91, 206, 250, 0.4); background: var(--bg-card-hover); }
.feature .icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--grad-cta);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
  box-shadow: 0 4px 20px rgba(255, 95, 162, 0.3);
}
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 26px;
  max-width: 1000px;
  margin: 0 auto;
}
.plan {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan.featured {
  border-color: var(--pink-hot);
  box-shadow: var(--shadow-glow);
  background: linear-gradient(180deg, rgba(255, 95, 162, 0.08), rgba(155, 95, 247, 0.05));
}
.plan .plan-flag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-cta);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 16px;
  white-space: nowrap;
}
.plan h3 { font-size: 1.1rem; color: var(--text-dim); font-weight: 600; }
.plan .price { font-size: 2.6rem; font-weight: 800; margin: 10px 0 4px; }
.plan .price span { font-size: 1rem; font-weight: 500; color: var(--text-faint); }
.plan ul { list-style: none; margin: 24px 0 30px; flex: 1; }
.plan li { padding: 7px 0; color: var(--text-dim); font-size: 0.93rem; }
.plan li::before { content: "✦ "; color: var(--pink-hot); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}
details summary {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 1.4rem; color: var(--pink-hot); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details .faq-body { padding: 0 24px 20px; color: var(--text-dim); font-size: 0.95rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, rgba(91, 206, 250, 0.12), rgba(255, 95, 162, 0.14), rgba(155, 95, 247, 0.12));
  border: 1px solid var(--border);
  border-radius: 24px;
  text-align: center;
  padding: 70px 30px;
}
.cta-banner h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 14px; }
.cta-banner p { color: var(--text-dim); margin-bottom: 30px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 50px 0 40px;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  margin-bottom: 36px;
}
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 0.92rem; padding: 4px 0; }
.footer-col a:hover { color: var(--pink); }
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--text-faint); font-size: 0.88rem; margin-top: 10px; }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  color: var(--text-faint);
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.7;
}

/* ---------- Age gate ---------- */
.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(8, 5, 14, 0.85);
  backdrop-filter: blur(22px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.age-gate[hidden] { display: none; }
.age-gate-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  padding: 44px 38px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.age-gate-card .gate-logo { font-size: 1.6rem; font-weight: 800; margin-bottom: 18px; }
.age-gate-card h2 { font-size: 1.4rem; margin-bottom: 14px; }
.age-gate-card p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 28px; }
.age-gate-card .gate-btns { display: flex; flex-direction: column; gap: 12px; }
.age-gate-card .gate-fine { margin-top: 20px; font-size: 0.75rem; color: var(--text-faint); }

/* ============================================================
   Chat page
   ============================================================ */
.chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr 330px;
  height: calc(100dvh - var(--nav-h));
  min-height: 0;
  overflow: hidden;
}

/* sidebar */
.chat-sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg-soft);
  overflow-y: auto;
  min-height: 0;
  padding: 18px 14px;
}
.chat-sidebar h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-faint);
  padding: 6px 10px 12px;
}
.contact {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.contact:hover { background: var(--bg-card-hover); }
.contact.active {
  background: rgba(255, 95, 162, 0.1);
  border-color: rgba(255, 95, 162, 0.35);
}
.contact .avatar { flex-shrink: 0; }
.contact .c-meta { min-width: 0; }
.contact .c-name { font-weight: 700; font-size: 0.98rem; }
.contact .c-line {
  font-size: 0.8rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.avatar.sm { width: 36px; height: 36px; font-size: 0.95rem; }
.avatar.has-photo { background-size: cover; background-position: center; background-repeat: no-repeat; }

/* chat main */
.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(20, 16, 31, 0.6);
  backdrop-filter: blur(10px);
}
.chat-header .ch-meta { min-width: 0; }
.chat-header .ch-name { font-weight: 700; font-size: 1.05rem; }
.chat-header .ch-status { font-size: 0.8rem; color: #51e87e; }
.chat-header .ch-persona { margin-left: auto; font-size: 0.8rem; color: var(--text-faint); text-align: right; }
.ch-info-btn {
  margin-left: auto;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.ch-info-btn:hover { border-color: var(--pink-hot); color: var(--text); }

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.msg { display: flex; gap: 12px; max-width: 72%; animation: msgIn 0.25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }

.msg .bubble {
  padding: 13px 18px;
  border-radius: 20px;
  font-size: 0.96rem;
  line-height: 1.55;
}
.msg.them { align-self: flex-start; }
.msg.them .bubble {
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble {
  background: var(--grad-cta);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 18px rgba(255, 95, 162, 0.25);
}

.typing-dots { display: inline-flex; gap: 5px; padding: 6px 2px; }
.typing-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: bounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 30% { transform: translateY(-6px); opacity: 1; } 60% { transform: translateY(0); opacity: 0.4; } }

.chat-input-row {
  display: flex;
  gap: 12px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--border);
  background: rgba(20, 16, 31, 0.6);
}
.chat-input-row input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 14px 22px;
  color: var(--text);
  font-size: 0.98rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.chat-input-row input:focus {
  border-color: var(--pink-hot);
  box-shadow: 0 0 0 3px rgba(255, 95, 162, 0.15);
}
.chat-input-row input::placeholder { color: var(--text-faint); }

.demo-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-faint);
  padding: 0 22px 12px;
  background: rgba(20, 16, 31, 0.6);
}

/* ============================================================
   Auth: nav slot, modal, account chip, limits, upsell
   ============================================================ */
.auth-slot { display: inline-flex; align-items: center; gap: 10px; }
.acct-email { color: var(--text-dim); font-size: 0.85rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.profile-menu { position: relative; }
.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.profile-trigger:hover,
.profile-menu.open .profile-trigger {
  background: var(--bg-card-hover);
  border-color: rgba(255, 95, 162, 0.45);
}
.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-cta);
  color: #fff;
  font-size: 0.84rem;
  box-shadow: 0 4px 14px rgba(255, 95, 162, 0.22);
}
.profile-chevron {
  color: var(--text-faint);
  font-size: 0.72rem;
  transform: translateY(1px);
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 32px));
  background: rgba(20, 16, 31, 0.98);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  padding: 8px;
  z-index: 90;
}
.profile-dropdown[hidden] { display: none; }
.profile-summary {
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.profile-email {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-plan {
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-top: 3px;
}
.profile-plan.low { color: #ffd166; }
.profile-plan.premium { color: #ffe9a8; }
.profile-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
}
.profile-item:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}
.profile-item.highlight { color: var(--pink); }
.profile-item.danger { color: #ff8aa0; }

.limit-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.limit-pill.low { color: #ffd166; border-color: rgba(255, 209, 102, 0.4); }
.limit-pill.premium {
  color: #ffe9a8;
  background: linear-gradient(135deg, rgba(255,95,162,0.18), rgba(155,95,247,0.18));
  border-color: rgba(255, 209, 102, 0.5);
}

/* modal shell (shared by auth + upsell) */
.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 5, 14, 0.82);
  backdrop-filter: blur(16px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-modal[hidden] { display: none; }
.auth-card {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 22px;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.auth-card .logo { display: block; margin-bottom: 20px; }
.auth-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; color: var(--text-faint);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.auth-close:hover { color: var(--text); }

.auth-tabs { display: flex; gap: 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; background: transparent; border: none; color: var(--text-dim); font-weight: 600; font-size: 0.92rem; padding: 9px; border-radius: 9px; transition: background 0.15s, color 0.15s; }
.auth-tab.active { background: var(--grad-cta); color: #fff; }

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}
.auth-form input:focus { border-color: var(--pink-hot); }
.auth-hint { font-size: 0.78rem; color: var(--text-faint); margin: -2px 0 2px; }
.auth-forgot { display: inline-block; font-size: 0.82rem; color: var(--text-dim); margin-top: 2px; }
.auth-forgot:hover { color: var(--pink); }
.auth-error { color: #ff6b8a; font-size: 0.85rem; margin: 2px 0 0; }
.auth-fine { color: var(--text-faint); font-size: 0.72rem; margin-top: 18px; line-height: 1.6; }

/* upsell */
.upsell-card { text-align: center; }
.upsell-emoji { font-size: 2.6rem; margin-bottom: 6px; }
.upsell-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.upsell-line { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 18px; }
.upsell-perks { list-style: none; text-align: left; margin: 0 auto 22px; max-width: 300px; }
.upsell-perks li { padding: 7px 0 7px 26px; position: relative; color: var(--text-dim); font-size: 0.92rem; }
.upsell-perks li::before { content: "✦"; position: absolute; left: 4px; color: var(--pink-hot); }
#upsellNote.flash { color: var(--pink); transition: color 0.2s; }
.upsell-card .btn-ghost { margin-top: 10px; }

/* ---------- chat profile / about panel ---------- */
.chat-profile {
  border-left: 1px solid var(--border);
  background: var(--bg-soft);
  overflow-y: auto;
  min-height: 0;
  position: relative;
}
.profile-close {
  display: none;
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.5); color: #fff; border: none;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  align-items: center; justify-content: center;
}
.profile-hero { position: relative; height: 300px; }
.profile-hero-photo { position: absolute; inset: 0; background-size: cover; background-position: center top; }
.profile-hero-photo.placeholder { display: flex; align-items: center; justify-content: center; }
.profile-hero-photo.placeholder span { font-size: 6rem; font-weight: 800; color: rgba(255, 255, 255, 0.32); user-select: none; }
.profile-hero-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-soft) 2%, rgba(20, 16, 31, 0.25) 45%, transparent 70%);
}
.profile-hero-text { position: absolute; left: 18px; right: 18px; bottom: 14px; }
.profile-hero-text h2 { font-size: 1.5rem; line-height: 1.1; }
.profile-hero-text h2 span { color: var(--text-dim); font-weight: 500; font-size: 1.1rem; }
.profile-status { font-size: 0.82rem; color: #51e87e; margin-top: 5px; }
.profile-body { padding: 16px 20px 30px; }
.profile-persona { color: var(--pink); font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.profile-tags .tag {
  font-size: 0.76rem; color: var(--text-dim);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 11px;
}
.profile-body h3 {
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-faint); margin: 20px 0 9px;
}
.profile-bio { color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; }
.profile-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.profile-photo {
  aspect-ratio: 3 / 4;
  background-size: cover; background-position: center;
  border-radius: 12px; border: 1px solid var(--border);
}
.profile-empty { color: var(--text-faint); font-size: 0.88rem; line-height: 1.6; }
.profile-scrim { position: fixed; inset: 0; z-index: 125; background: rgba(8, 5, 14, 0.6); backdrop-filter: blur(4px); }
.profile-scrim[hidden] { display: none; }

/* ---------- Responsive ---------- */
/* Below 1180px the profile panel becomes a slide-in drawer. */
@media (min-width: 1180px) {
  .ch-info-btn { display: none; }
  .profile-scrim { display: none !important; } /* panel is persistent on desktop */
}
@media (max-width: 1179px) {
  .chat-layout { grid-template-columns: 300px 1fr; }
  .chat-profile {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(370px, 88vw);
    transform: translateX(101%);
    transition: transform 0.28s ease;
    z-index: 130;
    box-shadow: -24px 0 70px rgba(0, 0, 0, 0.55);
  }
  body.profile-open .chat-profile { transform: none; }
  .profile-close { display: flex; }
}

@media (max-width: 880px) {
  .nav-links a:not(.btn) { display: none; }
  .acct-email { display: none; }
  .profile-label { display: none; }
  .profile-trigger { padding-right: 10px; }
  .chat-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100dvh - var(--nav-h));
    min-height: 0;
  }
  .chat-sidebar {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 10px;
    gap: 6px;
    max-height: 88px;
  }
  .chat-sidebar h3 { display: none; }
  .contact { flex-direction: column; gap: 6px; padding: 8px 10px; text-align: center; }
  .contact .c-line { display: none; }
  .contact .c-name { font-size: 0.78rem; }
  .chat-main { height: auto; min-height: 0; }
  .msg { max-width: 88%; }
  .chat-header .ch-persona { display: none; }
  .ch-info-btn { padding: 7px 12px; font-size: 0.78rem; }
}

/* ============================================================
   Document / legal pages (terms, privacy, refunds, support…)
   ============================================================ */
.doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 90px;
}
.doc-header { margin-bottom: 32px; }
.doc-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; }
.doc-updated { color: var(--text-faint); font-size: 0.85rem; margin-top: 8px; }
.doc-note {
  margin: 22px 0;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--pink-hot);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 0.9rem;
}
.doc h2 {
  font-size: 1.25rem;
  margin: 34px 0 12px;
  color: var(--text);
}
.doc h3 { font-size: 1.02rem; margin: 22px 0 8px; color: var(--text); }
.doc p, .doc li { color: var(--text-dim); line-height: 1.75; font-size: 0.96rem; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 7px; }
.doc a { color: var(--pink); }
.doc a:hover { color: var(--pink-hot); }
.doc strong { color: var(--text); }
.doc .toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}
.doc .toc a {
  font-size: 0.82rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 999px;
  padding: 5px 13px;
}
.doc .toc a:hover { border-color: var(--pink-hot); color: var(--text); }
.placeholder-tag {
  color: #ffd166;
  font-style: italic;
  border-bottom: 1px dotted rgba(255, 209, 102, 0.5);
}

/* 404 */
.notfound {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  gap: 14px;
}
.notfound .big { font-size: clamp(4rem, 16vw, 8rem); line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.notfound p { color: var(--text-dim); max-width: 420px; }

/* shared danger button (account + admin) */
.btn-danger {
  background: rgba(255, 80, 110, 0.12);
  color: #ff8aa0;
  border: 1px solid rgba(255, 80, 110, 0.4);
}
.btn-danger:hover { background: rgba(255, 80, 110, 0.22); border-color: #ff8aa0; }

/* ============================================================
   Account page
   ============================================================ */
.account { max-width: 720px; margin: 0 auto; padding: 44px 22px 90px; }
.account-gate { text-align: center; padding: 80px 20px; }
.account-gate h1 { font-size: 1.8rem; margin-bottom: 10px; }
.account-gate p { color: var(--text-dim); margin-bottom: 22px; }
.account-head { margin-bottom: 24px; }
.account-head h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.account-sub { color: var(--text-dim); margin-top: 6px; }
.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  margin-bottom: 18px;
}
.account-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.account-card-head h2 { font-size: 1.12rem; }
.account-meta { color: var(--text-dim); font-size: 0.92rem; line-height: 1.6; margin-bottom: 16px; }
.plan-chip {
  font-size: 0.78rem; font-weight: 700; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px;
}
.plan-chip.paid {
  color: #ffe9a8;
  background: linear-gradient(135deg, rgba(255,95,162,0.18), rgba(155,95,247,0.18));
  border-color: rgba(255, 209, 102, 0.5);
}
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.account-form { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.account-form label { display: flex; flex-direction: column; gap: 6px; color: var(--text-dim); font-size: 0.86rem; }
.account-form input {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 15px; color: var(--text); font-size: 0.96rem; font-family: inherit; outline: none;
}
.account-form input:focus { border-color: var(--pink-hot); }
.account-msg { font-size: 0.86rem; margin-top: 4px; }
.account-msg.ok { color: #7bd88f; }
.account-msg.warn { color: #ff8aa0; }
.danger-zone { border-color: rgba(255, 80, 110, 0.3); }
.delete-confirm-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* checkout-mock page */
.checkout-mock { max-width: 460px; margin: 0 auto; padding: 70px 22px; text-align: center; }
.checkout-mock .mock-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; }
.checkout-mock .mock-badge { display:inline-block; font-size:0.72rem; letter-spacing:0.08em; text-transform:uppercase; color:#ffd166; border:1px solid rgba(255,209,102,0.4); border-radius:999px; padding:4px 12px; margin-bottom:18px; }
.checkout-mock h1 { font-size: 1.5rem; margin-bottom: 8px; }
.checkout-mock p { color: var(--text-dim); margin-bottom: 18px; }
.checkout-mock .mock-amount { font-size: 2rem; font-weight: 800; margin: 6px 0 18px; }

/* ============================================================
   Chat: photo button + image messages
   ============================================================ */
.chat-photo-btn { flex: 0 0 auto; font-size: 1.1rem; padding: 9px 14px; }
.chat-photo-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.msg .bubble .chat-image {
  display: block; margin-top: 6px; border-radius: 14px; max-width: 240px; width: 100%;
  border: 1px solid var(--border);
}
.msg .bubble .chat-image-cap { display:block; font-size: 0.78rem; color: var(--text-faint); margin-bottom: 6px; }
.img-pending { font-size: 0.82rem; color: var(--text-faint); }
