/* v12.2.7: non-floating, edge-anchored mobile navigation.
   CSS-only and loaded AFTER v12.2.5. Does not alter nav/menu JS. */
@media (max-width: 950px) {
  html { scroll-padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) !important; }
  html body nav.mobile-bottom-nav,
  html[data-theme="dark"] body nav.mobile-bottom-nav,
  html[data-theme="light"] body nav.mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    position: fixed !important;
    inset: auto 0 0 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    height: calc(54px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 2px 5px calc(2px + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    transform: none !important;
    translate: none !important;
    bottom: 0 !important;
    border: 0 !important;
    border-top: 1px solid rgba(129, 167, 202, .24) !important;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: 0 -3px 18px rgba(0, 0, 0, .18) !important;
    background: #182638 !important;
    overflow: hidden !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    z-index: 90 !important;
  }
  html[data-theme="dark"] body nav.mobile-bottom-nav {
    background: linear-gradient(180deg, #1c2d42 0%, #142234 100%) !important;
  }
  html[data-theme="light"] body nav.mobile-bottom-nav {
    background: #f5f7fb !important;
    border-top-color: rgba(52, 83, 115, .18) !important;
  }
  body nav.mobile-bottom-nav > :is(a.mobile-tab, button.mobile-create-trigger) {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1px !important;
    height: 49px !important;
    max-height: 49px !important;
    min-height: 0 !important;
    padding: 3px 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    background-image: none !important;
    transform: none !important;
    text-decoration: none !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  body nav.mobile-bottom-nav > :is(a.mobile-tab,button.mobile-create-trigger) > span {
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 20px !important;
    line-height: 22px !important;
    font-weight: 500 !important;
    transform: none !important;
  }
  body nav.mobile-bottom-nav > :is(a.mobile-tab,button.mobile-create-trigger) > small {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 9px !important;
    line-height: 11px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
  }
  html body nav.mobile-bottom-nav .mobile-tab.current,
  html[data-theme="dark"] body nav.mobile-bottom-nav .mobile-tab.current,
  html[data-theme="light"] body nav.mobile-bottom-nav .mobile-tab.current,
  html body nav.mobile-bottom-nav button.mobile-create-trigger {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  html body nav.mobile-bottom-nav .mobile-tab.current::before {
    top: 0 !important;
    left: 30% !important;
    right: 30% !important;
    width: auto !important;
    height: 2px !important;
    background: #2bc6c8 !important;
    border-radius: 0 0 3px 3px !important;
    opacity: 1 !important;
  }
  body nav.mobile-bottom-nav button.mobile-create-trigger > span {
    font-size: 23px !important;
    line-height: 22px !important;
  }
  /* Preserve space for the create sheet without moving the navigation. */
  body .mobile-create-sheet {
    bottom: calc(54px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
