#kq-header-auth { display: flex; align-items: center; min-height: 40px; }
  #kq-header-auth .kq-auth-host { position: relative; display: flex; align-items: center; }
  #kq-header-auth {
    position: relative;
    flex: 0 0 auto;
  }
  .header-login-btn {
    position: relative;
    gap: 6px;
    padding: 0 14px;
  }
  .header-login-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
    background: #eef5ff;
  }
  .header-login-label {
    display: inline-block;
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.02em;
  }
  .header-login-indicator {
    width: 16px;
    height: 16px;
    color: currentColor;
    opacity: 0.75;
    transition: transform 160ms ease, opacity 160ms ease;
    flex: 0 0 auto;
  }
  .header-login-btn[aria-expanded="true"] .header-login-indicator {
    transform: rotate(180deg);
    opacity: 1;
  }
  .header-login-cancel {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid #d7e2f2;
    color: #8a9ab4;
    background: #ffffff;
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 150ms ease, transform 150ms ease, border-color 150ms ease, color 150ms ease, background-color 150ms ease;
    pointer-events: none;
    flex: 0 0 auto;
  }
  .header-login-btn.is-login-pending {
    padding-right: 10px;
  }
  .header-login-btn.is-login-pending:hover .header-login-cancel,
  .header-login-btn.is-login-pending:focus-visible .header-login-cancel {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    border-color: #f2b3b8;
    color: #dc2626;
    background: #fff4f4;
  }
  .header-login-btn.is-logged-in {
    min-width: 114px;
    height: 42px;
    padding: 0 12px 0 8px;
    border: 1px solid #bfd5fa;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
    color: #1f74ea;
    box-shadow: 0 10px 22px rgba(30, 136, 229, 0.12);
  }
  .header-login-btn.is-logged-in:hover {
    border-color: #98bef8;
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  }
  .header-login-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(180deg, #f4f8ff 0%, #dce9ff 100%);
    border: 1px solid #d8e5fb;
    flex: 0 0 auto;
  }
  .header-login-btn.is-logged-in .header-login-label {
    max-width: 72px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #1f74ea;
    line-height: 1;
  }
  .header-login-btn.is-logged-in .header-login-indicator {
    width: 12px;
    height: 12px;
    opacity: 0.76;
  }
  .auth-user-panel {
    margin: 0 10px 8px;
    padding: 12px 14px 11px;
    border: 1px solid #e4eefc;
    border-radius: 14px;
    background: linear-gradient(180deg, #f9fbff 0%, #eef5ff 100%);
  }
  .auth-user-panel-name {
    font-size: 15px;
    line-height: 1.25;
    font-weight: 700;
    color: #0f4ea6;
    margin-bottom: 3px;
  }
  .auth-user-panel-id {
    font-size: 12px;
    color: #6b83aa;
  }
  #kq-header-auth .user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 168px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    border: 1px solid #e3f2fd;
    padding: 6px 0;
    z-index: 100002;
  }
  #kq-header-auth .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 18px;
    border: none;
    background: none;
    font: inherit;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
  }
  #kq-header-auth .dropdown-item:hover { background: #f5f5f5; color: #1e88e5; }
  #kq-header-auth .dropdown-divider { height: 1px; background: #eee; margin: 6px 0; }
  .auth-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    padding: 10px 0 8px;
    border: 1px solid #ddeafb;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.14);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    z-index: 100002;
  }
  .auth-user-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .auth-user-panel {
    margin: 0 10px 8px;
  }
  .auth-user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 20px);
    min-height: 42px;
    margin: 0 10px;
    padding: 0 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #21456f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }
  .auth-user-menu-item:hover {
    background: #f4f8ff;
    color: #1f74ea;
  }
  .auth-user-menu-item.danger {
    color: #21456f;
  }
  .auth-user-menu-item.danger:hover {
    background: #f4f8ff;
    color: #1f74ea;
  }
  .auth-user-menu-icon {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: #eef5ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4d7fc2;
    flex: 0 0 auto;
  }
  .auth-user-menu-icon svg {
    width: 15px;
    height: 15px;
    display: block;
  }
  #root .App { position: relative; }
  .mobile-nav-grid-item.active {
    color: #1e88e5;
    background: #e3f2fd;
    font-weight: 600;
    border: 1px solid #bbdefb;
  }
  .mobile-nav-custom-btn.active { box-shadow: 0 0 0 2px #1e88e5; }
  /* 平台概况：Vue 下 .info-card-stats 为横向 flex，子级为 .info-stat-item | .info-stat-divider | .info-stat-item；
     轮换层 .kq-hero-stat-face 须同为横向 flex，否则两数字会竖排 */
  #kq-hero-stat-rotator { flex-wrap: nowrap; }
  .kq-hero-stat-face {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  /* 与旧 SPA（main-*.js）一致：桌面 .nav-primary 可裁切，溢出项由 kqReflowDesktopNav 收进「更多工具」；下拉默认隐藏，hover / .kq-more-open 显示，fixed 坐标由脚本写在按钮下方 */
  @media (min-width: 769px) {
    header.header .nav-primary {
      overflow: hidden !important;
    }
    header.header .nav-item-wrapper {
      flex-shrink: 0;
    }
    header.header .nav {
      overflow: visible !important;
    }
  }
  .header .nav-more-wrapper .nav-more-dropdown {
    display: none !important;
  }
  .header .nav-more-wrapper:hover .nav-more-dropdown,
  .header .nav-more-wrapper:focus-within .nav-more-dropdown,
  .header .nav-more-wrapper.kq-more-open .nav-more-dropdown {
    display: block !important;
  }
  /* fixed 下拉与按钮之间不能有「视觉缝隙」：否则鼠标经过空白时父级 :hover 丢失，菜单会闪没 */
  .header .nav-more-dropdown {
    margin-top: -6px;
    padding-top: 10px;
  }
  /* 更多下拉内与顶栏相同：链接 + 展开按钮同一行（block 会导致箭头换行） */
  .header .nav-more-dropdown .nav-item-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
  }
  .header .nav-more-dropdown .nav-item-wrapper > a {
    flex: 1 1 auto;
    min-width: 0;
  }
  .header .nav-more-dropdown .nav-item-wrapper > .category-dropdown-toggle {
    flex-shrink: 0;
  }
  /* 「更多工具」按钮与下拉项：与顶栏 .nav-link 一致（index-ded8e127：宽屏 14px/400，769–1024 为 13px；dropdown 曾为 15px/500） */
  .header .nav-more-wrapper > .nav-more-trigger,
  .header .nav-more-dropdown a.nav-more-dropdown-item {
    font-family: Microsoft YaHei, PingFang SC, sans-serif;
    font-weight: 400;
  }
  @media (min-width: 1025px) {
    .header .nav-more-wrapper > .nav-more-trigger,
    .header .nav-more-dropdown a.nav-more-dropdown-item {
      font-size: 14px;
    }
  }
  @media (min-width: 769px) and (max-width: 1024px) {
    .header .nav-more-wrapper > .nav-more-trigger,
    .header .nav-more-dropdown a.nav-more-dropdown-item {
      font-size: 13px;
    }
  }
  /* 顶栏分类工具下拉（与 old/dist main-82466e14.js + index-ded8e127.css 一致；打包 CSS 缺省时兜底） */
  .dropdown-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000;
  }
  .category-dropdown-panel {
    position: fixed;
    z-index: 100001;
    max-width: min(520px, 90vw);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  }
  .category-dropdown-toggle svg.rotated {
    transform: rotate(180deg);
    transition: transform 0.2s ease;
  }
