/* Navigation spacing and the continuous bottom safe-area surface. */
.page-head-chat-menu { display: none; }
body.mobile-ui:has(.page-layer.open :is(#chatForm,#groupChatForm)) .bottom-nav.home-ref-nav { display: none; }
body.mobile-ui .page-layer:has(:is(#chatForm,#groupChatForm)) {
  top: var(--conversation-top,0px);
  bottom: auto;
  height: var(--conversation-height,100dvh);
  padding: 0;
}
body.mobile-ui .page-layer:has(:is(#chatForm,#groupChatForm)) .page-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-bottom: 0;
  scroll-padding-bottom: 0;
  overflow: hidden;
}
/* Conversation composers own the safe area; generic detail padding must not lift them. */
body.mobile-ui #pageLayer[data-level="secondary"]:has(:is(#chatForm,#groupChatForm)) .page-shell {
  padding-bottom: 0 !important;
}
body.mobile-ui .page-layer:has(:is(#chatForm,#groupChatForm)) .page-head { flex-shrink: 0; }
body.mobile-ui .page-layer:has(:is(#chatForm,#groupChatForm)) .page-head h1 {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.mobile-ui .page-layer:has(#chatForm) .page-head-chat-menu {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--holyuni-ink);
}
body.mobile-ui .page-head-chat-menu .icon { width: 22px; height: 22px; }
body.mobile-ui .page-head-chat-menu:active { background: var(--holyuni-mint-light); }
body.mobile-ui .page-layer:has(:is(#chatForm,#groupChatForm)) :is(#pageContent,.group-chat-page) {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}
body.mobile-ui .conversation-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
body.mobile-ui .conversation-body > * { flex-shrink: 0; }
body.mobile-ui .conversation-body :is(.chat-stream,.group-chat-stream) { flex: 1 0 auto; min-height: 0; }
body.mobile-ui .page-layer:has(#groupChatForm) .group-chat-compose {
  position: static;
  flex-shrink: 0;
  width: 100%;
  padding: 0;
  transform: none;
  background: var(--holyuni-canvas);
}
body.mobile-ui .page-layer:has(:is(#chatForm,#groupChatForm)) .chat-form {
  position: static;
  flex-shrink: 0;
  margin: 0;
  padding: 10px max(12px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--holyuni-canvas);
  scroll-margin-bottom: 0;
}
body.mobile-ui {
  --holyuni-tab-primary-height: 48px;
  --holyuni-tab-secondary-height: 36px;
  --tab-gap: 12px;
  --tab-padding-x: 16px;
  --tab-label-gap: 6px;
  --tab-touch-size: 56px;
  --filter-gap: 12px;
  --filter-padding-x: 16px;
  --filter-content-gap: 8px;
  --nav-gap: 4px;
  --section-gap: 16px;
  --secondary-section-gap: 12px;
  --navigation-touch-size: 44px;
  --holyuni-bottom-nav-height: 52px;
  --holyuni-bottom-nav-clearance: 12px;
}

/* Shared horizontal rows keep their existing page insets and visual treatment. */
body.mobile-ui :is(.filters,.campus-subboards,.task-status-tabs,.event-category-tabs,.event-date-filters,.message-tabs,.manager-tabs,.group-status-tabs,.group-date-filters,.public-profile-tabs,.group-message-tabs,.message-group-subtabs,.notification-category-tabs,.my-group-tabs,.wallet-trade-tabs,.my-market-trade-tabs,.partner-control-tabs,.partner-filter-row,.partner-range-tabs,.partner-risk-nav,.partner-risk-word-tabs) {
  display: flex;
  flex-wrap: nowrap;
  column-gap: var(--filter-gap) !important;
  row-gap: 8px;
  min-width: 0;
  padding-block: 4px;
  margin-block-end: var(--secondary-section-gap);
  overflow-x: auto;
  scroll-padding-inline: var(--tab-padding-x);
  align-items: center;
}
body.mobile-ui :is(.filters,.campus-subboards,.task-status-tabs,.event-category-tabs,.event-date-filters,.message-tabs,.manager-tabs,.group-status-tabs,.group-date-filters,.public-profile-tabs,.group-message-tabs,.message-group-subtabs,.notification-category-tabs,.my-group-tabs,.wallet-trade-tabs,.my-market-trade-tabs,.partner-control-tabs,.partner-filter-row,.partner-range-tabs,.partner-risk-nav,.partner-risk-word-tabs) > :is(button,a,[role="tab"]) {
  flex: 0 0 auto;
  width: auto;
  min-width: var(--navigation-touch-size);
  max-width: none;
  min-height: var(--navigation-touch-size) !important;
  height: auto !important;
  padding: 6px var(--filter-padding-x) !important;
  gap: var(--filter-content-gap);
  align-items: center;
  justify-content: center;
}
body.mobile-ui .home-ref .filters {
  padding: 0 var(--tab-padding-x) !important;
  margin-block: 0 var(--section-gap);
}
body.mobile-ui .home-ref :is(.campus-subboards,.task-status-tabs,.event-category-tabs,.event-date-filters) {
  padding-inline: var(--tab-padding-x);
}
body.mobile-ui .home-ref .filters .chip {
  min-height: var(--navigation-touch-size) !important;
  height: auto !important;
  padding: 6px var(--filter-padding-x) !important;
  gap: var(--filter-content-gap);
}

/* Existing two-way controls retain their grid and appearance. */
body.mobile-ui :is(.wallet-major-tabs,.my-market-major-tabs,.my-event-tabs,.connection-tabs,.manager-visibility-tabs,.credit-role-tabs,.group-primary-actions) {
  gap: var(--tab-gap);
  padding: 4px;
  height: auto;
  margin-block-end: var(--section-gap);
  align-items: stretch;
}
body.mobile-ui :is(.wallet-major-tabs,.my-market-major-tabs,.my-event-tabs,.connection-tabs,.manager-visibility-tabs,.credit-role-tabs,.group-primary-actions) > button {
  min-height: var(--navigation-touch-size) !important;
  height: auto !important;
  padding: 6px 12px;
  gap: var(--filter-content-gap);
  align-items: center;
  justify-content: center;
}

/* Category artwork is unchanged; only the surrounding touch area gains space. */
body.mobile-ui .group-reference-layout > .group-category-grid {
  gap: var(--tab-gap);
  padding-block: 4px;
  margin-block: 12px var(--section-gap);
}
body.mobile-ui .group-reference-layout .group-category {
  width: auto;
  min-width: var(--tab-touch-size);
  flex: 0 0 auto;
  min-height: var(--tab-touch-size);
  padding: 8px;
}
body.mobile-ui .group-category .group-category-visual {
  gap: var(--tab-label-gap);
}
body.mobile-ui .group-category .group-category-visual .group-category-icon {
  margin-block: 0;
}
body.mobile-ui .group-reference-layout > .group-primary-actions {
  height: auto;
  margin-block: 0 var(--section-gap);
  gap: var(--tab-gap);
}
body.mobile-ui .group-reference-layout > .group-primary-actions button {
  min-height: var(--navigation-touch-size) !important;
  height: auto !important;
}
body.mobile-ui :is(.group-date-filters,.event-date-filters) > :is(.group-date-filter,.event-date-filter) {
  row-gap: 4px;
}
body.mobile-ui .group-reference-layout :is(.group-date-filters,.group-status-tabs) {
  gap: var(--filter-gap);
  margin-block-end: var(--secondary-section-gap);
}
body.mobile-ui .message-center .message-toolbar {
  gap: var(--filter-gap);
  margin-block-end: var(--secondary-section-gap);
}
body.mobile-ui .message-center .message-tabs { margin-block-end: 0; }
body.mobile-ui .message-center .read-all {
  min-height: var(--navigation-touch-size);
  padding-inline: 4px;
}

/* One surface from the navigation content through the device safe area. */
body.mobile-ui .home-ref.app,
body.mobile-ui .page-shell {
  padding-bottom: calc(var(--holyuni-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + var(--holyuni-bottom-nav-clearance));
}
body.mobile-ui .bottom-nav.home-ref-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: 0;
  grid-template-rows: var(--holyuni-bottom-nav-height);
  box-sizing: border-box;
  width: 100%;
  max-width: 520px;
  height: calc(var(--holyuni-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  bottom: 0;
  padding: 0 max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  align-items: center;
  justify-items: center;
}
body.mobile-ui .bottom-nav.home-ref-nav .nav-btn {
  width: 100%;
  min-width: 0;
  gap: var(--nav-gap);
  justify-items: center;
  align-content: center;
}
body.mobile-ui .bottom-nav.home-ref-nav .create {
  margin-inline: 0;
  justify-self: center;
  position: relative;
}
/* Extend the existing 40px home button's hit area without resizing its artwork. */
body.mobile-ui .bottom-nav.home-ref-nav .create::after {
  content: "";
  position: absolute;
  inset: -2px;
}

@media (max-width: 340px) {
  body.mobile-ui { --tab-gap: 8px; --tab-padding-x: 12px; }
}
@media (min-width: 700px) {
  body.mobile-ui { --tab-padding-x: 20px; }
}

/* Messages: independent search, horizontal filters and compact two-line rows. */
body.mobile-ui .message-center { padding-inline: 16px; padding-bottom: 20px; }
body.mobile-ui .message-center .ui-message-search { margin-bottom: 12px; }
body.mobile-ui .message-center .message-toolbar {
  margin: 0 -16px 16px;
  padding: 0 16px 0 0 !important;
  gap: 8px;
}
body.mobile-ui .message-center .message-tabs {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 12px !important;
  padding: 0 16px;
  overflow-x: auto;
  scroll-padding-inline: 16px;
}
body.mobile-ui .message-center .message-tabs .message-tab {
  flex: 0 0 auto;
  min-height: 44px !important;
}
body.mobile-ui .message-center .read-all { flex-shrink: 0; min-height: 44px; }
body.mobile-ui .message-center .message.ui-conversation {
  min-height: 76px;
  height: auto;
  padding: 12px;
  gap: 12px;
  margin-bottom: 8px;
  align-items: center;
}
body.mobile-ui .message-center .ui-conversation > :is(.ui-avatar,.ui-avatar-group,.avatar) {
  flex-shrink: 0;
  align-self: center;
}
body.mobile-ui .message-center .message-copy { flex: 1 1 0; min-width: 0; }
body.mobile-ui .message-center .message-copy > strong {
  flex-direction: row;
  gap: 8px;
  line-height: 1.3;
}
body.mobile-ui .message-center .message-thread-title {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.mobile-ui .message-center .ui-conversation-tags {
  flex: 0 1 auto;
  max-width: 40%;
  gap: 4px;
}
body.mobile-ui .message-center .ui-conversation-preview {
  margin-top: 6px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.mobile-ui .message-center .ui-conversation-meta {
  flex: 0 0 40px;
  min-width: 40px;
  padding-block: 0;
  align-self: stretch;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
body.mobile-ui .page-shell:has(.message-center) {
  padding-bottom: calc(var(--holyuni-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

/* Home hierarchy: content type, browsing mode, then the feed. */
body.mobile-ui .home-ref :is(#campusSubboards,#taskStatusTabs,#eventDateTabs,#eventCategoryTabs){display:none!important}
body.mobile-ui .home-ref .filters.home-filter-toolbar{display:flex;flex-direction:column;align-items:stretch;gap:var(--holyuni-space-2)!important;margin-bottom:var(--holyuni-space-3);overflow:visible}
body.mobile-ui .home-ref .home-filter-toolbar .primary-tabs{position:static;display:flex;width:100%;min-width:0;align-items:center;justify-content:space-between;gap:var(--holyuni-space-3);margin:0!important;padding:0;overflow-x:auto;background:transparent;backdrop-filter:none;scrollbar-width:none}
body.mobile-ui .home-ref .home-filter-toolbar .primary-tab{flex:1 0 auto;display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:max-content;min-height:var(--holyuni-tab-primary-height);height:var(--holyuni-tab-primary-height);padding:0 var(--holyuni-space-1);border:0;border-radius:0;background:transparent;color:var(--holyuni-muted);font-size:var(--holyuni-font-card-title);font-weight:500;white-space:nowrap}
body.mobile-ui .home-ref .home-filter-toolbar .primary-tab.active{color:var(--holyuni-mint);font-size:var(--holyuni-font-card-title);font-weight:600}
body.mobile-ui .home-ref .home-filter-toolbar .primary-tab::after{left:50%;bottom:0;width:var(--holyuni-space-8);height:3px;transform:translateX(-50%)}
body.mobile-ui .home-ref .home-filter-toolbar .primary-tab.active::after{display:block;background:var(--holyuni-mint)}
body.mobile-ui .home-ref .home-browse-controls{display:flex;align-items:center;gap:var(--holyuni-space-3);min-width:0;height:36px}
body.mobile-ui .home-ref .home-sort-tabs{display:flex;align-items:center;gap:var(--holyuni-space-1);min-width:0;flex:1;overflow-x:auto;scrollbar-width:none}
body.mobile-ui .home-ref .filters.home-filter-toolbar .chip{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;height:36px!important;min-height:36px!important;padding:0 var(--holyuni-space-3)!important;gap:var(--holyuni-space-1)!important;border:0;border-radius:var(--holyuni-radius-pill)!important;background:transparent;color:var(--holyuni-muted);font-size:var(--holyuni-font-body)!important;line-height:1;font-weight:400;box-shadow:none;white-space:nowrap}
body.mobile-ui .home-ref .filters.home-filter-toolbar .chip.active{background:var(--holyuni-mint-light);color:var(--holyuni-forest);font-weight:500}
body.mobile-ui .home-ref .home-filter-toolbar svg{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
body.mobile-ui .home-ref .filters.home-filter-toolbar .filter-launch{margin-left:auto;padding:0!important;border-radius:0!important;background:transparent!important}
body.mobile-ui .home-ref .home-filter-toolbar .filter-launch svg circle{fill:var(--holyuni-canvas)}
body.mobile-ui .home-ref #filterCount{font:inherit}
body.mobile-ui .home-ref #filterCount:empty{display:none}
body.mobile-ui .home-ref .home-filter-toolbar button:focus-visible{outline:2px solid var(--holyuni-forest);outline-offset:-2px}
@media(max-width:360px){body.mobile-ui .home-ref .filters.home-filter-toolbar .chip{padding-inline:var(--holyuni-space-2)!important}body.mobile-ui .home-ref .home-filter-toolbar .primary-tabs{gap:var(--holyuni-space-1)}}

/* Content-sized bottom sheets; header and actions stay outside the scrolling fields. */
body.mobile-ui #overlay:is([data-detail="advancedFilters"],[data-detail="feedSort"]){align-items:flex-end;padding:0;background:rgba(11,13,12,.28);backdrop-filter:blur(3px)}
body.mobile-ui #overlay:is([data-detail="advancedFilters"],[data-detail="feedSort"]) .sheet{display:flex;flex-direction:column;max-height:calc(90dvh - env(safe-area-inset-top));padding:0;border-radius:24px 24px 0 0;background:var(--holyuni-surface);overflow:hidden}
body.mobile-ui #overlay:is([data-detail="advancedFilters"],[data-detail="feedSort"]) .sheet-head{flex-shrink:0;min-height:60px;padding:0 20px;gap:12px}
body.mobile-ui #overlay:is([data-detail="advancedFilters"],[data-detail="feedSort"]) .sheet-head h2{font-size:18px}
body.mobile-ui #overlay:is([data-detail="advancedFilters"],[data-detail="feedSort"]) .close{width:36px;height:36px;flex:0 0 36px;background:transparent;color:var(--holyuni-ink)}
body.mobile-ui #overlay:is([data-detail="advancedFilters"],[data-detail="feedSort"]) .sheet-content{display:flex;flex-direction:column;min-height:0;margin:0;padding:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
body.mobile-ui .home-filter-form{display:flex;flex-direction:column;min-height:0;gap:0}
body.mobile-ui .home-filter-fields{display:grid;gap:16px;min-height:0;overflow:auto;padding:4px 20px 16px;overscroll-behavior:contain;scrollbar-width:none}
body.mobile-ui .home-filter-fields [hidden]{display:none!important}
body.mobile-ui .home-filter-group{min-width:0;margin:0;padding:0;border:0}
body.mobile-ui .home-filter-group legend{margin-bottom:var(--holyuni-space-2);padding:0;color:var(--holyuni-ink);font-size:var(--holyuni-font-body);font-weight:600}
body.mobile-ui .home-filter-options{display:flex;flex-wrap:wrap;gap:var(--holyuni-space-2)}
body.mobile-ui .home-filter-choice{position:relative;display:block;min-width:0;cursor:pointer}
body.mobile-ui .home-filter-choice input{position:absolute;inset:0;width:100%;height:100%;min-height:0;margin:0;opacity:0;cursor:pointer}
body.mobile-ui .home-filter-choice span{display:flex;align-items:center;justify-content:center;height:36px;padding:0 var(--holyuni-space-3);border-radius:18px;background:var(--holyuni-canvas);color:var(--holyuni-muted);font-size:var(--holyuni-font-body);font-weight:400;white-space:nowrap}
body.mobile-ui .home-filter-choice input:checked+span{background:var(--holyuni-mint);color:var(--holyuni-surface)}
body.mobile-ui .home-filter-choice input:focus-visible+span{outline:2px solid var(--holyuni-forest);outline-offset:2px}
body.mobile-ui .home-price-range{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:var(--holyuni-space-2)}
body.mobile-ui .home-price-range input{width:100%;min-width:0;height:40px;min-height:40px;padding:var(--holyuni-space-2) var(--holyuni-space-3);font-size:var(--holyuni-font-body);border:1px solid var(--holyuni-line);background:var(--holyuni-canvas);border-radius:var(--holyuni-radius-control)}
body.mobile-ui .home-price-error{margin:var(--holyuni-space-1) 0 0;color:var(--holyuni-danger);font-size:var(--holyuni-font-meta)}
body.mobile-ui .home-filter-note{margin:0;color:var(--holyuni-muted);font-size:12px;line-height:1.5}
body.mobile-ui .home-filter-footer{display:flex;flex-shrink:0;gap:12px;padding:12px 20px calc(16px + env(safe-area-inset-bottom));border-top:1px solid var(--holyuni-line);background:var(--holyuni-surface)}
body.mobile-ui .home-filter-footer button{min-height:44px;padding:0 20px;border:0;border-radius:var(--holyuni-radius-control);font-size:15px;font-weight:600}
body.mobile-ui .home-filter-footer .secondary{background:var(--holyuni-canvas);color:var(--holyuni-ink)}
body.mobile-ui .home-filter-footer .primary{flex:1;background:var(--holyuni-mint);color:var(--holyuni-surface)}
body.mobile-ui .home-sort-options{padding:0 20px calc(16px + env(safe-area-inset-bottom))}
body.mobile-ui .home-sort-options button{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:50px;border:0;border-bottom:1px solid var(--holyuni-line);background:var(--holyuni-surface);text-align:left;color:var(--holyuni-ink);font-size:15px}
body.mobile-ui .home-sort-options button[aria-pressed="true"]{color:var(--holyuni-forest)}
body.mobile-ui .home-sort-options svg{width:20px;height:20px;fill:none;stroke:var(--holyuni-mint);stroke-width:2}
html:has(#overlay.open:is([data-detail="advancedFilters"],[data-detail="feedSort"])),body:has(#overlay.open:is([data-detail="advancedFilters"],[data-detail="feedSort"])){overflow:hidden;overscroll-behavior:none}

/* Lightweight content actions and reporting reuse the existing single overlay. */
body.mobile-ui #overlay:has(.native-content-actions,.native-report-form){inset:var(--native-sheet-top,0px) 0 auto;height:var(--native-sheet-height,100dvh);align-items:flex-end;padding:0;background:rgba(11,13,12,.28);backdrop-filter:blur(3px)}
body.mobile-ui #overlay:has(.native-content-actions,.native-report-form) .sheet{display:flex;flex-direction:column;max-height:calc(var(--native-sheet-height,100dvh) - env(safe-area-inset-top) - 20px);height:auto;padding:0;border:0;border-radius:24px 24px 0 0;background:var(--holyuni-surface);overflow:hidden}
body.mobile-ui #overlay:has(.native-content-actions,.native-report-form) .sheet-content{display:flex;flex-direction:column;min-height:0;margin:0;padding:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:none}
body.mobile-ui #overlay:has(.native-content-actions) .sheet-head{position:absolute;width:1px;height:1px;min-height:0;overflow:hidden;clip-path:inset(50%);padding:0}
body.mobile-ui #overlay:has(.native-content-actions) .sheet-head .close{display:none}
body.mobile-ui .native-content-actions{padding:8px 20px calc(12px + var(--native-sheet-safe-bottom,env(safe-area-inset-bottom)))}
body.mobile-ui .native-content-actions button{display:flex;align-items:center;gap:12px;width:100%;min-height:50px;padding:10px 0;border:0;border-bottom:1px solid var(--holyuni-line);border-radius:0;background:var(--holyuni-surface);color:var(--holyuni-ink);text-align:left;font:inherit;font-size:16px;line-height:1.5;font-weight:400}
body.mobile-ui .native-content-actions button.danger{color:var(--holyuni-danger)}
body.mobile-ui .native-content-actions svg{flex:0 0 20px;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.mobile-ui .native-content-actions .native-action-cancel{justify-content:center;border:0;margin-top:4px}
body.mobile-ui #overlay:has(.native-report-form) .sheet-head{min-height:56px;flex-shrink:0;padding:0 20px;gap:12px}
body.mobile-ui #overlay:has(.native-report-form) .sheet-head h2{font-size:18px;font-weight:600}
body.mobile-ui #overlay:has(.native-report-form) .close{display:grid;place-items:center;width:32px;height:32px;flex:0 0 32px;background:transparent;color:var(--holyuni-muted);border:0}
body.mobile-ui #overlay:has(.native-report-form) .close .icon{width:20px;height:20px}
body.mobile-ui .native-report-form{display:flex;flex-direction:column;min-height:0;gap:0}
body.mobile-ui .native-report-body{min-height:0;overflow:auto;padding:0 20px;overscroll-behavior:contain;scrollbar-width:none}
body.mobile-ui .native-report-reasons{min-width:0;margin:0;padding:0;border:0}
body.mobile-ui .native-report-reason{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:50px;padding:10px 0;border:0;border-bottom:1px solid var(--holyuni-line);border-radius:0;background:var(--holyuni-surface);color:var(--holyuni-ink);font-size:15px;font-weight:400;line-height:1.5;cursor:pointer}
body.mobile-ui .native-report-reason:has(input:checked){color:var(--holyuni-forest);background:var(--holyuni-surface)}
body.mobile-ui .native-report-reason input[type="radio"]{appearance:none;flex:0 0 20px;width:20px;height:20px;min-height:20px;margin:0;padding:0;border:1.5px solid var(--holyuni-line);border-radius:50%;background:var(--holyuni-surface)}
body.mobile-ui .native-report-reason input[type="radio"]:checked{border-color:var(--holyuni-mint);background:radial-gradient(circle,var(--holyuni-mint) 0 4px,transparent 4.5px)}
body.mobile-ui .native-report-reason input:focus-visible,body.mobile-ui .native-content-actions button:focus-visible{outline:2px solid var(--holyuni-forest);outline-offset:2px}
body.mobile-ui .native-report-notes{padding:0;border:0;background:var(--holyuni-surface)}
body.mobile-ui .native-report-notes summary{display:flex;align-items:center;justify-content:space-between;min-height:50px;list-style:none;font-size:15px;color:var(--holyuni-muted);cursor:pointer}
body.mobile-ui .native-report-notes summary::-webkit-details-marker{display:none}
body.mobile-ui .native-report-notes summary svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5}
body.mobile-ui .native-report-notes[open] summary svg{transform:rotate(180deg)}
body.mobile-ui .native-report-notes textarea{display:block;min-height:96px;max-height:180px;margin-bottom:12px;padding:12px;border:1px solid var(--holyuni-line);border-radius:var(--holyuni-radius-control);background:var(--holyuni-canvas);color:var(--holyuni-ink);font-size:16px;line-height:1.5;resize:vertical}
body.mobile-ui .native-report-footer{flex-shrink:0;padding:12px 20px calc(16px + var(--native-sheet-safe-bottom,env(safe-area-inset-bottom)));background:var(--holyuni-surface)}
body.mobile-ui .native-report-footer .cta{min-height:48px;height:48px;margin:0;border-radius:var(--holyuni-radius-control);font-size:16px;font-weight:600;background:var(--holyuni-mint);color:var(--holyuni-ink)}
html:has(#overlay.open .native-content-actions,#overlay.open .native-report-form),body:has(#overlay.open .native-content-actions,#overlay.open .native-report-form){overflow:hidden;overscroll-behavior:none}
body:has(#overlay.open .native-content-actions,#overlay.open .native-report-form) .page-shell{overflow:hidden}

/* Notifications follow the same primary text-tab hierarchy as home and search. */
body.mobile-ui .page-layer:has(.notification-center) .page-head h1{position:absolute;left:64px;right:64px;margin:0;text-align:center;white-space:nowrap;pointer-events:none}
body.mobile-ui .notification-center .message-toolbar{position:static;padding:0 var(--holyuni-space-4);margin:0;background:transparent;backdrop-filter:none}
@media(max-width:360px){body.mobile-ui .home-ref .home-browse-controls{gap:var(--holyuni-space-2)}body.mobile-ui .home-ref .home-sort-tabs{gap:0}body.mobile-ui .home-ref .filters.home-filter-toolbar .chip{padding-inline:calc(var(--holyuni-space-1) * 1.5)!important}}

/* Primary content tabs: shared by notifications, conversations and application review. */
body.mobile-ui :is(.notification-center,.message-center,.group-application-review) .content-primary-tabs{
  display:flex;flex:1;min-width:0;gap:var(--holyuni-space-2)!important;
  padding:0;margin:0;border-bottom:1px solid var(--holyuni-line);overflow-x:auto;scrollbar-width:none;
}
body.mobile-ui :is(.notification-center,.message-center,.group-application-review) .content-primary-tabs>[role="tab"]{
  position:relative;display:inline-flex;flex:1 0 auto;align-items:center;justify-content:center;
  min-width:max-content;height:var(--holyuni-tab-primary-height)!important;min-height:var(--holyuni-tab-primary-height)!important;
  padding:0 var(--holyuni-space-1)!important;gap:var(--holyuni-space-1);border:0;border-radius:0;
  background:transparent;color:var(--holyuni-muted);font-size:var(--holyuni-font-card-title);font-weight:500;white-space:nowrap;box-shadow:none;
}
body.mobile-ui :is(.notification-center,.message-center,.group-application-review) .content-primary-tabs>[aria-selected="true"]{background:transparent;color:var(--holyuni-mint);font-weight:600}
body.mobile-ui :is(.notification-center,.message-center,.group-application-review) .content-primary-tabs>[aria-selected="true"]::after{
  content:"";position:absolute;bottom:0;left:50%;width:var(--holyuni-space-8);height:3px;
  border-radius:var(--holyuni-radius-pill);background:var(--holyuni-mint);transform:translateX(-50%);
}
body.mobile-ui .content-primary-tabs>[role="tab"]:focus-visible{outline:2px solid var(--holyuni-forest);outline-offset:-2px}
body.mobile-ui .message-center .message-toolbar{margin:0 0 var(--holyuni-space-3);padding:0!important}
body.mobile-ui .message-center .message-group-subtabs{gap:var(--holyuni-space-2)!important;padding:0;margin:0 0 var(--holyuni-space-3);border:0}
body.mobile-ui .message-center .message-group-subtabs>.message-group-subtab{
  flex:0 0 auto;height:var(--holyuni-tab-secondary-height)!important;min-height:var(--holyuni-tab-secondary-height)!important;
  padding:0 var(--holyuni-space-4)!important;border:0;border-radius:var(--holyuni-radius-pill);
  background:transparent;color:var(--holyuni-muted);font-size:var(--holyuni-font-control);font-weight:500;
}
body.mobile-ui .message-center .message-group-subtabs>.message-group-subtab.active{background:var(--holyuni-mint-light);color:var(--holyuni-forest);font-weight:600}
body.mobile-ui .message-center .message-group-subtabs>.message-group-subtab::after{display:none}
body.mobile-ui .message-audit-row{
  display:flex;align-items:center;gap:var(--holyuni-space-3);margin-bottom:var(--holyuni-space-2);
  padding:var(--holyuni-space-4);border-radius:var(--holyuni-radius-control);background:var(--holyuni-surface);
}
body.mobile-ui .message-audit-row>div{flex:1;min-width:0}
body.mobile-ui .message-audit-row strong{display:block;color:var(--holyuni-ink);font-size:var(--holyuni-font-card-title);line-height:var(--holyuni-line-title);font-weight:600}
body.mobile-ui .message-audit-row span{display:block;margin-top:var(--holyuni-space-1);color:var(--holyuni-muted);font-size:var(--holyuni-font-body);line-height:var(--holyuni-line-body)}
body.mobile-ui .message-audit-row button{flex-shrink:0;min-height:40px;padding:0 var(--holyuni-space-3);border:0;border-radius:var(--holyuni-radius-control);background:var(--holyuni-mint-light);color:var(--holyuni-forest);font-size:var(--holyuni-font-control);font-weight:600}
body.mobile-ui .message-audit-row[hidden]{display:none}

/* Keep the title and status tabs fixed; the review body owns scrolling and the safe area. */
body.mobile-ui #pageLayer[data-level="secondary"]:has(.group-application-review) .page-shell{
  display:flex;flex-direction:column;overflow:hidden;padding-bottom:0!important;scroll-padding:0;
}
body.mobile-ui #pageLayer:has(.group-application-review) .page-head{flex-shrink:0}
body.mobile-ui #pageLayer:has(.group-application-review) #pageContent{display:flex;flex:1;min-height:0;overflow:hidden}
body.mobile-ui .group-application-review{display:flex;flex-direction:column;flex:1;min-height:0;padding:0;background:var(--holyuni-canvas)}
body.mobile-ui .group-application-review .application-tabs{flex:0 0 auto;padding-inline:var(--holyuni-space-4);gap:0!important;background:var(--holyuni-canvas);border-bottom:0}
body.mobile-ui .group-application-review .application-tabs>[aria-selected="true"]{background:var(--holyuni-mint-light);color:var(--holyuni-forest);border-radius:var(--holyuni-radius-control) var(--holyuni-radius-control) 0 0}
body.mobile-ui .group-application-review .application-tabs>[aria-selected="true"]::after{width:80%}
body.mobile-ui .group-application-review .application-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scroll-padding:var(--holyuni-space-4);padding:var(--holyuni-space-4);padding-bottom:calc(var(--holyuni-space-6) + env(safe-area-inset-bottom,0px))}
body.mobile-ui .group-application-review .application-context{padding:0}
body.mobile-ui .group-application-review .application-context h2{margin:var(--holyuni-space-3) 0 var(--holyuni-space-2);color:var(--holyuni-ink);font-size:var(--holyuni-font-section-title);font-weight:600;line-height:var(--holyuni-line-title);overflow-wrap:anywhere}
body.mobile-ui .group-application-review .application-context>span{color:var(--holyuni-muted);font-size:var(--holyuni-font-body)}
body.mobile-ui .group-application-review .application-tab-count{display:grid;place-items:center;min-width:24px;height:24px;padding:0 var(--holyuni-space-1);border-radius:var(--holyuni-radius-pill);background:var(--holyuni-line);font-size:var(--holyuni-font-meta);font-weight:600}
body.mobile-ui .group-application-review [aria-selected="true"] .application-tab-count{background:var(--holyuni-mint);color:var(--holyuni-surface)}
body.mobile-ui .application-group-list{display:grid;gap:var(--holyuni-space-4)}
body.mobile-ui .application-group{padding:var(--holyuni-space-4);background:var(--holyuni-surface);border:1px solid var(--holyuni-line);border-radius:var(--holyuni-radius-card)}
body.mobile-ui .application-group-top{display:flex;justify-content:space-between;align-items:center;gap:var(--holyuni-space-2)}
body.mobile-ui .application-group-top .group-category-visual{padding:var(--holyuni-space-1) var(--holyuni-space-2);background:var(--holyuni-mint-light);color:var(--holyuni-forest);border-radius:var(--holyuni-radius-control);font-size:var(--holyuni-font-control)}
body.mobile-ui .application-group-top button{display:flex;align-items:center;gap:var(--holyuni-space-1);min-height:40px;padding:0 var(--holyuni-space-3);border:0;border-radius:var(--holyuni-radius-control);background:var(--holyuni-mint-light);color:var(--holyuni-forest);font-size:var(--holyuni-font-control);font-weight:600}
body.mobile-ui .application-group-top button .icon{width:16px;height:16px}
body.mobile-ui .application-capacity{display:flex;align-items:center;flex-wrap:wrap;gap:var(--holyuni-space-2);margin:0;color:var(--holyuni-muted);font-size:var(--holyuni-font-meta);line-height:var(--holyuni-line-body)}
body.mobile-ui .application-capacity b{font-weight:600}
body.mobile-ui .application-capacity span:last-child b{color:var(--holyuni-forest)}
body.mobile-ui .application-list-title{margin:var(--holyuni-space-3) 0;padding-top:var(--holyuni-space-3);border-top:1px solid var(--holyuni-line);font-size:var(--holyuni-font-card-title);font-weight:600;color:var(--holyuni-ink)}
body.mobile-ui .group-application-review .group-application-list{display:grid;gap:var(--holyuni-space-2);margin:0}
body.mobile-ui .group-application-review .group-application-card{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:var(--holyuni-space-2);padding:var(--holyuni-space-3);border:0;border-radius:var(--holyuni-radius-control);background:var(--holyuni-canvas)}
body.mobile-ui .group-application-review .group-application-head{gap:var(--holyuni-space-3)}
body.mobile-ui .group-application-review .group-application-head .avatar{width:40px;height:40px;flex:0 0 40px}
body.mobile-ui .group-application-review .group-application-copy strong{color:var(--holyuni-ink);font-size:var(--holyuni-font-card-title);font-weight:600}
body.mobile-ui .group-application-review .group-application-copy small{font-size:var(--holyuni-font-meta);font-weight:400;color:var(--holyuni-muted)}
body.mobile-ui .group-application-review .group-application-copy time{display:block;color:var(--holyuni-muted);font-size:var(--holyuni-font-meta);font-weight:400}
body.mobile-ui .group-application-review .group-application-note{grid-column:1/-1;margin:var(--holyuni-space-2) 0 0;padding:0;border:0;background:transparent;color:var(--holyuni-ink);font-size:var(--holyuni-font-body);font-weight:400;line-height:var(--holyuni-line-body);overflow-wrap:anywhere}
body.mobile-ui .group-application-review .group-application-actions{display:flex;align-items:flex-start;justify-content:flex-end;gap:var(--holyuni-space-2);margin:0}
body.mobile-ui .group-application-review .group-application-actions button{flex:0 0 auto;min-height:40px;height:40px;padding:0 var(--holyuni-space-3);border:1px solid var(--holyuni-line);border-radius:var(--holyuni-radius-control);font-size:var(--holyuni-font-control);font-weight:600}
body.mobile-ui .group-application-review .group-application-actions .primary{background:var(--holyuni-mint);color:var(--holyuni-surface)}
body.mobile-ui .group-application-review .group-application-actions .secondary{background:var(--holyuni-canvas);color:var(--holyuni-ink)}
body.mobile-ui .application-empty{padding:var(--holyuni-space-8) var(--holyuni-space-4);margin:0;text-align:center;color:var(--holyuni-muted);font-size:var(--holyuni-font-body)}
body.mobile-ui .application-cancelled{font-size:var(--holyuni-font-meta);color:var(--holyuni-muted);white-space:nowrap}
body.mobile-ui .group-application-review .group-application-actions button:disabled{opacity:.5}
@media(max-width:360px){
  body.mobile-ui .group-application-review .group-application-card{grid-template-columns:minmax(0,1fr)}
  body.mobile-ui .group-application-review .group-application-actions{grid-row:3;margin-top:var(--holyuni-space-3)}
}
