/*
 * Luxoria v18.74.8 — Mobile Header Alignment
 * Keeps every mobile header action on one visual baseline with equal spacing,
 * then adds a small breathing space before the Community Feed title.
 */
html[data-theme="light"]{
  --lux748-action-width:48px;
  --lux748-icon-size:36px;
  --lux748-action-gap:7px;
  --lux748-avatar-size:40px;
}

@media(max-width:760px){
  html[data-theme="light"] body:not(.chat-window-mode-v1860) .community-topbar.luxoria-unified-topbar-v1863{
    min-height:76px!important;
    height:76px!important;
    display:grid!important;
    grid-template-columns:44px minmax(0,1fr)!important;
    align-items:center!important;
    column-gap:8px!important;
    padding-top:max(7px,env(safe-area-inset-top))!important;
    padding-right:max(7px,env(safe-area-inset-right))!important;
    padding-bottom:7px!important;
    padding-left:max(7px,env(safe-area-inset-left))!important;
  }

  html[data-theme="light"] body:not(.chat-window-mode-v1860) .community-topbar .mobile-menu-v1861{
    align-self:center!important;
    justify-self:start!important;
    margin:0!important;
    transform:none!important;
  }

  /* Five equal header positions: Messenger, Notifications, Search, Settings, Profile. */
  html[data-theme="light"] body:not(.chat-window-mode-v1860) .community-topbar .top-links{
    width:auto!important;
    min-width:0!important;
    height:58px!important;
    margin:0!important;
    padding:0!important;
    display:grid!important;
    grid-template-columns:repeat(4,var(--lux748-action-width)) var(--lux748-avatar-size)!important;
    grid-auto-rows:58px!important;
    align-items:start!important;
    justify-content:end!important;
    justify-items:center!important;
    column-gap:var(--lux748-action-gap)!important;
    overflow:visible!important;
  }

  html[data-theme="light"] body .community-topbar .top-links > a.topbar-action-v1832,
  html[data-theme="light"] body .community-topbar .top-links > .notification-header-menu,
  html[data-theme="light"] body .community-topbar .top-links > .member-header-menu{
    width:var(--lux748-action-width)!important;
    min-width:var(--lux748-action-width)!important;
    max-width:var(--lux748-action-width)!important;
    height:58px!important;
    min-height:58px!important;
    margin:0!important;
    padding:0!important;
    align-self:start!important;
    justify-self:center!important;
  }

  html[data-theme="light"] body .community-topbar .top-links > .notification-header-menu,
  html[data-theme="light"] body .community-topbar .top-links > .member-header-menu{
    position:relative!important;
    display:grid!important;
    grid-template-rows:58px!important;
    align-content:start!important;
    justify-items:center!important;
    place-items:start center!important;
  }

  html[data-theme="light"] body .community-topbar .top-links .topbar-action-v1832,
  html[data-theme="light"] body .community-topbar .top-links .notification-header-button,
  html[data-theme="light"] body .community-topbar .top-links .settings-header-button-v1826{
    width:var(--lux748-action-width)!important;
    min-width:var(--lux748-action-width)!important;
    max-width:var(--lux748-action-width)!important;
    height:58px!important;
    min-height:58px!important;
    margin:0!important;
    padding:0!important;
    display:grid!important;
    grid-template-rows:var(--lux748-icon-size) 12px!important;
    grid-template-columns:1fr!important;
    align-content:start!important;
    align-items:start!important;
    justify-items:center!important;
    row-gap:4px!important;
    transform:none!important;
    vertical-align:top!important;
  }

  /* Every icon box starts at y=0 and uses exactly the same dimensions. */
  html[data-theme="light"] body .community-topbar .top-links .top-modern-icon,
  html[data-theme="light"] body .community-topbar .top-links .top-lucide-icon-v1837{
    grid-row:1!important;
    align-self:start!important;
    justify-self:center!important;
    flex:none!important;
    width:var(--lux748-icon-size)!important;
    min-width:var(--lux748-icon-size)!important;
    max-width:var(--lux748-icon-size)!important;
    height:var(--lux748-icon-size)!important;
    min-height:var(--lux748-icon-size)!important;
    max-height:var(--lux748-icon-size)!important;
    margin:0!important;
    padding:0!important;
    transform:none!important;
  }

  html[data-theme="light"] body .community-topbar .top-links .topbar-action-v1832 > span:not(.top-modern-icon):not(.top-lucide-icon-v1837),
  html[data-theme="light"] body .community-topbar .top-links .notification-header-button > span:not(.top-modern-icon):not(.top-lucide-icon-v1837),
  html[data-theme="light"] body .community-topbar .top-links .settings-header-button-v1826 > span:not(.top-modern-icon):not(.top-lucide-icon-v1837){
    grid-row:2!important;
    align-self:start!important;
    width:var(--lux748-action-width)!important;
    max-width:var(--lux748-action-width)!important;
    height:12px!important;
    margin:0!important;
    padding:0!important;
    color:#514b47!important;
    font-size:7.2px!important;
    font-weight:650!important;
    line-height:12px!important;
    letter-spacing:-.015em!important;
    text-align:center!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
    overflow:hidden!important;
    transform:none!important;
  }

  /* Profile portrait shares the exact same top baseline as the four icon boxes. */
  html[data-theme="light"] body .community-topbar .top-links > .member-header-avatar.member-header-profile-link-v1826{
    align-self:start!important;
    justify-self:center!important;
    flex:none!important;
    width:var(--lux748-avatar-size)!important;
    min-width:var(--lux748-avatar-size)!important;
    max-width:var(--lux748-avatar-size)!important;
    height:var(--lux748-avatar-size)!important;
    min-height:var(--lux748-avatar-size)!important;
    max-height:var(--lux748-avatar-size)!important;
    margin:0!important;
    padding:2px!important;
    transform:none!important;
  }

  /* Prevent open/hover states from shifting one icon above the others. */
  html[data-theme="light"] body .community-topbar .top-links .topbar-action-v1832:is(:hover,:focus-visible,[aria-expanded="true"]),
  html[data-theme="light"] body .community-topbar .top-links .notification-header-button:is(:hover,:focus-visible,[aria-expanded="true"]),
  html[data-theme="light"] body .community-topbar .top-links .settings-header-button-v1826:is(:hover,:focus-visible,[aria-expanded="true"]),
  html[data-theme="light"] body .community-topbar .top-links .topbar-action-v1832:is(:hover,:focus-visible,[aria-expanded="true"]) .top-modern-icon,
  html[data-theme="light"] body .community-topbar .top-links .notification-header-button:is(:hover,:focus-visible,[aria-expanded="true"]) .top-modern-icon,
  html[data-theme="light"] body .community-topbar .top-links .settings-header-button-v1826:is(:hover,:focus-visible,[aria-expanded="true"]) .top-modern-icon{
    transform:none!important;
  }

  /* A small, deliberate gap between the fixed header and Community Feed. */
  html[data-theme="light"] body:not(.chat-window-mode-v1860) .community-main.page-feed{
    padding-top:18px!important;
  }
  html[data-theme="light"] body:not(.chat-window-mode-v1860) .community-main.page-feed > .page-title{
    margin-top:4px!important;
    margin-bottom:14px!important;
  }
}

@media(max-width:390px){
  html[data-theme="light"]{
    --lux748-action-width:44px;
    --lux748-icon-size:34px;
    --lux748-action-gap:5px;
    --lux748-avatar-size:38px;
  }
  html[data-theme="light"] body:not(.chat-window-mode-v1860) .community-topbar.luxoria-unified-topbar-v1863{
    grid-template-columns:42px minmax(0,1fr)!important;
    column-gap:6px!important;
    padding-right:max(5px,env(safe-area-inset-right))!important;
    padding-left:max(5px,env(safe-area-inset-left))!important;
  }
  html[data-theme="light"] body .community-topbar .top-links .topbar-action-v1832 > span:not(.top-modern-icon):not(.top-lucide-icon-v1837),
  html[data-theme="light"] body .community-topbar .top-links .notification-header-button > span:not(.top-modern-icon):not(.top-lucide-icon-v1837),
  html[data-theme="light"] body .community-topbar .top-links .settings-header-button-v1826 > span:not(.top-modern-icon):not(.top-lucide-icon-v1837){
    font-size:6.7px!important;
  }
}

@media(max-width:350px){
  html[data-theme="light"]{
    --lux748-action-width:40px;
    --lux748-icon-size:32px;
    --lux748-action-gap:3px;
    --lux748-avatar-size:36px;
  }
  html[data-theme="light"] body:not(.chat-window-mode-v1860) .community-topbar.luxoria-unified-topbar-v1863{
    min-height:72px!important;
    height:72px!important;
    grid-template-columns:40px minmax(0,1fr)!important;
    column-gap:4px!important;
    padding-right:max(4px,env(safe-area-inset-right))!important;
    padding-left:max(4px,env(safe-area-inset-left))!important;
  }
  html[data-theme="light"] body:not(.chat-window-mode-v1860) .community-topbar .top-links{
    height:54px!important;
    grid-auto-rows:54px!important;
  }
  html[data-theme="light"] body .community-topbar .top-links > a.topbar-action-v1832,
  html[data-theme="light"] body .community-topbar .top-links > .notification-header-menu,
  html[data-theme="light"] body .community-topbar .top-links > .member-header-menu,
  html[data-theme="light"] body .community-topbar .top-links .topbar-action-v1832,
  html[data-theme="light"] body .community-topbar .top-links .notification-header-button,
  html[data-theme="light"] body .community-topbar .top-links .settings-header-button-v1826{
    height:54px!important;
    min-height:54px!important;
  }
  html[data-theme="light"] body .community-topbar .top-links .topbar-action-v1832 > span:not(.top-modern-icon):not(.top-lucide-icon-v1837),
  html[data-theme="light"] body .community-topbar .top-links .notification-header-button > span:not(.top-modern-icon):not(.top-lucide-icon-v1837),
  html[data-theme="light"] body .community-topbar .top-links .settings-header-button-v1826 > span:not(.top-modern-icon):not(.top-lucide-icon-v1837){
    display:block!important;
    font-size:6.1px!important;
    line-height:11px!important;
  }
}
