/* Omni mobile 150 — phone-first compact layout.
   The desktop app retains all original layout and voice/media behavior. */
@media (max-width: 760px) {
  html, body { width:100%;min-width:0!important; max-width:100%;overflow-x:hidden; }
  body { min-height:100dvh;overscroll-behavior-x:none; }
  #appShell.app-shell:not([hidden]) {
    display:grid!important;
    position:relative!important;
    width:100%!important;
    height:100dvh!important;
    min-height:0!important;
    overflow:hidden!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:56px minmax(0,1fr)!important;
  }
  #appShell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > #globalNavigation {
    position:relative!important;z-index:110!important;
    grid-area:1 / 1 / 2 / 2!important;
    width:100%!important;min-width:0!important;
    height:56px!important;min-height:56px!important;
    padding:0 7px!important;gap:2px!important;
    align-items:center!important;justify-content:space-between!important;
    border-bottom:1px solid rgba(221,233,240,.14)!important;
    box-sizing:border-box!important;
  }
  #appShell #globalNavigation .global-nav-button {
    display:grid!important;place-items:center!important;
    flex:0 1 37px!important;
    width:37px!important;min-width:36px!important;height:38px!important;
    border-radius:9px!important; padding:0!important;
  }
  #appShell #globalNavigation .global-nav-button svg {
    display:block;width:20px;height:20px;justify-self:center;align-self:center;
  }
  #appShell #globalNavigation .global-nav-button::after {
    display:none!important;
  }
  #appShell #globalNavigation #omniPremiumTrialStatusChip {
    display:none!important;
  }
  #appShell #globalNavigation .omni-mobile-menu-button {
    display:grid!important;place-items:center;flex:0 0 42px;
    width:42px;min-width:42px;height:40px;
    margin-right:1px;padding:0;
    border:1px solid rgba(221,237,247,.15);border-radius:11px;
    background:rgba(190,218,233,.065);
    color:#eaf0f5;cursor:pointer;
  }
  #appShell #globalNavigation .omni-mobile-menu-button svg {
    width:21px;height:21px;stroke:currentColor;
  }
  #appShell #globalNavigation .omni-mobile-menu-button[aria-expanded="true"] {
    background:rgba(82,147,192,.20);border-color:rgba(136,194,227,.4);
  }
  #appShell #globalNavigation .omni-mobile-menu-button:focus-visible {
    outline:2px solid #8dc2e9;outline-offset:2px;
  }
  #appShell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > .chat-column {
    grid-column:1!important;grid-row:2!important;
    width:100%!important;max-width:100%!important;
    height:100%!important;min-width:0!important;min-height:0!important;
    padding-bottom:75px!important;
    position:relative!important;z-index:1!important;
    overflow:hidden!important;
  }
  #appShell .chat-column > .chat-topbar {
    height:49px!important;min-height:49px!important;
    padding:0 12px!important;gap:7px!important;
  }
  #appShell .chat-column > .chat-topbar .current-channel {
    min-width:0!important;flex:1 1 auto!important;
    gap:6px!important;
  }
  #appShell .chat-column > .chat-topbar .current-channel h1 {
    font-size:13px!important;max-width:100%;text-overflow:ellipsis;
  }
  #appShell .chat-column > .chat-topbar .current-channel p {
    font-size:10px!important;overflow:hidden;text-overflow:ellipsis;
  }
  #appShell .chat-column .conversation {
    min-width:0!important;padding:13px 12px 14px!important;
  }
  #appShell .chat-column .composer-wrap {
    padding:7px 9px 9px!important;min-width:0!important;
  }
  #appShell .chat-column .composer {
    min-width:0!important;max-width:100%!important;
  }
  #appShell .chat-column .composer input {
    font-size:13px!important;min-width:0!important;
  }
  #appShell .chat-column .message-text {
    font-size:12px!important;line-height:1.55!important;
  }
  #appShell .chat-column .message, #appShell .chat-column .message-body {
    min-width:0!important;max-width:100%!important;
  }
  #appShell .chat-column .message-text {overflow-wrap:anywhere!important;}
  #appShell .chat-column :is(#homePanel,#nexoSocialCenter,#friendsPanel) {
    max-width:100%!important;min-width:0!important;
  }
  /* Keep Mini Central in its original DOM so the existing mic/output handlers
     and in-call dock continue to work. In collapsed view it forms a fixed footer. */
  #appShell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > .channel-sidebar {
    display:flex!important;position:fixed!important;
    left:0!important;right:0!important;top:auto!important;bottom:0!important;
    width:100%!important;min-width:0!important;height:75px!important;
    max-height:75px!important;
    flex-direction:column!important;
    overflow:visible!important;z-index:82!important;
    border-top:1px solid rgba(206,229,241,.16)!important;
    border-right:0!important;
    background:rgba(15,19,24,.95)!important;
    backdrop-filter:blur(17px);-webkit-backdrop-filter:blur(17px);
  }
  #appShell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > .channel-sidebar > .channel-list,
  #appShell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > .channel-sidebar > .sidebar-spacer,
  #appShell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > .channel-sidebar > .connection-card {
    display:none!important;
  }
  #appShell:not(.voice-fullscreen):not(.nexo-video-fullscreen)
   > .channel-sidebar > #miniCentral {
    display:flex!important;position:relative!important;
    flex:0 0 74px!important;
    width:100%!important;min-height:74px!important;max-height:74px!important;
    margin:0!important;padding:5px 12px!important;
    align-items:center!important;
    overflow:visible!important;
    border:0!important;background:transparent!important;
    box-shadow:none!important;
  }
  #appShell:not(.voice-fullscreen):not(.nexo-video-fullscreen)
  > .channel-sidebar #miniCentral .mini-central-content {
    display:flex!important;width:100%!important;align-items:center!important;
    gap:8px!important;max-width:100%!important;
    min-width:0!important;
  }
  #appShell #miniCentral .self-avatar {
    flex:0 0 47px!important;width:47px!important;height:47px!important;
    border-radius:50%!important;
  }
  #appShell #miniCentral .mini-central-ident {
    flex:1 1 auto!important;min-width:0!important;
  }
  #appShell #miniCentral .mini-central-ident strong {
    font-size:13px!important;
  }
  #appShell #miniCentral .mini-central-ident small {
    font-size:10px!important;
  }
  #appShell #miniCentral .mini-central-buttons {
    display:flex!important;gap:5px!important;
    margin-left:auto!important;flex:0 0 auto!important;
  }
  #appShell #miniCentral .user-control {
    display:grid!important;place-items:center!important;
    flex:0 0 38px!important;width:38px!important;height:40px!important;
    border-radius:10px!important;
  }
  #appShell #miniCentral .user-control svg {
    width:19px!important;height:19px!important;
  }
  /* Drawer: original channel and community controls, no duplicate action IDs. */
  #appShell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > .server-rail {
    display:none!important;
  }
  #appShell .omni-mobile-backdrop {
    display:none;position:fixed;z-index:70;
    inset:56px 0 0 0;
    background:rgba(0,0,0,.49);
    backdrop-filter:blur(2px);
    -webkit-backdrop-filter:blur(2px);
    border:0;cursor:default;
  }
  #appShell .omni-mobile-backdrop[hidden] {display:none!important;}
  #appShell.omni-mobile-drawer-open:not(.voice-fullscreen):not(.nexo-video-fullscreen)
   > .omni-mobile-backdrop {display:block!important;}
  #appShell.omni-mobile-drawer-open:not(.voice-fullscreen):not(.nexo-video-fullscreen)
   > .server-rail {
    display:flex!important;position:fixed!important;
    top:56px!important;bottom:0!important;left:0!important;
    width:62px!important;height:auto!important;
    padding:11px 0 9px!important;
    z-index:91!important;overflow-y:auto;
    background:rgba(9,13,18,.97)!important;
    border-right:1px solid rgba(222,237,245,.12)!important;
  }
  #appShell.omni-mobile-drawer-open:not(.voice-fullscreen):not(.nexo-video-fullscreen)
   > .channel-sidebar {
    display:flex!important;position:fixed!important;
    top:56px!important;left:62px!important;right:0!important;bottom:0!important;
    width:calc(100% - 62px)!important;min-width:0!important;
    height:auto!important;max-height:none!important;
    flex-direction:column!important;
    z-index:90!important;
    overflow:visible!important;
    background:rgba(17,22,27,.965)!important;
  }
  #appShell.omni-mobile-drawer-open:not(.voice-fullscreen):not(.nexo-video-fullscreen)
   > .channel-sidebar > .channel-list {
    display:block!important;flex:1 1 auto!important;
    min-height:0!important;overflow-y:auto!important;
    overscroll-behavior:contain;padding:15px 11px 20px!important;
  }
  #appShell.omni-mobile-drawer-open .channel-sidebar .channel-button,
  #appShell.omni-mobile-drawer-open .channel-sidebar .voice-channel {
    min-height:44px!important;height:auto!important;
    padding:8px 10px!important;font-size:13px!important;
  }
  #appShell.omni-mobile-drawer-open .server-rail .server-button,
  #appShell.omni-mobile-drawer-open .server-rail .server-add {
    min-height:44px!important;min-width:44px!important;
  }
  #appShell.omni-mobile-drawer-open:not(.voice-fullscreen):not(.nexo-video-fullscreen)
    > .channel-sidebar > #miniCentral {
    flex:0 0 75px!important;
    border-top:1px solid rgba(221,238,247,.12)!important;
  }
  #appShell.omni-mobile-keyboard-open:not(.omni-mobile-drawer-open):not(.voice-fullscreen):not(.nexo-video-fullscreen)
    > .channel-sidebar {display:none!important;}
  #appShell.omni-mobile-keyboard-open:not(.voice-fullscreen):not(.nexo-video-fullscreen)
    > .chat-column {padding-bottom:0!important;}
  #appShell:not(.voice-fullscreen) .member-sidebar {max-width:calc(100vw - 14px);}
  #appShell .chat-column .voice-preview-members,
  #appShell .chat-column #voicePreviewMembers {
    max-height:calc(100dvh - 300px);overflow-y:auto;
  }
  #appShell .voice-stage .remote-media video {
    max-width:100%!important;object-fit:contain!important;
  }
  /* Calls may be full-width, but must never stretch the video past the phone. */
  #appShell .chat-column #voiceStage {min-width:0!important;max-width:100%!important;}
  #appShell .chat-column #voiceStage .voice-stage-panel {min-width:0!important;max-width:100%!important;}
  #appShell .toast {bottom:91px!important;}
  #appShell #miniCentral .omni-compact-voice {z-index:81!important;}
  #appShell .omni-friend-online-popup {right:10px;bottom:90px!important;}
}
@media (max-width: 370px) {
  #appShell #globalNavigation .global-nav-button {
    min-width:33px!important;width:33px!important;flex-basis:33px!important;
  }
  #appShell #globalNavigation .omni-mobile-menu-button {
    min-width:38px!important;width:38px!important;flex-basis:38px!important;
  }
  #appShell #miniCentral .self-avatar {
    flex-basis:40px!important;width:40px!important;height:40px!important;
  }
  #appShell #miniCentral .user-control {
    flex-basis:34px!important;width:34px!important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #appShell .omni-mobile-menu-button,
  #appShell .omni-mobile-backdrop {transition:none!important;animation:none!important;}
}
@media (max-width:760px) {
  /* Higher specificity than legacy grid rules in omni-layout-topbar-076. */
  body #appShell.app-shell:not([hidden]):not(.voice-fullscreen):not(.nexo-video-fullscreen) {
    margin:0!important;padding:0!important;
    left:0!important;right:0!important;top:0!important;
    width:100vw!important;max-width:100vw!important;
    height:100dvh!important;min-height:0!important;
    overflow-x:clip!important;overflow-y:clip!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:56px minmax(0,1fr)!important;
  }
  body #appShell.app-shell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > .channel-sidebar {
    grid-column:1!important;grid-row:2!important;
    position:fixed!important;left:0!important;right:auto!important;
    bottom:0!important;top:auto!important;
    width:100vw!important;max-width:100vw!important;
    height:75px!important;max-height:75px!important;
  }
  body #appShell.app-shell.omni-mobile-drawer-open:not(.voice-fullscreen):not(.nexo-video-fullscreen)
   > .channel-sidebar {
    grid-column:1!important;grid-row:2!important;
    top:56px!important;bottom:0!important;
    left:62px!important;right:auto!important;
    width:calc(100vw - 62px)!important;
    height:calc(100dvh - 56px)!important;max-height:none!important;
  }
  body #appShell.app-shell:not(.voice-fullscreen):not(.nexo-video-fullscreen)
    > .omni-mobile-backdrop {
    grid-column:1!important;grid-row:2!important;
    left:0!important;right:0!important;
    width:100vw!important;
  }
  body #appShell.app-shell:not(.voice-fullscreen):not(.nexo-video-fullscreen)
    > .omni-compact-voice.is-narrow-mode {
    left:8px!important;right:8px!important;
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
  }
  body #appShell.app-shell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > .chat-column {
    grid-area:2 / 1 / 3 / 2!important;
    min-width:0!important;max-width:100vw!important;
  }
  body #appShell.app-shell:not(.voice-fullscreen):not(.nexo-video-fullscreen) > #globalNavigation {
    grid-area:1 / 1 / 2 / 2!important;
    min-height:56px!important;height:56px!important;
  }
}