/* Luxoria v18.28.0 — full interface stability layer */

/* ---------- Global document scrolling ---------- */
:root{
  --lux-scroll-track:#070b0d;
  --lux-scroll-thumb:#c69431;
  --lux-scroll-thumb-light:#f1c96d;
}
html{
  min-height:100%;
  overflow-y:auto!important;
  overflow-x:hidden;
  scrollbar-width:thin;
  scrollbar-color:var(--lux-scroll-thumb) var(--lux-scroll-track);
}
body{
  min-height:100%;
  overflow-x:hidden!important;
  scrollbar-width:thin;
  scrollbar-color:var(--lux-scroll-thumb) var(--lux-scroll-track);
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.community-main::-webkit-scrollbar,
.profile-stage-panel::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.direct-messages::-webkit-scrollbar,
.notification-header-list::-webkit-scrollbar,
.member-header-dropdown::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar{
  width:10px;
  height:10px;
}
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.community-main::-webkit-scrollbar-track,
.profile-stage-panel::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track,
.direct-messages::-webkit-scrollbar-track,
.notification-header-list::-webkit-scrollbar-track,
.member-header-dropdown::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track{
  background:var(--lux-scroll-track)!important;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.community-main::-webkit-scrollbar-thumb,
.profile-stage-panel::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.direct-messages::-webkit-scrollbar-thumb,
.notification-header-list::-webkit-scrollbar-thumb,
.member-header-dropdown::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb{
  min-height:42px;
  border:2px solid var(--lux-scroll-track)!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,var(--lux-scroll-thumb-light),var(--lux-scroll-thumb) 55%,#8c641e)!important;
  box-shadow:inset 0 0 0 1px rgba(255,224,145,.25)!important;
}
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.community-main::-webkit-scrollbar-thumb:hover,
.profile-stage-panel::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover,
.direct-messages::-webkit-scrollbar-thumb:hover,
.notification-header-list::-webkit-scrollbar-thumb:hover,
.member-header-dropdown::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(180deg,#ffe59a,#d7aa48 55%,#a87923)!important;
}

/* ---------- Member header dropdowns ---------- */
.community-topbar,
.top-links,
.notification-header-menu,
.member-header-menu.settings-header-menu-v1826{
  overflow:visible!important;
}
.notification-header-menu,
.member-header-menu.settings-header-menu-v1826{
  position:relative!important;
  isolation:isolate;
}
.settings-header-button-v1826,
.notification-header-button{
  position:relative!important;
  z-index:2;
  pointer-events:auto!important;
  touch-action:manipulation;
}
.member-header-dropdown,
.notification-header-dropdown{
  z-index:1200!important;
  max-height:min(620px,calc(100vh - 78px));
  overflow-y:auto;
  overscroll-behavior:contain;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
  transform:translateY(-6px);
  transition:opacity .16s ease,transform .16s ease,visibility 0s linear .16s;
}
.member-header-menu.open>.member-header-dropdown,
.notification-header-menu.open>.notification-header-dropdown{
  display:grid!important;
  visibility:visible;
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
  transition-delay:0s;
}
.member-header-menu.open,
.notification-header-menu.open{
  z-index:1201!important;
}

/* ---------- Admin Settings submenu ---------- */
.admin-nav-group[data-admin-settings-group]{
  display:grid!important;
  min-width:0;
}
.admin-nav-parent{
  position:relative;
  z-index:1;
}
.admin-nav-parent>[data-admin-settings-toggle]{
  display:grid!important;
  place-items:center;
  pointer-events:auto!important;
  touch-action:manipulation;
  position:relative;
  z-index:3;
}
.admin-nav-group .admin-subnav{
  display:grid!important;
  max-height:0;
  padding-top:0!important;
  padding-bottom:0!important;
  overflow:hidden;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:max-height .22s ease,opacity .18s ease,visibility 0s linear .22s;
}
.admin-nav-group .admin-subnav>a{
  min-height:36px;
}
.admin-nav-group.open .admin-subnav{
  max-height:160px;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition-delay:0s;
}

/* ---------- Profile portrait: real frame, never a wide banner ---------- */
.profile-v172-media-layout,
.profile-v172-stage,
.profile-stage-panel[data-profile-panel="profile"]{
  min-width:0;
}
.profile-stage-panel[data-profile-panel="profile"].active{
  display:flex!important;
  align-items:stretch!important;
  justify-content:center!important;
  padding:10px!important;
  overflow:hidden!important;
}
.profile-stage-panel[data-profile-panel="profile"]>.profile-main-image{
  display:grid!important;
  place-items:center!important;
  position:relative!important;
  width:min(100%,408px)!important;
  min-width:0!important;
  height:100%!important;
  margin:0 auto!important;
  border-radius:10px!important;
  overflow:hidden!important;
  background:#070a0c!important;
  box-shadow:0 0 0 1px rgba(213,163,60,.16),0 18px 45px rgba(0,0,0,.34);
}
.profile-stage-panel[data-profile-panel="profile"]>.profile-main-image>img{
  display:block!important;
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:cover!important;
  object-position:center 24%!important;
  background:#070a0c!important;
}
.profile-stage-panel[data-profile-panel="profile"]>.profile-main-image>.profile-photo-placeholder{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
}
.profile-main-image .photo-overlay{
  width:100%;
}

/* Other profile images must preserve their proportions without stretching. */
.member-dropdown-identity>img,
.member-header-avatar>img,
.notification-actor-avatar,
.member-card-image>img,
.feed-avatar img,
.chat-avatar img,
.conversation-avatar img,
.profile-photo-manager-grid img{
  object-fit:cover!important;
  object-position:center!important;
}

/* ---------- Layout overflow protection ---------- */
.community-app,
.community-main,
.admin-shell,
.content,
.profile-v172-shell,
.profile-v172-hero,
.profile-v172-left,
.profile-v172-right{
  min-width:0;
}
img,video,canvas,svg{
  max-width:100%;
}

@media(max-width:1050px){
  .profile-stage-panel[data-profile-panel="profile"]>.profile-main-image{
    width:min(86%,430px)!important;
  }
}
@media(max-width:700px){
  .profile-stage-panel[data-profile-panel="profile"].active{
    padding:7px!important;
  }
  .profile-stage-panel[data-profile-panel="profile"]>.profile-main-image{
    width:min(92%,340px)!important;
  }
  .member-header-dropdown,
  .notification-header-dropdown{
    position:fixed!important;
    right:10px!important;
    left:auto!important;
    top:calc(var(--top,58px) + 8px)!important;
    width:min(330px,calc(100vw - 20px))!important;
    max-height:calc(100dvh - var(--top,58px) - 18px)!important;
  }
}
