.community-hub{width:min(100% - 2rem,1200px);margin:0 auto;padding:1.5rem 0 4rem}.hub-context{position:relative;display:flex;align-items:center;justify-content:space-between;gap:1.5rem;min-height:112px;margin-bottom:1rem;padding:1.25rem;border:1px solid var(--cng-border);border-radius:var(--cng-radius-lg);background:var(--cng-surface-1);overflow:hidden}.hub-context[data-banner]::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,var(--cng-surface-1) 28%,rgba(17,17,24,.9)),var(--hub-banner) center/cover no-repeat;opacity:.5}.hub-context>*{position:relative}.hub-identity,.hub-person,.hub-section-head,.hub-live-row,.hub-member{display:flex;align-items:center;gap:.75rem;min-width:0}.hub-identity h1{margin:.15rem 0;font-size:var(--cng-text-2xl)}.hub-identity p{margin:0;color:var(--cng-text-muted)}.hub-identity>.hub-avatar{width:64px;height:64px;flex-basis:64px;font-size:var(--cng-text-xl)}.hub-dashboard{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,320px);gap:1rem;align-items:start}.hub-sidebar{display:grid;gap:1rem}.hub-panel{min-width:0;padding:1rem;border:1px solid var(--cng-border);border-radius:var(--cng-radius-lg);background:var(--cng-surface-1)}.hub-panel h2{margin:0 0 .85rem;font-size:var(--cng-text-lg)}.hub-section-head{justify-content:space-between}.hub-section-head .cng-button{flex:0 0 auto}.hub-mobile-summary{display:none}.hub-announcement{padding:.75rem 0;border-bottom:1px solid var(--cng-border)}.hub-announcement:last-child{border-bottom:0}.hub-announcement>div{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap}.hub-announcement p{margin:.5rem 0 0;white-space:pre-wrap;overflow-wrap:break-word}.hub-announcement time,.hub-message time{margin-left:auto;color:var(--cng-text-muted);font-size:var(--cng-text-xs)}.hub-live-row,.hub-member{justify-content:space-between;padding:.55rem 0;border-bottom:1px solid var(--cng-border)}.hub-live-row:last-child,.hub-member:last-child{border-bottom:0}.hub-person span{display:grid;min-width:0}.hub-person small{color:var(--cng-text-muted);overflow-wrap:break-word}.hub-avatar{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:50%;object-fit:cover;background:var(--cng-surface-2);overflow:hidden}.hub-chat{display:flex;flex-direction:column;min-height:clamp(540px,70dvh,780px)}.hub-chat-status{min-height:1.25rem;margin:0;color:var(--cng-warning);font-size:var(--cng-text-sm)}.hub-messages{flex:1;min-height:320px;max-height:58dvh;overflow-y:auto;overscroll-behavior:contain}.hub-message{padding:.7rem 0;border-bottom:1px solid var(--cng-border)}.hub-message header{display:flex;align-items:center;gap:.5rem;min-width:0}.hub-message p{margin:.4rem 0;white-space:pre-wrap;overflow-wrap:break-word}.hub-message .actions{opacity:.78}.hub-new-messages{position:sticky;bottom:94px;align-self:center}.hub-composer{position:sticky;bottom:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:.75rem;padding-top:1rem;background:var(--cng-surface-1)}.hub-composer .cng-notice{grid-column:1/-1}.hub-composer textarea{min-height:64px;max-height:160px;resize:vertical}.hub-leave{justify-self:start}.hub-announcement-dialog{width:min(92vw,620px)}.compact-empty{margin:.4rem 0;color:var(--cng-text-muted)}
@media(max-width:760px){.community-hub{width:min(100% - 1rem,1200px);padding-top:.75rem}.hub-context{align-items:flex-start;flex-direction:column}.hub-context .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.hub-context .actions .cng-button{min-width:0}.hub-dashboard{display:block}.hub-sidebar{margin-top:1rem}.hub-announcements--desktop,.hub-live--desktop{display:none}.hub-mobile-summary{display:grid;gap:1rem;margin-bottom:1rem}.hub-chat{min-height:max(520px,68dvh)}.hub-messages{max-height:52dvh}.hub-composer{grid-template-columns:minmax(0,1fr) auto}.hub-composer button{min-height:44px}.hub-live-row,.hub-member{align-items:flex-start}.hub-message header{display:grid;grid-template-columns:auto minmax(0,1fr)}.hub-message time{grid-column:2;margin-left:0}.hub-message header .community-role-badge{grid-column:2}.hub-message p{overflow-wrap:break-word;word-break:normal}}
@media(max-width:420px){.hub-context{padding:1rem}.hub-identity>.hub-avatar{width:48px;height:48px;flex-basis:48px}.hub-identity h1{font-size:var(--cng-text-xl)}.hub-context .actions{grid-template-columns:1fr}.hub-panel{padding:.85rem}.hub-section-head{align-items:flex-start}.hub-section-head .cng-button{min-height:44px}.hub-live-row,.hub-member{align-items:stretch;flex-direction:column}.hub-live-row .cng-button,.hub-member .cng-button{align-self:flex-start}.hub-composer{grid-template-columns:1fr}.hub-composer>button{width:100%}}
.hub-person{flex:1 1 auto;min-width:0}.hub-person span{min-width:0}.hub-person strong,.hub-announcement strong{min-width:0;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:normal;word-break:normal}.hub-person small{overflow-wrap:normal;word-break:normal}.hub-live-row>.cng-button,.hub-member>.cng-button{flex:0 0 auto;min-height:44px;white-space:normal;text-align:center}.hub-announcement,.hub-announcement>div{min-width:0}.hub-sidebar .hub-live-row,.hub-sidebar .hub-member{display:grid;grid-template-columns:minmax(0,1fr);align-items:start}.hub-sidebar .hub-live-row>.cng-button,.hub-sidebar .hub-member>.cng-button{justify-self:start}
.hub-activity{display:grid;gap:.4rem;padding:.75rem 0;border-bottom:1px solid var(--cng-border)}.hub-activity:last-child{border-bottom:0}.hub-activity-time{color:var(--cng-text-muted);font-size:var(--cng-text-xs);font-weight:var(--cng-weight-semibold);text-transform:uppercase}.hub-activity-copy{display:grid;min-width:0}.hub-activity-copy strong{overflow-wrap:normal;word-break:normal}.hub-activity-copy small{color:var(--cng-text-muted);font-size:var(--cng-text-xs)}.hub-activity-actions{display:flex;flex-wrap:wrap;gap:.35rem}.hub-activity-actions .cng-button{min-height:44px;padding-inline:.65rem}.hub-event-dialog{width:min(92vw,680px)}.hub-event-time-fields{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:.75rem}.hub-event-creators{display:flex;flex-wrap:wrap;gap:.5rem;margin:0;padding:0;border:0}.hub-event-creators legend{width:100%;margin-bottom:.35rem;color:var(--cng-text);font-weight:var(--cng-weight-semibold)}.hub-event-detail{width:min(92vw,640px)}
@media(max-width:760px){.hub-activities--desktop{display:none}}
@media(max-width:520px){.hub-event-time-fields{grid-template-columns:1fr}.hub-activity-actions{display:grid;grid-template-columns:1fr}.hub-activity-actions .cng-button{width:100%}.hub-event-dialog,.hub-event-detail,.hub-event-cancel{width:calc(100% - 1rem)}}

/* Keep history as the sole scroll container; header and composer remain reachable. */
.hub-chat{height:clamp(540px,70dvh,780px);min-height:0;max-height:780px;overflow:hidden}.hub-chat-status{flex:0 0 auto}.hub-messages{flex:1 1 auto;min-height:0;max-height:none;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.hub-composer{flex:0 0 auto}
@media(max-width:760px){.hub-chat{height:min(68dvh,calc(var(--cng-chat-viewport-height,100dvh) - 5rem - env(safe-area-inset-bottom,0px)));min-height:0;max-height:640px}.hub-messages{min-height:0;max-height:none}}
