:root {
  /* Vynx design system v3 — teal → pink on a calm dark surface */
  --void: #090b0f;
  --panel: #101318;
  --card: #151920;
  --panel-raised: #1b2028;
  --cyan: #35f0c8;
  --magenta: #ff3b79;
  --bone: #f7f8fa;
  --slate: #a1a8b3;
  --line: #292f38;
  --grad: linear-gradient(135deg, #35f0c8 0%, #ff3b79 100%);
  --grad-soft: linear-gradient(100deg, rgba(53,240,200,.28), rgba(255,59,121,.22));
  --font-display: 'Roboto', 'Inter', sans-serif;
  --font-body: 'Roboto', 'Inter', system-ui, sans-serif;
  --font-mono: 'Roboto', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--slate); }
.hidden { display: none !important; }

/* ---------- App shell (mobile-first, centered on wider screens) ---------- */
.app-shell {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--void);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ---------- Shared bottom nav ---------- */
/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 0.9rem;
  padding: 13px 20px; border-radius: 12px; border: none; cursor: pointer;
}
.btn-primary { background: linear-gradient(100deg, var(--cyan), var(--magenta)); color: var(--void); }
.btn-secondary { background: var(--panel-raised); color: var(--bone); border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; color: var(--slate); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--panel);
  font-size: 0.95rem; font-family: var(--font-body); color: var(--bone);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 16px; }
.alert-error { background: rgba(255,59,121,0.1); color: #ff8fab; border: 1px solid rgba(255,59,121,0.3); }

/* ---------- Auth pages ---------- */
.auth-wrap { padding: 60px 24px 40px; }
.auth-wrap .wordmark {
  font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; text-align: center; margin-bottom: 6px;
  background: linear-gradient(100deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-wrap .tag { text-align: center; color: var(--slate); margin-bottom: 32px; font-size: 0.9rem; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 0.85rem; color: var(--slate); }
.auth-switch a { color: var(--cyan); font-weight: 600; }

/* ---------- Feed (For You) ---------- */
/* ---------- Chats list ---------- */
.avatar { border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--void); flex: 0 0 auto; }
.empty-state { text-align: center; padding: 60px 30px; color: var(--slate); font-size: 0.9rem; }

/* ---------- Conversation ---------- */
/* ---------- Profile / account page ---------- */
.acct-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 4px; }
.acct-top { padding: 10px 24px 18px; text-align: center; }
.avatar-lg { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--void); font-size: 1.5rem; }
.acct-top .name { font-weight: 700; font-size: 1.1rem; }
.acct-top .handle { font-family: var(--font-mono); color: var(--slate); font-size: 0.78rem; margin-bottom: 10px; }
.acct-top .bio { font-size: 0.82rem; color: #cfd2d8; max-width: 280px; margin: 0 auto 16px; line-height: 1.5; }
.stat-row { display: flex; justify-content: center; gap: 0; margin-bottom: 18px; }
.stat-row .stat { padding: 0 22px; border-right: 1px solid var(--line); cursor: pointer; background: none; border-top: none; border-bottom: none; border-left: none; color: inherit; }
.stat-row .stat:last-child { border-right: none; }
.stat-row .stat .num { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; display: block; }
.stat-row .stat .lbl { font-family: var(--font-mono); font-size: 0.62rem; color: var(--slate); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.acct-actions { display: flex; gap: 10px; padding: 0 24px 18px; }
.acct-actions .btn { flex: 1; }
.acct-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 24px; }
.acct-tabs .tab { flex: 1; text-align: center; padding: 12px 0; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate); background: none; border: none; }
.acct-tabs .tab.active { color: var(--bone); border-bottom: 2px solid var(--magenta); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; }
.grid3 .cell { aspect-ratio: 9/13; background-size: cover; background-position: center; position: relative; background-color: var(--panel-raised); }
.grid3 .cell .plays { position: absolute; bottom: 6px; left: 7px; font-family: var(--font-mono); font-size: 0.6rem; color: rgba(255,255,255,0.9); background: rgba(0,0,0,0.35); padding: 2px 6px; border-radius: 6px; }

/* ---------- Followers/following list ---------- */
.people-list { padding: 8px 14px; }
.people-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; }
.people-row .name { font-weight: 600; font-size: 0.88rem; }
.people-row .handle { color: var(--slate); font-size: 0.78rem; font-family: var(--font-mono); }

/* ---------- New post page ---------- */
footer.site-footer { text-align: center; padding: 24px; color: var(--slate); font-size: 0.75rem; }

/* ---------- Page header actions (bell, new-group, etc.) ---------- */
.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { background: none; border: none; color: var(--bone); font-size: 1.1rem; position: relative; padding: 4px; }
.icon-btn .badge {
  position: absolute; top: -2px; right: -2px; background: var(--magenta); color: #fff;
  font-family: var(--font-mono); font-size: 0.55rem; min-width: 15px; height: 15px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ---------- Group chat rows/avatars ---------- */
/* ---------- New group page ---------- */
.member-pick-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.member-pick-row .name { font-weight: 600; font-size: 0.88rem; }
.member-pick-row .handle { color: var(--slate); font-size: 0.76rem; font-family: var(--font-mono); }
.member-pick-row input[type="checkbox"] { margin-left: auto; width: 20px; height: 20px; accent-color: var(--cyan); }
.group-title-field { margin: 14px 18px; }

/* ---------- Notifications page ---------- */
.notif-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif-row.unread { background: rgba(53, 240, 200, 0.05); }
.notif-text { flex: 1; font-size: 0.85rem; line-height: 1.4; }
.notif-text b { font-weight: 700; }
.notif-time { font-family: var(--font-mono); font-size: 0.62rem; color: var(--slate); margin-top: 2px; }
.notif-followback { font-size: 0.72rem; padding: 7px 12px; border-radius: 8px; }

/* ---------- Avatar upload (profile photo) ---------- */
.avatar-edit-wrap { position: relative; width: 88px; margin: 0 auto 12px; }
.avatar-edit-wrap .avatar-lg { margin: 0; cursor: pointer; overflow: hidden; }
.avatar-edit-wrap .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit-badge {
  position: absolute; bottom: 0; right: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--panel-raised); border: 2px solid var(--void); display: flex; align-items: center;
  justify-content: center; font-size: 0.75rem; pointer-events: none;
}
.avatar { overflow: hidden; }
.avatar img, .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Chat composer: attach menu + voice recording ---------- */
.attach-menu {
  position: absolute; bottom: 100%; left: 12px; margin-bottom: 8px; background: var(--panel-raised);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; gap: 10px; z-index: 5;
}
.attach-menu button {
  background: none; border: none; color: var(--bone); display: flex; flex-direction: column; align-items: center;
  gap: 4px; font-size: 0.62rem; font-family: var(--font-mono); padding: 6px 10px;
}
.attach-menu .attach-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.recording-indicator { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--magenta); padding: 0 4px; }
.recording-indicator .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); animation: pulse-dot 1s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Full-screen preview shown before sending an attachment — keeps the
   recipient's name + Send button visible together at the top, per spec. */
.attach-preview-overlay {
  position: absolute; inset: 0; background: var(--void); z-index: 10; display: flex; flex-direction: column;
}
.attach-preview-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.attach-preview-header .name { flex: 1; font-weight: 600; font-size: 0.92rem; }
.attach-preview-header .send-btn {
  background: linear-gradient(100deg, var(--cyan), var(--magenta)); border: none; color: var(--void);
  font-weight: 700; font-size: 0.82rem; padding: 9px 16px; border-radius: 10px;
}
.attach-preview-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; }
.attach-preview-body img, .attach-preview-body video { max-width: 100%; max-height: 100%; border-radius: 12px; }
.attach-preview-doc { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--slate); }
.attach-preview-doc .icon { font-size: 2.5rem; }

/* Message bubble variants: image / voice / file */
.bubble-voice { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.bubble-voice audio { max-width: 170px; height: 32px; }
.bubble-file { display: flex; align-items: center; gap: 10px; }
.bubble-file .file-icon { font-size: 1.3rem; }
.bubble-file .file-name { font-size: 0.78rem; word-break: break-all; }
/* ---------- Capture / editor page (TikTok-style) ---------- */
.capture-shell { flex: 1; position: relative; background: #000; overflow: hidden; }
.capture-stage { position: absolute; inset: 0; }
.capture-stage video, .capture-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.capture-overlay-layer { position: absolute; inset: 0; }
.capture-sticker { position: absolute; transform: translate(-50%, -50%); touch-action: none; cursor: grab; user-select: none; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }
.capture-topbar { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; z-index: 4; }
.capture-topbar button { background: rgba(0,0,0,0.4); border: none; color: #fff; width: 38px; height: 38px; border-radius: 50%; font-size: 1.1rem; }
.filter-strip { position: absolute; left: 0; right: 0; bottom: 128px; display: flex; gap: 10px; padding: 0 16px; overflow-x: auto; z-index: 4; }
.filter-chip { flex: 0 0 auto; font-family: var(--font-mono); font-size: 0.65rem; color: #eee; background: rgba(0,0,0,0.4); padding: 6px 12px; border-radius: 16px; border: 1px solid transparent; }
.filter-chip.active { border-color: var(--cyan); color: var(--cyan); }
.speed-strip { position: absolute; left: 0; right: 0; bottom: 96px; display: flex; justify-content: center; gap: 8px; z-index: 4; }
.speed-chip { font-family: var(--font-mono); font-size: 0.65rem; color: #eee; background: rgba(0,0,0,0.4); padding: 5px 11px; border-radius: 14px; border: 1px solid transparent; }
.speed-chip.active { border-color: var(--magenta); color: var(--magenta); }
.capture-controls { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; align-items: center; justify-content: center; gap: 40px; z-index: 4; }
.capture-shutter {
  width: 72px; height: 72px; border-radius: 50%; border: 5px solid #fff; background: transparent; position: relative;
}
.capture-shutter::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--magenta); transition: border-radius 0.2s; }
.capture-shutter.recording::after { border-radius: 8px; background: var(--magenta); }
.capture-side-tool { background: rgba(0,0,0,0.4); border: none; color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 1.15rem; }
.emoji-palette {
  position: absolute; left: 16px; right: 16px; bottom: 128px; background: rgba(20,20,24,0.92); border-radius: 14px;
  padding: 10px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; z-index: 6; max-height: 160px; overflow-y: auto;
}
.emoji-palette button { background: none; border: none; font-size: 1.3rem; padding: 6px 0; }
.text-tool-input {
  position: absolute; z-index: 6; background: rgba(0,0,0,0.55); border: 1px dashed var(--cyan); color: #fff;
  font-size: 1.4rem; text-align: center; padding: 6px 10px; min-width: 140px; border-radius: 8px;
}
.capture-caption-sheet {
  position: absolute; inset: 0; background: var(--void); z-index: 8; display: flex; flex-direction: column;
}
.capture-caption-sheet .preview-media { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #000; }
.capture-caption-sheet .preview-media img, .capture-caption-sheet .preview-media video { max-width: 100%; max-height: 100%; }
.capture-caption-sheet .sheet-footer { padding: 14px 18px 22px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* =====================================================================
   Vynx design system additions (v2): toasts, dialogs, share sheet,
   mentions, skeletons, post page, search, offline bar, a11y helpers
   ===================================================================== */
:root { --danger: #ff5a7e; --ok: #35f0c8; --radius: 14px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn:focus-visible, .nav-item:focus-visible { outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: #9aa0aa; } /* slightly lighter for AA contrast on the dark panel */
.btn-danger { background: var(--danger); color: #1a0a10; }
.btn-ghost { background: transparent; color: var(--bone); border: 1px solid var(--line); }
.btn-sm { padding: 8px 14px; font-size: 0.8rem; border-radius: 10px; }
.btn { transition: transform .12s ease, opacity .12s ease; }
.btn:active:not(:disabled) { transform: scale(.97); }
.tok-link { color: var(--cyan); font-weight: 600; }
.tok-link:hover { text-decoration: underline; }

/* Toasts */
#toastHost { position: fixed; left: 0; right: 0; bottom: 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1200; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: var(--panel-raised); color: var(--bone); border: 1px solid var(--line); border-radius: 12px; padding: 11px 16px; font-size: 0.85rem; max-width: 420px; box-shadow: 0 8px 28px rgba(0,0,0,.45); animation: toast-in .2s ease; }
.toast-success { border-color: rgba(53,240,200,.45); }
.toast-error { border-color: rgba(255,90,126,.55); color: #ffc2d0; }
.toast-action { background: none; border: 0; color: var(--cyan); font-weight: 700; cursor: pointer; padding: 4px 6px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Modals, dialogs, bottom sheets */
body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(4,5,8,.72); z-index: 1100; display: flex; align-items: flex-end; justify-content: center; animation: fade-in .15s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(92vw, 380px); margin: auto; }
.modal-backdrop:has(.dialog) { align-items: center; }
.dialog-title { margin: 0 0 8px; font-size: 1.05rem; }
.dialog-msg { margin: 0 0 18px; color: #b5b9c2; line-height: 1.45; font-size: .9rem; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
.sheet { background: var(--panel); border-radius: 22px 22px 0 0; border: 1px solid var(--line); border-bottom: 0; width: min(100%, 460px); padding: 10px 18px 22px; max-height: 88vh; overflow-y: auto; animation: sheet-in .22s ease; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 12px; }
.sheet-title { margin: 0 0 14px; font-size: 1.05rem; text-align: center; }
.share-link-row { display: flex; gap: 8px; margin-bottom: 12px; }
.share-link-input { flex: 1; min-width: 0; padding: 11px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--void); color: var(--bone); font-family: var(--font-mono); font-size: .75rem; }
.share-native { margin-bottom: 12px; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 16px; }
.share-target { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 12px; background: var(--panel-raised); border: 1px solid var(--line); font-size: .78rem; min-height: 72px; justify-content: center; }
.share-target:hover { border-color: var(--cyan); }
.share-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #0b0c10; background: var(--cyan); }
.share-target.wa .share-ico { background: #25d366; } .share-target.tg .share-ico { background: #2aabee; }
.share-target.fb .share-ico { background: #1877f2; color: #fff; } .share-target.x .share-ico { background: #f4f5f3; }
.share-target.em .share-ico { background: #ffb347; } .share-target.sms .share-ico { background: var(--magenta); color: #fff; }

/* Mentions dropdown */
.mention-list { list-style: none; margin: 4px 0 0; padding: 4px; position: absolute; left: 0; right: 0; z-index: 50; background: var(--panel-raised); border: 1px solid var(--line); border-radius: 12px; max-height: 240px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.mention-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .85rem; }
.mention-opt.active, .mention-opt:hover { background: rgba(53,240,200,.12); }

/* Skeletons + states */
.skel { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-raised) 37%, var(--panel) 63%); background-size: 400% 100%; animation: skel 1.3s ease infinite; border-radius: 10px; }
@keyframes skel { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.state-card { text-align: center; padding: 56px 28px; color: #9aa0aa; }
.state-card h2 { color: var(--bone); font-size: 1.1rem; margin: 0 0 8px; }
.state-card .btn { margin-top: 18px; }
#offlineBar { background: var(--danger); color: #1a0a10; text-align: center; font-size: .78rem; font-weight: 700; padding: 6px 10px; position: sticky; top: 0; z-index: 1300; }

/* Standalone pages (post / profile / search / hashtag) */
.page-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--void); z-index: 20; }
.page-top .title { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-top .back { font-size: 1.5rem; line-height: 1; padding: 4px 10px 4px 0; }
.page-top .wm { font-family: var(--font-display); font-weight: 800; background: linear-gradient(100deg, var(--cyan), var(--magenta)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.post-view { padding: 14px 16px 24px; }
.post-view .author { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-view .author .name { font-weight: 700; }
.post-view .author .handle { color: #9aa0aa; font-size: .8rem; font-family: var(--font-mono); }
.post-view .body { font-size: 1.02rem; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; margin-bottom: 12px; }
.post-view .media { border-radius: var(--radius); overflow: hidden; background: var(--panel); margin-bottom: 12px; }
.post-view .media img, .post-view .media video { width: 100%; display: block; max-height: 70vh; object-fit: contain; background: #000; }
.post-meta-row { color: #9aa0aa; font-size: .78rem; margin-bottom: 12px; }
.action-row { display: flex; gap: 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0; margin-bottom: 14px; }
.action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; background: none; border: 0; color: var(--bone); font-weight: 600; font-size: .85rem; padding: 10px 4px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.action-btn:hover { background: var(--panel); }
.action-btn.on { color: var(--magenta); }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment.reply { margin-left: 38px; }
.comment .c-body { flex: 1; min-width: 0; }
.comment .c-head { font-size: .8rem; color: #9aa0aa; }
.comment .c-head b { color: var(--bone); }
.comment .c-text { font-size: .9rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; margin: 2px 0 4px; }
.link-btn { background: none; border: 0; color: #9aa0aa; font-size: .75rem; font-weight: 600; cursor: pointer; padding: 4px 6px 4px 0; }
.link-btn:hover { color: var(--cyan); }
.comment-form { display: flex; gap: 8px; align-items: flex-start; position: relative; margin-top: 8px; }
.comment-form textarea { flex: 1; min-height: 44px; max-height: 120px; resize: vertical; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel); color: var(--bone); font: inherit; font-size: .9rem; }
.comment-form textarea:focus { outline: none; border-color: var(--cyan); }
.reply-banner { font-size: .75rem; color: #9aa0aa; display: flex; justify-content: space-between; margin-top: 8px; }
.cta-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; margin: 16px 0; }
.cta-card p { margin: 0 0 12px; color: #b5b9c2; font-size: .9rem; }
.cta-card .btn { margin: 0 4px; }

.search-box { padding: 12px 16px; position: sticky; top: 0; background: var(--void); z-index: 20; }
.search-box input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel); color: var(--bone); font-size: .95rem; }
.search-box input:focus { outline: none; border-color: var(--cyan); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 16px; }
.post-row { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.post-row .pr-head { font-size: .8rem; color: #9aa0aa; margin-bottom: 4px; } .post-row .pr-head b { color: var(--bone); }
.post-row .pr-text { font-size: .9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-row .pr-thumb { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; margin-top: 8px; background: var(--panel); }
.load-more { display: block; margin: 14px auto; }
.install-banner { display: flex; align-items: center; gap: 10px; background: var(--panel-raised); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 16px; font-size: .82rem; }
.install-banner span { flex: 1; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 24px 18px; }
.profile-actions .btn { flex: 1 1 120px; }
.profile-actions .btn-icon { flex: 0 0 auto; }

@media (min-width: 900px) {
  .app-shell { max-width: 640px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Google sign-in */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #9aa0aa; font-size: .8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; gap: 10px; }
.btn-google:hover:not(:disabled) { background: #f6f7f8; }

/* =====================================================================
   Profile page v2 (banner header, overlapping avatar, tabs, FAB)
   ===================================================================== */
.pf-banner { position: relative; height: 128px; background: linear-gradient(120deg, #0f3d34 0%, #16212a 45%, #4a1230 100%); overflow: hidden; }
.pf-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.pf-topbar .sp { flex: 1; }
.pf-circle { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(8,9,12,.62); color: #fff; display: grid; place-items: center; cursor: pointer; position: relative; backdrop-filter: blur(6px); }
.pf-circle:hover { background: rgba(8,9,12,.82); }
.pf-circle .badge { position: absolute; top: -2px; right: -2px; }
.pf-head { padding: 0 16px; margin-top: -40px; position: relative; }
.pf-avatar { width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--void); background: var(--panel); overflow: hidden; display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; color: #0b0c10; position: relative; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-avatar.editable { cursor: pointer; }
.pf-name { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 1.3rem; font-weight: 800; line-height: 1.2; word-break: break-word; }
.pf-handle { color: #9aa0aa; font-size: .95rem; margin-top: 2px; }
.pf-bio { margin: 12px 0 0; font-size: .98rem; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.pf-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; color: #9aa0aa; font-size: .88rem; }
.pf-meta > span, .pf-meta > a { display: inline-flex; align-items: center; gap: 6px; }
.pf-meta a { color: var(--cyan); }
.pf-meta svg { flex: none; }
.pf-counts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: .92rem; }
.pf-counts a, .pf-counts span { color: #9aa0aa; }
.pf-counts b { color: var(--bone); font-weight: 800; margin-right: 4px; }
.pf-actions { display: flex; gap: 10px; padding: 16px; }
.pf-actions .btn { flex: 1; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.pf-actions .btn-outline { background: transparent; color: var(--bone); border: 1.5px solid var(--line); font-weight: 700; }
.pf-actions .btn-outline:hover { border-color: var(--cyan); }
.pf-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--void); z-index: 15; }
.pf-tab { flex: 1; padding: 14px 4px; background: none; border: 0; color: #9aa0aa; font-weight: 700; font-size: .92rem; cursor: pointer; position: relative; min-height: 48px; }
.pf-tab[aria-selected="true"] { color: var(--bone); }
.pf-tab[aria-selected="true"]::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 0; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), var(--magenta)); }
.pf-menu button, .pf-menu a { display: flex; width: 100%; align-items: center; gap: 12px; padding: 14px 6px; background: none; border: 0; color: var(--bone); font-size: 1rem; text-align: left; cursor: pointer; min-height: 48px; border-bottom: 1px solid var(--line); }
.pf-menu .danger { color: var(--danger); }
.verified-badge { display: inline-flex; vertical-align: middle; }

/* =====================================================================
   Vynx v3 — shared components (match the reference screens)
   ===================================================================== */
body { font-family: var(--font-body); font-size: 16px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.app-shell { padding-bottom: 0; }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Initials avatars share one brand fill instead of random colours */
.avatar:not(:has(img)), .pf-avatar:not(:has(img)), .avatar-lg:not(:has(img)) { background: var(--grad) !important; color: #0b0c10; }
.avatar { font-family: var(--font-body); }

/* ---------- Top bar ---------- */
.topbar { flex: 0 0 auto; position: sticky; top: 0; z-index: 30; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--void); border-bottom: 1px solid var(--line); }
.topbar .title { flex: 1; text-align: center; font-size: 1.25rem; font-weight: 700; color: #e6e8ec; letter-spacing: .1px; }
.topbar .side { min-width: 44px; display: flex; align-items: center; gap: 12px; }
.topbar .side.end { justify-content: flex-end; }
.topbar .link { color: #b8bec8; font-size: 1.05rem; font-weight: 500; background: none; border: 0; padding: 8px 4px; }
.top-icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: var(--bone); background: none; border: 0; cursor: pointer; }
.top-icon .badge { position: absolute; top: 0; right: -2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--grad); color: #0b0c10; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.top-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.top-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Gradient pill buttons ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: 700 1.05rem var(--font-body); color: #0b0c10; background: var(--grad); border-radius: 999px; padding: 12px 24px; min-height: 48px; transition: transform .12s ease, opacity .12s ease; }
.pill:active:not(:disabled) { transform: scale(.97); }
.pill:disabled { opacity: .45; }
.pill-sm { padding: 9px 22px; min-height: 44px; font-size: 1.05rem; }
.pill-block { width: 100%; }
.pill-outline { background: transparent; color: #dfe2e8; border: 1.5px solid #3a414c; font-weight: 500; }
.pill-danger { background: transparent; color: #ff5a5f; border: 1.5px solid #e0454b; font-weight: 600; }

/* ---------- Search field ---------- */
.searchfield { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid transparent; border-radius: 999px; padding: 0 18px; min-height: 56px; color: var(--slate); }
.searchfield:focus-within { border-color: rgba(53,240,200,.5); }
.searchfield svg { flex: none; }
.searchfield input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--bone); font: 400 1.1rem var(--font-body); padding: 14px 0; }
.searchfield input::placeholder { color: #8b929d; }
a.searchfield { cursor: text; }

/* ---------- Bottom navigation ---------- */
.bottom-nav { flex: 0 0 auto; position: sticky; bottom: 0; z-index: 40; display: flex; justify-content: space-around; align-items: stretch; padding: 8px 6px calc(10px + env(safe-area-inset-bottom)); background: #101318; border-top: 1px solid var(--line); }
.bottom-nav .nav-item { position: relative; flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #7d848f; font: 500 .8rem var(--font-body); letter-spacing: .2px; }
.bottom-nav .nav-icon { display: grid; place-items: center; width: 30px; height: 30px; }
.bottom-nav .nav-icon svg { width: 28px; height: 28px; stroke-width: 1.7; }
.bottom-nav .nav-item.active { color: #35f0c8; }
.bottom-nav .nav-item.active .nav-icon svg { stroke: url(#vynxGrad); filter: drop-shadow(0 0 7px rgba(53,240,200,.45)); }
.bottom-nav .nav-item.active .nav-label { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bottom-nav .nav-dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 12px; height: 12px; border-radius: 50%; background: #ff4f8b; box-shadow: 0 0 0 2px #101318; }
.nav-defs { position: absolute; width: 0; height: 0; }

/* ---------- Floating action button ---------- */
.fab { position: fixed; z-index: 35; right: max(18px, calc(50% - 212px)); bottom: calc(96px + env(safe-area-inset-bottom)); width: 64px; height: 64px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--grad); color: #0b0c10; box-shadow: 0 10px 28px rgba(0,0,0,.5), 0 0 24px rgba(53,240,200,.18); cursor: pointer; }
.fab:active { transform: scale(.96); }
.pf-fab { position: fixed; z-index: 35; right: max(18px, calc(50% - 212px)); bottom: calc(96px + env(safe-area-inset-bottom)); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #0b0c10; box-shadow: 0 10px 28px rgba(0,0,0,.5); }

/* ---------- Home feed cards ---------- */
.feed-list { padding: 14px 14px 120px; display: flex; flex-direction: column; gap: 16px; }
.pc { position: relative; background: var(--void); border: 1px solid var(--line); border-radius: 22px; padding: 16px 16px 6px; overflow: hidden; isolation: isolate; }
.pc::after { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 90%; z-index: -1; background: radial-gradient(60% 60% at 8% 100%, rgba(53,240,200,.10), transparent 70%), radial-gradient(60% 60% at 95% 100%, rgba(255,59,121,.10), transparent 70%); pointer-events: none; }
.pc-head { display: flex; align-items: center; gap: 12px; }
.pc-head .avatar { width: 52px; height: 52px; font-size: 1rem; }
.pc-who { flex: 1; min-width: 0; line-height: 1.25; }
.pc-name { display: inline-block; max-width: 100%; font-weight: 700; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pc-handle { display: block; color: var(--slate); font-size: 1rem; }
.pc-more { background: none; border: 0; color: #cfd3da; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.pc-repost { color: var(--slate); font-size: .85rem; margin: 0 0 8px 4px; }
.pc-text { margin: 14px 0 0; font-size: 1.12rem; line-height: 1.5; color: #f1f2f5; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.pc-text .more { color: #ff5c8d; background: none; border: 0; font: inherit; padding: 0; cursor: pointer; }
.pc-media { margin-top: 14px; border-radius: 14px; overflow: hidden; background: #141824; display: block; }
.pc-media img, .pc-media video { display: block; width: 100%; max-height: 420px; object-fit: contain; background: #141824; }
.pc-quote { margin-top: 12px; display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; font-size: .95rem; color: var(--slate); }
.pc-quote b { color: var(--bone); }
.pc-stat { display: inline-block; margin-top: 12px; font-size: 1.1rem; font-weight: 500; color: #35f0c8; }
.pc-actions { display: flex; justify-content: space-between; margin: 4px -6px 0; }
.pc-act { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; background: none; border: 0; color: #d9788f; font: 400 1.1rem var(--font-body); cursor: pointer; }
.pc-act svg { stroke: url(#vynxGrad); flex: none; }
.pc-act span { background: linear-gradient(90deg, #6fd9c0, #e06a90); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pc-act.on svg { fill: #ff3b79; stroke: #ff3b79; }
.pc-act.on span { background: none; -webkit-text-fill-color: #ff6f98; color: #ff6f98; }
.pc-act:active { transform: scale(.96); }

/* ---------- Chats / Direct Messages ---------- */
.dm-search { padding: 14px 16px 8px; }
.dm-list { padding: 4px 0 120px; }
.dm-row { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 16px; min-height: 90px; }
.dm-row .avatar { width: 64px; height: 64px; font-size: 1.1rem; }
.dm-body { flex: 1; min-width: 0; }
.dm-name { font-size: 1.25rem; font-weight: 500; color: #e6e8ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-name small { color: var(--slate); font-size: 1.15rem; font-weight: 400; margin-left: 6px; }
.dm-prev { color: #959ca7; font-size: 1.1rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-side { display: flex; align-items: center; gap: 10px; align-self: flex-start; padding-top: 6px; color: #8b929d; font-size: 1rem; white-space: nowrap; }
.dm-chev { color: #6f7680; }
.dm-row.unread .dm-name { color: #fff; font-weight: 700; }
.dm-row.unread .dm-prev { color: #cfd3da; }
.dm-row.unread .dm-time { color: #35f0c8; }
.dm-row.unread { background: linear-gradient(100deg, rgba(53,240,200,.20) 0%, rgba(53,240,200,.05) 40%, rgba(255,59,121,.20) 100%); }
.dm-row.unread::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #35f0c8; }
.dm-row:active { background: var(--grad-soft); }
.unread-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--grad); color: #0b0c10; font-size: .78rem; font-weight: 700; display: grid; place-items: center; }
.dm-row:focus-visible { outline-offset: -3px; }

/* ---------- Conversation header + group chat ---------- */
.convo-header { flex: 0 0 auto; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 10px 12px; background: var(--void); border-bottom: 1px solid var(--line); }
.convo-header .back { display: grid; place-items: center; width: 44px; height: 44px; color: #d8dbe1; }
.convo-header .avatar { width: 52px; height: 52px; }
.convo-header .who { flex: 1; min-width: 0; }
.convo-header .name { font-size: 1.3rem; font-weight: 700; color: #e6e8ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-header .status { color: var(--slate); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-body); }
.convo-header .hbtn { display: grid; place-items: center; width: 44px; height: 44px; color: #d8dbe1; background: none; border: 0; }
.messages { flex: 1; padding: 16px 14px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.msg { display: flex; gap: 12px; align-items: flex-start; max-width: 100%; }
.msg .avatar { width: 52px; height: 52px; font-size: .95rem; margin-top: 2px; }
.msg-col { min-width: 0; max-width: calc(100% - 64px); display: flex; flex-direction: column; gap: 6px; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-col { align-items: flex-end; }
.msg-name { font-size: 1.15rem; font-weight: 500; color: #dfe2e8; padding-left: 2px; }
.msg-name span { color: var(--slate); font-weight: 400; }
.bubble { position: relative; max-width: 100%; padding: 14px 18px; border-radius: 22px; font-size: 1.12rem; line-height: 1.38; background: #1b1f26; color: #e4e6ea; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.in { border-top-left-radius: 8px; }
.bubble.out { background: var(--grad); color: #0b0c10; border-top-right-radius: 8px; }
.bubble.out.dim { background: #1e3a36; color: #e4efec; }
.bubble.media { padding: 4px; background: #1b1f26; }
.bubble.media img, .bubble.media video { max-width: min(240px, 60vw); border-radius: 18px; display: block; }
.bubble .time { display: block; margin-top: 4px; font-size: .72rem; opacity: .6; text-align: right; white-space: normal; }
.reply-card { margin-top: 6px; border: 1.5px solid transparent; border-radius: 20px; background: linear-gradient(var(--void), var(--void)) padding-box, var(--grad) border-box; padding: 4px 12px 14px; }
.reply-card .rc-head { display: flex; align-items: center; gap: 8px; padding: 6px 0 8px; color: #b9bec7; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
.reply-card .rc-quote { margin-top: 10px; border-left: 3px solid #3a414c; padding-left: 12px; }
.reply-card .rc-who { color: #e6e8ec; font-size: 1.05rem; }
.reply-card .rc-body { margin-top: 6px; background: #1b1f26; border-radius: 12px; padding: 10px 12px; color: #a9afb9; font-size: 1rem; }
.msg-reply-btn { background: none; border: 0; color: #7d848f; font-size: .85rem; padding: 2px 4px; cursor: pointer; align-self: flex-start; }
.msg-reply-btn:hover { color: var(--cyan); }
.reply-banner-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--panel); border-top: 1px solid var(--line); color: var(--slate); font-size: .95rem; }
.reply-banner-bar b { color: var(--bone); }
.reply-banner-bar .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-banner-bar button { background: none; border: 0; color: var(--slate); font-size: 1.3rem; cursor: pointer; }
.typing-indicator { display: inline-flex; gap: 4px; padding: 6px 8px; }
.typing-indicator span { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: pulse-dot 1s infinite; }
.composer { flex: 0 0 auto; position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--void); border-top: 1px solid var(--line); flex-wrap: nowrap; }
.composer .field { flex: 1; min-width: 0; display: flex; align-items: center; background: var(--card); border-radius: 999px; padding: 0 8px 0 20px; min-height: 58px; }
.composer .input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--bone); font: 400 1.1rem var(--font-body); padding: 14px 0; }
.composer .input::placeholder { color: #8b929d; }
.composer .attach-btn, .composer .mic-btn { width: 44px; height: 44px; border-radius: 50%; background: none; border: 0; color: #9aa1ac; display: grid; place-items: center; flex: none; font-size: 1rem; }
.composer .mic-btn.recording { background: var(--magenta); color: #fff; }
.composer .send { width: 50px; height: 50px; border: 0; background: none; display: grid; place-items: center; flex: none; color: #c9ced6; }
.composer .send svg { stroke: none; fill: url(#vynxGrad); }
.composer .send:disabled { opacity: .5; }
.attach-menu { background: var(--card); }
.attach-menu .attach-icon { background: var(--panel-raised); }
.attach-preview-header .send-btn { background: var(--grad); }

/* ---------- Group settings ---------- */
.gs { padding: 14px 14px 120px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.gs::before, .gs::after { content: ''; position: absolute; z-index: 0; width: 120px; height: 360px; pointer-events: none; filter: blur(46px); opacity: .35; }
.gs::before { left: -70px; top: 140px; background: #35f0c8; }
.gs::after { right: -70px; top: 560px; background: #ff3b79; }
.gs-card { position: relative; z-index: 1; background: var(--void); border: 1px solid var(--line); border-radius: 22px; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.gs-card h2 { margin: 0 0 2px 4px; font-size: 1.45rem; font-weight: 500; color: #e6e8ec; }
.gs-info { display: flex; gap: 12px; align-items: center; }
.gs-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 0 8px; }
.gs-fields .lbl { color: #cfd3da; font-size: 1.1rem; padding-left: 4px; }
.gs-fields .val { display: flex; align-items: center; gap: 6px; background: #1b1f26; padding: 0 12px; min-height: 62px; border-bottom: 1px solid #2b313a; min-width: 0; }
.gs-fields .val:first-of-type { border-radius: 14px 14px 0 0; }
.gs-fields .val.last { border-radius: 0 0 14px 14px; border-bottom: 0; }
.gs-fields input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--bone); font: 400 1.1rem var(--font-body); padding: 10px 0; }
.gs-fields input:disabled { color: #a7adb7; }
.gs-fields .ed { color: #8b929d; background: none; border: 0; width: 32px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.gs-avatar { position: relative; width: 110px; height: 110px; flex: none; }
.gs-avatar .avatar { width: 110px; height: 110px; font-size: 1.6rem; border: 2px solid #3a414c; }
.gs-avatar .edit { position: absolute; right: -2px; bottom: 4px; width: 44px; height: 44px; border-radius: 50%; background: #262b33; border: 3px solid var(--void); color: var(--bone); display: grid; place-items: center; cursor: pointer; }
.gs-row2 { display: flex; gap: 12px; }
.gs-row2 > * { flex: 1; min-width: 0; }
.gs-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 16px; border-radius: 999px; background: transparent; border: 1.5px solid #3a414c; color: #dfe2e8; font: 400 1.1rem var(--font-body); cursor: pointer; text-align: center; }
.gs-btn.between { justify-content: space-between; }
.gs-btn.grad { background: var(--grad); border-color: transparent; color: #0b0c10; font-weight: 500; }
.gs-btn.danger { border-color: #e0454b; color: #ff5a5f; font-weight: 600; }
.gs-btn:disabled { opacity: .5; }
.gs-toggles { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.gs-toggle { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #dfe2e8; font-size: 1.1rem; }
.switch { position: relative; flex: none; width: 68px; height: 40px; border-radius: 999px; background: #2a3039; border: 0; cursor: pointer; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 5px; left: 5px; width: 30px; height: 30px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--grad); }
.switch[aria-checked="true"]::after { transform: translateX(28px); }
.switch:disabled { opacity: .5; }
.gs-note { color: var(--slate); font-size: .95rem; padding: 0 4px; }
.gs-list { display: flex; flex-direction: column; }
.gs-person { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.gs-person:last-child { border-bottom: 0; }
.gs-person .avatar { width: 48px; height: 48px; font-size: .9rem; }
.gs-person .nm { flex: 1; min-width: 0; font-size: 1.05rem; color: #e6e8ec; }
.gs-person .nm small { display: block; color: var(--slate); font-size: .9rem; }
.role-tag { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--grad-soft); color: #cfeee8; }
.mini-btn { background: none; border: 1px solid #3a414c; color: #dfe2e8; border-radius: 999px; padding: 7px 14px; font: 500 .9rem var(--font-body); cursor: pointer; }
.mini-btn.danger { border-color: #e0454b; color: #ff5a5f; }
.mini-btn.ok { border-color: transparent; background: var(--grad); color: #0b0c10; }

/* ---------- Create post ---------- */
.cp-body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 120px; gap: 18px; }
.cp-text { width: 100%; min-height: 120px; background: none; border: 0; outline: 0; resize: none; color: var(--bone); font: 400 1.25rem/1.45 var(--font-body); caret-color: #35f0c8; padding: 0; }
.cp-text::placeholder { color: #8b929d; }
.cp-count { align-self: flex-end; color: #6f7680; font-size: .85rem; margin-top: -12px; }
.cp-drop { align-self: center; width: min(62%, 280px); aspect-ratio: 1/1; border: 2px dashed #5c636e; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #c3c8d0; font-size: 1.3rem; cursor: pointer; position: relative; overflow: hidden; background: transparent; }
.cp-drop.has { border-style: solid; border-color: var(--line); width: 100%; aspect-ratio: auto; min-height: 220px; }
.cp-drop img, .cp-drop video { width: 100%; max-height: 420px; object-fit: contain; display: block; }
.cp-drop .rm { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(9,11,15,.72); color: #fff; font-size: 1.2rem; cursor: pointer; }
.cp-hint { text-align: center; color: #aab0ba; font-size: 1.1rem; line-height: 1.4; margin-top: -4px; }
.cp-tools { display: flex; justify-content: space-between; padding: 6px 14px; }
.cp-tool { width: 52px; height: 52px; display: grid; place-items: center; color: #8e95a0; background: none; border: 0; cursor: pointer; border-radius: 14px; }
.cp-tool.on { color: #35f0c8; }
.cp-list { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.cp-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 62px; padding: 0 18px; background: none; border: 0; border-bottom: 1px solid var(--line); color: #b9bec7; font: 400 1.2rem var(--font-body); text-align: left; cursor: pointer; }
.cp-item:last-child { border-bottom: 0; }
.cp-item select { background: transparent; color: var(--bone); border: 0; font: 400 1.05rem var(--font-body); outline: 0; max-width: 55%; }
.cp-item select option { background: #151920; }
.emoji-pop { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.emoji-pop button { background: none; border: 0; font-size: 1.5rem; padding: 6px 0; cursor: pointer; }

/* ---------- Explore ---------- */
.ex-chips { display: flex; gap: 12px; overflow-x: auto; padding: 8px 16px 12px; scrollbar-width: none; }
.ex-chips::-webkit-scrollbar { display: none; }
.ex-chip { flex: none; min-height: 58px; padding: 0 28px; border-radius: 999px; background: transparent; border: 1.5px solid #3a414c; color: #d5d9df; font: 500 1.25rem var(--font-body); cursor: pointer; }
.ex-chip[aria-selected="true"] { background: var(--grad); border-color: transparent; color: #0b0c10; }
.ex-h { margin: 14px 16px 8px; font-size: 1.5rem; font-weight: 500; color: #dfe2e8; }
.ex-tags { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 12px; padding: 4px 16px 10px; }
.ex-tag { min-width: 0; }
.ex-tag b { display: block; font-size: 1.35rem; font-weight: 500; color: #d9dce2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-tag span { color: #35f0c8; font-size: 1.2rem; }
.ex-masonry { columns: 2; column-gap: 12px; padding: 8px 16px 120px; }
.ex-tile { break-inside: avoid; margin-bottom: 12px; display: block; border-radius: 14px; overflow: hidden; background: var(--card); }
.ex-tile img, .ex-tile video { display: block; width: 100%; }
.ex-tile .txt { padding: 14px; font-size: 1rem; line-height: 1.4; color: #dfe2e8; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.ex-tile .by { display: flex; align-items: center; gap: 8px; padding: 8px 12px 12px; font-size: .95rem; color: #dfe2e8; }
.ex-tile .by .avatar { width: 30px; height: 30px; font-size: .6rem; }
.ex-user { break-inside: avoid; margin-bottom: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 16px; border-radius: 16px; background: var(--card); }
.ex-user .avatar { width: 84px; height: 84px; font-size: 1.5rem; margin-bottom: 10px; }
.ex-user .nm { font-size: 1.25rem; font-weight: 500; color: #e6e8ec; word-break: break-word; }
.ex-user .hd { color: #7d848f; font-size: 1.1rem; }
.ex-user .rec { color: #35f0c8; font-size: 1.15rem; line-height: 1.25; }
.ex-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.ex-row .avatar { width: 56px; height: 56px; }
.section-h { padding: 8px 16px 4px; font-size: 1.05rem; color: var(--slate); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 16px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--panel-raised); border: 1px solid var(--line); font-size: .95rem; }
.chip small { color: var(--slate); margin-left: 6px; }

/* ---------- Profile alignment with the new system ---------- */
.pf-tab { font-family: var(--font-body); }
.pf-actions .btn-outline { border-color: #3a414c; }
.pf-banner { background: linear-gradient(120deg, #0f3d34 0%, #151a22 50%, #4a1230 100%); }
.btn-primary { background: var(--grad); color: #0b0c10; }
.btn { font-family: var(--font-body); }
.brand-dot { display: none; }

@media (min-width: 900px) {
  .fab, .pf-fab { right: calc(50% - 300px); }
}
.pc-stat[hidden], [hidden] { display: none !important; }

.bubble { width: fit-content; }
.msg-col { align-items: flex-start; }
.msg-reply-btn { display: none; }
.msg.sel .msg-reply-btn { display: block; color: var(--cyan); font-weight: 500; }
.msg { cursor: default; }
.convo-header .hbtn { width: 40px; }
.convo-header .back { width: 40px; }
.gs-fields { grid-template-columns: 94px 1fr; }
.gs-fields .lbl { font-size: 1rem; line-height: 1.2; }
.gs-fields .val { min-height: 56px; padding: 0 6px 0 10px; }
.gs-fields input { font-size: 1rem; }
.gs-fields .ed { width: 28px; }
.gs-avatar, .gs-avatar .avatar { width: 88px; height: 88px; }
.gs-avatar .edit { width: 38px; height: 38px; }
.gs-toggle { font-size: 1rem; }
.switch { width: 60px; height: 36px; }
.switch::after { top: 4px; left: 4px; width: 28px; height: 28px; }
.switch[aria-checked="true"]::after { transform: translateX(24px); }
.app-shell > main { flex: 1; }
.pf-circle .badge, .icon-btn .badge { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--grad); color: #0b0c10; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }

.cp-poll { border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
#pollOpts { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.cp-poll-row { display: flex; gap: 8px; align-items: center; }
.cp-poll-row input { flex: 1; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--bone); font: 400 1.05rem var(--font-body); padding: 12px 14px; outline: 0; }
.cp-poll-row input:focus { border-color: rgba(53,240,200,.5); }
.cp-poll-row button { background: none; border: 0; color: var(--slate); font-size: 1.4rem; width: 36px; height: 36px; cursor: pointer; }
a.cp-item { text-decoration: none; }
/* Polls on feed cards + location */
.pc-loc { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: var(--slate); font-size: .95rem; }
.poll { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.poll-opt { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 1.5px solid #3a414c; border-radius: 14px; background: transparent; color: var(--bone); font: 400 1.05rem var(--font-body); text-align: left; cursor: pointer; }
.poll-opt .bar { position: absolute; inset: 0 auto 0 0; background: var(--grad-soft); z-index: 0; }
.poll-opt > span { position: relative; z-index: 1; }
.poll-opt.mine { border-color: #35f0c8; }
.poll-meta { color: var(--slate); font-size: .9rem; }
.pc-act { white-space: nowrap; font-size: 1.02rem; gap: 8px; }

/* ============================================================
   Vynx UI polish layer — modern professional pass
   Appended 2026-10-18. Overrides only; does not break existing.
   ============================================================ */

/* --- Fonts: prefer Inter everywhere --- */
:root {
  --font-display: 'Inter', 'Roboto', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Roboto', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', 'Roboto Mono', monospace;

  /* Softer, modern surface palette */
  --void: #08090c;
  --panel: #0f1217;
  --card: #14181f;
  --panel-raised: #1a1f27;
  --line: #232932;
  --line-soft: #1b2027;
  --slate: #9aa3b0;
  --slate-dim: #6b7280;
}

html, body {
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Slightly larger, more readable base line-height */
body { line-height: 1.55; letter-spacing: -0.01em; }

/* --- App shell: subtle backdrop instead of flat void --- */
.app-shell {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(53,240,200,0.05), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(255,59,121,0.04), transparent 60%),
    var(--void);
}

/* --- Topbar: glassy, sticky, native-feeling --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 9, 12, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 14px;
}

/* --- Search field pill --- */
.searchfield {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--slate);
  transition: border-color .18s ease, background .18s ease;
}
.searchfield:focus-within,
.searchfield:hover { border-color: var(--line); background: var(--panel-raised); }

/* --- Buttons: rounder, softer transitions --- */
.btn {
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: transform .12s ease, filter .18s ease, background .18s ease, box-shadow .18s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(100deg, var(--cyan), var(--magenta));
  color: #06120f;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 6px 20px -8px rgba(53,240,200,0.55),
    0 6px 20px -8px rgba(255,59,121,0.55);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { border-radius: 14px; border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--panel-raised); }

/* --- Inputs: same treatment --- */
.field input, .field textarea {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color .18s ease, background .18s ease;
}
.field input:focus, .field textarea:focus {
  border-color: var(--cyan);
  background: var(--panel-raised);
  box-shadow: 0 0 0 4px rgba(53,240,200,0.10);
}

/* --- Post cards: subtle card treatment --- */
.pc {
  background: transparent;
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 18px;
  transition: background .18s ease;
}
.pc:hover { background: rgba(255,255,255,0.015); }
.pc:last-child { border-bottom: none; }

.pc .pc-head { margin-bottom: 6px; }
.pc .pc-name { font-weight: 600; }
.pc .pc-handle { color: var(--slate-dim); }
.pc .pc-text { line-height: 1.55; margin: 6px 0 10px; }

/* Media inside posts */
.pc img, .pc video {
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}

/* Action row (like / comment / repost) */
.pc-actions {
  display: flex;
  gap: 22px;
  margin-top: 12px;
  color: var(--slate);
}
.pc-actions button {
  transition: color .15s ease, transform .15s ease;
}
.pc-actions button:hover { color: var(--bone); }
.pc-actions .like-btn.on { color: var(--magenta); }
.pc-actions .repost-btn.on { color: var(--cyan); }

/* --- Bottom nav: floating, native feel --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 460px;
  margin: 0 auto;
  background: rgba(8, 9, 12, 0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  color: var(--slate);
  transition: color .15s ease, transform .15s ease;
}
.bottom-nav a.active { color: var(--bone); }
.bottom-nav a:hover { color: var(--bone); transform: translateY(-1px); }

/* --- FAB (new post button) --- */
.fab {
  position: fixed;
  bottom: calc(84px + env(safe-area-inset-bottom));
  right: calc(50% - 220px);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(100deg, var(--cyan), var(--magenta));
  color: #06120f;
  box-shadow:
    0 10px 30px -8px rgba(53,240,200,0.55),
    0 10px 30px -8px rgba(255,59,121,0.55);
  transition: transform .15s ease;
  z-index: 45;
}
.fab:active { transform: scale(0.94); }
@media (max-width: 500px) {
  .fab { right: 20px; }
}

/* --- Avatars: consistent ring, subtle --- */
.avatar {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
  font-weight: 600;
}

/* --- Profile header polish --- */
.acct-top {
  padding: 16px 24px 22px;
}
.avatar-lg {
  box-shadow:
    0 0 0 3px var(--void),
    0 0 0 4px var(--line);
}
.acct-top .name { font-size: 1.2rem; letter-spacing: -0.015em; }
.acct-top .handle { color: var(--slate-dim); font-size: 0.8rem; }
.acct-top .bio { color: #d1d5db; font-size: 0.88rem; }
.stat-row .stat .num { letter-spacing: -0.02em; }

/* --- Tabs: cleaner active state --- */
.acct-tabs { border-bottom: 1px solid var(--line); }
.acct-tabs .tab { transition: color .15s ease; }
.acct-tabs .tab:hover { color: var(--bone); }
.acct-tabs .tab.active {
  color: var(--bone);
  border-bottom-color: var(--cyan);
}

/* --- Toasts: floating pill --- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--bone);
  font-size: 0.85rem;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  z-index: 100;
}
.toast:not(.hidden) { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Smooth page load --- */
.app-shell { animation: vynxFadeIn .25s ease; }
@keyframes vynxFadeIn { from { opacity: 0 } to { opacity: 1 } }

/* --- Auth page polish --- */
.auth-wrap .wordmark { letter-spacing: -0.03em; }
.auth-wrap .tag { font-size: 0.95rem; }
