/* ==========================================================================
   DigitalSheba Social — স্টাইল (Facebook-ক্লোন ধাঁচের, মোবাইল-ফার্স্ট)
   ========================================================================== */
:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #050505;
  --text-2: #65676b;
  --line: #e4e6eb;
  --divider: #ced0d4;
  --blue: #1877f2;
  --blue-dark: #166fe5;
  --green: #42b72a;
  --green-dark: #36a420;
  --hover: #f2f2f2;
  --input-bg: #f0f2f5;
  --chip: #e4e6eb;
  --chip-hover: #d8dadf;
  --tab-active-bg: #e7f3ff;
  --danger: #e41e3f;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.22);
  --radius: 8px;
  --topbar-h: 56px;
}
[data-theme="dark"] {
  --bg: #18191a;
  --card: #242526;
  --text: #e4e6eb;
  --text-2: #b0b3b8;
  --line: #3e4042;
  --divider: #3e4042;
  --hover: #3a3b3c;
  --input-bg: #3a3b3c;
  --chip: #3a3b3c;
  --chip-hover: #4e4f50;
  --tab-active-bg: rgba(24, 119, 242, 0.22);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  /* clip: স্ক্রল-কন্টেইনার বানায় না, তাই sticky টপবার/বটম-নেভ ভাঙে না */
  overflow-x: clip;
}
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; color: var(--text); }
img { max-width: 100%; }
.hidden { display: none !important; }
.ic { display: inline-block; vertical-align: middle; flex: none; }

/* ---------- সাধারণ ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 12px;
}
.btn {
  border: none; border-radius: 6px; padding: 8px 16px;
  font-size: 15px; font-weight: 600; line-height: 1.35;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-light { background: var(--chip); color: var(--text); }
.btn-light:hover { background: var(--chip-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); }
.btn-block { width: 100%; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; padding-left: 8px; }
.linklike {
  background: none; border: none; color: var(--blue);
  font-size: inherit; font-weight: 600; padding: 0;
}
.icon-btn {
  border: none; background: var(--chip); color: var(--text);
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  position: relative;
}
.icon-btn:hover { background: var(--chip-hover); }
.loading-row { text-align: center; color: var(--text-2); padding: 18px; }
.section-title { margin: 14px 2px 10px; font-size: 18px; font-weight: 700; }

.empty-state { text-align: center; padding: 34px 16px; color: var(--text-2); }
.empty-state .empty-ico { color: var(--text-2); opacity: 0.55; margin-bottom: 8px; display: flex; justify-content: center; }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }
.empty-state.small { padding: 12px 4px; font-size: 14px; }

/* অবতার */
.avatar-img, .avatar-fallback {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none;
}
.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 18px;
}
.avatar-img-lg, .avatar-fallback-lg {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--card); background: var(--card);
}
.avatar-fallback-lg {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 64px;
}

/* ---------- টোস্ট ---------- */
#toastWrap {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  width: max-content; max-width: 92vw;
}
.toast {
  background: #242526; color: #fff; padding: 11px 18px; border-radius: 8px;
  box-shadow: var(--shadow-lg); font-size: 15px; text-align: center;
  animation: toastIn 0.18s ease-out;
}
.toast.error { background: var(--danger); }
.toast.success { background: #1d9e50; }
.toast.has-action { display: inline-flex; align-items: center; gap: 6px; }
.toast-action {
  background: none; border: none; color: #fff; font-weight: 700; font-size: 15px;
  margin-left: 8px; padding: 2px 4px; cursor: pointer; text-decoration: underline;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- সেটআপ সতর্কতা / বুট ---------- */
.setup-warn {
  background: #fff3cd; color: #664d03; text-align: center;
  padding: 10px 14px; font-size: 14px; position: sticky; top: 0; z-index: 300;
}
.boot-loader {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: var(--text-2);
}
.logo-big {
  width: 72px; height: 72px; border-radius: 18px; background: var(--blue);
  color: #fff; font-size: 44px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
}
/* v5: "DS" বুট মার্ক — মৃদু শ্বাস-নেওয়া স্কেল + গ্লো পালস */
.logo-ds {
  font-size: 30px; letter-spacing: 1px;
  animation: dsBreathe 1.6s ease-in-out infinite;
}
@keyframes dsBreathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 24px rgba(24, 119, 242, 0.28), 0 0 0 0 rgba(24, 119, 242, 0.35);
  }
  50% {
    transform: scale(1.07);
    box-shadow: 0 12px 34px rgba(24, 119, 242, 0.45), 0 0 0 16px rgba(24, 119, 242, 0);
  }
}
.boot-wordmark { font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: 0.2px; }
.boot-dots { display: flex; gap: 6px; }
.boot-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue);
  animation: dsDot 1.2s ease-in-out infinite;
}
.boot-dots span:nth-child(2) { animation-delay: 0.15s; }
.boot-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dsDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ---------- অথ (facebook.com লগড-আউট পেজের ধাঁচে) ---------- */
#authView { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--bg); }
.auth-wrap { display: flex; gap: 40px; align-items: center; max-width: 980px; width: 100%; }
.auth-brand { flex: 1; padding-bottom: 30px; }
.auth-wordmark {
  color: var(--blue); font-size: 58px; font-weight: 800; letter-spacing: -2.5px; line-height: 1;
}
.auth-tagline { color: var(--text); font-size: 28px; line-height: 1.25; margin-top: 14px; max-width: 500px; }
.auth-card {
  background: var(--card); border-radius: var(--radius); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
  padding: 18px 16px 12px; width: 396px; max-width: 100%; flex: none;
}
.auth-form input {
  width: 100%; padding: 14px 16px; font-size: 17px; font-weight: 400;
  border: 1px solid var(--divider); border-radius: 6px; background: var(--card);
  margin-bottom: 12px; display: block;
}
.auth-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px var(--tab-active-bg); }
#settingsForm label, #passwordForm label, #editProfileForm label {
  display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text);
}
#settingsForm input, #settingsForm textarea,
#passwordForm input, #editProfileForm input, #editProfileForm textarea {
  width: 100%; margin-top: 5px; padding: 10px 12px; font-size: 15px; font-weight: 400;
  border: 1px solid var(--divider); border-radius: 6px; background: var(--card);
}
#settingsForm input:focus, #settingsForm textarea:focus,
#passwordForm input:focus, #editProfileForm input:focus, #editProfileForm textarea:focus {
  outline: 2px solid var(--blue); border-color: transparent;
}
.hint { display: block; color: var(--text-2); font-weight: 400; margin: -6px 0 10px; font-size: 13px; }
.btn-login {
  width: 100%; background: var(--blue); color: #fff; border: none; border-radius: 6px;
  font-size: 20px; font-weight: 700; padding: 12px 16px; line-height: 1.4;
}
.btn-login:hover { background: var(--blue-dark); }
.btn-login:disabled { opacity: 0.55; cursor: wait; }
.forgot-link {
  display: block; margin: 14px auto 2px; background: none; border: none;
  color: var(--blue); font-size: 14px; font-weight: 500; text-align: center;
}
.forgot-link:hover { text-decoration: underline; }
.auth-divider { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.btn-create {
  display: block; margin: 0 auto 8px; background: var(--green); color: #fff; border: none;
  border-radius: 6px; font-size: 17px; font-weight: 700; padding: 0 18px; height: 48px; line-height: 48px;
}
.btn-create:hover { background: var(--green-dark); }
.auth-msg { margin-top: 10px; font-size: 14px; text-align: center; min-height: 20px; }
.auth-msg.error { color: var(--danger); }
.auth-msg.ok { color: #1d9e50; }
.auth-foot { margin-top: 10px; text-align: center; color: var(--text-2); font-size: 14px; }

/* ---------- টপবার ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100; height: var(--topbar-h);
  background: var(--card); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; gap: 8px;
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wordmark {
  background: none; border: none; flex: none; padding: 0 2px;
  color: var(--blue); font-size: 28px; font-weight: 800; letter-spacing: -1.4px; line-height: 1;
}
.search-box {
  display: flex; align-items: center; gap: 7px; background: var(--input-bg);
  border-radius: 999px; padding: 9px 12px; min-width: 0; color: var(--text-2);
}
.search-box input { border: none; background: transparent; outline: none; font-size: 15px; width: 190px; color: var(--text); }
.search-box.wide { flex: 1; }
.search-box.wide input { width: 100%; }
.search-ico { display: inline-flex; flex: none; }
.topbar-center { display: flex; gap: 4px; }
.nav-ico {
  border: none; background: transparent; color: var(--text-2);
  min-width: 110px; height: 48px; border-radius: 8px; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-ico:hover { background: var(--hover); }
.nav-ico.active { color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); border-radius: 0; }
.nav-ico.active:hover { background: transparent; }
.badge-wrap { position: relative; }
.badge {
  position: absolute; top: 3px; right: calc(50% - 24px); background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 19px; height: 19px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.mobile-actions { display: none; align-items: center; gap: 8px; }
.mobile-actions .badge { top: -3px; right: -3px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.me-chip {
  display: flex; align-items: center; gap: 8px; border: none; background: transparent;
  padding: 4px 10px 4px 4px; border-radius: 999px; color: var(--text);
}
.me-chip:hover { background: var(--hover); }
.me-chip .avatar-img, .me-chip .avatar-fallback { width: 36px; height: 36px; font-size: 16px; }
.me-name { font-weight: 600; font-size: 15px; }

/* ---------- মোবাইল বটম নেভ ---------- */
.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  height: 56px; background: var(--card); border-top: 1px solid var(--line);
}
.bn-item {
  flex: 1; border: none; background: none; color: var(--text-2); position: relative;
  display: flex; align-items: center; justify-content: center; height: 100%;
}
.bn-item.active { color: var(--blue); box-shadow: inset 0 3px 0 var(--blue); }
.bn-item .badge { top: 5px; right: calc(50% - 23px); }
.bn-item .avatar-img, .bn-item .avatar-fallback { width: 28px; height: 28px; font-size: 13px; }
.bn-item.active .avatar-img, .bn-item.active .avatar-fallback { box-shadow: 0 0 0 2px var(--blue); }

/* ---------- লেআউট ---------- */
.layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 20px; max-width: 1240px; margin: 0 auto; padding: 16px 12px 40px;
  align-items: start;
}
.col-left, .col-right { position: sticky; top: calc(var(--topbar-h) + 16px); }
.col-center { max-width: 590px; width: 100%; margin: 0 auto; min-width: 0; }
.side-link {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: none; background: transparent; color: var(--text);
  padding: 7px 8px; border-radius: 8px; font-size: 15px; font-weight: 500;
}
.side-link:hover { background: var(--card); }
.side-link.active { background: var(--card); }
.side-ico {
  width: 36px; height: 36px; flex: none; display: inline-flex;
  align-items: center; justify-content: center; color: var(--text);
}
.side-link .avatar-img, .side-link .avatar-fallback { width: 36px; height: 36px; font-size: 16px; }
.side-foot { color: var(--text-2); font-size: 13px; margin-top: 14px; padding: 0 8px; }
.contacts-title { font-size: 17px; color: var(--text-2); margin-bottom: 8px; padding: 0 4px; }
.contact-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: transparent; color: var(--text);
  padding: 7px 6px; border-radius: 8px; font-size: 15px; font-weight: 500;
}
.contact-row:hover { background: var(--card); }
.contact-row .avatar-img, .contact-row .avatar-fallback { width: 36px; height: 36px; font-size: 15px; }

/* ---------- কম্পোজার এন্ট্রি (ফিডের পিল; পুরো কম্পোজার #page-composer-এ) ---------- */
.composer-entry { display: flex; align-items: center; gap: 10px; padding: 12px; }
/* v5.2 audit fix (overnight 01:45): .composer-top wraps avatar+pill inside the
   flex .composer-entry, so it must itself be flex — otherwise .composer-pill's
   flex:1 does nothing and the pill shrinks to its text width. */
.composer-top { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.composer-entry .avatar-img, .composer-entry .avatar-fallback { flex: none; cursor: pointer; }
.composer-pill {
  flex: 1; min-width: 0; text-align: left; border: none; cursor: pointer;
  background: var(--input-bg); color: var(--text-2);
  border-radius: 999px; padding: 11px 16px; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.composer-pill:hover { background: var(--hover); }
.mini-x {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: none;
  border-radius: 50%; background: rgba(0,0,0,0.65); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- পোস্ট কার্ড ---------- */
.post-card { padding: 0; overflow: hidden; }
.post-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 0; }
.post-author { border: none; background: none; display: flex; align-items: center; gap: 10px; text-align: left; color: var(--text); padding: 0; min-width: 0; }
.post-author-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.post-sub { color: var(--text-2); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.post-menu { margin-left: auto; position: relative; }
.post-menu-btn {
  border: none; background: none; color: var(--text-2); width: 36px; height: 36px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
}
.post-menu-btn:hover { background: var(--hover); }
.post-menu-list {
  position: absolute; right: 0; top: 40px; background: var(--card); border-radius: 8px;
  box-shadow: var(--shadow-lg); min-width: 190px; z-index: 20; overflow: hidden; padding: 6px;
}
.post-menu-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: none; background: none; padding: 9px 10px; border-radius: 6px;
  font-size: 15px; font-weight: 500; color: var(--text);
}
.post-menu-list button:hover { background: var(--hover); }
.post-menu-list button.danger { color: var(--danger); }
.post-content { padding: 8px 12px 12px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.post-image { width: 100%; max-height: 560px; object-fit: cover; display: block; }
.post-stats {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; color: var(--text-2); font-size: 14px; min-height: 20px;
}
.like-badge {
  width: 18px; height: 18px; border-radius: 50%; background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: -4px; margin-right: 5px;
}
.like-stat { display: inline-flex; align-items: center; }
.post-actions { display: flex; border-top: 1px solid var(--line); margin: 0 12px; padding: 4px 0; }
.post-action {
  flex: 1; border: none; background: none; color: var(--text-2); font-weight: 600;
  font-size: 14px; padding: 7px 4px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.post-action:hover { background: var(--hover); }
.post-action.liked { color: var(--blue); }
.post-action.saved { color: var(--blue); }
.comments-area { padding: 4px 12px 12px; }
.comment-row { display: flex; gap: 8px; margin-top: 10px; align-items: flex-start; }
.comment-row .avatar-img, .comment-row .avatar-fallback { width: 32px; height: 32px; font-size: 14px; }
.comment-bubble { background: var(--input-bg); border-radius: 12px; padding: 7px 12px; flex: 1; min-width: 0; }
.comment-bubble .c-name { font-weight: 600; font-size: 13px; }
.comment-bubble .c-text { font-size: 15px; word-break: break-word; }
.comment-meta { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.comment-del { border: none; background: none; color: var(--text-2); font-size: 12px; font-weight: 600; padding: 0; }
.comment-del:hover { color: var(--danger); text-decoration: underline; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.comment-form .avatar-img, .comment-form .avatar-fallback { width: 32px; height: 32px; font-size: 14px; }
.comment-form input, .comment-form textarea {
  flex: 1; border: none; background: var(--input-bg); border-radius: 999px;
  padding: 9px 14px; font-size: 15px; outline: none; min-width: 0;
  resize: none; font-family: inherit; color: var(--text); line-height: 1.35;
  max-height: 110px; overflow-y: auto;
}

/* ---------- প্রোফাইল ---------- */
.profile-card { padding: 0; overflow: hidden; }
.cover-wrap { position: relative; height: 210px; background: linear-gradient(120deg, #1877f2, #6ab0ff); }
.cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-fallback { width: 100%; height: 100%; }
.profile-head { padding: 0 16px 14px; text-align: center; }
.profile-avatar-wrap { margin: -84px auto 0; position: relative; width: max-content; }
.profile-meta h2 { font-size: 28px; font-weight: 800; margin-top: 10px; line-height: 1.2; }
.profile-meta .username { color: var(--text-2); font-size: 15px; margin-top: 2px; }
.profile-meta .counts { color: var(--text-2); margin-top: 8px; font-size: 15px; }
.profile-meta .counts b { color: var(--text); }
.profile-meta .bio { margin: 10px auto 0; font-size: 15px; white-space: pre-wrap; max-width: 480px; line-height: 1.4; }
.profile-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
.profile-actions .btn { padding: 8px 20px; }
#editProfileBtn { flex: 1; max-width: 420px; }
.profile-tabs {
  display: flex; gap: 2px; border-top: 1px solid var(--line);
  margin: 0 12px; padding: 4px 0 8px;
}
.ptab {
  border: none; background: var(--input-bg); color: var(--text);
  padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
}
.ptab:hover { background: var(--chip); }
.ptab.active { background: var(--tab-active-bg); color: var(--blue); }

/* বন্ধু স্ট্রিপ */
.strip-head { display: flex; justify-content: space-between; align-items: flex-start; }
.strip-head .section-title { margin: 0 0 2px; }
.strip-count { color: var(--text-2); font-size: 14px; margin-bottom: 8px; }
.strip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.strip-item {
  border: none; background: none; padding: 0; text-align: left; color: var(--text);
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.strip-item .avatar-img, .strip-item .avatar-fallback {
  width: 100%; height: 92px; border-radius: 8px; font-size: 36px; object-fit: cover;
}
.strip-item span.strip-name { font-size: 13px; font-weight: 600; line-height: 1.25; word-break: break-word; }

/* ---------- মানুষ / নোটিফিকেশন ---------- */
.people-head h3 { margin-bottom: 10px; }
.person-row {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-bottom: 10px;
}
.person-row .avatar-img, .person-row .avatar-fallback { width: 52px; height: 52px; font-size: 22px; }
.person-info { flex: 1; min-width: 0; border: none; background: none; text-align: left; color: var(--text); padding: 0; }
.person-info .p-name { font-weight: 600; font-size: 16px; }
.person-info .p-user { color: var(--text-2); font-size: 14px; }
.person-info .p-bio { color: var(--text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-actions { display: flex; gap: 6px; flex: none; align-items: center; }

.notif-head { display: flex; justify-content: space-between; align-items: center; }
.notif-row {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  background: var(--card); border: none; border-bottom: 1px solid var(--line);
  padding: 12px; color: var(--text); font-size: 15px; cursor: pointer;
}
.notif-row:first-of-type { border-radius: var(--radius) var(--radius) 0 0; }
.notif-row .avatar-img, .notif-row .avatar-fallback { width: 48px; height: 48px; font-size: 20px; }
.notif-row.unread { background: rgba(24, 119, 242, 0.09); }
.notif-text { flex: 1; }
.notif-time { color: var(--text-2); font-size: 13px; }
#notifList { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 14px; }

/* ---------- চ্যাট (Messenger ধাঁচে) ---------- */
.chat-shell { padding: 0; overflow: hidden; display: flex; min-height: 480px; }
.chat-list-col { width: 300px; flex: none; border-right: 1px solid var(--line); padding: 12px; overflow-y: auto; max-height: 72vh; }
.chat-list-title { padding: 2px 4px 10px; }
.conv-row {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  border: none; background: none; color: var(--text); padding: 9px 8px; border-radius: 8px;
}
.conv-row:hover, .conv-row.active { background: var(--hover); }
.conv-row .avatar-img, .conv-row .avatar-fallback { width: 48px; height: 48px; font-size: 20px; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 600; font-size: 15px; }
.conv-last { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last.unread { color: var(--text); font-weight: 700; }
.conv-badge {
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 19px; height: 19px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 5px; flex: none;
}
.chat-window-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.chat-head .avatar-img, .chat-head .avatar-fallback { width: 40px; height: 40px; }
.chat-peer-name { font-weight: 600; font-size: 16px; }
.chat-peer-user { color: var(--text-2); font-size: 13px; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 3px;
  min-height: 300px; background: var(--card);
}
.msg-row { display: flex; align-items: flex-end; gap: 6px; }
.msg-row.mine { justify-content: flex-end; }
.msg-row .avatar-img, .msg-row .avatar-fallback { width: 28px; height: 28px; font-size: 12px; }
.msg-bubble {
  max-width: 72%; padding: 7px 12px; border-radius: 18px; font-size: 15px; line-height: 1.35;
  background: var(--chip); color: var(--text); word-break: break-word; white-space: pre-wrap;
}
.msg-row.mine .msg-bubble { background: var(--blue); color: #fff; }
.msg-time { font-size: 11px; opacity: 0.75; margin-top: 3px; text-align: right; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: center; }
.chat-form input {
  flex: 1; border: none; background: var(--input-bg); border-radius: 999px;
  padding: 10px 16px; font-size: 15px; outline: none; min-width: 0;
}
.chat-send { background: var(--blue); color: #fff; }
.chat-send:hover { background: var(--blue-dark); }
.chat-placeholder {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-2); gap: 6px; padding: 20px; text-align: center;
}

/* ---------- সেটিংস / মোডাল ---------- */
.settings-card h3 { margin-bottom: 14px; }
.settings-card hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; gap: 10px; }
.settings-row.row-link, .settings-row.row-toggle { cursor: pointer; border-radius: 8px; margin: 0 -8px; padding: 10px 8px; }
.settings-row.row-link:hover, .settings-row.row-toggle:hover { background: var(--hover); }
.set-chevron { color: var(--text-2); display: inline-flex; flex: none; }
.settings-row.row-danger .set-label { color: #e41e3f; font-weight: 600; }
.settings-row.row-danger .set-ico { color: #e41e3f; }
.empty-note { padding: 28px 16px; text-align: center; color: var(--text-2); font-size: 14.5px; }
.reels-list .empty-note { color: #fff; }
#reelsLoading { position: absolute; inset: 0; z-index: 6; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
#reelsEmpty { position: absolute; inset: 0; z-index: 6; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
#reelsEmpty p { color: rgba(255, 255, 255, 0.75); }
.set-label { display: inline-flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 500; min-width: 0; }
.set-ico {
  width: 36px; height: 36px; border-radius: 50%; background: var(--input-bg); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 150;
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.modal-card { background: var(--card); border-radius: 12px; padding: 18px; width: 440px; max-width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- v2: ভেরিফায়েড ব্যাজ / অনলাইন / ট্যাব / মেনু ইত্যাদি ---------- */
.verified-badge {
  width: 0.95em; height: 0.95em; vertical-align: -0.12em; margin-left: 3px; flex: none;
}
.avatar-wrap { position: relative; display: inline-flex; flex: none; }
.online-dot {
  position: absolute; right: 0; bottom: 0; width: 12px; height: 12px;
  border-radius: 50%; background: #31a24c; border: 2px solid var(--card);
}
.profile-meta h2 .verified-badge { width: 22px; height: 22px; vertical-align: -2px; }

/* নোট বাবল (প্রোফাইল) */
.note-bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-38%); z-index: 5;
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 6px 12px; border-radius: 14px;
  font-size: 13px; max-width: 210px; width: max-content; line-height: 1.35; text-align: left;
}
.note-bubble::after {
  content: ""; position: absolute; top: 100%; left: 40%;
  border: 6px solid transparent; border-top-color: var(--card);
}

/* পরিচিতি কার্ড (At a glance) */
.intro-card .section-title { margin-top: 0; }
.intro-row { display: flex; gap: 11px; align-items: center; padding: 6px 0; font-size: 15px; color: var(--text); }
.intro-ico { color: var(--text-2); display: inline-flex; flex: none; }
.intro-row a { color: var(--blue); word-break: break-all; }

/* মানুষ পেজের ট্যাব (FB চিপস) */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab-btn {
  border: none; background: var(--chip); color: var(--text);
  padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab-btn:hover { background: var(--chip-hover); }
.tab-btn.active { background: var(--tab-active-bg); color: var(--blue); }
.tab-btn .badge { position: static; }
.online-chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--card);
  box-shadow: var(--shadow); border-radius: 999px; padding: 6px 13px;
  font-size: 14px; font-weight: 600; margin-bottom: 12px;
}
.online-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: #31a24c; }
.req-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }

/* মেনু পেজ (FB মেনুর ধাঁচে — ধূসর বৃত্তে আইকন) */
.menu-head { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.menu-head .avatar-img, .menu-head .avatar-fallback { width: 52px; height: 52px; font-size: 22px; }
.menu-head-info { min-width: 0; }
.menu-head-name { font-weight: 700; font-size: 19px; }
.menu-head-user { color: var(--text-2); font-size: 14px; }
.menu-list { padding: 0; overflow: hidden; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: none; background: none; color: var(--text); font-size: 16px; font-weight: 500;
  padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--hover); }
.menu-ico {
  width: 40px; height: 40px; border-radius: 50%; background: var(--input-bg); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}

/* সাহায্য / আইনি */
.faq-item { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq-item:last-of-type { border-bottom: none; }
.faq-item summary { font-weight: 600; font-size: 16px; cursor: pointer; }
.faq-item p { margin-top: 8px; color: var(--text-2); line-height: 1.65; font-size: 15px; }
.help-actions { margin-top: 16px; }
.help-actions .btn { text-decoration: none; }
.about-text { color: var(--text-2); line-height: 1.7; font-size: 15px; margin-top: 6px; }
.legal-prose { margin-top: 10px; }
.legal-prose p { margin-bottom: 12px; line-height: 1.75; font-size: 15px; }
.legal-prose h4 { margin: 16px 0 6px; font-size: 16px; }

/* সেটিংস সুইচ */
.switch { position: relative; width: 48px; height: 26px; flex: none; display: inline-block; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track {
  position: absolute; inset: 0; background: var(--line); border-radius: 999px;
  transition: background 0.2s; pointer-events: none;
}
.switch .track::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: transform 0.2s; box-shadow: var(--shadow);
}
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(22px); }
.settings-email { color: var(--text-2); font-size: 14px; word-break: break-all; text-align: right; }

/* অ্যাকাউন্ট সেন্টার */
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.account-head .avatar-img, .account-head .avatar-fallback { width: 64px; height: 64px; font-size: 27px; }
.account-name { font-weight: 700; font-size: 21px; }
.account-user { color: var(--text-2); font-size: 15px; }
.info-rows { border-top: 1px solid var(--line); }
.info-row {
  display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: 15px; align-items: baseline;
}
.info-row:last-child { border-bottom: none; }
.info-label { flex: none; width: 132px; color: var(--text-2); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.info-value { flex: 1; min-width: 0; word-break: break-word; }
.info-value a { color: var(--blue); }
.account-actions { margin-top: 14px }

/* মিডিয়া গ্যালারি */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gallery-item {
  border: none; padding: 0; background: var(--input-bg); border-radius: 4px;
  overflow: hidden; aspect-ratio: 1 / 1; cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item:hover img { opacity: 0.88; }
#page-settings .search-box.wide { margin-top: 2px; }

/* ---------- v3: রিঅ্যাকশন (v4.1: পিকার/কাউন্টে আসল ইমোজি গ্লিফ) ---------- */
.reaction-ic { display: inline-block; vertical-align: middle; flex: none; }
.reaction-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; vertical-align: middle; flex: none; font-style: normal;
}
.reaction-picker {
  position: fixed; z-index: 190; background: var(--card); border-radius: 999px;
  box-shadow: var(--shadow-lg); padding: 6px 8px; display: flex; gap: 2px;
  animation: toastIn 0.15s ease-out;
}
.reaction-pick {
  border: none; background: none; padding: 2px; border-radius: 50%; line-height: 0;
  transition: transform 0.12s ease;
}
.reaction-pick .reaction-emoji { width: 38px; height: 38px; }
.reaction-pick:hover, .reaction-pick:active { transform: scale(1.32) translateY(-3px); }
.react-stat {
  border: none; background: none; padding: 0; color: var(--text-2); font-size: 14px;
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
}
.react-stat:hover .react-total { text-decoration: underline; }
.react-icons { display: inline-flex; align-items: center; }
.react-icons .reaction-emoji {
  width: 21px; height: 21px; border: 2px solid var(--card); border-radius: 50%;
  background: var(--card); margin-left: -5px;
}
.react-icons .reaction-emoji:first-child { margin-left: 0; }
.post-counts { color: var(--text-2); font-size: 14px; }
.post-action.reacted { font-weight: 700; }
/* v5.2 audit fix (overnight 01:45): reactors rows need flex so the emoji is
   pushed right (margin-left:auto) and name/@username stack like .person-info. */
.reactor-row { width: 100%; border: none; font: inherit; cursor: pointer; box-shadow: none; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.menu-user-meta { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.menu-user-meta small { color: var(--text-2); font-size: 13px; }
.reactor-emoji { margin-left: auto; display: inline-flex; align-items: center; }

/* ---------- v3: কমেন্ট রিঅ্যাকশন / রিপ্লাই / এডিট ---------- */
.comment-main { flex: 1; min-width: 0; }
.comment-bubble-wrap { position: relative; }
.comment-bubble { flex: none; }
.c-react-badge {
  position: absolute; right: 4px; bottom: -10px; z-index: 2;
  background: var(--card); border: none; box-shadow: var(--shadow); border-radius: 999px;
  padding: 1px 7px 1px 2px; display: inline-flex; align-items: center; gap: 1px;
  font-size: 12px; color: var(--text-2); cursor: pointer; line-height: 1.5;
}
.c-react-badge .reaction-emoji {
  width: 19px; height: 19px; border-radius: 50%; background: var(--card); margin-left: -4px;
}
.c-react-badge .reaction-emoji:first-child { margin-left: 0; }
.comment-actions {
  display: flex; gap: 13px; align-items: center; margin: 4px 0 0 12px;
  font-size: 12px; color: var(--text-2); flex-wrap: wrap;
}
.c-act-btn {
  border: none; background: none; font-weight: 700; font-size: 12px; color: var(--text-2);
  padding: 0; display: inline-flex; gap: 4px; align-items: center; cursor: pointer;
}
.c-act-btn:hover { text-decoration: underline; }
.comment-menu { position: relative; margin-left: auto; flex: none; }
.comment-menu-btn {
  border: none; background: none; color: var(--text-2); width: 28px; height: 28px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
}
.comment-menu-btn:hover { background: var(--hover); }
.comment-replies { margin-top: 2px; }
.comment-row.reply { margin-top: 8px; }
.comment-row.reply .avatar-img, .comment-row.reply .avatar-fallback { width: 28px; height: 28px; font-size: 12px; }
.reply-chip {
  display: flex; align-items: center; gap: 8px; width: 100%;
  font-size: 13px; color: var(--text-2); padding: 0 2px 8px;
}
.reply-chip b { color: var(--text); }
.reply-chip button {
  border: none; background: var(--chip); color: var(--text); border-radius: 999px;
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.comment-edit-input {
  width: 100%; border: 1px solid var(--divider); border-radius: 8px; background: var(--card);
  padding: 8px 10px; font-size: 15px; resize: vertical; min-height: 54px; font-family: inherit; color: var(--text);
}
.comment-edit-actions { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.comment-edit-actions .btn { padding: 5px 12px; font-size: 13px; }

/* ---------- v3: পোস্ট অডিয়েন্স / শেয়ার এম্বেড ---------- */
.composer-left { display: inline-flex; align-items: center; gap: 6px; }
.audience-select {
  border: none; background: var(--input-bg); border-radius: 999px;
  padding: 8px 10px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
}
.shared-embed {
  border: 1px solid var(--line); border-radius: 8px; margin: 0 12px 12px; overflow: hidden;
}
.shared-embed-head {
  display: flex; gap: 10px; padding: 10px 12px 0; align-items: center;
  background: none; border: none; width: 100%; text-align: left; color: var(--text); cursor: pointer;
}
.shared-embed .post-content { padding: 6px 12px 10px; }
.shared-embed .post-image { max-height: 380px; cursor: pointer; }
.shared-embed-stats {
  padding: 0 12px 10px; color: var(--text-2); font-size: 13px;
  display: flex; gap: 6px; align-items: center;
}
.shared-embed.unavailable {
  padding: 16px 12px; color: var(--text-2); font-style: italic; text-align: center;
}
.share-preview .shared-embed { margin: 0; }
.post-image { cursor: pointer; }
.edited-mark { font-style: normal; }

/* ---------- v3: মোডাল ফর্ম / রিপোর্ট ---------- */
.modal-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.modal-form input[type="text"], .modal-form textarea, .modal-form select {
  width: 100%; margin-top: 5px; padding: 10px 12px; font-size: 15px; font-weight: 400;
  border: 1px solid var(--divider); border-radius: 6px; background: var(--card);
  color: var(--text); font-family: inherit;
}
.modal-form textarea { resize: vertical; }
.report-reasons { margin: 6px 0 4px; }
.report-reason {
  display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important;
  padding: 9px 10px; border-radius: 6px; cursor: pointer; margin-bottom: 2px !important;
}
.report-reason:hover { background: var(--hover); }
.report-reason input { width: 18px; height: 18px; accent-color: var(--blue); flex: none; }

/* ---------- v3: অথ — সিলেক্ট / যাচাই ফর্ম ---------- */
.auth-form select {
  width: 100%; padding: 14px 16px; font-size: 17px; font-weight: 400;
  border: 1px solid var(--divider); border-radius: 6px; background: var(--card);
  margin-bottom: 12px; display: block; color: var(--text); font-family: inherit;
}
.auth-label { display: block; font-size: 14px; font-weight: 600; margin: 2px 0 6px; color: var(--text); text-align: left; }
.verify-text { font-size: 15px; line-height: 1.5; margin-bottom: 14px; text-align: center; color: var(--text); }
#verifyCode { text-align: center; letter-spacing: 6px; font-size: 20px; font-weight: 700; }
#editProfileForm select {
  width: 100%; margin-top: 5px; padding: 10px 12px; font-size: 15px; font-weight: 400;
  border: 1px solid var(--divider); border-radius: 6px; background: var(--card); color: var(--text); font-family: inherit;
}

/* ---------- v3: স্টোরি (v4.1: FB-ধাঁচের পোর্ট্রেট কার্ড) ---------- */
.stories-row {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
  padding: 2px 2px 2px; margin-bottom: 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.stories-row::-webkit-scrollbar { display: none; }
.story-card {
  flex: none; width: 104px; height: 176px; border-radius: 12px; overflow: hidden;
  position: relative; border: none; padding: 0; cursor: pointer;
  background: var(--input-bg); box-shadow: var(--shadow);
  font: inherit; text-align: left; -webkit-tap-highlight-color: transparent;
}
@media (min-width: 761px) {
  .story-card { width: 112px; height: 200px; }
}
.story-card-cover {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.story-card.viewed .story-card-cover { filter: brightness(0.68); }
.story-card-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.story-card-avatar {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  box-shadow: 0 0 0 3px var(--blue);
  overflow: hidden; display: block;
}
.story-card.viewed .story-card-avatar { box-shadow: 0 0 0 3px var(--divider); }
.story-card-avatar .avatar-img, .story-card-avatar .avatar-fallback {
  width: 36px; height: 36px; font-size: 15px; display: block;
}
.story-card-name {
  position: absolute; left: 8px; right: 8px; bottom: 7px; z-index: 2;
  color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
/* নিজের কার্ড: উপরে ছবি (~75%), নিচে সাদা অংশে + বাটন ও লেবেল */
.story-card-create { background: var(--card); display: flex; flex-direction: column; }
.story-create-photo { position: relative; height: 75%; flex: none; overflow: hidden; display: block; }
.story-create-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-create-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; font-size: 46px; font-weight: 700;
}
.story-create-bottom {
  position: relative; flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; padding-bottom: 9px;
}
.story-add-badge {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: #fff; border: 3.5px solid var(--card);
  display: inline-flex; align-items: center; justify-content: center; z-index: 2;
}
.story-create-label {
  font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.2;
  max-width: 100%; padding: 0 4px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.story-viewer {
  position: fixed; inset: 0; z-index: 180; background: rgba(0, 0, 0, 0.96);
  display: flex; align-items: center; justify-content: center;
}
.story-img { max-width: 100%; max-height: 100vh; object-fit: contain; }
.story-segments {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3;
  display: flex; gap: 4px;
}
.story-segment { flex: 1; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.story-segment .fill { display: block; height: 100%; width: 0; background: #fff; border-radius: 99px; }
.story-segment.done .fill { width: 100%; }
.story-segment.active .fill { animation: storyFill 5s linear forwards; }
@keyframes storyFill { from { width: 0; } to { width: 100%; } }
.story-top {
  position: absolute; top: 22px; left: 12px; right: 12px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.story-author { display: inline-flex; align-items: center; gap: 9px; color: #fff; font-weight: 600; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.story-author .avatar-img, .story-author .avatar-fallback { width: 36px; height: 36px; font-size: 15px; }
.story-author .story-time { font-weight: 400; font-size: 13px; opacity: 0.85; }
.story-close {
  border: none; background: rgba(255,255,255,0.16); color: #fff; width: 38px; height: 38px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.story-nav { position: absolute; top: 0; bottom: 0; width: 34%; border: none; background: none; z-index: 2; cursor: pointer; }
.story-nav.prev { left: 0; }
.story-nav.next { right: 0; }
.story-foot {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: 14px; color: #fff; font-size: 14px;
}
.story-foot .btn { box-shadow: var(--shadow-lg); }

/* ---------- v3: লাইটবক্স ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 175; background: rgba(0, 0, 0, 0.94);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox img { max-width: 96vw; max-height: 94vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  border: none; background: rgba(255,255,255,0.16); color: #fff; width: 42px; height: 42px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox-download {
  position: absolute; top: 14px; right: 66px; z-index: 2;
  border: none; background: rgba(255,255,255,0.16); color: #fff; width: 42px; height: 42px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.lightbox-close:hover, .lightbox-download:hover { background: rgba(255,255,255,0.32); }

/* ---------- v3: প্রোফাইল ক্যামেরা বাটন ---------- */
.cam-btn {
  position: absolute; width: 38px; height: 38px; border-radius: 50%;
  background: var(--chip); border: 2px solid var(--card); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; z-index: 4; cursor: pointer;
}
.cam-btn:hover { background: var(--chip-hover); }
.cover-cam { right: 12px; bottom: 12px; }
.avatar-cam { right: 0; bottom: 8px; }

/* ---------- v3: চ্যাট ছবি / মেসেজ মোছা ---------- */
.chat-attach { background: transparent; color: var(--blue); cursor: pointer; }
.chat-attach:hover { background: var(--hover); }
.msg-image { max-width: 220px; width: 100%; border-radius: 12px; display: block; cursor: pointer; margin-bottom: 2px; }
.msg-menu { position: relative; align-self: center; flex: none; }
.msg-menu-btn {
  border: none; background: none; color: var(--text-2); width: 26px; height: 26px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.msg-row:hover .msg-menu-btn, .msg-menu-btn:focus { opacity: 1; }
.msg-menu .post-menu-list { top: 30px; right: 0; min-width: 150px; }
.msg-row.mine .msg-menu .post-menu-list { right: 0; left: auto; }

/* ---------- চ্যাট রিপ্লাই (quoted reply) ---------- */
.msg-quote { border-left: 3px solid var(--blue); background: rgba(0,0,0,.07); border-radius: 8px; padding: 5px 9px; margin-bottom: 5px; font-size: 12.5px; line-height: 1.3; }
.msg-row.mine .msg-quote { background: rgba(255,255,255,.22); border-left-color: rgba(255,255,255,.75); }
.msg-quote-author { display: block; font-weight: 700; color: var(--blue); font-size: 12px; }
.msg-row.mine .msg-quote-author { color: #fff; }
.msg-quote-text { display: block; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.chat-reply-bar { display: flex; align-items: center; gap: 8px; background: var(--card); border-top: 1px solid var(--line); padding: 8px 12px; }
.chat-reply-bar .reply-bar-ico { color: var(--blue); flex: none; display: inline-flex; }
.reply-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reply-bar-text b { color: var(--blue); font-size: 13px; }
.reply-bar-text span { font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- পোল ---------- */
.poll-block { padding: 2px 12px 10px; }
.poll-opt { position: relative; display: block; width: 100%; text-align: left; overflow: hidden;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 14.5px; font-weight: 600; padding: 9px 12px; border-radius: 8px; cursor: pointer; margin-top: 6px; }
.poll-opt:hover { background: var(--hover); }
.poll-opt.voted { border-color: var(--blue); }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--tab-active-bg); }
.poll-label { position: relative; }
.poll-pct { position: relative; float: right; color: var(--text-2); }
.poll-total { font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
/* কম্পোজারে পোল এডিটর */
.nc-poll-row { margin-top: 10px; background: var(--input-bg); border-radius: 10px; padding: 10px 12px; }
.nc-poll-head { display: flex; align-items: center; justify-content: space-between; }
.nc-poll-title { font-weight: 700; font-size: 14px; }
.nc-poll-line { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.nc-poll-opt { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--card);
  border-radius: 8px; padding: 8px 10px; font-size: 14.5px; color: var(--text); font-family: inherit; outline: none; }
#ncPollAddOpt { margin-top: 8px; }

/* ---------- গ্রুপ ---------- */
.group-row { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
  margin-bottom: 8px; cursor: pointer; color: var(--text); font-family: inherit; }
.group-row:hover { background: var(--hover); }
.group-row-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--input-bg);
  color: var(--blue); display: inline-flex; align-items: center; justify-content: center; }
.group-row-meta { flex: 1; min-width: 0; }
.group-row-name { font-weight: 700; font-size: 15px; }
.group-row-desc { font-size: 13.5px; color: var(--text-2); }
.group-row-count { font-size: 12.5px; color: var(--text-2); }
.group-head-card { margin-bottom: 12px; }
.group-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.group-head-top h3 { margin: 0 0 4px; }
.member-row { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  margin-bottom: 6px; cursor: pointer; color: var(--text); font-family: inherit; }
.member-row-wrap { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.member-row-wrap .member-row { flex: 1; width: auto; min-width: 0; margin-bottom: 0; }
.member-row-wrap .btn { flex-shrink: 0; }
.member-row:hover { background: var(--hover); }
.member-row-meta { text-align: left; }
.member-row-sub { font-size: 12.5px; color: var(--text-2); }
.group-link { color: var(--blue); font-weight: 600; cursor: pointer; }
.about-head { display: flex; align-items: center; justify-content: space-between; }
.about-head .section-title { margin-bottom: 0; }
#groupCreateForm label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
#groupCreateForm input, #groupCreateForm textarea { width: 100%; margin-top: 5px; padding: 10px 12px;
  font-size: 15px; font-weight: 400; border: 1px solid var(--divider); border-radius: 6px; background: var(--card); }
#groupCreateForm input:focus, #groupCreateForm textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
#groupCreateForm textarea { resize: vertical; }

/* ---------- v3: সার্চে পোস্ট ফলাফল ---------- */
.search-section-title { margin: 18px 2px 10px; font-size: 17px; font-weight: 700; }

/* ---------- রেসপন্সিভ ---------- */
@media (max-width: 760px) {
  .msg-menu-btn { opacity: 0.75; }
  .story-img { max-height: 88vh; }
}
@media (max-width: 1100px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr); }
  .col-right { display: none; }
  .nav-ico { min-width: 84px; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 10px 8px 76px; }
  .col-left { display: none; }
  .col-center { max-width: 100%; }
  /* মোবাইল টপবার: ওয়ার্ডমার্ক + গোল অ্যাকশন বাটন (FB অ্যাপ হেডার) */
  .topbar { padding: 0 10px; gap: 6px; }
  .wordmark { font-size: 23px; letter-spacing: -1px; }
  .search-box { display: none; }
  .topbar-center { display: none; }
  .topbar-right { display: none; }
  .mobile-actions { display: flex; }
  .mobile-actions .icon-btn { width: 38px; height: 38px; }
  .bottom-nav { display: flex; }
  #toastWrap { bottom: 70px; }
  /* অথ: এক কলাম, ওয়ার্ডমার্ক মাঝখানে */
  .auth-wrap { flex-direction: column; gap: 20px; align-items: stretch; }
  .auth-brand { text-align: center; padding-bottom: 0; }
  .auth-wordmark { font-size: 42px; letter-spacing: -1.8px; }
  .auth-tagline { font-size: 19px; margin-left: auto; margin-right: auto; }
  .auth-card { width: 100%; }
  .cover-wrap { height: 160px; }
  .avatar-img-lg, .avatar-fallback-lg { width: 132px; height: 132px; font-size: 50px; }
  .profile-avatar-wrap { margin-top: -66px; }
  .profile-meta h2 { font-size: 24px; }
  #editProfileBtn { max-width: none; }
  .strip-item .avatar-img, .strip-item .avatar-fallback { height: 74px; font-size: 30px; }
  .chat-shell { flex-direction: column; }
  .chat-list-col { width: 100%; border-right: none; max-height: none; }
  .chat-list-col.mobile-hidden, .chat-placeholder { display: none; }
  /* কথোপকথন খোলা থাকলে (body.chat-open): বটম নেভ লুকিয়ে চ্যাট পুরো স্ক্রিন —
     শেল ফিক্সড, মেসেজ এলাকা flex:1, ইনপুট বার একদম নিচে (Messenger-আচরণ)।
     কিবোর্ড উঠলে JS visualViewport দিয়ে top/height মিলিয়ে দেয়। */
  body.chat-open .bottom-nav { display: none; }
  body.chat-open .chat-shell {
    position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 0;
    height: auto; min-height: 0; z-index: 85; border-radius: 0; margin-bottom: 0;
  }
  body.chat-open .chat-window-col { height: 100%; min-height: 0; }
  body.chat-open .chat-messages { flex: 1; min-height: 0; max-height: none; }
  .note-bubble { max-width: 170px; }
  .person-actions { flex-wrap: wrap; justify-content: flex-end; }
}

/* ==================== v4: ভিডিও পোস্ট, রিলস, ভয়েস/ভিডিও মেসেজ, কল ==================== */
.btn-sm { padding: 6px 14px; font-size: 14px; }
.verify-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.verify-text { color: var(--text-2); font-size: 15px; line-height: 1.45; margin-bottom: 16px; }

/* পোস্টে ভিডিও */
.post-video { width: 100%; max-height: 560px; background: #000; display: block; }
/* রিল কম্পোজার মোডালে বাছাই করা ভিডিওর প্রিভিউ */
.reel-preview { width: 100%; max-height: 300px; border-radius: 8px; background: #000; display: block; margin-bottom: 10px; }

/* ---------- রিলস (v5: Instagram-ধাঁচে ইমারসিভ, পুরো স্ক্রিন) ---------- */
/* রিলস পেজ খোলা থাকলে টপবার লুকিয়ে থাকে; নিচের ন্যাভ বার থেকেই যায়।
   উচ্চতা: ডেস্কটপে লেআউটের প্যাডিং (16+40) বাদে পুরো কনটেন্ট-উচ্চতা;
   মোবাইলে নিচের ন্যাভ বার (56px) বাদে পুরো স্ক্রিন। */
body.reels-open .topbar { display: none; }
.reels-shell { position: relative; }
.reels-list {
  height: calc(100dvh - 56px); min-height: 420px;
  overflow-y: auto; scroll-snap-type: y mandatory;
  border-radius: 8px; background: #000; scrollbar-width: none;
}
.reels-list::-webkit-scrollbar { display: none; }
.reel-slide {
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  background: #000; overflow: hidden;
}
.reel-video { width: 100%; height: 100%; object-fit: cover; background: #000; display: block; }
.reel-mute-btn {
  position: absolute; top: 12px; left: 12px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0, 0, 0, 0.45); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
/* লোডিং/খালি অবস্থা ভিডিওর ওপরে ওভারলে হিসেবে */
.reels-overlay {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: #000; text-align: center; padding: 20px;
}
.reel-meta { position: absolute; left: 12px; bottom: 14px; right: 86px; z-index: 4; color: #fff; }
.reel-author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.reel-author {
  display: flex; align-items: center; gap: 9px; background: none; border: none; cursor: pointer;
  color: #fff; padding: 0; text-align: left; min-width: 0;
}
.reel-author .avatar-img, .reel-author .avatar-fallback { width: 36px; height: 36px; font-size: 15px; border: 2px solid rgba(255,255,255,.65); flex: none; }
.reel-author-name { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.reel-follow-btn {
  flex: none; border: 1.5px solid #fff; background: transparent; color: #fff;
  font-weight: 600; font-size: 13px; padding: 5px 14px; border-radius: 8px; cursor: pointer;
}
.reel-follow-btn.following { background: rgba(255, 255, 255, 0.22); border-color: transparent; }
.reel-caption { font-size: 14px; line-height: 1.4; text-shadow: 0 1px 3px rgba(0,0,0,.65); white-space: pre-wrap; word-break: break-word; }
.reel-rail {
  position: absolute; right: 8px; bottom: 14px; z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.reel-action-wrap { display: flex; flex-direction: column; align-items: center; }
.reel-action-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.reel-action-btn:hover { background: rgba(255, 255, 255, 0.28); }
.reel-action-btn > .reel-count { color: #fff; font-size: 11px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); line-height: 1; }
.reel-count { color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* ---------- চ্যাট: অ্যাটাচ মেনু, ভয়েস, ভিডিও, কলের সারি ---------- */
.chat-head-actions { margin-left: auto; display: flex; gap: 4px; }
.chat-head-actions .icon-btn { color: var(--blue); }
.chat-search-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.chat-search-bar input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font-size: 15px; color: var(--text); }
.chat-search-count { color: var(--text-2); font-size: 13px; white-space: nowrap; }
.chat-search-empty { text-align: center; color: var(--text-2); font-size: 14px; padding: 28px 12px; }
.chat-attach-wrap { position: relative; flex-shrink: 0; }
.chat-attach { color: var(--blue); }
.chat-mic { color: var(--blue); flex-shrink: 0; }
.chat-attach-menu {
  position: absolute; bottom: 52px; left: 0; z-index: 40; min-width: 168px;
  background: var(--card); border-radius: 8px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); padding: 6px;
}
.attach-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box;
  padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 15px; color: var(--text);
}
.attach-menu-item:hover { background: var(--hover); }
.attach-menu-item svg { color: var(--blue); }
.voice-rec-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-top: 1px solid var(--line); background: var(--card);
}
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); animation: recPulse 1s ease-in-out infinite; flex-shrink: 0; }
@keyframes recPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.rec-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.rec-hint { color: var(--text-2); font-size: 14px; }
.rec-spacer { flex: 1; }
.msg-audio { width: 210px; max-width: 58vw; height: 36px; display: block; }
.msg-video { max-width: 240px; width: 100%; border-radius: 12px; display: block; background: #000; }
.msg-call-wrap { display: flex; justify-content: center; padding: 4px 0; }
.msg-call-row {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--input-bg); color: var(--text-2);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600;
}
.msg-call-row.missed { color: var(--danger); }
.msg-call-time { font-weight: 400; opacity: 0.8; }

/* ---------- কল UI ---------- */
.call-overlay {
  position: fixed; inset: 0; z-index: 250;
  background: linear-gradient(160deg, #1c2b4a, #0b1220);
  color: #fff;
}
.call-screen {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; box-sizing: border-box; text-align: center;
}
.call-avatar-wrap { border-radius: 50%; }
.call-avatar-wrap .avatar-img, .call-avatar-wrap .avatar-fallback {
  width: 120px; height: 120px; font-size: 48px; border-radius: 50%;
}
.call-pulse { animation: callPulse 1.7s ease-out infinite; border-radius: 50%; }
@keyframes callPulse {
  0% { box-shadow: 0 0 0 0 rgba(24, 119, 242, 0.45); }
  70% { box-shadow: 0 0 0 30px rgba(24, 119, 242, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 119, 242, 0); }
}
.call-name { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 6px; justify-content: center; }
.call-status { font-size: 15px; opacity: 0.85; }
.call-btn-row { display: flex; gap: 56px; margin-top: 30px; }
.call-btn-col { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; }
.call-round-btn {
  width: 66px; height: 66px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.call-accept { background: #31a24c; }
.call-accept:hover { background: #2b8a41; }
.call-decline { background: var(--danger); }
.call-decline:hover { background: #c41730; }
.call-active { padding: 0; gap: 0; }
.remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.local-video {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 104px; height: 148px; object-fit: cover;
  border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.55);
  transform: scaleX(-1); background: #222;
}
.call-active-info {
  position: absolute; top: 18px; left: 0; right: 0; z-index: 2;
  text-align: center; pointer-events: none; text-shadow: 0 1px 5px rgba(0, 0, 0, 0.75);
}
.call-active .call-avatar-wrap { position: relative; z-index: 1; }
.call-controls {
  position: absolute; bottom: 28px; left: 0; right: 0; z-index: 3;
  display: flex; justify-content: center; align-items: center; gap: 16px;
}
.call-ctl-btn {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.18); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.call-ctl-btn:hover { background: rgba(255, 255, 255, 0.3); }
.call-ctl-btn.off { background: var(--danger); }
.call-ctl-end { background: var(--danger); width: 72px; border-radius: 999px; }
.call-ctl-end:hover { background: #c41730; }

@media (max-width: 760px) {
  /* মোবাইলে রিল ফুল-ব্লিড: লেআউট প্যাডিং নেই, কার্ডের গোল কোণও নেই;
     তালিকার উচ্চতা = পুরো স্ক্রিন − নিচের ন্যাভ বার (বেস নিয়মেই আছে) */
  body.reels-open .layout { padding: 0; }
  .reels-list { border-radius: 0; min-height: 380px; }
  .local-video { width: 84px; height: 120px; }
  .call-btn-row { gap: 40px; }
}

/* অডিও কলে নাম+টাইমার অবতারের ঠিক নিচে (ভিডিওতে উপরে ওভারলে থাকে) */
.call-active.audio-call .call-active-info { position: static; margin-top: 16px; text-shadow: none; pointer-events: auto; }

/* ==================== v4.2: অডিট ফিক্স ==================== */
/* লিংক করা লেখা + See more */
.text-link { color: var(--blue); text-decoration: none; overflow-wrap: anywhere; }
.text-link:hover { text-decoration: underline; }
.see-more-btn {
  background: none; border: none; padding: 0; font: inherit; font-weight: 600;
  color: var(--text-2); cursor: pointer;
}
.see-more-btn:hover { text-decoration: underline; color: var(--text); }

/* পাসওয়ার্ড চোখ বাটন */
.pw-wrap { position: relative; display: block; }
.auth-form .pw-wrap { margin-bottom: 12px; }
.auth-form .pw-wrap input { margin-bottom: 0; }
.pw-wrap input { padding-right: 46px !important; }
.pw-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; background: none; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; padding: 0;
}
.pw-eye:hover { background: var(--hover); }
.pw-eye.on { color: var(--blue); }

/* নোটিফিকেশন ভাগ (New / Earlier) */
.notif-section {
  font-size: 17px; font-weight: 700; color: var(--text);
  background: var(--card); padding: 14px 12px 2px;
}

/* পারস্পরিক বন্ধু */
.p-mutual { color: var(--text-2); font-size: 13.5px; margin-top: 1px; }
.mutual-line { color: var(--text-2); font-size: 14.5px; margin-top: 5px; }

/* চ্যাট: দিনের বিভাজক, উপস্থিতি লেখা, টাইপিং বাবল */
.msg-day-sep { display: flex; justify-content: center; padding: 10px 0 5px; }
.msg-day-sep span { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.chat-peer-presence { color: var(--text-2); font-size: 12.5px; }
.chat-peer-presence.online { color: #31a24c; font-weight: 600; }
.typing-bubble { display: inline-flex; gap: 4px; align-items: center; padding: 11px 14px; }
.tdot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--text-2);
  animation: typingBlink 1.1s ease-in-out infinite;
}
.tdot:nth-child(2) { animation-delay: 0.18s; }
.tdot:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBlink { 0%, 60%, 100% { opacity: 0.35; } 30% { opacity: 1; } }

/* ওভারফ্লো সুরক্ষা — লম্বা নাম/URL/অভঙ্গুর শব্দে লেআউট ভাঙবে না */
.post-author > span { min-width: 0; }
.post-author-name { overflow-wrap: anywhere; }
.person-info .p-name, .person-info .p-user {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conv-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head > div:not(.chat-head-actions) { min-width: 0; flex: 1; }
.chat-peer-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-text { min-width: 0; overflow-wrap: anywhere; }
.menu-head-name, .account-name { overflow-wrap: anywhere; }
.profile-meta h2 { overflow-wrap: anywhere; }
.comment-bubble .c-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-meta .bio { overflow-wrap: anywhere; }
.reel-author-name { max-width: 48vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== v5: Create মেনু, ফুল-স্ক্রিন কম্পোজার, শেয়ার শিট, রঙিন পোস্ট ==================== */

/* টপবার "+" Create মেনু */
.create-menu { min-width: 230px; padding: 6px; }
.create-menu .post-menu-item { padding: 10px; font-size: 15px; }
.create-menu .post-menu-item svg { color: var(--blue); flex: none; }

/* পোস্ট হেডলাইন: ট্যাগ/ফিলিং/লোকেশন */
.post-headline-extra { font-weight: 400; color: var(--text); }
.tag-link { font-weight: 600; cursor: pointer; }
.tag-link:hover { text-decoration: underline; }

/* রঙিন ব্যাকগ্রাউন্ড পোস্ট */
.post-bg-block {
  min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px 22px; color: #fff;
  font-size: 26px; font-weight: 700; line-height: 1.35;
  white-space: pre-wrap; word-break: break-word;
}
.post-bg-block .see-more-btn { color: #fff; text-decoration: underline; font-size: 16px; }

/* ---------- ফুল-স্ক্রিন কম্পোজার পেজ ---------- */
#page-composer {
  position: fixed; inset: 0; z-index: 120; background: var(--bg);
  overflow-y: auto; padding: 0;
}
.composer-page-inner { max-width: 680px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
.composer-page-head {
  position: sticky; top: 0; z-index: 5; background: var(--card);
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.composer-page-title { font-size: 18px; font-weight: 700; }
.composer-post-btn { border-radius: 999px; padding: 7px 20px; }
.composer-page-body { background: var(--card); flex: 1; padding: 14px 16px 20px; box-shadow: var(--shadow); }
.nc-author-row { display: flex; align-items: center; gap: 10px; }
.composer-author-meta { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.tile-a { font-size: 22px; font-weight: 800; line-height: 1; }
.nc-author-row .avatar-img, .nc-author-row .avatar-fallback { width: 44px; height: 44px; font-size: 19px; }
.nc-author-name { font-weight: 600; font-size: 16px; }
.audience-pill {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 3px;
  border: none; background: var(--input-bg); color: var(--text);
  font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; cursor: pointer;
}
.audience-pill:hover { background: var(--hover); }
.nc-audience-menu { min-width: 170px; }
.nc-audience-menu .aud-selected { color: var(--blue); font-weight: 700; }
.nc-chip-row { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.nc-chip-row::-webkit-scrollbar { display: none; }
.chip-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 13.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; cursor: pointer;
}
.chip-btn:hover { background: var(--hover); }
.chip-btn svg { color: var(--blue); }
.nc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--input-bg); color: var(--text);
  font-size: 13px; font-weight: 600; padding: 5px 6px 5px 10px; border-radius: 999px;
}
.nc-chip-x {
  border: none; background: none; color: var(--text-2); cursor: pointer;
  width: 18px; height: 18px; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.nc-chip-x:hover { background: var(--hover); color: var(--text); }
.nc-extra-row {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  background: var(--input-bg); border-radius: 10px; padding: 6px 8px 6px 12px; color: var(--text-2);
}
.nc-extra-row input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font-size: 15px; color: var(--text); font-family: inherit;
}
.mini-x-inline {
  border: none; background: none; color: var(--text-2); cursor: pointer; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.mini-x-inline:hover { background: var(--hover); }
.feeling-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.feeling-opt {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 13.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; cursor: pointer;
}
.feeling-opt:hover { background: var(--hover); }
.feeling-opt.selected { background: var(--tab-active-bg); color: var(--blue); border-color: var(--blue); }
.nc-text {
  width: 100%; border: none; outline: none; resize: none; background: none;
  font-family: inherit; font-size: 19px; color: var(--text); line-height: 1.4;
  min-height: 130px; margin-top: 14px; padding: 4px 2px; border-radius: 12px;
}
.nc-text-colored {
  color: #fff; font-size: 26px; font-weight: 700; text-align: center;
  padding: 40px 18px; min-height: 240px;
}
.nc-text-colored::placeholder { color: rgba(255, 255, 255, 0.75); }
.nc-preview { position: relative; margin-top: 10px; }
.nc-preview img { width: 100%; border-radius: 10px; max-height: 380px; object-fit: cover; display: block; }
.nc-preview video { width: 100%; border-radius: 10px; max-height: 380px; background: #000; display: block; }
.swatch-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.swatch {
  width: 38px; height: 38px; border-radius: 9px; border: 2px solid transparent;
  cursor: pointer; padding: 0;
}
.swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--text); }
.swatch-default {
  background: var(--card); color: var(--text); font-weight: 700; font-size: 14px;
  border-color: var(--line);
  display: inline-flex; align-items: center; justify-content: center;
}
.composer-tiles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px;
}
.tile-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 10px; padding: 14px 6px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.tile-btn:hover { background: var(--hover); }

/* ---------- ট্যাগ পিকার মোডাল ---------- */
.tag-search { margin-bottom: 10px; }
.tag-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; }
.tag-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 6px;
  border-radius: 8px; cursor: pointer;
}
.tag-row:hover { background: var(--hover); }
.tag-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); flex: none; }
.tag-row .avatar-img, .tag-row .avatar-fallback { width: 40px; height: 40px; font-size: 17px; }
.tag-row-meta { display: flex; flex-direction: column; min-width: 0; }
.tag-row-meta small { color: var(--text-2); }

/* ---------- শেয়ার শিট ---------- */
.share-sheet-card { max-width: 420px; }
.share-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: none; background: none; color: var(--text); text-align: left;
  font-size: 15.5px; font-weight: 600; padding: 12px 8px; border-radius: 8px; cursor: pointer;
}
.share-opt:hover { background: var(--hover); }
.share-opt svg { color: var(--blue); flex: none; }

/* ---------- v5.2: সাইনআপ উইজার্ড ---------- */
.wiz-step { animation: wizIn 0.18s ease; }
@keyframes wizIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.wiz-progress { height: 4px; background: var(--input-bg); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.wiz-progress-bar { height: 100%; width: 17%; background: var(--blue); border-radius: 999px; transition: width 0.25s ease; }
.wiz-step-count { font-size: 13px; color: var(--text-2); margin-bottom: 10px; text-align: left; }
.wiz-title { font-size: 22px; font-weight: 700; margin: 2px 0 6px; text-align: left; color: var(--text); }
.wiz-sub { font-size: 15px; color: var(--text-2); line-height: 1.45; margin-bottom: 14px; text-align: left; }
.wiz-error { color: var(--danger); font-size: 14px; line-height: 1.4; margin-top: 10px; text-align: left; }
.wiz-nav { display: flex; gap: 10px; margin-top: 16px; }
.wiz-nav .btn { flex: 1; }
.gender-card {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid var(--divider); border-radius: 8px; padding: 13px 14px;
  margin-bottom: 10px; font-size: 16px; color: var(--text); background: var(--card);
}
.gender-card input { width: 18px; height: 18px; margin: 0; padding: 0; flex: none; accent-color: var(--blue); }
.gender-card.selected { border-color: var(--blue); background: var(--input-bg); }
.gender-card:has(input:checked) { border-color: var(--blue); }

/* ---------- v5.2: অনবোর্ডিং ---------- */
.onboard {
  position: fixed; inset: 0; z-index: 145; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto;
}
.onboard-card {
  background: var(--card); border-radius: 12px; padding: 22px;
  width: 420px; max-width: 100%; text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.ob-title { font-size: 21px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.ob-sub { font-size: 15px; color: var(--text-2); line-height: 1.45; margin-bottom: 16px; }
.ob-step .btn { width: 100%; margin-top: 10px; }
.ob-avatar-preview { display: flex; justify-content: center; margin-bottom: 16px; }
.ob-avatar-preview .avatar-img, .ob-avatar-preview .avatar-fallback { width: 112px; height: 112px; font-size: 42px; }
.ob-cover-preview { margin-bottom: 16px; border-radius: 10px; overflow: hidden; }
.ob-cover-preview .cover-img, .ob-cover-preview .cover-fallback { width: 100%; height: 150px; object-fit: cover; display: block; }
.lang-cards { display: flex; gap: 10px; }
.lang-card {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 16px 10px; border: 1.5px solid var(--divider); border-radius: 10px;
  background: var(--card); color: var(--text); cursor: pointer; font-family: inherit;
}
.lang-card.selected { border-color: var(--blue); background: var(--input-bg); }
.lang-card-name { font-size: 17px; font-weight: 600; }
.lang-card-sub { font-size: 13px; color: var(--text-2); }

/* ---------- v5.2: সেটিংস — ভাষা সিলেক্ট ---------- */
.lang-select {
  padding: 8px 10px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--divider); border-radius: 6px;
  background: var(--card); color: var(--text); cursor: pointer;
}

/* ---------- v7.0: অ্যাডমিন প্যানেল ---------- */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 14px;
}
.stat-num { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.role-chip, .banned-chip {
  display: inline-block; font-size: 11px; font-weight: 600; line-height: 1;
  padding: 3px 8px; border-radius: 999px; background: var(--chip); color: var(--text-2);
  vertical-align: middle; margin-left: 6px;
}
.role-chip.super { background: var(--tab-active-bg); color: var(--blue); }
.banned-chip { background: rgba(228, 30, 63, 0.12); color: var(--danger); }
.person-actions.wrap { flex-wrap: wrap; justify-content: flex-end; }
.admin-search-card { padding: 10px 12px; margin-bottom: 12px; }
.admin-search-card input {
  width: 100%; border: none; background: var(--input-bg); border-radius: 999px;
  padding: 9px 14px; font-size: 15px; outline: none;
}
.admin-field { display: flex; gap: 8px; align-items: center; margin: 2px 0 14px; }
.admin-field input {
  flex: 1; min-width: 0; border: 1px solid var(--divider); border-radius: 6px;
  background: var(--card); padding: 9px 12px; font-size: 15px; outline: none;
}
.admin-field input:focus { border-color: var(--blue); }
.admin-note { color: var(--text-2); font-size: 13px; line-height: 1.45; margin-top: 6px; }
.report-reason { font-weight: 600; }

/* ---------- v7.1: অ্যাডমিন স্টোরি ট্যাব + মেসেজ তদারকি ---------- */
.admin-story-thumb {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none;
  background: var(--input-bg);
}
.admin-readonly-note {
  background: var(--tab-active-bg); color: var(--blue);
  border-radius: var(--radius); padding: 9px 14px; margin-bottom: 12px;
  font-size: 13.5px; font-weight: 600; text-align: center;
}
.admin-thread-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.admin-thread-title { font-weight: 700; font-size: 15.5px; min-width: 0; }
.admin-thread-list {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 12px; max-height: 62vh; overflow-y: auto;
}
.admin-msg-sender { font-size: 11px; font-weight: 700; opacity: 0.75; margin-bottom: 2px; }
.gate-card { text-align: center; }
.gate-card .logo-ds { margin: 0 auto 12px; }
.gate-card .btn { margin-top: 10px; }

/* ---------- v7.0: ঘোষণা ব্যানার (ফিডের উপরে) ---------- */
.announce-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--blue); color: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 10px 14px; margin-bottom: 12px; font-size: 15px;
}
.announce-close {
  margin-left: auto; flex: none; display: inline-flex; align-items: center;
  background: none; border: none; color: #fff; padding: 4px;
}
