/* Comm-unity by Pulse - social feed (v1) */
:root {
  --bg: #0b0714;
  --panel: #151022;
  --panel-2: #1d1630;
  --line: rgba(178, 60, 255, .22);
  --text: #f4efff;
  --muted: #a99bc4;
  --pink: #ff2f8f;
  --purple: #b23cff;
  --blue: #2d7cff;
  --grad: linear-gradient(135deg, #ff2f8f, #b23cff);
  --radius: 14px;
  --top-h: 60px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Outfit, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; }
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: var(--text); }
img, video { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 50; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 14px;
  padding-top: env(safe-area-inset-top); height: calc(var(--top-h) + env(safe-area-inset-top));
  background: rgba(11, 7, 20, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; box-shadow: 0 0 18px rgba(255,47,143,.45); }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: .01em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { flex: 1 1 auto; max-width: 300px; display: flex; align-items: center; gap: 6px; background: var(--panel-2); border-radius: 22px; padding: 0 12px; height: 40px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; }
.top-tabs { flex: 1 1 auto; display: flex; justify-content: center; gap: 6px; }
.top-tabs a { position: relative; width: 92px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 22px; border-radius: 10px; border-bottom: 3px solid transparent; }
.top-tabs a:hover { background: var(--panel-2); }
.top-tabs a.on { border-bottom-color: var(--pink); border-radius: 10px 10px 0 0; }
.dot { position: absolute; top: 6px; right: 22px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; font-style: normal; }
.me-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 22px; background: var(--panel-2); font-weight: 600; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 280px minmax(0, 640px) 320px; justify-content: space-between; gap: 24px; max-width: 1400px; margin: 0 auto; padding: 18px 16px 40px; }
.left, .right { position: sticky; top: calc(var(--top-h) + 18px); align-self: start; max-height: calc(100vh - var(--top-h) - 36px); overflow-y: auto; scrollbar-width: thin; }
.main { min-width: 0; }
.bottom-tabs { display: none; }
@media (max-width: 1180px) { .shell { grid-template-columns: 240px minmax(0, 1fr); } .right { display: none; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 10px 0 calc(80px + env(safe-area-inset-bottom)); }
  .left, .top-tabs, .me-chip { display: none; }
  .search { max-width: none; }
  .brand-name { display: none; }
  .bottom-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(11,7,20,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; font-size: 11px; color: var(--muted); font-weight: 600; }
  .bottom-tabs a span { position: relative; font-size: 21px; line-height: 1.1; }
  .bottom-tabs a.on { color: #fff; }
  .bottom-tabs a.on span { filter: drop-shadow(0 0 6px rgba(255,47,143,.8)); }
  .bottom-tabs .dot { top: -4px; right: -12px; }
  .card { border-radius: 0; border-left: 0; border-right: 0; }
}

/* ---------- side menus ---------- */
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px; font-weight: 600; background: none; border: 0; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--panel-2); }
.menu .ic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--panel-2); font-size: 18px; flex: 0 0 auto; }
.side-h { color: var(--muted); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 18px 10px 8px; display: flex; justify-content: space-between; }
.side-h a { color: var(--pink); text-transform: none; letter-spacing: 0; }
.hr { height: 1px; background: var(--line); margin: 10px 8px; }
.foot { color: var(--muted); font-size: 12px; margin: 16px 10px; line-height: 1.6; }

/* ---------- avatar ---------- */
.av { position: relative; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; color: #fff; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av.s28 { width: 28px; height: 28px; font-size: 12px; } .av.s32 { width: 32px; height: 32px; font-size: 13px; }
.av.s36 { width: 36px; height: 36px; } .av.s56 { width: 56px; height: 56px; font-size: 22px; }
.av.s160 { width: 168px; height: 168px; font-size: 60px; border: 5px solid var(--bg); }
.tick { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 10px; align-items: center; justify-content: center; margin-left: 4px; vertical-align: 1px; }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.card-pad { padding: 14px 16px; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 700; background: var(--panel-2); }
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--grad); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.empty { text-align: center; color: var(--muted); padding: 36px 16px; }
.loading { text-align: center; color: var(--muted); padding: 40px 16px; }

/* ---------- stories ---------- */
.stories { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { position: relative; flex: 0 0 auto; width: 112px; height: 196px; border-radius: 12px; overflow: hidden; background: var(--panel-2); border: 0; padding: 0; text-align: left; }
.story .bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .25s; }
.story:hover .bg { transform: scale(1.04); }
.story::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 35%, transparent 60%, rgba(0,0,0,.7)); }
.story .av { position: absolute; top: 8px; left: 8px; z-index: 1; box-shadow: 0 0 0 3px var(--pink); }
.story .nm { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 1; font-size: 13px; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 3px #000; }
.story .cap { position: absolute; inset: 44px 8px 30px; z-index: 1; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.story.add .bg { background: var(--panel-2); }
.story.add .plus { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); z-index: 1; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; font-size: 26px; border: 4px solid var(--panel); }
.story.add::after { display: none; }
.story.add .nm { text-align: center; text-shadow: none; }
.g-sunset { background: linear-gradient(160deg, #ff7a18, #ff2f8f 55%, #6a00f4); }
.g-ocean { background: linear-gradient(160deg, #00c6ff, #0072ff 60%, #1b0b4f); }
.g-neon { background: linear-gradient(160deg, #ff2f8f, #b23cff 60%, #2d7cff); }
.g-forest { background: linear-gradient(160deg, #11998e, #38ef7d); }
.g-midnight { background: linear-gradient(160deg, #232526, #414345); }

/* ---------- composer ---------- */
.composer .row { display: flex; gap: 10px; align-items: center; }
.composer .fake { flex: 1; text-align: left; background: var(--panel-2); border: 0; border-radius: 22px; padding: 11px 16px; color: var(--muted); }
.composer .fake:hover { filter: brightness(1.15); }
.composer .acts { display: flex; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.composer .acts button { flex: 1; background: none; border: 0; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.composer .acts button:hover { background: var(--panel-2); color: var(--text); }

/* ---------- posts ---------- */
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-head .who small { color: var(--muted); font-size: 12.5px; }
.post-more { background: none; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; color: var(--muted); }
.post-more:hover { background: var(--panel-2); }
.post-text { padding: 10px 16px 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.post-text.big { font-size: 22px; font-weight: 600; padding: 28px 20px; text-align: center; background: var(--grad); margin: 10px 0 0; }
.post-media { background: #000; display: block; width: 100%; max-height: 640px; object-fit: contain; cursor: zoom-in; }
.post-stats { display: flex; justify-content: space-between; padding: 10px 16px; color: var(--muted); font-size: 13.5px; }
.post-stats .likes { display: flex; align-items: center; gap: 6px; }
.post-stats .heart { width: 20px; height: 20px; border-radius: 50%; background: var(--grad); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.post-stats button { background: none; border: 0; color: var(--muted); padding: 0; }
.post-stats button:hover { text-decoration: underline; }
.post-acts { display: flex; margin: 0 12px; border-top: 1px solid var(--line); padding: 4px 0; }
.post-acts button { flex: 1; background: none; border: 0; padding: 9px 4px; border-radius: 8px; font-weight: 700; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; }
.post-acts button:hover { background: var(--panel-2); }
.post-acts button.liked { color: var(--pink); }
.comments { padding: 4px 16px 14px; border-top: 1px solid var(--line); }
.cmt { display: flex; gap: 8px; margin-top: 10px; }
.cmt .bubble { background: var(--panel-2); border-radius: 16px; padding: 7px 12px; max-width: calc(100% - 40px); }
.cmt .bubble b { font-size: 13.5px; }
.cmt .bubble div { overflow-wrap: anywhere; white-space: pre-wrap; }
.cmt-time { color: var(--muted); font-size: 12px; margin: 3px 0 0 12px; }
.cmt-form { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.cmt-form input { flex: 1; min-width: 0; background: var(--panel-2); border: 0; border-radius: 20px; padding: 9px 14px; outline: 0; }
.cmt-form button { background: var(--grad); border: 0; border-radius: 50%; width: 38px; height: 38px; color: #fff; font-size: 16px; flex: 0 0 auto; }

/* ---------- right column ---------- */
.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; }
.side-card h3 { margin: 2px 4px 10px; font-size: 16px; }
.notice { padding: 8px 4px; border-top: 1px solid var(--line); }
.notice:first-of-type { border-top: 0; }
.notice b { display: block; font-size: 14px; margin-bottom: 3px; }
.notice p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.notice img { width: 100%; border-radius: 10px; margin-top: 6px; max-height: 160px; object-fit: cover; }
.person { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-radius: 10px; }
.person .nm { flex: 1; min-width: 0; }
.person .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.person .nm small { color: var(--muted); font-size: 12.5px; }

/* ---------- profile ---------- */
.cover { height: 300px; background: var(--grad); background-size: cover; background-position: center; border-radius: var(--radius) var(--radius) 0 0; }
.prof-head { position: relative; padding: 0 20px 16px; display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: -84px; }
.prof-head .info { flex: 1; min-width: 200px; padding-bottom: 10px; }
.prof-head h1 { margin: 0; font-size: 30px; }
.prof-head .acts { display: flex; gap: 8px; padding-bottom: 12px; }
.prof-bio { padding: 0 20px 16px; white-space: pre-wrap; }
@media (max-width: 860px) { .cover { height: 190px; border-radius: 0; } .prof-head { margin-top: -60px; justify-content: center; text-align: center; } .av.s160 { width: 128px; height: 128px; } .prof-head .acts { justify-content: center; width: 100%; } }

/* ---------- hubs ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.hub-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.hub-card .hc { height: 96px; background: var(--grad); background-size: cover; background-position: center; }
.hub-card .hb { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.hub-card .hb b { font-size: 16px; }
.hub-card .hb p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-top: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--pink); border-bottom-color: var(--pink); }

/* ---------- notifications ---------- */
.notif { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; }
.notif:hover { background: var(--panel-2); }
.notif.unread { background: rgba(255,47,143,.08); }
.notif .tx { flex: 1; min-width: 0; line-height: 1.35; }
.notif .tx small { display: block; color: var(--pink); font-size: 12.5px; margin-top: 2px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.modal-head { display: flex; align-items: center; justify-content: center; position: relative; padding: 14px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 18px; }
.modal-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--panel-2); font-size: 18px; }
.modal-body { padding: 14px 16px 16px; }
.modal textarea { width: 100%; min-height: 130px; resize: vertical; background: transparent; border: 0; outline: 0; font-size: 19px; }
.preview { position: relative; margin: 8px 0; border-radius: 10px; overflow: hidden; background: #000; }
.preview img, .preview video { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.preview button { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); }
.add-bar { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.swatches { display: flex; gap: 8px; margin: 10px 0; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; }
.swatches button.on { border-color: #fff; }
.field { width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; outline: 0; margin-bottom: 10px; }

/* story viewer */
.viewer { position: fixed; inset: 0; z-index: 120; background: #000; display: flex; align-items: center; justify-content: center; }
.viewer .frame { position: relative; width: min(420px, 100%); height: min(100%, 760px); border-radius: 14px; overflow: hidden; background: #111; }
.viewer .frame .bg { position: absolute; inset: 0; background-size: contain; background-repeat: no-repeat; background-position: center; }
.viewer .bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; gap: 4px; }
.viewer .bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.35); overflow: hidden; }
.viewer .bars i b { display: block; height: 100%; width: 0; background: #fff; }
.viewer .who { position: absolute; top: 22px; left: 12px; right: 52px; z-index: 2; display: flex; align-items: center; gap: 8px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.viewer .cap { position: absolute; left: 16px; right: 16px; bottom: 36px; z-index: 2; text-align: center; font-size: 20px; font-weight: 700; text-shadow: 0 1px 4px #000; white-space: pre-wrap; }
.viewer .cap.mid { top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.viewer .x { position: absolute; top: 18px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.4); font-size: 18px; }
.viewer .tap { position: absolute; top: 60px; bottom: 0; width: 50%; z-index: 1; }
.viewer .tap.l { left: 0; } .viewer .tap.r { right: 0; }
.lightbox { position: fixed; inset: 0; z-index: 130; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 96vw; max-height: 94vh; object-fit: contain; }

/* sign in */
.signin { max-width: 400px; margin: 40px auto; text-align: center; }
.signin .brand-mark { width: 72px; height: 72px; font-size: 36px; margin: 0 auto 14px; }
.signin h1 { margin: 0 0 4px; }
.err { color: #ff7a9c; font-size: 14px; margin: 6px 0; }

/* toast */
#toastRoot { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--panel-2); border: 1px solid var(--purple); padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }

/* menus */
.pop { position: absolute; right: 12px; top: 48px; z-index: 30; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 180px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.pop button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; font-weight: 600; }
.pop button:hover { background: rgba(255,255,255,.06); }
.pop button.danger { color: #ff7a9c; }
.post { position: relative; }

/* ---------- v2 polish: icons, tabs, online, glow ---------- */
.ico { display: block; flex: 0 0 auto; }
.search > span { display: flex; color: var(--muted); }
.top { border-bottom: 0; box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(0,0,0,.35); }
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,47,143,.7), rgba(178,60,255,.7), transparent); }
.top-tabs a { color: var(--muted); transition: color .15s, background .15s; }
.top-tabs a.on { color: var(--pink); }
.top-tabs a.on .ico { filter: drop-shadow(0 0 6px rgba(255,47,143,.7)); }
.bottom-tabs a span { display: flex; align-items: center; justify-content: center; height: 26px; }
.menu .ic { color: #fff; }
.menu .ic.c1 { background: linear-gradient(135deg, #2d7cff, #7a5cff); }
.menu .ic.c2 { background: linear-gradient(135deg, #ff2f8f, #b23cff); }
.menu .ic.c3 { background: linear-gradient(135deg, #00c2a8, #2d7cff); }
.menu .ic.c4 { background: linear-gradient(135deg, #ff8a00, #ff2f8f); }
.menu .ic.c5 { background: linear-gradient(135deg, #b23cff, #2d7cff); }
.composer .acts button { display: flex; align-items: center; justify-content: center; gap: 8px; }
.composer .acts .a1 .ico { color: #3ddc84; } .composer .acts .a2 .ico { color: #ffb020; } .composer .acts .a3 .ico { color: var(--pink); }
.composer { background: linear-gradient(var(--panel), var(--panel)) padding-box, linear-gradient(135deg, rgba(255,47,143,.55), rgba(178,60,255,.25), rgba(45,124,255,.4)) border-box; border: 1px solid transparent; }
.post-acts button .ico { width: 20px; height: 20px; }
.post-acts button.liked .ico { fill: var(--pink); stroke: var(--pink); filter: drop-shadow(0 0 5px rgba(255,47,143,.6)); }
.post-acts button.liked { animation: pop .25s ease; }
@keyframes pop { 50% { transform: scale(1.08); } }
.card.post { transition: border-color .2s; }
.card.post:hover { border-color: rgba(255,47,143,.35); }
.feed-tabs { display: flex; gap: 6px; margin: 0 0 12px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.feed-tabs button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 9px; font-weight: 700; color: var(--muted); }
.feed-tabs button.on { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(255,47,143,.3); }
@media (max-width: 860px) { .feed-tabs { margin: 0 10px 10px; } }
.on-wrap { position: relative; display: inline-flex; }
.on-dot { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #3ddc84; border: 2px solid var(--panel); display: inline-block; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.photo-grid img, .photo-grid video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: #000; }
.about-row { display: flex; gap: 12px; align-items: flex-start; padding: 9px 2px; color: var(--text); }
.about-row .ico { color: var(--muted); margin-top: 1px; }
.prof-head .av.s160 { box-shadow: 0 0 0 3px rgba(255,47,143,.6), 0 0 30px rgba(255,47,143,.35); }
.story .av { box-shadow: 0 0 0 3px var(--pink), 0 0 12px rgba(255,47,143,.6); }
.notice video { max-height: 160px; background: #000; }
@media (max-width: 860px) { .card, .side-card { border-radius: 0; border-left: 0; border-right: 0; margin-bottom: 8px; } .hub-grid { padding: 0 10px; } }

/* ---------- Messenger (phone first) ---------- */
.menu .ic.c6 { background: linear-gradient(135deg, #00c6ff, #b23cff); }
.round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--panel-2); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 auto; cursor: pointer; color: var(--text); }
.round:hover { filter: brightness(1.2); }
.msg-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; }
.msg-top h2 { margin: 0; font-size: 26px; }
.conv { display: flex; align-items: center; gap: 12px; padding: 9px 14px; }
.conv:hover { background: var(--panel-2); }
.conv .cv { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conv .cv b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.conv .cv small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.conv.unread .cv b { font-weight: 800; } .conv.unread .cv small { color: var(--text); font-weight: 600; }
.udot { min-width: 22px; height: 22px; border-radius: 11px; background: var(--pink); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.gav { position: relative; width: 56px; height: 56px; flex: 0 0 auto; }
.gav .av { position: absolute; border: 2px solid var(--panel); }
.gav .av:first-child { top: 0; right: 0; } .gav .av:nth-child(2) { bottom: 0; left: 0; }
.gav .av:only-child { top: 10px; left: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { background: var(--grad); border-radius: 14px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.person.pick { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }
.person.pick:hover { background: var(--panel-2); }
.tickbox { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; background: var(--panel-2); }

.thread { display: flex; flex-direction: column; height: calc(100vh - var(--top-h) - 52px); min-height: 420px; overflow: hidden; }
.th-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.th-head > a.round { font-size: 28px; line-height: 1; }
.th-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.th-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.th-t small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-head .gav { width: 40px; height: 40px; } .th-head .gav .av { width: 26px; height: 26px; font-size: 11px; }
.th-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; background: rgba(61,220,132,.12); border-bottom: 1px solid rgba(61,220,132,.35); font-weight: 600; }
.th-body { flex: 1; overflow-y: auto; padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.day { align-self: center; color: var(--muted); font-size: 12px; font-weight: 700; margin: 12px 0 6px; }
.msg { display: flex; align-items: flex-end; gap: 6px; max-width: 82%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .mb { position: relative; display: flex; flex-direction: column; }
.msg .mn { color: var(--muted); font-size: 12px; margin: 6px 0 2px 12px; }
.msg .mt { background: var(--panel-2); padding: 8px 13px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.35; }
.msg.me .mt { background: var(--grad); color: #fff; }
.msg .mm img, .msg .mm video { display: block; max-width: min(260px, 70vw); max-height: 320px; border-radius: 16px; cursor: zoom-in; background: #000; }
.msg .mm { margin-bottom: 2px; }
.mtime { color: var(--muted); font-size: 11px; margin: 2px 10px 4px; display: none; }
.msg:hover .mtime, .msg:last-child .mtime { display: block; }
.msg.me .mtime { text-align: right; }
.rx { display: flex; gap: 3px; margin: -6px 6px 2px; z-index: 1; }
.msg.me .rx { justify-content: flex-end; }
.rxc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1px 6px; font-size: 13px; }
.rxc.mine { border-color: var(--pink); }
.rx-pick { position: absolute; bottom: 100%; left: 0; z-index: 20; display: flex; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 26px; padding: 4px 6px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.msg.me .rx-pick { left: auto; right: 0; }
.rx-pick button { border: 0; background: none; font-size: 24px; width: 40px; height: 40px; border-radius: 50%; }
.rx-pick button:hover { background: rgba(255,255,255,.08); transform: scale(1.15); }
.th-send { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.th-send #thText { flex: 1; min-width: 0; background: var(--panel-2); border: 0; outline: 0; border-radius: 22px; padding: 11px 16px; font-size: 16px; }
.th-send .send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; font-size: 18px; flex: 0 0 auto; }
@media (max-width: 860px) {
  body.in-thread .top, body.in-thread .bottom-tabs { display: none; }
  body.in-thread .shell { padding: 0; }
  body.in-thread .thread { position: fixed; inset: 0; height: auto; min-height: 0; border: 0; border-radius: 0; margin: 0; z-index: 60; padding-top: env(safe-area-inset-top); }
  .msg-list { min-height: calc(100vh - 140px); }
}

/* calls */
.call { position: fixed; inset: 0; z-index: 300; background: radial-gradient(circle at 50% 30%, #2a1446, #07040d 70%); display: flex; flex-direction: column; color: #fff; }
.call-grid { flex: 1; display: grid; gap: 6px; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; grid-template-columns: 1fr; }
.call-grid.n2 { grid-template-rows: 1fr 1fr; } .call-grid.n3, .call-grid.n4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 861px) { .call-grid.n2 { grid-template-rows: none; grid-template-columns: 1fr 1fr; } }
.call-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; flex: 1; text-align: center; }
.call-wait b { font-size: 26px; } .call-wait small { color: #cbb8ff; font-size: 15px; }
.call.ringing .call-wait .av { animation: ring 1.4s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,47,143,.6); } 70% { box-shadow: 0 0 0 30px rgba(255,47,143,0); } 100% { box-shadow: 0 0 0 0 rgba(255,47,143,0); } }
.call-tile { position: relative; border-radius: 16px; overflow: hidden; background: #140c22; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 0; }
.call-tile .ct-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.call-tile.has-video .ct-av { display: none; }
.call-tile > b { position: absolute; left: 10px; bottom: 8px; font-size: 14px; text-shadow: 0 1px 3px #000; z-index: 1; }
.call-tile:not(.has-video) > b { position: static; }
.call-self { position: absolute; right: 12px; bottom: calc(100px + env(safe-area-inset-bottom)); width: 110px; height: 160px; object-fit: cover; border-radius: 14px; border: 2px solid rgba(255,255,255,.3); background: #000; transform: scaleX(-1); z-index: 2; }
.call-bar { display: flex; justify-content: center; gap: 16px; padding: 16px 16px calc(22px + env(safe-area-inset-bottom)); }
.cb { width: 58px; height: 58px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; backdrop-filter: blur(6px); }
.cb.off { background: #fff; color: #000; opacity: .85; }
.cb.end { background: #e11d48; } .cb.ok { background: #16a34a; }

/* ---------- posts v2: reactions, polls, feelings, shares, replies ---------- */
.menu .ic.c7 { background: linear-gradient(135deg, #7a5cff, #ff2f8f); font-size: 17px; }
.composer .acts .a4 { color: var(--muted); }
.composer .acts button { font-size: 14px; padding: 8px 4px; }
@media (max-width: 480px) { .composer .acts button { font-size: 12.5px; gap: 4px; } .composer .acts .ico { width: 18px; height: 18px; } }
.post-stats .likes { display: flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--muted); padding: 0; cursor: pointer; font-size: 13.5px; }
.rx-stack { display: inline-flex; }
.rx-stack i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--panel-2); border: 2px solid var(--panel); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; margin-left: -6px; }
.rx-stack i:first-child { margin-left: 0; }
.rx-big { font-size: 18px; line-height: 1; }
.post-acts button.liked { color: var(--pink); }
.react-pick { position: absolute; left: 12px; bottom: 48px; z-index: 25; display: flex; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 32px; padding: 5px 8px; box-shadow: 0 10px 30px rgba(0,0,0,.55); animation: rpop .16s ease-out; }
@keyframes rpop { from { transform: translateY(8px) scale(.9); opacity: 0; } }
.react-pick button { border: 0; background: none; font-size: 28px; width: 46px; height: 46px; border-radius: 50%; transition: transform .12s; }
.react-pick button:hover { transform: scale(1.3) translateY(-4px); }
@media (max-width: 480px) { .react-pick button { font-size: 25px; width: 40px; height: 40px; } }
.rx-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rx-tabs span { background: var(--panel-2); border-radius: 14px; padding: 4px 10px; font-weight: 700; }
.rx-badge { position: absolute; right: -4px; bottom: -4px; font-style: normal; font-size: 14px; }
.post-feel .feel { display: block; padding: 6px 16px 0; color: var(--muted); font-size: 14px; }
.poll { margin: 4px 16px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.poll > b { font-size: 16px; }
.poll-opt { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.poll-opt .pbar { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(178,60,255,.28); transition: width .4s; }
.poll-opt.mine { border-color: var(--pink); } .poll-opt.mine .pbar { background: rgba(255,47,143,.32); }
.poll-opt .ptx, .poll-opt .ppc { position: relative; }
.shared { margin: 4px 16px 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.02); }
.shared .post-head { padding: 10px 12px 0; } .shared .post-text { padding: 8px 12px 10px; font-size: 14.5px; }
.shared .post-media { max-height: 360px; }
.mention { color: #ff8fc8; font-weight: 600; }
.cmt.reply { margin-left: 40px; }
.cmt-time button { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 700; font-size: 12px; cursor: pointer; }
.cmt-time button:hover { text-decoration: underline; } .cmt-time button.on { color: var(--pink); }
.clk { display: inline-block; margin-top: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 6px; font-size: 11.5px; }
.replying { margin-top: 10px; font-size: 13px; color: var(--muted); }
.replying button { background: none; border: 0; color: var(--muted); }
.feel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0; max-height: 220px; overflow-y: auto; }
.feel-grid button { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 9px; text-align: left; font-weight: 600; }
.feel-grid button:hover { border-color: var(--pink); }
.poll-build { margin: 8px 0; }
.share-opts { display: grid; gap: 8px; } .share-opts .btn { justify-content: flex-start; padding: 13px 16px; }
