/**
 * 导航精选中心 - 前台样式
 * nav_hub plugin frontend styles
 */

/* ========== 公共基础 ========== */
body {
    background-color: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    margin: 0;
}

/* ========== 导航头部 ========== */
.nh-header {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nh-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    box-sizing: border-box;
}
/* 站点名与导航菜单均在头部内、靠左排列 */
.nh-header-inner .nh-header-logo {
    flex-shrink: 0;
    margin-right: 24px;
}
.nh-header-inner .nh-header-nav {
    display: flex !important;
    align-items: center;
    gap: 20px;
    margin-left: 0 !important;
    flex: 1;
    min-width: 0;
}
.nh-header-nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nh-header-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 30;
    isolation: isolate;
    pointer-events: auto;
    background: #ffffff;
}
.nh-header-inner > .nh-header-nav {
    position: relative;
    z-index: 1;
}
.nh-header-inner > .nh-header-nav-right {
    z-index: 30;
}
.nh-header-nav > .nh-header-nav-right {
    position: sticky;
    right: 0;
    z-index: 30;
    margin-left: auto;
    flex-shrink: 0;
    background: #ffffff;
    pointer-events: auto;
    box-shadow: -12px 0 12px -8px #ffffff;
}
.nh-header-nav > .nh-header-nav-right .nh-header-link {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(37, 99, 235, 0.15);
}
.nh-header-nav-right .nh-header-link,
.nh-header-nav-right .nh-header-user,
.nh-header-nav-right summary.nh-header-link {
    position: relative;
    z-index: 1;
    cursor: pointer;
    touch-action: manipulation;
}
.nh-header-logo {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
}
.nh-header-logo:hover {
    color: #2563eb;
}
.nh-header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nh-header-nav-sep {
    width: 1px;
    height: 14px;
    background: #e2e8f0;
    margin: 0 4px;
}
.nh-header-link {
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
}
.nh-header-link:hover {
    color: #2563eb;
}
.nh-header-link-reg {
    padding: 6px 14px;
    background: #2563eb;
    color: #ffffff !important;
    border-radius: 8px;
    font-weight: 500;
}
.nh-header-link-reg:hover {
    background: #1d4ed8;
    color: #ffffff !important;
}
.nh-header-user {
    font-size: 14px;
    color: #64748b;
    margin-right: 4px;
}
.nh-account-desktop-menu {
    display: none;
    position: relative;
}
.nh-account-desktop-menu summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.nh-account-desktop-menu summary::-webkit-details-marker {
    display: none;
}
.nh-account-desktop-menu .nh-account-menu {
    position: absolute;
    top: 28px;
    right: 0;
    min-width: 148px;
}
.nh-account-desktop {
    display: none !important;
}
.nh-account-mobile {
    display: none;
    position: relative;
}
.nh-account-mobile summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.nh-account-mobile summary::-webkit-details-marker {
    display: none;
}
.nh-account-menu {
    position: fixed;
    top: 56px;
    right: 10px;
    min-width: 148px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    padding: 8px;
    z-index: 300;
}
.nh-account-name {
    font-size: 12px;
    color: #334155;
    padding: 6px 8px 8px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 4px;
}
.nh-account-menu .nh-header-link {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
}
.nh-account-menu .nh-header-link:hover {
    background: #f8fafc;
}
@media (min-width: 993px) {
    .nh-account-desktop-menu {
        display: inline-block !important;
    }
    .nh-account-desktop {
        display: none !important;
    }
    .nh-account-mobile {
        display: none !important;
    }
}

.nh-page {
    max-width: 1280px;
    margin: 24px auto 40px;
}
.nh-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    padding: 20px 24px;
    margin-bottom: 20px;
}

/* ========== 首页 Home ========== */
.nh-layout {
    display: flex;
    gap: 16px;
}
.nh-sidebar {
    width: 168px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}
.nh-main {
    flex: 1;
    min-width: 0;
}
/* 右侧侧边栏：与左侧一致做粘性定位，滚动时保持可见 */
.nh-rightbar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* 右侧热门网站榜单样式（蓝灰配色与主内容一致） */
.nh-rightcard {
    background: linear-gradient(145deg, #f0f9ff, #e0f2fe);
    padding: 14px 14px 16px;
}
.nh-rightcard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.nh-rightcard-title {
    font-size: 14px;
    font-weight: 600;
    color: #0369a1;
}
.nh-rightcard-tabs {
    display: flex;
    gap: 12px;
    font-size: 13px;
}
.nh-right-tab {
    border: none;
    background: transparent;
    padding: 2px 0;
    cursor: pointer;
    color: #64748b;
    position: relative;
    font-size: 13px;
}
.nh-right-tab.active {
    color: #0369a1;
    font-weight: 600;
}
.nh-right-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    border-radius: 999px;
    background: #0ea5e9;
}
.nh-rightcard-body {
    margin-top: 4px;
}
.nh-right-list {
    margin-top: 4px;
}
.nh-right-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    margin-bottom: 6px;
}
.nh-right-item:hover {
    background: #e0f2fe;
}
.nh-right-rank {
    width: 20px;
    text-align: center;
    font-size: 13px;
    color: #0ea5e9;
    margin-right: 4px;
}
.nh-right-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 8px;
}
.nh-right-icon img {
    max-width: 100%;
    max-height: 100%;
}
.nh-right-meta {
    flex: 1;
    min-width: 0;
}
.nh-right-title {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nh-right-desc {
    margin-top: 2px;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nh-right-latest {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #bae6fd;
}
.nh-right-latest-title {
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 6px;
}
.nh-right-latest-item {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    margin-bottom: 4px;
}
.nh-right-latest-item:hover {
    background: #e0f2fe;
}
.nh-hero-search {
    width: 100%;
    margin: 0 auto 20px;
    padding: 20px 24px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    position: relative;
    /* 必须 visible：联想/历史面板 absolute 下拉，hidden 会被裁切并被下方卡片盖住 */
    overflow: visible;
    z-index: 20;
}
.nh-hero-title {
    margin: 0 auto 6px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
}
.nh-hero-searchbar {
    display: flex;
    align-items: center;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 4px 4px 4px 18px;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
.nh-hero-searchbar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #111827;
    background: transparent;
}
.nh-hero-searchbar input::placeholder {
    color: #9ca3af;
}
.nh-hero-search-btn {
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.nh-hero-search-btn:hover {
    background: #1d4ed8;
}
.nh-hero-search-btn:focus {
    outline: none;
}
.nh-hero-engines {
    display: flex;
    gap: 10px;
    font-size: 12px;
    justify-content: center;
}
.nh-hero-engine {
    padding: 4px 12px;
    border-radius: 999px;
    background: #f3f4ff;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
    -webkit-appearance: none;
    appearance: none;
}
.nh-hero-engine:focus,
.nh-hero-engine:active {
    outline: none !important;
    box-shadow: none !important;
}
.nh-hero-engine.active {
    background: #111827;
    color: #ffffff;
}
.nh-hero-rec {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 8px 10px;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 12px 6px;
    box-sizing: border-box;
    scroll-padding-inline: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nh-hero-rec::-webkit-scrollbar {
    display: none;
}
.nh-hero-searchbar + .nh-hero-rec {
    margin-top: -8px;
}
.nh-hero-search:has(.nh-hero-rec)::before,
.nh-hero-search:has(.nh-hero-rec)::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 32px;
    height: 52px;
    pointer-events: none;
    z-index: 2;
}
.nh-hero-search:has(.nh-hero-rec)::before {
    left: 0;
    border-bottom-left-radius: 20px;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #ffffff 88%);
}
.nh-hero-search:has(.nh-hero-rec)::after {
    right: 0;
    border-bottom-right-radius: 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 88%);
}
.nh-hero-rec-item {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.2;
    transition: color 0.15s ease, opacity 0.15s ease;
}
.nh-hero-rec-item:hover {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #111827;
    text-decoration: none;
    opacity: 0.85;
}
.nh-hero-rec-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}
.nh-hero-rec-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.nh-hero-rec-fallback {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}
.nh-hero-rec-title {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nh-cat-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.nh-cat-item-top {
    margin-bottom: 2px;
}
.nh-cat-row {
    display: flex;
    align-items: center;
    min-height: 36px;
    border-radius: 8px;
    background: transparent;
    transition: background-color 0.15s ease;
}
.nh-cat-row:hover {
    background: #f3f4f6;
}
.nh-cat-item-top.is-expanded > .nh-cat-row {
    background: #f9fafb;
}
.nh-cat-item-top .nh-cat-link {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    padding: 8px 4px 8px 10px;
    border-radius: 0;
    background: transparent !important;
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nh-cat-item-top .nh-cat-link:hover {
    color: #111827;
}
.nh-cat-item-top .nh-cat-link.active {
    color: #2563eb !important;
    font-weight: 600;
    background: transparent !important;
}
.nh-cat-item-top:has(.nh-cat-link.active) > .nh-cat-row {
    background: #eef2ff;
}
.nh-cat-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nh-cat-toggle::before {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #9ca3af;
    border-bottom: 1.5px solid #9ca3af;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
}
.nh-cat-item-top.is-expanded > .nh-cat-row .nh-cat-toggle::before {
    transform: rotate(45deg);
}
.nh-cat-sublist {
    list-style: none;
    padding: 0 0 6px 14px;
    margin: 0;
    display: none;
}
.nh-cat-item-top.is-expanded > .nh-cat-sublist {
    display: block;
}
.nh-cat-sublink {
    display: block;
    padding: 6px 10px;
    margin-bottom: 2px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.3;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nh-cat-sublink:hover {
    background: #f1f5f9;
    color: #334155;
}
.nh-cat-sublink.active {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 500;
}

/* 左栏分类树：一级列表 / 二级下级页切换 */
.nh-cattree-panels {
    position: relative;
}
.nh-cattree-panel {
    display: none;
}
.nh-cattree-panel[hidden] {
    display: none !important;
}
.nh-cattree-panel.is-active {
    display: block;
}
.nh-cattree-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 0 4px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}
.nh-cattree-back {
    align-self: flex-start;
    border: 0;
    background: transparent;
    padding: 4px 6px;
    font-size: 12px;
    color: #2563eb;
    cursor: pointer;
    border-radius: 4px;
}
.nh-cattree-back:hover {
    background: #eff6ff;
}
.nh-cattree-head-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
    word-break: break-all;
}
.nh-cattree-l2enter {
    display: flex;
    align-items: center;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    padding: 6px 10px;
    margin-bottom: 2px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.3;
    color: #64748b;
}
.nh-cattree-l2enter:hover {
    background: #f1f5f9;
    color: #334155;
}
.nh-cattree-l2enter-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nh-cattree-l2enter-arrow {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-left: 6px;
    border-right: 1.5px solid #9ca3af;
    border-bottom: 1.5px solid #9ca3af;
    transform: rotate(-45deg);
}
.nh-cattree .nh-cat-sublist {
    padding-left: 12px;
}
/* 二级下级页：三级导航字号与行高（勿沿用一级的大号样式） */
.nh-cattree-l3-list .nh-cat-sublink,
.nh-cattree-l3-list .nh-cattree-branch-label,
.nh-cattree-l3-list button.nh-cattree-l3jump,
.nh-cattree-l3-list button.nh-cattree-l3leaf,
.nh-cattree-l3-list a.nh-cattree-l3jump,
.nh-cattree-l3-list a.nh-cattree-catpage {
    font-size: 12px;
    line-height: 1.35;
    padding: 4px 8px;
}
.nh-cattree-l3-list .nh-cat-item-top .nh-cat-row {
    min-height: 28px;
}
.nh-cattree-l3-list .nh-cat-toggle {
    width: 22px;
    height: 28px;
}
.nh-cattree-l3-list .nh-cat-sublist {
    padding-left: 10px;
}
.nh-cattree-hidden-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 500;
    color: #9ca3af;
    vertical-align: middle;
}
.nh-cattree-branch-label {
    flex: 1;
    min-width: 0;
    padding: 6px 4px 6px 10px;
    font-size: 13px;
    line-height: 1.3;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nh-cattree-lv3 .nh-cat-sublink,
.nh-cattree-lv4 .nh-cat-sublink,
.nh-cattree-lv5 .nh-cat-sublink,
.nh-cattree-lv6 .nh-cat-sublink,
.nh-cattree-lv7 .nh-cat-sublink,
.nh-cattree-lv8 .nh-cat-sublink,
.nh-cattree-lv9 .nh-cat-sublink,
.nh-cattree-lv10 .nh-cat-sublink,
.nh-cattree-lv11 .nh-cat-sublink,
.nh-cattree-lv12 .nh-cat-sublink {
    font-size: 12px;
}

.nh-main-default[hidden],
.nh-l2-main-panel[hidden] {
    display: none !important;
}
.nh-l2-main-panel {
    display: block;
}
.nh-l2-main-head {
    margin-bottom: 4px;
}
.nh-l2-main-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px 0;
}
.nh-l3-section {
    scroll-margin-top: 12px;
}
.nh-cattree-l3jump.nh-cattree-branch-label {
    flex: 1;
    min-width: 0;
}
button.nh-cattree-l3jump,
button.nh-cattree-l3leaf {
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
    line-height: 1.35;
    color: inherit;
}
a.nh-cattree-catpage.nh-cattree-l3jump {
    display: block;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}
button.nh-cattree-l3jump:hover,
button.nh-cattree-l3leaf:hover,
a.nh-cattree-l3jump:hover,
a.nh-cattree-catpage:hover {
    color: #2563eb;
}
.nh-cattree-l3jump.active,
button.nh-cattree-l3leaf.active,
.nh-cattree-l4pick.active {
    color: #1d4ed8;
    font-weight: 500;
}

.nh-cat-section {
    scroll-margin-top: 12px;
}
.nh-cat-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 12px 0;
}
.nh-cat-section-title a {
    color: inherit;
    text-decoration: none;
}
.nh-cat-section-title a:hover {
    color: #2563eb;
}
.nh-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 10px;
    margin-top: 4px;
}
.nh-group-tabs-outer {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
}
.nh-group-tabs-outer .nh-group-tabs {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}
.nh-group-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.nh-group-tab {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.nh-group-tab:hover {
    background: #f3f4f6;
    color: #374151;
}
.nh-group-tab.active {
    background: #e5f0ff;
    color: #1f2937;
}
.nh-group-tab--overflow[hidden] {
    display: none !important;
}
.nh-group-tabs-outer.is-expanded .nh-group-tab--overflow {
    display: inline-flex !important;
}
.nh-group-tabs-outer.is-expanded .nh-group-tabs {
    flex-wrap: wrap !important;
    white-space: normal;
    overflow-x: visible;
}
/* 首页主内容：二级 / 四级标签行 + 右侧「更多+」 */
.nh-group-tabs-outer--home-l2,
.nh-group-tabs-outer--home-l4 {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.nh-group-tabs-outer--home-l2 .nh-home-l2-group-tabs,
.nh-group-tabs-outer--home-l4 .nh-l3-group-tabs {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-right: 4px;
}
.nh-group-tabs-outer--home-l2 .nh-home-l2-group-tabs::-webkit-scrollbar,
.nh-group-tabs-outer--home-l4 .nh-l3-group-tabs::-webkit-scrollbar {
    display: none;
}
.nh-group-tabs-outer--home-l2 .nh-group-tabs-more-btn,
.nh-group-tabs-outer--home-l4 .nh-group-tabs-more-btn {
    flex: 0 0 auto;
    margin-left: auto;
}
.nh-group-tabs-outer--home-l2.is-expanded,
.nh-group-tabs-outer--home-l4.is-expanded {
    flex-wrap: wrap;
    align-items: flex-start;
}
.nh-group-tabs-outer--home-l2.is-expanded .nh-home-l2-group-tabs,
.nh-group-tabs-outer--home-l4.is-expanded .nh-l3-group-tabs {
    flex: 1 1 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    white-space: normal;
}
.nh-group-tabs-more-btn {
    flex: 0 0 auto;
    align-self: center;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nh-group-tabs-more-btn:hover {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}
a.nh-group-tabs-more-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
a.nh-group-tabs-more-btn:hover {
    text-decoration: none;
    color: #1d4ed8;
}
.nh-taxonomy-selects {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
}
.nh-taxonomy-cat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}
.nh-taxonomy-cat-scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: 2px;
}
.nh-taxonomy-cat-scroll::-webkit-scrollbar {
    display: none;
}
.nh-taxonomy-cat-select {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nh-taxonomy-cat-select:hover {
    background: #e5e7eb;
    color: #1f2937;
    text-decoration: none;
}
.nh-taxonomy-cat-select.is-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.nh-taxonomy-selects .nh-cat-filter-tree-panel {
    margin-top: 12px;
    max-height: 320px;
}
.nh-filter-selects {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
}
.nh-filter-level {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.nh-filter-level:last-child {
    margin-bottom: 0;
}
.nh-filter-level-label {
    flex: 0 0 auto;
    font-size: 12px;
    color: #64748b;
    line-height: 32px;
    white-space: nowrap;
    font-weight: 600;
}
.nh-filter-level .nh-taxonomy-cat-scroll {
    flex: 1 1 auto;
    min-width: 0;
}
.nh-filter-level--facet:last-child {
    margin-bottom: 0;
}
.nh-taxonomy-selects.nh-filter-selects {
    margin-bottom: 1rem;
}
.nh-filter-pagination {
    max-width: 100%;
}
.nh-filter-pagination .pagination {
    justify-content: center;
}
.nh-cat-filter-tree-panel {
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    max-height: 280px;
    overflow-y: auto;
}
.nh-cat-filter-tree-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nh-cat-filter-tree-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #475569;
    font-size: 12px;
    text-decoration: none;
    line-height: 1.4;
    max-width: 100%;
}
.nh-cat-filter-tree-item:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #eff6ff;
    text-decoration: none;
}
.nh-cat-filter-tree-item.is-active {
    background: #e5f0ff;
    border-color: #93c5fd;
    color: #1e40af;
    font-weight: 600;
}
.nh-group-tab {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f9fafb;
    color: #6b7280;
    font-size: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
a.nh-group-tab:hover {
    text-decoration: none;
}
.nh-group-tab:hover {
    background: #f3f4f6;
    color: #374151;
}
.nh-group-tab.active {
    background: #e5f0ff;
    color: #1f2937;
}
.nh-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
}
/* 卡片为整块链接，强制去掉链接及内部文字的下划线（覆盖主题全局 a 样式） */
a.nh-item,
a.nh-item:hover,
a.nh-item:focus,
a.nh-item:focus-visible,
a.nh-item *,
a.nh-item:hover *,
a.nh-item:focus * {
    text-decoration: none !important;
}
.nh-item {
    display: block;
    text-decoration: none;
    border-radius: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    transition: all 0.15s ease-in-out;
    height: 100%;
    position: relative;
    overflow: visible;
    z-index: 1;
    min-width: 0;
}
.nh-item:hover {
    background: #e5f0ff;
    transform: translateY(-1px);
    text-decoration: none;
    border-bottom: none;
}
.nh-item:focus,
.nh-item:focus-visible {
    text-decoration: none;
    border-bottom: none;
}
.nh-item:hover,
.nh-item:focus-within {
    z-index: 20;
}
.nh-item,
.nh-item .nh-item-title,
.nh-item .nh-item-desc,
.nh-item .nh-item-tags {
    text-decoration: none !important;
}
.nh-item:hover .nh-item-title,
.nh-item:hover .nh-item-desc,
.nh-item:focus .nh-item-title,
.nh-item:focus .nh-item-desc {
    text-decoration: none !important;
}
.nh-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.nh-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.nh-item-icon img {
    max-width: 100%;
    max-height: 100%;
}
.nh-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
}
.nh-item-title a {
    color: inherit;
    text-decoration: none;
}
.nh-item-title a:hover,
.nh-item-title a:focus {
    color: inherit;
    text-decoration: none;
}
.nh-item-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.nh-item-tags {
    margin-top: 4px;
    font-size: 11px;
    color: #9ca3af;
}

/* 选中 / 悬停时的浮层描述（参考示例样式） */
.nh-item-pop {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: rgba(15, 23, 42, 0.96);
    color: #f9fafb;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.5;
    /* 悬浮描述比卡片略宽一些 */
    min-width: 220px;
    max-width: 340px;
    max-height: none;
    overflow: visible;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out;
    z-index: 10;
}
.nh-item:hover .nh-item-pop,
.nh-item:focus-within .nh-item-pop {
    opacity: 1;
}

/* ========== 详情页 Detail ========== */
.nh-detail-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.nh-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.nh-detail-meta {
    flex: 1;
    min-width: 0;
}
.nh-logo {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nh-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.nh-title {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}
.nh-detail-tool-card {
    margin-top: 16px;
}
.nh-detail-tool-body {
    margin-top: 8px;
}
.nh-desc {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.5;
}
.nh-tags {
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
}
.nh-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid #f1f5f9;
}
.nh-detail-actions .nh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nh-detail-actions .nh-btn-primary {
    background: #2563eb;
    color: #ffffff;
}
.nh-detail-actions .nh-btn-primary:hover {
    background: #1d4ed8;
    color: #ffffff;
}
.nh-detail-actions .nh-btn-outline {
    border: 1px solid #e2e8f0;
    color: #475569;
    background: #ffffff;
}
.nh-detail-actions .nh-btn-outline:hover {
    border-color: #cbd5e1;
    color: #0f172a;
    background: #f8fafc;
}
.nh-detail-actions .nh-btn-fav-warm {
    background: #f59e0b; /* 暖色琥珀，饱和度适中 */
    color: #ffffff;
    border: 1px solid #f59e0b;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
}
.nh-detail-actions .nh-btn-fav-warm:hover {
    background: #d97706;
    border-color: #d97706;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(217, 119, 6, 0.35);
}
.nh-actions a {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    margin-left: 8px;
}
.nh-btn-primary {
    background: #2563eb;
    color: #ffffff;
}
.nh-btn-outline {
    border: 1px solid #e2e8f0;
    color: #0f172a;
    background: #ffffff;
}
/* 详情页扫码：在「手机扫码查看」按钮下方弹出 */
.nh-qr-wrap {
    position: relative;
    display: inline-block;
}
.nh-qr-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    z-index: 100;
}
.nh-qr-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e2e8f0;
    min-width: 260px;
}
.nh-qr-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
}
.nh-qr-img-wrap {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    display: inline-block;
    margin-bottom: 12px;
}
.nh-qr-img-wrap img {
    display: block;
    width: 200px;
    height: 200px;
}
.nh-qr-tip {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px 0;
}
.nh-qr-close {
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
}
.nh-qr-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.nh-feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.4);
    padding: 16px;
}
.nh-feedback-dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28);
    padding: 16px 18px 18px;
}
.nh-feedback-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.nh-feedback-close:hover {
    color: #4b5563;
}
.nh-feedback-title {
    font-size: 20px;
    line-height: 1.2;
    color: #111827;
    margin: 2px 0 12px;
}
.nh-feedback-tip {
    border-radius: 8px;
    background: #e9f2ff;
    color: #2563eb;
    font-size: 14px;
    padding: 8px 12px;
    margin-bottom: 14px;
}
.nh-feedback-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
    margin: 12px 0 16px;
}
.nh-feedback-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #111827;
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
}
.nh-feedback-option input[type="radio"] {
    margin: 0;
}
.nh-feedback-submit {
    border: none;
    border-radius: 8px;
    background: #fde2ea;
    color: #ef4444;
    font-size: 16px;
    padding: 10px 24px;
    cursor: pointer;
}
.nh-feedback-submit:hover {
    background: #fbd0de;
}
@media (max-width: 576px) {
    .nh-feedback-dialog {
        max-width: 100%;
    }
    .nh-feedback-options {
        gap: 10px 12px;
    }
}
.nh-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
}
#nh-chart {
    width: 100%;
    height: 260px;
}
.nh-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.nh-related-item {
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #0f172a;
    transition: all 0.15s ease-in-out;
}
.nh-related-item:hover {
    background: #e5f0ff;
    transform: translateY(-1px);
}
.nh-related-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 10px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.nh-related-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.nh-related-icon span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nh-related-title {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
}
.nh-related-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

/* ========== 工具页 Tool ========== */
.nh-tool-back {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 8px;
}
.nh-tool-back:hover {
    color: #2563eb;
}
.nh-tool-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 6px 0;
}
.nh-card .nh-tool-card { padding: 0; }
.nh-card .nh-tool-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #64748b;
    margin: 0 0 12px 0;
}
.nh-card .nh-tool-card .row {
    margin-left: -8px;
    margin-right: -8px;
}
.nh-card .nh-tool-card .row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}
.nh-card .nh-tool-card .form-group { margin-bottom: 10px; }
.nh-card .nh-tool-card .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 4px;
}
.nh-card .nh-tool-card .form-control {
    height: 36px;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    width: 100%;
    box-sizing: border-box;
}
.nh-card .nh-tool-card .form-control:focus {
    border-color: #3b82f6;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}
.nh-card .nh-tool-card select.form-control { cursor: pointer; }
.nh-card .nh-tool-card .btn {
    margin-top: 4px;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    font-weight: 500;
}
.nh-card .nh-tool-result {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 6px;
}
.nh-card .nh-tool-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}
.nh-card .nh-tool-result-item:last-child { border-bottom: none; }
.nh-card .nh-tool-result-label { color: #64748b; }
.nh-card .nh-tool-result-value {
    font-weight: 600;
    color: #0f172a;
    font-size: 15px;
}
.nh-card .nh-tool-card .border-top {
    border-color: #e2e8f0 !important;
    padding-top: 12px;
    margin-top: 12px;
}
.nh-card .nh-tool-card .text-muted.small {
    margin-top: 8px !important;
    font-size: 12px;
}

/* 工具页独立页面尺寸 */
.nh-page.nh-tool-page {
    max-width: 800px;
    margin: 12px auto 24px;
    padding: 0 12px;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    /* 手机版头部：收紧内边距，导航横向滚动、不换行，避免挤在一起 */
    .nh-header-inner {
        padding: 10px 12px;
        gap: 12px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nh-header-inner::-webkit-scrollbar {
        display: none;
    }
    .nh-header-inner .nh-header-logo {
        margin-right: 12px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .nh-header-nav {
        flex: 1;
        min-width: 0;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px !important;
    }
    .nh-header-nav::-webkit-scrollbar {
        display: none;
    }
    .nh-header-nav-left,
    .nh-header-nav-right {
        flex-shrink: 0 !important;
        display: flex;
        flex-wrap: nowrap;
        gap: 12px !important;
        overflow: visible;
    }
    .nh-header-nav-right {
        margin-left: auto;
        padding-left: 8px;
        background: #ffffff;
        box-shadow: -12px 0 12px -8px #ffffff;
    }
    .nh-filter-level {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .nh-filter-level-label {
        line-height: 1.4;
    }
    .nh-filter-level .nh-taxonomy-cat-scroll {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        max-width: 100%;
    }
    .nh-filter-pagination {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .nh-filter-pagination .pagination {
        flex-wrap: nowrap;
        justify-content: center;
    }
    .nh-filter-pagination .page-link {
        padding: 0.35rem 0.55rem;
        font-size: 12px;
    }
    .nh-header-link,
    .nh-header-user {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        font-size: 13px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
    }
    .nh-header-link-reg {
        min-height: 36px;
        padding: 8px 14px !important;
    }
    .nh-account-mobile {
        display: block;
        flex-shrink: 0;
    }
    .nh-header-nav-sep {
        flex-shrink: 0 !important;
    }
    .nh-page {
        margin: 12px auto 24px;
        padding: 0 10px;
        box-sizing: border-box;
    }
    .nh-card {
        padding: 16px 14px;
        border-radius: 12px;
    }
    .nh-layout {
        flex-direction: column;
        gap: 12px;
    }
    .nh-sidebar,
    .nh-rightbar {
        width: 100%;
        position: static;
    }
    /* 左侧导航在移动端改为横向滚动的标签栏，减少占高 */
    .nh-sidebar .nh-card {
        padding: 8px 12px 10px;
        margin-bottom: 10px;
        overflow: hidden;
        position: relative;
    }
    .nh-sidebar .nh-card::after {
        content: "";
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 36px;
        pointer-events: none;
        z-index: 2;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 90%);
    }
    .nh-cattree,
    .nh-cattree-panels {
        max-width: 100%;
        overflow: hidden;
    }
    .nh-cat-list {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
        align-content: flex-start;
        overflow-x: auto;
        overflow-y: visible;
        padding-top: 0;
        padding-bottom: 2px;
        padding-right: 16px;
        box-sizing: border-box;
        scroll-padding-inline: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
    }
    .nh-sidebar .nh-cat-list:has(.nh-cat-item-top.is-expanded) {
        padding-bottom: 40px;
    }
    .nh-cat-list::-webkit-scrollbar {
        display: none;
    }
    .nh-cat-item-top {
        flex: 0 0 auto;
        max-width: 100%;
        margin-bottom: 0;
    }
    .nh-sidebar .nh-cat-item-top {
        position: relative;
        align-self: flex-start;
    }
    .nh-cat-row {
        flex-wrap: nowrap;
        min-height: 32px;
        width: max-content;
        max-width: 100%;
    }
    .nh-cat-item-top .nh-cat-link {
        flex: 0 1 auto;
        width: auto;
        padding: 6px 0 6px 8px;
    }
    .nh-cat-toggle {
        flex-shrink: 0;
        height: 32px;
        width: 18px;
        margin-left: 0;
        padding: 0;
    }
    .nh-sidebar .nh-cat-item-top.is-expanded > .nh-cat-sublist {
        position: absolute;
        top: calc(100% + 2px);
        left: 0;
        z-index: 4;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding: 4px 0 0;
        margin: 0;
        width: max-content;
        max-width: min(calc(100vw - 48px), 320px);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nh-cat-item-top.is-expanded > .nh-cat-sublist {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding: 2px 0 0;
        margin: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nh-cat-item-top.is-expanded > .nh-cat-sublist::-webkit-scrollbar {
        display: none;
    }
    .nh-cat-sublist li {
        flex: 0 0 auto;
    }
    .nh-cat-sublink {
        margin-bottom: 0;
    }
    .nh-cat-item {
        flex: 0 0 auto;
        margin-right: 0;
    }
    .nh-cat-item a:not(.nh-cat-link) {
        padding: 8px 14px;
        margin-bottom: 0;
        font-size: 13px;
        white-space: nowrap;
        min-height: 36px;
        box-sizing: border-box;
    }
    /* 搜索区 */
    .nh-hero-search {
        padding: 16px 14px;
        border-radius: 14px;
        margin-bottom: 12px;
    }
    .nh-hero-search:has(.nh-hero-rec)::before {
        border-bottom-left-radius: 14px;
        width: 28px;
        height: 48px;
    }
    .nh-hero-search:has(.nh-hero-rec)::after {
        border-bottom-right-radius: 14px;
        width: 28px;
        height: 48px;
    }
    .nh-hero-title {
        font-size: 1.1rem;
    }
    .nh-hero-searchbar {
        max-width: 100%;
        padding: 4px 4px 4px 14px;
    }
    .nh-hero-searchbar input {
        font-size: 16px; /* 防止 iOS 聚焦时自动缩放 */
    }
    .nh-hero-search-btn {
        min-height: 40px;
        min-width: 52px;
        padding: 8px 18px;
        font-size: 15px;
        touch-action: manipulation;
    }
    .nh-hero-engines {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .nh-hero-engine {
        min-height: 32px;
        padding: 6px 14px;
        font-size: 13px;
        touch-action: manipulation;
    }
    /* 内容区二级分类标签：手机端强制单行横向滚动，绝不换行 */
    .nh-cat-section.nh-card:has(.nh-group-tabs) {
        overflow: hidden;
        position: relative;
    }
    .nh-cat-section.nh-card:has(.nh-group-tabs)::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        width: 32px;
        height: 52px;
        pointer-events: none;
        z-index: 2;
        border-bottom-right-radius: 12px;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 90%);
    }
    .nh-group-tabs-outer {
        flex-wrap: nowrap;
        align-items: center;
        overflow: hidden;
        padding-right: 4px;
    }
    .nh-group-tabs-outer .nh-group-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        padding-right: 8px;
        box-sizing: border-box;
        scroll-padding-inline: 8px;
        gap: 8px;
    }
    .nh-group-tabs-outer .nh-group-tabs.is-expanded {
        flex-wrap: wrap !important;
        white-space: normal;
        overflow-x: visible;
    }
    .nh-group-tabs-more-btn {
        flex: 0 0 auto;
        min-height: 36px;
        padding: 8px 12px;
        font-size: 13px;
    }
    .nh-cat-filter-tree-panel {
        max-height: 50vh;
    }
    .nh-group-tabs::-webkit-scrollbar {
        display: none;
    }
    .nh-group-tabs .small {
        display: none !important;
    }
    .nh-group-tab {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        white-space: nowrap;
        min-height: 36px;
        padding: 8px 14px;
        font-size: 13px;
        touch-action: manipulation;
    }
    /* 导航卡片：移动端双列网格（与 0.0.2 一致） */
    .nh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    /* 悬停浮层在触屏端隐藏 */
    .nh-item-pop {
        display: none !important;
    }
    /* 右侧榜单 */
    .nh-rightcard-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .nh-right-item,
    .nh-right-latest-item {
        min-height: 48px;
        padding: 8px 10px;
        touch-action: manipulation;
    }
    .nh-right-tab {
        min-height: 32px;
        padding: 4px 8px;
        touch-action: manipulation;
    }
    /* 详情页 */
    .nh-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .nh-title {
        font-size: 18px;
    }
    .nh-detail-actions {
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }
    .nh-detail-actions .nh-btn {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        min-height: 44px;
        white-space: nowrap;
        padding: 10px 8px;
        font-size: 13px;
        touch-action: manipulation;
        justify-content: center;
    }
    .nh-detail-actions .nh-qr-wrap {
        display: none;
    }
    .nh-detail-actions .nh-btn-qr {
        display: none !important;
    }
    .nh-related-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .nh-related-item {
        min-height: 52px;
        padding: 12px 14px;
        touch-action: manipulation;
    }
    #nh-chart {
        height: 220px;
    }
    .nh-page.nh-tool-page {
        margin: 8px auto 16px;
        padding: 0 10px;
    }
    .nh-tool-title { font-size: 17px; margin-bottom: 4px; }
    .nh-card .nh-tool-desc { margin-bottom: 10px; font-size: 12px; }
    .nh-card .nh-tool-card .form-group { margin-bottom: 8px; }
    .nh-card .nh-tool-card .form-group label { font-size: 12px; margin-bottom: 3px; }
    .nh-card .nh-tool-card .form-control { height: 34px; padding: 5px 8px; font-size: 16px; }
    .nh-card .nh-tool-card .btn { margin-top: 2px; padding: 8px 14px; min-height: 44px; }
    .nh-card .nh-tool-result { padding: 10px 12px; margin-top: 8px; }
    .nh-card .nh-tool-result-item { padding: 5px 0; font-size: 13px; }
    .nh-card .nh-tool-result-value { font-size: 14px; }
    .nh-card .nh-tool-card .border-top { padding-top: 10px; margin-top: 10px; }
    /* 分类页排序与分页 */
    .nh-cat-section-title {
        font-size: 15px;
    }
    #nh-category-main .d-flex.justify-content-between,
    .nh-main .nh-card > .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    #nh-category-main .btn-group .btn,
    .nh-main .btn-group .btn {
        min-height: 36px;
        padding: 6px 14px;
        touch-action: manipulation;
    }
    .pagination .page-link {
        min-width: 36px;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
}

/* 小屏手机额外收紧 */
@media (max-width: 576px) {
    .nh-header-inner {
        padding: 8px 10px;
    }
    .nh-page {
        padding: 0 8px;
        margin: 8px auto 20px;
    }
    .nh-card {
        padding: 14px 12px;
    }
    .nh-hero-search {
        padding: 14px 12px;
    }
    .nh-page:not(.nh-page-search) .nh-hero-searchbar {
        flex-direction: column;
        border-radius: 12px;
        padding: 8px;
        gap: 8px;
    }
    .nh-page:not(.nh-page-search) .nh-hero-searchbar input {
        width: 100%;
        padding: 10px 8px;
    }
    .nh-page:not(.nh-page-search) .nh-hero-search-btn {
        width: 100%;
        border-radius: 10px;
    }
    .nh-detail-actions .nh-btn {
        flex: 1 1 0;
        min-width: 0;
    }
    .nh-feedback-options {
        grid-template-columns: 1fr;
    }
}

/* ========== 搜索联想 / 历史 ========== */
.nh-hero-search-wrap {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    z-index: 30;
}
.nh-hero-search-wrap .nh-hero-searchbar {
    margin: 0;
    max-width: none;
}
.nh-search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}
.nh-search-panel[hidden] {
    display: none !important;
}
.nh-search-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 6px;
    font-size: 12px;
    color: #64748b;
}
.nh-search-clear-history {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.nh-search-list {
    list-style: none;
    margin: 0;
    padding: 0 0 6px;
}
.nh-search-list li {
    margin: 0;
}
.nh-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 9px 14px;
    font-size: 14px;
    color: #0f172a;
    text-decoration: none;
    cursor: pointer;
}
.nh-search-item:hover,
.nh-search-item.is-active {
    background: #f1f5f9;
}
.nh-search-suggest-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ========== 夜间模式开关 ========== */
.nh-theme-toggle {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 4px;
    line-height: 1;
}
.nh-theme-toggle:hover {
    background: #eef2ff;
    color: #2563eb;
    border-color: #c7d2fe;
}

/* ========== 夜间模式（深蓝分层，避免白底高亮） ========== */
html[data-nh-theme="dark"] {
    color-scheme: dark;
}
html[data-nh-theme="dark"] body {
    background-color: #0a0e17;
    color: #e5eaf3;
}
html[data-nh-theme="dark"] .nh-header,
html[data-nh-theme="dark"] .nh-header-nav-right,
html[data-nh-theme="dark"] .nh-header-nav > .nh-header-nav-right {
    background: #121826;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
html[data-nh-theme="dark"] .nh-header-nav > .nh-header-nav-right {
    box-shadow: -12px 0 12px -8px #121826;
    background: #121826;
}
html[data-nh-theme="dark"] .nh-header-logo,
html[data-nh-theme="dark"] .nh-hero-title,
html[data-nh-theme="dark"] .nh-section-title,
html[data-nh-theme="dark"] .nh-right-latest-title,
html[data-nh-theme="dark"] .nh-rightcard-title,
html[data-nh-theme="dark"] .nh-item-title,
html[data-nh-theme="dark"] .nh-right-title,
html[data-nh-theme="dark"] h1,
html[data-nh-theme="dark"] h2,
html[data-nh-theme="dark"] h3,
html[data-nh-theme="dark"] .h5 {
    color: #f3f6fb;
}
html[data-nh-theme="dark"] .nh-header-link,
html[data-nh-theme="dark"] .text-muted,
html[data-nh-theme="dark"] .small,
html[data-nh-theme="dark"] .nh-item-desc,
html[data-nh-theme="dark"] .nh-right-desc,
html[data-nh-theme="dark"] .nh-item-tags,
html[data-nh-theme="dark"] .nh-account-name {
    color: #8b97ad !important;
}
html[data-nh-theme="dark"] .nh-header-link:hover,
html[data-nh-theme="dark"] .nh-header-logo:hover {
    color: #7db4ff !important;
}
html[data-nh-theme="dark"] .nh-header-nav-sep {
    background: #2a3448;
}
html[data-nh-theme="dark"] .nh-header-user {
    color: #c9d4e8;
}

/* 面板：页底 #0a0e17 → 卡片 #151b28 → 内嵌块 #1a2233 */
html[data-nh-theme="dark"] .nh-hero-search,
html[data-nh-theme="dark"] .nh-card,
html[data-nh-theme="dark"] .nh-sidebar .nh-card,
html[data-nh-theme="dark"] .nh-cat-section,
html[data-nh-theme="dark"] .nh-search-panel,
html[data-nh-theme="dark"] .nh-taxonomy-selects {
    background: #151b28 !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    color: #e5eaf3;
}
html[data-nh-theme="dark"] .nh-rightcard {
    background: #151b28 !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    color: #e5eaf3;
}
html[data-nh-theme="dark"] .nh-right-latest {
    border-top-color: rgba(255, 255, 255, 0.08);
}

/* 站点卡片 */
html[data-nh-theme="dark"] .nh-item {
    background: #1a2233 !important;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: none;
    color: #e5eaf3;
}
html[data-nh-theme="dark"] .nh-item:hover {
    background: #222c40 !important;
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}
html[data-nh-theme="dark"] .nh-item-icon {
    background: #121826;
}

/* 搜索区 */
html[data-nh-theme="dark"] .nh-hero-searchbar {
    background: #0e1420 !important;
    border-color: #2a3448;
}
html[data-nh-theme="dark"] .nh-hero-searchbar input,
html[data-nh-theme="dark"] .nh-search-item {
    color: #f1f5f9;
}
html[data-nh-theme="dark"] .nh-hero-searchbar input::placeholder {
    color: #6b778f;
}
html[data-nh-theme="dark"] .nh-hero-engine {
    background: #1a2233;
    color: #aab6cb;
}
html[data-nh-theme="dark"] .nh-hero-engine.active {
    background: #2563eb;
    color: #ffffff;
}
html[data-nh-theme="dark"] .nh-hero-rec-item {
    color: #c9d4e8;
}
html[data-nh-theme="dark"] .nh-hero-rec-fallback {
    background: #1a2233;
    color: #8b97ad;
}
html[data-nh-theme="dark"] .nh-search-panel-head {
    color: #8b97ad;
}
html[data-nh-theme="dark"] .nh-search-clear-history {
    color: #7db4ff;
}
html[data-nh-theme="dark"] .nh-search-item:hover,
html[data-nh-theme="dark"] .nh-search-item.is-active {
    background: #1a2233;
}
html[data-nh-theme="dark"] .nh-hero-search:has(.nh-hero-rec)::before {
    background: linear-gradient(270deg, rgba(21, 27, 40, 0) 0%, #151b28 88%);
}
html[data-nh-theme="dark"] .nh-hero-search:has(.nh-hero-rec)::after {
    background: linear-gradient(90deg, rgba(21, 27, 40, 0) 0%, #151b28 88%);
}

/* 左侧分类：去掉日间白/浅紫底 */
html[data-nh-theme="dark"] .nh-cat-row:hover,
html[data-nh-theme="dark"] .nh-cat-item-top.is-expanded > .nh-cat-row {
    background: rgba(255, 255, 255, 0.04) !important;
}
html[data-nh-theme="dark"] .nh-cat-item-top:has(.nh-cat-link.active) > .nh-cat-row {
    background: rgba(37, 99, 235, 0.18) !important;
}
html[data-nh-theme="dark"] .nh-cat-item-top .nh-cat-link,
html[data-nh-theme="dark"] .nh-cat-sublink,
html[data-nh-theme="dark"] .nh-cattree-l2enter,
html[data-nh-theme="dark"] .nh-cattree-l3jump,
html[data-nh-theme="dark"] .nh-cattree-branch-label,
html[data-nh-theme="dark"] .nh-cattree-head-title {
    color: #c9d4e8 !important;
    background: transparent !important;
}
html[data-nh-theme="dark"] .nh-cat-item-top .nh-cat-link:hover,
html[data-nh-theme="dark"] .nh-cat-sublink:hover,
html[data-nh-theme="dark"] .nh-cattree-l2enter:hover {
    color: #f3f6fb !important;
    background: rgba(255, 255, 255, 0.04) !important;
}
html[data-nh-theme="dark"] .nh-cat-item-top .nh-cat-link.active,
html[data-nh-theme="dark"] .nh-cat-sublink.active,
html[data-nh-theme="dark"] .nh-cattree-l3jump.active,
html[data-nh-theme="dark"] .nh-cattree-l4pick.active,
html[data-nh-theme="dark"] a.nh-cattree-filter.active {
    color: #7db4ff !important;
    font-weight: 600;
    background: rgba(37, 99, 235, 0.16) !important;
}
html[data-nh-theme="dark"] .nh-cat-toggle::before,
html[data-nh-theme="dark"] .nh-cattree-l2enter-arrow {
    border-color: #6b778f;
}
html[data-nh-theme="dark"] .nh-cattree-back {
    color: #8b97ad;
}
html[data-nh-theme="dark"] .nh-cattree-back:hover {
    color: #7db4ff;
}

/* 分类标签 pill */
html[data-nh-theme="dark"] .nh-group-tab {
    background: #1a2233 !important;
    color: #aab6cb !important;
    border: 1px solid transparent;
}
html[data-nh-theme="dark"] .nh-group-tab:hover {
    background: #222c40 !important;
    color: #e5eaf3 !important;
}
html[data-nh-theme="dark"] .nh-group-tab.active {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb;
}
html[data-nh-theme="dark"] .nh-group-tabs-more-btn {
    background: rgba(37, 99, 235, 0.14) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #7db4ff !important;
}
html[data-nh-theme="dark"] .nh-group-tabs-more-btn:hover,
html[data-nh-theme="dark"] a.nh-group-tabs-more-btn:hover {
    background: rgba(37, 99, 235, 0.28) !important;
    color: #bfdbfe !important;
    border-color: #3b82f6 !important;
}

/* 右侧热门：覆盖日间白底列表项 */
html[data-nh-theme="dark"] .nh-right-item {
    background: #1a2233 !important;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
html[data-nh-theme="dark"] .nh-right-item:hover {
    background: #222c40 !important;
    border-color: rgba(59, 130, 246, 0.3);
}
html[data-nh-theme="dark"] .nh-right-rank {
    color: #60a5fa;
}
html[data-nh-theme="dark"] .nh-right-icon {
    background: #121826 !important;
}
html[data-nh-theme="dark"] .nh-right-latest-item {
    background: #1a2233 !important;
    color: #c9d4e8;
}
html[data-nh-theme="dark"] .nh-right-latest-item:hover {
    background: #222c40 !important;
}
html[data-nh-theme="dark"] .nh-right-tab {
    color: #8b97ad;
}
html[data-nh-theme="dark"] .nh-right-tab.active {
    color: #7db4ff;
}
html[data-nh-theme="dark"] .nh-right-tab.active::after {
    background: #2563eb;
}

/* 其它控件 */
html[data-nh-theme="dark"] .nh-theme-toggle {
    background: #1a2233;
    border-color: #2a3448;
    color: #e5eaf3;
}
html[data-nh-theme="dark"] .nh-theme-toggle:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}
html[data-nh-theme="dark"] .nh-header-link-reg {
    background: #2563eb;
}
html[data-nh-theme="dark"] .nh-btn,
html[data-nh-theme="dark"] .nh-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
html[data-nh-theme="dark"] .nh-btn-fav-warm,
html[data-nh-theme="dark"] .btn-outline-secondary {
    color: #c9d4e8 !important;
    border-color: #3a465c !important;
    background: transparent !important;
}
html[data-nh-theme="dark"] .btn-outline-secondary:hover {
    background: #1a2233 !important;
    color: #fff !important;
}
html[data-nh-theme="dark"] .pagination .page-link {
    background: #151b28;
    border-color: #2a3448;
    color: #c9d4e8;
}
html[data-nh-theme="dark"] .pagination .page-item.active .page-link {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
html[data-nh-theme="dark"] .pagination .page-item.disabled .page-link {
    background: #121826;
    color: #5b6780;
}
html[data-nh-theme="dark"] .nh-account-menu {
    background: #151b28;
    border-color: #2a3448;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
html[data-nh-theme="dark"] .nh-account-menu .nh-header-link:hover {
    background: #1a2233;
}
html[data-nh-theme="dark"] .nh-account-name {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
html[data-nh-theme="dark"] .nh-cat-filter-tree-item {
    background: #1a2233;
    border-color: #2a3448;
    color: #c9d4e8;
}
html[data-nh-theme="dark"] .nh-cat-filter-tree-item:hover,
html[data-nh-theme="dark"] .nh-cat-filter-tree-item.is-active {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(59, 130, 246, 0.45);
    color: #7db4ff;
}
html[data-nh-theme="dark"] .form-control,
html[data-nh-theme="dark"] input.form-control,
html[data-nh-theme="dark"] textarea.form-control,
html[data-nh-theme="dark"] select.form-control {
    background-color: #0e1420;
    border-color: #2a3448;
    color: #e5eaf3;
}
html[data-nh-theme="dark"] .form-control:focus {
    background-color: #0e1420;
    border-color: #3b82f6;
    color: #e5eaf3;
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.25);
}
html[data-nh-theme="dark"] .nh-detail-actions .nh-btn,
html[data-nh-theme="dark"] .nh-tool-back {
    color: #c9d4e8;
}
html[data-nh-theme="dark"] a:not(.nh-header-link-reg):not(.nh-btn-primary):not(.page-link) {
    color: inherit;
}

/* 详情页：相关导航（避免白底卡片） */
html[data-nh-theme="dark"] .nh-related-item {
    background: #1a2233 !important;
    color: #e5eaf3 !important;
    border: 1px solid #2a3448;
    box-shadow: none;
}
html[data-nh-theme="dark"] .nh-related-item:hover {
    background: #243044 !important;
    border-color: #3b82f6;
}
html[data-nh-theme="dark"] .nh-related-title {
    color: #e5eaf3 !important;
}
html[data-nh-theme="dark"] .nh-related-desc {
    color: #8b9bb4 !important;
}
html[data-nh-theme="dark"] .nh-related-icon {
    background: #0e1420 !important;
}
html[data-nh-theme="dark"] .nh-detail-meta,
html[data-nh-theme="dark"] .nh-tags {
    color: #8b9bb4;
}
html[data-nh-theme="dark"] #nh-chart {
    filter: none;
}
