@media (max-width: 860px) {
  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    gap: 0;
    height: 50px;
    min-height: 50px;
  }

  .site-branding {
    display: flex !important;
    flex: 1 1 auto;
    width: auto !important;
    max-width: none !important;
    height: 50px;
    line-height: 50px !important;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 2;
  }

  .site-title {
    display: inline-flex !important;
    align-items: center;
    font-size: 16px !important;
    font-weight: 700;
    line-height: 1.2;
    max-width: 52vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--theme-skin, #505050);
    text-decoration: none;
  }

  .mo-nav-button,
  .mo-toc-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 50px;
    flex: 0 0 44px;
    z-index: 3;
    cursor: pointer;
    color: var(--theme-skin, #505050);
  }

  .nav-search-wrapper,
  .user-menu-wrapper {
    display: none !important;
  }

  .mobile-nav {
    position: fixed;
    inset: 50px 0 auto;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    z-index: 98;
  }

  .mobile-nav.open,
  .mo_toc_panel.open {
    display: flex !important;
    max-height: calc(100vh - 50px);
    overflow-y: auto;
  }

  .mobile-nav .menu > li {
    display: flex;
  }

  .site-header.bg .site-title,
  .site-header:hover .site-title {
    color: var(--theme-skin, #505050);
  }

  body.dark .site-title {
    color: #eee;
  }
}

@media (min-width: 861px) {
  .site-header .site-branding {
    display: none;
  }
}
