/* Omni Mobile 156 — minimalist Friends, exclusive navigation selection,
   opaque member drawer, full Mini Perfil fit and Bleach border alignment.
   All rules are scoped to mobile; legacy desktop visuals are preserved. */
@media(max-width:760px){
  /* The right drawer is entirely opaque BLACK, including its own sections.
     Nothing from the chat may be visible through it. */
  html body #appShell#appShell.app-shell.omni-mobile-rework153.mobile-members-open
    > #memberSidebar.member-sidebar.nexo-right-design:not([hidden]){
    background:#050505!important;background-color:#050505!important;
    background-image:none!important;backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    opacity:1!important;isolation:isolate!important;
  }
  #appShell.omni-mobile-rework153.mobile-members-open #memberSidebar
    :is(.nexo-right-heading,.nexo-right-scroll,.member-list,.member-group,.member-block){
    background-color:#050505!important;background-image:none!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
    opacity:1!important;
  }

  /* Exactly ONE highlighted icon. Focus from a touch click must not leave
     a second button outlined after the active page changes. */
  #appShell.omni-mobile-rework153 #globalNavigation
    :is(#friendsButton,#shopButton,#omniMobileChannelsButton150):not([data-omni-nav-selected156="true"]){
    outline:0!important;outline-offset:0!important;
    box-shadow:none!important;
    background:rgba(255,255,255,.045)!important;
    border-color:rgba(229,239,248,.13)!important;
    color:inherit!important;
  }
  #appShell.omni-mobile-rework153 #globalNavigation
    :is(#friendsButton,#shopButton,#omniMobileChannelsButton150)[data-omni-nav-selected156="true"]{
    outline:0!important;
    border-color:rgba(141,194,226,.68)!important;
    background:rgba(74,128,166,.24)!important;
    box-shadow:inset 0 0 0 1px rgba(141,194,226,.23)!important;
    color:#eef8ff!important;
  }
  #appShell.omni-mobile-rework153 #globalNavigation
    :is(#friendsButton,#shopButton,#omniMobileChannelsButton150):focus-visible{
    outline:2px solid #a9d5f2!important;
    outline-offset:2px!important;
  }
  /* Friend heading: compact add button next to the same right drawer toggle.
     Both are in the same fixed-height row; this does not change their actions. */
  #appShell.omni-mobile-rework153 #friendsPanel:not([hidden]){
    padding:14px 12px 12px!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friends-panel-header{
    display:flex!important;align-items:center!important;
    flex-direction:row!important;justify-content:space-between!important;
    min-height:52px!important;
    gap:8px!important;padding:0 0 10px!important;
    padding-right:0!important;margin:0!important;
    box-sizing:border-box!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friends-panel-header h2{
    font-size:20px!important;letter-spacing:-.02em!important;margin:0!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friends-heading-tools156{
    display:flex!important;align-items:center!important;justify-content:flex-end!important;
    gap:8px!important;flex:0 0 auto!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friends-heading-tools156 > button{
    width:38px!important;height:38px!important;min-width:38px!important;
    max-width:38px!important;min-height:38px!important;
    padding:7px!important;margin:0!important;
    display:grid!important;place-items:center!important;
    flex:0 0 38px!important;border-radius:10px!important;
    box-shadow:none!important;
    line-height:1!important;font-size:0!important;
    border:1px solid rgba(231,240,247,.18)!important;
    background:rgba(233,240,247,.065)!important;
    color:#eef3f7!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friends-heading-tools156 > button svg{
    display:block!important;width:19px!important;height:19px!important;
    fill:none;stroke:currentColor;stroke-width:1.85;
    stroke-linejoin:round;stroke-linecap:round;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friends-heading-tools156 > button:hover{
    background:rgba(239,245,252,.12)!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friends-tabs{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr)) 38px;
    gap:3px!important;align-items:center!important;
    width:100%!important;min-width:0!important;
    padding:10px 0!important;overflow:visible!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friends-tabs > button{
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    min-width:0!important;height:36px!important;min-height:36px!important;
    padding:0 4px!important;font-size:10px!important;
    border-radius:8px!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friends-tabs
    .nexo-friends-inline-search-toggle{
    display:grid!important;place-items:center!important;
    width:36px!important;min-width:36px!important;height:36px!important;
    margin:0!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friends-content{
    width:100%!important;min-width:0!important;overflow-x:hidden!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friend-card{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:6px!important;
    min-height:64px!important;
    width:100%!important;
    padding:8px 2px!important;
    box-sizing:border-box!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friend-identity{
    min-width:0!important;width:100%!important;gap:8px!important;
    overflow:hidden!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friend-identity > span:last-child{
    flex:1 1 auto!important;min-width:0!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel
    .friend-identity :is(strong,small){
    overflow:hidden!important;text-overflow:ellipsis!important;
    white-space:nowrap!important;max-width:100%!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friend-avatar{
    width:39px!important;height:39px!important;
    min-width:39px!important;flex:0 0 39px!important;
    border-radius:11px!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friend-actions{
    display:flex!important;align-items:center!important;justify-content:flex-end!important;
    flex-wrap:nowrap!important;
    width:auto!important;gap:4px!important;flex:0 0 auto!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friend-actions
    > button[data-friend-action], 
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friend-menu-host156
    > button[data-friend-action]{
    display:grid!important;place-items:center!important;
    width:35px!important;height:38px!important;min-height:38px!important;
    min-width:35px!important;max-width:35px!important;
    flex:0 0 35px!important;
    margin:0!important;padding:7px!important;
    border-radius:10px!important;
    background:rgba(238,245,250,.045)!important;
    color:#dce8f1!important;
    border:1px solid rgba(231,241,248,.15)!important;
    font-size:0!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friend-actions svg{
    display:block!important;
    width:18px!important;height:18px!important;
    fill:none;stroke:currentColor;stroke-width:1.9;
    stroke-linecap:round;stroke-linejoin:round;
    pointer-events:none!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friend-menu-host156{
    position:relative!important;
    display:flex!important;align-items:center!important;
    flex:0 0 35px!important;width:35px!important;
    min-width:35px!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel
    .omni-friend-menu-host156 > button[aria-expanded="true"]{
    background:rgba(140,164,180,.16)!important;
    border-color:rgba(177,211,228,.32)!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friend-menu156[hidden]{
    display:none!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friend-menu156{
    display:flex!important;
    position:absolute!important;
    top:calc(100% + 4px)!important;right:0!important;
    padding:5px!important;
    width:49px!important;height:49px!important;
    box-sizing:border-box!important;
    z-index:220!important;
    border:1px solid rgba(240,117,125,.35)!important;
    border-radius:10px!important;
    background:#171719!important;
    box-shadow:0 6px 20px rgba(0,0,0,.25)!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friend-menu156 button{
    display:grid!important;place-items:center!important;
    width:38px!important;height:38px!important;min-width:38px!important;
    min-height:38px!important;margin:0!important;padding:6px!important;
    border:1px solid #b04d58!important;
    border-radius:8px!important;
    color:#fff!important;background:#a32b39!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel
    .friend-actions button:focus-visible,
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friends-heading-tools156 button:focus-visible{
    outline:2px solid #9fcceb!important;outline-offset:2px!important;
  }

  /* Mini Perfil OpenDesign v4: the ENTIRE content is proportionally scaled to
     fit the available viewport above Mini Central, without scrolling the
     wallpaper or disconnecting the existing cover, avatar and actions. */
  body #nexoMiniProfile.nexo-design-v4:not([hidden]){
    box-sizing:border-box!important;
    position:fixed!important;
    left:10px!important;right:auto!important;
    width:calc(100vw - 20px)!important;max-width:none!important;
    top:calc(60px + env(safe-area-inset-top))!important;
    bottom:auto!important;
    height:auto!important;min-height:0!important;
    max-height:none!important;
    transform:scale(var(--omni-mini-fit-scale156,1))!important;
    transform-origin:top center!important;
    animation:none!important;transition:none!important;
    overflow:visible!important;overscroll-behavior:none!important;
    border-radius:16px!important;
    z-index:350!important;
    isolation:isolate!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-cover{
    height:95px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-body{
    padding:0 14px 10px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-avatar-line{
    height:31px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-avatar{
    width:70px!important;height:70px!important;
    transform:translateY(-42px)!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-name-row h2{
    font-size:20px!important;line-height:1.18!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-handle{
    font-size:11px!important;margin:3px 0 8px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-status-row{
    gap:6px!important;margin-bottom:9px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-status{
    padding:7px 9px!important;min-height:34px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-voice{
    padding:8px!important;min-height:52px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-info-section{
    margin-top:9px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-info-heading{
    margin-bottom:6px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-game{
    padding:7px!important;min-height:45px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-connections{
    min-height:36px!important;padding:7px 10px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden]) .nexo-mini-member-since{
    margin-top:10px!important;padding-top:8px!important;
  }
  body #nexoMiniProfile.nexo-design-v4:not([hidden])
    :is(.nexo-mini-status-menu,.nexo-mini-more-menu){
    z-index:30!important;
  }
  /* The active purchased Bleach cover follows the actual Mini Perfil border
     rather than an oversized rectangle underneath it. */
  body #omniMiniBleachCardFrame:not([hidden]){
    position:fixed!important;z-index:351!important;
    pointer-events:none!important;
    border-width:12px!important;border-image-width:12px!important;
    border-image-outset:0!important;
    border-radius:16px!important;
    box-sizing:border-box!important;
  }
  body #omniMiniBleachOverlay:not([hidden]){
    position:fixed!important;z-index:352!important;pointer-events:none!important;
  }
}
@media(max-width:370px){
  #appShell.omni-mobile-rework153 #friendsPanel .friend-card{
    gap:4px!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friend-actions{
    gap:3px!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .friend-actions > button[data-friend-action],
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friend-menu-host156 > button[data-friend-action]{
    width:32px!important;min-width:32px!important;max-width:32px!important;
  }
  #appShell.omni-mobile-rework153 #friendsPanel .omni-friend-menu-host156{
    width:32px!important;flex-basis:32px!important;min-width:32px!important;
  }
}
@media (prefers-reduced-motion:reduce){
  #appShell.omni-mobile-rework153 .friend-actions *,
  body #nexoMiniProfile.nexo-design-v4:not([hidden]){
    transition:none!important;animation:none!important;
  }
}


/* Omni 156: fixed composer above the non-scrolling Mini Central.
   The old bottom:11px positioned the composer entirely behind the footer. */
@media (max-width:760px) {
  body #appShell.app-shell.omni-mobile-rework153:not(.omni-mobile-in-call153):not(.voice-fullscreen):not(.nexo-video-fullscreen)
  > .chat-column > .composer-wrap:not([hidden]){
    display:flex!important;
    position:absolute!important;
    bottom:calc(86px + env(safe-area-inset-bottom))!important;
    left:9px!important;
    right:9px!important;
    width:auto!important;
    min-width:0!important;
    max-width:calc(100% - 18px)!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    z-index:36!important;
    padding:0!important;
    margin:0!important;
    pointer-events:none!important;
  }
  body #appShell.app-shell.omni-mobile-rework153:not(.omni-mobile-in-call153)
  > .chat-column > .composer-wrap:not([hidden]) :is(.composer,.reply-banner){
    pointer-events:auto!important;
  }
  body #appShell.app-shell.omni-mobile-rework153:not(.omni-mobile-in-call153)
  > .chat-column > .composer-wrap:not([hidden]) .composer{
    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:52px!important;
    box-sizing:border-box!important;
    border-radius:15px!important;
  }
  body #appShell.app-shell.omni-mobile-rework153:not(.omni-mobile-in-call153)
  > .chat-column > .composer-wrap:not([hidden]) #messageInput{
    display:block!important;
    flex:1 1 auto!important;
    min-width:0!important;
    width:100%!important;
    font-size:16px!important; /* prevents iOS zoom during typing */
  }
  body #appShell.app-shell.omni-mobile-rework153:not(.omni-mobile-in-call153)
  > .chat-column #conversation:not([hidden]){
    scroll-padding-bottom:145px!important;
    padding-bottom:145px!important;
  }
  /* A minimized call has a 57px bar ABOVE the Mini Central. Keep typing
     accessible just above that bar without hiding or moving the footer. */
  body #appShell.app-shell.omni-mobile-rework153.omni-mobile-call-minimized153
  > .chat-column > .composer-wrap:not([hidden]){
    bottom:calc(148px + env(safe-area-inset-bottom))!important;
  }
  body #appShell.app-shell.omni-mobile-rework153.omni-mobile-call-minimized153
  > .chat-column #conversation:not([hidden]){
    scroll-padding-bottom:190px!important;
    padding-bottom:190px!important;
  }
  /* Let Android's virtual-keyboard state reclaim the footer gap. */
  body #appShell.app-shell.omni-mobile-rework153.omni-mobile-keyboard-open
  > .chat-column > .composer-wrap:not([hidden]){
    bottom:10px!important;
  }

  /* Persistent lower-left arrow: remains in the exact same place when the
     community bar is hidden, so the return arrow is discoverable. */
  body #appShell.app-shell.omni-mobile-rework153 #omniMobileRailToggle156{
    display:grid!important;
    position:fixed!important;
    left:10px!important;
    bottom:calc(86px + env(safe-area-inset-bottom))!important;
    width:42px!important;height:42px!important;
    min-width:42px!important;min-height:42px!important;
    max-width:42px!important;max-height:42px!important;
    align-items:center!important;justify-items:center!important;
    padding:0!important;margin:0!important;
    border-radius:12px!important;
    border:1px solid rgba(212,235,247,.22)!important;
    background:rgba(19,27,36,.96)!important;
    color:#f2f7fb!important;
    box-shadow:0 5px 16px rgba(0,0,0,.25)!important;
    z-index:191!important;
    cursor:pointer!important;touch-action:manipulation!important;
    transform:none!important;
  }
  body #appShell.app-shell.omni-mobile-rework153 #omniMobileRailToggle156 svg{
    width:21px!important;height:21px!important;
    display:block!important;
    fill:none!important;stroke:currentColor!important;
    stroke-width:2!important;stroke-linejoin:round!important;
    stroke-linecap:round!important;
  }
  body #appShell.app-shell.omni-mobile-rework153 #omniMobileRailToggle156:focus-visible{
    outline:2px solid #a5cdec!important;outline-offset:2px!important;
  }
  body #appShell.app-shell.omni-mobile-rework153 > .server-rail{
    padding-bottom:60px!important; /* arrow never overlaps last community */
  }
  body #appShell.app-shell.omni-mobile-rework153.omni-mobile-rail-collapsed156
  > .server-rail{
    transform:translateX(-100%)!important;
    visibility:hidden!important;pointer-events:none!important;
  }
  body #appShell.app-shell.omni-mobile-rework153.omni-mobile-rail-collapsed156:not(.voice-fullscreen):not(.nexo-video-fullscreen)
  > .chat-column{
    grid-area:2 / 1 / 3 / 3!important;
    grid-column:1 / 3!important;
    width:100vw!important;max-width:100vw!important;
    margin:0!important;
  }
  body #appShell.app-shell.omni-mobile-rework153.omni-mobile-rail-collapsed156:not(.voice-fullscreen):not(.nexo-video-fullscreen)
  > .chat-column > .chat-topbar{
    padding-left:14px!important;
  }
  body #appShell.app-shell.omni-mobile-rework153.omni-mobile-rail-collapsed156
  > .omni-mobile-backdrop{
    left:0!important;width:100vw!important;
  }
  body #appShell.app-shell.omni-mobile-rework153.omni-mobile-rail-collapsed156
  > .channel-sidebar{
    left:0!important;
  }
  /* Do not place the arrow over the voice fullscreen stream or keyboard. */
  body #appShell.app-shell.omni-mobile-rework153:is(.omni-mobile-streaming153,.omni-mobile-keyboard-open,.voice-fullscreen,.nexo-video-fullscreen)
  #omniMobileRailToggle156{
    display:none!important;
  }
}
@media (max-width:760px) and (orientation:landscape){
  body #appShell.app-shell.omni-mobile-rework153 #omniMobileRailToggle156{
    bottom:calc(77px + env(safe-area-inset-bottom))!important;
  }
}

@media(max-width:760px){
  /* The return arrow occupies the old rail footprint. Keep it from
     covering the chat's attach button when the rail is collapsed. */
  body #appShell.app-shell.omni-mobile-rework153.omni-mobile-rail-collapsed156:not(.omni-mobile-in-call153)
    > .chat-column > .composer-wrap:not([hidden]){
    left:62px!important;
    right:9px!important;
    max-width:calc(100% - 71px)!important;
  }
}

@media(max-width:760px){
  body #appShell#appShell.app-shell.omni-mobile-rework153.omni-mobile-rail-collapsed156:not(.voice-fullscreen):not(.nexo-video-fullscreen)
    > .chat-column > .composer-wrap:not([hidden]){
    left:62px!important;
    right:9px!important;
    max-width:calc(100% - 71px)!important;
  }
}
