/* ===== LAAS Community (Phase 1: Posts + Follow/Followers) =====
   Scoped accent only - no global palette changes. Mode shell mirrors spot-trade-mode (full-bleed dark,
   outer sidebar/topbar hidden, own bottom tab bar) but with its own purple-to-teal identity per the
   reference design, layered on the app's existing near-black dark-surface tones so it still reads as
   the same app. */
:root{
  --community-purple:#7b5cff;
  --community-purple-2:#9b6bff;
  --community-teal:#22d3c5;
  --community-gradient:linear-gradient(135deg,var(--community-purple),var(--community-teal));
  --community-bg:#050814;
  --community-card:#0d1224;
  --community-line:#1c2340;
  --community-muted:#8a93b8;
}

#app.community-mode{background:var(--community-bg)}
#app.community-mode .main{margin-left:0;background:var(--community-bg);min-height:100vh}
#app.community-mode .topbar{
  display:flex;
  position:sticky;
  top:0;
  z-index:120;
  background:rgba(5,8,25,.94)!important;
  border-bottom:1px solid rgba(124,141,255,.16);
  box-shadow:0 10px 30px rgba(0,0,0,.25)!important;
  backdrop-filter:blur(18px);
}
#app.community-mode .topbar-brand{display:flex}
#app.community-mode .topbar .bell-btn{display:none}
#app.community-mode .module-toggle{border-color:rgba(124,141,255,.2);background:#0d1227}
#app.community-mode .mod-seg{color:#8f98ba}
#app.community-mode .mod-seg.active{background:linear-gradient(135deg,#745cff,#28d3dd);color:#fff;box-shadow:0 6px 16px rgba(83,92,255,.25)}
#app.community-mode .sidebar{display:none}
#app.community-mode .view-root{width:100%;max-width:640px;padding:14px 14px calc(108px + env(safe-area-inset-bottom));margin:0 auto;background:var(--community-bg);color:#eef1ff;overflow-x:hidden}

.community-mode{display:grid;gap:14px;color:#eef1ff;font-family:'DM Sans',system-ui,sans-serif;width:100%;min-width:0}
.community-content{display:grid;gap:14px;min-width:0}

/* ---- Discover hero (People tab) ---- */
.community-discover-hero{background:linear-gradient(135deg,rgba(123,92,255,.18),rgba(34,211,197,.12));border:1px solid var(--community-line);border-radius:20px;padding:20px}
.community-discover-hero h2{margin:0 0 4px;font:800 26px Manrope;background:var(--community-gradient);-webkit-background-clip:text;background-clip:text;color:transparent}
.community-discover-hero p{margin:0;color:var(--community-muted);font-size:14px}

/* ---- Segmented control (All People / Following / Discover) ---- */
.community-segmented{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px}
.community-segmented button{flex:none;border:1px solid var(--community-line);background:var(--community-card);color:#c7cdea;font-weight:700;font-size:13px;padding:10px 16px;border-radius:999px;cursor:pointer;white-space:nowrap}
.community-segmented button.active{background:var(--community-gradient);border-color:transparent;color:#fff}

.community-search{width:100%;box-sizing:border-box;border:1px solid var(--community-line);background:var(--community-card);color:#fff;border-radius:14px;padding:12px 14px;font:inherit;font-size:13px;outline:0}
.community-search:focus{border-color:var(--community-purple)}

/* ---- People list ---- */
.community-people-list{display:grid;gap:10px}
.community-person-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid var(--community-line);background:var(--community-card);border-radius:16px;padding:14px;cursor:pointer}
.community-person-info{min-width:0}
.community-person-info strong{display:block;font-size:14px}
.community-person-info p{margin:3px 0 0;color:var(--community-muted);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.community-person-info small{display:block;margin-top:5px;color:#4fd8c4;font-size:11px;font-weight:700}
.community-follow-btn{border:0;border-radius:999px;padding:9px 18px;font-size:12px;font-weight:800;cursor:pointer;background:var(--community-gradient);color:#fff;white-space:nowrap}
.community-follow-btn.following{background:none;border:1px solid var(--community-line);color:#c7cdea}
.community-follow-btn.state-friend{background:none;border:1px solid #2ecc71;color:#2ecc71}
.community-follow-btn.state-followsYou{background:var(--community-purple-2);border:0;color:#fff}
.community-relationship-tag{display:inline-block;margin-top:5px;padding:3px 9px;border-radius:999px;font-size:10px;font-weight:800}
.community-relationship-tag.friend{background:rgba(46,204,113,.15);color:#2ecc71}
.community-relationship-tag.follows-you{background:rgba(155,107,255,.18);color:var(--community-purple-2)}
.community-relationship-tag.suggested{background:rgba(138,147,184,.15);color:var(--community-muted)}

/* ---- Avatars ---- */
.community-avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;display:grid;place-items:center;flex-shrink:0}
.community-avatar-initials{background:var(--community-gradient);color:#fff;font-weight:800;font-size:15px}
.community-avatar-lg{width:84px;height:84px;font-size:26px;margin:0 auto}

/* ---- Posts feed ---- */
.community-scope-toggle{display:flex;gap:8px}
.community-scope-toggle button{flex:1;border:1px solid var(--community-line);background:var(--community-card);color:#c7cdea;font-weight:700;font-size:13px;padding:10px;border-radius:12px;cursor:pointer}
.community-scope-toggle button.active{background:var(--community-gradient);border-color:transparent;color:#fff}
.community-feed{display:grid;gap:12px}
.community-post-card{border:1px solid var(--community-line);background:var(--community-card);border-radius:18px;padding:16px}
.community-post-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.community-post-head strong{display:block;font-size:13px}
.community-post-head small{display:block;color:var(--community-muted);font-size:11px;margin-top:2px}
.community-post-text{margin:0 0 8px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.community-post-image{width:100%;max-height:360px;object-fit:cover;border-radius:14px;display:block}
.community-verified-badge{width:14px;height:14px;vertical-align:-2px;margin-left:4px;flex-shrink:0}
.community-post-location{display:block;color:var(--community-muted);font-size:11px;margin-top:2px}

/* ---- Sponsored posts (LaasBook ads) ---- */
.community-sponsored-card{border-color:rgba(123,92,255,.35);background:linear-gradient(180deg,rgba(123,92,255,.06),var(--community-card) 60%)}
.community-sponsored-tag{color:var(--community-purple-2)!important;font-weight:700}
.community-sponsored-dismiss{margin-left:auto;flex-shrink:0;border:0;background:none;color:var(--community-muted);font-size:16px;cursor:pointer;padding:4px 8px;line-height:1}
.community-sponsored-dismiss:hover{color:#eef1ff}
.community-ad-cta{display:block;width:100%;margin-top:10px;border:0;border-radius:12px;padding:12px;font-size:13px;font-weight:800;cursor:pointer;background:var(--community-gradient);color:#fff}
.community-ad-banner{max-height:180px;object-fit:contain;background:#0a0e20}
.community-post-menu{position:relative;margin-left:auto;flex-shrink:0}
.community-post-menu-btn{border:0;background:none;color:var(--community-muted);font-size:18px;cursor:pointer;padding:4px 8px;line-height:1}
.community-post-menu-list{position:absolute;right:0;top:100%;z-index:5;background:var(--community-card);border:1px solid var(--community-line);border-radius:12px;padding:6px;display:grid;min-width:110px;box-shadow:0 12px 30px rgba(0,0,0,.4)}
.community-post-menu-list button{border:0;background:none;color:#eef1ff;font-size:13px;font-weight:600;text-align:left;padding:8px 10px;border-radius:8px;cursor:pointer}
.community-post-menu-list button:hover{background:rgba(123,92,255,.15)}
.community-post-menu-list button[data-community-delete-post]{color:#ff6b6b}

/* ---- Own profile tab ---- */
.community-profile-head{border:1px solid var(--community-line);background:var(--community-card);border-radius:20px;padding:22px;text-align:center;display:grid;gap:10px;justify-items:center}
.community-profile-avatar-wrap{position:relative;width:84px}
.community-avatar-edit-btn{position:absolute;right:-4px;bottom:-4px;width:28px;height:28px;border-radius:50%;border:2px solid var(--community-bg);background:var(--community-gradient);color:#fff;font-size:13px;cursor:pointer;display:grid;place-items:center}
.community-profile-head h3{margin:0;font:800 18px Manrope}
.community-verify-subscription{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px;border:1px solid var(--community-line);border-radius:14px;background:linear-gradient(135deg,rgba(24,119,242,.10),rgba(123,92,255,.10));text-align:left}.community-verify-subscription.active{background:linear-gradient(135deg,rgba(24,119,242,.16),rgba(47,199,138,.12))}.community-verify-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#fff}.community-verify-icon .community-verified-badge{width:26px;height:26px}.community-verify-subscription strong,.community-verify-subscription small{display:block}.community-verify-subscription strong{font-size:12px}.community-verify-subscription small{margin-top:3px;color:var(--community-muted);font-size:9px;line-height:1.4}.community-verify-subscription>button{border:0;border-radius:9px;background:#1877f2;color:#fff;padding:9px 11px;font-size:9px;font-weight:800;cursor:pointer}.laasbook-verify-checkout{text-align:center;display:grid;gap:14px}.laasbook-verify-mark .community-verified-badge{width:58px;height:58px}.laasbook-verify-checkout h3,.laasbook-verify-checkout p{margin:0}.laasbook-verify-checkout p{color:var(--muted);font-size:11px;line-height:1.6}.laasbook-price{display:flex;justify-content:space-between;align-items:center;padding:13px;border-radius:11px;background:var(--cream)}.laasbook-price span{font-size:10px;color:var(--muted)}.laasbook-price strong{font-size:16px}.laasbook-verify-checkout>label{text-align:left;font-size:10px;font-weight:800}.laasbook-payment-options{display:grid;gap:8px}.laasbook-payment-options label{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:11px;text-align:left;cursor:pointer}.laasbook-payment-options label:has(input:checked){border-color:#1877f2;background:#eef5ff}.laasbook-payment-options input{accent-color:#1877f2}.laasbook-payment-options b,.laasbook-payment-options small{display:block}.laasbook-payment-options b{font-size:11px}.laasbook-payment-options small{margin-top:3px;color:var(--muted);font-size:9px}
.community-bio-input,.community-bio-text{width:100%;box-sizing:border-box;border:1px solid var(--community-line);background:#0a0e20;color:#eef1ff;border-radius:12px;padding:10px 12px;font:inherit;font-size:13px;resize:none;min-height:60px}
.community-bio-text{background:none;border:0;padding:0;text-align:center;color:var(--community-muted);min-height:0}
.community-profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%}
.community-profile-stats strong{display:block;font-size:16px}
.community-profile-stats small{display:block;color:var(--community-muted);font-size:11px;margin-top:2px}
.community-profile-stats [data-community-view-followers],.community-profile-stats [data-community-view-following]{cursor:pointer;border-radius:12px;padding:4px;transition:background .15s}
.community-profile-stats [data-community-view-followers]:hover,.community-profile-stats [data-community-view-following]:hover{background:rgba(123,92,255,.12)}

/* ---- Bottom tab bar (Posts/People/Chats/+/Profile/Wallet) ---- */
.community-bottom-tabs{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(640px,100%);height:calc(88px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(7,1fr);gap:2px;background:rgba(8,10,26,.96);backdrop-filter:blur(18px);border:1px solid var(--community-line);border-bottom:0;border-radius:24px 24px 0 0;padding:12px 6px calc(10px + env(safe-area-inset-bottom));z-index:90;box-shadow:0 -14px 35px rgba(0,0,0,.36)}
.community-bottom-tabs button{position:relative;border:0;background:transparent;color:#8a93b8;font-size:10px;font-weight:800;display:grid;gap:4px;place-items:center;align-content:center;border-radius:18px;min-width:0;cursor:pointer}
.community-bottom-tabs button span{font-size:19px;line-height:1;width:32px;height:32px;border-radius:14px;display:grid;place-items:center}
.community-bottom-tabs button.active{color:#fff}
.community-bottom-tabs button.active span{background:rgba(123,92,255,.18)}
.community-compose-btn{transform:translate(-10px,-14px);transition:transform .15s ease}
.community-bottom-tabs .community-compose-btn{grid-column:4}
.community-bottom-tabs [data-community-tab="chats"]{grid-column:5}
.community-bottom-tabs [data-community-tab="profile"]{grid-column:6}
.community-compose-btn:active{transform:translate(-10px,-14px) scale(.94)}
.community-compose-btn span{width:58px!important;height:58px!important;border-radius:50%!important;background:var(--community-gradient)!important;color:#fff!important;font-size:26px!important;font-weight:300;border:3px solid var(--community-bg);box-shadow:0 10px 24px rgba(123,92,255,.45),0 2px 8px rgba(0,0,0,.3)}
.community-compose-btn:hover span{filter:brightness(1.08)}
.community-tab-badge{position:absolute;top:2px;right:calc(50% - 26px);min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#ff4d6d;color:#fff;font-size:9px;font-weight:800;display:grid;place-items:center;line-height:1}

/* ---- Chat modal (scoped wrapper — full dark LaasBook theme over the shared .pchat-* bubble classes, without leaking into other .pchat-* consumers like P2P trade chat which stays light) ---- */
.community-profile-actions{display:flex;gap:8px;width:100%}
.community-profile-actions button{flex:1}
.pchat-wrap{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin:-4px -4px 0}
.pchat-wrap .pchat-feed{max-height:min(56vh,460px)!important;min-height:260px!important;background:var(--community-bg)!important;border:0!important;border-radius:16px!important;padding:14px!important;display:flex!important;flex-direction:column;gap:10px}
.pchat-wrap .pchat-av{background:var(--community-gradient)!important;color:#fff!important}
.pchat-wrap .pchat-b{background:var(--community-card);border:1px solid var(--community-line);color:#eef1ff;box-shadow:none}
.pchat-wrap .pchat-row.mine .pchat-b{background:var(--community-gradient);border:0;color:#fff}
.pchat-wrap .pchat-b p{color:inherit;font-size:14px}
.pchat-wrap .pchat-b time{color:var(--community-muted)}
.pchat-wrap .pchat-row.mine .pchat-b time{color:rgba(255,255,255,.75)}
.pchat-wrap .pchat-empty{color:var(--community-muted)}
.pchat-wrap .pchat-empty span{opacity:.8}
.pchat-wrap .pchat-composer{background:var(--community-bg)!important;border-top:0!important;padding:12px 4px 4px!important;gap:8px}
.pchat-wrap .pchat-composer textarea{flex:1;box-sizing:border-box;border:1px solid var(--community-line)!important;border-radius:20px!important;padding:11px 16px!important;font:inherit;font-size:14px;resize:none;max-height:100px;background:#0a0e20!important;color:#eef1ff!important}
.pchat-wrap .pchat-composer textarea::placeholder{color:var(--community-muted)}
.pchat-wrap .pchat-composer textarea:focus{border-color:var(--community-purple)!important}
.pchat-wrap .community-attach-btn{width:42px;height:42px;padding:0;border-radius:50%;display:grid;place-items:center;font-size:18px;flex-shrink:0}
.pchat-wrap .pchat-composer .btn-primary{background:var(--community-gradient)!important;border:0!important;border-radius:20px!important;padding:0 20px!important;height:42px;flex-shrink:0}
.pchat-wrap .pchat-attach-preview{position:relative;width:72px;border-radius:12px;overflow:hidden;background:none;border:0;padding:0;margin:0 0 8px}
.pchat-wrap .pchat-attach-preview img{width:100%;display:block}
.pchat-wrap .pchat-attach-preview button{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;cursor:pointer}
.pchat-wrap .pchat-thread-head{display:flex;align-items:center;gap:10px;padding:2px 4px 14px;margin-bottom:2px;border-bottom:1px solid var(--community-line)}
.pchat-wrap .pchat-head-name{flex:1;min-width:0}
.pchat-wrap .pchat-head-name strong{display:block;font:800 15px Manrope;color:#eef1ff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pchat-wrap .pchat-status{display:flex;align-items:center;gap:6px;color:var(--community-muted);font-size:11px;font-weight:700;margin-top:3px}
.pchat-wrap .pchat-dot{width:8px;height:8px;border-radius:50%;background:#5c6470;flex-shrink:0}
.pchat-wrap .pchat-dot.on{background:#2ecc71;box-shadow:0 0 0 3px rgba(46,204,113,.2)}
.pchat-wrap .pchat-call-btn,.pchat-wrap .pchat-menu-btn{background:var(--community-card);border:1px solid var(--community-line);color:#eef1ff;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-size:15px;cursor:pointer;flex-shrink:0}
.pchat-wrap .pchat-call-btn:hover,.pchat-wrap .pchat-menu-btn:hover{border-color:var(--community-purple)}
.pchat-wrap .pchat-row.community-search-match .pchat-b{outline:2px solid var(--community-purple);outline-offset:2px}

/* ---- Voice messages ---- */
.pchat-voice-bubble{display:flex;align-items:center;gap:10px;min-width:200px;padding:2px 0}
.pchat-voice-play{width:32px;height:32px;border-radius:50%;border:0;background:rgba(255,255,255,.16);color:inherit;font-size:12px;display:grid;place-items:center;cursor:pointer;flex-shrink:0}
.pchat-row.mine .pchat-voice-play{background:rgba(255,255,255,.28)}
.pchat-voice-waveform{position:relative;flex:1;height:26px}
.pchat-voice-bars{position:absolute;inset:0;display:flex;align-items:center;gap:2px;overflow:hidden}
.pchat-voice-bars span{flex:1;min-width:2px;height:40%;border-radius:2px;background:rgba(255,255,255,.35)}
.pchat-voice-bars-fg{width:0%;transition:width .1s linear}
.pchat-voice-bars-fg span{background:#fff}
.pchat-voice-duration{font-size:11px;color:inherit;opacity:.75;flex-shrink:0}
.pchat-recording-row,.pchat-voice-preview-row{display:flex;align-items:center;gap:10px;padding:10px 4px}
.pchat-recording-dot{width:10px;height:10px;border-radius:50%;background:#ff5c7a;flex-shrink:0;animation:communityRecordPulse 1s infinite}
@keyframes communityRecordPulse{0%,100%{opacity:1}50%{opacity:.3}}
.pchat-recording-timer{color:var(--community-muted);font-size:12px;font-weight:700;flex-shrink:0;min-width:32px}
.pchat-recording-bars{flex:1;display:flex;align-items:center;gap:2px;height:24px}
.pchat-recording-bars span{flex:1;min-width:2px;height:20%;border-radius:2px;background:var(--community-purple-2)}
.pchat-record-cancel,.pchat-record-stop{width:34px;height:34px;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;flex-shrink:0;font-size:14px}
.pchat-record-cancel{background:var(--community-card);color:#eef1ff}
.pchat-record-stop{background:var(--community-gradient);color:#fff}
.pchat-voice-preview-row .pchat-voice-waveform{background:var(--community-card);border-radius:12px;padding:0 8px}
.pchat-voice-preview-row .pchat-voice-bars span{background:var(--community-purple-2)}
.pchat-voice-preview-row .btn-primary{flex-shrink:0}
@media(max-width:480px){
  .pchat-wrap .pchat-feed{max-height:min(60vh,520px)!important}
  .pchat-wrap .pchat-b{max-width:80%}
}

/* ---- Custom confirm dialog (replaces native window.confirm for community actions) ---- */
.community-confirm-overlay{position:fixed;inset:0;z-index:200;display:grid;place-items:center;background:rgba(3,5,15,.6);backdrop-filter:blur(4px);padding:20px}
.community-confirm-card{width:min(340px,100%);background:var(--community-card);border:1px solid var(--community-line);border-radius:20px;padding:22px;text-align:center;display:grid;gap:16px;box-shadow:0 30px 80px rgba(0,0,0,.5)}
.community-confirm-card p{margin:0;color:#eef1ff;font-size:14px;line-height:1.5}
.community-confirm-actions{display:flex;gap:10px}
.community-confirm-actions button{flex:1;border:0;border-radius:14px;padding:12px;font-weight:800;font-size:13px;cursor:pointer}
.community-confirm-cancel{background:#0a0e20;color:#c7cdea;border:1px solid var(--community-line)!important}
.community-confirm-ok{background:#ff4d6d;color:#fff}

/* ---- Compose modal ---- */
.community-composer{display:grid;gap:12px}
.community-composer textarea{width:100%;box-sizing:border-box;border:1px solid var(--community-line);background:#0a0e20;color:#eef1ff;border-radius:14px;padding:12px 14px;font:inherit;font-size:14px;resize:none}
.community-composer-preview{position:relative;border-radius:14px;overflow:hidden}
.community-composer-preview img{width:100%;max-height:240px;object-fit:cover;display:block}
.community-composer-preview button{position:absolute;top:8px;right:8px;width:28px;height:28px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;cursor:pointer}
.community-composer-actions{display:flex;justify-content:space-between;align-items:center;gap:10px}
.community-attach-btn{border:1px solid var(--community-line);background:none;color:#c7cdea;font-size:13px;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer}

/* ---- Header (brand + search + notifications bell) ---- */
.community-header{display:flex;align-items:center;justify-content:space-between;padding:2px 0 4px}
.community-header-brand{display:flex;align-items:center;gap:8px}
.community-brand-badge{width:30px;height:30px;border-radius:10px;background:var(--community-gradient);color:#fff;display:grid;place-items:center;font:800 13px Manrope;flex-shrink:0}
.community-header-brand strong{font:800 17px Manrope;color:#fff}
.community-header-actions{display:flex;gap:8px}
.community-header-actions .bell-btn{background:var(--community-card);border:1px solid var(--community-line);color:#eef1ff;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font-size:16px;cursor:pointer;position:relative}

/* ---- Suggested people row (Stories-style) ---- */
.community-suggested-row{display:flex;gap:14px;overflow-x:auto;padding:2px 2px 6px}
.community-suggested-card{display:grid;justify-items:center;gap:6px;flex:none;width:64px;border:0;background:none;cursor:pointer;color:#c7cdea}
.community-suggested-card small{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:64px}
.community-suggested-avatar-wrap{position:relative}
.community-online-dot{position:absolute;right:0;bottom:0;width:12px;height:12px;border-radius:50%;background:#2ecc71;border:2px solid var(--community-bg)}
.community-create-post-circle{width:44px;height:44px;border-radius:50%;background:var(--community-gradient);color:#fff;display:grid;place-items:center;font-size:22px;margin:0 auto}

/* ---- Post stats/actions/reactions ---- */
.community-post-stats{display:flex;gap:12px;color:var(--community-muted);font-size:12px;margin:8px 0 2px}
.community-post-actions{display:flex;border-top:1px solid var(--community-line);padding-top:6px;margin-top:6px;gap:2px}
.community-post-action-btn{flex:1;border:0;background:none;color:#c7cdea;font-size:12px;font-weight:700;padding:8px;border-radius:10px;cursor:pointer}
.community-post-action-btn:hover{background:rgba(123,92,255,.1)}
.community-post-action-btn.active{color:var(--community-purple-2)}
.community-react-wrap{position:relative;flex:1;display:flex}
.community-react-wrap .community-post-action-btn{width:100%}
.community-react-popover{position:absolute;bottom:100%;left:0;display:flex;gap:4px;background:var(--community-card);border:1px solid var(--community-line);border-radius:999px;padding:6px;margin-bottom:6px;box-shadow:0 12px 30px rgba(0,0,0,.4);z-index:6}
.community-react-popover button{border:0;background:none;font-size:20px;cursor:pointer;padding:4px;border-radius:50%;transition:transform .1s}
.community-react-popover button:hover{transform:scale(1.2)}

/* ---- Comments modal ---- */
.community-comments-wrap{display:grid;gap:12px}
.community-comments-list{display:grid;gap:10px;max-height:min(50vh,420px);overflow-y:auto}
.community-comment-row{display:grid;grid-template-columns:auto 1fr;gap:10px}
.community-comment-row strong{font-size:13px}
.community-comment-row p{margin:2px 0 0;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.community-comment-delete{border:0;background:none;color:#ff6b6b;font-size:11px;font-weight:700;padding:4px 0;cursor:pointer}
.community-comments-composer{display:flex;gap:8px;align-items:flex-end}
.community-comments-composer textarea{flex:1;box-sizing:border-box;border:1px solid var(--community-line);border-radius:20px;padding:11px 16px;font:inherit;font-size:14px;resize:none;max-height:100px;background:#0a0e20;color:#eef1ff}
.community-comments-composer textarea:focus{border-color:var(--community-purple)}

/* ---- Chats sub-tabs (All/Unread/Groups/Calls/Requests) ---- */
.community-chat-header-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.community-chat-header-icons{display:flex;gap:8px;flex-shrink:0}
.community-chat-header-icons button{background:var(--community-card);border:1px solid var(--community-line);color:#eef1ff;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font-size:16px;cursor:pointer}
.community-chat-header-icons button:hover{border-color:var(--community-purple)}
.community-chat-subtabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;margin-bottom:10px}
.community-chat-subtabs button{flex:none;border:1px solid var(--community-line);background:var(--community-card);color:#c7cdea;font-weight:700;font-size:13px;padding:9px 14px;border-radius:999px;cursor:pointer;white-space:nowrap}
.community-chat-subtabs button.active{background:var(--community-gradient);border-color:transparent;color:#fff}

/* TikTok-style LaasBook Shorts */
.community-shorts-shell{height:calc(100dvh - 82px - env(safe-area-inset-bottom));margin:-8px -12px 0;overflow:hidden;background:#02050b}
.community-shorts-head{position:absolute;top:76px;left:50%;transform:translateX(-50%);z-index:15;width:min(620px,calc(100% - 28px));display:flex;align-items:center;justify-content:space-between;color:#fff;pointer-events:none}
.community-shorts-head>div{display:grid;text-shadow:0 2px 12px #000}.community-shorts-head strong{font-size:22px}.community-shorts-head small{color:#ccd2df}
.community-shorts-head button{pointer-events:auto;border:1px solid rgba(255,255,255,.35);background:rgba(4,12,20,.58);backdrop-filter:blur(12px);color:#fff;border-radius:999px;padding:10px 16px;font-weight:800}
.community-shorts-feed{height:100%;overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior-y:contain;scrollbar-width:none}
.community-shorts-feed::-webkit-scrollbar{display:none}
.community-short{position:relative;height:100%;min-height:100%;scroll-snap-align:start;scroll-snap-stop:always;margin:0;border:0;border-radius:0;overflow:hidden;background:#000}
.community-short>video{width:100%;height:100%;display:block;object-fit:cover;background:#000}
.community-short-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.22),transparent 32%,transparent 55%,rgba(0,0,0,.78));pointer-events:none}
.community-short-info{position:absolute;z-index:3;left:18px;right:82px;bottom:34px;display:flex;align-items:flex-end;gap:11px;color:#fff;text-shadow:0 2px 8px #000}
.community-short-info>div{min-width:0}.community-short-info strong{display:flex;align-items:center;gap:5px;font-size:16px}.community-short-info p{margin:7px 0 0;line-height:1.38;white-space:pre-wrap}
.community-short-actions{position:absolute;z-index:4;right:12px;bottom:28px;display:grid;gap:13px}
.community-short-actions button{border:0;background:rgba(0,0,0,.38);backdrop-filter:blur(8px);color:#fff;width:52px;min-height:52px;border-radius:50%;display:grid;place-items:center;font-size:22px;font-weight:800;text-shadow:0 2px 8px #000}
.community-short-actions button small{font-size:10px;line-height:1}
.community-short-actions .community-short-delete{background:rgba(225,58,76,.74);box-shadow:0 7px 20px rgba(225,58,76,.24)}
.community-shorts-empty{height:100%;display:grid;place-content:center;justify-items:center;text-align:center;color:#fff;padding:30px}.community-shorts-empty>span{font-size:54px}.community-shorts-empty p{color:#9ba6bb}.community-shorts-empty button{border:0;border-radius:999px;padding:13px 24px;background:var(--community-gradient);color:#fff;font-weight:900}
.community-short-composer{display:grid;gap:16px}.community-short-upload-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.community-short-upload-options button{border:1px solid var(--community-line);background:var(--community-card);color:#fff;border-radius:18px;min-height:138px;padding:18px 10px;display:grid;place-items:center;align-content:center;gap:7px;text-align:center}.community-short-upload-options button>span{font-size:34px}.community-short-upload-options small{color:#9ca5c5}
.community-short-preview{position:relative;width:min(280px,100%);aspect-ratio:9/16;margin:auto;border-radius:20px;overflow:hidden;background:#000}.community-short-preview video{width:100%;height:100%;object-fit:cover}.community-short-preview button{position:absolute;right:8px;top:8px;width:38px;height:38px;border:0;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;font-size:18px}
.community-short-composer textarea{width:100%;resize:vertical;border:1px solid var(--community-line);background:var(--community-card);color:#fff;border-radius:15px;padding:14px}.community-short-upload-note{color:#9ca5c5;font-size:12px;text-align:center}
@media(max-width:430px){.community-bottom-tabs button{font-size:9px}.community-bottom-tabs button span{font-size:17px;width:28px;height:28px}.community-shorts-shell{margin-left:-8px;margin-right:-8px}.community-shorts-head{top:72px}.community-short-upload-options{grid-template-columns:1fr}}

/* ---- Calls tab ---- */
.community-call-filters{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;margin-bottom:12px}
.community-call-filters button{flex:none;border:1px solid var(--community-line);background:var(--community-card);color:#c7cdea;font-weight:700;font-size:12px;padding:7px 13px;border-radius:999px;cursor:pointer;white-space:nowrap}
.community-call-filters button.active{background:var(--community-gradient);border-color:transparent;color:#fff}
.community-call-list{display:flex;flex-direction:column;gap:6px}
.community-call-direction{display:flex;align-items:center;gap:6px;color:var(--community-muted)}
.community-call-direction-icon{font-weight:900}
.community-call-direction.outgoing .community-call-direction-icon{color:#2ecc71}
.community-call-direction.incoming .community-call-direction-icon{color:#2ecc71}
.community-call-direction.missed .community-call-direction-icon,.community-call-direction.missed{color:#ff5c7a}
.community-call-btn{background:var(--community-card);border:1px solid var(--community-line);color:#eef1ff;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font-size:15px;cursor:pointer;flex-shrink:0;margin-left:6px}
.community-call-btn:hover{border-color:var(--community-purple)}

/* ---- Presence dots ---- */
.community-presence-dot{position:absolute;right:0;bottom:0;width:12px;height:12px;border-radius:50%;border:2px solid var(--community-bg)}
.community-presence-online{background:#2ecc71}
.community-presence-away{background:#f5a623}
.community-presence-dnd{background:#9b6bff}

/* ---- Group chat / requests ---- */
.community-request-actions{display:flex;gap:8px;flex-shrink:0}
.community-request-actions .accept{border:0;border-radius:999px;padding:8px 14px;font-size:11px;font-weight:800;cursor:pointer;background:var(--community-gradient);color:#fff}
.community-request-actions .decline{border:1px solid var(--community-line);border-radius:999px;padding:8px 14px;font-size:11px;font-weight:800;cursor:pointer;background:none;color:#c7cdea}
.community-group-member-pick{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--community-line);border-radius:14px;background:var(--community-card);cursor:pointer}
.community-group-member-pick input{width:auto}
.community-group-member-pick span{font-size:13px}

/* ---- Typing indicator ---- */
.community-typing-dots{display:block;color:var(--community-purple-2);font-weight:700;font-size:12px;padding:2px 4px 0}
.community-chat-row-typing{color:var(--community-purple-2)!important;font-style:normal}
.community-typing-anim{display:inline-flex;gap:3px;margin-left:5px;vertical-align:middle}
.community-typing-anim b{width:4px;height:4px;border-radius:50%;background:var(--community-purple-2);display:inline-block;opacity:.4;animation:communityTypingBounce 1s infinite}
.community-typing-anim b:nth-child(2){animation-delay:.15s}
.community-typing-anim b:nth-child(3){animation-delay:.3s}
@keyframes communityTypingBounce{0%,60%,100%{opacity:.4;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

/* ---- Seen ticks in chat bubbles ---- */
.pchat-wrap .pchat-tick{margin-left:4px;opacity:.7;font-style:normal}
.pchat-wrap .pchat-tick.seen{opacity:1;color:#4fd8c4}

/* ---- Contact Info panel ---- */
.community-contact-info-card{width:min(420px,100vw)!important;max-width:420px!important}
.community-contact-info{text-align:center;padding:4px 4px 10px}
.community-contact-back{background:none;border:0;color:var(--community-purple-2);font-weight:800;font-size:14px;cursor:pointer;padding:0;margin-bottom:14px;display:block;text-align:left}
.community-contact-info .community-avatar-lg{margin:0 auto 12px}
.community-contact-info h3{color:#eef1ff;font:800 20px Manrope;margin:0 0 4px}
.community-contact-status{color:var(--community-muted);font-size:13px;margin:0 0 18px}
.community-contact-call-row{display:flex;justify-content:center;gap:16px;margin-bottom:22px}
.community-contact-call-circle{display:flex;flex-direction:column;align-items:center;gap:6px;background:none;border:0;cursor:pointer;color:#eef1ff}
.community-contact-call-circle span{width:54px;height:54px;border-radius:50%;background:var(--community-gradient);display:grid;place-items:center;font-size:22px}
.community-contact-call-circle small{font-size:11px;font-weight:700;color:var(--community-muted)}
.community-contact-list{text-align:left;border-top:1px solid var(--community-line)}
.community-contact-row{width:100%;display:flex;align-items:center;gap:14px;padding:14px 6px;border:0;border-bottom:1px solid var(--community-line);background:none;color:#eef1ff;font-size:14px;font-weight:600;cursor:pointer;box-sizing:border-box}
.community-contact-row.static{cursor:default;color:var(--community-muted)}
.community-contact-row.static small{margin-left:auto;color:var(--community-muted)}
.community-contact-row.danger{color:#ff5c7a}
.community-contact-row-icon{width:22px;text-align:center;flex-shrink:0}
.community-contact-row-label{flex:1}
.community-contact-toggle-row{cursor:pointer}
.community-toggle-switch{position:relative;width:40px;height:22px;flex-shrink:0}
.community-toggle-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.community-toggle-switch>span{position:absolute;inset:0;background:var(--community-line);border-radius:999px;transition:.2s}
.community-toggle-switch>span:before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s}
.community-toggle-switch input:checked+span{background:var(--community-gradient)}
.community-toggle-switch input:checked+span:before{transform:translateX(18px)}

@media(max-width:640px){
  #app.community-mode .view-root{max-width:none;padding:12px 12px calc(102px + env(safe-area-inset-bottom))}
}
.laasbook-payment-options{display:grid;gap:10px}
.laasbook-payment-options label{display:grid!important;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:12px;min-height:70px;padding:14px 16px!important;border:1px solid rgba(151,190,180,.22)!important;border-radius:12px;background:#09241f!important;color:#f5fffc!important;text-align:left;cursor:pointer}
.laasbook-payment-options label:has(input:checked){border-color:#38a7ff!important;background:linear-gradient(135deg,#103c4d,#123a35)!important;box-shadow:0 0 0 1px rgba(56,167,255,.18)}
.laasbook-payment-options input{width:18px!important;height:18px!important;margin:0!important;accent-color:#299cff;justify-self:center}
.laasbook-payment-options label>span{display:block!important;min-width:0;color:#f5fffc!important}
.laasbook-payment-options b,.laasbook-payment-options small{display:block!important}
.laasbook-payment-options b{color:#fff!important;font-size:12px;line-height:1.25}
.laasbook-payment-options small{margin-top:5px;color:#a9cbc2!important;font-size:10px;line-height:1.35}
.laasbook-payment-options label:has(input:checked) small{color:#aee8d4!important}

.laasbook-billing-toggle{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px;border-radius:13px;background:#071d19}.laasbook-billing-toggle button{border:0;border-radius:9px;padding:11px;background:transparent;color:#9abbb3;font-weight:800}.laasbook-billing-toggle button.active{background:#16aa81;color:#fff}.laasbook-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;text-align:left}.laasbook-plan-card{display:flex;flex-direction:column;min-width:0;padding:15px;border:1px solid rgba(151,190,180,.22);border-radius:14px;background:#09241f;color:#fff;text-align:left;cursor:pointer}.laasbook-plan-card.active{border-color:#2fd39e;box-shadow:0 0 0 2px rgba(47,211,158,.14);background:linear-gradient(145deg,#0d362e,#0b2823)}.laasbook-plan-card:disabled{opacity:.75;cursor:default}.laasbook-plan-card>span{font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:#73e7c4}.laasbook-plan-card>strong{display:block;margin:8px 0 10px;font-size:19px}.laasbook-plan-card>strong small{display:inline;font-size:9px;color:#91b7ad}.laasbook-plan-card ul{display:grid;gap:5px;margin:0 0 12px;padding:0;list-style:none}.laasbook-plan-card li{font-size:9px;line-height:1.35;color:#c5ddd7}.laasbook-plan-card em{margin-top:auto;font-size:9px;font-style:normal;font-weight:800;color:#38d5a7}@media(max-width:520px){.laasbook-plan-grid{grid-template-columns:1fr}.laasbook-plan-card{padding:13px}.laasbook-plans-checkout{gap:11px}}
.community-promotion-checkout{display:grid;gap:14px}.community-promotion-checkout>p{margin:0;color:#aac9c1;font-size:11px;line-height:1.55}.community-promotion-checkout>h4{margin:4px 0 -8px;color:#fff}.community-promotion-plans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.community-promotion-plans>button{display:flex;flex-direction:column;min-width:0;padding:14px 12px;border:1px solid rgba(151,190,180,.22);border-radius:14px;background:#09241f;color:#fff;text-align:left;cursor:pointer}.community-promotion-plans>button.active{border-color:#38d5a7;background:linear-gradient(145deg,#0f3b31,#0a2923);box-shadow:0 0 0 2px rgba(56,213,167,.13)}.community-promotion-plans>button>span{font-size:22px}.community-promotion-plans>button>strong{margin-top:8px;font-size:12px}.community-promotion-plans>button>b{margin-top:6px;color:#52e7ba;font-size:20px}.community-promotion-plans>button>small{color:#9abbb3;font-size:9px}.community-promotion-plans ul{display:grid;gap:5px;margin:12px 0 0;padding:0;list-style:none}.community-promotion-plans li{font-size:9px;line-height:1.35;color:#c5ddd7}@media(max-width:620px){.community-promotion-plans{grid-template-columns:1fr}.community-promotion-plans>button{display:grid;grid-template-columns:auto 1fr auto;column-gap:10px}.community-promotion-plans>button>span{grid-row:1/3}.community-promotion-plans>button>b{grid-column:3;grid-row:1/3;align-self:center}.community-promotion-plans>button>small{grid-column:2}.community-promotion-plans ul{grid-column:1/-1}}
.community-premium-auto-promo{display:block;padding:9px 12px;color:#f4c85b;font-size:9px;font-weight:900;white-space:nowrap}
.laasbook-current-plan{display:grid;grid-template-columns:52px 1fr;align-items:center;gap:13px;padding:15px;border:1px solid rgba(105,240,194,.42);border-radius:17px;background:linear-gradient(135deg,#0b3d33,#0c2924);box-shadow:0 14px 34px rgba(0,0,0,.2)}.laasbook-current-plan>span{display:grid;width:52px;height:52px;place-items:center;border-radius:50%;background:#24c997;color:#fff;font-size:26px;font-weight:900}.laasbook-current-plan small,.laasbook-current-plan strong,.laasbook-current-plan p{display:block;margin:0}.laasbook-current-plan small{color:#7ddfc3;font-size:9px;letter-spacing:.14em}.laasbook-current-plan strong{margin:3px 0;color:#fff;font-size:20px}.laasbook-current-plan p{color:#9cc4b9;font-size:11px}.laasbook-plan-card{position:relative}.laasbook-plan-card.current{border-color:#46d9ad;background:linear-gradient(145deg,#10483b,#0b2d26);opacity:1}.laasbook-plan-card.recommended{border-color:#baff67;box-shadow:0 0 0 2px rgba(186,255,103,.14),0 16px 34px rgba(0,0,0,.2)}.laasbook-plan-card:disabled:not(.current){opacity:.48}.plan-status{align-self:flex-start;margin:-7px 0 10px;padding:5px 8px;border-radius:999px;background:#26c899;color:#fff;font-size:9px}.plan-status.upgrade{background:#baff67;color:#12321f}.laasbook-top-plan{padding:16px;border:1px solid rgba(255,211,94,.35);border-radius:16px;background:linear-gradient(135deg,#392f13,#1c271e);color:#ffe38a;font-weight:850;text-align:center}
