.community-bands{max-width:1240px;margin:32px auto;display:grid;gap:20px;padding:0 24px}.community-band{display:flex;gap:30px;padding:32px;border:1px solid #454b53;border-radius:18px;background:linear-gradient(115deg,#292e34,#21252a)}.community-band:nth-child(2){background:linear-gradient(115deg,#292823,#21252a)}.community-band h2{font-size:clamp(24px,3vw,36px);margin:8px 0 10px}.community-band p{color:#bcc1c9;max-width:800px;line-height:1.7;margin:0 0 22px}.community-band-icon{width:64px;height:64px;flex:none;display:grid;place-items:center;font-size:32px;border-radius:18px;background:#ed87351a;color:#fa9344}.community-actions{display:flex;gap:12px;flex-wrap:wrap}.community-inbox-links{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.community-dialog{color:#f4f4f4;background:#23272d;border:1px solid #505761;border-radius:18px;width:min(760px,94vw);max-height:calc(var(--sm-viewport-height,100dvh) - 28px);padding:0;overflow:auto}.community-dialog::backdrop{background:#000a}.community-dialog header{position:sticky;top:0;background:#23272d;z-index:2;display:flex;align-items:center;gap:12px;border-bottom:1px solid #454b53;padding:16px 22px}.community-dialog header h2{font-size:21px;margin:0;flex:1}.community-dialog .community-body{padding:22px}.community-dialog button,.community-dialog input,.community-dialog textarea,.community-dialog select{font:inherit}.community-dialog button,.community-dialog a.outline{min-height:44px;cursor:pointer}.community-dialog label{display:grid;gap:7px;margin:14px 0}.community-dialog input:not([type=checkbox]),.community-dialog textarea{width:100%;padding:12px;background:#181c21;color:#fff;border:1px solid #555d67;border-radius:9px;font-size:16px}.community-dialog textarea{resize:vertical;min-height:88px}.community-dialog .community-check{display:flex;align-items:center;gap:10px}.community-dialog .community-check input{width:20px;height:20px;accent-color:#ed8735}.community-status{color:#f7b77f;min-height:1.5em;white-space:pre-line}.community-note{color:#bcc1c9;line-height:1.6;font-size:14px}.community-row{border:1px solid #454b53;border-radius:12px;margin:12px 0;padding:17px}.community-row h3{margin:0 0 8px}.community-row p{margin:7px 0}.community-row .community-actions{margin-top:12px}.group-messages{display:grid;gap:12px;margin:20px 0}.group-message{background:#30363e;border-radius:12px;padding:16px;overflow-wrap:anywhere}.group-message.mine{background:#e5823021;border:1px solid #965d32;margin-left:30px}.group-message p{white-space:pre-wrap;margin:10px 0;line-height:1.6}.group-message small{color:#b7bec7}.group-message .community-actions button{font-size:13px;padding:6px 12px;min-height:36px}.group-composer{border-top:1px solid #555d67;padding-top:8px}.group-unread{background:#f48c38;color:#16191d;border-radius:20px;padding:3px 9px;font-size:13px}.community-dialog [hidden]{display:none!important}.community-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@media(max-width:640px){.community-bands{padding:0 14px}.community-band{padding:23px;gap:15px}.community-band-icon{width:40px;height:40px;font-size:23px;border-radius:10px}.community-actions>*{flex:1 1 auto}.community-dialog header{padding:12px 16px}.community-dialog .community-body{padding:16px}.group-message.mine{margin-left:14px}}


/* Forum is the final discover action, below the existing marketplace actions. */
.home-market-actions>.home-forum-entry{grid-column:1/-1;flex-basis:100%;width:100%;box-sizing:border-box;display:flex;justify-content:center;align-items:center;min-height:48px;text-decoration:none}

/* Shared forum/group dialogs keep title and controls in separate columns. */
html body dialog.community-dialog{padding:0;scroll-padding-top:100px}
html body dialog.community-dialog>header{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:12px;min-height:76px;padding:12px 18px}
html body dialog.community-dialog>header:has(.sm-uniform-back:not([hidden])){grid-template-columns:44px minmax(0,1fr) 44px}
html body dialog.community-dialog>header>:is(h1,h2,h3){min-width:0;font:650 20px/1.35 Inter,system-ui,sans-serif;letter-spacing:normal;text-transform:none;overflow-wrap:anywhere;white-space:normal;margin:0}
html body dialog.community-dialog .community-body{min-width:0;line-height:1.6}
html body dialog.community-dialog .community-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch}
html body dialog.community-dialog .community-actions>:is(a,button){display:flex;align-items:center;justify-content:center;min-width:0;max-width:100%;min-height:44px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;text-decoration:none;text-align:center}
@media(max-width:480px){html body dialog.community-dialog>header{padding:12px 14px}html body dialog.community-dialog>header>:is(h1,h2,h3){font-size:17px}html body dialog.community-dialog .community-actions>:is(a,button){flex:1 1 100%;width:100%}}

@media(min-width:681px)and(max-width:1023px){html:not(.native-app) body .hero .home-market-actions{flex-wrap:wrap}html:not(.native-app) body .hero .home-market-actions>a.home-forum-entry{flex:1 0 100%;white-space:normal}}

/* Grid and action children may shrink instead of widening narrow pages. */
html body .community-bands{grid-template-columns:minmax(0,1fr);box-sizing:border-box;min-width:0}
html body .community-band,html body .community-band>div{box-sizing:border-box;min-width:0;max-width:100%}
html body .community-band :is(h2,p,a,button){overflow-wrap:anywhere}
html body .community-actions>:is(a,button){box-sizing:border-box;min-width:0;max-width:100%;white-space:normal;text-align:center}

/* Groups share the normal chat's scrolling history, bubbles and composer. */
html body dialog.group-dialog .group-row-title{display:flex;align-items:flex-start;gap:12px;justify-content:space-between}
html body dialog.group-dialog .group-row-title h3{min-width:0;overflow-wrap:anywhere}
.group-lock{color:#f29450;display:inline-flex;flex-shrink:0;padding:3px}
.group-search{display:flex;align-items:end;gap:10px;margin:12px 0}.group-search label{flex:1;min-width:0}
html body dialog.group-dialog select{box-sizing:border-box;max-width:100%;padding:12px;background:#181c21;color:#fff;border:1px solid #555d67;border-radius:9px;font-size:16px}
html body dialog.group-dialog.group-thread[open]{height:min(850px,calc(var(--sm-viewport-height,100dvh) - 28px));overflow:hidden;display:flex;flex-direction:column;background:#1b1f24}
html body dialog.group-dialog.group-thread>header{flex:none;background:#252a31;position:relative;min-height:76px}
html body dialog.group-dialog.group-thread .community-body{flex:1;min-height:0;padding:0;display:flex;flex-direction:column;overflow:hidden}
html body dialog.group-dialog .group-title-button{padding:0;border:0;background:transparent;color:inherit;text-align:left;display:block;width:100%;min-width:0;font-weight:650;overflow-wrap:anywhere}
.group-title-button small{display:block;font-size:12px;color:#ffad73;font-weight:400;margin-top:4px}
.group-chat-tools{display:flex;gap:8px;justify-content:space-between;padding:10px 14px;flex-shrink:0}
html body dialog.group-dialog .group-chat-tools button{font-size:13px;min-height:40px;padding:7px 11px}
html body dialog.group-dialog .group-messages{margin:0;min-height:0;flex:1;display:flex;flex-direction:column;overflow:auto;overscroll-behavior:contain;overflow-anchor:none;padding:18px;gap:12px;scroll-behavior:auto}
html body dialog.group-dialog .group-message{flex-shrink:0;align-self:flex-start;max-width:82%;box-sizing:border-box;margin:0;padding:12px 15px;white-space:normal;border:1px solid #454e5a;border-radius:18px 18px 18px 4px;background:#303741}
html body dialog.group-dialog .group-message.mine{align-self:flex-end;background:#493125;border-color:#865130;border-radius:18px 18px 4px 18px}
.group-message .group-author{min-height:30px!important;border:0;background:transparent;color:#ffad73;font-size:13px!important;padding:0;text-align:left;overflow-wrap:anywhere}
.group-message p{white-space:pre-wrap;line-height:1.5;margin:5px 0}.group-message time{display:block;text-align:right;font-size:11px;color:#c1c7cf;margin-top:6px}
.group-message-options{margin-top:3px}.group-message-options summary{cursor:pointer;color:#c1c7cf;text-align:right;min-height:28px;list-style:none}.group-message-options summary::-webkit-details-marker{display:none}
html body dialog.group-dialog .group-message-options .community-actions button{min-height:36px;font-size:12px;flex:1;padding:6px}
html body dialog.group-dialog .group-composer{margin:0;flex-shrink:0;padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom));display:flex;align-items:end;gap:10px;background:#252a31;border-top:1px solid #404852}
html body dialog.group-dialog .group-composer textarea{flex:1;min-width:0;resize:none;width:auto;min-height:48px;max-height:120px;margin:0;padding:12px;box-sizing:border-box;border-radius:13px;line-height:1.4}
html body dialog.group-dialog .group-composer button{flex:none;min-height:48px;border-radius:13px;padding:12px 18px}
.group-thread .community-status{margin:0 14px;min-height:0}.group-thread .community-status:empty{display:none}
.group-member-profile{display:flex;align-items:center;gap:12px;width:100%;background:transparent;border:0;color:#f4f5f6;text-align:left;padding:0}.group-member-profile strong{flex:1;min-width:0;overflow-wrap:anywhere}.group-member-profile .msg-avatar{width:40px;height:40px}
.member-profile-friendship{margin:18px 0;display:flex;gap:10px;flex-wrap:wrap}.member-friend-action{display:flex;align-items:center;justify-content:center;gap:9px;max-width:100%;min-height:44px}.member-friend-status{color:#f7b77f}
@media(max-width:700px){html body dialog.group-dialog.group-thread[open]{width:100%;max-width:100%;height:var(--sm-viewport-height,100dvh);max-height:var(--sm-viewport-height,100dvh);margin:0;inset:0;border:0;border-radius:0}html body dialog.group-dialog.group-thread>header{padding-top:max(12px,env(safe-area-inset-top))}.group-chat-tools{padding:8px 12px}html body dialog.group-dialog .group-message{max-width:88%}}

.group-avatar{width:44px;height:44px;min-width:44px;flex-shrink:0;border-radius:50%;background:#ad581c;color:#fff;border:1px solid #69717b;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;font:700 16px/1 Inter,system-ui,sans-serif}
.group-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.group-row-title h3{flex:1}.group-row-title{align-items:center!important}
html body dialog.group-dialog .group-title-button{display:flex;gap:10px;align-items:center}
.group-title-text{display:block;min-width:0;flex:1}.group-settings-avatar{display:flex;align-items:center;gap:15px;margin-bottom:16px}.group-settings-avatar h3{min-width:0;overflow-wrap:anywhere}
.group-settings-avatar .group-avatar,.group-avatar-preview .group-avatar{width:88px;height:88px;font-size:25px}.group-avatar-preview{display:flex;justify-content:center;margin:12px 0 22px}

/* Left swipe reveals an explicit destructive action; vertical scrolling stays native. */
.group-swipe{position:relative;overflow:hidden;border-radius:12px;isolation:isolate;--group-swipe-x:0px}
.group-swipe-content{position:relative;z-index:1;transform:translateX(var(--group-swipe-x));transition:transform .18s ease;touch-action:pan-y pinch-zoom;background:#24282f}
.group-swipe-content>.community-row{margin:0!important}.group-swipe-content>.msg-row{margin:0;width:100%;box-sizing:border-box}
[data-group-rows]>.group-swipe{margin:12px 0}.msg-list>.group-swipe{border-bottom:1px solid #3d454f;border-radius:0}
.group-swipe-trash{position:absolute;z-index:0;right:0;top:0;bottom:0;width:88px;border:0;border-radius:0;background:#ad302e;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:9px;visibility:hidden;pointer-events:none;font:600 11px/1.3 Inter,system-ui,sans-serif;cursor:pointer}
html body .group-swipe-trash{min-height:44px;max-width:88px;white-space:normal;overflow-wrap:anywhere}
.group-swipe[data-open=true]>.group-swipe-trash,.group-swipe.is-dragging>.group-swipe-trash{visibility:visible}.group-swipe[data-open=true]>.group-swipe-trash{pointer-events:auto}
.group-swipe.is-dragging>.group-swipe-content{transition:none;user-select:none}
.group-swipe-toggle{position:absolute;z-index:2;right:4px;top:4px;border:0;border-radius:8px;background:#24282f;color:#c1c7cf;width:30px;min-height:30px!important;padding:0;opacity:0;cursor:pointer;font-size:20px}
.group-swipe:hover>.group-swipe-toggle,.group-swipe-toggle:focus-visible{opacity:1}.group-swipe[data-open=true]>.group-swipe-toggle{visibility:hidden}
@media(hover:hover)and(pointer:fine){.group-swipe-toggle{opacity:1}.group-swipe-content>.msg-row{padding-right:42px}.group-swipe-content .group-row-title{padding-right:25px}}
@media(prefers-reduced-motion:reduce){.group-swipe-content{transition:none}}

/* Group member actions and private photo overview. */
.member-more{background:#ad581c}.member-action-list{display:grid;gap:12px}.member-action-list button{width:100%;text-align:left}.group-contact{text-align:center}.group-contact>.msg-avatar{display:inline-flex;width:88px;height:88px;font-size:28px}.group-media-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.group-media-grid figure{margin:0;min-width:0}.group-media-grid img{width:100%;height:160px;object-fit:contain;border-radius:12px;background:#171a1e}.group-media-grid figcaption{font-size:12px;color:#b9bec6}.group-message-photo{max-width:100%;max-height:320px;border-radius:10px;object-fit:contain}.group-photo-button{flex:0 0 auto;color:#f3994c;max-width:90px;font-size:13px}.group-photo-button input{width:80px;font-size:10px}.member-swipe .group-member-profile{padding-right:26px}.member-swipe .group-swipe-trash{background:#ad581c}

.group-swipe[data-open="true"]>.group-swipe-toggle{visibility:hidden}

.member-swipe{margin:12px 0}.member-swipe .community-row{margin:0}
.community-dialog [data-rights] label{display:flex;align-items:flex-start;gap:12px;margin:16px 0;line-height:1.5}.community-dialog [data-rights] input[type=checkbox]{width:20px;height:20px;min-width:20px;flex:0 0 20px;margin:2px 0 0;accent-color:#ed812c}

/* Compact group composer: hidden native file input, matching direct chats. */
html body dialog.group-dialog .group-composer{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:end;gap:8px}
html body dialog.group-dialog .group-composer .group-photo-button{position:relative;display:grid;place-items:center;box-sizing:border-box;width:42px;height:48px;max-width:42px;margin:0;padding:0;gap:0;font-size:28px;line-height:1;border:1px solid #555d67;border-radius:13px;cursor:pointer;color:#ffad73}
html body dialog.group-dialog .group-composer .group-photo-button input[type=file]{position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;max-width:1px!important;padding:0!important;margin:0!important;border:0!important;opacity:0;overflow:hidden;clip-path:inset(50%)}
html body dialog.group-dialog .group-composer .group-photo-button:focus-within{outline:2px solid #ff9f58;outline-offset:2px}
html body dialog.group-dialog .group-composer textarea{width:100%;height:48px;min-height:48px;margin:0;font-size:16px;overflow-y:auto}
html body dialog.group-dialog .group-composer button{padding:12px;font-size:15px;white-space:nowrap}

html body dialog.group-dialog .group-composer textarea{scrollbar-width:none}html body dialog.group-dialog .group-composer textarea::-webkit-scrollbar{display:none}

/* Keep keyboard focus visible when the browser restores the group opener. */
html body :is(.group-inbox-row,dialog.group-dialog,dialog.messages-inbox-dialog):focus:not(:focus-visible){outline:none}
html body :is(.group-inbox-row,dialog.group-dialog,dialog.messages-inbox-dialog):focus-visible{outline:2px solid #ff9f58;outline-offset:-2px}
.group-inbox-row{-webkit-tap-highlight-color:transparent}

.group-message [data-message-menu] { justify-content: flex-end; }
.group-message [data-message-menu][hidden] { display: none; }
