:root{
  --bg:#050505; --panel:#0d0f0d; --panel2:#121512; --line:#1e241d;
  --neon:#6CEF00; --neon-dim:#4a9c05; --text:#EFEFEF; --muted:#8b968a;
  --amber:#ffb300; --red:#ff3b3b;
  --vf:#00FF99; --vf-check:#052b14; --online:#12e653; /* verified tick (flat, no glow) + online-status dot */
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;line-height:1.5}
a{color:var(--neon);text-decoration:none}
a:hover{text-decoration:none}
code{font-family:ui-monospace,"Cascadia Code",Consolas,monospace;color:var(--amber);font-size:.9em}
.muted{color:var(--muted)}
.small{font-size:.85rem}

/* header */
.site-header,.mod-header{border-bottom:1px solid var(--line);background:linear-gradient(#0a0c0a,#070807);position:sticky;top:0;z-index:5}
.mod-header{border-bottom-color:#3a2a00;background:linear-gradient(#0e0b03,#080602)}
.header-inner{max-width:none;margin:0;padding:.7rem 1.6rem;display:flex;align-items:center;gap:1rem;position:relative}
.logo{font-weight:800;font-size:1.4rem;color:var(--text);letter-spacing:.5px;display:inline-flex;align-items:center;gap:.55rem}
.logo .logo-mark{height:36px;width:auto}
.logo span{color:var(--text)}
.mod .logo span,.mod-header .logo span{color:var(--amber)}
.mainnav{display:flex;gap:1.6rem;position:absolute;left:50%;transform:translateX(-50%)}
.mainnav a{color:var(--muted);font-weight:600;font-size:.95rem;display:inline-flex;align-items:center;gap:7px}
.mainnav a.on,.mainnav a:hover{color:var(--neon);text-decoration:none}
.mod-header .mainnav a:hover{color:var(--amber)}
.header-tools{display:flex;align-items:center;gap:1rem}
.who{color:var(--muted);font-size:.9rem}
.inline{display:inline}
.linkbtn{background:none;border:1px solid var(--line);color:var(--text);padding:.35rem .7rem;border-radius:6px;cursor:pointer;font-size:.85rem}
.linkbtn:hover{border-color:var(--neon);color:var(--neon)}

.wrap{max-width:1000px;margin:0 auto;padding:1.6rem 1.2rem}
h2{margin:.2rem 0 1rem}
h3{margin:0 0 .6rem;font-size:1rem}

.card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:1.1rem;margin-bottom:1.1rem}
.flash{background:rgba(108,239,0,.08);border:1px solid var(--neon-dim);color:var(--neon);padding:.7rem 1rem;border-radius:8px;margin-bottom:1rem}
.err{background:rgba(255,59,59,.08);border:1px solid var(--red);color:#ff8a8a;padding:.6rem .9rem;border-radius:8px;margin-bottom:.8rem}

/* feed — single centered column */
.feed-grid{max-width:600px;margin:0 auto}

/* ── Pinned banner (top of feed) — clean wide image, wider than the post column, no chrome ── */
.fbx-banner-wrap{max-width:960px;margin:0 auto}
.fbx-banner{margin-bottom:1.1rem}
.fbx-banner-imglink{display:block}
/* Whole artwork, never cropped, and WIDER than the post column (extends past it on both sides). The banner
   wrap is already wider than the 600px post card; letting the image fill toward that width (capped height
   keeps the native ratio) makes it break out beyond the posts on both sides while staying uncropped. */
.fbx-banner-img{max-width:100%;max-height:280px;width:auto;height:auto;margin:0 auto;border-radius:12px;display:block}
.fbx-banner-text{padding:0 .2rem}
.fbx-banner-title{margin:.55rem 0 .15rem;font-size:1.1rem;font-weight:800;color:var(--text)}
.fbx-banner-body{margin:.3rem 0 0;color:var(--muted);font-size:.92rem;line-height:1.5}
.fbx-banner-body a{color:var(--neon)}

/* ── Report-to-moderator dialog (opened from a post's "..." menu) ── */
.fbx-report-modal{position:fixed;inset:0;z-index:80;display:flex;align-items:flex-start;justify-content:center;padding:8vh 1rem;background:rgba(0,0,0,.6)}
.fbx-report-modal[hidden]{display:none}
.fbx-report-card{width:100%;max-width:440px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:1rem 1.1rem}
.fbx-report-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.4rem}
.fbx-report-head h3{margin:0;font-size:1.05rem;color:var(--text)}
.fbx-report-actions{display:flex;justify-content:flex-end;margin-top:.6rem}
.composer textarea{width:100%;min-height:70px;background:var(--panel2);border:1px solid var(--line);
  border-radius:8px;color:var(--text);padding:.7rem;resize:vertical;font:inherit}
.composer-actions{display:flex;justify-content:flex-end;margin-top:.6rem}
.post-head{display:flex;gap:.7rem;align-items:center;margin-bottom:.5rem}
.avatar{width:38px;height:38px;border-radius:50%;background:var(--panel2);border:1px solid var(--neon-dim);
  display:grid;place-items:center;font-weight:800;color:var(--neon);flex:none}
.avatar.big{width:64px;height:64px;font-size:1.5rem}
.avatar.sm{width:28px;height:28px;font-size:.8rem}
.name{font-weight:700;color:var(--text)}
.badge{background:var(--amber);color:#000;font-size:.65rem;font-weight:800;padding:.1rem .4rem;border-radius:4px;margin-left:.3rem;vertical-align:middle}
.handle{color:var(--muted);font-size:.82rem}
.post-body{margin:.4rem 0 .7rem}
.report-form details summary{cursor:pointer;color:var(--muted);font-size:.85rem}
.report-form input[type=text]{width:100%;margin:.4rem 0;background:var(--panel2);border:1px solid var(--line);border-radius:6px;color:var(--text);padding:.5rem}
.profile{display:flex;gap:1.2rem;align-items:center}

/* ── profile ── */
/* overflow:visible so the cover edit-menu can drop DOWN past the cover; the cover rounds its own top corners */
.fb-cover-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:visible;margin-bottom:1.1rem}
/* aspect-ratio (not fixed height) so the crop frame ratio == the displayed box ratio → background:cover never re-crops */
.fb-cover{aspect-ratio:3.6/1;height:auto;background:linear-gradient(120deg,#0a1a05,#132a0a 40%,#0a0f0d);background-size:cover;background-position:center;position:relative;border-bottom:1px solid var(--line);border-radius:14px 14px 0 0}
.fb-cover[data-cover-src]{cursor:zoom-in}
.fb-cover-cam{position:absolute;right:1rem;bottom:1rem;display:inline-flex;align-items:center;gap:.4rem;
  background:rgba(5,8,5,.78);border:1px solid var(--line);color:var(--text);padding:.45rem .8rem;border-radius:8px;cursor:pointer;font-size:.82rem;font-weight:600}
.fb-cover-cam:hover{border-color:var(--neon);color:var(--neon)}
/* Cover cam is wrapped in the .fbx-pm dropdown: the WRAPPER takes the corner, the button is static */
.fb-cover .fbx-pm{position:absolute;right:1rem;bottom:1rem}
.fb-cover .fbx-pm .fb-cover-cam{position:static;right:auto;bottom:auto}
.fb-head{display:flex;align-items:flex-end;gap:1.1rem;padding:0 1.4rem 1rem;position:relative}
.fb-ava-wrap{margin-top:-64px;position:relative;flex:none}
.fb-ava-img,.fb-ava-letter{width:132px;height:132px;border-radius:50%;border:4px solid var(--panel);background:var(--panel2);display:grid;place-items:center;object-fit:cover}
.fb-ava-letter{font-size:3rem;font-weight:800;color:var(--neon)}
.fb-ava-cam{position:absolute;right:6px;bottom:6px;width:34px;height:34px;border-radius:50%;background:var(--panel2);
  border:1px solid var(--line);color:var(--text);cursor:pointer;display:grid;place-items:center}
.fb-ava-cam:hover{border-color:var(--neon);color:var(--neon)}
.fb-head-main{flex:1;padding-bottom:.3rem}
.fb-name{margin:0;font-size:1.7rem;line-height:1.15}
/* Long unbroken user text (names/bios) must wrap, never blow out the layout. Bodies/about already wrap. */
.fb-name,.name,.fb-bio,.fbx-cm-name,.fbx-d-name,.fbx-embed-name,.fbx-fr-name,.fbx-pr-name{overflow-wrap:anywhere;word-break:break-word;min-width:0}
.fb-sub{color:var(--muted);font-size:.9rem;margin-top:.2rem}
.fb-head-actions{display:flex;align-items:center;gap:.6rem;padding-bottom:.4rem;flex-wrap:wrap}
.fb-tabs{display:flex;gap:.3rem;padding:0 1rem;border-top:1px solid var(--line);overflow-x:auto}
.fb-tab{padding:.85rem .95rem;color:var(--muted);font-weight:600;font-size:.92rem;border-bottom:3px solid transparent;white-space:nowrap}
.fb-tab:hover{color:var(--text);text-decoration:none;background:rgba(255,255,255,.02)}
.fb-tab.on{color:var(--neon);border-bottom-color:var(--neon)}

.fb-body{display:grid;grid-template-columns:340px 1fr;gap:1.1rem;align-items:start}
@media(max-width:900px){.fb-body{grid-template-columns:1fr}}
/* About/Friends/Photos tabs go full-width — hide the Timeline-only Intro/Friends sidebar */
.fb-body.solo{grid-template-columns:1fr}
.fb-body.solo .fb-side{display:none}
.fb-side{position:sticky;top:70px}
@media(max-width:900px){.fb-side{position:static}}
.fb-bio{margin:.2rem 0 .7rem}
.fb-intro{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.62rem}
.fb-intro li{font-size:.9rem;display:flex;align-items:center;gap:.62rem;color:var(--text)}
.fb-intro li[hidden]{display:none}
.fb-intro li.muted{color:var(--muted)}
.fb-intro li strong{font-weight:600;color:var(--text)}
.fb-intro-ic{width:19px;height:19px;flex:none;color:var(--muted);opacity:.92}
.fb-intro-ic.heart{color:#ff6b81}
/* Custom visibility dropdown (SVG icons; replaces the emoji <select>) */
.fb-vis{position:relative;display:inline-block}
.fb-vis-toggle{display:inline-flex;align-items:center;gap:.45rem;background:var(--panel2);border:1px solid var(--line);color:var(--text);border-radius:8px;padding:.42rem .6rem;font-size:.85rem;font-weight:600;cursor:pointer;font-family:inherit}
.fb-vis-toggle:hover{border-color:var(--neon-dim)}
.fb-vis-cur{display:inline-flex;align-items:center;gap:.42rem}
.fb-vis-toggle svg,.fb-vis-item svg{width:16px;height:16px;flex:none;stroke:currentColor;fill:none;stroke-width:1.9}
.fb-vis-cur svg{color:var(--neon)}
.fb-vis-caret{opacity:.55;transition:transform .16s}
.fb-vis.open .fb-vis-caret{transform:rotate(180deg)}
.fb-vis-menu{position:absolute;top:calc(100% + 6px);left:0;min-width:170px;background:var(--panel2);border:1px solid var(--line);border-radius:11px;padding:5px;z-index:30;display:none;box-shadow:0 10px 30px rgba(0,0,0,.55)}
.fb-vis.open .fb-vis-menu{display:block;animation:fbVisIn .14s ease}
@keyframes fbVisIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.fb-vis-item{display:flex;align-items:center;gap:.55rem;width:100%;background:none;border:0;color:var(--text);padding:.5rem .55rem;border-radius:8px;font-size:.85rem;font-weight:500;cursor:pointer;text-align:left;font-family:inherit}
.fb-vis-item svg{color:var(--muted)}
.fb-vis-item:hover{background:rgba(108,239,0,.1);color:var(--neon)}
.fb-vis-item:hover svg,.fb-vis-item.on,.fb-vis-item.on svg{color:var(--neon)}
.fb-side-head{display:flex;align-items:center;justify-content:space-between}
/* minmax(0,1fr) + min-width:0 → tracks stay EQUAL even when a name (nowrap) is longer than its column */
.fb-friend-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin-top:.4rem}
.fb-friend-cell{display:block;min-width:0;color:var(--text)}
.fb-friend-cell img,.fb-friend-cell .fb-fc-letter{width:100%;aspect-ratio:1;border-radius:8px;object-fit:cover;display:grid;place-items:center;background:var(--panel2);border:1px solid var(--line);font-weight:800;color:var(--neon);font-size:1.3rem}
.fb-fc-name{display:block;font-size:.74rem;margin-top:.2rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.fb-friend-cell:hover{text-decoration:none}
.fb-friend-cell:hover .fb-fc-name{color:var(--neon)}

.avatar-img{object-fit:cover}
.post-head-main{flex:1}
.post-menu{display:flex;align-items:center;gap:.2rem;margin-left:auto}
.fb-icon-btn{background:none;border:1px solid transparent;color:var(--muted);cursor:pointer;border-radius:6px;padding:.3rem;display:grid;place-items:center;line-height:1;font-size:.9rem}
.fb-icon-btn:hover{border-color:var(--neon);color:var(--neon)}
.fb-icon-btn.danger:hover{border-color:var(--red);color:#ff8a8a}
.fb-vis-tag{color:var(--muted)}
.fb-vis-select{background:var(--panel2);border:1px solid var(--line);color:var(--text);border-radius:7px;padding:.4rem .5rem;font:inherit;font-size:.82rem;margin-right:.5rem}
.composer-actions{gap:.5rem;align-items:center}
.fb-edit-form textarea{width:100%;min-height:60px;background:var(--panel2);border:1px solid var(--line);border-radius:8px;color:var(--text);padding:.6rem;font:inherit;margin-bottom:.5rem}

.fb-about{width:100%;border-collapse:collapse}
.fb-about th{text-align:left;color:var(--muted);font-weight:600;width:150px;padding:.55rem .6rem .55rem 0;vertical-align:top;font-size:.9rem}
.fb-about td{padding:.55rem 0;border-bottom:1px solid var(--line)}
.fb-about tr:last-child td{border-bottom:none}
.fb-priv{margin-left:.5rem;font-size:.68rem;padding:.08rem .4rem;border-radius:4px;vertical-align:middle}
.fb-priv.pub{background:rgba(108,239,0,.12);color:var(--neon);border:1px solid var(--neon-dim)}
.fb-priv.prv{background:rgba(255,179,0,.1);color:var(--amber);border:1px solid #5a4300}

.fb-friends-full{display:flex;flex-direction:column}
.fb-friend-row{display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.6rem 0;border-bottom:1px solid var(--line)}
.fb-friend-row:last-child{border-bottom:none}
.fb-friend-row-l{display:flex;align-items:center;gap:.7rem;color:var(--text);flex:1;min-width:0}
.fb-friend-row-l img,.fb-friend-row-l .fb-fc-letter{width:48px;height:48px;border-radius:10px;object-fit:cover;flex:none;display:grid;place-items:center;background:var(--panel2);border:1px solid var(--line);font-weight:800;color:var(--neon)}
.fb-friend-row-l .name{display:block}
.fb-friend-row-l:hover{text-decoration:none}
.fb-friend-row-l:hover .name{color:var(--neon)}

.fb-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:.6rem}
.fb-photos img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:10px;border:1px solid var(--line)}

/* modal */
.fb-modal{position:fixed;inset:0;background:rgba(3,5,3,.74);backdrop-filter:blur(3px);display:grid;place-items:center;z-index:50;padding:1.2rem;animation:fbModalFade .16s ease}
.fb-modal[hidden]{display:none}
@keyframes fbModalFade{from{opacity:0}to{opacity:1}}
.fb-modal-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;width:100%;max-width:500px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 64px rgba(0,0,0,.6)}
.fb-modal-head{display:flex;align-items:center;gap:.4rem;padding:1.05rem 1.3rem;border-bottom:1px solid var(--line)}
.fb-modal-head h3{margin:0;font-size:1.15rem;font-weight:700;color:var(--text);flex:1;text-align:left}
.fb-modal-body{padding:.6rem 1.3rem 1.2rem;overflow-y:auto;scrollbar-width:none;flex:1 1 auto;min-height:0}
.fb-modal-body::-webkit-scrollbar{display:none}
/* each screen fills the card as a flex column so its body scrolls (hidden scrollbar) instead of the
   whole card overflowing off-screen — otherwise the Save button gets clipped on tall content */
.fb-screen{display:flex;flex-direction:column;min-height:0;flex:1 1 auto}
.fb-screen[hidden]{display:none}
.fb-back{background:none;border:1px solid transparent;color:var(--text);cursor:pointer;border-radius:7px;padding:.25rem;display:grid;place-items:center;flex:none}
.fb-back:hover{border-color:var(--neon);color:var(--neon)}
/* Hub sections (edit-profile) */
.fb-sect{padding:1rem 0;border-bottom:1px solid var(--line)}
.fb-sect:last-child{border-bottom:0;padding-bottom:.2rem}
.fb-sect-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:.65rem}
.fb-sect-title{font-size:1rem;font-weight:700;color:var(--text)}
.fb-sect-link{background:none;border:0;color:var(--neon);font-weight:600;font-size:.88rem;cursor:pointer;padding:.25rem .45rem;border-radius:7px}
.fb-sect-link:hover{background:rgba(108,239,0,.1)}
.fb-sect-ava{display:flex;justify-content:center}
.fb-sect-ava img,.fb-sect-ava-l{width:104px;height:104px;border-radius:50%;object-fit:cover;background:var(--panel2);border:1px solid var(--line);display:grid;place-items:center;font-size:2.3rem;font-weight:800;color:var(--neon)}
.fb-sect-cover{height:118px;border-radius:12px;background:var(--panel2) center/cover no-repeat;border:1px solid var(--line);display:grid;place-items:center}
.fb-sect-cover-empty{color:var(--muted);font-size:.85rem}
.fb-sect-bio{margin:0;color:var(--text);font-size:.92rem;line-height:1.5}
.fb-sect-bio.empty{color:var(--muted)}
.fb-sect-intro{list-style:none;margin:0 0 .85rem;padding:0;display:flex;flex-direction:column;gap:.6rem}
.fb-sect-intro li{display:flex;align-items:center;gap:.6rem;font-size:.9rem;color:var(--text)}
.fb-sect-intro li.muted{color:var(--muted)}
.fb-sect-btn{width:100%;background:var(--panel2);border:1px solid var(--line);color:var(--neon);font-weight:600;font-size:.9rem;padding:.65rem;border-radius:9px;cursor:pointer;transition:background .15s,border-color .15s}
.fb-sect-btn:hover{background:rgba(108,239,0,.1);border-color:var(--neon-dim)}
/* "Joined" toggle row (switch on the left, date text beside it) */
.fbx-jn{display:inline-flex;align-items:center;gap:.7rem;cursor:pointer;user-select:none;margin-top:.2rem}
.fbx-jn input{position:absolute;opacity:0;width:0;height:0}
.fbx-jn input:checked ~ .fb-priv-sw{background:rgba(108,239,0,.22);border-color:var(--neon-dim)}
.fbx-jn input:checked ~ .fb-priv-sw::after{transform:translateX(15px);background:var(--neon)}
.fbx-jn-txt{font-size:.9rem;color:var(--muted)}
.fbx-jn input:checked ~ .fbx-jn-txt{color:var(--text)}
.fbx-jn-txt strong{font-weight:600;color:var(--text)}
/* Photo cropper / reposition modal */
.fbx-crop{position:fixed;inset:0;background:rgba(3,5,3,.82);backdrop-filter:blur(3px);display:grid;place-items:center;z-index:60;padding:1.2rem}
.fbx-crop[hidden]{display:none}
.fbx-crop-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;width:100%;max-width:600px;box-shadow:0 24px 64px rgba(0,0,0,.6);overflow:hidden}
.fbx-crop-head{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.3rem;border-bottom:1px solid var(--line)}
.fbx-crop-head h3{margin:0;font-size:1.1rem;font-weight:700;color:var(--text)}
.fbx-crop-body{padding:1.2rem 1.3rem}
.fbx-crop-stage{position:relative;overflow:hidden;background:#000;border-radius:10px;margin:0 auto;touch-action:none;cursor:grab;user-select:none;max-width:100%}
.fbx-crop-stage.grabbing{cursor:grabbing}
.fbx-crop-stage.round{border-radius:50%}
#fbx-crop-img{position:absolute;top:0;left:0;transform-origin:0 0;will-change:transform;max-width:none;pointer-events:none}
.fbx-crop-hint{text-align:center;color:var(--muted);font-size:.8rem;margin:.8rem 0 .4rem}
.fbx-crop-tools{display:flex;align-items:center;gap:.8rem}
.fbx-crop-tools svg{width:18px;height:18px;color:var(--muted);flex:none}
.fbx-crop-tools input[type=range]{flex:1;accent-color:var(--neon)}
.fbx-crop-foot{display:flex;justify-content:flex-end;gap:.7rem;padding:1rem 1.3rem;border-top:1px solid var(--line)}
.fbx-crop-save-busy{opacity:.6;pointer-events:none}
/* Cover edit menu (Choose · Upload · Reposition · Remove) */
.fbx-pm{position:relative;display:inline-block}
.fbx-pm-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:210px;background:var(--panel);border:1px solid var(--line);border-radius:11px;padding:6px;z-index:20;box-shadow:0 14px 34px rgba(0,0,0,.6)}
.fbx-pm-menu[hidden]{display:none}
.fbx-pm-item{display:flex;align-items:center;gap:.7rem;width:100%;background:none;border:0;color:var(--text);padding:.6rem .7rem;border-radius:8px;font:inherit;font-size:.9rem;font-weight:600;cursor:pointer;text-align:left}
.fbx-pm-item svg{width:18px;height:18px;flex:none;color:var(--muted)}
.fbx-pm-item:hover{background:var(--panel2)}
.fbx-pm-item:hover svg{color:var(--neon)}
.fbx-pm-item.danger:hover,.fbx-pm-item.danger:hover svg{color:#ff8a8a}
/* Choose-photo gallery */
.fbx-gal{position:fixed;inset:0;background:rgba(3,5,3,.8);backdrop-filter:blur(3px);display:grid;place-items:center;z-index:61;padding:1.2rem}
.fbx-gal[hidden]{display:none}
.fbx-gal-card{background:var(--panel);border:1px solid var(--line);border-radius:16px;width:100%;max-width:520px;box-shadow:0 24px 64px rgba(0,0,0,.6);overflow:hidden}
.fbx-gal-head{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.3rem;border-bottom:1px solid var(--line)}
.fbx-gal-head h3{margin:0;font-size:1.1rem;font-weight:700}
.fbx-gal-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;padding:1.2rem 1.3rem;min-height:60px}
.fbx-gal-thumb{aspect-ratio:1;border-radius:10px;overflow:hidden;border:1px solid var(--line);cursor:pointer;background:var(--panel2) center/cover no-repeat;position:relative}
.fbx-gal-thumb:hover{border-color:var(--neon)}
.fbx-gal-thumb span{position:absolute;left:8px;bottom:8px;background:rgba(5,5,5,.72);color:var(--text);font-size:11px;font-weight:600;padding:2px 8px;border-radius:20px}
.fbx-gal-empty{padding:1.5rem;text-align:center;color:var(--muted)}
.fbx-gal-foot{display:flex;justify-content:flex-end;padding:1rem 1.3rem;border-top:1px solid var(--line)}
/* Edit-profile fields */
.fb-fld{margin-bottom:1.05rem}
.fb-fld-head{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.42rem}
.fb-fld-label{display:block;margin:0 0 .42rem;font-size:.82rem;font-weight:600;color:var(--muted);letter-spacing:.02em}
.fb-fld-head .fb-fld-label{margin:0}
.fb-fld-input{display:block;width:100%;background:var(--panel2);border:1px solid var(--line);border-radius:10px;color:var(--text);padding:.65rem .8rem;font:inherit;font-size:.92rem;transition:border-color .15s,box-shadow .15s,background .15s}
.fb-fld-input:focus{outline:none;border-color:var(--neon);background:#0d100c;box-shadow:0 0 0 3px rgba(108,239,0,.12)}
textarea.fb-fld-input{resize:vertical;min-height:62px;line-height:1.5}
.fb-fld-input::placeholder{color:#5c655b}
.fb-fld-hint{font-size:.8rem;color:var(--muted);background:rgba(108,239,0,.05);border:1px solid rgba(108,239,0,.14);border-radius:10px;padding:.6rem .75rem;margin:0 0 1.1rem;line-height:1.5}
.fb-fld-hint strong{color:var(--neon);font-weight:600}
/* Privacy toggle switch */
.fb-priv{display:inline-flex;align-items:center;gap:.45rem;cursor:pointer;user-select:none;margin:0;font-size:.76rem;font-weight:600;min-width:74px}
.fb-priv input{position:absolute;opacity:0;width:0;height:0}
.fb-priv-sw{position:relative;width:34px;height:19px;border-radius:999px;background:#2a302a;border:1px solid var(--line);transition:background .2s,border-color .2s;flex:none}
.fb-priv-sw::after{content:'';position:absolute;top:1.5px;left:1.5px;width:14px;height:14px;border-radius:50%;background:var(--muted);transition:transform .2s,background .2s}
.fb-priv input:checked ~ .fb-priv-sw{background:rgba(108,239,0,.22);border-color:var(--neon-dim)}
.fb-priv input:checked ~ .fb-priv-sw::after{transform:translateX(15px);background:var(--neon)}
.fb-priv-on,.fb-priv-off{display:none}
.fb-priv-on{color:var(--neon)}
.fb-priv-off{color:var(--muted)}
.fb-priv input:checked ~ .fb-priv-on{display:inline}
.fb-priv input:not(:checked) ~ .fb-priv-off{display:inline}
.fb-modal-actions{display:flex;justify-content:flex-end;align-items:center;gap:.7rem;margin-top:1.3rem;padding-top:1rem;border-top:1px solid var(--line)}

/* messages */
.inbox{list-style:none;padding:0;margin:0}
.inbox li{display:flex;align-items:center;gap:.6rem;padding:.5rem 0;border-bottom:1px solid var(--line)}
.msg-meta{display:flex;flex-direction:column;gap:.2rem;margin-bottom:.7rem;padding-bottom:.7rem;border-bottom:1px solid var(--line)}
.msg-body{white-space:pre-wrap}

/* buttons + forms */
.btn{background:var(--neon);color:#04220a;border:none;border-radius:8px;padding:.55rem 1.1rem;font-weight:700;cursor:pointer;font-size:.9rem}
.btn:hover{background:#8aff4d}
.btn.small{padding:.35rem .8rem;font-size:.82rem}
.btn.full{width:100%;margin-top:.4rem}
.mod .btn,.mod-header ~ .wrap .btn{background:var(--amber);color:#241800}
label{display:block;margin:.6rem 0;font-size:.9rem;color:var(--muted)}
label input{display:block;width:100%;margin-top:.25rem;background:var(--panel2);border:1px solid var(--line);
  border-radius:7px;color:var(--text);padding:.55rem;font:inherit}
.upload-form{display:flex;gap:.8rem;align-items:center;flex-wrap:wrap}
input[type=file]{color:var(--muted)}

/* tables + stats */
.tbl{width:100%;border-collapse:collapse;font-size:.9rem}
.tbl th,.tbl td{text-align:left;padding:.5rem .6rem;border-bottom:1px solid var(--line);vertical-align:top}
.tbl th{color:var(--muted);font-weight:600}
.stat-row{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1.1rem}
.stat{flex:1;min-width:140px;display:flex;flex-direction:column;gap:.2rem}
.stat .n{font-size:2rem;font-weight:800;color:var(--amber)}
.stat span:last-child{color:var(--muted);font-size:.85rem}

/* auth */
.auth-body{display:grid;place-items:center;min-height:100vh;padding:1.5rem}
.auth-card{max-width:380px;width:100%}
.auth-card .logo{display:block;margin-bottom:1rem;font-size:1.3rem}

/* footer */
.site-footer{max-width:1000px;margin:2rem auto 1rem;padding:1rem 1.2rem;border-top:1px solid var(--line);
  display:flex;justify-content:space-between;color:var(--muted);font-size:.82rem}

/* ═══ profile tabs (About / Friends / Photos) ═══ */

/* ── About tab: two-column Intro card ── */
.fbx-ab-card{display:flex;gap:0;padding:0}
.fbx-ab-nav{flex:0 0 250px;display:flex;flex-direction:column;gap:2px;padding:1rem .75rem;border-right:1px solid var(--line)}
.fbx-ab-nav-item{display:block;width:100%;text-align:left;background:transparent;border:0;border-radius:8px;padding:.62rem .7rem;font:inherit;font-size:.92rem;font-weight:600;color:var(--text);cursor:pointer;position:relative;transition:background .15s,color .15s}
.fbx-ab-nav-item:hover{background:var(--panel2)}
.fbx-ab-nav-item.on{background:rgba(108,239,0,.10);color:var(--neon)}
.fbx-ab-nav-item.on::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:3px;height:58%;border-radius:0 3px 3px 0;background:var(--neon)}
.fbx-ab-detail{flex:1 1 auto;min-width:0;padding:1.15rem 1.35rem}
.fbx-ab-group{margin-bottom:1.5rem}
.fbx-ab-group:last-child{margin-bottom:.2rem}
.fbx-ab-group[hidden]{display:none}
.fbx-ab-gtitle{margin:0 0 .35rem;font-size:1.12rem;font-weight:700;color:var(--text)}
.fbx-ab-rows{display:flex;flex-direction:column}
.fbx-ab-row{display:flex;align-items:center;gap:.85rem;padding:.72rem .1rem;border-top:1px solid var(--line)}
.fbx-ab-row:first-child{border-top:0}
.fbx-ab-ic{flex:none;width:24px;display:flex;align-items:center;justify-content:center;color:var(--muted)}
.fbx-ab-txt{flex:1 1 auto;min-width:0;font-size:.95rem;color:var(--text);line-height:1.35;word-break:break-word}
.fbx-ab-txt strong{font-weight:700;color:var(--text)}
.fbx-ab-meta{flex:none;display:flex;align-items:center;gap:.5rem;margin-left:.5rem}
.fbx-ab-vis{width:15px;height:15px;color:var(--muted);opacity:.85}
.fbx-ab-edit{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:0;border-radius:50%;background:transparent;color:var(--muted);cursor:pointer;opacity:0;transition:background .15s,color .15s,opacity .15s}
.fbx-ab-row:hover .fbx-ab-edit{opacity:1}
.fbx-ab-edit:hover{background:var(--panel2);color:var(--neon)}
@media (hover:none){.fbx-ab-edit{opacity:1}}
.fbx-ab-row-add{border-top:1px solid var(--line)}
.fbx-ab-add-btn{display:inline-flex;align-items:center;gap:.4rem;background:transparent;border:0;padding:.1rem 0;font:inherit;font-size:.95rem;font-weight:600;color:var(--neon-dim);cursor:pointer;transition:color .15s}
.fbx-ab-add-btn:hover{color:var(--neon);text-decoration:none}
.fbx-ab-plus{font-size:1.05rem;line-height:1}
.fbx-ab-empty{color:var(--muted);padding:1rem;margin:0}
/* About inline editors */
.fbx-ab-row{margin:0}
.fbx-ab-row[hidden]{display:none}
.fbx-ab-view{flex:1 1 auto;min-width:0;font-size:.95rem;color:var(--text);line-height:1.35;word-break:break-word}
.fbx-ab-view strong{font-weight:700}
.fbx-ab-sub{display:block;font-size:.76rem;color:var(--muted);font-weight:400;margin-top:.1rem}
select.fbx-ab-inp{cursor:pointer}
.fbx-ab-add{background:none;border:0;padding:0;font:inherit;font-size:.95rem;font-weight:600;color:var(--neon-dim);cursor:pointer;text-align:left}
.fbx-ab-add:hover{color:var(--neon);text-decoration:none}
.fbx-ab-editor{display:none}
.fbx-ab-row.editing{display:block;padding:.6rem 0}
.fbx-ab-row.editing .fbx-ab-ic,.fbx-ab-row.editing .fbx-ab-view,.fbx-ab-row.editing .fbx-ab-meta{display:none}
.fbx-ab-row.editing .fbx-ab-editor{display:block;border:1px solid var(--line);border-radius:12px;padding:1rem 1.1rem;background:var(--panel2)}
.fbx-ab-edlabel{display:block;font-size:.78rem;font-weight:600;color:var(--muted);margin-bottom:.42rem}
.fbx-ab-inp{width:100%;box-sizing:border-box;background:var(--panel);border:1px solid var(--line);border-radius:9px;color:var(--text);padding:.62rem .8rem;font:inherit;font-size:.92rem}
.fbx-ab-inp:focus{outline:none;border-color:var(--neon);box-shadow:0 0 0 3px rgba(108,239,0,.12)}
.fbx-ab-edfoot{display:flex;align-items:center;justify-content:space-between;gap:.7rem;margin-top:1rem;flex-wrap:wrap}
.fbx-ab-edbtns{display:flex;gap:.5rem;align-items:center}
.fbx-ab-save{white-space:nowrap}
/* Custom location autocomplete dropdown */
.fbx-ac-wrap{position:relative}
.fbx-ac-menu{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:40;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:5px;max-height:264px;overflow-y:auto;box-shadow:0 14px 34px rgba(0,0,0,.6)}
.fbx-ac-menu[hidden]{display:none}
.fbx-ac-item{display:flex;align-items:center;gap:.65rem;width:100%;background:none;border:0;color:var(--text);padding:.5rem .6rem;border-radius:8px;font:inherit;font-size:.9rem;cursor:pointer;text-align:left}
.fbx-ac-item svg{flex:none;color:var(--muted)}
.fbx-ac-item:hover{background:var(--panel2)}
.fbx-ac-item:hover svg{color:var(--neon)}
@media (max-width:900px){
  .fbx-ab-card{flex-direction:column}
  .fbx-ab-nav{flex-basis:auto;flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid var(--line);padding:.6rem;gap:.35rem}
  .fbx-ab-nav-item{width:auto;flex:none;white-space:nowrap}
  .fbx-ab-nav-item.on::before{display:none}
  .fbx-ab-detail{padding:1rem}
}

/* ── Friends tab (fbx-fr) ── */
.fbx-fr-wrap{padding:1.2rem 1.3rem 1.35rem}
.fbx-fr-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.1rem}
.fbx-fr-head-l{display:flex;align-items:baseline;gap:.55rem;min-width:0}
.fbx-fr-title{margin:0;font-size:1.35rem;font-weight:800;color:var(--text)}
.fbx-fr-count{color:var(--muted);font-size:.85rem;font-weight:600;white-space:nowrap}
.fbx-fr-search-wrap{position:relative;flex:1 1 auto;max-width:280px;min-width:170px}
.fbx-fr-search-ic{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--muted);pointer-events:none}
.fbx-fr-search{width:100%;background:var(--panel2);border:1px solid var(--line);border-radius:999px;color:var(--text);padding:.55rem .95rem .55rem 2.15rem;font:inherit;font-size:.88rem;transition:border-color .15s,box-shadow .15s}
.fbx-fr-search::placeholder{color:var(--muted)}
.fbx-fr-search:focus{outline:none;border-color:var(--neon);box-shadow:0 0 0 3px rgba(108,239,0,.12)}
.fbx-fr-sect[hidden]{display:none}
.fbx-fr-sect + .fbx-fr-sect{margin-top:1.5rem}
.fbx-fr-sect-title{margin:0 0 .85rem;padding-top:1.15rem;border-top:1px solid var(--line);font-size:1.08rem;font-weight:800;color:var(--text)}
.fbx-fr-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.85rem}
@media(max-width:600px){.fbx-fr-grid{grid-template-columns:1fr}}
.fbx-fr-card{display:flex;align-items:center;gap:.9rem;padding:.7rem .8rem;background:var(--panel2);border:1px solid var(--line);border-radius:12px;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease}
.fbx-fr-card[hidden]{display:none}
.fbx-fr-card:hover{transform:translateY(-2px);border-color:var(--neon-dim);box-shadow:0 8px 22px rgba(0,0,0,.45)}
.fbx-fr-avalink{flex:none;display:block;line-height:0}
.fbx-fr-ava{width:72px;height:72px;border-radius:12px;object-fit:cover;background:var(--panel);border:1px solid var(--line);display:grid;place-items:center}
.fbx-fr-ava-l{font-weight:800;color:var(--neon);font-size:1.85rem;line-height:1}
.fbx-fr-avalink:hover .fbx-fr-ava{border-color:var(--neon-dim)}
.fbx-fr-body{flex:1;min-width:0}
.fbx-fr-name{display:block;font-weight:700;color:var(--text);font-size:.98rem;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fbx-fr-name:hover{color:var(--neon);text-decoration:none}
.fbx-fr-sub{display:flex;align-items:center;gap:.3rem;margin-top:.2rem;color:var(--muted);font-size:.82rem;min-width:0}
.fbx-fr-handle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fbx-fr-act{flex:none;margin:0}
.fbx-fr-btn{display:inline-block;background:var(--panel);border:1px solid var(--line);color:var(--text);border-radius:8px;padding:.42rem .75rem;font:inherit;font-size:.82rem;font-weight:600;cursor:pointer;white-space:nowrap;transition:border-color .15s,color .15s,background .15s}
.fbx-fr-btn:hover{text-decoration:none}
.fbx-fr-msg:hover{border-color:var(--neon);color:var(--neon)}
.fbx-fr-remove:hover{border-color:var(--red);color:#ff8a8a}
.fbx-fr-add{background:var(--neon);color:#04220a;border-color:var(--neon)}
.fbx-fr-add:hover{background:#8aff4d;border-color:#8aff4d;color:#04220a}
.fbx-fr-empty{display:flex;flex-direction:column;align-items:center;gap:.7rem;text-align:center;padding:2.6rem 1rem;color:var(--muted)}
.fbx-fr-empty svg{color:var(--neon-dim);opacity:.85}
.fbx-fr-empty p{margin:0;max-width:34ch;font-size:.92rem}
.fbx-fr-noresult{text-align:center;padding:1.9rem 1rem;color:var(--muted);font-size:.9rem}
.fbx-fr-noresult[hidden]{display:none}
.fbx-fr-noresult .fbx-fr-q{color:var(--text);font-weight:600}

/* ── Photos tab (fbx-ph) ── */
.fbx-ph-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:2px}
.fbx-ph-title{font-size:20px;font-weight:700;color:var(--text);margin:0;letter-spacing:.2px}
.fbx-ph-add{display:inline-flex;align-items:center;gap:7px;background:rgba(108,239,0,.12);color:var(--neon);border:1px solid var(--neon-dim);border-radius:8px;padding:8px 14px;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease,transform .05s ease;appearance:none}
.fbx-ph-add:hover{background:rgba(108,239,0,.22)}
.fbx-ph-add:active{transform:translateY(1px)}
.fbx-ph-add svg{width:16px;height:16px;display:block}
.fbx-ph-tabs{display:flex;gap:4px;margin:14px 0 18px;border-bottom:1px solid var(--line)}
.fbx-ph-tab{position:relative;background:transparent;border:0;color:var(--muted);font-size:14px;font-weight:600;padding:9px 15px;cursor:pointer;border-radius:8px 8px 0 0;transition:color .15s ease,background .15s ease}
.fbx-ph-tab:hover{color:var(--text);background:var(--panel2)}
.fbx-ph-tab.is-active{color:var(--neon)}
.fbx-ph-tab.is-active::after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:3px;background:var(--neon);border-radius:3px 3px 0 0}
.fbx-ph-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.fbx-ph-tile{position:relative;aspect-ratio:1/1;border-radius:10px;overflow:hidden;background:var(--panel2);border:1px solid var(--line);padding:0;margin:0;cursor:pointer;display:block;text-align:left;appearance:none}
.fbx-ph-tile:focus-visible{outline:2px solid var(--neon);outline-offset:2px}
.fbx-ph-img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
.fbx-ph-tile:hover .fbx-ph-img{transform:scale(1.06)}
.fbx-ph-tile[hidden]{display:none}
.fbx-ph-tag{position:absolute;left:8px;bottom:8px;background:rgba(5,5,5,.72);color:var(--text);font-size:11px;font-weight:600;padding:3px 9px;border-radius:20px;letter-spacing:.3px;border:1px solid rgba(255,255,255,.08)}
.fbx-ph-addtile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--muted);border:1.5px dashed var(--line);background:var(--panel2);transition:border-color .15s ease,color .15s ease,background .15s ease}
.fbx-ph-addtile:hover{border-color:var(--neon-dim);color:var(--neon);background:rgba(108,239,0,.06)}
.fbx-ph-addtile svg{width:26px;height:26px;display:block}
.fbx-ph-addtile span{font-size:13px;font-weight:600}
.fbx-ph-none{display:none;padding:34px 20px;text-align:center;color:var(--muted);font-size:14px;font-weight:500}
.fbx-ph-none.is-on{display:block}
.fbx-ph-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:48px 20px;color:var(--muted)}
.fbx-ph-empty svg{width:44px;height:44px;opacity:.55;margin-bottom:12px;display:block}
.fbx-ph-empty p{margin:0;font-size:15px;font-weight:500}
@media (max-width:600px){.fbx-ph-grid{grid-template-columns:repeat(auto-fill,minmax(108px,1fr));gap:8px}.fbx-ph-title{font-size:18px}.fbx-ph-add span{display:none}.fbx-ph-add{padding:8px 10px}}

/* ── Photo lightbox / viewer (dark full-screen, click to enlarge, ‹ › to browse) ── */
.fb-ava-img{cursor:zoom-in}
.fbx-ph-img{cursor:zoom-in}
.fbx-lb{position:fixed;inset:0;background:rgba(0,0,0,.93);z-index:80;display:flex;align-items:stretch;justify-content:center}
.fbx-lb[hidden]{display:none}
.fbx-lb-stage{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.7rem;padding:2rem}
.fbx-lb-img{max-width:100%;max-height:88vh;object-fit:contain;border-radius:8px;box-shadow:0 20px 60px rgba(0,0,0,.7);background:#0a0a0a}
.fbx-lb.has-panel .fbx-lb-img{max-height:94vh}
.fbx-lb-cap{color:#e9e9e9;font-size:.9rem;font-weight:600;letter-spacing:.02em}
.fbx-lb-cap[hidden]{display:none}
.fbx-lb-panel{width:360px;flex:none;background:var(--panel);border-left:1px solid var(--line);display:flex;flex-direction:column;overflow-y:auto}
.fbx-lb-panel[hidden]{display:none}
@media(max-width:900px){.fbx-lb{flex-direction:column}.fbx-lb.has-panel .fbx-lb-img{max-height:44vh}.fbx-lb-panel{width:auto;max-height:52vh;border-left:0;border-top:1px solid var(--line)}}
.fbx-lb-close{position:fixed;top:1rem;left:1.2rem;right:auto;z-index:5;width:42px;height:42px;border-radius:50%;border:0;background:rgba(255,255,255,.13);color:#fff;font-size:1.25rem;line-height:1;cursor:pointer;display:grid;place-items:center;transition:background .15s}
.fbx-lb-close:hover{background:rgba(255,255,255,.26)}
.fbx-lb-nav{position:fixed;top:50%;transform:translateY(-50%);width:46px;height:46px;border-radius:50%;border:0;background:rgba(255,255,255,.13);color:#fff;font-size:1.9rem;line-height:1;cursor:pointer;display:grid;place-items:center;transition:background .15s;padding-bottom:4px}
.fbx-lb-nav:hover{background:rgba(255,255,255,.26)}
.fbx-lb-nav.prev{left:1.2rem}
.fbx-lb-nav.next{right:1.2rem}
.fbx-lb-nav[hidden]{display:none}
@media (max-width:600px){.fbx-lb-nav{width:38px;height:38px;font-size:1.5rem}.fbx-lb-nav.prev{left:.4rem}.fbx-lb-nav.next{right:.4rem}}

/* ── Cover/avatar "story" posts (an action line + the photo) ── */
.post-action{display:flex;align-items:center;gap:.45rem;color:var(--muted);font-size:.9rem;margin:.15rem 0 .7rem}
.post-action-ic{color:var(--muted);flex:none}
.post-photo{display:block;border-radius:10px;overflow:hidden;border:1px solid var(--line);background:#000}
.post-photo img{display:block;width:100%;height:auto}
.post-photo-img{cursor:zoom-in}
.post-photo.is-avatar{max-width:340px;margin:0 auto}
.post-photo.is-avatar img{aspect-ratio:1;object-fit:cover}

/* ══════ composer + post engagement (reactions · comments · share) ══════ */
.fbx-ava-letter-sm{display:grid;place-items:center;background:var(--panel2);color:var(--neon);font-weight:800}

/* Composer trigger card */
.fbx-cmp-box{padding:.9rem 1rem .5rem}
.fbx-cmp-top{display:flex;align-items:center;gap:.6rem}
.fbx-cmp-avawrap{width:40px;height:40px;flex:none}
.fbx-cmp-ava,.fbx-cmp-avawrap>*{width:40px;height:40px;border-radius:50%;object-fit:cover;flex:none}
.fbx-cmp-trigger{flex:1;text-align:left;background:var(--panel2);border:1px solid var(--line);border-radius:22px;padding:.6rem 1rem;color:var(--muted);font:inherit;font-size:1rem;cursor:pointer}
.fbx-cmp-trigger:hover{background:var(--line)}
.fbx-cmp-actions{display:flex;margin-top:.5rem;border-top:1px solid var(--line);padding-top:.35rem}
.fbx-cmp-act{flex:1;display:flex;align-items:center;justify-content:center;gap:.5rem;background:none;border:0;color:var(--muted);font:inherit;font-weight:600;font-size:.9rem;padding:.5rem;border-radius:8px;cursor:pointer}
.fbx-cmp-act:hover{background:var(--panel2)}
.fbx-cmp-act svg{width:22px;height:22px}

/* Composer modal */
.fbx-cmp-modal{position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:70;display:grid;place-items:center;padding:1rem}
.fbx-cmp-modal[hidden]{display:none}
.fbx-cmp-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;width:100%;max-width:500px;box-shadow:0 24px 64px rgba(0,0,0,.6);display:flex;flex-direction:column;max-height:92vh}
.fbx-cmp-head{display:flex;align-items:center;justify-content:center;position:relative;padding:.9rem;border-bottom:1px solid var(--line)}
.fbx-cmp-head h3{margin:0;font-size:1.15rem;font-weight:700}
.fbx-cmp-head .fb-icon-btn{position:absolute;right:.8rem;top:50%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%;background:var(--panel2)}
.fbx-cmp-id{display:flex;align-items:center;gap:.6rem;padding:.9rem 1rem .3rem}
.fbx-cmp-modal-avawrap{width:42px;height:42px;flex:none}
.fbx-cmp-modal-ava,.fbx-cmp-modal-avawrap>*{width:42px;height:42px;border-radius:50%;object-fit:cover}
.fbx-cmp-name{font-weight:700;display:block;line-height:1.2}
.fbx-priv-dd{position:relative;margin-top:2px}
.fbx-priv-btn{display:inline-flex;align-items:center;gap:.3rem;background:var(--panel2);border:1px solid var(--line);border-radius:6px;padding:.15rem .45rem;color:var(--text);font:inherit;font-size:.8rem;font-weight:600;cursor:pointer}
.fbx-priv-menu{position:absolute;top:calc(100% + 4px);left:0;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:5px;min-width:180px;box-shadow:0 12px 30px rgba(0,0,0,.5);z-index:5}
.fbx-priv-menu[hidden]{display:none}
.fbx-priv-item{display:flex;align-items:center;gap:.55rem;width:100%;text-align:left;background:none;border:0;color:var(--text);font:inherit;font-size:.9rem;padding:.5rem .6rem;border-radius:7px;cursor:pointer}
.fbx-priv-item:hover{background:var(--panel2)}
.fbx-priv-ic,.fbx-priv-iic{display:inline-flex;align-items:center;color:var(--muted);flex:none}
.fbx-priv-ic svg,.fbx-priv-iic svg{width:16px;height:16px}
.fbx-cmp-text{border:0;background:none;resize:none;width:100%;min-height:120px;max-height:40vh;padding:.4rem 1rem;color:var(--text);font:inherit;font-size:1.25rem;outline:none}
.fbx-cmp-preview{position:relative;margin:.4rem 1rem;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.fbx-cmp-preview[hidden]{display:none}
.fbx-cmp-preview img{display:block;width:100%;max-height:320px;object-fit:contain;background:#000}
.fbx-cmp-preview-x{position:absolute;top:8px;right:8px;width:30px;height:30px;border-radius:50%;border:0;background:rgba(20,20,20,.85);color:#fff;cursor:pointer}
.fbx-cmp-add{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin:.5rem 1rem;padding:.5rem .8rem;border:1px solid var(--line);border-radius:10px}
.fbx-cmp-add-lbl{font-weight:600;font-size:.92rem}
.fbx-cmp-add-icons{display:flex;gap:.2rem}
.fbx-cmp-add-ic{width:36px;height:36px;display:grid;place-items:center;border:0;background:none;border-radius:50%;cursor:pointer}
.fbx-cmp-add-ic:hover{background:var(--panel2)}
.fbx-cmp-add-ic.muted{cursor:default;opacity:.85}
.fbx-cmp-add-ic svg{width:24px;height:24px}
.fbx-cmp-post{margin:.3rem 1rem 1rem;padding:.6rem;border:0;border-radius:8px;background:var(--neon);color:#04210a;font:inherit;font-weight:800;font-size:1rem;cursor:pointer}
.fbx-cmp-post:disabled{background:var(--panel2);color:var(--muted);cursor:not-allowed}

/* Engagement bar */
.fbx-eng{margin-top:.6rem;border-top:1px solid var(--line);padding-top:.2rem}
.fbx-eng-sum{display:flex;align-items:center;justify-content:space-between;padding:.4rem .2rem;gap:.5rem}
.fbx-eng-sum[hidden]{display:none}
.fbx-eng-left,.fbx-eng-right{display:flex;align-items:center;gap:.25rem;background:none;border:0;color:var(--muted);font:inherit;font-size:.85rem;cursor:pointer}
.fbx-eng-left:hover .fbx-eng-rcount,.fbx-eng-right:hover{text-decoration:none}
.fbx-eng-chips{display:inline-flex}
.fbx-eng-chip{display:inline-flex;width:18px;height:18px;margin-left:-4px;border-radius:50%;box-shadow:0 0 0 1.5px var(--panel)}
.fbx-eng-chip svg{width:100%;height:100%;display:block}
.fbx-eng-chip:first-child{margin-left:0}
.fbx-eng-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--line);padding-top:.15rem;margin-top:.1rem}
.fbx-act-btn{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;gap:.45rem;background:none;border:0;color:var(--muted);font:inherit;font-weight:600;font-size:.92rem;padding:.5rem;border-radius:8px;cursor:pointer}
.fbx-act-btn:hover{background:var(--panel2)}
.fbx-act-btn svg,.fbx-like-svg{width:20px;height:20px}
.fbx-like-emoji{display:inline-flex;width:18px;height:18px}
.fbx-like-emoji svg{width:100%;height:100%;display:block}
.fbx-like-btn.is-active{color:var(--neon)}
.fbx-like-btn.rx-like{color:#2078f4}
.fbx-like-btn.rx-love{color:#f33e58}
.fbx-like-btn.rx-haha,.fbx-like-btn.rx-wow,.fbx-like-btn.rx-sad{color:#f7b125}
.fbx-like-btn.rx-angry{color:#e9710f}

/* Reaction picker (animated icons) */
.fbx-like-wrap{position:relative;flex:1;min-width:0}
.fbx-like-wrap .fbx-like-btn{width:100%}
.fbx-react-picker{position:absolute;bottom:calc(100% + 8px);left:0;display:flex;gap:2px;padding:5px 8px;background:var(--panel);border:1px solid var(--line);border-radius:26px;box-shadow:0 8px 26px rgba(0,0,0,.55);opacity:0;visibility:hidden;transform:translateY(8px) scale(.85);transform-origin:bottom left;transition:opacity .16s,transform .16s,visibility .16s;z-index:15}
.fbx-like-wrap:hover .fbx-react-picker,.fbx-react-picker:hover,.fbx-like-wrap.is-open .fbx-react-picker,.fbx-like-wrap:focus-within .fbx-react-picker{opacity:1;visibility:visible;transform:translateY(0) scale(1)}
.fbx-rx{border:0;background:none;cursor:pointer;padding:1px;line-height:0}
.fbx-rx-emoji{display:block;width:30px;height:30px;transform-origin:bottom center;transition:transform .13s}
.fbx-rx-emoji svg{width:100%;height:100%;display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,.25))}
.fbx-rx:hover .fbx-rx-emoji{transform:scale(1.4) translateY(-8px)}
.fbx-like-wrap:hover .fbx-rx-emoji,.fbx-like-wrap.is-open .fbx-rx-emoji,.fbx-like-wrap:focus-within .fbx-rx-emoji{animation:fbxRxPop .34s backwards}
.fbx-like-wrap:hover .fbx-rx:nth-child(1) .fbx-rx-emoji{animation-delay:.02s}
.fbx-like-wrap:hover .fbx-rx:nth-child(2) .fbx-rx-emoji{animation-delay:.06s}
.fbx-like-wrap:hover .fbx-rx:nth-child(3) .fbx-rx-emoji{animation-delay:.10s}
.fbx-like-wrap:hover .fbx-rx:nth-child(4) .fbx-rx-emoji{animation-delay:.14s}
.fbx-like-wrap:hover .fbx-rx:nth-child(5) .fbx-rx-emoji{animation-delay:.18s}
.fbx-like-wrap:hover .fbx-rx:nth-child(6) .fbx-rx-emoji{animation-delay:.22s}
@keyframes fbxRxPop{0%{transform:translateY(14px) scale(.3);opacity:0}70%{transform:translateY(-3px) scale(1.06)}100%{transform:translateY(0) scale(1);opacity:1}}
/* gentle idle "wave" bob so the reactions feel alive while the picker is open */
.fbx-like-wrap:hover .fbx-rx,.fbx-like-wrap.is-open .fbx-rx,.fbx-like-wrap:focus-within .fbx-rx{animation:fbxRxBob 1.5s ease-in-out infinite}
.fbx-rx:nth-child(2){animation-delay:.08s}
.fbx-rx:nth-child(3){animation-delay:.16s}
.fbx-rx:nth-child(4){animation-delay:.24s}
.fbx-rx:nth-child(5){animation-delay:.32s}
.fbx-rx:nth-child(6){animation-delay:.40s}
@keyframes fbxRxBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes fbxPopIn{0%{transform:scale(.4);opacity:0}70%{transform:scale(1.12)}100%{transform:scale(1);opacity:1}}

/* Detail modal (comment button) */
.fbx-detail{position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:75;display:grid;place-items:center;padding:1rem}
.fbx-detail[hidden]{display:none}
.fbx-detail-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;width:100%;max-width:560px;max-height:92vh;display:flex;flex-direction:column;box-shadow:0 24px 64px rgba(0,0,0,.6)}
.fbx-detail-head{display:flex;align-items:center;justify-content:center;position:relative;padding:.9rem;border-bottom:1px solid var(--line)}
.fbx-detail-head h3{margin:0;font-size:1.1rem;font-weight:700}
.fbx-detail-head .fb-icon-btn{position:absolute;right:.8rem;top:50%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%;background:var(--panel2)}
.fbx-detail-scroll{overflow-y:auto;padding:1rem}
.fbx-d-loading{padding:2rem;text-align:center;color:var(--muted)}

/* Post detail body (shared by detail modal + lightbox panel) */
.fbx-lb-panel .fbx-d-eng,.fbx-detail-scroll .fbx-d-eng{border-top:0;margin-top:0}
.fbx-lb-panel .fbx-d-eng{padding:1rem}
.fbx-d-head{display:flex;align-items:center;gap:.6rem;margin-bottom:.6rem}
.fbx-d-ava{width:40px;height:40px;border-radius:50%;object-fit:cover;flex:none}
.fbx-d-name{font-weight:700}
.fbx-d-sub{display:block;color:var(--muted);font-size:.8rem}
.fbx-d-body{margin:.2rem 0 .7rem;white-space:pre-wrap;word-break:break-word}
.fbx-d-photo{margin:0 0 .6rem;border-radius:10px;overflow:hidden;border:1px solid var(--line)}
.fbx-d-photo img{display:block;width:100%}
.fbx-d-comments{margin-top:.5rem;display:flex;flex-direction:column;gap:.7rem}
.fbx-d-empty{text-align:center;color:var(--muted);padding:1.4rem 1rem}
.fbx-d-empty svg{opacity:.5;margin-bottom:.4rem}
.fbx-d-empty p{margin:.2rem 0 0;font-weight:700;color:var(--text)}
.fbx-d-empty span{font-size:.85rem}

/* Comments */
.fbx-cm{display:flex;gap:.5rem;align-items:flex-start;animation:fbxPopIn .2s}
.fbx-cm-ava{width:32px;height:32px;border-radius:50%;object-fit:cover;flex:none}
.fbx-cm-main{min-width:0;flex:1}
.fbx-cm-bubble{background:var(--panel2);border-radius:16px;padding:.45rem .7rem;display:inline-block;max-width:100%}
.fbx-cm-name{display:block;font-weight:700;font-size:.85rem}
.fbx-cm-body{font-size:.92rem;word-break:break-word;white-space:pre-wrap}
.fbx-mention{color:var(--neon);font-weight:600;text-decoration:none}
.fbx-mention:hover{filter:brightness(1.18)}
/* @mention autocomplete dropdown (comment box). */
.fbx-mention-menu{position:absolute;z-index:200;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:4px;box-shadow:0 12px 32px rgba(0,0,0,.55);max-height:238px;overflow-y:auto}
.fbx-mention-item{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:7px;cursor:pointer}
.fbx-mention-item.on,.fbx-mention-item:hover{background:var(--panel2)}
.fbx-mention-ava,.fbx-mention-ava img,.fbx-mention-ava-l{width:32px;height:32px;border-radius:50%;object-fit:cover;flex:none}
.fbx-mention-ava-l{display:grid;place-items:center;background:var(--panel2);color:var(--neon);font-weight:800;font-size:.85rem}
.fbx-mention-idn{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.fbx-mention-nm{font-weight:600;font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fbx-mention-hd{color:var(--muted);font-size:.78rem}
.fbx-cm-meta{display:flex;align-items:center;gap:.9rem;padding:.15rem .7rem 0;color:var(--muted);font-size:.75rem}
.fbx-cm-del{background:none;border:0;color:var(--muted);cursor:pointer;font-size:.8rem}
.fbx-cm-act{background:none;border:0;color:var(--muted);font:inherit;font-size:.75rem;font-weight:700;cursor:pointer;padding:0}
.fbx-cm-act:hover{text-decoration:none}
.fbx-cm-act.danger:hover{color:#ff6b6b}
/* Comment "..." menu (holds Xoá + future actions) */
.fbx-cm-brow{display:flex;align-items:center;gap:.15rem;min-width:0}
.fbx-cm-menu{position:relative;flex:none}
.fbx-cm-menu-btn{width:28px;height:28px;border:0;background:none;color:var(--muted);border-radius:50%;cursor:pointer;display:grid;place-items:center;opacity:.45;transition:opacity .12s,background .12s,color .12s}
.fbx-cm:hover .fbx-cm-menu-btn,.fbx-cm-menu-btn:hover{opacity:1}
.fbx-cm-menu-btn:hover{background:var(--panel2);color:var(--text)}
.fbx-cm-menu-btn svg{width:16px;height:16px}
.fbx-cm-menu-list{position:absolute;top:calc(100% + 2px);left:0;z-index:20;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:.3rem;min-width:160px;box-shadow:0 10px 28px rgba(0,0,0,.55)}
.fbx-cm-menu-list[hidden]{display:none}
.fbx-cm-menu-item{display:flex;align-items:center;gap:.55rem;width:100%;border:0;background:none;color:var(--text);padding:.5rem .6rem;border-radius:7px;cursor:pointer;font-size:.9rem;font-weight:600;text-align:left;white-space:nowrap}
.fbx-cm-menu-item:hover{background:var(--panel2)}
.fbx-cm-menu-item.danger{color:#ff8a8a}
.fbx-cm-menu-item svg{width:17px;height:17px;flex:none}
/* Right side of the name row: time on top, 3-dot menu stacked BELOW it (a vertical column beside the bubble). */
.fbx-cm-rmeta{display:flex;flex-direction:column;align-items:flex-end;gap:.1rem;flex:none;align-self:flex-start;margin-top:.45rem}
.fbx-cm-time{white-space:nowrap;font-size:.72rem;font-weight:500;color:var(--muted)}
/* threaded replies */
.fbx-cm-thread{display:flex;flex-direction:column;gap:.7rem}
.fbx-cm-replies{display:flex;flex-direction:column;gap:.7rem;margin-left:2.5rem}
.fbx-cm-replies:empty{display:none}
.fbx-cm-reply-item .fbx-cm-ava{width:28px;height:28px}
.fbx-cm-replybox{display:flex;gap:.5rem;align-items:center;margin-left:2.5rem}
.fbx-cm-del:hover{color:#ff6b6b}
.fbx-cm-form{display:flex;gap:.5rem;align-items:center;margin-top:.7rem;position:sticky;bottom:0;background:var(--panel);padding:.4rem 0}
.fbx-cm-ava-wrap{flex:none}
.fbx-cm-selfava,.fbx-cm-ava-wrap>*{width:32px;height:32px;border-radius:50%;object-fit:cover;flex:none}
.fbx-cm-inputwrap{flex:1;display:flex;align-items:center;background:var(--panel2);border:1px solid var(--line);border-radius:18px;padding:.1rem .3rem .1rem .8rem}
.fbx-cm-input{flex:1;background:none;border:0;color:var(--text);font:inherit;padding:.45rem 0;outline:none}
.fbx-cm-send{background:none;border:0;color:var(--neon);cursor:pointer;padding:.3rem;display:grid;place-items:center}
.fbx-cm-send svg{width:18px;height:18px}

/* ══════ header icons + account dropdown ══════ */
.header-tools{display:flex;align-items:center;gap:.5rem;margin-left:auto}
.fbx-hdr-ic{width:40px;height:40px;border-radius:50%;border:0;background:var(--panel2);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;transition:background .15s;position:relative}
.fbx-hdr-ic:hover{background:var(--line)}
.fbx-hdr-ic svg{width:21px;height:21px}
.fbx-acct{position:relative}
.fbx-acct-btn{width:auto;padding:0 .35rem 0 .2rem;gap:.1rem}
.fbx-hdr-ava,.fbx-hdr-ava img,.fbx-hdr-ava .fbx-hdr-ava-l{width:30px;height:30px;border-radius:50%;object-fit:cover;flex:none}
.fbx-hdr-ava{overflow:hidden;display:inline-flex}
.fbx-hdr-ava-l{display:grid;place-items:center;background:var(--panel);color:var(--neon);font-weight:800;font-size:.9rem}
.fbx-acct-caret{color:var(--muted)}
.fbx-acct-menu{position:absolute;top:calc(100% + 8px);right:0;width:328px;max-width:92vw;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:8px;box-shadow:0 16px 40px rgba(0,0,0,.6);z-index:60}
.fbx-acct-menu[hidden]{display:none}
.fbx-acct-me{display:flex;align-items:center;gap:.7rem;padding:.6rem;border:1px solid var(--line);border-radius:10px;text-decoration:none;color:var(--text)}
.fbx-acct-me:hover{background:var(--panel2)}
.fbx-acct-me-ava,.fbx-acct-me-ava img,.fbx-acct-me-ava .fbx-hdr-ava-l{width:36px;height:36px;border-radius:50%;object-fit:cover;flex:none}
.fbx-acct-me-ava{overflow:hidden;display:inline-flex}
.fbx-acct-me-name{font-weight:700;font-size:1.02rem}
.fbx-acct-all{display:flex;align-items:center;gap:.7rem;margin-top:.4rem;padding:.6rem;border-radius:10px;background:var(--panel2);text-decoration:none;color:var(--text);font-weight:600;font-size:.9rem}
.fbx-acct-all:hover{background:var(--line)}
.fbx-acct-all svg{width:20px;height:20px;color:var(--muted);flex:none}
.fbx-acct-sep{height:1px;background:var(--line);margin:.55rem .2rem}
.fbx-acct form{margin:0}
.fbx-acct-item{display:flex;align-items:center;gap:.7rem;width:100%;text-align:left;background:none;border:0;color:var(--text);font:inherit;font-size:.95rem;font-weight:500;padding:.5rem;border-radius:8px;cursor:pointer}
.fbx-acct-item:hover{background:var(--panel2)}
.fbx-acct-ico{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.08);display:grid;place-items:center;flex:none}
.fbx-acct-ico svg{width:20px;height:20px}
.fbx-acct-lbl{flex:1;display:flex;flex-direction:column;line-height:1.25}
.fbx-acct-lbl small{color:var(--muted);font-size:.72rem;font-weight:600}
.fbx-acct-chev{color:var(--muted);flex:none}
.fbx-acct-foot{color:var(--muted);font-size:.72rem;line-height:1.6;padding:.6rem .5rem .2rem}
@media(max-width:600px){.fbx-acct-menu{width:290px}}
/* Messenger "Đoạn chat" dropdown */
.fbx-chat{position:relative}
.fbx-chat-panel{position:absolute;top:calc(100% + 8px);right:0;width:360px;max-width:94vw;max-height:80vh;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:.6rem;box-shadow:0 16px 40px rgba(0,0,0,.6);z-index:60;display:flex;flex-direction:column}
.fbx-chat-panel[hidden]{display:none}
.fbx-chat-head{display:flex;align-items:center;justify-content:space-between;padding:.2rem .4rem .5rem}
.fbx-chat-head h3{margin:0;font-size:1.35rem;font-weight:800}
.fbx-chat-full{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:var(--muted);background:var(--panel2);text-decoration:none}
.fbx-chat-full:hover{background:var(--line);color:var(--text)}
.fbx-chat-full svg{width:18px;height:18px}
.fbx-chat-search{display:flex;align-items:center;gap:.5rem;background:var(--panel2);border:1px solid var(--line);border-radius:20px;padding:.45rem .8rem;margin:.2rem 0 .5rem}
.fbx-chat-search svg{width:17px;height:17px;color:var(--muted);flex:none}
.fbx-chat-search input{flex:1;background:none;border:0;color:var(--text);font:inherit;outline:none}
.fbx-chat-tabs{display:flex;gap:.4rem;padding:0 .2rem .5rem;overflow-x:auto}
.fbx-chat-tabs button{background:var(--panel2);border:0;color:var(--muted);font:inherit;font-weight:600;font-size:.85rem;padding:.35rem .8rem;border-radius:16px;cursor:pointer;white-space:nowrap}
.fbx-chat-tabs button.on{background:rgba(108,239,0,.15);color:var(--neon)}
.fbx-chat-list{overflow-y:auto;flex:1;min-height:60px}
.fbx-chat-loading,.fbx-chat-empty{color:var(--muted);text-align:center;padding:1.4rem .5rem;font-size:.9rem}
.fbx-chat-item{display:flex;align-items:center;gap:.7rem;padding:.5rem;border-radius:10px;text-decoration:none;color:var(--text)}
.fbx-chat-item:hover{background:var(--panel2)}
.fbx-chat-ava,.fbx-chat-ava img{width:48px;height:48px;border-radius:50%;object-fit:cover;flex:none}
.fbx-chat-ava-l{display:grid;place-items:center;background:var(--panel2);color:var(--neon);font-weight:800;font-size:1.2rem}
.fbx-chat-item-main{min-width:0;flex:1;display:flex;flex-direction:column}
.fbx-chat-name{font-weight:600;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fbx-chat-last{color:var(--muted);font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fbx-chat-all{display:block;text-align:center;padding:.7rem;margin-top:.3rem;color:var(--neon);font-weight:600;font-size:.92rem;border-top:1px solid var(--line);text-decoration:none}
.fbx-chat-all:hover{background:var(--panel2)}
@media(max-width:600px){.fbx-chat-panel{width:300px}}

/* Header search (live search) */
.fbx-search{position:relative;display:flex;align-items:center;gap:.5rem;background:var(--panel2);border:1px solid var(--line);border-radius:22px;padding:.5rem .9rem;flex:0 1 260px;min-width:150px}
.fbx-search-ic{width:17px;height:17px;color:var(--muted);flex:none}
.fbx-search-input{flex:1;min-width:0;background:none;border:0;color:var(--text);font:inherit;font-size:.92rem;outline:none}
.fbx-search-panel{position:absolute;top:calc(100% + 8px);left:0;width:340px;max-width:90vw;max-height:70vh;overflow-y:auto;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:6px;box-shadow:0 16px 40px rgba(0,0,0,.6);z-index:60}
.fbx-search-panel[hidden]{display:none}
.fbx-sr-group{font-size:.72rem;font-weight:700;color:var(--muted);padding:.5rem .6rem .3rem;text-transform:uppercase;letter-spacing:.03em}
.fbx-sr-item{display:flex;align-items:center;gap:.7rem;padding:.5rem .6rem;border-radius:8px;text-decoration:none;color:var(--text)}
.fbx-sr-item:hover{background:var(--panel2)}
.fbx-sr-ava,.fbx-sr-ava img{width:40px;height:40px;border-radius:50%;object-fit:cover;flex:none}
.fbx-sr-ava-l{display:grid;place-items:center;background:var(--panel2);color:var(--neon);font-weight:800}
.fbx-sr-name{min-width:0;font-weight:600;font-size:.95rem;display:flex;flex-direction:column;line-height:1.25}
.fbx-sr-name-row{flex-direction:row;align-items:center;gap:3px;white-space:nowrap;overflow:hidden}
.fbx-sr-name-row .badge{margin-left:2px}
.fbx-sr-snippet{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.fbx-sr-sub{color:var(--muted);font-size:.8rem;font-weight:500}
.fbx-sr-empty{color:var(--muted);text-align:center;padding:1.2rem;font-size:.9rem}
/* Recent-searches history rows: person/query link + an ✕ remove button on the right. */
.fbx-sr-histhead{display:flex;align-items:center;justify-content:space-between}
.fbx-sr-clear{background:none;border:0;color:var(--neon);font-size:.72rem;font-weight:700;cursor:pointer;padding:.2rem .3rem;text-transform:none;letter-spacing:0}
.fbx-sr-clear:hover{filter:brightness(1.15)}
.fbx-sr-hist{display:flex;align-items:center;border-radius:8px}
.fbx-sr-hist:hover{background:var(--panel2)}
.fbx-sr-hist .fbx-sr-item{flex:1;min-width:0}
.fbx-sr-hist .fbx-sr-item:hover{background:none}
.fbx-sr-x{flex:none;width:30px;height:30px;margin-right:6px;border:0;background:none;color:var(--muted);border-radius:50%;cursor:pointer;display:grid;place-items:center}
.fbx-sr-x:hover{background:var(--line);color:var(--text)}
@media(max-width:1024px){.fbx-search{flex-basis:170px;min-width:44px}}
@media(max-width:600px){.fbx-search{display:none}}

/* ── Chat popup (Messenger) + realtime message notification ── */
.fbx-chatdock{position:fixed;bottom:0;right:1.5rem;display:flex;align-items:flex-end;gap:.8rem;z-index:70;pointer-events:none}
/* while a header dropdown (Messenger/notifications/account/search) is open, drop the chat dock
   below the header so the dropdown overlays it instead of hiding behind the chat windows */
.fbx-chatdock.fbx-behind{z-index:4}
.fbx-cw{width:328px;max-width:calc(100vw - 1rem);height:440px;max-height:72vh;background:var(--panel);border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;box-shadow:0 -2px 24px rgba(0,0,0,.5);display:flex;flex-direction:column;pointer-events:auto;animation:fbxCwIn .16s ease}
@keyframes fbxCwIn{from{transform:translateY(12px);opacity:0}to{transform:none;opacity:1}}
.fbx-cw.mini{height:auto}
.fbx-cw.mini .fbx-cw-body,.fbx-cw.mini .fbx-cw-inputbar{display:none}
.fbx-cw-head{position:relative;display:flex;align-items:center;gap:.5rem;padding:.5rem .7rem;border-bottom:1px solid var(--line);cursor:pointer}
.fbx-cw.has-unread .fbx-cw-head::after{content:"";position:absolute;top:8px;left:32px;width:11px;height:11px;border-radius:50%;background:#f0284a;border:2px solid var(--panel)}
.fbx-cw-ava,.fbx-cw-ava img,.fbx-cw-ava .fbx-cw-ava-l{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:none}
.fbx-cw-ava{display:inline-flex;position:relative}
.fbx-cw-ava-l{display:grid;place-items:center;background:var(--panel2);color:var(--neon);font-weight:800}
/* online dot on the dock chat-header avatar */
.fbx-cw-dot{position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;background:var(--online);border:2.5px solid var(--panel);box-sizing:border-box;display:none}
.fbx-cw-ava.is-online .fbx-cw-dot{display:block}

/* account-suspended (disabled) screen */
.fbx-disabled{max-width:460px;width:100%;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:2.4rem 2rem;text-align:center}
.fbx-disabled-ic{display:inline-flex;align-items:center;justify-content:center;width:84px;height:84px;border-radius:50%;background:rgba(255,59,59,.12);color:var(--red);margin-bottom:1rem}
.fbx-disabled-title{margin:.2rem 0 .6rem;font-size:1.4rem}
.fbx-disabled-desc{color:var(--muted);margin:0 0 1rem;line-height:1.6}
.fbx-disabled-reason{background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:.7rem 1rem;text-align:left;margin:0 0 1rem}
.fbx-disabled-reason span{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin-bottom:.2rem}
.fbx-disabled-reason p{margin:0;color:var(--text);word-break:break-word}
.fbx-disabled-note{color:var(--muted);font-size:.85rem;margin:0 0 1.4rem}
.fbx-disabled-logout{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--neon);color:#04220a;border:0;border-radius:10px;padding:.7rem 1.6rem;font-weight:800;font-size:.95rem;cursor:pointer;width:100%}
.fbx-disabled-logout:hover{filter:brightness(1.06)}
/* "content unavailable" page (viewing a hidden/disabled/deleted member). */
/* Centred in the viewport (below the header) and ~40% smaller overall. */
.fbx-unavail{display:flex;justify-content:center;align-items:center;min-height:calc(100vh - 120px);padding:1.5rem 1rem}
.fbx-unavail-card{max-width:320px;width:100%;text-align:center;display:flex;flex-direction:column;align-items:center}
.fbx-unavail-ic{width:72px;height:72px;border-radius:50%;background:var(--panel2);display:grid;place-items:center;margin-bottom:.85rem}
.fbx-unavail-ic svg{width:50px;height:50px}
.fbx-unavail-title{margin:.15rem 0 .4rem;font-size:.95rem;font-weight:800}
.fbx-unavail-desc{color:var(--muted);max-width:280px;line-height:1.5;margin:0 0 1rem;font-size:.8rem}
.fbx-unavail-btn{display:inline-flex;align-items:center;justify-content:center;background:var(--neon);color:#04220a;border:0;border-radius:8px;padding:.45rem 1.4rem;font-weight:800;font-size:.82rem;text-decoration:none;min-width:140px}
.fbx-unavail-btn:hover{filter:brightness(1.06)}
.fbx-unavail-back{margin-top:.55rem;background:none;border:0;color:var(--muted);font-weight:700;font-size:.82rem;cursor:pointer;padding:.3rem;transition:color .12s}
.fbx-unavail-back:hover{color:var(--text)}
.fbx-cw-id{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}
.fbx-cw-name{font-weight:700;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fbx-cw-status{color:var(--muted);font-size:.72rem}
.fbx-cw-icbtn{width:30px;height:30px;border:0;background:none;color:var(--muted);border-radius:50%;cursor:pointer;display:grid;place-items:center;flex:none}
.fbx-cw-icbtn:hover{background:var(--panel2);color:var(--text)}
.fbx-cw-icbtn svg{width:18px;height:18px}
.fbx-cw-body{flex:1;overflow-y:auto;padding:.7rem;display:flex;flex-direction:column;gap:.28rem}
.fbx-cw-empty{margin:auto;color:var(--muted);text-align:center;font-size:.88rem;padding:1rem}
.fbx-msg{max-width:82%;align-self:flex-start;display:flex;align-items:flex-end;gap:.4rem}
.fbx-msg span{display:inline-block;background:var(--panel2);color:var(--text);padding:.45rem .75rem;border-radius:16px;font-size:.92rem;word-break:break-word;white-space:pre-wrap}
.fbx-msg.mine{align-self:flex-end}
.fbx-msg.mine span{background:var(--neon);color:#0a1400}
/* Clickable URLs inside chat bubbles (dock + messages) — inherit bubble colour so it reads on both green & dark; persistent underline (NOT hover) signals the link */
.msg-url{color:inherit;text-decoration:underline;cursor:pointer;word-break:break-all;overflow-wrap:anywhere}
.msg-url:hover{opacity:.82}
.fbx-msg-ava,.fbx-msg-ava img{width:26px;height:26px;border-radius:50%;object-fit:cover;flex:none}
.fbx-msg-ava{overflow:hidden;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.fbx-msg-ava.fbx-msg-ava-l{background:var(--panel);border:1px solid var(--neon-dim);color:var(--neon);font-weight:800;font-size:.66rem}
.fbx-msg-ava-spacer{visibility:hidden;cursor:default}
/* Avatar → profile links: keep tight (no extra baseline gap) inside flex rows */
.avatar-link,.fbx-d-head>a,.fbx-cm>a{flex:none;display:inline-flex;line-height:0}
.fbx-cw-inputbar{display:flex;align-items:center;gap:.4rem;padding:.5rem .6rem;border-top:1px solid var(--line)}
.fbx-cw-inputwrap{flex:1;background:var(--panel2);border-radius:18px;padding:.1rem .8rem;display:flex}
.fbx-cw-text{flex:1;background:none;border:0;color:var(--text);font:inherit;padding:.45rem 0;outline:none}
.fbx-cw-send{width:34px;height:34px;border:0;background:none;color:var(--neon);border-radius:50%;cursor:pointer;display:grid;place-items:center;flex:none}
.fbx-cw-send:hover{background:var(--panel2)}
.fbx-cw-send svg{width:20px;height:20px}
@media(max-width:600px){.fbx-chatdock{right:.3rem;left:.3rem;gap:.3rem;justify-content:flex-end}.fbx-cw{width:min(94vw,328px)}.fbx-chatdock .fbx-cw:not(:last-child){display:none}}
.fbx-hdr-badge{position:absolute;top:-2px;right:-2px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#f3425f;color:#fff;font-size:.68rem;font-weight:800;display:grid;place-items:center;border:2px solid var(--panel)}
.fbx-hdr-badge[hidden]{display:none}
.fbx-msgtoast-wrap{position:fixed;left:1.2rem;bottom:1.2rem;display:flex;flex-direction:column;gap:.5rem;z-index:95}
.fbx-msgtoast{display:flex;align-items:center;gap:.6rem;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:.6rem .8rem;box-shadow:0 10px 30px rgba(0,0,0,.5);cursor:pointer;max-width:300px;opacity:0;transform:translateY(12px);transition:opacity .25s,transform .25s}
.fbx-msgtoast.show{opacity:1;transform:translateY(0)}
.fbx-mt-ava,.fbx-mt-ava img,.fbx-mt-ava .fbx-mt-ava-l{width:40px;height:40px;border-radius:50%;object-fit:cover;flex:none}
.fbx-mt-ava{overflow:hidden;display:inline-flex}
.fbx-mt-ava-l{display:grid;place-items:center;background:var(--panel2);color:var(--neon);font-weight:800}
.fbx-mt-main{min-width:0;display:flex;flex-direction:column;line-height:1.3}
.fbx-mt-main b{font-size:.92rem}
.fbx-mt-main>span{color:var(--muted);font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}

/* Bell notifications dropdown */
.fbx-bell{position:relative}
.fbx-bell-panel{position:absolute;top:calc(100% + 8px);right:0;width:360px;max-width:92vw;max-height:78vh;overflow-y:auto;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:8px;box-shadow:0 16px 40px rgba(0,0,0,.6);z-index:60}
.fbx-bell-panel[hidden]{display:none}
.fbx-bell-head{padding:.3rem .5rem .5rem}
.fbx-bell-head h3{margin:0;font-size:1.35rem;font-weight:800}
.fbx-bell-loading,.fbx-bell-empty{color:var(--muted);text-align:center;padding:1.4rem;font-size:.9rem}
.fbx-bell-item{display:flex;align-items:center;gap:.7rem;padding:.55rem .6rem;border-radius:10px;text-decoration:none;color:var(--text)}
.fbx-bell-item:hover{background:var(--panel2)}
.fbx-bell-ava{position:relative;flex:none;width:44px;height:44px}
.fbx-bell-ava img,.fbx-bell-ava .fbx-bell-ava-l{width:44px;height:44px;border-radius:50%;object-fit:cover}
.fbx-bell-ava-l{display:grid;place-items:center;background:var(--panel2);color:var(--neon);font-weight:800}
.fbx-bell-ava::after{content:"";position:absolute;right:-2px;bottom:-2px;width:19px;height:19px;border-radius:50%;border:2px solid var(--panel);background-size:11px;background-position:center;background-repeat:no-repeat}
.fbx-bell-ava.k-react::after{background-color:#f3425f;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 21s-7-4.4-9.5-8.4C1 9.8 2.7 6.5 6 6.5c2 0 3.2 1.2 4 2.4 0.8-1.2 2-2.4 4-2.4 3.3 0 5 3.3 3.5 6.1C19 16.6 12 21 12 21z'/%3E%3C/svg%3E")}
.fbx-bell-ava.k-comment::after{background-color:#2078f4;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M4 4h16v11H8l-4 4z'/%3E%3C/svg%3E")}
.fbx-bell-ava.k-share::after{background-color:#2fae4e;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M14 9V5l7 7-7 7v-4C9 12 6 15 5 19c0-6 3-10 9-10z'/%3E%3C/svg%3E")}
.fbx-bell-ava.k-clike::after{background-color:#2078f4;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M2 10h4v11H2zM22 10c0-1.1-.9-2-2-2h-5l.8-4a1.5 1.5 0 0 0-2.9-.7L8 10v11h10a2 2 0 0 0 2-1.7l1.9-7A2 2 0 0 0 22 10z'/%3E%3C/svg%3E")}
.fbx-bell-ava.k-mention::after{background-color:#7c3aed;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3.6'/%3E%3Cpath d='M15.6 8.4v5a2.6 2.6 0 0 0 5.2 0v-1.4a9 9 0 1 0-3.5 7'/%3E%3C/svg%3E")}
.fbx-bell-main{min-width:0;flex:1;display:flex;flex-direction:column;gap:.15rem}
.fbx-bell-text{font-size:.9rem;line-height:1.3;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.fbx-bell-time{color:var(--muted);font-size:.78rem}
@media(max-width:600px){.fbx-bell-panel{width:300px}}

/* Post "..." menu (Edit · Copy link · Delete) */
.fbx-pmenu{position:relative;flex:none;margin-left:auto}
.fbx-pmenu-btn{width:34px;height:34px;border-radius:50%;border:0;background:none;color:var(--muted);cursor:pointer;display:grid;place-items:center}
.fbx-pmenu-btn:hover{background:var(--panel2);color:var(--text)}
.fbx-pmenu-btn svg{width:20px;height:20px}
.fbx-pmenu-list{position:absolute;top:calc(100% + 4px);right:0;min-width:244px;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:6px;z-index:25;box-shadow:0 14px 34px rgba(0,0,0,.55)}
.fbx-pmenu-list[hidden]{display:none}
.fbx-pmenu-item{display:flex;align-items:center;gap:.7rem;width:100%;text-align:left;background:none;border:0;color:var(--text);font:inherit;font-size:.92rem;font-weight:600;padding:.55rem .6rem;border-radius:8px;cursor:pointer}
.fbx-pmenu-item:hover{background:var(--panel2)}
.fbx-pmenu-item svg{width:20px;height:20px;flex:none;color:var(--muted)}
.fbx-pmenu-item.danger:hover,.fbx-pmenu-item.danger:hover svg{color:#ff6b6b}

/* Inline post editor (edit-in-place, no modal) */
.fbx-ie{display:flex;flex-direction:column;gap:.55rem;margin:.2rem 0 .7rem}
.fbx-ie-text{width:100%;min-height:74px;max-height:40vh;resize:vertical;background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:.6rem .8rem;color:var(--text);font:inherit;font-size:1rem;outline:none}
.fbx-ie-text:focus{border-color:var(--neon)}
.fbx-ie-foot{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}
.fbx-ie-btns{display:flex;align-items:center;gap:.5rem;margin-left:auto}

/* Toast */
.fbx-toast{position:fixed;left:50%;bottom:2rem;transform:translateX(-50%) translateY(20px);background:#222;color:#fff;padding:.7rem 1.1rem;border-radius:8px;font-size:.9rem;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.5);opacity:0;transition:opacity .25s,transform .25s;z-index:90}
.fbx-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* ═══════════════ RESPONSIVE — phones (≤600) + iPads (≤900/≤1024) ═══════════════ */

/* Header: pull the centered nav out of absolute-centering so it can never overlap search/logo/icons */
@media (max-width:1024px){
  .mainnav{position:static;transform:none;margin:0}
}
@media (max-width:600px){
  .header-inner{padding:.55rem .7rem;gap:.6rem;flex-wrap:wrap}
  .header-tools{gap:.4rem}
  .header-tools>.fbx-hdr-ic{display:none}       /* hide only the decorative 9-dot "apps" icon */
  .site-header .mainnav{display:none}           /* member: Feed=logo link, Profile=account menu */
  .mod-header .mainnav{display:flex;order:3;flex-basis:100%;justify-content:center;gap:1.1rem;margin-top:.3rem}
  .mod-header .who{display:none}                /* mod: keep nav (its only nav) on its own row */
  .fbx-chat-panel,.fbx-bell-panel,.fbx-acct-menu{position:fixed;left:.5rem;right:.5rem;top:56px;width:auto;max-width:none;max-height:calc(100vh - 66px);overflow-y:auto}
  .fbx-msgtoast{max-width:calc(100vw - 2rem)}
  .wrap{padding:1.1rem 1rem}
}

/* Chat dock: right-anchored + grows left → cap visible windows so the active one's controls stay on-screen */
@media (max-width:1024px){
  .fbx-chatdock{max-width:calc(100vw - 1rem);overflow:hidden}
  .fbx-chatdock .fbx-cw:not(:nth-last-child(-n+2)){display:none}
}

/* Feed text must wrap (a pasted URL was the only thing that could push a card past 320px) */
.post-body{overflow-wrap:anywhere}
.name,.handle{overflow-wrap:anywhere}
.post-action span{overflow-wrap:anywhere;min-width:0}
.post-head-main{min-width:0}

/* Tabs already scroll horizontally — just hide the scrollbar chrome */
.fb-tabs{scrollbar-width:none}
.fb-tabs::-webkit-scrollbar{display:none}

/* Profile header / avatar / cover on phones */
@media (max-width:600px){
  .fb-cover{aspect-ratio:2.4/1}
  .fb-head{flex-direction:column;align-items:center;text-align:center;gap:.5rem;padding:0 1rem 1rem}
  .fb-ava-wrap{margin-top:-44px}
  .fb-ava-img,.fb-ava-letter{width:96px;height:96px}
  .fb-ava-letter{font-size:2.2rem}
  .fb-head-main{width:100%;padding-bottom:0}
  .fb-name{font-size:1.35rem}
  .fb-head-actions{width:100%;justify-content:center;padding-bottom:0}
  .fb-tabs{padding:0 .5rem}
  .fb-about th{width:96px}
}

/* Modals & short-screen (landscape phone / split view) reachability of Save/Submit */
.fbx-crop-card{max-height:calc(100vh - 2.4rem);display:flex;flex-direction:column}
.fbx-crop-body{overflow-y:auto;flex:1;min-height:0}
.fbx-report-card{max-height:84vh;overflow-y:auto}
@media (max-width:600px){
  .fbx-report-modal{padding:6vh .6rem}
  .fbx-lb-stage{padding:1rem}
  .fbx-cmp-modal,.fbx-detail{padding:.5rem}
  .fb-modal{padding:.6rem}
  .fb-vis-menu,.fbx-priv-menu,.fbx-pm-menu,.fbx-pmenu-list{max-width:calc(100vw - 1.5rem)}
}

/* Mod reports table scrolls horizontally on narrow screens */
.tbl-wrap{overflow-x:auto}

/* ── Shared / quoted sub-card: an original post embedded inside a share ── */
.fbx-embed{display:block;text-decoration:none;color:inherit;border:1px solid var(--line);border-radius:10px;background:var(--panel2);overflow:hidden;margin:.2rem 0 .7rem}
a.fbx-embed:hover{border-color:var(--neon-dim)}
.fbx-embed-head{display:flex;align-items:center;gap:.5rem;padding:.6rem .7rem 0;min-width:0}
.fbx-embed-ava{width:28px;height:28px;border-radius:50%;object-fit:cover;flex:none;background:var(--panel);border:1px solid var(--neon-dim);display:grid;place-items:center;font-weight:800;color:var(--neon);font-size:.8rem}
.fbx-embed-id{min-width:0}
.fbx-embed-name{display:block;font-weight:700;color:var(--text);font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fbx-embed-sub{display:block;color:var(--muted);font-size:.78rem;overflow-wrap:anywhere}
.fbx-embed-body{margin:.4rem 0 .6rem;padding:0 .7rem;color:var(--text);overflow-wrap:anywhere;white-space:pre-wrap}
.fbx-embed-body:last-child{margin-bottom:.7rem}
.fbx-embed-photo{margin-top:.2rem;border-top:1px solid var(--line);background:#000}
.fbx-embed-photo img{display:block;width:100%;height:auto;max-height:360px;object-fit:cover}
.fbx-embed.is-missing{display:flex;align-items:center;gap:.5rem;padding:.9rem .8rem;color:var(--muted);font-size:.88rem}
@media(max-width:600px){.fbx-embed-photo img{max-height:280px}}

/* ── Search results PAGE (header submit / Enter → /search?q=) — rail + people/posts ── */
.fbx-search{margin:0}   /* header search is now a <form>: neutralise any UA default form margin */
.fbx-srp{max-width:1000px;margin:0 auto;padding:1.4rem 1.2rem;display:grid;grid-template-columns:300px minmax(0,1fr);gap:1.4rem;align-items:start}
.fbx-srp-side{position:sticky;top:78px}
.fbx-srp-title{margin:.2rem 0 1rem;font-size:1.5rem;font-weight:800;color:var(--text)}
.fbx-srp-filter{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:.7rem}
.fbx-srp-filter-h{font-weight:800;color:var(--text);font-size:1.05rem;padding:.2rem .3rem .5rem}
.fbx-srp-f{display:flex;align-items:center;gap:.7rem;width:100%;text-align:left;background:none;border:0;color:var(--text);font:inherit;font-size:.95rem;padding:.6rem .55rem;border-radius:8px;cursor:pointer}
.fbx-srp-f svg{color:var(--muted);flex:none}
.fbx-srp-f:hover{background:var(--panel2)}
.fbx-srp-f.on{background:rgba(108,239,0,.1);color:var(--neon);font-weight:700}
.fbx-srp-f.on svg{color:var(--neon)}
.fbx-srp-main{min-width:0}
.fbx-srp-sec{padding:1rem 1.1rem}
.fbx-srp-sec-h{margin:.1rem 0 .7rem;font-size:1.15rem;font-weight:800;color:var(--text)}
.fbx-pr{display:flex;align-items:center;gap:.8rem;padding:.6rem .2rem;border-top:1px solid var(--line)}
.fbx-pr:first-of-type{border-top:0}
.fbx-pr-avalink{flex:none;line-height:0}
.fbx-pr-ava{width:56px;height:56px;border-radius:50%;object-fit:cover;background:var(--panel2);border:1px solid var(--neon-dim)}
.fbx-pr-ava-l{display:grid;place-items:center;font-weight:800;color:var(--neon);font-size:1.4rem}
.fbx-pr-main{flex:1;min-width:0}
.fbx-pr-name{display:block;font-weight:700;color:var(--text);font-size:1.02rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fbx-pr-name:hover{text-decoration:none;color:var(--neon)}
.fbx-pr-sub{color:var(--muted);font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fbx-pr-act{display:flex;align-items:center;gap:.5rem;flex:none;justify-content:flex-end}
.fbx-pr-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:104px;background:var(--panel2);border:1px solid var(--line);color:var(--text);border-radius:8px;padding:.45rem .9rem;font-weight:700;font-size:.85rem;cursor:pointer;white-space:nowrap}
.fbx-pr-btn svg{flex:none}
.fbx-pr-act .fbx-frdrop .fbx-pr-btn{min-width:0}
.fbx-pr-btn:hover{border-color:var(--neon);color:var(--neon)}
.fbx-pr-btn.primary{background:var(--neon);border-color:var(--neon);color:#04220a}
.fbx-pr-btn.primary:hover{filter:brightness(1.06);color:#04220a}
.fbx-postr{display:flex;align-items:flex-start;gap:.7rem;padding:.7rem .2rem;border-top:1px solid var(--line);color:inherit}
.fbx-postr:first-of-type{border-top:0}
.fbx-postr:hover{text-decoration:none}
.fbx-postr:hover .fbx-postr-snippet{text-decoration:none}
.fbx-postr-ic{width:40px;height:40px;border-radius:50%;background:var(--panel2);border:1px solid var(--line);display:grid;place-items:center;color:var(--muted);flex:none}
.fbx-postr-body{min-width:0}
.fbx-postr-snippet{display:block;color:var(--text);overflow-wrap:anywhere}
.fbx-postr-sub{display:block;color:var(--muted);font-size:.82rem;margin-top:.2rem}
@media(max-width:820px){
  .fbx-srp{grid-template-columns:1fr;gap:.9rem;padding:1rem}
  .fbx-srp-side{position:static}
  .fbx-srp-title{margin:.2rem 0 .6rem;font-size:1.3rem}
  .fbx-srp-filter{display:flex;flex-wrap:wrap;gap:.4rem;padding:.5rem}
  .fbx-srp-filter-h{width:100%;padding-bottom:.2rem}
  .fbx-srp-f{width:auto}
}
@media(max-width:600px){
  .fbx-pr{flex-wrap:wrap}
  .fbx-pr-act{width:100%;padding-left:calc(56px + .8rem)}
  .fbx-pr-btn{flex:1;text-align:center;justify-content:center}
}

/* ── Friend-request buttons (profile head + search cards) + bell request item ── */
.fb-head-actions .btn, .fb-head-actions .linkbtn{display:inline-flex;align-items:center;gap:.3rem}
.fb-head-actions .btn svg, .fb-head-actions .linkbtn svg{flex:none}
.fbx-fr-ok{background:var(--panel2)!important;color:var(--text)!important;border:1px solid var(--line)!important}
.fbx-fr-ok svg{color:var(--neon)}
.fbx-fr-ok:hover{border-color:var(--neon)!important}
.fbx-pr-btn{display:inline-flex;align-items:center;gap:.35rem}
.fbx-pr-btn svg{flex:none}
.fbx-bell-fr{display:flex;align-items:flex-start;gap:.6rem;padding:.55rem .6rem}
.fbx-bell-fr .fbx-bell-ava{flex:none}
.fbx-bell-ava.k-friend{background:none}
/* Friend request/accept get a blue "people" corner badge — without this the shared
   .fbx-bell-ava::after renders as an empty bordered circle that looks like a broken avatar. */
.fbx-bell-ava.k-friend::after{background-color:#2078f4;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M16 11a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm-8 0a3.5 3.5 0 1 0-3.5-3.5A3.5 3.5 0 0 0 8 11zm0 2c-2.7 0-6 1.3-6 4v2h8v-2c0-1 .4-1.9 1.1-2.6A9.6 9.6 0 0 0 8 13zm8 0c-.4 0-.8 0-1.2.1 1.3.8 2.2 2 2.2 3.9v2h6v-2c0-2.7-3.3-4-7-4z'/%3E%3C/svg%3E")}
.fbx-bell-frbtns{display:flex;gap:.4rem;margin-top:.45rem}
.fbx-bell-frbtn{display:inline-flex;align-items:center;gap:.25rem;background:var(--panel2);border:1px solid var(--line);color:var(--text);border-radius:6px;padding:.32rem .7rem;font:inherit;font-size:.8rem;font-weight:700;cursor:pointer}
.fbx-bell-frbtn:hover{border-color:var(--neon);color:var(--neon)}
.fbx-bell-frbtn.ok{background:var(--neon);border-color:var(--neon);color:#04220a}
.fbx-bell-frbtn.ok:hover{filter:brightness(1.06);color:#04220a}

/* ── Friend-state dropdown (Friends / Request sent → menu) ── */
.fbx-frdrop{position:relative;display:inline-block}
.fbx-frdrop form{margin:0}
.fbx-frdrop-chev{margin-left:.1rem;opacity:.85;transition:transform .15s}
.fbx-frdrop.open .fbx-frdrop-chev{transform:rotate(180deg)}
.fbx-frdrop-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:190px;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:6px;box-shadow:0 16px 40px rgba(0,0,0,.6);z-index:60;display:none}
.fbx-frdrop.open .fbx-frdrop-menu{display:block}
.fbx-frdrop-item{display:flex;align-items:center;gap:.6rem;width:100%;text-align:left;background:none;border:0;color:var(--text);font:inherit;font-size:.9rem;font-weight:600;padding:.55rem .6rem;border-radius:7px;cursor:pointer}
.fbx-frdrop-item svg{flex:none;color:var(--muted)}
.fbx-frdrop-item:hover{background:var(--panel2)}
.fbx-frdrop-item.danger:hover,.fbx-frdrop-item.danger:hover svg{color:#ff6b6b}

/* ── Comment edit (inline) + comment like (Phase B/C) ── */
.fbx-cm-ie{margin-top:2px}
.fbx-cm-ie-btns{display:flex;gap:8px;justify-content:flex-end;margin-top:6px}
.fbx-cm-like.is-liked{color:#2078f4;font-weight:700}
.fbx-cm-likecount{display:inline-flex;align-items:center;gap:3px;margin-left:2px;font-size:12px;color:var(--muted);cursor:pointer;background:var(--panel2);border-radius:11px;padding:1px 7px 1px 5px}
.fbx-cm-likecount:hover{filter:brightness(1.25);text-decoration:none}
.fbx-cm-likecount.hidden{display:none}
.fbx-cm-likeic{width:15px;height:15px;display:inline-flex}
.fbx-cm-likeic svg{width:15px;height:15px}

/* ── Who-reacted viewer (Phase D) ── */
.fbx-rxview{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6);padding:16px}
.fbx-rxview[hidden]{display:none}
.fbx-rxview-card{width:100%;max-width:548px;max-height:80vh;display:flex;flex-direction:column;background:var(--panel);border-radius:12px;overflow:hidden;box-shadow:0 12px 40px rgba(0,0,0,.5)}
.fbx-rxview-head{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid var(--line)}
.fbx-rxview-tabs{display:flex;gap:4px;overflow-x:auto;flex:1;scrollbar-width:thin}
.fbx-rxview-tab{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;padding:8px 12px;border:0;border-radius:8px;background:transparent;color:var(--muted);cursor:pointer;font-weight:600}
.fbx-rxview-tab.is-active{color:var(--text);background:var(--panel2)}
.fbx-rxview-tab b{color:inherit}
.fbx-rxview-tabic{width:18px;height:18px;display:inline-flex}
.fbx-rxview-tabic svg{width:18px;height:18px}
.fbx-rxview-list{overflow-y:auto;padding:6px}
.fbx-rxview-row{display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px;color:inherit;text-decoration:none}
.fbx-rxview-row:hover{background:var(--panel2)}
.fbx-rxview-avawrap{position:relative;flex:none;width:40px;height:40px}
.fbx-rxview-ava{width:40px;height:40px;border-radius:50%;object-fit:cover}
.fbx-rxview-badge{position:absolute;right:-3px;bottom:-3px;width:18px;height:18px;display:inline-flex}
.fbx-rxview-badge svg{width:18px;height:18px}
.fbx-rxview-name{font-weight:600;line-height:1.15}
.fbx-rxview-sub{display:block;font-weight:400;font-size:12px;color:var(--muted)}
@media (max-width:600px){ .fbx-rxview{padding:0} .fbx-rxview-card{max-width:none;max-height:100vh;height:100vh;border-radius:0} }

/* ── Verified seal — bright neon + glow, granted from /admin. Hover: "Tài khoản đã xác minh" ── */
.fbx-vf-seal{fill:var(--vf)}
.fbx-vf-check{fill:var(--vf-check)}
.fbx-vf-svg{display:block}
/* admin "Administrator" tick = blue + white check */
.fbx-vf-admin .fbx-vf-seal{fill:#1877F2}
.fbx-vf-admin .fbx-vf-check{fill:#fff}
.fbx-verified{display:inline-flex;align-items:center;justify-content:center;vertical-align:-2px;margin-left:4px;line-height:0;cursor:default;flex:none}
.fb-name .fbx-verified{vertical-align:-3px}
/* keep the tick from being clipped by ellipsis rules on name links */
.fbx-pr-name .fbx-verified,.name .fbx-verified{vertical-align:-2px}
/* instant hover tooltip (verified tick + anything carrying [data-tip]) */
.fbx-tip{position:fixed;z-index:9999;background:#000;color:#fff;font-size:.72rem;font-weight:600;padding:5px 9px;border-radius:7px;white-space:nowrap;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.5);opacity:0;transition:opacity .1s}
.fbx-tip.show{opacity:1}
.fbx-tip::after{content:"";position:absolute;top:100%;left:50%;transform:translateX(-50%);border:5px solid transparent;border-top-color:#000}
/* corner-overlay tick for avatar-only contexts (wrapper must be position:relative / .fbx-avaverif) */
.fbx-avaverif{position:relative}
.fbx-ava-vbadge{position:absolute;right:-3px;bottom:-3px;line-height:0;background:var(--bg);border-radius:50%;padding:1px;display:inline-flex;z-index:2}

/* ══════════ Messenger full page (/messages) ══════════ */
.msgr-wrap{max-width:none;margin:0;padding:0;height:calc(100dvh - var(--hdr-h,61px));overflow:hidden}
.msgr-wrap + .site-footer{display:none}
/* 2 columns by default; the info panel adds a 3rd track only when open (.show-info). */
.msgr{display:grid;grid-template-columns:360px minmax(0,1fr);height:100%;background:var(--bg)}
.msgr.show-info{grid-template-columns:360px minmax(0,1fr) 340px}
/* explicit display on flex children would defeat the [hidden] attribute — restore it */
.msgr-empty[hidden],.msgr-chat[hidden],.msgr-info[hidden]{display:none!important}

/* left · conversation list */
.msgr-list{border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;background:var(--panel)}
.msgr-list-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 6px;flex:none}
.msgr-list-title{margin:0;font-size:1.5rem;font-weight:800;letter-spacing:-.02em}
.msgr-list-newbtn{width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--panel2);color:var(--text);flex:none}
.msgr-list-newbtn svg{width:18px;height:18px}
.msgr-list-newbtn:hover{background:#1b201a}
.msgr-list-search{margin:6px 12px 8px;display:flex;align-items:center;gap:8px;background:var(--panel2);border-radius:999px;padding:8px 14px;flex:none}
.msgr-list-search svg{width:17px;height:17px;color:var(--muted);flex:none}
.msgr-list-search input{flex:1;min-width:0;background:transparent;border:0;outline:0;color:var(--text);font-size:.95rem}
.msgr-convs{flex:1;min-height:0;overflow-y:auto;padding:0 8px 10px}
.msgr-convs-empty{color:var(--muted);text-align:center;padding:30px 16px;font-size:.92rem;line-height:1.9}
.msgr-conv{width:100%;display:flex;align-items:center;gap:12px;padding:9px 10px;border:0;background:transparent;border-radius:12px;cursor:pointer;text-align:left;color:var(--text);font:inherit}
.msgr-conv:hover{background:var(--panel2)}
.msgr-conv.active{background:rgba(108,239,0,.10)}
.msgr-conv-avawrap{flex:none;width:52px;height:52px}
.msgr-conv-ava{width:52px;height:52px;border-radius:50%;object-fit:cover;display:block}
.msgr-conv-ava-l{width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#243019,#0f140c);color:var(--neon);font-weight:800;font-size:1.2rem}
.msgr-conv-main{flex:1;min-width:0}
.msgr-conv-name{display:flex;align-items:center;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msgr-conv-last{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:.86rem}
.msgr-conv-snippet{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.msgr-conv-dot,.msgr-conv-time{flex:none;white-space:nowrap}
.msgr-conv.active .msgr-conv-last{color:#b9c4b4}

/* center · active chat */
.msgr-main{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bg)}
.msgr-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted);gap:4px;padding:20px}
.msgr-empty-logo{color:var(--neon);opacity:.85}
.msgr-empty h2{margin:8px 0 0;color:var(--text);font-size:1.3rem}
.msgr-empty p{margin:0;max-width:280px}
.msgr-chat{flex:1;display:flex;flex-direction:column;min-height:0}
.msgr-chat-head{display:flex;align-items:center;gap:10px;padding:9px 14px;border-bottom:1px solid var(--line);flex:none}
.msgr-back{display:none;width:36px;height:36px;border:0;background:transparent;color:var(--neon);border-radius:50%;cursor:pointer;align-items:center;justify-content:center;flex:none}
.msgr-back svg{width:22px;height:22px}
.msgr-peer{display:flex;align-items:center;gap:10px;min-width:0;flex:1;color:var(--text)}
.msgr-peer-avawrap{flex:none;width:40px;height:40px}
.msgr-peer-ava{width:40px;height:40px;border-radius:50%;object-fit:cover;display:block}
.msgr-peer-ava-l{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,#243019,#0f140c);color:var(--neon);font-weight:800}
.msgr-peer-id{min-width:0}
.msgr-peer-name{display:flex;align-items:center;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msgr-peer-status{display:block;font-size:.76rem;color:var(--muted)}
.msgr-chat-actions{display:flex;align-items:center;gap:2px;flex:none}
.msgr-ic{width:38px;height:38px;border:0;background:transparent;color:var(--neon);border-radius:50%;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex:none}
.msgr-ic svg{width:20px;height:20px}
.msgr-ic:hover{background:var(--panel2)}
.msgr-thread{flex:1;min-height:0;overflow-y:auto;padding:16px 16px 8px;display:flex;flex-direction:column;gap:2px}
.msgr-thread-empty{margin:auto;color:var(--muted);text-align:center;padding:20px}
.msgr-b{display:flex;align-items:center;gap:8px;max-width:70%;position:relative}
.msgr-b.mine{margin-left:auto;justify-content:flex-end}
.msgr-b-txt{padding:8px 12px;border-radius:18px;background:var(--panel2);white-space:pre-wrap;word-break:break-word;font-size:.95rem;line-height:1.35}
.msgr-b.mine .msgr-b-txt{background:var(--neon);color:#0a1400;font-weight:500}
.msgr-b-content{display:flex;flex-direction:column;gap:3px;min-width:0;align-items:flex-start}
.msgr-b.mine .msgr-b-content{align-items:flex-end}
.msgr-b-img{display:block;max-width:240px;border-radius:16px;overflow:hidden;line-height:0;border:1px solid var(--line)}
.msgr-b-img img{width:100%;display:block;max-height:340px;object-fit:cover}
.msgr-b-ava{flex:none;width:28px;height:28px;border-radius:50%;object-fit:cover;align-self:flex-end}
.msgr-b-ava-l{display:flex;align-items:center;justify-content:center;align-self:flex-end;background:linear-gradient(135deg,#243019,#0f140c);color:var(--neon);font-weight:700;font-size:.8rem}
.msgr-b-ava-spacer{background:transparent}
.msgr-b-more{flex:none;width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:var(--muted);opacity:0;transition:opacity .12s}
.msgr-b:hover .msgr-b-more{opacity:1}
.msgr-b-more:hover{background:var(--panel2);color:var(--text)}
/* "Đã xem" read receipt under the last seen outgoing message */
.msgr-seen{align-self:flex-end;font-size:.7rem;color:var(--muted);margin:1px 6px 3px 0}
/* typing indicator bubble */
.msgr-typing .msgr-typing-bubble{display:inline-flex;align-items:center;gap:4px;padding:12px 14px;border-radius:18px;background:var(--panel2)}
.msgr-typing-dot{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:msgrTyping 1.3s infinite}
.msgr-typing-dot:nth-child(2){animation-delay:.18s}
.msgr-typing-dot:nth-child(3){animation-delay:.36s}
@keyframes msgrTyping{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
/* chat-popup dock: seen receipt + typing bubble.
   NOTE: `.fbx-msg span` (0,1,1) styles every span as a message bubble, so the typing
   dots/bubble MUST be scoped higher (0,2,0) or they render as empty panel boxes. */
.fbx-msg-seen{align-self:flex-end;font-size:.68rem;color:var(--muted);margin:0 4px 2px 0}
.fbx-cw-c{display:flex;flex-direction:column;gap:2px;min-width:0;align-items:flex-start}
.fbx-msg.mine .fbx-cw-c{align-items:flex-end}
.fbx-cw-img{display:block;max-width:180px;border-radius:12px;overflow:hidden;line-height:0;border:1px solid var(--line);cursor:pointer}
.fbx-cw-img img{width:100%;display:block;max-height:240px;object-fit:cover}
/* Global image theater — any image opens here IN-PAGE instead of a new browser tab. */
.fbx-imgview{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center}
.fbx-imgview[hidden]{display:none}
.fbx-imgview-bg{position:absolute;inset:0;background-color:#000;background-size:cover;background-position:center;filter:blur(30px) brightness(.45);transform:scale(1.12)}
.fbx-imgview-bg::after{content:"";position:absolute;inset:0;background:rgba(0,0,0,.5)}
.fbx-imgview-img{position:relative;max-width:94vw;max-height:92vh;object-fit:contain;border-radius:8px;box-shadow:0 20px 70px rgba(0,0,0,.75);background:#0a0a0a}
.fbx-imgview-x{position:fixed;top:1rem;right:1.2rem;z-index:2;width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.14);color:#fff;cursor:pointer;display:grid;place-items:center;transition:background .15s}
.fbx-imgview-x:hover{background:rgba(255,255,255,.28)}
.fbx-imgview-x svg{width:22px;height:22px}
.fbx-cw-attach{width:34px;height:34px;border:0;background:transparent;color:var(--neon);border-radius:50%;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex:none}
.fbx-cw-attach svg{width:19px;height:19px}
.fbx-cw-attach:hover{background:var(--panel2)}
/* Composer locked (partner deleted/disabled — can't message). */
.fbx-cw-locked,.msgr-compose-locked{opacity:.6}
.fbx-cw-locked .fbx-cw-text,.fbx-cw-locked .fbx-cw-send,.fbx-cw-locked .fbx-cw-attach,.msgr-compose-locked .msgr-compose-input,.msgr-compose-locked .msgr-send,.msgr-compose-locked .msgr-compose-ic{cursor:not-allowed}
.fbx-cw-preview{padding:8px 10px 0;flex:none}
.fbx-cw-preview-item{position:relative;display:inline-block}
.fbx-cw-preview-item img{max-width:90px;max-height:90px;border-radius:10px;display:block;border:1px solid var(--line);object-fit:cover}
.fbx-cw-preview-x{position:absolute;top:-7px;right:-7px;width:20px;height:20px;border-radius:50%;background:#000;color:#fff;border:2px solid var(--panel);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.fbx-cw-preview-x:hover{background:#222}
.fbx-msg.fbx-cw-typing{align-items:flex-end}
.fbx-cw-typing .fbx-typing-bubble{display:inline-flex;align-items:center;gap:4px;padding:10px 13px;border-radius:16px;background:var(--panel2)}
.fbx-cw-typing .fbx-typing-dot{width:7px;height:7px;min-width:7px;padding:0;border-radius:50%;background:var(--muted);display:inline-block;animation:msgrTyping 1.3s infinite}
.fbx-cw-typing .fbx-typing-dot:nth-child(2){animation-delay:.18s}
.fbx-cw-typing .fbx-typing-dot:nth-child(3){animation-delay:.36s}
/* attached-image preview (above the composer) */
.msgr-preview{padding:10px 14px 0;flex:none}
.msgr-preview-item{position:relative;display:inline-block}
.msgr-preview-item img{max-width:120px;max-height:120px;border-radius:12px;display:block;border:1px solid var(--line);object-fit:cover}
.msgr-preview-x{position:absolute;top:-8px;right:-8px;width:22px;height:22px;border-radius:50%;background:#000;color:#fff;border:2px solid var(--panel);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.msgr-preview-x:hover{background:#222}
.msgr-compose{display:flex;align-items:center;gap:8px;padding:10px 14px;border-top:1px solid var(--line);flex:none}
.msgr-compose-wrap{flex:1;min-width:0;background:var(--panel2);border-radius:999px;display:flex}
.msgr-compose-input{flex:1;min-width:0;background:transparent;border:0;outline:0;color:var(--text);font-size:.98rem;padding:10px 14px}
/* animated paper-plane "Send" button (requested snippet), retoned to social green */
.msgr-send{font-family:inherit;font-size:15px;background:var(--neon);color:#04120a;flex:none;
  padding:.5em .95em .5em .8em;display:inline-flex;align-items:center;border:0;border-radius:14px;
  overflow:hidden;cursor:pointer;transition:background .2s,transform .1s}
.msgr-send .msgr-send-txt{display:block;margin-left:.35em;font-weight:800;letter-spacing:.02em;transition:transform .3s ease-in-out}
.msgr-send svg{display:block;width:20px;height:20px;transform-origin:center center;transition:transform .3s ease-in-out}
.msgr-send:hover{background:#8bff29}
.msgr-send:hover .svg-wrapper{animation:msgr-fly .6s ease-in-out infinite alternate}
.msgr-send:hover svg{transform:translateX(1.1em) rotate(45deg) scale(1.1)}
.msgr-send:hover .msgr-send-txt{transform:translateX(4.6em)}
.msgr-send:active{transform:scale(.95)}
.msgr-send:disabled{opacity:.5;cursor:not-allowed}
@keyframes msgr-fly{from{transform:translateY(.1em)}to{transform:translateY(-.1em)}}

/* right · info panel */
.msgr-info{border-left:1px solid var(--line);background:var(--panel);overflow-y:auto;min-height:0}
.msgr-info-hero{display:flex;flex-direction:column;align-items:center;text-align:center;padding:22px 16px 14px;gap:6px}
.msgr-info-avawrap{width:84px;height:84px}
.msgr-info-ava{width:84px;height:84px;border-radius:50%;object-fit:cover;display:block}
.msgr-info-ava-l{display:flex;align-items:center;justify-content:center;width:84px;height:84px;border-radius:50%;background:linear-gradient(135deg,#243019,#0f140c);color:var(--neon);font-weight:800;font-size:2rem}
.msgr-info-name{display:flex;align-items:center;justify-content:center;gap:2px;margin:2px 0 0;font-size:1.15rem}
.msgr-info-profile{display:inline-flex;align-items:center;gap:7px;background:var(--panel2);color:var(--text);padding:8px 14px;border-radius:9px;font-size:.86rem;font-weight:600;margin-top:4px}
.msgr-info-profile svg{width:17px;height:17px}
.msgr-info-profile:hover{background:#1b201a}
.msgr-info-sections{padding:6px 8px 20px}
.msgr-info-sec{border-top:1px solid var(--line)}
.msgr-info-sec>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;padding:12px 10px;font-weight:600;font-size:.92rem}
.msgr-info-sec>summary::-webkit-details-marker{display:none}
.msgr-info-chev{transition:transform .15s;color:var(--muted);flex:none}
.msgr-info-sec[open]>summary .msgr-info-chev{transform:rotate(180deg)}
.msgr-info-secbody{padding:0 6px 8px}
.msgr-info-row{width:100%;display:flex;align-items:center;gap:10px;padding:9px 10px;border:0;background:transparent;color:var(--text);border-radius:8px;cursor:pointer;font-size:.88rem;text-align:left;font:inherit}
.msgr-info-row svg{width:18px;height:18px;flex:none;color:var(--muted)}
.msgr-info-row:hover{background:var(--panel2)}
.msgr-info-row.danger,.msgr-info-row.danger svg{color:var(--red)}
.msgr-info-none{color:var(--muted);font-size:.85rem;padding:4px 10px 8px;margin:0}
/* Media & files thumbnails grid. */
.msgr-info-media-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:2px 4px 6px}
.msgr-info-media-item{display:block;aspect-ratio:1/1;border-radius:8px;overflow:hidden;background:var(--panel2);cursor:pointer;line-height:0}
.msgr-info-media-item img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .15s}
.msgr-info-media-item:hover img{transform:scale(1.05)}
.msgr-info-status{margin:2px 0 0;color:var(--muted);font-size:.85rem}

/* online presence dot (green) overlaid on the avatar */
.msgr-conv-avawrap,.msgr-peer-avawrap,.msgr-info-avawrap{position:relative}
.msgr-dot{position:absolute;right:0;bottom:0;width:13px;height:13px;border-radius:50%;background:var(--online);border:2.5px solid var(--panel);display:none;box-sizing:border-box}
.msgr-peer-avawrap .msgr-dot{border-color:var(--bg)}
.is-online .msgr-dot{display:block}
.msgr-dot-lg{width:20px;height:20px;right:5px;bottom:5px;border-width:3px}
/* profile presence: green dot on the big avatar + status line under the name */
.fb-ava-wrap{position:relative}
.fb-ava-dot{position:absolute;right:12px;bottom:12px;width:24px;height:24px;border-radius:50%;background:var(--online);border:4px solid var(--panel);box-sizing:border-box}
.fb-presence{color:var(--muted);font-size:.9rem;margin-top:2px;display:flex;align-items:center;gap:6px}
.fb-presence.online{color:var(--online)}
.fb-presence.online::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--online);flex:none}

/* responsive */
@media(max-width:1100px){
  .msgr{grid-template-columns:320px minmax(0,1fr)}
  .msgr.show-info{grid-template-columns:320px minmax(0,1fr) 300px}
}
@media(max-width:900px){
  /* info panel becomes a fixed overlay drawer — never its own grid track */
  .msgr,.msgr.show-info{grid-template-columns:300px minmax(0,1fr)}
  .msgr-info[hidden]{display:none}
  .msgr-info:not([hidden]){position:fixed;top:var(--hdr-h,61px);right:0;bottom:0;width:min(340px,88vw);z-index:20;box-shadow:-8px 0 30px rgba(0,0,0,.5)}
}
@media(max-width:680px){
  .msgr,.msgr.show-info{grid-template-columns:1fr}
  .msgr-main{display:none}
  .msgr.show-chat .msgr-list{display:none}
  .msgr.show-chat .msgr-main{display:flex}
  .msgr-back{display:inline-flex}
  .msgr-info:not([hidden]){width:100%}
  .msgr-b{max-width:84%}
}

/* ══ Account settings page (/settings) ══ */
.fbx-settings{max-width:680px;margin:0 auto}
.fbx-set-title{font-size:1.6rem;margin:.2rem 0 1rem}
.fbx-set-flash{padding:.7rem 1rem;border-radius:10px;margin-bottom:1rem;font-weight:600}
.fbx-set-flash.ok{background:rgba(0,255,153,.12);color:var(--vf);border:1px solid rgba(0,255,153,.3)}
.fbx-set-flash.err{background:rgba(255,59,59,.12);color:#ff6b6b;border:1px solid rgba(255,59,59,.3)}
.fbx-set-card{margin-bottom:1.1rem}
.fbx-set-h{display:flex;align-items:center;gap:9px;font-size:1.15rem;margin:0 0 .3rem}
.fbx-set-sub{color:var(--muted);font-size:.9rem;margin:0 0 1rem;line-height:1.5}
.fbx-set-form{display:flex;flex-direction:column;gap:.9rem;max-width:400px}
.fbx-set-field{display:flex;flex-direction:column;gap:.35rem;font-size:.9rem;font-weight:600;color:var(--text)}
.fbx-set-hint{color:var(--muted);font-weight:400;font-size:.82rem}
.fbx-set-field input{background:var(--panel2);border:1px solid var(--line);border-radius:9px;padding:.65rem .8rem;color:var(--text);font-size:.95rem;font-weight:400}
.fbx-set-field input:focus{outline:none;border-color:var(--neon)}
.fbx-set-btn{align-self:flex-start;border:0;border-radius:9px;padding:.65rem 1.4rem;font-weight:800;font-size:.92rem;cursor:pointer}
.fbx-set-btn.primary{background:var(--neon);color:#04220a}
.fbx-set-btn.primary:hover{filter:brightness(1.06)}
.fbx-set-btn.danger{background:rgba(255,59,59,.14);color:#ff6b6b;border:1px solid rgba(255,59,59,.4)}
.fbx-set-btn.danger:hover{background:rgba(255,59,59,.22)}
.fbx-set-2fa-on{display:flex;align-items:center;gap:8px;color:var(--vf);background:rgba(0,255,153,.08);border:1px solid rgba(0,255,153,.25);border-radius:10px;padding:.7rem 1rem;margin-bottom:1rem;font-weight:600}
.fbx-set-step{display:flex;align-items:center;gap:9px;color:var(--muted);margin-bottom:.8rem;font-size:.9rem}
.fbx-set-stepn{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--neon);color:#04220a;font-weight:800;font-size:.8rem;flex:none}
.fbx-set-key{background:var(--panel2);border:1px dashed var(--neon-dim);border-radius:10px;padding:.8rem 1rem;margin-bottom:.8rem}
.fbx-set-key-lbl{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin-bottom:.3rem}
.fbx-set-key-val{font-family:ui-monospace,monospace;font-size:1.15rem;letter-spacing:.12em;color:var(--neon);word-break:break-all}
.fbx-set-otpauth{margin-bottom:1rem;font-size:.85rem;color:var(--muted)}
.fbx-set-otpauth code{word-break:break-all;color:var(--muted)}
@media(max-width:600px){.fbx-set-form{max-width:none}}

/* Accounts-Center-style settings (sidebar + grouped expandable rows) */
.fbx-ac{display:grid;grid-template-columns:300px 1fr;gap:2rem;max-width:1000px;margin:0 auto;align-items:start}
.fbx-ac-side{position:sticky;top:80px}
.fbx-ac-side-h{margin-bottom:1rem}
.fbx-ac-side-brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:1.15rem}
.fbx-ac-side-h p{color:var(--muted);font-size:.85rem;margin:.5rem 0 0;line-height:1.5}
.fbx-ac-navgroup{color:var(--muted);font-weight:700;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;margin:1rem 0 .4rem;padding:0 .3rem}
.fbx-ac-navlink{display:flex;align-items:center;gap:11px;padding:10px 12px;border-radius:10px;color:var(--text);font-weight:600;font-size:.92rem}
.fbx-ac-navlink svg{width:20px;height:20px;flex:none}
.fbx-ac-navlink:hover{background:var(--panel2)}
.fbx-ac-navlink.on{background:var(--panel2)}
.fbx-ac-main{min-width:0}
.fbx-ac-title{font-size:1.7rem;margin:0 0 1.2rem}
.fbx-ac-group{margin-bottom:1.8rem}
.fbx-ac-group-h{font-size:1.15rem;font-weight:800;margin:0}
.fbx-ac-group-sub{color:var(--muted);font-size:.86rem;margin:.2rem 0 .7rem}
.fbx-ac-row{background:var(--panel);border:1px solid var(--line);border-radius:12px;margin-bottom:8px;overflow:hidden}
.fbx-ac-row>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:15px 16px;font-weight:600}
.fbx-ac-row>summary::-webkit-details-marker{display:none}
.fbx-ac-row>summary:hover{background:var(--panel2)}
.fbx-ac-row-lbl{display:flex;align-items:center;gap:11px;flex:1;min-width:0}
.fbx-ac-row-lbl svg{width:20px;height:20px;flex:none;color:var(--muted)}
.fbx-ac-chev{color:var(--muted);transition:transform .15s;flex:none}
.fbx-ac-row[open]>summary .fbx-ac-chev{transform:rotate(90deg)}
.fbx-ac-row-status{font-size:.78rem;font-weight:700;color:var(--muted);background:var(--panel2);padding:2px 9px;border-radius:999px;white-space:nowrap}
.fbx-ac-row-status.on{color:var(--vf);background:rgba(0,255,153,.1)}
.fbx-ac-row-body{padding:6px 16px 18px;border-top:1px solid var(--line)}
@media(max-width:820px){.fbx-ac{grid-template-columns:1fr;gap:1rem}.fbx-ac-side{position:static}}
