/* Shared, scoped layout for the inbox and community screens. */
html:has(.vobixInbox), html:has(.communityPage) {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.communityPage .phaseHeader {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
}
.communityPage .phaseHeader b { font-size: 20px; line-height: 1.2; text-align: center; white-space: nowrap; }
.communityPage .phaseHeader a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; line-height: 1.25; text-decoration: none; white-space: nowrap; }
.communityPage .communityWrap { width: 100%; max-width: 880px; padding: 24px 16px max(88px, calc(env(safe-area-inset-bottom) + 32px)); }
.communityPage .communityTitle p { font-size: 11px; line-height: 1.4; letter-spacing: .12em; margin: 0 0 8px; }
.communityPage .communityTitle h1 { font-size: clamp(24px, 5vw, 34px); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 20px; overflow-wrap: anywhere; }
.communityPage .communityTabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; overflow: visible; padding-bottom: 12px; }
.communityPage .communityTabs button { min-width: 0; min-height: 44px; padding: 9px 4px; font-size: 13px; line-height: 1.25; border-radius: 12px; white-space: normal; overflow-wrap: anywhere; }
.communityPage .phaseCard { min-width: 0; padding: 18px; border-radius: 18px; }
.communityPage .phaseCard h2, .communityPage .communitySectionTitle h2 { font-size: 20px; line-height: 1.25; margin-bottom: 16px; }
.communityPage .communityAvatar { width: 72px; height: 72px; border-radius: 22px; font-size: 28px; margin-bottom: 18px; }
.communityPage label { font-size: 14px; line-height: 1.4; }
.communityPage .phaseButton { font-size: 14px; line-height: 1.35; min-height: 44px; padding: 11px 14px; }
.communityPage .phaseNote { font-size: 13px; line-height: 1.5; }
.communityPage input[type=file] { overflow: hidden; font-size: 13px; }
.communityPage #communityStatus:empty { display: none; }
.communityPage .communityTabs { margin-bottom: 16px; }
.communityPage:has(#profileSection:not([hidden])) .communityTitle { display: none; }
.vobixInbox .inboxShortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.vobixInbox .inboxShortcuts a { flex: 0 1 auto; min-width: 0; min-height: 44px; padding: 10px 14px; font-size: 13px; line-height: 1.3; font-weight: 600; border-radius: 14px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .vobixInbox .topbar { height: auto !important; min-height: calc(60px + var(--vobix-safe-top)); padding: var(--vobix-safe-top) 14px 0; gap: 8px; }
  .vobixInbox .head { min-width: 0; }
  html:not([data-vobix-font=large]):not([data-vobix-font=xlarge]) .vobixInbox .head b { font-size: 22px !important; letter-spacing: -.035em; line-height: 1.2; }
  .vobixInbox .back, .vobixInbox .dots { flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; color: #b9e7fa; font-size: 24px; }
  .vobixInbox .content { padding: 16px 16px 24px; }
  .vobixInbox .searchbox { gap: 8px; margin-bottom: 14px; }
  .vobixInbox .searchbox input { height: 46px; font-size: 16px; padding: 10px 12px; border-radius: 14px; }
  .vobixInbox .searchbox button { flex: 0 0 auto; min-width: 72px; min-height: 46px; padding: 0 12px; font-size: 14px; font-weight: 650; border-radius: 14px; }
  .vobixInbox .chatHomeTop h1 { font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
  .vobixInbox .chatHomeTop span { font-size: 12px; line-height: 1.4; margin-top: 5px; }
  .vobixInbox .chatHomeList { margin-top: 10px; }
  .vobixInbox .chatHomeRow { gap: 10px; min-height: 76px; padding: 12px 0; }
  .vobixInbox .chatHomeAvatar { width: 46px; height: 46px; min-width: 46px; font-size: 20px; }
  html:not([data-vobix-font=large]):not([data-vobix-font=xlarge]) .vobixInbox .chatHomeInfo b { font-size: 16px; line-height: 1.3; }
  html:not([data-vobix-font=large]):not([data-vobix-font=xlarge]) .vobixInbox .chatHomeInfo span { font-size: 13px; line-height: 1.4; }
  .vobixInbox .chatHomeRow time { font-size: 11px; padding-top: 2px; }
  html:not([data-vobix-controls=large]) .vobixInbox .vobixBubbleTrigger { width: 52px; height: 52px; font-size: 24px; }
}
@media (max-width: 360px) {
  .communityPage .phaseHeader { gap: 6px; padding-inline: 12px; }
  .communityPage .phaseHeader b { font-size: 18px; }
  .communityPage .phaseHeader a { font-size: 12px; }
  .communityPage .communityWrap, .vobixInbox .content { padding-inline: 12px; }
}

/* Only the grip drags the window; its contents keep native touch scrolling. */
.vobixInbox .settingsBox{box-sizing:border-box;max-height:calc(100vh - 40px);max-height:calc(100dvh - max(16px,var(--vobix-safe-top,env(safe-area-inset-top,0px))) - max(24px,var(--vobix-menu-safe-bottom,var(--vobix-safe-bottom,env(safe-area-inset-bottom,0px)))));overflow-y:auto;overflow-x:hidden;touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch;padding:16px 16px 32px;scroll-padding-bottom:32px}
.vobixInbox .settingsDragHandle{position:sticky;top:-16px;z-index:1;min-height:44px;display:flex;align-items:center;justify-content:center;margin:-16px -16px 16px;padding:4px 12px;background:#10344c;color:#a8d9ee;border-bottom:1px solid #36596e;font-size:13px;touch-action:none;cursor:grab}
.vobixInbox .settingsBox h2{font-size:22px;line-height:1.25;overflow-wrap:anywhere}
.vobixInbox .settingsBox p{font-size:15px;line-height:1.5}
.vobixInbox .settingsMenuButton{font-size:16px;line-height:1.35;padding:13px;margin:6px 0}
.vobixInbox .settingsMenuButton small{font-size:13px;line-height:1.4}
.vobixInbox .mobileHistorySheet,.vobixInbox .qrShareCard{overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.vobixInbox .settingsDragHandle{justify-content:space-between;gap:8px}.vobixInbox .settingsDragHandle button{min-height:44px;border:0;border-radius:8px;padding:8px;background:#18465e;color:#eafaff;font:600 14px system-ui;touch-action:manipulation;cursor:pointer}.vobixInbox .menuBackButton{position:sticky;top:0;z-index:2;background:#123349!important;font-size:14px!important;min-height:44px!important}.vobixInbox #closeAgenda{width:auto;min-width:90px;border-radius:10px;font-size:14px}.vobixInbox .qrShareCard #closeQrShare{position:static;display:block;min-height:44px;font-size:14px;margin-bottom:12px}.vobixInbox .qrShareCard{max-height:85dvh;box-sizing:border-box}

/* Keep the floating launcher out of other menus and dialogs. */
.vobixInbox:has(.settings.open, .mobileHistoryPanel.open, .qrSharePanel:not([hidden]), #agendaPanel:not([hidden]), dialog[open]) .vobixBubbleShell{visibility:hidden!important;pointer-events:none!important}
.vobixInbox:has(.settings.open, .mobileHistoryPanel.open, .qrSharePanel:not([hidden]), #agendaPanel:not([hidden]), dialog[open]) .vobixBubbleShell *{pointer-events:none!important}
