/* ===== VARIABLES ===== */
:root {
  --bg: #0e0e0e;
  --bg2: #161616;
  --bg3: #1f1f1f;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --text2: #888;
  --text3: #555;
  --accent: #e8e8e8;
  --accent-hl: #ffffff;
  --like: #e0425a;
  --repost: #4caf88;
  --btn-primary-bg: #f0f0f0;
  --btn-primary-text: #0e0e0e;
  --danger: #c0392b;
  --radius: 12px;
  --nav-h: 100px;
  --follow-bg: #f0f0f0;
  --follow-text: #0e0e0e;
  --verified: #1d9bf0;
  --quote-bg: rgba(255,255,255,0.03);
  --hashtag: #1d9bf0;
  --mention: #9b8fff;
  /* Derived convenience aliases (used by reels, polls, skeletons) */
  --card: #161616;
  --bg1: #0e0e0e;
  --text1: #f0f0f0;
  --hover: #1c1c1c;
}

body.light {
  --bg: #f5f5f5;
  --bg2: #ffffff;
  --bg3: #ebebeb;
  --border: #ddd;
  --text: #111;
  --text2: #666;
  --text3: #aaa;
  --accent: #111;
  --accent-hl: #000;
  --btn-primary-bg: #111;
  --btn-primary-text: #fff;
  --follow-bg: #111;
  --follow-text: #fff;
  --quote-bg: rgba(0,0,0,0.03);
  --hashtag: #0f7bcf;
  --mention: #6d5fd6;
  --card: #ffffff; --bg1: #f5f5f5; --text1: #111; --hover: #eeeeee;
}

body.sunset {
  --bg: #1a1314;
  --bg2: #2a1f20;
  --bg3: #3d2a2b;
  --border: #5a3f40;
  --text: #ffe4d6;
  --text2: #d4a59a;
  --text3: #8a6b66;
  --accent: #ff9966;
  --accent-hl: #ffb088;
  --like: #ff6b6b;
  --repost: #ffa07a;
  --btn-primary-bg: #ff9966;
  --btn-primary-text: #1a1314;
  --danger: #e74c3c;
  --follow-bg: #ff9966;
  --follow-text: #1a1314;
  --verified: #ffb088;
  --quote-bg: rgba(255,153,102,0.08);
  --hashtag: #ff9966;
  --mention: #ffb088;
  --card: #2a1f20; --bg1: #1a1314; --text1: #ffe4d6; --hover: #372428;
}

body.crimson-moon {
  --bg: #0d0a0f;
  --bg2: #1a1320;
  --bg3: #271d30;
  --border: #3d2d4a;
  --text: #f5e6ff;
  --text2: #c9a3d9;
  --text3: #7a5f8a;
  --accent: #dc143c;
  --accent-hl: #ff1744;
  --like: #e91e63;
  --repost: #9c27b0;
  --btn-primary-bg: #dc143c;
  --btn-primary-text: #f5e6ff;
  --danger: #b71c1c;
  --follow-bg: #dc143c;
  --follow-text: #f5e6ff;
  --verified: #ff1744;
  --quote-bg: rgba(220,20,60,0.08);
  --hashtag: #ff1744;
  --mention: #e91e63;
  --card: #1a1320; --bg1: #0d0a0f; --text1: #f5e6ff; --hover: #221729;
}

body.cotton-candy {
  --bg: #fff0f5;
  --bg2: #ffe4f0;
  --bg3: #ffd6e8;
  --border: #ffb3d9;
  --text: #5a2e4a;
  --text2: #8b5a7a;
  --text3: #b88ba8;
  --accent: #ff69b4;
  --accent-hl: #ff1493;
  --like: #ff1493;
  --repost: #ff69b4;
  --btn-primary-bg: #ff69b4;
  --btn-primary-text: #ffffff;
  --danger: #c71585;
  --follow-bg: #ff69b4;
  --follow-text: #ffffff;
  --verified: #ff1493;
  --quote-bg: rgba(255,105,180,0.1);
  --hashtag: #ff1493;
  --mention: #da70d6;
  --card: #ffe4f0; --bg1: #fff0f5; --text1: #5a2e4a; --hover: #ffdaec;
}

body.lavender {
  --bg: #f5f3ff;
  --bg2: #ede9fe;
  --bg3: #ddd6fe;
  --border: #c4b5fd;
  --text: #3b2f5e;
  --text2: #6b5b95;
  --text3: #9b8cbd;
  --accent: #8b5cf6;
  --accent-hl: #7c3aed;
  --like: #a855f7;
  --repost: #c084fc;
  --btn-primary-bg: #8b5cf6;
  --btn-primary-text: #ffffff;
  --danger: #9333ea;
  --follow-bg: #8b5cf6;
  --follow-text: #ffffff;
  --verified: #7c3aed;
  --quote-bg: rgba(139,92,246,0.1);
  --hashtag: #7c3aed;
  --mention: #a855f7;
  --card: #ede9fe; --bg1: #f5f3ff; --text1: #3b2f5e; --hover: #e8e2fd;
}

/* Melon — dark, watermelon-inspired */
body.melon {
  --bg: #0d1f0a;
  --bg2: #162b12;
  --bg3: #1e3a1a;
  --border: #2d5a28;
  --text: #f0f7e8;
  --text2: #96c888;
  --text3: #5a8a50;
  --accent: #ff6b8a;
  --accent-hl: #ff3d6b;
  --like: #ff3d6b;
  --repost: #5ecb5a;
  --btn-primary-bg: #ff6b8a;
  --btn-primary-text: #0d1f0a;
  --danger: #c0392b;
  --follow-bg: #ff6b8a;
  --follow-text: #0d1f0a;
  --verified: #5ecb5a;
  --quote-bg: rgba(255,107,138,0.08);
  --hashtag: #5ecb5a;
  --mention: #ff6b8a;
  --card: #162b12; --bg1: #0d1f0a; --text1: #f0f7e8; --hover: #1a3516;
}

/* Banana — warm golden yellow */
body.banana {
  --bg: #1a1600;
  --bg2: #272000;
  --bg3: #352c00;
  --border: #5a4d00;
  --text: #fff9e0;
  --text2: #d4c060;
  --text3: #8a7a30;
  --accent: #ffe033;
  --accent-hl: #ffed66;
  --like: #ff9800;
  --repost: #66bb6a;
  --btn-primary-bg: #ffe033;
  --btn-primary-text: #1a1600;
  --danger: #e65100;
  --follow-bg: #ffe033;
  --follow-text: #1a1600;
  --verified: #ffed66;
  --quote-bg: rgba(255,224,51,0.08);
  --hashtag: #ffed66;
  --mention: #ffc107;
  --card: #272000; --bg1: #1a1600; --text1: #fff9e0; --hover: #2c2800;
}

/* Strawberry — vivid red and cream */
body.strawberry {
  --bg: #1a080c;
  --bg2: #2a1018;
  --bg3: #3a1822;
  --border: #5a2030;
  --text: #ffe8ec;
  --text2: #d48090;
  --text3: #8a4050;
  --accent: #f44336;
  --accent-hl: #ff1744;
  --like: #ff1744;
  --repost: #f06292;
  --btn-primary-bg: #f44336;
  --btn-primary-text: #ffe8ec;
  --danger: #b71c1c;
  --follow-bg: #f44336;
  --follow-text: #ffe8ec;
  --verified: #ff5252;
  --quote-bg: rgba(244,67,54,0.08);
  --hashtag: #ff5252;
  --mention: #f06292;
  --card: #2a1018; --bg1: #1a080c; --text1: #ffe8ec; --hover: #301420;
}

/* Cherry — deep burgundy dark */
body.cherry {
  --bg: #130008;
  --bg2: #210012;
  --bg3: #30001c;
  --border: #540030;
  --text: #ffe0ec;
  --text2: #d47090;
  --text3: #8a3060;
  --accent: #d81b60;
  --accent-hl: #f50057;
  --like: #f50057;
  --repost: #ad1457;
  --btn-primary-bg: #d81b60;
  --btn-primary-text: #ffe0ec;
  --danger: #880e4f;
  --follow-bg: #d81b60;
  --follow-text: #ffe0ec;
  --verified: #f50057;
  --quote-bg: rgba(216,27,96,0.08);
  --hashtag: #f50057;
  --mention: #ec407a;
  --card: #210012; --bg1: #130008; --text1: #ffe0ec; --hover: #280015;
}

/* Sakura — light cherry blossom */
body.sakura {
  --bg: #fef5f8;
  --bg2: #fde8f0;
  --bg3: #fbd6e8;
  --border: #f8b0d4;
  --text: #4a1830;
  --text2: #8a4870;
  --text3: #b880a0;
  --accent: #e91e8c;
  --accent-hl: #c2185b;
  --like: #e91e63;
  --repost: #f06292;
  --btn-primary-bg: #e91e8c;
  --btn-primary-text: #ffffff;
  --danger: #c2185b;
  --follow-bg: #e91e8c;
  --follow-text: #ffffff;
  --verified: #c2185b;
  --quote-bg: rgba(233,30,140,0.07);
  --hashtag: #c2185b;
  --mention: #e91e63;
  --card: #fde8f0; --bg1: #fef5f8; --text1: #4a1830; --hover: #fcdae8;
}

/* Bamboo — deep forest green */
body.bamboo {
  --bg: #091408;
  --bg2: #111f10;
  --bg3: #192c18;
  --border: #274a25;
  --text: #e0f0d8;
  --text2: #90b888;
  --text3: #5a7858;
  --accent: #66bb6a;
  --accent-hl: #81c784;
  --like: #a5d6a7;
  --repost: #43a047;
  --btn-primary-bg: #66bb6a;
  --btn-primary-text: #091408;
  --danger: #c62828;
  --follow-bg: #66bb6a;
  --follow-text: #091408;
  --verified: #81c784;
  --quote-bg: rgba(102,187,106,0.08);
  --hashtag: #81c784;
  --mention: #a5d6a7;
  --card: #111f10; --bg1: #091408; --text1: #e0f0d8; --hover: #162a14;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600;
  transition: opacity 0.15s, transform 0.1s;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn-ghost { border: 1.5px solid var(--border); color: var(--text); background: transparent; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-full { width: 100%; justify-content: center; }

/* ===== AUTH ===== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; justify-content: center; }
.logo-x { font-size: 2.2rem; font-weight: 800; color: var(--text); letter-spacing: -2px; }
.logo-text { font-size: 2rem; font-weight: 700; color: var(--text); }
.auth-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; text-align: center; padding: 10px;
  color: var(--text2); font-weight: 600; font-size: 0.9rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.auth-tab.active { color: var(--text); border-bottom-color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-group label { font-size: 0.82rem; font-weight: 600; color: var(--text2); }
.field-hint { font-weight: 400; color: var(--text3); }
.field-group input {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  color: var(--text); font-size: 0.95rem;
  transition: border-color 0.15s; outline: none;
}
.field-group input:focus { border-color: var(--text2); }
.error-box {
  background: rgba(224,66,90,0.12); border: 1px solid rgba(224,66,90,0.35);
  border-radius: 8px; padding: 10px 14px;
  color: var(--like); font-size: 0.85rem; margin-bottom: 4px;
}
.error-box p { margin: 2px 0; }
.field-locked { font-size: 0.78rem; color: var(--text3); margin-top: 4px; }

/* ===== TOP NAV ===== */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.topnav-inner {
  max-width: 600px; margin: 0 auto;
  height: 100%; display: flex; flex-direction: column; justify-content: center;
  padding: 8px 16px 4px;
  gap: 6px;
}
.topnav-top-row {
  display: flex; align-items: center; gap: 12px;
}
.topnav-bottom-row {
  display: flex; align-items: center;
}
.nav-logo { font-size: 1.3rem; font-weight: 800; letter-spacing: -1px; white-space: nowrap; flex-shrink: 0; }
.nav-tabs { display: flex; gap: 4px; width: 100%; }
.nav-tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 8px; border-radius: 10px;
  color: var(--text2); font-size: 0.7rem; font-weight: 600;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-tab svg { width: 20px; height: 20px; }
.nav-tab.active { color: var(--text); background: var(--bg3); }
.nav-tab:hover:not(.active) { background: var(--bg3); color: var(--text); }

/* ===== SEARCH BAR ===== */
.nav-search-wrap {
  flex: 1; position: relative; display: flex; align-items: center;
}
.nav-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text3); pointer-events: none;
}
.nav-search-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 32px 7px 30px;
  color: var(--text); font-size: 0.85rem; outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.nav-search-input:focus { border-color: var(--text2); background: var(--bg2); }
.nav-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text3); font-size: 0.75rem; padding: 2px 4px;
  border-radius: 999px; line-height: 1;
  transition: color 0.15s;
}
.nav-search-clear:hover { color: var(--text); }

/* ===== SEARCH RESULTS ===== */
.search-section-header {
  font-size: 0.78rem; font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 14px 16px 6px;
}
.search-user-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.search-user-item:hover { background: var(--bg3); }
.search-user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.search-user-name { font-weight: 700; font-size: 0.92rem; display: flex; align-items: center; gap: 4px; }
.search-user-handle { font-size: 0.8rem; color: var(--text2); margin-top: 1px; }
.notif-badge {
  position: absolute; top: 6px; right: 8px;
  background: var(--like); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  border-radius: 999px; padding: 1px 5px;
  min-width: 16px; text-align: center;
}
.admin-nav-link {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 8px; border-radius: 10px;
  color: var(--text2); font-size: 0.7rem; font-weight: 600;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.admin-nav-link:hover { background: var(--bg3); color: var(--text); }
.admin-nav-link svg { width: 20px; height: 20px; }

/* ===== TABS ===== */
.tab-content { display: none; padding-top: var(--nav-h); }
.tab-content.active { display: block; }

/* ===== FEED ===== */
.feed-container { max-width: 600px; margin: 0 auto; padding: 0 0 80px; }
.compose-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s;
}
.compose-bar:hover { background: var(--bg2); }
.compose-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3); color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
  border: 1.5px solid var(--border);
}
.compose-placeholder { flex: 1; color: var(--text3); font-size: 0.95rem; }
.compose-trigger-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--btn-primary-bg); color: var(--btn-primary-text);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.compose-trigger-btn svg { stroke: var(--btn-primary-text); }

/* ===== POST CARD ===== */
.post-card {
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  transition: background 0.12s;
  position: relative;
}
.post-card:hover { background: var(--bg2); }

/* Quote repost label */
.post-qr-label {
  font-size: 0.78rem; color: var(--text3);
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 8px; padding-left: 44px;
}
.post-qr-label svg { width: 13px; height: 13px; }

.post-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.post-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg3); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.88rem; flex-shrink: 0;
  border: 1.5px solid var(--border); text-decoration: none;
  transition: opacity 0.15s;
}
.post-avatar:hover { opacity: 0.8; }
.post-header-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.post-header-top { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.post-display-name { font-weight: 700; font-size: 0.95rem; color: var(--text); text-decoration: none; }
.post-display-name:hover { text-decoration: underline; }
.post-username { color: var(--text3); font-size: 0.82rem; }
.post-username-sub { color: var(--text3); font-size: 0.78rem; margin-top: 1px; }
.post-sep { color: var(--text3); font-size: 0.8rem; }
.post-meta { color: var(--text3); font-size: 0.82rem; }
/* Clickable links inside posts */
.post-link { color: var(--mention); text-decoration: underline; word-break: break-all; }
.post-link:hover { opacity: 0.8; }
.post-detail-time { color: var(--text3); font-size: 0.85rem; }
.post-content {
  font-size: 0.97rem; line-height: 1.55;
  margin-bottom: 12px; white-space: pre-wrap;
  word-break: break-word; padding-left: 44px;
}
.post-content .hashtag { color: var(--hashtag); cursor: pointer; }
.post-content .hashtag:hover { text-decoration: underline; }
.post-content .mention { color: var(--mention); cursor: pointer; }
.post-content .mention:hover { text-decoration: underline; }
.post-content .post-link { color: var(--mention); text-decoration: underline; word-break: break-all; }
.post-content .post-link:hover { opacity: 0.8; }

/* Post menu */
.post-menu-wrap { position: relative; margin-left: auto; }
.post-menu-btn {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 1rem;
  transition: background 0.12s, color 0.12s;
}
.post-menu-btn:hover { background: var(--bg3); color: var(--text2); }
.post-dropdown {
  position: absolute; right: 0; top: 32px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 4px;
  z-index: 150; min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  display: none;
}
.post-dropdown.open { display: block; }
.post-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 7px;
  font-size: 0.85rem; color: var(--text2);
  cursor: pointer; transition: background 0.1s, color 0.1s;
}
.post-dropdown-item:hover { background: var(--bg3); color: var(--text); }
.post-dropdown-item.danger { color: var(--like); }
.post-dropdown-item.danger:hover { background: rgba(224,66,90,0.1); color: var(--like); }
.post-dropdown-item svg { width: 14px; height: 14px; }

/* Quote embed */
.quote-embed {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--quote-bg);
  cursor: pointer;
  transition: border-color 0.15s;
}
.quote-embed:hover { border-color: var(--text3); }
.quote-embed-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 5px;
}
.quote-embed-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg3); display: flex; align-items: center;
  justify-content: center; font-size: 0.6rem; font-weight: 700;
  border: 1px solid var(--border); flex-shrink: 0; color: var(--text2);
}
.quote-embed-name { font-size: 0.82rem; font-weight: 700; }
.quote-embed-user { font-size: 0.75rem; color: var(--text3); }
.quote-embed-content {
  font-size: 0.83rem; color: var(--text2); line-height: 1.4;
  white-space: pre-wrap; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.post-actions { display: flex; gap: 4px; padding-left: 44px; }
.action-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 8px;
  color: var(--text3); font-size: 0.82rem; font-weight: 600;
  transition: background 0.12s, color 0.12s;
}
.action-btn svg { width: 16px; height: 16px; }
.action-btn:hover { background: var(--bg3); color: var(--text2); }
.action-btn.liked { color: var(--like); }
.action-btn.liked svg { fill: var(--like); stroke: var(--like); }
.action-btn.reposted { color: var(--repost); }
.action-btn.reposted svg { fill: var(--repost); stroke: var(--repost); }
.action-btn.quote-btn:hover { color: var(--repost); background: rgba(76,175,136,0.1); }
.action-btn.report-btn:hover { color: var(--like); background: rgba(224,66,90,0.08); }

/* ===== VERIFIED BADGE ===== */
.verified-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--verified);
  margin-left: 3px; flex-shrink: 0; vertical-align: middle;
  cursor: help; position: relative;
  box-shadow: 0 0 0 1.5px color-mix(in srgb,var(--verified) 30%,transparent);
}
.verified-badge svg {
  width: 9px; height: 9px;
  fill: none; stroke: #fff; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.verified-badge::after {
  content: "Verified";
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.88); color: #fff;
  font-size: 0.68rem; font-weight: 600; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.15s;
  z-index: 20;
}
.verified-badge:hover::after { opacity: 1; }

/* Subscription badges — icon style with tooltip */
.sub-badge-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px; height: 17px;
  border-radius: 50%;
  margin-left: 3px;
  flex-shrink: 0;
  vertical-align: middle;
  cursor: help;
  position: relative;
  top: -1px;
}
.sub-badge-wrap.sub-badge-plus {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, #8b5cf6 35%, transparent);
}
.sub-badge-wrap.sub-badge-pro {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, #f59e0b 35%, transparent);
}
.sub-badge-wrap svg {
  width: 9px; height: 9px;
  fill: #fff;
  pointer-events: none;
  display: block;
}
.sub-badge-wrap::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.88); color: #fff;
  font-size: 0.68rem; font-weight: 600; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.15s;
  z-index: 20;
}
.sub-badge-wrap:hover::after,
.sub-badge-wrap.tip-visible::after { opacity: 1; }

.chatroom-list { display:flex; flex-direction:column; gap:0; }
.chatroom-item {
  display:flex; align-items:center; gap:12px;
  padding:13px 16px; border-bottom:1px solid var(--border);
  cursor:pointer; transition:background 0.12s; text-decoration:none; color:inherit;
}
.chatroom-item:hover { background:var(--bg2); }
.chatroom-icon {
  width:40px; height:40px; border-radius:12px; flex-shrink:0;
  background:color-mix(in srgb,var(--accent) 15%,transparent);
  display:flex; align-items:center; justify-content:center;
  color:var(--accent);
}
.chatroom-name { font-weight:700; font-size:0.92rem; color:var(--text); }
.chatroom-meta { font-size:0.72rem; color:var(--text3); margin-top:2px; }
.chatroom-chevron { margin-left:auto; color:var(--text3); flex-shrink:0; }
.chatroom-create-btn {
  display:flex; align-items:center; gap:8px; padding:14px 16px;
  color:var(--accent); font-weight:600; font-size:0.88rem;
  border:none; background:none; cursor:pointer; width:100%;
  border-bottom:1px solid var(--border); transition:background .12s;
}
.chatroom-create-btn:hover { background:var(--bg2); }
.chatroom-empty {
  padding:40px 16px; text-align:center; color:var(--text3); font-size:0.88rem;
}

/* ===== LOADING ===== */
.loading-state { text-align: center; padding: 40px 16px; color: var(--text3); font-size: 0.9rem; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: 1rem; font-weight: 700;
  padding: 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: var(--nav-h); background: var(--bg); z-index: 5;
  display: flex; align-items: center; gap: 10px;
}
.section-back {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); color: var(--text2);
  transition: background 0.15s;
}
.section-back:hover { background: var(--border); }
.section-back svg { width: 16px; height: 16px; }

/* ===== NOTIFICATIONS ===== */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.12s;
}
.notif-item:hover { background: var(--bg2); }
.notif-item.unread { background: rgba(255,255,255,0.02); }
.notif-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.notif-icon.like { background: rgba(224,66,90,0.15); color: var(--like); }
.notif-icon.comment { background: rgba(100,160,255,0.12); color: #64a0ff; }
.notif-icon.repost { background: rgba(76,175,136,0.12); color: var(--repost); }
.notif-icon.follow { background: rgba(180,180,255,0.12); color: #9b8fff; }
.notif-icon.quote { background: rgba(76,175,136,0.12); color: var(--repost); }
.notif-text { flex: 1; font-size: 0.88rem; line-height: 1.4; }
.notif-text strong { font-weight: 700; }
.notif-time { color: var(--text3); font-size: 0.78rem; margin-top: 2px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text3); font-size: 0.9rem; }

/* ===== PROFILE (own tab) ===== */
.profile-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 20px 24px; border-bottom: 1px solid var(--border); position: relative;
}
.profile-avatar-big {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg3); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; font-weight: 700; border: 2px solid var(--border); margin-bottom: 12px;
}
.profile-name { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 4px; }
.profile-username { color: var(--text2); font-size: 0.9rem; margin-top: 2px; }
.profile-bio { color: var(--text2); font-size: 0.88rem; margin-top: 8px; text-align: center; max-width: 340px; line-height: 1.4; }
.profile-stats { display: flex; gap: 24px; margin-top: 16px; }
.profile-stat { text-align: center; }
.profile-stat-num { font-size: 1.1rem; font-weight: 700; }
.profile-stat-label { font-size: 0.75rem; color: var(--text2); margin-top: 1px; }
.settings-section { padding: 20px 16px; }
.settings-label {
  font-size: 0.8rem; font-weight: 600; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px;
}
.theme-toggle-row { display: flex; gap: 8px; }
.theme-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; border-radius: 10px; border: 1.5px solid var(--border);
  color: var(--text2); font-size: 0.88rem; font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.theme-btn.active { border-color: var(--text); color: var(--text); background: var(--bg3); }
.theme-btn svg { stroke: currentColor; fill: none; }
.edit-profile-form { padding: 20px 16px; border-bottom: 1px solid var(--border); }
.edit-profile-form .field-group { margin-bottom: 14px; }
.edit-profile-form label { font-size: 0.8rem; font-weight: 600; color: var(--text2); display: block; margin-bottom: 5px; }
.edit-profile-form input,
.edit-profile-form textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 0.95rem; outline: none;
  transition: border-color 0.15s;
}
.edit-profile-form input:focus, .edit-profile-form textarea:focus { border-color: var(--text2); }
.edit-profile-form textarea { resize: vertical; min-height: 70px; }

/* ===== PUBLIC PROFILE PAGE ===== */
.public-profile-header { padding: 24px 16px; border-bottom: 1px solid var(--border); }
.public-profile-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.public-profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--bg3); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; border: 2px solid var(--border); flex-shrink: 0;
}
.public-profile-info { flex: 1; }
.public-profile-name { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.public-profile-username { color: var(--text2); font-size: 0.88rem; margin-top: 2px; }
.public-profile-bio { color: var(--text2); font-size: 0.88rem; margin-top: 8px; line-height: 1.4; }
.public-profile-stats { display: flex; gap: 20px; margin-top: 12px; }
.public-profile-stat { font-size: 0.88rem; color: var(--text2); }
.public-profile-stat strong { color: var(--text); font-weight: 700; }
.follow-btn {
  padding: 8px 20px; border-radius: 999px; font-size: 0.88rem; font-weight: 700;
  background: var(--follow-bg); color: var(--follow-text);
  transition: opacity 0.15s, background 0.15s; flex-shrink: 0; margin-top: 4px;
}
.follow-btn:hover { opacity: 0.85; }
.follow-btn.following { background: var(--bg3); border: 1.5px solid var(--border); color: var(--text); }
.follow-btn.following:hover { border-color: var(--like); color: var(--like); }

/* ===== HASHTAG PAGE ===== */
.hashtag-header {
  padding: 20px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.hashtag-title {
  font-size: 1.4rem; font-weight: 900; color: var(--hashtag);
  letter-spacing: -0.5px;
}
.hashtag-sub { font-size: 0.85rem; color: var(--text3); margin-top: 4px; }

/* ===== MODALS ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 200;
  align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }
.compose-modal {
  background: var(--bg2);
  border-top-left-radius: 18px; border-top-right-radius: 18px;
  border: 1px solid var(--border); border-bottom: none;
  width: 100%; max-width: 600px; padding: 16px;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.compose-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; font-weight: 700;
}
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg3); color: var(--text2);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.compose-textarea {
  width: 100%; min-height: 100px; max-height: 240px;
  background: transparent; border: none; outline: none; resize: none;
  color: var(--text); font-size: 1rem; line-height: 1.5; margin-bottom: 10px;
}
.compose-footer { display: flex; align-items: center; justify-content: space-between; }
.char-count { font-size: 0.82rem; color: var(--text3); }

/* Mention dropdown */
.mention-dropdown {
  position: absolute; z-index: 300;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  min-width: 220px; max-width: 280px;
}
.mention-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; cursor: pointer;
  transition: background 0.1s;
}
.mention-item:hover, .mention-item.selected { background: var(--bg3); }
.mention-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; flex-shrink: 0; color: var(--text2);
}
.mention-info { flex: 1; min-width: 0; }
.mention-name { font-size: 0.85rem; font-weight: 700; }
.mention-user { font-size: 0.75rem; color: var(--text3); }

/* Quote repost modal extra */
.quote-preview {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; background: var(--bg3); margin-bottom: 10px;
}
.quote-preview-head { font-size: 0.8rem; font-weight: 700; color: var(--text2); margin-bottom: 4px; display: flex; align-items: center; gap: 5px; }
.quote-preview-body { font-size: 0.85rem; color: var(--text2); line-height: 1.4; max-height: 60px; overflow: hidden; }

/* Report modal */
.report-modal-inner { padding: 4px 0; }
.report-option {
  padding: 11px 4px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem; display: flex; align-items: center; gap: 8px;
  transition: color 0.1s;
}
.report-option:last-child { border-bottom: none; }
.report-option:hover { color: var(--like); }
.report-option input[type=radio] { accent-color: var(--like); }

/* ===== COMMENTS ===== */
.comments-list { max-height: 300px; overflow-y: auto; padding: 4px 0 10px; }
.comment-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg3); color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.72rem;
  border: 1px solid var(--border); flex-shrink: 0; text-decoration: none;
}
.comment-avatar:hover { opacity: 0.8; }
.comment-meta { display: flex; align-items: center; gap: 4px; }
.comment-name { font-weight: 700; font-size: 0.85rem; text-decoration: none; color: var(--text); }
.comment-name:hover { text-decoration: underline; }
.comment-time { font-size: 0.75rem; color: var(--text3); }
.comment-body { font-size: 0.88rem; line-height: 1.45; color: var(--text); padding-left: 36px; }
.comment-reply-btn {
  font-size: 0.75rem; color: var(--text3); padding: 3px 8px;
  border-radius: 6px; margin-left: 36px; margin-top: 4px;
  display: inline-block; cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.comment-reply-btn:hover { background: var(--bg3); color: var(--text2); }

/* Thread replies */
.thread-replies { padding-left: 28px; border-left: 2px solid var(--border); margin-left: 14px; margin-top: 6px; }
.reply-item { padding: 8px 0; }
.reply-header { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.reply-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg3); color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.62rem; border: 1px solid var(--border); flex-shrink: 0;
  text-decoration: none;
}
.reply-name { font-weight: 700; font-size: 0.8rem; color: var(--text); text-decoration: none; }
.reply-name:hover { text-decoration: underline; }
.reply-time { font-size: 0.72rem; color: var(--text3); }
.reply-body { font-size: 0.83rem; line-height: 1.4; padding-left: 30px; }
.comment-input-row { gap: 8px; }
.comment-input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; color: var(--text); font-size: 0.9rem; outline: none;
}
.comment-input:focus { border-color: var(--text2); }
.comment-btn-sm { padding: 7px 14px; font-size: 0.82rem; }

/* ===== POST DETAIL PAGE ===== */
.post-detail-wrap { max-width: 600px; margin: 0 auto; padding-top: 0; padding-bottom: 80px; }
.post-detail-card { border-bottom: 1px solid var(--border); padding: 18px 16px; }
.post-detail-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.post-detail-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg3); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; border: 2px solid var(--border); flex-shrink: 0; text-decoration: none;
}
.post-detail-avatar:hover { opacity: 0.8; }
.post-detail-name-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.post-detail-name { font-weight: 700; font-size: 1rem; text-decoration: none; color: var(--text); }
.post-detail-name:hover { text-decoration: underline; }
.post-detail-username { color: var(--text2); font-size: 0.85rem; margin-top: 1px; }
.post-detail-content { font-size: 1.1rem; line-height: 1.6; margin-bottom: 14px; white-space: pre-wrap; word-break: break-word; padding-top: 4px; }
.post-detail-content .hashtag { color: var(--hashtag); cursor: pointer; }
.post-detail-content .hashtag:hover { text-decoration: underline; }
.post-detail-content .mention { color: var(--mention); cursor: pointer; }
.post-detail-content .mention:hover { text-decoration: underline; }
.post-detail-content .post-link { color: var(--mention); text-decoration: underline; word-break: break-all; }
.post-detail-content .post-link:hover { opacity: 0.8; }
.post-detail-actions { display: flex; gap: 6px; padding: 10px 0 4px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.comments-section {}
.comments-section-title { font-size: 0.88rem; font-weight: 700; color: var(--text2); padding: 14px 16px; border-bottom: 1px solid var(--border); }
.detail-comment-input-wrap {
  display: flex; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); align-items: center;
}
.detail-comment-input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 8px 14px; color: var(--text); font-size: 0.9rem; outline: none;
}
.detail-comment-input:focus { border-color: var(--text2); }
.detail-comments-list {}
.detail-comment-item { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.detail-thread-replies { padding-left: 32px; margin-top: 8px; border-left: 2px solid var(--border); }
.detail-reply-input-wrap {
  display: flex; gap: 8px; margin-top: 10px; padding: 0 16px 10px;
}
.detail-reply-input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 12px; color: var(--text); font-size: 0.85rem; outline: none;
}
.detail-reply-input:focus { border-color: var(--text2); }

/* ===== ERROR PAGE ===== */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.error-wrap { text-align: center; padding: 40px 20px; max-width: 380px; }
.error-icon { font-size: 3rem; margin-bottom: 16px; }
.error-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.error-desc { color: var(--text2); font-size: 0.92rem; line-height: 1.5; margin-bottom: 28px; }

/* ===== PUSH BANNER ===== */
.push-banner {
  display: none; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin: 12px 16px;
  font-size: 0.88rem; color: var(--text2); align-items: center; gap: 10px;
}
.push-banner.show { display: flex; }
.push-banner-text { flex: 1; line-height: 1.4; }
.push-banner-actions { display: flex; gap: 8px; }
.push-banner-btn { padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; cursor: pointer; border: none; }
.push-banner-btn.primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.push-banner-btn.dismiss { background: var(--bg3); color: var(--text2); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 10px 20px; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s; z-index: 999; white-space: nowrap;
}
.toast.show { opacity: 1; }

/* ===== ADMIN PANEL ===== */
.admin-wrap { max-width: 900px; margin: 0 auto; padding: var(--nav-h) 16px 80px; }
.admin-header {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.admin-title { font-size: 1.5rem; font-weight: 900; letter-spacing: -0.5px; }
.admin-sub { color: var(--text3); font-size: 0.85rem; margin-top: 4px; }
.admin-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 28px;
}
.admin-stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
  transition: border-color 0.15s;
}
.admin-stat-card:hover { border-color: var(--text3); }
.admin-stat-num { font-size: 1.8rem; font-weight: 900; color: var(--text); letter-spacing: -1px; }
.admin-stat-label { font-size: 0.78rem; color: var(--text3); margin-top: 2px; font-weight: 500; }
.admin-stat-card.red .admin-stat-num { color: var(--like); }
.admin-stat-card.green .admin-stat-num { color: var(--repost); }

.admin-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.admin-tab {
  padding: 10px 18px; font-size: 0.88rem; font-weight: 600;
  color: var(--text2); border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; white-space: nowrap; transition: color 0.15s, border-color 0.15s;
}
.admin-tab.active { color: var(--text); border-bottom-color: var(--text); }
.admin-panel-section { display: none; }
.admin-panel-section.active { display: block; }

.admin-search-row {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.admin-search-input {
  flex: 1; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 14px; color: var(--text); font-size: 0.9rem; outline: none;
}
.admin-search-input:focus { border-color: var(--text2); }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; font-size: 0.75rem; font-weight: 600;
  color: var(--text3); padding: 8px 10px; border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.admin-table td {
  padding: 12px 10px; font-size: 0.85rem; color: var(--text2);
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.admin-table tr:hover td { background: var(--bg2); }
.admin-table .username-cell { font-weight: 700; color: var(--text); }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-btn {
  padding: 5px 12px; border-radius: 6px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border); background: var(--bg3); color: var(--text2);
  transition: all 0.12s; white-space: nowrap;
}
.admin-btn:hover { border-color: var(--text3); color: var(--text); }
.admin-btn.danger { border-color: rgba(224,66,90,0.3); color: var(--like); background: rgba(224,66,90,0.07); }
.admin-btn.danger:hover { background: rgba(224,66,90,0.15); border-color: var(--like); }
.admin-btn.success { border-color: rgba(76,175,136,0.3); color: var(--repost); background: rgba(76,175,136,0.07); }
.admin-btn.success:hover { background: rgba(76,175,136,0.15); border-color: var(--repost); }
.admin-btn.gold { border-color: rgba(245,197,24,0.3); color: #f5c518; background: rgba(245,197,24,0.07); }
.admin-btn.gold:hover { background: rgba(245,197,24,0.15); border-color: #f5c518; }

.badge-verified {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(29,155,240,0.15); color: var(--verified);
  font-size: 0.72rem; font-weight: 700;
}
.badge-suspended {
  display: inline-flex; padding: 2px 8px; border-radius: 999px;
  background: rgba(224,66,90,0.15); color: var(--like);
  font-size: 0.72rem; font-weight: 700;
}
.badge-strikes {
  display: inline-flex; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,160,50,0.15); color: #ff9f29;
  font-size: 0.72rem; font-weight: 700;
}

.report-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.report-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 10px; gap: 10px;
}
.report-meta { font-size: 0.78rem; color: var(--text3); }
.report-content {
  font-size: 0.85rem; color: var(--text2); line-height: 1.4;
  background: var(--bg3); border-radius: 8px; padding: 10px;
  margin: 8px 0; white-space: pre-wrap; word-break: break-word;
  max-height: 80px; overflow-y: auto;
}
.report-reason { font-size: 0.82rem; color: var(--like); margin-top: 6px; }
.admin-post-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.admin-post-head { display: flex; justify-content: space-between; align-items: center; }
.admin-post-meta { font-size: 0.78rem; color: var(--text3); }
.admin-post-content {
  font-size: 0.85rem; color: var(--text2); line-height: 1.4;
  white-space: pre-wrap; word-break: break-word;
  max-height: 70px; overflow-y: auto;
}

/* Suspend modal */
.suspend-options { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.suspend-option {
  padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--border);
  cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--text2);
  transition: all 0.12s;
}
.suspend-option:hover { border-color: var(--like); color: var(--like); background: rgba(224,66,90,0.06); }

@media (max-width: 480px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-table th:nth-child(n+4), .admin-table td:nth-child(n+4) { display: none; }
}
/* ─────── POST FONT SIZE (controlled by JS) ─────── */
:root { --post-font-size: 15px; }
.post-content, .post-detail-content { font-size: var(--post-font-size) !important; }

/* ─────── INLINE FOLLOW BUTTON (in feed) ─────── */
.inline-follow-btn {
  font-size: 0.7rem; font-weight: 700; padding: 2px 9px;
  border-radius: 20px; border: 1.5px solid var(--accent);
  background: transparent; color: var(--accent); cursor: pointer;
  transition: all 0.12s; white-space: nowrap; flex-shrink: 0;
  margin-left: 4px;
}
.inline-follow-btn:hover { background: var(--accent); color: #fff; }
.inline-follow-btn.following {
  border-color: var(--border); color: var(--text3); background: transparent;
}
.inline-follow-btn.following:hover { border-color: var(--like); color: var(--like); }

/* ─────── PROFILE LINKS ─────── */
.profile-links-list {
  display: flex; flex-direction: column; gap: 6px; margin-top: 10px;
}
.profile-link-item {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-size: 0.85rem; text-decoration: none;
  padding: 5px 10px; border-radius: 8px; background: rgba(0,150,255,0.07);
  border: 1px solid rgba(0,150,255,0.15); width: fit-content;
  transition: background 0.12s;
}
.profile-link-item:hover { background: rgba(0,150,255,0.14); text-decoration: underline; }
.profile-link-item svg { stroke: var(--accent); fill: none; stroke-width: 2; flex-shrink: 0; }

/* ─────── CHANGELOGS ─────── */
.changelog-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 16px; margin-bottom: 12px;
}
.changelog-header {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
}
.changelog-title {
  font-size: 1rem; font-weight: 700; color: var(--text);
}
.changelog-time { font-size: 0.75rem; color: var(--text3); margin-left: auto; }
.changelog-body {
  font-size: 0.88rem; color: var(--text2); line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}

/* ─────── ANNOUNCEMENTS ─────── */
.changelog-item {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px; margin-bottom: 12px;
  cursor: pointer; transition: background 0.12s;
}
.changelog-item:hover { background: var(--bg3); }
.changelog-item.changelog-new {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg2));
}
.changelog-content {
  font-size: 0.88rem; color: var(--text2); line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; margin-top: 6px;
}
.changelog-badge {
  font-size: 0.68rem; font-weight: 700; background: var(--accent);
  color: #fff; border-radius: 20px; padding: 2px 8px; letter-spacing: 0.03em;
  flex-shrink: 0;
}
/* Badge on Updates nav tab */
#tab-changelogs { position: relative; }
#announcement-badge {
  position: absolute; top: 2px; right: 2px;
  font-size: 0.6rem; min-width: 16px; height: 16px;
  line-height: 16px; text-align: center; padding: 0 4px;
}

/* ─────── GUEST BANNER ─────── */
.guest-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; margin: 12px 0; font-size: 0.85rem; color: var(--text2);
}
.guest-banner span { flex: 1; }

/* ─────── FIELD LOCKED ─────── */
.field-locked {
  font-size: 0.75rem; color: var(--text3); margin-top: 4px;
}

/* ─────── LINK FIELD ROW ─────── */
.link-field-row input {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 0.85rem;
  padding: 8px 10px; width: 100%; box-sizing: border-box;
  outline: none; transition: border-color 0.12s;
}
.link-field-row input:focus { border-color: var(--accent); }

/* ─────── PROFILE COVER IMAGE ─────── */
.profile-cover {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--bg3); overflow: hidden;
  border-bottom: 1px solid var(--border);
  max-height: 220px;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-cover-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 0.8rem;
}
.profile-cover-upload {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45); opacity: 0; transition: opacity 0.18s; cursor: pointer;
  color: #fff; font-size: 0.82rem; gap: 6px; font-weight: 600;
}
.profile-cover:hover .profile-cover-upload { opacity: 1; }

/* ─────── PROFILE PICTURE (IMAGE SUPPORT) ─────── */
.public-profile-avatar {
  position: relative; cursor: default; overflow: visible;
}
.public-profile-avatar img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%; border: 3px solid var(--bg);
  position: absolute; inset: 0;
}
.avatar-upload-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.18s;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 0.65rem; font-weight: 700;
}
.public-profile-avatar:hover .avatar-upload-overlay { opacity: 1; }
.public-profile-avatar.own-avatar { cursor: pointer; }

/* ─────── POST IMAGE GRID ─────── */
/* ===== POST BODY: content + image feed ===== */
.post-body {
  padding-left: 44px;
}
.post-body .post-content {
  padding-left: 0;
  margin-bottom: 8px;
}
/* Bordered media block — only shown when images present */
.post-body.has-images {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px 10px 12px;
  margin-bottom: 10px;
}
.post-body.has-images .post-content {
  margin-bottom: 10px;
}

/* Image grid */
.post-images { border-radius: 10px; overflow: hidden; }
.post-images.count-1 { display: block; }
.post-images.count-1 .post-img-cell img { width: 100%; max-height: 380px; object-fit: cover; display: block; border-radius: 10px; }
.post-images.count-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.post-images.count-2 .post-img-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.post-images.count-2 .post-img-cell:first-child img { border-radius: 10px 0 0 10px; }
.post-images.count-2 .post-img-cell:last-child  img { border-radius: 0 10px 10px 0; }
.post-images.count-3 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.post-images.count-3 .post-img-cell:nth-child(1) img { border-radius: 10px 10px 0 0; }
.post-images.count-3 .post-img-cell:nth-child(1) { grid-column: 1 / -1; }
.post-images.count-3 .post-img-cell:nth-child(1) img { width: 100%; max-height: 280px; object-fit: cover; display: block; }
.post-images.count-3 .post-img-cell:nth-child(2) img { aspect-ratio: 1; object-fit: cover; display: block; width: 100%; border-radius: 0 0 0 10px; }
.post-images.count-3 .post-img-cell:nth-child(3) img { aspect-ratio: 1; object-fit: cover; display: block; width: 100%; border-radius: 0 0 10px 0; }
.post-images.count-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.post-images.count-4 .post-img-cell img { aspect-ratio: 1; object-fit: cover; display: block; width: 100%; }
.post-images.count-4 .post-img-cell:nth-child(1) img { border-radius: 10px 0 0 0; }
.post-images.count-4 .post-img-cell:nth-child(2) img { border-radius: 0 10px 0 0; }
.post-images.count-4 .post-img-cell:nth-child(3) img { border-radius: 0 0 0 10px; }
.post-images.count-4 .post-img-cell:nth-child(4) img { border-radius: 0 0 10px 0; }

/* Cell wrapper (needed for +N overlay) */
.post-img-cell { position: relative; overflow: hidden; }
.post-img-cell img { cursor: pointer; transition: opacity 0.15s; width: 100%; display: block; }
.post-img-cell img:hover { opacity: 0.88; }

/* "+N more" overlay on the last image slot */
.post-img-more-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.52);
  color: #fff; font-size: 1.4rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  letter-spacing: 0.02em;
  backdrop-filter: blur(2px);
}
.post-img-more-overlay:hover { background: rgba(0,0,0,0.65); }

/* ─────── COMPOSE IMAGE UPLOAD ─────── */
.compose-img-area {
  border: 1.5px dashed var(--border); border-radius: 10px;
  margin: 8px 0; padding: 0; overflow: hidden;
}
.compose-action-row {
  display: flex; align-items: center; gap: 4px; padding: 6px 8px;
}
.compose-action-btn {
  display: flex; align-items: center; gap: 7px; padding: 7px 12px;
  color: var(--text2); font-size: 0.82rem; cursor: pointer;
  border-radius: 8px; border: 1.5px solid var(--border);
  background: transparent; transition: background 0.12s, color 0.12s;
  font-family: inherit;
}
.compose-action-btn:hover { background: var(--bg2); color: var(--accent); border-color: var(--accent); }
.compose-action-btn svg { flex-shrink: 0; }
/* legacy alias kept for changelog modal */
.compose-img-upload-btn {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  color: var(--text2); font-size: 0.85rem; cursor: pointer;
  transition: background 0.12s;
}
.compose-img-upload-btn:hover { background: var(--bg2); }
.compose-img-upload-btn svg { flex-shrink: 0; }

/* ─── Poll compose ─── */
.poll-compose-box {
  border: 1.5px solid var(--border); border-radius: 12px;
  margin: 8px 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
  background: var(--bg2);
}
.poll-compose-header {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.82rem; font-weight: 600; color: var(--accent);
}
.poll-remove-btn {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 0.85rem; padding: 2px 5px;
  border-radius: 4px; transition: background 0.12s;
}
.poll-remove-btn:hover { background: var(--bg3); color: var(--text1); }
.poll-question-input {
  width: 100%; box-sizing: border-box;
  padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg1); color: var(--text1); font-size: 0.9rem;
  font-family: inherit; outline: none; transition: border-color 0.15s;
}
.poll-question-input:focus { border-color: var(--accent); }
.poll-option-row {
  display: flex; align-items: center; gap: 6px;
}
.poll-option-input {
  flex: 1; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg1); color: var(--text1); font-size: 0.85rem;
  font-family: inherit; outline: none; transition: border-color 0.15s; box-sizing: border-box;
}
.poll-option-input:focus { border-color: var(--accent); }
.poll-option-remove {
  background: none; border: none; cursor: pointer; color: var(--text3);
  font-size: 0.9rem; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.12s; padding: 0;
}
.poll-option-remove:hover { background: var(--bg3); color: var(--danger, #e00); }
.poll-add-option-btn {
  background: none; border: 1.5px dashed var(--border); border-radius: 8px;
  color: var(--text2); font-size: 0.82rem; cursor: pointer; padding: 6px 10px;
  text-align: left; transition: border-color 0.12s, color 0.12s; font-family: inherit;
}
.poll-add-option-btn:hover { border-color: var(--accent); color: var(--accent); }
.poll-duration-row {
  display: flex; align-items: center; gap: 8px; margin-top: 2px;
}
.poll-duration-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.8rem; color: var(--text2); white-space: nowrap;
}
.poll-duration-select {
  padding: 5px 8px; border: 1.5px solid var(--border); border-radius: 8px;
  background: var(--bg1); color: var(--text1); font-size: 0.82rem;
  cursor: pointer; outline: none; font-family: inherit;
}

/* ─── Poll display in feed ─── */
.poll-display {
  border: 1.5px solid var(--border); border-radius: 12px;
  margin: 8px 0; overflow: hidden;
}
.poll-display-question {
  font-weight: 600; font-size: 0.95rem; padding: 10px 14px 6px;
  color: var(--text1);
}
.poll-option-bar {
  position: relative; margin: 4px 10px; border-radius: 8px;
  overflow: hidden; cursor: pointer; transition: opacity 0.12s;
}
.poll-option-bar:hover { opacity: 0.88; }
.poll-option-bar.voted { cursor: default; }
.poll-option-bar input[type=radio] { display: none; }
.poll-option-fill {
  position: absolute; inset: 0; border-radius: 8px;
  background: var(--accent); opacity: 0.18; transition: width 0.4s ease;
}
.poll-option-fill.winner { opacity: 0.32; }
.poll-option-label {
  position: relative; display: flex; justify-content: space-between;
  align-items: center; padding: 8px 12px; font-size: 0.88rem; color: var(--text1);
  user-select: none;
}
.poll-option-pct { font-size: 0.78rem; color: var(--text2); font-weight: 600; }
.poll-meta {
  padding: 6px 14px 10px; font-size: 0.75rem; color: var(--text3);
  display: flex; align-items: center; gap: 8px;
}
.poll-ended-badge {
  display: inline-block; font-size: 0.7rem; background: var(--bg3);
  color: var(--text2); border-radius: 4px; padding: 1px 6px; font-weight: 600;
}
.compose-img-preview { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; }
.compose-img-thumb {
  position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden;
}
.compose-img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.compose-img-thumb-remove {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,0.7); color: #fff; border: none;
  border-radius: 50%; width: 18px; height: 18px; font-size: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.compose-img-count {
  font-size: 0.75rem; color: var(--text3); padding: 0 8px 8px;
}

/* ─────── IMAGE LIGHTBOX ─────── */
.img-lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92); align-items: center; justify-content: center;
}
.img-lightbox.open { display: flex; }
.img-lightbox img { max-width: 95vw; max-height: 95vh; object-fit: contain; border-radius: 8px; }
.img-lightbox-close {
  position: absolute; top: 16px; right: 20px; color: #fff;
  font-size: 1.8rem; cursor: pointer; line-height: 1; opacity: 0.8;
}
.img-lightbox-close:hover { opacity: 1; }

/* ─────── UPLOAD PROGRESS ─────── */
.upload-progress {
  font-size: 0.78rem; color: var(--text3); padding: 4px 14px 8px;
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   REELS
   ═══════════════════════════════════════════════════════════ */

/* ─── Container ─── */
.reels-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 0 80px;
}
.reels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 10px;
  border-bottom: 1px solid var(--border);
}

/* ─── Reel Card (Feed style) ─── */
.reel-card {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.reel-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  text-decoration: none;
  color: inherit;
}
.reel-card-author:hover { background: var(--hover); }
.reel-video-container {
  position: relative;
  width: 100%;
  background: #000;
  cursor: pointer;
}
/* 9:16 aspect ratio */
.reel-video-container.reel-916 {
  aspect-ratio: 9 / 16;
  max-height: 85vh;
  overflow: hidden;
}
.reel-video-container video {
  width: 100%;
  max-height: 480px;
  display: block;
  object-fit: contain;
}
.reel-916 video {
  max-height: none !important;
  height: 100%;
  object-fit: cover !important;
}
.reel-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.2s;
}
.reel-play-overlay svg {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.7));
  opacity: 0.85;
}
.reel-video-container.playing .reel-play-overlay {
  opacity: 0;
}
/* Mute button */
.reel-mute-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.55);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  z-index: 3;
  transition: background 0.15s;
  backdrop-filter: blur(4px);
}
.reel-mute-btn:hover { background: rgba(0,0,0,0.8); }
.reel-card-description {
  padding: 10px 14px 6px;
  font-size: 0.92rem;
  color: var(--text1);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.reel-card-actions {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 6px 8px 10px;
  border-top: 1px solid var(--border);
}
.reel-card-actions .reel-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 0.84rem;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.reel-card-actions .reel-action-btn:hover { color: var(--text1); background: var(--hover); }
.reel-card-actions .reel-action-btn.liked { color: #f43f5e; }
.reel-card-actions .reel-action-btn.liked svg { fill: #f43f5e; stroke: #f43f5e; }
.reel-view-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text3);
  padding: 0 8px;
}

/* ─── Skeleton Loading ─── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton-card {
  pointer-events: none;
}
.skeleton-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--border) 25%, var(--hover) 50%, var(--border) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  flex-shrink: 0;
}
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--border) 25%, var(--hover) 50%, var(--border) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-video {
  aspect-ratio: 9 / 16;
  max-height: 85vh;
  background: linear-gradient(90deg, var(--border) 25%, var(--hover) 50%, var(--border) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-btn {
  width: 64px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--border) 25%, var(--hover) 50%, var(--border) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* ─── Reel Compose Modal ─── */
.reel-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text3);
}
.reel-upload-zone:hover {
  border-color: var(--accent);
  background: var(--hover);
  color: var(--text1);
}
.reel-upload-label {
  font-size: 0.95rem;
  margin-top: 10px;
  font-weight: 600;
}
.reel-upload-sub {
  font-size: 0.78rem;
  margin-top: 4px;
  color: var(--text3);
}
.reel-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.reel-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s;
}

/* ─── Reel Detail Page ─── */
.reel-detail-card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 40px;
  border: 1px solid var(--border);
}
.reel-video-wrap { background: #000; }
.reel-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 6px;
  gap: 12px;
}
.reel-author-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.reel-view-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text3);
  white-space: nowrap;
}
.reel-detail-description {
  padding: 4px 16px 10px;
  font-size: 0.94rem;
  color: var(--text1);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.reel-detail-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.reel-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text3);
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.reel-action-btn:hover { color: var(--text1); background: var(--hover); }
.reel-action-btn.liked { color: #f43f5e; }
.reel-action-btn.liked svg { fill: #f43f5e; stroke: #f43f5e; }
.reel-action-btn.delete-btn { margin-left: auto; color: var(--text3); }
.reel-action-btn.delete-btn:hover { color: #f43f5e; }
.reel-comments-section {
  padding: 16px;
}
.comment-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.comment-item:last-child { border-bottom: none; }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.comment-author {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text1);
  text-decoration: none;
}
.comment-author:hover { text-decoration: underline; }
.comment-body {
  font-size: 0.92rem;
  color: var(--text1);
  line-height: 1.4;
  word-break: break-word;
}
.reel-comment-compose { margin-top: 14px; }

/* ─── Reel in feed card (minimal) ─── */
.reel-feed-card {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.reel-feed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text3);
  padding: 3px 8px 0 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ─── Edited badge ─── */
.edited-badge {
  display: inline-block;
  font-size: 0.70rem;
  color: var(--text3);
  cursor: pointer;
  margin-top: 2px;
  margin-bottom: 2px;
  user-select: none;
  transition: color 0.15s;
}
.edited-badge:hover { color: var(--accent); }

/* ─── Original content reveal ─── */
.original-content-reveal {
  background: var(--hover, rgba(255,255,255,0.04));
  border-left: 2px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.45;
}

/* ─── Post image blur-up loading ─── */
.post-img-loader {
  position: absolute;
  inset: 0;
  background: var(--hover, rgba(128,128,128,0.15));
  border-radius: 10px;
  animation: shimmer 1.2s infinite linear;
  background-size: 200% 100%;
  background-image: linear-gradient(90deg, var(--card) 25%, var(--hover,rgba(255,255,255,0.07)) 50%, var(--card) 75%);
  z-index: 1;
}
.post-img-preview {
  transition: filter 0.3s ease, opacity 0.3s ease;
  filter: blur(6px);
  opacity: 0.7;
}
.post-img-preview:not(.loading) {
  filter: blur(0);
  opacity: 1;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}


/* ===== THEME PICKER GRID ===== */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.theme-card {
  position: relative;
  background: none;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .18s, transform .12s;
  text-align: center;
}
.theme-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.theme-card.active {
  border-color: var(--accent);
  border-width: 2px;
}
.theme-card-preview {
  width: 100%;
  aspect-ratio: 4/3;
  padding: 7px 7px 5px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tcp-bar {
  width: 100%;
  border-radius: 4px;
  border: 1px solid;
  padding: 3px 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  box-sizing: border-box;
}
.tcp-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tcp-line {
  height: 2px;
  border-radius: 2px;
  flex: 1;
}
.tcp-line.short {
  flex: 0 0 30%;
}
.tcp-post {
  border-radius: 5px;
  border: 1px solid;
  padding: 4px 5px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  box-sizing: border-box;
  flex: 1;
}
.tcp-avatar {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
}
.tcp-accent {
  height: 3px;
  border-radius: 2px;
  width: 40%;
  align-self: flex-end;
  margin-bottom: 1px;
}
.theme-card-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text2);
  padding: 5px 4px 6px;
  line-height: 1;
  letter-spacing: .01em;
}
.theme-card.active .theme-card-label {
  color: var(--accent);
}
.theme-card-check {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--btn-primary-text, #000);
  font-size: 9px;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.theme-card.active .theme-card-check {
  display: flex;
}

/* ===== EVENTS & GROUPS ===== */
#tab-content-events .post-card,
#tab-content-groups .post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

#group-detail-overlay .post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
}

/* Feeling badge in post */
.feeling-badge {
  font-size: 0.78rem;
  color: var(--text3);
}

/* Feeling picker grid */
#feeling-grid button:hover {
  background: var(--bg3) !important;
}

/* ===== SPLASH SCREEN - FB LITE STYLE ===== */
#app-splash-screen {
  position: fixed;
  inset: 0;
  background: var(--bg, #0e0e0e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
#app-splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.splash-logo-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--accent, #e8e8e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--bg, #0e0e0e);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  animation: splashBounceIn 0.5s cubic-bezier(.175,.885,.32,1.275) both;
}
.splash-logo-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text, #e8e8e8);
  letter-spacing: -0.3px;
  animation: splashFadeUp 0.45s 0.2s ease both;
}
.splash-logo-sub {
  font-size: 0.75rem;
  color: var(--text3, #888);
  animation: splashFadeUp 0.45s 0.3s ease both;
}
.splash-welcome {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent, #e8e8e8);
  margin-top: 8px;
  animation: splashFadeUp 0.45s 0.4s ease both;
}
.splash-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bg2, #161616);
  overflow: hidden;
}
.splash-progress {
  height: 100%;
  background: var(--accent, #e8e8e8);
  animation: splashProgress 1.2s ease-in-out forwards;
  border-radius: 0 3px 3px 0;
}
@keyframes splashBounceIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
@keyframes splashFadeUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes splashProgress {
  0%   { width: 0%; }
  30%  { width: 40%; }
  70%  { width: 75%; }
  100% { width: 100%; }
}

/* ===== ENHANCED GROUP CARDS ===== */
.group-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.group-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.group-card-inner {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 14px;
}
.group-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  overflow: hidden;
  position: relative;
}
.group-card-icon.default-icon {
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 60%, transparent) 100%);
}
.group-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.group-card-body {
  flex: 1;
  min-width: 0;
}
.group-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.group-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.group-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--bg3);
  color: var(--text3);
  flex-shrink: 0;
}
.group-privacy-badge svg { flex-shrink: 0; }
.group-card-desc {
  font-size: 0.8rem;
  color: var(--text3);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  margin-bottom: 4px;
}
.group-card-meta {
  font-size: 0.75rem;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 5px;
}
.group-card-action {
  flex-shrink: 0;
  align-self: center;
}
.group-join-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  background: transparent;
  color: var(--accent);
  transition: all 0.18s ease;
  white-space: nowrap;
  min-width: 60px;
  text-align: center;
}
.group-join-btn.joined {
  background: var(--accent);
  color: #fff;
}
.group-join-btn.is-admin {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border-style: dashed;
}
.group-join-btn:hover:not(.is-admin) {
  opacity: 0.85;
}

/* Group detail header */
.group-detail-header-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}
.group-detail-cover {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #000));
  overflow: hidden;
}
.group-detail-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.group-detail-info { flex: 1; min-width: 0; }
.group-detail-title { font-weight: 800; font-size: 1.1rem; margin-bottom: 3px; }
.group-detail-meta { font-size: 0.8rem; color: var(--text3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.group-detail-desc { font-size: 0.85rem; color: var(--text2); margin-top: 8px; line-height: 1.5; }
.group-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.group-action-pill {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  cursor: pointer;
  background: var(--bg2);
  color: var(--text);
  transition: all 0.15s;
  white-space: nowrap;
}
.group-action-pill.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.group-action-pill.danger { color: var(--like); border-color: var(--like); }
.group-action-pill:hover { opacity: 0.85; }

/* Members list in group detail */
.group-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.group-member-row:last-child { border-bottom: none; }
.group-member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.group-member-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.group-member-name { font-weight: 600; font-size: 0.88rem; }
.group-member-role {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
}

/* Confirm dialog */
.confirm-dialog {
  background: var(--bg1, var(--bg2));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  max-width: 340px;
  width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modalSlideUp 0.22s ease both;
}
.confirm-dialog-icon { font-size: 2.4rem; margin-bottom: 10px; }
.confirm-dialog-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 6px; }
.confirm-dialog-body { font-size: 0.86rem; color: var(--text3); line-height: 1.5; margin-bottom: 18px; }
.confirm-dialog-btns { display: flex; gap: 10px; }
.confirm-dialog-btns button { flex: 1; padding: 10px; border-radius: 10px; font-weight: 700; font-size: 0.88rem; cursor: pointer; border: none; }

/* Nav button auto-resize */
.nav-tabs { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab { white-space: nowrap; flex-shrink: 0; }
.nav-tab span { font-size: clamp(0.68rem, 1.5vw, 0.78rem); }

/* Buttons auto-resize */
.btn { white-space: nowrap; min-width: 0; }

/* ===== IMPROVED FEED POST CARDS ===== */
.post-card {
  transition: background 0.12s ease;
}

/* Feed compose bar improvements */
.compose-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: border-color 0.15s;
}
.compose-bar:hover { border-color: var(--text2); }
.compose-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}
.compose-placeholder { flex: 1; color: var(--text3); font-size: 0.9rem; }
.compose-trigger-btn {
  background: var(--accent);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
}

/* ===== GROUPS PAGE SPECIFIC ===== */
.groups-page-container { max-width: 600px; margin: 0 auto; padding: var(--nav-h) 0 80px; }
.groups-tab-bar {
  display: flex;
  gap: 6px;
  padding: 10px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  align-items: center;
  justify-content: space-between;
}
.groups-tab-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg3);
  color: var(--text3);
}
.groups-tab-pill.active {
  background: var(--accent);
  color: #fff;
}

/* ===== SEE MORE BUTTON ===== */
.see-more-btn {
  background: none; border: none; padding: 0;
  color: var(--accent); font-size: 0.93rem; font-weight: 600;
  cursor: pointer; display: inline;
}
.see-more-btn:hover { text-decoration: underline; }
.post-ellipsis { color: var(--text); }

/* Subscription modal result states */
.sub-result-success {
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.3);
  color: var(--text);
  text-align: center;
  padding: 14px;
  border-radius: 12px;
}
.sub-result-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.3);
  color: #f87171;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
