/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink:       #C0547A;
  --pink-light: #F2D4DE;
  --pink-dark:  #8B2F50;
  --cream:      #FDF8F5;
  --white:      #FFFFFF;
  --gray-50:    #F9F9F9;
  --gray-100:   #F0EEF0;
  --gray-300:   #C8C4C8;
  --gray-500:   #7A747A;
  --gray-700:   #3D3840;
  --gray-900:   #1A1720;
  --text:       var(--gray-900);
  --text-muted: var(--gray-500);
  --surface:    var(--white);
  --surface-2:  var(--gray-50);
  --border:     var(--gray-100);
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08);
  --transition: 200ms ease;
}

html.dark {
  --cream:      #1A1720;
  --white:      #231F2A;
  --gray-50:    #2A2533;
  --gray-100:   #342E3F;
  --gray-300:   #5A5465;
  --gray-500:   #9A94A5;
  --gray-700:   #C8C2D4;
  --gray-900:   #F0EBF8;
  --text:       var(--gray-900);
  --text-muted: var(--gray-500);
  --surface:    var(--white);
  --surface-2:  var(--gray-50);
  --border:     var(--gray-100);
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Utility ───────────────────────────────────────────────────── */
.hidden { display: none !important; }
a { color: var(--pink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── AUTH WALL ─────────────────────────────────────────────────── */
#auth-wall {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(160deg, #FDF0F4 0%, #F8EAF2 50%, #F0E8F8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 40px rgba(192,84,122,.12);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.logo-h   { font-size: 2.4rem; font-weight: 700; color: var(--pink); }
.logo-era { font-size: 2.4rem; font-weight: 300; color: var(--gray-700); }
.auth-tagline { font-size: .75rem; color: var(--text-muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }

.auth-card h2 { font-size: 1.3rem; font-weight: 600; margin-bottom: 4px; }
.auth-sub { color: var(--text-muted); font-size: .875rem; margin-bottom: 20px; }

.field-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.field-group input {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
}
.field-group input:focus { border-color: var(--pink); background: var(--surface); }

.auth-error {
  background: #FEE8EE;
  color: #C0547A;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .85rem;
  margin-bottom: 12px;
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover  { background: var(--pink-dark); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.auth-switch { text-align: center; font-size: .85rem; color: var(--text-muted); margin-top: 16px; }

/* ── APP SHELL ─────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  position: relative;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-logo { font-size: 1.4rem; }
.nav-actions { display: flex; gap: 8px; }
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.icon-btn:hover { background: var(--gray-100); }

#screen-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bottom-nav {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-muted);
  transition: color var(--transition);
  font-size: .65rem;
}
.nav-tab .nav-icon { font-size: 1.2rem; }
.nav-tab.active { color: var(--pink); }

/* ── SCREEN BASE ───────────────────────────────────────────────── */
.screen { padding: 16px; }

/* ── HOME SCREEN ───────────────────────────────────────────────── */
.hero-card {
  background: linear-gradient(135deg, var(--pink) 0%, #9B3D6A 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: white;
  margin-bottom: 20px;
}
.hero-greeting { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.hero-sub { font-size: .875rem; opacity: .85; }

.section-title { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.quick-card {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: background var(--transition);
  border: 1px solid var(--border);
}
.quick-card:hover { background: var(--gray-100); }
.quick-card .qc-icon { font-size: 1.5rem; margin-bottom: 8px; }
.quick-card .qc-label { font-size: .85rem; font-weight: 600; }
.quick-card .qc-sub { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

.trial-banner {
  background: linear-gradient(135deg, #FDF0F4, #F8EAF2);
  border: 1px solid var(--pink-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.trial-text { font-size: .875rem; }
.trial-text strong { display: block; margin-bottom: 2px; }
.trial-text span { color: var(--text-muted); font-size: .8rem; }
.btn-upgrade {
  background: var(--pink);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
  flex-shrink: 0;
}
.btn-upgrade:hover { background: var(--pink-dark); }

/* ── FOUNDER SESSION CARD ──────────────────────────────────────── */
.founder-session-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}
.fs-badge { display: inline-block; background: var(--pink-light); color: var(--pink-dark); font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.fs-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.fs-meta  { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; }
.btn-secondary {
  display: inline-block;
  padding: 8px 16px;
  background: var(--surface);
  border: 1.5px solid var(--pink);
  color: var(--pink);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-secondary:hover { background: var(--pink); color: white; }

/* ── COMMUNITY ─────────────────────────────────────────────────── */
.topic-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.topic-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.chip.active { background: var(--pink); color: white; border-color: var(--pink); }
.chip.locked { opacity: .6; }

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pink-light);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 600; color: var(--pink-dark);
  flex-shrink: 0;
}
.post-author { font-size: .875rem; font-weight: 600; }
.post-time   { font-size: .75rem; color: var(--text-muted); }
.post-topic-badge { margin-left: auto; font-size: .7rem; padding: 2px 8px; border-radius: 20px; background: var(--gray-100); color: var(--text-muted); }
.post-body { font-size: .9rem; line-height: 1.55; color: var(--text); margin-bottom: 12px; }
.post-actions { display: flex; gap: 16px; }
.post-action-btn { background: none; border: none; font-size: .8rem; color: var(--text-muted); cursor: pointer; font-family: inherit; padding: 2px 0; transition: color var(--transition); }
.post-action-btn:hover { color: var(--pink); }

.locked-overlay {
  background: linear-gradient(to bottom, transparent, var(--cream));
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  margin-top: -20px;
}
.locked-overlay .lock-icon { font-size: 1.5rem; margin-bottom: 8px; }
.locked-overlay p { font-size: .875rem; color: var(--text-muted); margin-bottom: 12px; }

.compose-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
}
.compose-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: .9rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
}
.compose-input:focus { border-color: var(--pink); }
.compose-send {
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
}
.compose-send:hover { background: var(--pink-dark); }

/* ── HERA AI ───────────────────────────────────────────────────── */
.ai-screen { display: flex; flex-direction: column; height: 100%; }
.ai-header { padding: 16px; border-bottom: 1px solid var(--border); }
.ai-header h2 { font-size: 1.1rem; font-weight: 600; }
.ai-header p  { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg { max-width: 82%; }
.msg.user { align-self: flex-end; }
.msg.hera { align-self: flex-start; }
.msg-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: .9rem;
  line-height: 1.5;
}
.msg.user .msg-bubble { background: var(--pink); color: white; border-bottom-right-radius: 4px; }
.msg.hera .msg-bubble { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 4px; border: 1px solid var(--border); }
.msg-label { font-size: .7rem; color: var(--text-muted); margin-bottom: 4px; padding: 0 4px; }

.ai-input-bar {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background: var(--surface);
}
.ai-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: .9rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  resize: none;
  max-height: 100px;
}
.ai-input:focus { border-color: var(--pink); }
.ai-send {
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-end;
  transition: background var(--transition);
}
.ai-send:hover { background: var(--pink-dark); }
.ai-send:disabled { opacity: .5; cursor: not-allowed; }

.ai-credits { font-size: .75rem; color: var(--text-muted); text-align: center; padding: 4px; }

/* ── LIBRARY ───────────────────────────────────────────────────── */
.library-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}
.library-item:hover { background: var(--gray-100); }
.lib-icon { font-size: 1.4rem; flex-shrink: 0; }
.lib-title { font-size: .9rem; font-weight: 600; margin-bottom: 2px; }
.lib-source { font-size: .75rem; color: var(--text-muted); }
.lib-tag { font-size: .7rem; padding: 2px 8px; border-radius: 20px; background: var(--pink-light); color: var(--pink-dark); display: inline-block; margin-top: 4px; }

/* ── PROFILE ───────────────────────────────────────────────────── */
.profile-header {
  background: linear-gradient(135deg, var(--pink) 0%, #9B3D6A 100%);
  padding: 28px 16px 20px;
  color: white;
  text-align: center;
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700;
  margin: 0 auto 12px;
  border: 2px solid rgba(255,255,255,.4);
}
.profile-name { font-size: 1.1rem; font-weight: 600; }
.profile-plan { font-size: .8rem; opacity: .8; margin-top: 4px; }

.profile-section { padding: 16px; }
.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.profile-row:last-child { border-bottom: none; }
.profile-row-label { color: var(--text-muted); font-size: .85rem; }
.profile-row-value { font-weight: 500; }
.badge-verified { background: #E8F5E9; color: #388E3C; font-size: .75rem; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.badge-premium  { background: var(--pink-light); color: var(--pink-dark); font-size: .75rem; padding: 2px 8px; border-radius: 20px; font-weight: 600; }

/* ── UPGRADE SCREEN ────────────────────────────────────────────── */
.upgrade-hero {
  background: linear-gradient(135deg, var(--pink) 0%, #9B3D6A 100%);
  padding: 32px 24px;
  color: white;
  text-align: center;
}
.upgrade-hero h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.upgrade-hero p  { font-size: .9rem; opacity: .85; }

.plan-cards { padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.plan-card.recommended { border-color: var(--pink); }
.plan-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--pink); color: white; font-size: .7rem; font-weight: 700; padding: 2px 12px; border-radius: 20px; white-space: nowrap; }
.plan-name  { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.plan-price { font-size: 1.6rem; font-weight: 700; color: var(--pink); }
.plan-price span { font-size: .9rem; font-weight: 400; color: var(--text-muted); }
.plan-desc  { font-size: .8rem; color: var(--text-muted); margin-top: 6px; }
.plan-perks { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.plan-perk  { font-size: .85rem; display: flex; gap: 8px; align-items: flex-start; }
.plan-perk::before { content: '✓'; color: var(--pink); font-weight: 700; flex-shrink: 0; }

.btn-plan {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-plan:hover { background: var(--pink-dark); }

.upgrade-guarantee { text-align: center; padding: 16px; font-size: .8rem; color: var(--text-muted); }

/* ── EMPTY STATE ───────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state .es-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: .9rem; }

/* ── LOADING ───────────────────────────────────────────────────── */
.loading-dots { display: flex; gap: 4px; padding: 10px 14px; }
.loading-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-300);
  animation: bounce 1.2s infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

/* ── MODAL ─────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.4);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-sheet {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px;
  width: 100%; max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-handle { width: 40px; height: 4px; background: var(--gray-300); border-radius: 2px; margin: 0 auto 20px; }

/* ── DESKTOP CENTER ────────────────────────────────────────────── */
@media (min-width: 520px) {
  body { background: #F0E8F2; }
  #auth-wall { background: linear-gradient(160deg, #F5E8EF 0%, #EDE5F5 100%); }
  #app { box-shadow: 0 0 60px rgba(0,0,0,.12); border-radius: var(--radius-lg); margin: 20px auto; height: calc(100dvh - 40px); }
}

/* ── AUTH LANDING ADDITIONS ────────────────────────────────────── */
.auth-hero {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--gray-700);
  text-align: center;
  margin-bottom: 24px;
  font-weight: 400;
}

.btn-outline {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--pink);
  border: 1.5px solid var(--pink);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 10px;
  transition: all var(--transition);
}
.btn-outline:hover { background: var(--pink); color: white; }

/* ── AUTH PERKS ────────────────────────────────────────────────── */
.auth-perks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FDF0F4, #F8EAF2);
  border-radius: var(--radius-md);
  border: 1px solid var(--pink-light);
}
.auth-perk {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  color: var(--gray-700);
  font-weight: 500;
}

/* ── ACCOUNTABILITY NOTICE ─────────────────────────────────────── */
.accountability-notice {
  background: linear-gradient(135deg, #F0F8FF, #EEF4FF);
  border: 1px solid #C7D9F8;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: .8rem;
  color: #3B5EA6;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── MOOD TRACKER ──────────────────────────────────────────────── */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.mood-btn:hover { border-color: var(--pink); background: var(--pink-light); }
.mood-btn.mood-selected { border-color: var(--pink); background: var(--pink-light); }
.mood-emoji { font-size: 1.4rem; }
.mood-label { font-size: .65rem; font-weight: 600; color: var(--text-muted); }
.mood-logged { font-size: .8rem; color: var(--pink); text-align: center; padding: 4px 0 12px; font-weight: 500; }

/* ── DAILY PROMPT ──────────────────────────────────────────────── */
.prompt-card {
  background: linear-gradient(135deg, #FDF0F4, #F8EAF2);
  border: 1px solid var(--pink-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prompt-icon { font-size: 1.2rem; }
.prompt-text { font-size: .9rem; line-height: 1.55; color: var(--gray-700); font-style: italic; }
.prompt-cta {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--pink);
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

/* ── REPLIES ───────────────────────────────────────────────────── */
.replies-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reply-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.reply-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: var(--gray-500);
  flex-shrink: 0;
}
.reply-body { font-size: .85rem; line-height: 1.45; }
.reply-author { font-weight: 600; margin-right: 6px; }
.reply-text { color: var(--text); }
.reply-compose { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.reply-input {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
}
.reply-input:focus { border-color: var(--pink); }
.reply-send-btn {
  align-self: flex-start;
  padding: 6px 14px;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.anon-tag {
  font-size: .65rem;
  background: var(--gray-100);
  color: var(--gray-500);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 500;
}

/* ── SIGNUP PLAN SELECT & LEGAL ────────────────────────────────── */
.plan-select {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.plan-select:focus { border-color: var(--pink); }

.auth-legal {
  font-size: .72rem;
  color: var(--text-muted);
  line-height: 1.6;
  text-align: center;
  margin-top: 10px;
  padding: 10px 4px 0;
  border-top: 1px solid var(--border);
}

/* ── GLOBE ─────────────────────────────────────────────────────── */
.globe-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.globe-svg {
  width: 100%;
  height: auto;
  display: block;
}
.globe-dot {
  cursor: pointer;
  transition: r 0.2s ease;
}
.globe-dot-online {
  fill: var(--pink);
  filter: drop-shadow(0 0 4px rgba(192,84,122,0.6));
  animation: pulse-dot 2s infinite;
}
.globe-dot-offline {
  fill: var(--gray-300);
}
.globe-dot:hover { r: 9; }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.globe-tooltip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: .85rem;
  box-shadow: var(--shadow-md);
  pointer-events: none;
  z-index: 10;
  min-width: 140px;
  max-width: 200px;
}
.globe-tooltip:not(.hidden) { pointer-events: auto; }
.globe-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.globe-member-row:hover { background: var(--gray-100); }

/* ── TOPIC STARTERS ────────────────────────────────────────────── */
.topic-starter-card {
  background: linear-gradient(135deg, #FDF0F4, #F8EAF2);
  border: 1.5px solid var(--pink-light);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  margin-bottom: 14px;
}
.topic-starter-badge {
  font-size: .75rem;
  font-weight: 700;
  color: var(--pink-dark);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.topic-starter-body {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--gray-700);
  margin-bottom: 12px;
  font-style: italic;
}
.topic-starter-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--pink);
}
.anon-reminder {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── FOUNDING MEMBER NOTE ──────────────────────────────────────── */
.auth-founding-note {
  background: linear-gradient(135deg, #FDF8E8, #FFF8DC);
  border: 1px solid #F0D060;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .8rem;
  color: #7A6000;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* ── CODE OF CONDUCT ───────────────────────────────────────────── */
.conduct-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  cursor: pointer;
}
.conduct-check input[type="checkbox"] {
  accent-color: var(--pink);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.conduct-check a {
  color: var(--pink);
  font-weight: 600;
  text-decoration: underline;
}

/* ── DIRECT MESSAGES ───────────────────────────────────────────── */
.dm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dm-sheet {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  height: 70vh;
  display: flex;
  flex-direction: column;
}
.dm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.dm-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dm-compose {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}


.conduct-check-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.conduct-link-btn {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--pink);
  font-size: .78rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}


.starter-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.starter-clickable:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }


.starter-comment-btn {
  background: none;
  border: none;
  color: var(--pink);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}


.conduct-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.conduct-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
  flex-shrink: 0;
}

.conduct-inline-label {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.4;
}


.conduct-accept-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  background: #fff7fb;
  border: 1px solid #f2d4de;
  border-radius: 12px;
}

.conduct-accept-text {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.conduct-accept-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--pink);
  background: white;
  color: var(--pink);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}

.conduct-accept-btn.accepted {
  background: var(--pink);
  color: white;
}


.conduct-inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.conduct-inline-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--pink);
  flex-shrink: 0;
}

.conduct-inline-row-label {
  font-size: .84rem;
  color: var(--text);
  line-height: 1.4;
  font-weight: 600;
}

.conduct-subtext {
  font-size: .76rem;
  color: var(--text-muted);
  line-height: 1.5;
}


.conduct-status {
  font-size: .82rem;
  color: #2e7d32;
  font-weight: 700;
}


.ai-history-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.ai-history-strip::-webkit-scrollbar { display: none; }
.ai-thread-chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: .78rem;
  font-family: inherit;
  cursor: pointer;
}
.ai-thread-chip.active {
  background: var(--pink-light);
  color: var(--pink-dark);
  border-color: var(--pink-light);
}


.room-cards-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.room-cards-row::-webkit-scrollbar { display: none; }
.room-card {
  min-width: 220px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  font-family: inherit;
}
.room-card-active {
  border-color: var(--pink);
  background: linear-gradient(135deg,#FDF0F4,#F8EAF2);
}
.room-card-locked { opacity: .7; }
.room-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.room-card-title {
  font-size: .92rem;
  font-weight: 700;
}
.room-card-prompt {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.room-card-meta {
  font-size: .72rem;
  color: var(--pink);
  margin-top: 10px;
  font-weight: 600;
}
.room-card-lock { font-size: .9rem; }
.happening-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.happening-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}
.happening-title {
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.happening-value {
  font-size: .95rem;
  font-weight: 700;
}
.topic-starter-card.v2 {
  margin: 4px 0 14px;
}
.library-v2 .library-item {
  background: var(--surface-2);
}


.mood-panel {
  background: linear-gradient(135deg,#FDF0F4,#F8EAF2);
  border: 1px solid var(--pink-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 10px;
}
.mood-panel-title {
  font-size: .84rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.mood-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mood-tag {
  padding: 6px 10px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: .78rem;
  cursor: pointer;
  font-family: inherit;
}
.mood-tag-active,
.mood-tag-selected {
  background: var(--pink);
  border-color: var(--pink);
  color: white;
}
