/* Home presentation only. Original controls and authorized tool catalogue are reused. */
.home-tools-hint, .home-tools-options, .home-all-tools-icon { display: none; }
/* Keep focused cards rendered until composition restores them and removes the strip. */
body.citizen-readable-layout.home-social-mobile {
  --home-surface: var(--portal-theme-surface, #fff);
  --home-soft: var(--portal-theme-surface-2, #f0f5f8);
  --home-line: var(--portal-theme-border, #e2e9ee);
  --home-text: var(--portal-theme-text, #20384b);
  --home-muted: var(--portal-theme-muted, #60798b);
  --home-accent: var(--portal-theme-accent, #126cb5);
  background: var(--home-surface) !important;
  color: var(--home-text);
  padding-bottom: calc(var(--home-navigation-height, 60px) + 12px) !important;
}
body.home-social-mobile :is(.home-account-menu, .home-composer-prompt, .home-composer-panel, .home-composer-warning, .home-post-menu, .home-tools-options, .home-tools-strip)[hidden] { display: none !important; }
body.citizen-readable-layout.home-social-mobile .portal-topbar { position: sticky !important; top: 0; z-index: 60 !important; background: var(--home-surface) !important; border-bottom: 1px solid var(--home-line); box-shadow: none !important; }
body.citizen-readable-layout.home-social-mobile .portal-topbar-inner { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between; gap: 8px !important; min-height: 56px; padding: 6px 12px !important; }
body.citizen-readable-layout.home-social-mobile .portal-brand { flex: 1 1 auto; min-width: 0; gap: 8px !important; }
body.citizen-readable-layout.home-social-mobile .portal-brand .portal-symbol { width: 30px !important; height: 30px !important; flex: 0 0 30px !important; border: 0; border-radius: 8px; box-shadow: none; }
body.citizen-readable-layout.home-social-mobile .portal-brand-copy { min-width: 0; }
body.citizen-readable-layout.home-social-mobile .portal-brand h1 { margin: 0 !important; font-size: 17px !important; line-height: 1.15 !important; font-weight: 750; }
body.citizen-readable-layout.home-social-mobile .portal-brand p { margin: 2px 0 0 !important; font-size: 12px !important; line-height: 1.15 !important; }
body.citizen-readable-layout.home-social-mobile .portal-user { width: auto !important; flex: 0 0 auto !important; flex-wrap: nowrap !important; gap: 6px !important; }
body.home-social-mobile .home-account-menu { position: relative; }
body.home-social-mobile .home-account-menu > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; list-style: none; cursor: pointer; font-size: 16px; font-weight: 650; color: var(--home-text); }
body.home-social-mobile .home-account-menu > summary::-webkit-details-marker, body.home-social-mobile .home-post-menu > summary::-webkit-details-marker { display: none; }
body.home-social-mobile .home-account-menu > summary::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin-top: -3px; }
body.home-social-mobile .home-account-panel { position: absolute; right: 0; top: calc(100% + 6px); width: min(320px, calc(100vw - 24px)); max-height: min(72dvh, calc(100dvh - 136px)); overflow: auto; padding: 8px; border: 1px solid var(--home-line); border-radius: 14px; background: var(--home-surface); box-shadow: 0 8px 24px #0002; z-index: 80; }
body.citizen-readable-layout.home-social-mobile .home-account-panel .portal-account-area { display: grid !important; grid-template-columns: 36px minmax(0, 1fr); width: 100%; min-width: 0 !important; padding: 10px !important; gap: 6px 10px !important; }
body.citizen-readable-layout.home-social-mobile .home-account-panel .portal-profile-avatar { grid-column: 1; grid-row: 1 / span 2; width: 36px; height: 36px; min-width: 36px; border-width: 1px; box-shadow: none; }
body.citizen-readable-layout.home-social-mobile .portal-user-meta { grid-column: 2; min-width: 0; text-align: left; }
body.citizen-readable-layout.home-social-mobile .portal-user-meta :is(strong, span) { white-space: normal !important; overflow-wrap: anywhere; overflow: visible !important; text-overflow: clip !important; }
body.home-social-mobile .home-account-label { grid-column: 2; font-size: 14px; color: var(--home-accent); }
body.citizen-readable-layout.home-social-mobile .home-account-panel .social-side-links { display: grid !important; gap: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.citizen-readable-layout.home-social-mobile .home-account-panel :is(.social-side-links a, .home-account-tools, #portalLogout) { display: flex; align-items: center; width: 100%; min-height: 48px !important; margin: 0; padding: 10px !important; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--home-text); font-size: 16px !important; text-decoration: none; text-align: left; }
body.home-social-mobile .home-tools-options { display: block; font-size: 16px; }
body.home-social-mobile .home-tools-options summary { min-height: 48px; padding: 10px; font-size: 16px; line-height: 1.5; cursor: pointer; }
body.citizen-readable-layout.home-social-mobile #socialShortcutLimitControl { display: grid !important; gap: 6px; padding: 0 10px 12px !important; }
body.citizen-readable-layout.home-social-mobile #socialShortcutLimitControl[hidden] { display: none !important; }
body.citizen-readable-layout.home-social-mobile #socialShortcutLimitControl :is(label, select) { width: 100% !important; min-width: 0 !important; font-size: 16px !important; }
body.citizen-readable-layout.home-social-mobile #socialShortcutLimit { min-height: 44px; }
body.citizen-readable-layout.home-social-mobile .social-shell { width: 100%; max-width: none; margin: 0; padding: 0; font-size: 16px; }
body.citizen-readable-layout.home-social-mobile :is(.social-layout, .social-feed-column) { display: block; gap: 0; }
body.citizen-readable-layout.home-social-mobile :is(.social-profile-rail, .social-tools-rail) { display: none !important; }
body.citizen-readable-layout.home-social-mobile .social-feed-column > .social-card { margin: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--home-surface); }
body.citizen-readable-layout.home-social-mobile .social-composer { padding: 8px 12px; }
body.home-social-mobile .home-composer-prompt { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 44px; }
body.home-social-mobile .home-composer-avatar { width: 36px; height: 36px; border-width: 1px; font-size: 14px; }
body.home-social-mobile .home-composer-trigger { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--home-line); border-radius: 24px; background: var(--home-soft); color: var(--home-muted); text-align: left; font: inherit; font-size: 16px; font-weight: 400; line-height: 1.35; white-space: normal; }
body.home-social-mobile .home-composer-trigger:disabled { opacity: .6; }
body.citizen-readable-layout.home-social-mobile .home-composer-warning { margin: 12px 0 8px; padding-left: 10px; border-left: 3px solid var(--home-accent); color: var(--home-muted); font-size: 14px !important; line-height: 1.5; }
body.home-social-mobile .home-composer-panel h2 { margin: 0 0 8px; font-size: 18px; }
body.citizen-readable-layout.home-social-mobile .social-textarea { min-height: 112px; padding: 12px; font-size: 16px !important; line-height: 1.5; }
body.home-social-mobile .social-composer-footer { display: flex; flex-wrap: wrap; gap: 8px; }
body.citizen-readable-layout.home-social-mobile .social-composer-footer :is(select, button) { flex: 1 1 8em; max-width: 100%; min-height: 48px; font-size: 16px !important; }
body.home-social-mobile .home-composer-collapse { min-height: 44px; margin-top: 8px; padding: 8px 0; border: 0; background: transparent; color: var(--home-accent); font-size: 16px; }
body.citizen-readable-layout.home-social-mobile .social-shortcuts { width: 100%; min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0; border-bottom: 5px solid var(--home-soft) !important; border-radius: 0; box-shadow: none; background: var(--home-surface); }
body.home-social-mobile .social-shortcuts .social-section-heading, body.home-social-mobile .home-tools-hint { display: block; position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; border: 0; }
body.home-social-mobile .home-tools-strip { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 7.5em; align-items: stretch; gap: 8px; max-width: 100%; padding: 8px 12px 12px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 12px; overscroll-behavior-x: contain; scrollbar-width: thin; font-size: 16px; }
body.citizen-readable-layout.home-social-mobile .home-tools-strip > :is(#socialShortcutGrid, .social-card-pad) { display: contents !important; }
body.citizen-readable-layout.home-social-mobile .home-tools-strip :is(.hub-card, .home-all-tools-link) { box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; justify-items: center; gap: 6px; width: 100%; min-width: 0; min-height: 0; aspect-ratio: 1; padding: 8px; border: 1px solid var(--home-line); border-radius: 14px; background: var(--home-soft); color: var(--home-text); box-shadow: none; text-align: center; text-decoration: none; font-size: 16px; line-height: 1.2; scroll-snap-align: start; scroll-margin-inline: 12px; }
body.citizen-readable-layout.home-social-mobile .home-tools-strip .hub-card.hub-card-compact .hub-card-icon { width: 32px; height: 32px; grid-row: auto; grid-column: auto; }
body.citizen-readable-layout.home-social-mobile .home-tools-strip .hub-card.hub-card-compact .hub-card-icon :is(img, svg) { width: 32px; height: 32px; }
body.citizen-readable-layout.home-social-mobile .home-tools-strip .hub-card.hub-card-compact h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; }
body.home-social-mobile .home-all-tools-icon { display: grid; place-items: center; width: 32px; height: 32px; color: var(--home-accent); }
body.home-social-mobile .home-all-tools-icon svg { width: 26px; height: 26px; }
body.home-social-mobile .home-all-tools-link > span:last-child { font-size: 16px; font-weight: 600; line-height: 1.2; white-space: normal; }
body.home-social-mobile #socialStatus:not([hidden]) { margin: 8px 12px; }
body.citizen-readable-layout.home-social-mobile .social-post { margin: 0; padding: 14px 12px 8px; border: 0; border-bottom: 1px solid var(--home-line); border-radius: 0; box-shadow: none; background: var(--home-surface); overflow: visible; }
body.citizen-readable-layout.home-social-mobile .social-post-header { display: grid; grid-template-columns: 36px minmax(0, 1fr) 44px; align-items: start; gap: 8px; padding: 0; border: 0; border-radius: 0; background: transparent !important; }
body.citizen-readable-layout.home-social-mobile .social-post-header .social-avatar { width: 36px; height: 36px; font-size: 14px; }
body.citizen-readable-layout.home-social-mobile .social-post-author { min-width: 0; }
body.citizen-readable-layout.home-social-mobile .social-post-author a { font-size: 16px; line-height: 1.35; font-weight: 650; white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; }
body.citizen-readable-layout.home-social-mobile :is(.social-post-header .social-handle, .social-post-author span, .social-post-meta) { font-size: 13px; line-height: 1.35; color: var(--home-muted); }
body.citizen-readable-layout.home-social-mobile .social-post-body { margin: 12px 0 0; font-size: 16px !important; line-height: 1.5; }
body.home-social-mobile .home-post-menu { grid-column: 3; grid-row: 1; position: relative; }
body.home-social-mobile .home-post-menu > summary { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; list-style: none; cursor: pointer; color: var(--home-muted); font-size: 24px; }
body.home-social-mobile .home-post-menu-panel { position: absolute; right: 0; top: 100%; min-width: min(12em, calc(100vw - 32px)); padding: 6px; border: 1px solid var(--home-line); border-radius: 12px; background: var(--home-surface); box-shadow: 0 8px 24px #0002; z-index: 30; }
body.citizen-readable-layout.home-social-mobile .home-post-menu-panel .social-row-actions { display: grid; gap: 0; padding: 0; }
body.citizen-readable-layout.home-social-mobile .home-post-menu-panel button { width: 100%; min-height: 44px; font-size: 16px; }
body.citizen-readable-layout.home-social-mobile .social-post-actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 4px; margin-top: 10px; padding-top: 4px; border: 0; overflow: visible; }
body.citizen-readable-layout.home-social-mobile .social-post-actions button { display: flex; flex-direction: row; align-items: center; justify-content: center; flex: 1 1 max-content; gap: 6px; max-width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 0; border-radius: 8px; background: transparent; color: var(--home-muted); font-size: 16px; line-height: 1.3; }
body.home-social-mobile .social-post-actions svg { width: 20px; height: 20px; flex: 0 0 20px; }
body.home-social-mobile .social-post-actions button[aria-pressed="true"] { color: var(--home-accent); }
body.home-social-mobile :is(.home-tools-strip, .home-tools-strip a, .home-account-menu summary, .home-composer-trigger, .home-post-menu summary, .social-mobile-nav-link):focus-visible { outline: 3px solid var(--home-accent) !important; outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) {
  body.home-social-mobile :is(.home-tools-strip, .hub-card, .social-post, .social-mobile-nav, .home-account-panel, .home-post-menu-panel) { animation: none !important; transition: none !important; transform: none; }
}
/* Counter the original colored header and inline account avatar colors. */
body.citizen-readable-layout.home-social-mobile .portal-brand h1 { color: var(--home-text) !important; }
body.citizen-readable-layout.home-social-mobile .portal-brand p { color: var(--home-muted) !important; }
body.citizen-readable-layout.home-social-mobile .home-account-panel .portal-account-area { color: var(--home-text) !important; }
body.citizen-readable-layout.home-social-mobile .home-account-panel .portal-user-meta { display: block !important; }
body.citizen-readable-layout.home-social-mobile .home-account-panel .portal-profile-avatar { background-color: var(--home-soft) !important; color: var(--home-text) !important; box-shadow: none !important; }
/* Keep the full portal name readable, including enlarged text on narrow screens. */
body.citizen-readable-layout.home-social-mobile .portal-topbar-inner { flex-wrap: wrap !important; row-gap: 0 !important; }
body.citizen-readable-layout.home-social-mobile .portal-brand { width: auto !important; flex: 1 1 min-content; min-width: min-content !important; }
body.citizen-readable-layout.home-social-mobile .portal-brand h1 { white-space: normal !important; overflow-wrap: normal; }
body.citizen-readable-layout.home-social-mobile .portal-user { margin-left: auto; }
/* Fallback initials are decorative artwork, independent of reading text size. */
body.citizen-readable-layout.home-social-mobile :is(.home-composer-avatar, #socialFeedList .social-avatar, .home-account-panel .portal-profile-avatar, #portalChatRoot .portal-chat-avatar)[data-home-avatar-initials="true"] {
  position: relative;
  color: transparent !important;
  text-shadow: none !important;
  --home-avatar-ink: var(--home-text);
}
body.citizen-readable-layout.home-social-mobile :is(.home-composer-avatar, #socialFeedList .social-avatar, .home-account-panel .portal-profile-avatar, #portalChatRoot .portal-chat-avatar)[data-home-avatar-initials="true"]::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--home-avatar-ink);
  -webkit-mask: var(--home-avatar-initials) center / 100% 100% no-repeat;
  mask: var(--home-avatar-initials) center / 100% 100% no-repeat;
}

body.home-social-mobile #portalChatRoot .portal-chat-avatar[data-home-avatar-initials="true"]::after {
  -webkit-mask-size: 36px 36px;
  mask-size: 36px 36px;
}
