/* ================================================================
   Oneem Social — design system
   Dark-first. Signature: the aurora gradient (coral→violet→cyan)
   lives in the landing sky, story rings and primary actions.
   ================================================================ */

:root {
  --bg: #0B0D14;
  --surface: #12151F;
  --surface2: #1A1E2C;
  --surface3: #232838;
  --border: rgba(255, 255, 255, 0.08);
  --text: #EDEEF5;
  --muted: #8A90A6;
  --accent: #8B5CF6;
  --coral: #FF5C7A;
  --cyan: #22D3EE;
  --aurora: linear-gradient(135deg, #FF5C7A 0%, #8B5CF6 50%, #22D3EE 100%);
  --aurora-soft: linear-gradient(135deg, rgba(255,92,122,.22), rgba(139,92,246,.22), rgba(34,211,238,.22));
  --danger: #F87171;
  --ok: #34D399;
  --glass: rgba(18, 21, 31, 0.72);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 9px;
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --spring: cubic-bezier(0.22, 1.2, 0.36, 1);
}

[data-theme="light"] {
  --bg: #F5F5FA;
  --surface: #FFFFFF;
  --surface2: #F0F0F7;
  --surface3: #E6E6F0;
  --border: rgba(15, 18, 34, 0.09);
  --text: #171A26;
  --muted: #666D85;
  --glass: rgba(255, 255, 255, 0.78);
  --shadow: 0 12px 40px rgba(23, 26, 38, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea { font-family: inherit; color: inherit; }
.hidden { display: none !important; }

::selection { background: rgba(139, 92, 246, 0.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- brand -- */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand.center { justify-content: center; margin-bottom: 18px; }
.brand-ring {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(from 210deg, #FF5C7A, #8B5CF6, #22D3EE, #FF5C7A);
  -webkit-mask: radial-gradient(circle at center, transparent 7px, #000 8px);
          mask: radial-gradient(circle at center, transparent 7px, #000 8px);
  animation: spin-slow 14s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  transition: transform 0.25s var(--spring), box-shadow 0.25s, opacity 0.2s;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px) scale(1.02); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--aurora); color: #fff; box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4); }
.btn-primary:hover { box-shadow: 0 10px 32px rgba(139, 92, 246, 0.55); }
.btn-glass { background: var(--glass); border-color: var(--border); backdrop-filter: blur(14px); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface2); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-danger { background: rgba(248, 113, 113, 0.12); color: var(--danger); border-color: rgba(248, 113, 113, 0.3); }
.btn-link { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }
.btn-link:hover { color: var(--text); }

/* ---------------------------------------------------------------- glass -- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.glass-edge {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-right: 1px solid var(--border);
}
.card { padding: 18px; margin-bottom: 18px; }
.card h4 { font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 12px; }

/* =================================================== LANDING + AURORA == */
.landing { position: relative; min-height: 100vh; overflow-x: clip; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora.dim { opacity: 0.5; }
.aurora-blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
  will-change: transform;
  animation: drift 26s ease-in-out infinite alternate;
}
.b1 { width: 55vw; height: 55vw; background: #FF5C7A; top: -18vw; left: -12vw; animation-duration: 30s; }
.b2 { width: 48vw; height: 48vw; background: #8B5CF6; top: 8vw; right: -14vw; animation-duration: 24s; animation-delay: -8s; }
.b3 { width: 42vw; height: 42vw; background: #22D3EE; bottom: -16vw; left: 22vw; animation-duration: 34s; animation-delay: -15s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 4vw, 0) scale(1.15); }
}
.grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="light"] .aurora-blob { opacity: 0.3; }

.landing-nav {
  position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(20px, 6vw, 72px);
}
.hero { position: relative; z-index: 1; text-align: center; padding: clamp(48px, 10vh, 120px) 24px 40px; }
.hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: 1.04; letter-spacing: -0.03em;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; transform: translateY(110%); animation: rise 0.9s var(--spring) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.12s; }
@keyframes rise { to { transform: translateY(0); } }
.grad { background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub {
  color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.25rem); max-width: 520px;
  margin: 22px auto 0; opacity: 0; animation: fade-up 0.8s ease 0.35s forwards;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; opacity: 0; animation: fade-up 0.8s ease 0.5s forwards; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero-phone { display: flex; gap: 22px; justify-content: center; margin-top: clamp(40px, 8vh, 90px); perspective: 900px; }
.phone-card {
  width: 150px; height: 240px; border-radius: 24px; background: var(--glass);
  border: 1px solid var(--border); backdrop-filter: blur(14px);
  box-shadow: var(--shadow); padding: 16px;
  animation: float 7s ease-in-out infinite;
}
.pc1 { transform: rotate(-8deg); animation-delay: -2s; }
.pc2 { transform: translateY(-24px); width: 170px; height: 270px; animation-delay: -4s; }
.pc3 { transform: rotate(8deg); animation-delay: -6s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.pc-ring { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(from 210deg, #FF5C7A, #8B5CF6, #22D3EE, #FF5C7A); -webkit-mask: radial-gradient(circle, transparent 15px, #000 16px); mask: radial-gradient(circle, transparent 15px, #000 16px); }
.pc-ring.r2 { width: 36px; height: 36px; }
.pc-media { height: 130px; border-radius: 14px; background: var(--aurora-soft); margin-bottom: 12px; }
.pc-lines i { display: block; height: 9px; border-radius: 5px; background: var(--surface3); margin-top: 10px; }
.pc-lines i:nth-child(2) { width: 70%; }
.pc-lines i:nth-child(3) { width: 45%; }

.features {
  position: relative; z-index: 1; display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  padding: clamp(40px, 8vh, 90px) clamp(20px, 6vw, 72px);
  max-width: 1200px; margin: 0 auto;
}
.feature {
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 26px; backdrop-filter: blur(14px);
}
.f-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px;
  background: var(--aurora-soft); font-size: 1.2rem; margin-bottom: 16px;
}
.feature h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s var(--spring); }
.reveal.in { opacity: 1; transform: none; }
.landing-foot { position: relative; z-index: 1; text-align: center; color: var(--muted); font-size: 0.85rem; padding: 30px; }

/* ===================================================== AUTH ============ */
.auth-wrap { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 30px; animation: pop-in 0.5s var(--spring); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.92) translateY(16px); } to { opacity: 1; transform: none; } }
.auth-tabs { display: flex; background: var(--surface2); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 9px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; color: var(--muted); transition: all 0.25s; }
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 14px; font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18); }
.auth-error { color: var(--danger); font-size: 0.88rem; margin-bottom: 12px; animation: shake 0.4s; }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ===================================================== APP LAYOUT ====== */
/* Full-screen shell. The rightbar (trending / who-to-follow) lives ONLY on
   home; every other page drops it and spreads into the reclaimed width. */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr) 330px; max-width: none; gap: 24px; min-height: 100vh; }
.app:not([data-view="home"]) { grid-template-columns: 260px minmax(0, 1fr); }
.app:not([data-view="home"]) .rightbar { display: none; }
.main { padding: 24px clamp(12px, 2vw, 40px) 90px; }
.main > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.main[data-view="explore"] > *, .main[data-view="tag"] > *,
.main[data-view="profile"] > *, .main[data-view="u"] > *,
.main[data-view="notifications"] > * { max-width: 1180px; }
.main[data-view="settings"] > * { max-width: 1000px; }
.main[data-view="saved"] > *, .main[data-view="post"] > * { max-width: 900px; }
.main[data-view="messages"] > * { max-width: none; }
.main[data-view="reels"] > * { max-width: 620px; }
.main[data-view="groups"] > *, .main[data-view="pages"] > * { max-width: 1280px; }
.main[data-view="g"] > *, .main[data-view="p"] > * { max-width: 1140px; }
.announcement {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: 50;
  background: var(--aurora); color: #fff; text-align: center; font-weight: 600;
  padding: 9px 16px; font-size: 0.9rem;
}
.verify-banner {
  grid-column: 1 / -1; z-index: 49;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  background: rgba(139, 92, 246, 0.12); border-bottom: 1px solid var(--border);
  padding: 10px 16px; font-size: 0.9rem; font-weight: 600;
}
.verify-banner form { display: flex; gap: 8px; align-items: center; }
.verify-banner input {
  width: 110px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 14px; font-size: 0.95rem; letter-spacing: 3px; text-align: center;
}
.verify-banner input:focus { outline: none; border-color: var(--accent); }
.sidenav {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.sidenav .brand { padding: 0 10px 20px; }
.nav-item {
  display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: var(--r-md);
  font-weight: 600; font-size: 0.98rem; color: var(--muted); position: relative;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--spring); width: 100%; text-align: left;
}
.nav-item:hover { background: var(--surface2); color: var(--text); transform: translateX(3px); }
.nav-item.active { color: var(--text); background: var(--surface2); }
.nav-item.active .ni { background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ni { font-size: 1.25rem; width: 26px; text-align: center; }
.badge {
  position: absolute; right: 12px; min-width: 20px; height: 20px; border-radius: 999px;
  background: var(--coral); color: #fff; font-size: 0.72rem; font-weight: 800;
  display: grid; place-items: center; padding: 0 6px;
  animation: pop-in 0.3s var(--spring);
}
.badge.mini { position: absolute; top: 4px; right: 6px; min-width: 16px; height: 16px; font-size: 0.62rem; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.me-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface2); margin-top: 8px; }
.me-chip .avatar { width: 34px; height: 34px; }
.me-chip .mc-name { font-weight: 700; font-size: 0.88rem; line-height: 1.2; }
.me-chip .mc-user { color: var(--muted); font-size: 0.78rem; }

.main { padding: 24px 0 90px; min-height: 100vh; }
.rightbar { padding: 24px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.bottomnav { display: none; }

/* ---------------------------------------------------------------- avatar -- */
.avatar {
  width: 42px; height: 42px; min-width: 42px; min-height: 42px; box-sizing: border-box;
  border-radius: 50%; background: var(--surface3);
  display: grid; place-items: center; font-weight: 800; font-family: var(--font-display);
  overflow: hidden; flex: 0 0 auto; color: var(--muted); font-size: 0.9rem;
  text-transform: uppercase;
}
/* Any avatar given an explicit size elsewhere clamps min == max so a flex/grid
   parent can never stretch it larger than intended. */
.me-chip .avatar, .sv-head .avatar, .post-embed .avatar, .comment .avatar,
.atable .avatar, .cell-user .avatar, .report-card .avatar, .story-ring .avatar { min-width: 0; min-height: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.verified { color: var(--cyan); font-size: 0.85em; }

/* premium verified seal — HARD-LOCKED to 18×18 px everywhere, no exceptions.
   Inline styles + these !important clamps guarantee identical size in every
   section regardless of surrounding font-size or stale styles. */
.vbadge, svg.vbadge, img.vbadge {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important; max-width: 18px !important;
  min-height: 18px !important; max-height: 18px !important;
  display: inline-block !important;
  vertical-align: -3px !important;
  flex: 0 0 18px;
  filter: drop-shadow(0 1px 4px rgba(139, 92, 246, 0.5));
}
.vbadge-img { border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--surface2); }
.profile-name .vbadge { animation: badge-pop 0.6s var(--spring); }
@keyframes badge-pop { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }

/* ---------------------------------------------------------------- stories -- */
.stories-rail { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: none; }
.stories-rail::-webkit-scrollbar { display: none; }
.story-bubble { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 68px; transition: transform 0.25s var(--spring); }
.story-bubble:hover { transform: translateY(-3px); }
.story-ring {
  width: 62px; height: 62px; border-radius: 50%; padding: 3px;
  background: conic-gradient(from 210deg, #FF5C7A, #8B5CF6, #22D3EE, #FF5C7A);
}
.story-ring.viewed { background: var(--surface3); }
.story-ring.add { background: var(--surface3); position: relative; }
.story-ring.add::after {
  content: '+'; position: absolute; bottom: -2px; right: -2px; width: 22px; height: 22px;
  background: var(--aurora); border-radius: 50%; color: #fff; display: grid; place-items: center;
  font-weight: 800; border: 2px solid var(--bg);
}
.story-ring .avatar { width: 100%; height: 100%; border: 3px solid var(--bg); }
.story-bubble span { font-size: 0.72rem; color: var(--muted); max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* story viewer */
.story-viewer {
  position: fixed; inset: 0; z-index: 200; background: rgba(5, 6, 10, 0.96);
  display: grid; place-items: center; animation: fade-in 0.25s;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sv-frame { position: relative; width: min(430px, 96vw); height: min(85vh, 780px); border-radius: 22px; overflow: hidden; background: #000; }
.sv-frame img, .sv-frame video { width: 100%; height: 100%; object-fit: contain; }
.sv-bars { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 5px; z-index: 2; }
.sv-bar { flex: 1; height: 3px; background: rgba(255,255,255,0.3); border-radius: 3px; overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-bar.done i { width: 100%; }
.sv-bar.active i { animation: sv-progress linear forwards; }
@keyframes sv-progress { from { width: 0; } to { width: 100%; } }
.sv-head { position: absolute; top: 26px; left: 14px; right: 14px; display: flex; align-items: center; gap: 10px; z-index: 2; color: #fff; }
.sv-head .avatar { width: 36px; height: 36px; }
.sv-head b { font-size: 0.9rem; }
.sv-head time { font-size: 0.78rem; opacity: 0.7; }
.sv-close { margin-left: auto; font-size: 1.6rem; color: #fff; opacity: 0.8; }
.sv-nav { position: absolute; inset: 0; display: flex; z-index: 1; }
.sv-nav div { flex: 1; }
.sv-text { position: absolute; bottom: 26px; left: 16px; right: 16px; color: #fff; font-weight: 600; text-shadow: 0 2px 12px rgba(0,0,0,0.7); z-index: 2; }

/* ---------------------------------------------------------------- composer -- */
.composer { padding: 18px; margin-bottom: 20px; }
.composer-row { display: flex; gap: 12px; }
.composer textarea {
  flex: 1; background: transparent; border: none; resize: none; font-size: 1.05rem;
  min-height: 46px; padding-top: 9px; outline: none;
}
.composer-media-preview { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 0 54px; }
.cmp-item { position: relative; width: 90px; height: 90px; border-radius: 12px; overflow: hidden; animation: pop-in 0.3s var(--spring); }
.cmp-item img, .cmp-item video { width: 100%; height: 100%; object-fit: cover; }
.cmp-item button { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.65); color: #fff; width: 22px; height: 22px; border-radius: 50%; font-size: 0.8rem; }
.composer-actions { display: flex; align-items: center; gap: 6px; margin: 12px 0 0 54px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.15rem; color: var(--muted); transition: all 0.2s var(--spring);
}
.icon-btn:hover { background: var(--surface2); color: var(--accent); transform: scale(1.1); }
.composer-actions .btn-primary { margin-left: auto; }
.icon-btn.active-toggle { background: rgba(248,113,113,0.18); color: var(--danger); }

/* sensitive content blur */
.sensitive-wrap { position: relative; border-radius: var(--r-md); overflow: hidden; margin-bottom: 12px; }
.sensitive-media { filter: blur(28px); transform: scale(1.05); pointer-events: none; }
.sensitive-cover {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; background: rgba(11,13,20,0.35); color: #fff; font-size: 1.6rem; backdrop-filter: blur(2px);
}
.sensitive-cover b { font-size: 0.95rem; }
.sensitive-cover span { font-size: 0.82rem; opacity: 0.85; font-weight: 600; }
.sensitive-wrap.revealed .sensitive-media { filter: none; transform: none; pointer-events: auto; }
.sensitive-wrap.revealed .sensitive-cover { display: none; }
.privacy-select { width: auto; padding: 8px 10px; font-size: 0.85rem; margin-left: auto; }
.privacy-btn {
  font-size: inherit; color: var(--muted); padding: 1px 6px; border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.privacy-btn:hover { background: var(--surface2); color: var(--text); }
.composer-actions .privacy-select + .btn-primary { margin-left: 8px; }

/* ---------------------------------------------------------------- feed -- */
.feed-tabs { display: flex; background: var(--surface2); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.feed-tab { flex: 1; text-align: center; padding: 9px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; color: var(--muted); transition: all 0.25s; }
.feed-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,0.18); }

.post { padding: 18px; margin-bottom: 16px; animation: fade-up 0.45s var(--spring) both; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-head .who { line-height: 1.25; min-width: 0; }
.post-head .who b { font-size: 0.95rem; cursor: pointer; }
.post-head .who b:hover { text-decoration: underline; }
.post-head .who .sub { color: var(--muted); font-size: 0.8rem; }
.post-menu { margin-left: auto; color: var(--muted); font-size: 1.3rem; padding: 4px 10px; border-radius: 8px; }
.post-menu:hover { background: var(--surface2); }
.post-text { font-size: 1rem; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; margin-bottom: 12px; }
.post-text .tag, .post-text .mention { color: var(--accent); font-weight: 600; cursor: pointer; }
.post-text .tag:hover, .post-text .mention:hover { text-decoration: underline; }
.post-media { display: grid; gap: 4px; border-radius: var(--r-md); overflow: hidden; margin-bottom: 12px; }
.post-media.m1 { grid-template-columns: 1fr; }
.post-media.m2 { grid-template-columns: 1fr 1fr; }
.post-media.m3 { grid-template-columns: 1fr 1fr; }
.post-media.m3 > :first-child { grid-column: span 2; }
.post-media.m4 { grid-template-columns: 1fr 1fr; }
.post-media img { width: 100%; max-height: 480px; object-fit: cover; cursor: zoom-in; transition: filter 0.3s; }
.post-media img:hover { filter: brightness(1.06); }
.post-media video { width: 100%; max-height: 520px; background: #000; }
.post-embed { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin-bottom: 12px; }
.post-embed .post-head { margin-bottom: 8px; }
.post-embed .avatar { width: 30px; height: 30px; font-size: 0.7rem; }

.post-stats { display: flex; gap: 14px; color: var(--muted); font-size: 0.82rem; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.post-stats .emojis { letter-spacing: -3px; }
.post-actions { display: flex; margin-top: 6px; position: relative; }
.pa-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px; border-radius: var(--r-sm); font-weight: 600; font-size: 0.9rem; color: var(--muted);
  transition: all 0.2s var(--spring);
}
.pa-btn:hover { background: var(--surface2); transform: scale(1.03); }
.pa-btn.reacted { color: var(--accent); }
.pa-btn.saved { color: var(--cyan); }

/* reaction picker */
.react-wrap { position: relative; flex: 1; display: flex; }
.react-picker {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) scale(0.7);
  background: var(--glass); backdrop-filter: blur(18px); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 10px; display: flex; gap: 4px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all 0.25s var(--spring); z-index: 5;
}
.react-wrap:hover .react-picker, .react-picker.open { opacity: 1; transform: translateX(-50%) scale(1); pointer-events: auto; }
.react-picker button { font-size: 1.5rem; padding: 3px; border-radius: 50%; transition: transform 0.2s var(--spring); }
.react-picker button:hover { transform: scale(1.4) translateY(-4px); }

/* comments */
.comments { margin-top: 14px; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; animation: fade-up 0.3s ease both; }
.comment .avatar { width: 32px; height: 32px; font-size: 0.72rem; }
.comment-bubble { background: var(--surface2); border-radius: 4px 16px 16px 16px; padding: 9px 13px; max-width: 100%; }
.comment-bubble b { font-size: 0.85rem; cursor: pointer; }
.comment-bubble p { font-size: 0.92rem; line-height: 1.45; word-wrap: break-word; }
.comment-meta { display: flex; gap: 12px; font-size: 0.75rem; color: var(--muted); margin: 4px 0 0 13px; }
.comment-meta button:hover { color: var(--text); }
.c-like.liked { color: var(--coral); }
.comment.reply { margin-left: 42px; }
.comment-form { display: flex; gap: 10px; margin-top: 12px; }
.comment-form input { flex: 1; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px; font-size: 0.92rem; }
.comment-form input:focus { outline: none; border-color: var(--accent); }

/* skeletons */
.skeleton { padding: 18px; margin-bottom: 16px; }
.sk-row { display: flex; gap: 12px; align-items: center; }
.sk { background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-avatar { width: 42px; height: 42px; border-radius: 50%; }
.sk-line { height: 12px; margin-top: 8px; }

/* ---------------------------------------------------------------- reels -- */
.reels-view { height: calc(100vh - 48px); overflow-y: auto; scroll-snap-type: y mandatory; border-radius: var(--r-lg); scrollbar-width: none; }
.reels-view::-webkit-scrollbar { display: none; }
.reel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; background: #000; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 14px; }
.reel video { width: 100%; height: 100%; object-fit: contain; }
.reel-overlay { position: absolute; inset: auto 0 0 0; padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,0.75)); color: #fff; display: flex; align-items: flex-end; justify-content: space-between; }
.reel-info { max-width: 75%; }
.reel-info .post-head { margin-bottom: 8px; }
.reel-info .who b { color: #fff; }
.reel-info .who .sub { color: rgba(255,255,255,0.7); }
.reel-info p { font-size: 0.92rem; }
.reel-actions { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.reel-actions button { color: #fff; font-size: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform 0.2s var(--spring); }
.reel-actions button:hover { transform: scale(1.2); }
.reel-actions button small { font-size: 0.7rem; font-weight: 700; }
.reel-actions .reacted { color: var(--coral); }
.reel-mute { position: absolute; top: 16px; right: 16px; color: #fff; font-size: 1.3rem; z-index: 2; background: rgba(0,0,0,0.4); width: 40px; height: 40px; border-radius: 50%; }

/* ---------------------------------------------------------------- explore -- */
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.search-bar input { flex: 1; background: var(--glass); backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: 999px; padding: 13px 20px; font-size: 1rem; }
.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.18); }
.trend-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; margin: 0 8px 10px 0; font-weight: 600; font-size: 0.9rem; transition: all 0.2s var(--spring); }
.trend-chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.trend-chip small { color: var(--muted); }
.section-label { font-family: var(--font-display); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 22px 0 12px; }

.user-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-md); transition: background 0.2s; }
.user-row:hover { background: var(--surface2); }
.user-row .who { flex: 1; min-width: 0; line-height: 1.3; }
.user-row .who b { font-size: 0.92rem; cursor: pointer; }
.user-row .who .sub { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- profile -- */
/* USER profile keeps a cover; the avatar overlaps its lower half. */
.profile-cover { height: 200px; border-radius: var(--r-lg); background: var(--aurora-soft); background-size: cover; background-position: center; position: relative; }
.profile-head { padding: 0 22px; margin-top: -46px; position: relative; }
.profile-head .avatar {
  width: 96px; height: 96px; min-width: 96px; min-height: 96px;
  border: 4px solid var(--bg); font-size: 1.8rem; box-shadow: 0 6px 20px rgba(0,0,0,0.28);
}
.profile-top { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; min-height: 48px; }
.profile-top .grow { flex: 1; min-width: 40px; }
.profile-top .btn, .profile-top .btn-sm { margin-bottom: 6px; }
.profile-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* GROUPS & PAGES: no cover — a clean avatar-led header card. */
.community-head { display: flex; align-items: center; gap: 16px; padding: 8px 4px 18px; flex-wrap: wrap; }
.community-emblem {
  width: 72px; height: 72px; min-width: 72px; min-height: 72px; border-radius: 50%;
  background: var(--aurora); color: #fff; display: grid; place-items: center; font-size: 1.5rem;
  overflow: hidden; box-shadow: 0 4px 16px rgba(139,92,246,0.35); flex: 0 0 auto; font-weight: 800;
}
.community-emblem img { width: 100%; height: 100%; object-fit: cover; }
.community-head .ch-info { flex: 1; min-width: 180px; }
.community-head .ch-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.profile-user { color: var(--muted); font-size: 0.92rem; }
.profile-bio { margin: 12px 0; line-height: 1.5; }
.profile-stats { display: flex; gap: 22px; margin: 12px 0 20px; }
.profile-stats button b { font-family: var(--font-display); font-size: 1.05rem; }
.profile-stats button span { color: var(--muted); font-size: 0.85rem; margin-left: 5px; }
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.profile-tab { padding: 12px 20px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; transition: all 0.2s; }
.profile-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.online-dot { width: 10px; height: 10px; background: var(--ok); border-radius: 50%; display: inline-block; margin-left: 6px; box-shadow: 0 0 8px var(--ok); }

/* ---------------------------------------------------------------- messages -- */
.messages-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; height: calc(100vh - 60px); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }
.convo-list { border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface); }
.convo-list h3 { font-family: var(--font-display); padding: 18px; font-size: 1.1rem; }
.convo { display: flex; gap: 12px; padding: 13px 18px; cursor: pointer; transition: background 0.2s; position: relative; }
.convo:hover, .convo.active { background: var(--surface2); }
.convo .who { flex: 1; min-width: 0; line-height: 1.35; }
.convo .who b { font-size: 0.92rem; }
.convo .who .sub { color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo .unread-dot { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; align-self: center; }
.chat { display: flex; flex-direction: column; background: var(--surface); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 70%; padding: 10px 15px; border-radius: 18px; font-size: 0.94rem; line-height: 1.4; word-wrap: break-word; animation: pop-in 0.25s var(--spring); }
.msg.mine { align-self: flex-end; background: var(--aurora); color: #fff; border-bottom-right-radius: 5px; }
.msg.theirs { align-self: flex-start; background: var(--surface2); border-bottom-left-radius: 5px; }
.msg time { display: block; font-size: 0.68rem; opacity: 0.65; margin-top: 3px; }
.typing { align-self: flex-start; color: var(--muted); font-size: 0.85rem; padding: 4px 8px; }
.typing i { display: inline-block; width: 6px; height: 6px; background: var(--muted); border-radius: 50%; margin-right: 3px; animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-5px); } }
.chat-input { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; background: var(--surface2); border: 1px solid var(--border); border-radius: 999px; padding: 11px 18px; font-size: 0.95rem; }
.chat-input input:focus { outline: none; border-color: var(--accent); }
.chat-empty { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- notifs -- */
.notif { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-md); margin-bottom: 6px; transition: background 0.2s; align-items: center; }
.notif:hover { background: var(--surface2); }
.notif.unread { background: rgba(139, 92, 246, 0.08); }
.notif .nt { flex: 1; font-size: 0.92rem; line-height: 1.4; }
.notif .nt b { cursor: pointer; }
.notif time { color: var(--muted); font-size: 0.78rem; }
.notif-ico { font-size: 1.1rem; }

/* ----------------------------------------------------------------- polls -- */
.poll { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.poll-opt {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 14px;
  font-weight: 600; font-size: 0.92rem; overflow: hidden; text-align: left;
  transition: border-color 0.2s, transform 0.15s var(--spring);
}
.poll-opt:hover { border-color: var(--accent); transform: scale(1.01); }
.poll-opt i { position: absolute; inset: 0; width: 0; background: var(--aurora-soft); transition: width 0.6s var(--spring); }
.poll-opt span, .poll-opt b { position: relative; z-index: 1; }
.poll-opt b { color: var(--muted); font-size: 0.85rem; margin-left: 10px; }
.poll-opt.mine { border-color: var(--accent); }
.poll-opt.mine b { color: var(--accent); }
.poll-meta { color: var(--muted); font-size: 0.8rem; }
.poll-builder { margin: 12px 0 0 54px; }
.pb-opts { display: flex; flex-direction: column; gap: 8px; }
.pb-opt { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 14px; font-size: 0.92rem; }
.pb-opt:focus { outline: none; border-color: var(--accent); }

/* ---------------------------------------------------------- communities -- */
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.list-head .page-title { margin-bottom: 0; }
.community-card {
  display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 12px;
  cursor: pointer; transition: transform 0.25s var(--spring), border-color 0.2s;
}
.community-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.cc-cover {
  width: 72px; height: 72px; border-radius: var(--r-md); background: var(--aurora-soft);
  background-size: cover; background-position: center; display: grid; place-items: center;
  font-size: 1.6rem; flex: 0 0 auto;
}
.cc-avatar { width: 60px; height: 60px; font-size: 1.3rem; }
.cc-body { flex: 1; min-width: 0; line-height: 1.4; }
.cc-body .sub { color: var(--muted); font-size: 0.85rem; }
.cc-body p { color: var(--muted); font-size: 0.88rem; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--aurora-soft);
  border-radius: 999px; padding: 4px 12px; font-size: 0.78rem; font-weight: 700; margin-bottom: 12px;
}
.ctx-link { color: var(--accent); font-weight: 600; cursor: pointer; }
.ctx-link:hover { text-decoration: underline; }
.select-input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 14px; color: var(--text); font-size: 0.95rem;
}
.select-input:focus { outline: none; border-color: var(--accent); }

/* ---------------------------------------------------------------- modal -- */
.modal-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(5, 6, 10, 0.7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade-in 0.2s; }
.modal { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 24px; animation: pop-in 0.35s var(--spring); }
.modal h3 { font-family: var(--font-display); margin-bottom: 16px; }
.modal-close { position: sticky; top: 0; float: right; font-size: 1.5rem; color: var(--muted); z-index: 2; }
.modal-close:hover { color: var(--text); }

.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(5,6,10,0.95); display: grid; place-items: center; cursor: zoom-out; animation: fade-in 0.2s; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 10px; animation: pop-in 0.3s var(--spring); }

/* ----------------------------------------------------------------- legal -- */
.legal-page { min-height: 100vh; background: var(--bg); }
.legal-head {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.legal-tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.legal-tabs a { padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 0.9rem; color: var(--muted); }
.legal-tabs a.active { background: var(--surface2); color: var(--text); }
.legal-tabs a:hover { color: var(--text); }
.legal-body { max-width: 780px; margin: 0 auto; padding: clamp(24px, 5vh, 56px) 20px 80px; line-height: 1.7; }
.legal-body h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.02em; margin-bottom: 14px; }
.legal-body h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 30px 0 10px; }
.legal-body p { margin-bottom: 12px; color: var(--text); }
.legal-body ul, .legal-body ol { margin: 0 0 14px 22px; }
.legal-body li { margin-bottom: 7px; }
.legal-body b { color: var(--text); }
.consent-check {
  display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 14px;
  color: var(--muted); font-size: 0.82rem; line-height: 1.5; cursor: pointer;
}
.consent-check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: 0 0 auto; }
.consent-check a { color: var(--accent); }

/* -------------------------------------------------------- chat time rules -- */
.day-divider { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; }
.day-divider::before, .day-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.day-divider span { color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.msg { position: relative; }
.msg-del {
  position: absolute; top: -8px; left: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface3); color: var(--muted); font-size: 0.7rem;
  opacity: 0; transition: opacity 0.2s;
}
.msg.mine:hover .msg-del { opacity: 1; }
.msg-del:hover { background: var(--danger); color: #fff; }
.msg-deleted { opacity: 0.6; font-size: 0.85rem; }

/* ----------------------------------------------------------------- calls -- */
.call-overlay {
  position: fixed; inset: 0; z-index: 500; background: #05060a;
  display: flex; flex-direction: column; animation: fade-in 0.25s;
}
.call-grid {
  flex: 1; display: grid; gap: 10px; padding: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-content: center;
}
.call-tile {
  position: relative; background: var(--surface2); border-radius: 18px; overflow: hidden;
  aspect-ratio: 4/3; display: grid; place-items: center; border: 1px solid var(--border);
}
.call-tile video { width: 100%; height: 100%; object-fit: cover; }
.call-tile video.mirror { transform: scaleX(-1); }
.ct-name {
  position: absolute; bottom: 10px; left: 12px; color: #fff; font-weight: 700; font-size: 0.85rem;
  background: rgba(0,0,0,0.5); padding: 3px 10px; border-radius: 999px; z-index: 2;
}
.call-status { text-align: center; color: var(--muted); font-weight: 600; padding: 6px; }
.call-controls { display: flex; justify-content: center; gap: 16px; padding: 18px 0 max(24px, env(safe-area-inset-bottom)); }
.call-btn {
  width: 58px; height: 58px; border-radius: 50%; background: var(--surface2); font-size: 1.4rem;
  display: grid; place-items: center; transition: transform 0.2s var(--spring), background 0.2s;
}
.call-btn:hover { transform: scale(1.1); }
.call-btn.off { background: rgba(248, 113, 113, 0.25); }
.call-btn.cc-end { background: var(--danger); }

.ring-overlay { position: fixed; inset: 0; z-index: 600; background: rgba(5,6,10,0.8); backdrop-filter: blur(8px); display: grid; place-items: center; animation: fade-in 0.2s; }
.ring-card { padding: 34px 44px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ring-card .avatar { width: 84px; height: 84px; font-size: 1.6rem; }
.ring-pulse { position: relative; }
.ring-pulse::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 3px solid var(--accent); animation: ring-wave 1.2s ease-out infinite;
}
@keyframes ring-wave { from { transform: scale(0.9); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.ring-card p { color: var(--muted); }
.ring-actions { display: flex; gap: 14px; margin-top: 10px; }
.live-call-banner { width: 100%; margin-top: 16px; animation: pulse-soft 2s infinite; }
@keyframes pulse-soft { 0%, 100% { box-shadow: 0 6px 24px rgba(139,92,246,.4); } 50% { box-shadow: 0 6px 34px rgba(255,92,122,.55); } }

/* story footer (reactions + reply) */
.sv-footer {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
}
.sv-own { color: #fff; font-weight: 700; text-align: center; width: 100%; font-size: 0.9rem; }
.sv-reacts { display: flex; justify-content: center; gap: 10px; margin-bottom: 10px; }
.sv-re { font-size: 1.5rem; transition: transform 0.2s var(--spring); }
.sv-re:hover, .sv-re.sent { transform: scale(1.35) translateY(-4px); }
.sv-reply { display: flex; gap: 8px; }
.sv-reply input {
  flex: 1; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px; padding: 10px 16px; color: #fff; font-size: 0.92rem;
}
.sv-reply input::placeholder { color: rgba(255,255,255,0.6); }
.sv-reply input:focus { outline: none; border-color: var(--accent); }

/* group chat bubbles */
.msg-sender { font-size: 0.72rem; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.room-row .avatar { font-size: 1.1rem; }

/* file attachments in messages */
.file-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
  background: rgba(0,0,0,0.14); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px 12px; font-size: 0.85rem; font-weight: 600; max-width: 240px;
  transition: background 0.2s;
}
.msg.mine .file-chip { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.3); }
.file-chip:hover { background: rgba(0,0,0,0.24); }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip small { opacity: 0.7; flex: 0 0 auto; }

/* ---------------------------------------------------------------- toasts -- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 400; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--glass); backdrop-filter: blur(18px); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 13px 18px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 600;
  animation: toast-in 0.4s var(--spring); max-width: 340px;
}
.toast.out { animation: toast-out 0.3s ease forwards; }
.toast .t-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aurora); flex: 0 0 auto; }
.toast.error .t-dot { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateX(60px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(60px); } }

/* ---------------------------------------------------------------- misc -- */
.empty { text-align: center; color: var(--muted); padding: 48px 20px; }
.empty .e-ico { font-size: 2.4rem; margin-bottom: 12px; opacity: 0.5; }
.empty h4 { font-family: var(--font-display); color: var(--text); margin-bottom: 6px; }
.page-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; margin-bottom: 20px; letter-spacing: -0.02em; }
.load-more { display: block; margin: 10px auto 30px; }
.spin { width: 26px; height: 26px; border: 3px solid var(--surface3); border-top-color: var(--accent); border-radius: 50%; margin: 24px auto; animation: rot 0.8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ============================================================ responsive == */
@media (max-width: 1180px) {
  .app { grid-template-columns: 84px minmax(0, 1fr); }
  .main { padding-right: 16px; }
  .rightbar { display: none; }
  .side-label { display: none; }
  .sidenav { align-items: center; padding: 22px 8px; }
  .nav-item { justify-content: center; padding: 13px; }
  .badge { right: 6px; top: 4px; }
  .me-chip { display: none; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; gap: 0; }
  .sidenav { display: none; }
  .main { padding: 14px 12px 90px; }
  .bottomnav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    justify-content: space-around; padding: 10px 0 max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border); border-right: none;
  }
  .bottomnav a { font-size: 1.4rem; color: var(--muted); position: relative; padding: 4px 14px; border-radius: 12px; transition: all 0.2s var(--spring); }
  .bottomnav a.active { color: var(--text); transform: translateY(-2px); }
  .bottomnav .bn-reel { background: var(--aurora); color: #fff; border-radius: 14px; }
  .messages-layout { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .messages-layout.in-chat .convo-list { display: none; }
  .messages-layout:not(.in-chat) .chat { display: none; }
  .reels-view { height: calc(100vh - 140px); }
  .hero-phone .pc1, .hero-phone .pc3 { display: none; }
}

@media (max-width: 420px) {
  .main { padding: 10px 8px 88px; }
  .post, .composer { padding: 14px; }
  .page-title { font-size: 1.25rem; margin-bottom: 14px; }
  .composer-actions { flex-wrap: wrap; margin-left: 0; }
  .composer-media-preview { margin-left: 0; }
  .pa-btn { font-size: 0.8rem; gap: 5px; padding: 8px 4px; }
  .profile-cover { height: 140px; }
  .profile-head { padding: 0 10px; }
  .profile-head .avatar { width: 80px; height: 80px; }
  .hero-actions .btn-lg { padding: 12px 20px; font-size: 0.95rem; }
  .chat-input { padding: 10px; gap: 6px; }
  .msg { max-width: 85%; }
}

/* ======================================================== reduced motion == */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .aurora-blob { animation: none; }
}
