:root {
  --bg: #0e0c0a;
  --bg-warm: #14110d;
  --surface: #1a1611;
  --surface-2: #211c15;
  --border: #332c22;
  --border-soft: #241f19;
  --text: #f3ede1;
  --muted: #a89a86;
  --muted-2: #7c705f;
  --accent: #ff5a36;
  --accent-hover: #ff6f4d;
  --accent-ink: #2a0d02;
  --accent-soft: rgba(255, 90, 54, 0.14);
  --gold: #e3ab45;
  --gold-soft: rgba(227, 171, 69, 0.14);
  --danger: #ef5a4c;
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.18);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.22);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.5);
  --ease: cubic-bezier(.2,.7,.3,1);
}
/* ---------- Tema claro ---------- */
html[data-theme="light"] {
  --bg: #faf6ef;
  --bg-warm: #f3ecdf;
  --surface: #ffffff;
  --surface-2: #f2ece1;
  --border: #e2d8c6;
  --border-soft: #ece4d5;
  --text: #2a2318;
  --muted: #6b5f4d;
  --muted-2: #8a7d68;
  --accent: #e6491f;
  --accent-hover: #d13c15;
  --accent-ink: #ffffff;
  --accent-soft: rgba(230, 73, 31, 0.12);
  --gold: #a9781f;
  --gold-soft: rgba(169, 120, 31, 0.14);
  --danger: #c0392b;
  --shadow-xs: 0 1px 2px rgba(20,15,5,0.06);
  --shadow-sm: 0 2px 10px rgba(20,15,5,0.07);
  --shadow-md: 0 10px 30px rgba(20,15,5,0.09);
  --shadow-lg: 0 24px 60px rgba(20,15,5,0.14);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 42px 42px;
  background-position: -1px -1px;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hidden { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Base de interaccion: transiciones y foco consistentes ---------- */
button, .nav-btn, .ghost-btn, .icon-btn, .small-btn, .tab-btn, .feed-tab-btn,
.theme-opt-btn, .followers-tab-btn, .pool-join-btn, a, input, textarea, select {
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease), opacity 0.15s var(--ease);
}
button { font-family: inherit; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
button:focus-visible, .nav-btn:focus-visible, .icon-btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
button:active:not(:disabled) { transform: translateY(1px); }

/* ---------- Auth ---------- */
#auth-screen { min-height: 100vh; display: flex; align-items: stretch; justify-content: center; padding: 32px 20px; position: relative; overflow: hidden; }
#auth-screen::before, #auth-screen::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); z-index: 0; pointer-events: none;
}
#auth-screen::before { width: 460px; height: 460px; background: rgba(255,90,54,0.22); top: -160px; left: -140px; }
#auth-screen::after { width: 400px; height: 400px; background: rgba(227,171,69,0.16); bottom: -160px; right: -100px; }
.auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  width: 100%;
  max-width: 980px;
  margin: auto;
  min-height: 560px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.auth-pitch {
  padding: 48px 44px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-warm);
}
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  border-radius: var(--r-sm);
  box-shadow: 0 4px 14px rgba(255,90,54,0.35);
}
.logo-mark.small { width: 24px; height: 24px; font-size: 13px; }
.logo-mark svg { display: block; }
.auth-pitch h1 {
  font-family: var(--font-display); font-weight: 500; font-style: italic;
  font-size: 46px; margin: 18px 0 10px; letter-spacing: -0.5px;
}
.tagline { color: var(--muted); font-size: 16px; line-height: 1.5; margin: 0 0 24px; }
.pitch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pitch-list li { display: flex; align-items: baseline; gap: 12px; font-size: 14px; color: var(--text); }
.pitch-num { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }

.auth-hook {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(255,90,54,0.35); padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; margin: 0 0 12px;
}

/* ---------- Mockup ilustrativo de una sala en vivo (hero + preview de invitado) ---------- */
.hero-mock {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px 18px; margin: 22px 0 26px; box-shadow: var(--shadow-md); position: relative;
}
.hero-mock-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.hero-mock-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 6px var(--danger); flex-shrink: 0; animation: ringPulse 1.6s infinite; }
.hero-mock-live-label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--danger); font-family: var(--font-mono); }
.hero-mock-viewers { margin-left: auto; font-size: 11px; color: var(--muted); font-family: var(--font-mono); }
.hero-mock-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.hero-mock-avatars { display: flex; margin-bottom: 16px; }
.hero-mock-avatar {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; border: 2px solid var(--surface-2); margin-left: -8px; flex-shrink: 0;
}
.hero-mock-avatar:first-child { margin-left: 0; }
.hero-mock-avatar-more { background: var(--surface); color: var(--muted); font-size: 10px; border-color: var(--surface-2); }
.hero-mock-wave { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.hero-mock-wave span { flex: 1; height: 100%; background: var(--accent); border-radius: 2px; opacity: 0.85; transform-origin: bottom; animation: waveBar 1.1s ease-in-out infinite; }
.hero-mock-wave span:nth-child(odd) { animation-delay: 0.15s; }
.hero-mock-wave span:nth-child(3n) { animation-delay: 0.3s; }
.hero-mock-wave span:nth-child(4n) { animation-delay: 0.45s; }
@keyframes waveBar { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

.guest-preview-open-btn {
  background: transparent; border: 1px dashed var(--border); color: var(--muted); cursor: pointer;
  padding: 10px; border-radius: var(--r-sm); font-size: 13px; font-family: var(--font-sans); font-weight: 500;
  margin-top: 4px; transition: color 0.15s ease, border-color 0.15s ease;
}
.guest-preview-open-btn:hover { color: var(--accent); border-color: var(--accent); }
.guest-preview-panel { text-align: center; }
.guest-preview-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.guest-preview-panel .hero-mock { text-align: left; margin: 16px 0; }
.guest-preview-hint { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0 0 16px; }
.primary-cta-btn {
  width: 100%; padding: 12px; border-radius: var(--r-sm); border: none; background: var(--accent);
  color: var(--accent-ink); font-weight: 600; cursor: pointer; font-size: 14px; font-family: var(--font-sans);
  box-shadow: 0 2px 10px rgba(255,90,54,0.28);
}
.primary-cta-btn:hover { background: var(--accent-hover); box-shadow: 0 4px 16px rgba(255,90,54,0.38); }
.auth-link-btn-standalone {
  background: transparent; border: none; color: var(--muted); cursor: pointer; font-family: var(--font-sans);
  font-size: 12.5px; margin-top: 10px; text-decoration: underline; text-decoration-color: transparent;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.auth-link-btn-standalone:hover { color: var(--accent); text-decoration-color: var(--accent); }

.auth-panel { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.tab-btn { flex: 1; padding: 10px 0; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; font-family: var(--font-sans); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input {
  padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 14px; font-family: var(--font-sans);
}
.auth-form input::placeholder { color: var(--muted-2); }
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-form button {
  margin-top: 6px; padding: 12px; border-radius: var(--r-sm); border: none;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer;
  font-size: 14px; font-family: var(--font-sans);
  box-shadow: 0 2px 10px rgba(255,90,54,0.28);
}
.auth-form button:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 4px 16px rgba(255,90,54,0.38); }
.auth-form button.auth-link-btn {
  background: transparent; box-shadow: none; border-radius: 0; margin-top: 4px;
  padding: 2px 0; align-self: flex-start; color: var(--muted); font-weight: 500;
  font-size: 12.5px; text-decoration: underline; text-decoration-color: transparent;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.auth-form button.auth-link-btn:hover:not(:disabled) {
  background: transparent; box-shadow: none; color: var(--accent); text-decoration-color: var(--accent);
}
.error { color: var(--danger); font-size: 13px; min-height: 16px; margin: 2px 0 0; }
.fine-print { color: var(--muted-2); font-size: 12px; margin-top: 22px; line-height: 1.5; }
.fine-print a, .settings-section-hint a { color: var(--accent); text-decoration: none; }
.fine-print a:hover, .settings-section-hint a:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-pitch { border-right: none; border-bottom: 1px solid var(--border); padding: 36px 28px; }
  .auth-panel { padding: 36px 28px; }
}

/* ---------- App shell ---------- */
.topbar { display: flex; align-items: center; gap: 20px; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--bg-warm); position: sticky; top: 0; z-index: 10; box-shadow: var(--shadow-xs); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand.small { font-family: var(--font-display); font-style: italic; font-size: 17px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav-btn { position: relative; padding: 7px 13px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-family: var(--font-sans); font-weight: 500; white-space: nowrap; }
.nav-btn:hover { color: var(--text); background: var(--surface-2); }
.nav-btn.active { background: var(--accent-soft); color: var(--accent); }
.nav-btn.active:hover { background: var(--accent-soft); color: var(--accent); }
.level-pill { background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold); padding: 4px 11px; border-radius: var(--r-sm); font-size: 12px; font-family: var(--font-mono); font-weight: 500; white-space: nowrap; }
.active-users-pill { display: flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 4px 11px; border-radius: var(--r-sm); font-size: 12px; font-family: var(--font-mono); font-weight: 500; white-space: nowrap; }
.active-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 5px #4ade80; flex-shrink: 0; }
.ghost-btn { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 7px 13px; border-radius: var(--r-sm); cursor: pointer; font-size: 13px; font-family: var(--font-sans); }
.ghost-btn:hover { color: var(--text); border-color: var(--muted); background: var(--surface-2); }
.icon-btn { position: relative; background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: var(--r-sm); width: 34px; height: 34px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { color: var(--text); border-color: var(--muted); background: var(--surface-2); }
.badge-dot { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 1px solid var(--bg-warm); }
.nav-btn .badge-dot { top: 2px; right: -2px; }

.content { max-width: 640px; margin: 0 auto; padding: 28px 24px; }
.view-intro { color: var(--muted); font-size: 13px; margin-bottom: 18px; line-height: 1.6; }

/* Columna lateral derecha (solo pantallas anchas): llena el espacio muerto junto al
   feed con salas/directos activos ahora mismo y cuentas para seguir, en vez de dejar
   un vacio negro. En movil/tablet se oculta y el contenido vuelve a ser una sola columna. */
.content-layout { display: flex; justify-content: center; align-items: flex-start; gap: 28px; max-width: 1060px; margin: 0 auto; }
.content-layout .content { margin: 0; flex: 1 1 640px; }
.sidebar-right { flex: 0 0 300px; width: 300px; padding: 28px 0 28px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 20px; }
.sidebar-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px 16px; }
.sidebar-box .section-title { margin: 0 0 10px; }
.sidebar-live-list, .sidebar-suggested-list { display: flex; flex-direction: column; gap: 10px; }
.sidebar-live-item { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: var(--r-sm); cursor: pointer; background: transparent; border: none; text-align: left; width: 100%; font-family: var(--font-sans); }
.sidebar-live-item:hover { background: var(--surface-2); }
.sidebar-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; flex-shrink: 0; animation: ringPulse 1.6s infinite; }
.sidebar-live-info { flex: 1; min-width: 0; }
.sidebar-live-title { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-live-meta { font-size: 11px; color: var(--muted); }
.sidebar-suggested-item { display: flex; align-items: center; gap: 9px; }
.sidebar-suggested-item .uname { font-size: 13px; }
.sidebar-suggested-item .sidebar-follow-btn { margin-left: auto; }
@media (max-width: 1120px) {
  .sidebar-right { display: none; }
  .content-layout { max-width: none; }
}
.section-title { font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--text); margin: 26px 0 12px; font-weight: 500; }

.notif-panel { position: absolute; right: 24px; top: 62px; width: 320px; max-height: 400px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: 0 20px 50px rgba(0,0,0,0.5); z-index: 20; }
.notif-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.ghost-btn.small { padding: 4px 10px; font-size: 11px; }
.notif-list { display: flex; flex-direction: column; }
.notif-item { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); font-size: 12px; color: var(--muted); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item b { color: var(--text); }

/* ---------- Post form / feed ---------- */
.post-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; margin-bottom: 22px; box-shadow: var(--shadow-xs); }
.post-form textarea { width: 100%; min-height: 66px; resize: vertical; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; font-size: 14px; font-family: var(--font-sans); }
.post-form textarea:focus { outline: none; border-color: var(--accent); }
.post-form-row { display: flex; gap: 10px; margin-top: 10px; align-items: center; justify-content: space-between; }
.xp-hint { color: var(--gold); font-size: 11px; font-family: var(--font-mono); }
.daily-prompt-label { font-size: 12px; color: var(--accent); font-weight: 600; margin: 0 0 6px; }
.avatar-nudge { display: block; margin: 6px 0 0; background: var(--surface-2); border: 1px dashed var(--accent); color: var(--accent); border-radius: var(--r-sm); padding: 8px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.avatar-nudge:hover { background: var(--surface-3, var(--surface-2)); }
.post-form-row button { padding: 9px 16px; border-radius: var(--r-sm); border: none; background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer; font-size: 13px; white-space: nowrap; font-family: var(--font-sans); }
.attach-btn { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 11px; cursor: pointer; display: inline-flex; align-items: center; color: var(--muted); }
.attach-btn:hover { color: var(--text); }

.image-preview { position: relative; margin-top: 10px; display: inline-block; }
.image-preview img { max-width: 100%; max-height: 220px; border-radius: var(--r-sm); border: 1px solid var(--border); }
.image-preview button { position: absolute; top: 6px; right: 6px; background: rgba(14,12,10,0.85); color: var(--text); border: none; border-radius: var(--r-sm); padding: 4px 10px; font-size: 11px; cursor: pointer; }
.post-image { max-width: 100%; border-radius: var(--r-sm); margin-bottom: 10px; display: block; }

.feed-list { display: flex; flex-direction: column; gap: 12px; }
.empty-state { color: var(--muted-2); text-align: center; padding: 40px 0; font-size: 14px; }

.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-xs); }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mini-avatar { width: 30px; height: 30px; border-radius: var(--r-sm); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; color: var(--accent-ink); font-family: var(--font-display); }
.post-author-col { flex: 1; }
.post-author { font-weight: 600; font-size: 13.5px; display: block; }
.post-time { color: var(--muted-2); font-size: 11px; font-family: var(--font-mono); }
.post-text { font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; margin-bottom: 10px; }
.post-actions { display: flex; gap: 8px; }
.post-actions button { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 6px 11px; border-radius: var(--r-sm); cursor: pointer; font-size: 11.5px; font-family: var(--font-sans); }
.post-actions button.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.ai-box { margin-top: 10px; border-top: 1px solid var(--border-soft); padding-top: 10px; font-size: 12px; color: var(--muted); }
.ai-summary { color: var(--text); margin-bottom: 8px; font-family: var(--font-display); font-style: italic; font-size: 14px; }
.ai-suggestions { display: flex; flex-direction: column; gap: 4px; }
.ai-suggestion-btn { text-align: left; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: 12px; font-family: var(--font-sans); }
.comments-box { margin-top: 10px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.comment-item { font-size: 12.5px; margin-bottom: 6px; color: var(--muted); }
.comment-item b { color: var(--text); }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; color: var(--text); font-size: 13px; font-family: var(--font-sans); }
.comment-form button { background: var(--border); border: none; color: var(--text); border-radius: var(--r-sm); padding: 8px 12px; cursor: pointer; font-size: 12px; }
.mini-actions { display: flex; gap: 6px; }
.mini-actions button { background: transparent; border: 1px solid var(--border); color: var(--muted-2); padding: 4px 9px; border-radius: var(--r-sm); font-size: 11px; cursor: pointer; font-family: var(--font-sans); }
.mini-actions button.danger { color: var(--danger); border-color: var(--danger); }

/* ---------- Pools / rooms / market shared cards ---------- */
.pools-list { display: flex; flex-direction: column; gap: 10px; }
.pool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 15px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; box-shadow: var(--shadow-xs); }
.pool-name { font-weight: 600; font-size: 14.5px; }
.pool-desc { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.pool-count { color: var(--muted-2); font-size: 11px; margin-top: 6px; font-family: var(--font-mono); }
.pool-join-btn { background: var(--accent); color: var(--accent-ink); border: none; padding: 8px 15px; border-radius: var(--r-sm); font-weight: 600; cursor: pointer; font-size: 12.5px; white-space: nowrap; font-family: var(--font-sans); }
.pool-join-btn.joined { background: transparent; border: 1px solid var(--accent); color: var(--accent); }

.room-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; margin-top: 16px; box-shadow: var(--shadow-xs); }
.room-messages { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.room-message { font-size: 12.5px; color: var(--muted); }
.room-message b { color: var(--text); }
.room-send-form { display: flex; gap: 8px; }
.room-send-form input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; color: var(--text); font-family: var(--font-sans); }
.room-send-form button { background: var(--accent); color: var(--accent-ink); border: none; border-radius: var(--r-sm); padding: 8px 14px; font-weight: 600; cursor: pointer; }

.audio-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.audio-controls button { background: var(--accent); color: var(--accent-ink); border: none; padding: 8px 14px; border-radius: var(--r-sm); font-weight: 600; cursor: pointer; font-size: 12px; font-family: var(--font-sans); }
.audio-controls button.active { background: var(--danger); color: #2a0402; }
.audio-peer-tag { font-size: 11px; color: var(--muted-2); border: 1px solid var(--border); padding: 3px 9px; border-radius: var(--r-sm); font-family: var(--font-mono); }

.listing-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; margin-bottom: 22px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-xs); }
.listing-form input { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; color: var(--text); font-size: 13px; font-family: var(--font-sans); }
.listing-form button { background: var(--accent); color: var(--accent-ink); border: none; padding: 10px; border-radius: var(--r-sm); font-weight: 600; cursor: pointer; font-size: 13px; font-family: var(--font-sans); }
.listing-price { color: var(--gold); font-weight: 600; font-family: var(--font-mono); }
.sold-tag { color: var(--muted-2); font-size: 11px; border: 1px solid var(--border); padding: 3px 10px; border-radius: var(--r-sm); font-family: var(--font-mono); }

#dm-bg-overlay { position: fixed; inset: 0; z-index: -1; background: var(--surface-2); transition: background 0.15s; pointer-events: none; }
#dm-thread-view { padding: 10px; border-radius: var(--r-md); background: transparent; }
.dm-messages { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; padding: 6px; border-radius: var(--r-sm); background: transparent; }
.dm-msg-row { display: flex; align-items: flex-end; gap: 6px; max-width: 85%; }
.dm-msg-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.dm-msg-row.theirs { align-self: flex-start; }
.dm-msg-row .mini-avatar { flex-shrink: 0; }
.dm-msg { max-width: 100%; padding: 8px 12px; border-radius: var(--r-sm); font-size: 13px; word-break: break-word; }
.dm-msg.mine { background: var(--accent); color: var(--accent-ink); }
.dm-msg.theirs { background: var(--surface); border: 1px solid var(--border); }

/* ---------- Encabezado del chat + selector de fondo ---------- */
.dm-thread-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; background: rgba(20,17,13,0.35); border-radius: var(--r-sm); padding: 8px; }
.dm-thread-user { flex: 1; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.dm-bg-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); }
.dm-bg-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; padding: 0; }
.dm-bg-swatch:hover, .dm-bg-swatch.active { border-color: var(--accent); }
#dm-bg-custom { width: 26px; height: 26px; padding: 0; border: 2px solid var(--border); border-radius: 50%; background: none; cursor: pointer; }
#dm-thread-view .room-send-form { background: rgba(20,17,13,0.35); border-radius: var(--r-sm); padding: 6px; }
.dm-bg-photo-btn, .dm-bg-reset-btn { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface-2); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; }
.dm-bg-photo-btn:hover, .dm-bg-reset-btn:hover { border-color: var(--accent); }

/* ---------- Explorar / usuarios ---------- */
.search-form { display: flex; gap: 8px; margin-bottom: 12px; }
.search-form input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; color: var(--text); font-family: var(--font-sans); }
.search-form button { background: var(--border); border: none; color: var(--text); border-radius: var(--r-sm); padding: 10px 16px; cursor: pointer; }
.search-results { display: flex; flex-direction: column; gap: 8px; }
.user-row { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 14px; gap: 10px; box-shadow: var(--shadow-xs); }
.user-row .uname { font-weight: 600; font-size: 13.5px; }
.user-row .ubio { color: var(--muted-2); font-size: 12px; }
.small-btn { background: var(--accent); color: var(--accent-ink); border: none; padding: 6px 12px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: var(--font-sans); }
.small-btn:hover:not(:disabled) { background: var(--accent-hover); }
.small-btn.following { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.small-btn.following:hover { background: var(--accent-soft); }
.small-btn.danger:hover { background: rgba(239,90,76,0.14); }
.pay-btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.paypal-btn, .boost-btn-paypal, .premium-room-btn-paypal, .checkout-btn-paypal { background: #ffc439; color: #111; border: none; padding: 6px 12px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: var(--font-sans); }

/* ---------- Perfil ---------- */
.profile-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 24px; box-shadow: var(--shadow-xs); }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar-circle { width: 54px; height: 54px; border-radius: var(--r-md); flex-shrink: 0; }
.profile-card h2 { font-family: var(--font-display); font-weight: 500; font-style: italic; margin: 0; }
.profile-bio { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.stats-row { display: flex; gap: 22px; margin-bottom: 18px; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-clickable { cursor: pointer; }
.stat-clickable:hover .stat-value { color: var(--accent); }

/* ---------- Modal de seguidores/seguidos ---------- */
.followers-card { max-width: 420px; }
.followers-modal-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.followers-tab-btn { flex: 1; padding: 9px 0; text-align: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-size: 13px; font-family: var(--font-sans); font-weight: 500; border-radius: var(--r-sm); }
.followers-tab-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.followers-search-input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 12px; color: var(--text); font-size: 13px; font-family: var(--font-sans); margin-bottom: 12px; }
.stat-value { font-size: 19px; font-weight: 600; color: var(--text); font-family: var(--font-mono); }
.stat-label { font-size: 11px; color: var(--muted-2); }
.xp-bar-box { margin-bottom: 6px; }
.xp-bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; border: 1px solid var(--border); }
.xp-bar-fill { height: 100%; background: var(--accent); }
.xp-text { font-size: 11px; color: var(--muted-2); font-family: var(--font-mono); }
.privacy-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 18px 0; cursor: pointer; }
.privacy-toggle input { width: 15px; height: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Switch estetico (cuenta privada, etc.) ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text); margin: 0; cursor: pointer; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track { position: absolute; inset: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; transition: background 0.15s, border-color 0.15s; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform 0.15s, background 0.15s; }
.switch input:checked ~ .switch-track { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked ~ .switch-track .switch-thumb { transform: translateX(18px); background: var(--accent); }

/* ---------- Selector de tema (claro/oscuro) ---------- */
.theme-switch-row { display: flex; gap: 8px; }
.theme-opt-btn { flex: 1; padding: 10px 0; text-align: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-size: 13px; font-family: var(--font-sans); font-weight: 500; border-radius: var(--r-sm); }
.theme-opt-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Palabras silenciadas ---------- */
.muted-word-form { display: flex; gap: 8px; margin-bottom: 10px; }
.muted-word-form input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 12px; color: var(--text); font-size: 13px; font-family: var(--font-sans); }
.muted-words-list { display: flex; flex-wrap: wrap; gap: 8px; }
.muted-word-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 12px; padding: 5px 6px 5px 11px; border-radius: 999px; font-family: var(--font-sans); }
.muted-word-chip button { background: none; border: none; color: var(--muted-2); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; }
.muted-word-chip button:hover { color: var(--danger); }

/* ---------- Cambiar contrasena ---------- */
.change-password-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-xs); }
.change-password-form input { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; color: var(--text); font-size: 13px; font-family: var(--font-sans); }
.change-password-form button { align-self: flex-start; }
.change-password-form .success { color: #3fae5c; }
.chip { background: var(--accent-soft); color: var(--accent); font-size: 11.5px; padding: 4px 11px; border-radius: var(--r-sm); font-family: var(--font-mono); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }

.nav-toggle-btn { display: none; }

@media (max-width: 600px) {
  .topbar { gap: 12px; padding: 12px; flex-wrap: wrap; position: relative; }
  .nav-toggle-btn { display: flex; order: -1; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    margin-top: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    padding: 8px;
    flex-direction: column;
    gap: 2px;
    z-index: 25;
  }
  .nav.open { display: flex; }
  .nav-btn { width: 100%; text-align: left; }
}

/* ---------- Feed tabs ---------- */
.feed-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.feed-tab-btn { flex: 1; padding: 9px 0; text-align: center; background: var(--surface); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-size: 13px; font-family: var(--font-sans); font-weight: 500; border-radius: var(--r-sm); }
.feed-tab-btn.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Reactions ---------- */
.reaction-row { display: flex; gap: 6px; flex-wrap: wrap; }
.reaction-btn { background: transparent; border: 1px solid var(--border); color: var(--muted); padding: 5px 10px; border-radius: 999px; cursor: pointer; font-size: 13px; font-family: var(--font-sans); display: inline-flex; align-items: center; gap: 5px; }
.reaction-btn.mine { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.reaction-count { font-family: var(--font-mono); font-size: 11px; }

/* ---------- Repost embed ---------- */
.repost-tag { font-size: 11px; color: var(--muted-2); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); }
.repost-embed { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--surface-2); }
.repost-embed .post-author { font-size: 12.5px; }
.repost-embed .post-text { font-size: 13px; margin-bottom: 0; }

/* ---------- Editar post ---------- */
.post-edit-form textarea { width: 100%; min-height: 60px; background: var(--surface-2); border: 1px solid var(--accent); border-radius: var(--r-sm); padding: 10px; color: var(--text); font-family: var(--font-sans); font-size: 14px; }
.post-edit-actions { display: flex; gap: 8px; margin-top: 6px; }
.post-edit-actions button { padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-family: var(--font-sans); }
.post-edit-actions button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.edited-tag { color: var(--muted-2); font-size: 10.5px; font-style: italic; margin-left: 6px; }

/* ---------- Comentarios anidados ---------- */
.comment-item-row { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.comment-item-row b { color: var(--text); }
.comment-reply-btn { background: none; border: none; color: var(--muted-2); font-size: 11px; cursor: pointer; padding: 0; margin-left: 6px; font-family: var(--font-sans); }
.comment-replies { margin-left: 18px; border-left: 1px solid var(--border-soft); padding-left: 10px; margin-top: 4px; }
.reply-form { display: flex; gap: 6px; margin: 6px 0 6px 18px; }
.reply-form input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 9px; color: var(--text); font-size: 12px; font-family: var(--font-sans); }
.reply-form button { background: var(--border); border: none; color: var(--text); border-radius: var(--r-sm); padding: 6px 10px; cursor: pointer; font-size: 11px; }

/* ---------- Sugerencias de a quien seguir ---------- */
.suggested-box { margin-bottom: 22px; }
.suggested-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.suggested-card { flex-shrink: 0; width: 150px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 12px; text-align: center; box-shadow: var(--shadow-xs); }
.suggested-card .uname { font-size: 12.5px; font-weight: 600; margin-top: 8px; }
.suggested-card .ubio { font-size: 10.5px; color: var(--muted-2); margin: 4px 0 8px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------- Avatares con imagen real ---------- */
.mini-avatar.has-img, .avatar-circle.has-img { padding: 0; overflow: hidden; }
.mini-avatar img, .avatar-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar-upload-wrap { position: relative; display: inline-block; cursor: pointer; }
.avatar-edit-hint { font-size: 10px; color: var(--muted-2); margin-top: 6px; text-align: center; }

/* ---------- Sala: minijuego y mensajes de sistema ---------- */
.room-message-system { color: var(--gold); font-style: italic; text-align: center; padding: 4px 0; }
.game-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 10px; }
.game-choices { display: flex; gap: 8px; }
.game-choice-btn { flex: 1; background: var(--accent); color: var(--accent-ink); border: none; padding: 8px 0; border-radius: var(--r-sm); font-weight: 600; cursor: pointer; font-size: 13px; font-family: var(--font-sans); }

/* ---------- Insignias con progreso ---------- */
.chip.locked { background: var(--surface-2); color: var(--muted-2); border: 1px solid var(--border); }
.chip-progress { font-size: 10px; opacity: 0.75; margin-left: 4px; }

/* ---------- Galeria de fotos del perfil ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-item { aspect-ratio: 1; overflow: hidden; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.gallery-item img, .gallery-item video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Verificado ---------- */
.verified-badge { color: var(--accent); vertical-align: middle; margin-left: 3px; flex-shrink: 0; }
.verified-badge.plus-badge { color: #f2b90c; }
#profile-username { display: flex; align-items: center; gap: 2px; }
.verification-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-xs); }
.verified-row { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }

/* ---------- Ajustes ---------- */
#view-settings .privacy-toggle { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; margin: 0; }

/* ---------- Anuncios ---------- */
.ad-slot { position: relative; }
.ad-label { font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; font-family: var(--font-mono); }
.ad-demo-body { display: flex; align-items: center; gap: 12px; }
.ad-demo-icon { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; flex-shrink: 0; }
.ad-demo-title { font-size: 13px; color: var(--text); font-weight: 500; }
.ad-demo-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

/* ---------- Ajustes: usuarios bloqueados y cuenta ---------- */
.blocked-list { display: flex; flex-direction: column; gap: 8px; }
.blocked-list .empty-state { margin: 0; }
.small-btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.account-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.push-prefs-box { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.push-pref-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.push-pref-item input { accent-color: var(--accent, #6ee7d4); width: 15px; height: 15px; cursor: pointer; }
.delete-account-form { background: var(--surface); border: 1px solid var(--danger); border-radius: var(--r-md); padding: 16px; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.delete-account-form input { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 12px; color: var(--text); font-family: var(--font-sans); font-size: 13px; }

/* ---------- Monetizacion: Plus, creador, impulsar, salas premium ---------- */
.monetize-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow-xs); }
.boost-btn, .premium-room-btn { background: none; border: 1px solid var(--gold); color: var(--gold); border-radius: var(--r-sm); padding: 4px 9px; font-size: 11px; cursor: pointer; font-family: var(--font-sans); }
.boosted-tag { color: var(--gold); font-size: 10.5px; font-weight: 600; margin-left: 6px; }
.pool-card .pool-premium-tag { color: var(--gold); font-size: 10.5px; font-weight: 600; }

/* ---------- Panel de ganancias (solo owner) ---------- */
.earn-summary-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.earn-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; flex: 1; min-width: 160px; box-shadow: var(--shadow-xs); }
.earn-card-label { font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.earn-card-value { font-size: 26px; font-weight: 700; font-family: var(--font-display); color: var(--text); }
.earn-card-value.demo { color: var(--muted-2); }
.earn-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.earn-bar-label { width: 160px; font-size: 12.5px; color: var(--muted); flex-shrink: 0; }
.earn-bar-track { flex: 1; background: var(--surface-2); border-radius: var(--r-sm); height: 10px; overflow: hidden; }
.earn-bar-fill { height: 100%; background: var(--accent); border-radius: var(--r-sm); }
.earn-bar-value { width: 70px; text-align: right; font-size: 12px; color: var(--muted-2); font-family: var(--font-mono); }
.earn-tx-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.earn-tx-item { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--border-soft); padding-bottom: 6px; }
.earn-tx-item .earn-tx-amount { color: var(--text); font-weight: 600; flex-shrink: 0; }
.earn-tx-item.demo .earn-tx-amount { color: var(--muted-2); }
.earn-tx-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); background: var(--surface-2); border-radius: 4px; padding: 1px 5px; margin-left: 6px; }

/* ---------- Nombres de usuario clickeables (abren el perfil) ---------- */
.clickable-username { cursor: pointer; }
.clickable-username:hover { text-decoration: underline; color: var(--accent); }
.conv-row .pool-name { cursor: pointer; }
.conv-row .pool-name:hover { text-decoration: underline; color: var(--accent); }

/* ---------- Modales (perfil de otro usuario y lightbox de imagenes) ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10, 8, 6, 0.82);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 24px;
}
.modal-card {
  position: relative; max-width: 480px; width: 100%; max-height: 85vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.modal-close:hover { border-color: var(--muted); }
#lightbox-modal { padding: 40px; }
#lightbox-modal .modal-close { top: 16px; right: 16px; background: var(--surface); }
#lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-sm); }

/* El perfil de otro usuario se ve en pantalla completa (no como popup chico),
   para que se sienta como una pagina de perfil de verdad, no un recuadro. */
.modal-fullscreen.modal-overlay { padding: 0; }
.modal-fullscreen .modal-card {
  max-width: none; width: 100%; height: 100vh; max-height: 100vh;
  border-radius: 0; padding: 28px 24px;
}

/* ---------- Boton visible para cambiar la foto de perfil ---------- */
.avatar-change-badge {
  position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%);
  background: var(--accent); color: var(--accent-ink); font-size: 9.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4); pointer-events: none;
}

/* ---------- Ajustar/recortar la foto de perfil antes de subirla ---------- */
.crop-card { max-width: 380px; text-align: center; }
.crop-viewport {
  width: 260px; height: 260px; margin: 0 auto 12px; border-radius: 50%;
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--border);
  cursor: grab; touch-action: none; position: relative;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport img { position: absolute; top: 0; left: 0; max-width: none; user-select: none; }
#avatar-crop-zoom { width: 100%; }

/* ---------- Historias ---------- */
.stories-bar { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 8px; }
.story-bubble { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; cursor: pointer; width: 64px; }
.story-ring { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; }
.story-ring.has-story { background: linear-gradient(45deg, var(--accent), var(--gold, #f3c96e)); padding: 2.5px; }
.story-ring.has-story.seen { background: var(--border); }
.story-ring.no-story { background: var(--border); padding: 2.5px; }
.story-ring .mini-avatar { width: 100% !important; height: 100% !important; border-radius: 50%; border: 2px solid var(--bg, #14110d); }
.story-add-btn {
  position: absolute; bottom: -2px; right: -2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--bg, #14110d);
  font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.story-bubble-label { font-size: 11px; color: var(--muted); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Crear historia: la camara ocupa toda la pantalla, sin el padding/centrado normal de modal */
.story-create-overlay { padding: 0; }
.story-camera-card {
  position: relative; width: 100%; height: 100%; background: #000; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
#story-camera-video { width: 100%; height: 100%; object-fit: cover; background: #000; }
#story-camera-video.story-cam-mirror { transform: scaleX(-1); }
.story-cam-icon-btn {
  position: absolute; top: 16px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,0.45); color: #fff; border: none; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3;
}
.story-cam-close { left: 14px; }
.story-cam-flip { right: 14px; }
#story-cam-error {
  position: absolute; left: 16px; right: 16px; bottom: 118px; text-align: center;
  color: #fff; z-index: 2; margin: 0;
}
.story-cam-bottom {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 18px 26px 28px; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}
.story-cam-gallery-btn {
  width: 44px; height: 44px; border-radius: var(--r-sm); border: 2px solid rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.story-cam-capture-btn {
  width: 70px; height: 70px; border-radius: 50%; background: #fff; border: 4px solid rgba(255,255,255,0.45);
  cursor: pointer; padding: 0; touch-action: none; user-select: none; -webkit-user-select: none;
  transition: transform 0.15s, border-radius 0.15s, background 0.15s;
}
.story-cam-capture-btn:active { transform: scale(0.92); }
.story-cam-capture-btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* Al mantener presionado se graba video (estilo Instagram): el boton se pone rojo y pulsa. */
.story-cam-capture-btn.recording {
  background: var(--danger); border-color: rgba(239,90,76,0.5); border-radius: 20px;
  animation: story-rec-pulse 1.1s ease-in-out infinite;
}
@keyframes story-rec-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.story-cam-spacer { width: 44px; height: 44px; }

.story-create-card { max-width: 420px; max-height: calc(100vh - 48px); overflow-y: auto; }
#story-media-preview { margin-top: 10px; text-align: center; }
#story-media-preview img, #story-media-preview video { max-width: 100%; max-height: 320px; border-radius: var(--r-sm); }
.story-music-item { display: flex; align-items: center; gap: 8px; }
.story-music-item span { flex: 1; }

.story-viewer-card {
  position: relative; width: 100%; max-width: 420px; height: 90vh; max-height: 780px;
  background: #000; border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column;
}
.story-progress-row { display: flex; gap: 4px; padding: 8px; position: absolute; top: 0; left: 0; right: 0; z-index: 3; }
.story-progress-seg { flex: 1; height: 3px; background: rgba(255,255,255,0.35); border-radius: 2px; overflow: hidden; }
.story-progress-fill { height: 100%; width: 0%; background: #fff; }
.story-viewer-head {
  position: absolute; top: 14px; left: 0; right: 0; z-index: 3; padding: 6px 12px;
  display: flex; align-items: center; justify-content: space-between; color: #fff;
}
.story-viewer-head .clickable-username { color: #fff; }
.story-viewer-media { flex: 1; display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }
/* A pantalla completa (recortando bordes si hace falta), como Instagram, en vez de la version
   "contain" anterior que dejaba franjas negras arriba/abajo con casi cualquier foto o video. */
.story-viewer-media img, .story-viewer-media video { width: 100%; height: 100%; object-fit: cover; }
.story-viewer-nav { position: absolute; inset: 0; display: flex; z-index: 2; }
.story-nav-zone { flex: 1; cursor: pointer; }

/* Barra de "vistas" (solo el dueño la ve) + panel deslizable con quien vio la historia,
   estilo Instagram: se desliza hacia arriba desde abajo, con la papelera para borrar. */
.story-viewers-handle {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,0.45);
  color: #fff; border: none; border-radius: 999px; padding: 7px 16px; cursor: pointer; z-index: 3;
}
.story-viewers-chevron { font-size: 11px; transform: scaleY(0.7); opacity: 0.85; }
.story-viewers-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 68%; background: var(--surface, #1b1712);
  border-radius: 18px 18px 0 0; z-index: 4; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform 0.22s ease; box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
}
.story-viewers-panel.open { transform: translateY(0); }
.story-viewers-panel-handlebar { width: 40px; height: 4px; background: var(--border); border-radius: 999px; margin: 10px auto; cursor: pointer; flex-shrink: 0; }
.story-viewers-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 10px; font-weight: 600; color: var(--text); flex-shrink: 0; }
.story-viewers-list { overflow-y: auto; padding: 4px 16px 16px; }
.story-viewer-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.story-viewer-row-name { color: var(--text); }
.story-trash-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; color: #e5533d;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.story-trash-btn:hover { background: rgba(229,83,61,0.12); }

/* ---------- Directos en vivo ---------- */
.live-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 12px; }
.live-media-el { width: 100%; border-radius: var(--r-sm); background: #000; aspect-ratio: 4/3; object-fit: cover; }

/* ---------- Hashtags ---------- */
.hashtag-link { color: var(--accent); cursor: pointer; font-weight: 500; }
.hashtag-link:hover { text-decoration: underline; }

/* ---------- Encuestas (polls) ---------- */
.poll-box { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.poll-option-btn {
  position: relative; overflow: hidden; text-align: left; border: 1px solid var(--border);
  background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--font-sans); font-size: 13px; color: var(--text);
}
.poll-option-btn:hover { border-color: var(--muted); }
.poll-option-btn.mine { border-color: var(--accent); }
.poll-option-fill {
  position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); z-index: 0;
  transition: width 0.25s ease;
}
.poll-option-label, .poll-option-pct { position: relative; z-index: 1; }
.poll-option-pct { color: var(--muted); font-size: 12px; flex-shrink: 0; }
.poll-total { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- Guardar / Compartir posts ---------- */
.save-post-btn.active { color: var(--gold); border-color: var(--gold); }

/* ---------- Modal de hashtag ---------- */
#hashtag-modal-list { max-height: 70vh; overflow-y: auto; }

/* ---------- Grupos ---------- */
.group-row { cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease; }
.group-row:hover { border-color: var(--accent); }
#group-detail-view .account-actions { margin: 10px 0; }

/* ---------- Reels (feed vertical de video) ---------- */
.reels-container {
  display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 160px);
  overflow-y: auto; scroll-snap-type: y mandatory;
}
.reel-card {
  position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 9/16;
  background: #000; border-radius: var(--r-md); overflow: hidden; scroll-snap-align: start;
  border: 1px solid var(--border);
}
.reel-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.75));
  display: flex; flex-direction: column; gap: 8px; color: #fff;
}
.reel-overlay .post-author { color: #fff; }
.reel-text { font-size: 13px; color: #fff; }
.reel-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.reel-action-btn {
  background: rgba(255,255,255,0.14); border: none; color: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 12px; cursor: pointer; font-family: var(--font-sans);
  transition: background 0.15s ease;
}
.reel-action-btn:hover { background: rgba(255,255,255,0.26); }
.reel-mute-btn { padding: 6px 10px; }

/* ---------- Reacciones en mensajes directos ---------- */
.dm-msg-row { position: relative; }
.dm-msg-col { display: flex; flex-direction: column; gap: 2px; }
.dm-msg-reactions { display: flex; gap: 4px; }
.dm-reaction-chip {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 1px 6px; font-size: 12px;
}
.dm-reaction-picker {
  position: absolute; top: -38px; left: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 6px; display: flex; gap: 4px; z-index: 5; box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.dm-msg-row.theirs .dm-reaction-picker { left: 32px; }
.dm-reaction-opt { background: none; border: none; cursor: pointer; font-size: 16px; padding: 2px 4px; }
.dm-reaction-opt:hover { transform: scale(1.2); }


/* =========================================================================
   Rediseño profesional: menu "Mas" del topbar, menu de cuenta (avatar),
   kebab de acciones de post, y acordeon de Ajustes. El objetivo es reducir
   la cantidad de botones visibles a la vez sin sacar ninguna funcion.
   ========================================================================= */

.topbar-menu-wrap { position: relative; }
.dropdown-panel {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 210px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); z-index: 30; padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.dropdown-panel .nav-btn { width: 100%; text-align: left; border-radius: var(--r-sm); padding: 9px 11px; }
.dropdown-divider { height: 1px; background: var(--border-soft); margin: 6px 4px; }
.dropdown-panel-footer {
  padding: 9px 11px 5px; font-size: 11px; color: var(--muted-2); display: flex; align-items: center;
  gap: 6px; font-family: var(--font-mono); border-top: 1px solid var(--border-soft); margin-top: 4px;
}

.avatar-menu-trigger { background: none; border: none; padding: 0; cursor: pointer; border-radius: 50%; display: flex; }
.avatar-menu-trigger .mini-avatar { width: 34px; height: 34px; }
#topbar-avatar { background: var(--surface-2); border: 1px solid var(--border); }
.avatar-menu-trigger:hover .mini-avatar { box-shadow: 0 0 0 2px var(--accent); }
.dropdown-panel-user { padding: 8px 11px 9px; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }
.dropdown-panel-user .uname { font-weight: 600; font-size: 13.5px; display: block; }
.dropdown-panel-user .uhandle { color: var(--muted-2); font-size: 11.5px; font-family: var(--font-mono); }

.post-menu-wrap { position: relative; }
.post-menu-btn {
  background: transparent; border: 1px solid var(--border); color: var(--muted); width: 30px; height: 30px;
  border-radius: var(--r-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.post-menu-btn:hover { color: var(--text); border-color: var(--muted); background: var(--surface-2); }
.post-menu-panel {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 175px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  box-shadow: var(--shadow-md); z-index: 15; padding: 5px; display: flex; flex-direction: column; gap: 1px;
}
.post-menu-panel button {
  text-align: left; background: transparent; border: none; color: var(--text); padding: 8px 10px;
  border-radius: 6px; font-size: 12.5px; cursor: pointer; font-family: var(--font-sans);
}
.post-menu-panel button:hover { background: var(--surface-2); }
.post-menu-panel button.danger { color: var(--danger); }
.post-menu-panel button.active { color: var(--accent); }

/* ---------- Acordeon de Ajustes: cada seccion se abre/cierra, no todo a la vista ---------- */
.settings-section {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  margin-bottom: 10px; box-shadow: var(--shadow-xs); overflow: hidden;
}
.settings-section summary {
  list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 15.5px; color: var(--text); gap: 10px;
}
.settings-section summary::-webkit-details-marker { display: none; }
.settings-section summary::after {
  content: ''; width: 8px; height: 8px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(-45deg); transition: transform 0.2s var(--ease); margin-left: auto; flex-shrink: 0;
}
.settings-section[open] summary::after { transform: rotate(45deg); }
.settings-section summary:hover { background: var(--surface-2); }
.settings-section[open] summary { border-bottom: 1px solid var(--border-soft); }
.settings-section-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.settings-section-hint { color: var(--muted); font-size: 12.5px; margin: -2px 0 2px; line-height: 1.55; }


/* =========================================================================
   Motion design: la web se sentia "sosa" -> se agregan animaciones sutiles
   de entrada para tarjetas/listas, apertura de paneles y modales, y micro
   interacciones (reacciones, historias) para que se sienta mas viva sin
   exagerar ni afectar el rendimiento.
   ========================================================================= */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ringPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,90,54,0.45); }
  50% { box-shadow: 0 0 0 4px rgba(255,90,54,0); }
}
@keyframes reactionPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .post-card, .pool-card, .suggested-card, .user-row, .earn-card, .group-row {
    animation: fadeSlideUp 0.35s var(--ease) both;
  }
  .feed-list .post-card:nth-child(1) { animation-delay: 0s; }
  .feed-list .post-card:nth-child(2) { animation-delay: 0.03s; }
  .feed-list .post-card:nth-child(3) { animation-delay: 0.06s; }
  .feed-list .post-card:nth-child(4) { animation-delay: 0.09s; }
  .feed-list .post-card:nth-child(n+5) { animation-delay: 0.12s; }

  .dropdown-panel, .post-menu-panel, .notif-panel {
    animation: dropdownIn 0.16s var(--ease) both;
  }
  .modal-card, #lightbox-modal img {
    animation: popIn 0.22s var(--ease) both;
  }
  .modal-overlay { animation: fadeIn 0.15s ease both; }

  .story-ring.has-story:not(.seen) { animation: ringPulse 2.4s ease-in-out infinite; }

  .reaction-btn.mine { animation: reactionPop 0.3s var(--ease); }
  .save-post-btn.active, .repost-btn.active { animation: reactionPop 0.3s var(--ease); }

  .empty-state, .ai-summary { animation: fadeIn 0.3s ease both; }
}

/* El logo y el boton principal de publicar tienen un poco mas de vida al pasar el mouse */
.logo-mark { transition: transform 0.2s var(--ease); }
.logo-mark:hover { transform: rotate(-6deg) scale(1.06); }
.post-form-row button[type="submit"]:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,90,54,0.3); }
.pool-join-btn:hover, .small-btn:hover:not(:disabled) { transform: translateY(-1px); }


/* =========================================================================
   Seccion Juegos: ruleta diaria, trivia rapida y tienda de canje.
   ========================================================================= */
.game-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 18px 16px; margin-bottom: 16px; box-shadow: var(--shadow-xs); text-align: center;
}
.games-coin-row { display: flex; justify-content: center; }
.games-coin-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--gold-soft); color: var(--gold);
  border: 1px solid var(--gold); padding: 8px 18px; border-radius: 999px; font-weight: 600;
  font-family: var(--font-mono); font-size: 15px;
}

.wheel-wrap { position: relative; width: 200px; height: 200px; margin: 6px auto 0; }
.game-wheel {
  width: 100%; height: 100%; border-radius: 50%; position: relative; overflow: hidden;
  border: 5px solid var(--surface-2); box-shadow: var(--shadow-md);
  transition: transform 3.2s cubic-bezier(.17,.67,.16,1);
}
.wheel-label {
  position: absolute; top: 50%; left: 50%; transform-origin: 0 0; color: #fff;
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.wheel-pointer {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 18px solid var(--accent); filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
}

.trivia-options { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.trivia-option-btn {
  text-align: left; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 14px; border-radius: var(--r-sm); cursor: pointer; font-size: 13.5px; font-family: var(--font-sans);
}
.trivia-option-btn:hover:not(:disabled) { border-color: var(--accent); }
.trivia-option-btn.correct { border-color: #3fae5c; background: rgba(63,174,92,0.14); color: #3fae5c; }
.trivia-option-btn.incorrect { border-color: var(--danger); background: rgba(239,90,76,0.14); color: var(--danger); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.shop-item-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.shop-item-card.owned { border-color: var(--gold); }
.shop-item-icon { font-size: 26px; }
.shop-item-label { font-size: 12.5px; color: var(--text); line-height: 1.3; }
.shop-item-owned { font-size: 11px; color: var(--gold); font-family: var(--font-mono); }

/* ---------- Wedge: En vivo (Directos + Salas) mas prominente ---------- */
.live-hub-switch { display: flex; gap: 6px; margin-bottom: 12px; }
.live-hub-switch-btn {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  border-radius: 20px; padding: 6px 14px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: background var(--ease, 0.15s), color var(--ease, 0.15s), border-color var(--ease, 0.15s);
}
.live-hub-switch-btn:hover { color: var(--fg); }
.live-hub-switch-btn.active { background: var(--accent); border-color: var(--accent); color: #2a0402; cursor: default; }

.feed-live-banner {
  display: flex; align-items: center; gap: 10px; background: rgba(255,90,54,0.1);
  border: 1px solid rgba(255,90,54,0.35); border-radius: var(--r-md); padding: 10px 14px;
  margin-bottom: 14px;
}
.feed-live-banner-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
  box-shadow: 0 0 6px var(--danger); flex-shrink: 0; animation: ringPulse 1.6s infinite;
}
.feed-live-banner-text { flex: 1; font-size: 13px; font-weight: 500; }
.feed-live-banner-btn {
  background: var(--accent); color: #2a0402; border: none; border-radius: 20px;
  padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}

/* ---------- Loop de invitacion ---------- */
.ref-invite-note {
  background: rgba(255,90,54,0.1); border: 1px solid rgba(255,90,54,0.35);
  border-radius: var(--r-sm); padding: 8px 12px; font-size: 12.5px; margin: 0 0 12px;
}
.invite-link-row { display: flex; gap: 8px; }
.invite-link-row input {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border); color: var(--fg);
  border-radius: var(--r-sm); padding: 8px 10px; font-size: 12.5px; font-family: var(--font-mono, monospace);
}
