/* Top-level site categories exposed from the child-theme taxonomy. */
.yuanzhan-nav-widget-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.yuanzhan-nav-widget-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 70px;
    padding: 6px 3px;
    border-radius: 7px;
    color: var(--muted-color);
    text-align: center;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease;
}

.yuanzhan-nav-widget-category-item:hover,
.yuanzhan-nav-widget-category-item:focus {
    background: var(--focus-color-opacity1);
    color: var(--focus-color);
}

.yuanzhan-nav-widget-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
    border-radius: 8px;
    background: var(--this-bg, var(--muted-border-color));
    color: var(--this-color, var(--focus-color));
    font-size: 15px;
}

.yuanzhan-nav-widget-category-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yuanzhan-nav-widget-categories-left li > a {
    min-width: 0;
}

.yuanzhan-nav-widget-categories-left .yuanzhan-nav-widget-category-icon {
    width: 24px;
    height: 24px;
    margin: 0 8px 0 0;
    border-radius: 7px;
    font-size: 12px;
}

.yuanzhan-nav-widget-categories-left .yuanzhan-nav-widget-category-icon + .text-ellipsis {
    min-width: 0;
}

.yuanzhan-nav-secondary-nav {
    position: relative;
    z-index: 30;
}

/* Keep the category trigger visually separate from the first native menu item. */
.yuanzhan-nav-secondary-desktop {
    margin-right: 12px;
}

.yuanzhan-nav-secondary-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 10px !important;
    line-height: 1;
}

.yuanzhan-nav-secondary-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 18px;
}

.yuanzhan-nav-secondary-trigger-text {
    display: none;
}

.yuanzhan-nav-secondary-panel {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    width: 420px;
    max-width: min(420px, calc(100vw - 30px));
    padding: 12px;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    background: var(--main-bg-color);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.yuanzhan-nav-secondary-nav:hover > .yuanzhan-nav-secondary-panel,
.yuanzhan-nav-secondary-nav:focus-within > .yuanzhan-nav-secondary-panel,
.yuanzhan-nav-secondary-nav.yuanzhan-nav-secondary-open > .yuanzhan-nav-secondary-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.yuanzhan-nav-secondary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.yuanzhan-nav-secondary-item {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 76px;
    max-height: none !important;
    padding: 7px 4px !important;
    border-radius: 7px;
    color: var(--muted-color) !important;
    text-align: center;
    transition: background-color .16s ease, color .16s ease;
}

.yuanzhan-nav-secondary-item:hover,
.yuanzhan-nav-secondary-item:focus,
.yuanzhan-nav-secondary-item.is-active {
    background: var(--focus-color-opacity1);
    color: var(--focus-color) !important;
}

.yuanzhan-nav-secondary-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 5px;
    border-radius: 10px;
    background: var(--this-bg, var(--muted-border-color));
    color: var(--this-color, var(--focus-color));
    font-size: 18px;
}

.yuanzhan-nav-secondary-item-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .yuanzhan-nav-widget-categories-grid {
        gap: 4px;
    }

    .yuanzhan-nav-widget-category-item {
        min-height: 64px;
    }

    .yuanzhan-nav-secondary-mobile {
        width: 100%;
    }

    .yuanzhan-nav-secondary-mobile > .yuanzhan-nav-secondary-trigger {
        width: 100%;
        justify-content: flex-start;
        min-height: 42px;
        padding: 10px 15px !important;
        color: var(--main-color) !important;
    }

    .yuanzhan-nav-secondary-mobile .yuanzhan-nav-secondary-trigger-text {
        display: inline;
        margin-left: 8px;
        font-size: 14px;
    }

    .yuanzhan-nav-secondary-mobile > .yuanzhan-nav-secondary-panel {
        position: static;
        width: auto;
        max-width: none;
        margin: 0 10px 10px;
        padding: 8px;
        box-shadow: none;
        transform: none;
    }

    .yuanzhan-nav-secondary-mobile:not(.yuanzhan-nav-secondary-open) > .yuanzhan-nav-secondary-panel {
        display: none;
    }

    .yuanzhan-nav-secondary-mobile > .yuanzhan-nav-secondary-panel,
    .yuanzhan-nav-secondary-mobile.yuanzhan-nav-secondary-open > .yuanzhan-nav-secondary-panel {
        opacity: 1;
        visibility: visible;
    }

    .yuanzhan-nav-secondary-mobile .yuanzhan-nav-secondary-item {
        min-height: 68px;
    }
}

/* Release the parent sidebar margin from explicit rendered state, not DOM position. */
.site-layout-2 .yuanzhan-nav-layout.no-sidebar > .content-wrap > .content-layout {
    margin-right: 0;
}

.site-layout-3 .yuanzhan-nav-layout.no-sidebar > .content-wrap > .content-layout {
    margin-left: 0;
}

/* Give the desktop home category rail enough room for natural Chinese labels. */
@media (min-width: 768px) {
    .yuanzhan-nav-layout-dual-sidebar > .content-wrap > .content-layout > .fixed-wrap {
        --fixed-width: 160px;
    }
}

/* Keep archive pages compact while retaining the parent theme's components. */
.yuanzhan-nav-archive-header {
    margin-bottom: 12px;
}

.yuanzhan-nav-archive-header .title-h-left {
    margin-top: 0;
}

.yuanzhan-nav-archive-filter {
    margin-bottom: 12px;
    padding: 8px 12px;
}

.yuanzhan-nav-archive-filter > .flex {
    min-width: 0;
    min-height: 32px;
}

.yuanzhan-nav-archive-filter > .flex + .flex {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--main-border-color);
}

.yuanzhan-nav-archive-filter .option-items {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 6px;
}

.yuanzhan-nav-archive-list .yuanzhan-nav-card > .js-yuanzhan-private-quick.img-badge {
    top: 9px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    padding: 0;
    border-radius: 14px 0 0 14px;
    box-shadow: none;
    opacity: .55;
}

.yuanzhan-nav-archive-list .yuanzhan-nav-card:hover > .js-yuanzhan-private-quick.img-badge,
.yuanzhan-nav-archive-list .yuanzhan-nav-card:focus-within > .js-yuanzhan-private-quick.img-badge,
.yuanzhan-nav-archive-list .js-yuanzhan-private-quick.img-badge.actived {
    opacity: 1;
}

/* 热门网址侧栏使用独立的紧凑两列卡片，不改变首页和归档列表。 */
.yuanzhan-nav-sidebar-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
}

.yuanzhan-nav-sidebar-list > .yuanzhan-nav-card {
    box-sizing: border-box;
    width: auto !important;
    min-width: 0;
    min-height: 54px;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 7px;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-width: 0;
    min-height: 54px;
    padding: 7px 34px 7px 8px;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-desktop,
.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-desktop > .list-inline {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-desktop > .list-inline {
    margin: 0;
    padding: 0;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-desktop > .list-inline > li {
    padding: 0;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-desktop > .list-inline > li:first-child {
    flex: 0 0 36px;
    width: 36px;
    min-width: 36px;
    margin-right: 8px;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-desktop > .list-inline > li:last-child {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main .link-img,
.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main .link-img img {
    box-sizing: border-box;
    width: 36px;
    height: 36px;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main .link-img {
    margin: 0;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main .link-img img {
    object-fit: contain;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main dl,
.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main dt {
    min-width: 0;
    max-width: 100%;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main dt {
    display: block;
    overflow: hidden;
    font-size: 14px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card > .js-yuanzhan-private-quick.img-badge {
    top: 50%;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border-radius: 50%;
    box-shadow: none;
    font-size: 12px;
    line-height: 22px;
    opacity: .82;
    transform: translateY(-50%);
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card:hover > .js-yuanzhan-private-quick.img-badge,
.yuanzhan-nav-sidebar-list .yuanzhan-nav-card:focus-within > .js-yuanzhan-private-quick.img-badge,
.yuanzhan-nav-sidebar-list .js-yuanzhan-private-quick.img-badge.actived {
    opacity: 1;
}

.yuanzhan-nav-sidebar-list .yuanzhan-nav-card:hover {
    background: var(--muted-border-color);
}

/* Keep the quick-navigation cards in a stable grid instead of inheriting float-column offsets. */
.yuanzhan-nav-home-quick {
    box-sizing: border-box;
    width: 100%;
}

.yuanzhan-nav-home-quick > .tab-nav-theme {
    display: flex;
    justify-content: center;
}

.yuanzhan-nav-home-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.yuanzhan-nav-home-quick-grid::before,
.yuanzhan-nav-home-quick-grid::after {
    display: none;
}

.yuanzhan-nav-home-quick-grid > .yuanzhan-nav-home-quick-item {
    float: none;
    width: auto;
    min-width: 0;
    padding: 0;
}

.yuanzhan-nav-home-quick-grid > .yuanzhan-nav-home-quick-item > .zib-widget {
    min-height: 68px;
    margin: 0;
}

/* Share, translation and report tools sit in one compact preview toolbar. */
.yuanzhan-nav-site-preview-tools {
    position: absolute;
    z-index: 4;
    top: 12px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    max-width: calc(100% - 28px);
    padding: 3px 4px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    background: rgba(21, 29, 42, .78);
    color: #fff;
}

.yuanzhan-nav-site-preview-tools > .item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 28px;
    min-height: 28px;
    padding: 0 7px;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.yuanzhan-nav-site-preview-tools > .item text {
    margin-left: 4px;
}

.yuanzhan-nav-site-preview-tools > .item:hover,
.yuanzhan-nav-site-preview-tools > .item:focus {
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

.yuanzhan-nav-site-preview-tools > .language-dropdown {
    position: relative;
    padding: 0;
}

.yuanzhan-nav-site-preview-tools > .language-dropdown > .toggle-radius {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: 28px;
    height: 28px;
    margin: 0 !important;
    color: #fff;
    background: transparent;
}

.yuanzhan-nav-site-preview-tools > .language-dropdown > .toggle-radius > .icon,
.yuanzhan-nav-site-preview-tools > .language-dropdown > .toggle-radius > svg {
    position: static;
    width: 1em;
    height: 1em;
    margin: 0;
    opacity: 1 !important;
    visibility: visible !important;
    color: currentColor;
    fill: currentColor;
    transform: none;
}

.yuanzhan-nav-site-preview-actions {
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    max-width: min(44vw, 430px);
    min-width: 0;
    min-height: 42px;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.yuanzhan-nav-site-preview-actions::-webkit-scrollbar {
    display: none;
}

.yuanzhan-nav-site-preview-actions .but {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    height: 42px;
    min-height: 42px;
    margin: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    border-color: rgba(255, 255, 255, .1);
    border-radius: 6px;
    color: rgba(255, 255, 255, .86);
    background: rgba(255, 255, 255, .08);
    --this-color: rgba(255, 255, 255, .86);
    --this-bg: rgba(255, 255, 255, .08);
}

.yuanzhan-nav-site-preview-actions .yuanzhan-nav-qrcode-trigger {
    width: 42px;
    min-width: 42px;
    padding-right: 0;
    padding-left: 0;
}

.yuanzhan-nav-site-preview-actions .yuanzhan-nav-qrcode-trigger > .fa {
    margin: 0 !important;
    line-height: 1;
}

.yuanzhan-nav-site-preview-actions > .yuanzhan-nav-interactions {
    align-items: center;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.yuanzhan-nav-site-preview-actions .yuanzhan-nav-interaction > .icon,
.yuanzhan-nav-site-preview-actions .yuanzhan-nav-interaction > svg,
.yuanzhan-nav-site-preview-actions .yuanzhan-nav-interaction > .fa {
    flex: 0 0 auto;
    vertical-align: 0;
}

.yuanzhan-nav-site-preview-actions .yuanzhan-nav-interaction > text,
.yuanzhan-nav-site-preview-actions .yuanzhan-nav-interaction > count {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.yuanzhan-nav-site-preview-actions .but:hover,
.yuanzhan-nav-site-preview-actions .but:focus {
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.yuanzhan-nav-site-preview-actions .yuanzhan-nav-preview-visit {
    display: none;
}

@media (max-width: 767px) {
    .yuanzhan-nav-sidebar-list {
        gap: 4px;
    }

    .yuanzhan-nav-sidebar-list > .yuanzhan-nav-card,
    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main {
        min-height: 50px;
    }

    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main {
        padding: 6px 8px;
    }

    .yuanzhan-nav-home-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-mobile,
    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-mobile > .border-box {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
    }

    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-mobile > .border-box {
        min-height: 38px;
        padding: 0;
        border: 0;
    }

    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-mobile > .border-box > .badg,
    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-mobile .avatar-img,
    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-mobile .avatar-img img {
        width: 32px;
        min-width: 32px;
        height: 32px;
    }

    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-mobile b {
        min-width: 0;
    }

    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-desktop > .list-inline > li:first-child,
    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main .link-img,
    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main .link-img img {
        flex-basis: 32px;
        width: 32px;
        min-width: 32px;
        height: 32px;
    }

    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-desktop > .list-inline > li:first-child {
        margin-right: 7px;
    }

    .yuanzhan-nav-sidebar-list .yuanzhan-nav-card-main dt {
        font-size: 13px;
    }
}

@media (min-width: 992px) {
    .yuanzhan-nav-layout-archive > .content-wrap:last-child .yuanzhan-nav-archive-list .links-style-card > .yuanzhan-nav-card,
    .yuanzhan-nav-layout-favorite > .content-wrap:last-child .yuanzhan-nav-archive-list .links-style-card > .yuanzhan-nav-card,
    .yuanzhan-nav-layout-sitetag > .content-wrap:last-child .yuanzhan-nav-archive-list .links-style-card > .yuanzhan-nav-card {
        width: calc(25% - 10px);
    }
}

/*
 * 手机端网址列表消除父主题 inline-block 间隙，并覆盖默认的两列宽度。
 * 图标、边框、颜色、圆角、间距和文字省略全部使用子比原生类。
 * 网格不使用父主题的负边距，避免全宽容器在手机端产生右侧溢出。
 */
@media (max-width: 767px) {
    .yuanzhan-nav-grid.links-box:not(.zib-widget):not(.links-style-simple):not(.links-style-image) {
        display: flex;
        flex-wrap: wrap;
        margin: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .yuanzhan-nav-grid.links-box:not(.zib-widget):not(.links-style-simple):not(.links-style-image) > .yuanzhan-nav-card {
        box-sizing: border-box;
        width: calc(33.333333% - 8px);
        min-width: 0;
        margin: 4px;
        padding: 0;
        overflow: hidden;
    }

    .yuanzhan-nav-grid.links-box:not(.zib-widget):not(.links-style-simple):not(.links-style-image) .yuanzhan-nav-card-main {
        display: block;
        min-width: 0;
    }

    .yuanzhan-nav-grid.links-box:not(.zib-widget):not(.links-style-simple):not(.links-style-image) .yuanzhan-nav-card-mobile,
    .yuanzhan-nav-grid.links-box:not(.zib-widget):not(.links-style-simple):not(.links-style-image) .yuanzhan-nav-card-mobile > .border-box {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        min-height: 40px;
    }

    .yuanzhan-nav-grid.links-box:not(.zib-widget):not(.links-style-simple):not(.links-style-image) .yuanzhan-nav-card-mobile > .border-box > .badg,
    .yuanzhan-nav-grid.links-box:not(.zib-widget):not(.links-style-simple):not(.links-style-image) .yuanzhan-nav-card-mobile .avatar-img,
    .yuanzhan-nav-grid.links-box:not(.zib-widget):not(.links-style-simple):not(.links-style-image) .yuanzhan-nav-card-mobile .avatar-img img {
        width: 28px;
        height: 28px;
    }

    .yuanzhan-nav-grid.links-box:not(.zib-widget):not(.links-style-simple):not(.links-style-image) .yuanzhan-nav-card-mobile b {
        min-width: 0;
    }
}

/* Separate the quick tools while preserving the parent hover-menu protocol. */
.yuanzhan-nav-header-tools {
    column-gap: 6px;
}

.yuanzhan-nav-header-tools > .yuanzhan-nav-header-tool-item > .yuanzhan-nav-header-tool-menu {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.yuanzhan-nav-header-tools > .yuanzhan-nav-header-tool-item:first-child > .yuanzhan-nav-header-tool-menu {
    left: 0;
    transform: none;
}

.yuanzhan-nav-header-tools > .yuanzhan-nav-header-tool-item:last-child > .yuanzhan-nav-header-tool-menu {
    right: 0;
    left: auto;
    transform: none;
}

.yuanzhan-nav-header-tools > .yuanzhan-nav-header-tool-item:hover > a,
.yuanzhan-nav-header-tools > .yuanzhan-nav-header-tool-item:focus-within > a {
    color: var(--focus-color);
    background: var(--focus-color-opacity1);
}

.yuanzhan-nav-site-weight {
    min-width: 0;
    padding: 14px 16px;
}

.yuanzhan-nav-remote-panel-loading {
    min-height: 64px;
    color: var(--main-color);
}

.yuanzhan-nav-remote-panel-loading > .flex {
    min-height: 36px;
}

.yuanzhan-nav-remote-panel-loading.is-error .loading {
    display: none;
}

.yuanzhan-nav-remote-panel-loading.is-error {
    opacity: .72;
}

.yuanzhan-nav-site-weight-head {
    min-width: 0;
}

.yuanzhan-nav-site-weight-title-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 5px !important;
    font-size: 15px;
}

.yuanzhan-nav-site-weight-title-icon + .title-theme {
    padding-left: 0;
}

.yuanzhan-nav-site-weight-title-icon + .title-theme::before {
    display: none;
}

.yuanzhan-nav-site-weight-head .yuanzhan-nav-site-weight-refresh {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 5px;
}

.yuanzhan-nav-site-weight-refresh.is-loading i {
    animation: yuanzhan-nav-site-weight-spin .8s linear infinite;
}

.yuanzhan-nav-site-weight-metrics {
    display: flex !important;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    margin-top: 8px !important;
    overflow: visible;
    overscroll-behavior-inline: contain;
    padding-bottom: 1px;
}

.yuanzhan-nav-site-weight-metric {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 1 1 128px;
    max-width: 160px;
    gap: 6px;
    min-width: 112px;
    min-height: 44px !important;
    padding: 6px 8px !important;
    border-radius: 6px;
    background: var(--muted-border-color);
}

.yuanzhan-nav-site-weight-logo,
.yuanzhan-nav-site-weight-value {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.yuanzhan-nav-site-weight-logo {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--main-bg-color);
}

.yuanzhan-nav-site-weight-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
}

.yuanzhan-nav-site-weight-value {
    flex: 0 0 auto;
    min-width: 28px;
    height: 24px;
    padding: 0 7px;
    border-radius: 4px;
    line-height: 24px;
}

/* 兼容旧版已缓存的“图标 + 数值”权重 DOM。 */
.yuanzhan-nav-site-weight-badge {
    display: flex;
    align-items: stretch;
    width: 84px;
    height: 28px;
    overflow: hidden;
    border-radius: 4px;
}

.yuanzhan-nav-site-weight-badge .yuanzhan-nav-site-weight-logo {
    flex-basis: 34px;
    width: 34px;
    height: 28px;
    border-radius: 4px 0 0 4px;
}

.yuanzhan-nav-site-weight-badge .yuanzhan-nav-site-weight-value {
    flex: 1 1 auto;
    height: 28px;
    border-radius: 0 4px 4px 0;
    line-height: 28px;
}

@keyframes yuanzhan-nav-site-weight-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 767px) {
    .yuanzhan-nav-site-weight-metric {
        flex: 1 1 118px;
        min-width: 108px;
        max-width: none;
        min-height: 42px !important;
        padding: 5px 7px !important;
    }

    .yuanzhan-nav-site-weight {
        padding: 12px;
    }

    .yuanzhan-nav-site-weight-label {
        font-size: 12px;
    }
}

.yuanzhan-nav-connectivity-title-icon {
    width: 52px;
    height: 52px;
}

.yuanzhan-nav-connectivity-refresh {
    flex: 0 0 auto;
}

.yuanzhan-nav-connectivity-refresh.is-loading i {
    animation: yuanzhan-nav-site-weight-spin .8s linear infinite;
}

.yuanzhan-nav-connectivity-summary {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1.5fr);
    align-items: center;
    gap: 20px;
}

.yuanzhan-nav-connectivity-state {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.yuanzhan-nav-connectivity-state-icon {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    box-shadow: inset 0 0 0 1px var(--this-color);
}

.yuanzhan-nav-connectivity-latency-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.yuanzhan-nav-connectivity-latency {
    min-height: 104px;
    padding: 16px 12px;
    text-align: center;
    background: var(--muted-border-color);
}

.yuanzhan-nav-connectivity-latency.c-green {
    background: var(--this-bg);
    box-shadow: inset 0 0 0 1px var(--this-color);
}

.yuanzhan-nav-connectivity-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: var(--muted-border-color);
}

.yuanzhan-nav-connectivity-info-item {
    min-width: 0;
    padding: 14px 15px;
    background: var(--main-bg-color);
}

.yuanzhan-nav-connectivity-info-label {
    display: block;
    margin-bottom: 8px;
}

.yuanzhan-nav-connectivity-info-value {
    display: block;
    font-weight: 600;
}

@media (max-width: 767px) {
    .yuanzhan-nav-connectivity-summary {
        grid-template-columns: 1fr;
    }

    .yuanzhan-nav-connectivity-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .yuanzhan-nav-connectivity-head {
        align-items: flex-start;
    }

    .yuanzhan-nav-connectivity-refresh span {
        display: none;
    }

    .yuanzhan-nav-connectivity-refresh {
        width: 40px;
        height: 40px;
        padding: 0;
    }

    .yuanzhan-nav-connectivity-title-icon {
        width: 44px;
        height: 44px;
    }

    .yuanzhan-nav-connectivity-state {
        gap: 12px;
    }

    .yuanzhan-nav-connectivity-state-icon {
        flex-basis: 58px;
        width: 58px;
        height: 58px;
    }

    .yuanzhan-nav-connectivity-latency-grid {
        gap: 6px;
    }

    .yuanzhan-nav-connectivity-latency {
        padding-left: 4px;
        padding-right: 4px;
    }

    .yuanzhan-nav-connectivity-info-item {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Compact native detail panels: keep all metrics on one readable row. */
.yuanzhan-nav-site-connectivity,
.yuanzhan-nav-site-weight {
    min-width: 0;
}

.yuanzhan-nav-connectivity-summary {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.yuanzhan-nav-connectivity-summary-text {
    flex: 1 1 220px;
    min-width: 0;
}

.yuanzhan-nav-connectivity-latency-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 1 1 420px;
    gap: 6px;
    min-width: 0;
}

.yuanzhan-nav-connectivity-latency {
    min-height: 0 !important;
    padding: 7px 9px !important;
    border-radius: 6px;
    background: var(--muted-border-color);
}

.yuanzhan-nav-connectivity-info-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    min-width: 0;
}

.yuanzhan-nav-connectivity-info-item {
    min-width: 0;
    padding: 7px 9px !important;
}

.yuanzhan-nav-connectivity-info-label {
    display: inline-block;
    margin: 0 6px 0 0;
}

.yuanzhan-nav-connectivity-info-value {
    display: inline;
    max-width: 100%;
}

/* The preview image is cropped continuously instead of jumping at breakpoints. */
.yuanzhan-nav-site-preview .yuanzhan-nav-site-preview-image {
    display: block;
    width: 100%;
    height: clamp(220px, 34vw, 400px) !important;
    max-height: 400px;
    object-fit: cover;
    object-position: center top;
}

@media (max-width: 767px) {
    .yuanzhan-nav-connectivity-summary {
        display: block !important;
    }

    .yuanzhan-nav-connectivity-summary-text {
        display: block;
        margin-bottom: 8px;
    }

    .yuanzhan-nav-connectivity-latency-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .yuanzhan-nav-connectivity-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .yuanzhan-nav-site-preview .yuanzhan-nav-site-preview-image {
        height: 180px !important;
        max-height: 180px;
    }
}

@media (max-width: 420px) {
    .yuanzhan-nav-connectivity-latency-grid {
        gap: 4px;
    }

    .yuanzhan-nav-connectivity-latency {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}

/* Compact, native connectivity panel for the website detail page. */
.yuanzhan-nav-site-connectivity {
    min-width: 0;
    padding: 14px 16px;
    overflow: hidden;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-head {
    min-width: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--main-border-color);
}

.yuanzhan-nav-connectivity-heading,
.yuanzhan-nav-connectivity-heading-text,
.yuanzhan-nav-connectivity-state-text {
    min-width: 0;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-title-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    font-size: 16px;
}

.yuanzhan-nav-connectivity-title {
    overflow: hidden;
    font-size: 17px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.yuanzhan-nav-connectivity-subtitle {
    overflow: hidden;
    margin-top: 2px;
    line-height: 1.45;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-refresh {
    flex: 0 0 auto;
    min-width: 0;
    height: 34px;
    padding: 0 11px;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-summary {
    display: grid !important;
    grid-template-columns: minmax(220px, .9fr) minmax(0, 1.6fr);
    align-items: stretch;
    gap: 10px;
    min-width: 0;
    margin-top: 12px;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-state {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 62px;
    padding: 9px 11px;
    border-radius: 6px;
    background: var(--muted-border-color);
}

.yuanzhan-nav-connectivity-state-mark {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    font-size: 15px;
}

.yuanzhan-nav-connectivity-status {
    font-size: 16px;
    line-height: 1.35;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-summary-text {
    margin-top: 3px;
    line-height: 1.45;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-latency-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-latency {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 62px !important;
    padding: 8px !important;
    border-radius: 6px;
    text-align: center;
    background: var(--muted-border-color);
    box-shadow: none;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-latency.c-green {
    background: var(--this-bg);
    box-shadow: none;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-latency b {
    font-size: 16px;
    line-height: 1.25;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    margin-top: 8px;
    overflow: visible;
    background: transparent;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-item {
    min-width: 0;
    min-height: 34px;
    padding: 6px 8px !important;
    border-radius: 6px;
    background: var(--muted-border-color);
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-label {
    display: inline-block;
    margin: 0 4px 0 0;
    font-size: 12px;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-value {
    display: block;
    min-width: 0;
    max-width: 100%;
    font-size: 12px;
    font-weight: 600;
}

.yuanzhan-nav-connectivity-note {
    margin-top: 6px;
    line-height: 1.4;
}

@media (max-width: 767px) {
    .yuanzhan-nav-site-connectivity {
        padding: 12px;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-head {
        align-items: center;
        padding-bottom: 10px;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-title-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .yuanzhan-nav-connectivity-title {
        font-size: 15px;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-refresh {
        width: 34px;
        height: 34px;
        padding: 0;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-refresh i {
        margin-right: 0;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-refresh span {
        display: none;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-summary {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px;
        margin-top: 10px;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-state {
        min-height: 54px;
        padding: 7px 9px;
    }

    .yuanzhan-nav-connectivity-state-mark {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-latency-grid {
        gap: 5px;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-latency {
        min-height: 52px !important;
        padding: 6px 4px !important;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-latency b {
        font-size: 14px;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }
}

@media (max-width: 420px) {
    .yuanzhan-nav-connectivity-subtitle {
        display: none;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-latency span,
    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-latency small {
        font-size: 11px;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-label {
        max-width: 42%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

.yuanzhan-nav-friend-links .yuanzhan-friend-url-group {
    width: 100%;
}

.yuanzhan-nav-advert-page-wrap {
    margin-top: 20px;
    margin-bottom: 20px;
}

.yuanzhan-nav-advert-page-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.yuanzhan-nav-advert-page-card {
    min-width: 0;
    padding: 16px;
}

.yuanzhan-nav-advert-page-plans {
    margin-left: 0;
    padding-left: 0;
    list-style: none;
}

.yuanzhan-nav-advert-page-plans li {
    padding: 6px 0;
}

/* Parent main-min-height uses a fixed footer estimate. Navigation pages add
 * their own bottom widgets, so keep the actual parent footer at the viewport edge. */
body.yuanzhan-navigation-sticky-footer {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-x: clip;
}

html.yuanzhan-navigation-root {
    overflow-x: hidden;
    overflow-x: clip;
}

body.yuanzhan-navigation-sticky-footer > .footer {
    margin-top: auto;
    flex: 0 0 auto;
}

.yuanzhan-nav-advert-location-nav_footer .new-swiper {
    height: 32px !important;
    min-height: 0 !important;
    max-height: 32px !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    aspect-ratio: auto !important;
    overflow: hidden;
}

.yuanzhan-nav-advert-location-nav_footer .new-swiper .swiper-wrapper,
.yuanzhan-nav-advert-location-nav_footer .new-swiper .swiper-slide {
    height: 32px !important;
    min-height: 0 !important;
    max-height: 32px !important;
}

.yuanzhan-nav-advert-location-nav_footer .swiper-slide img {
    width: 100%;
    height: 100% !important;
    max-height: 32px !important;
    object-fit: cover;
}

.yuanzhan-nav-advert-location-nav_footer .yuanzhan-nav-footer-placeholder {
    height: 32px !important;
    min-height: 0 !important;
    max-height: 32px !important;
    padding: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    aspect-ratio: auto !important;
}

.yuanzhan-nav-advert-location-nav_footer.widget-advert {
    min-height: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

@media (min-width: 992px) {
    .header-slider-container.yuanzhan-nav-home-advert-host {
        position: relative;
    }

    .header-slider-container > .yuanzhan-nav-home-advert-layer {
        top: auto !important;
        right: 0 !important;
        bottom: 20px !important;
        left: 0 !important;
        z-index: 4;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        pointer-events: none;
    }

    .header-slider-container > .yuanzhan-nav-home-advert-layer.is-loading {
        visibility: hidden;
    }

    .yuanzhan-nav-home-advert-layer > [data-yuanzhan-home-advert-overlay] {
        pointer-events: auto;
    }

    .yuanzhan-nav-home-advert-layer .yuanzhan-nav-advert-location-home_search.widget-advert {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 991px) {
    .yuanzhan-nav-home-after-top-component .yuanzhan-nav-advert-location-home_search .row.gutters-5 {
        display: flex;
        flex-wrap: wrap;
    }

    .yuanzhan-nav-home-after-top-component .yuanzhan-nav-advert-location-home_search .row.gutters-5 > [class*="col-"] {
        float: none;
        flex: 0 0 33.333333%;
        width: 33.333333% !important;
        max-width: 33.333333%;
        min-width: 0;
    }

    .yuanzhan-nav-home-after-top-component .yuanzhan-nav-advert-location-home_search .hidden-xs {
        display: none !important;
    }

    .yuanzhan-nav-home-after-top-component .yuanzhan-nav-advert-location-home_search .visible-xs-block {
        display: block !important;
        min-width: 0;
    }

    .yuanzhan-nav-home-after-top-component .yuanzhan-nav-advert-location-home_search .font-bold {
        overflow: hidden;
        font-size: 12px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

.yuanzhan-nav-friend-links .yuanzhan-friend-url-group .input-group-btn {
    width: 1%;
    white-space: nowrap;
}

/* Keep the home links widget aligned with the navigation content above it. */
.yuanzhan-nav-home-links-fluid {
    width: 100%;
    max-width: calc(var(--mian-max-width) + 180px);
    margin-right: auto;
    margin-left: auto;
}

.yuanzhan-nav-home-links-fluid .widget-container:has(.links-widget) {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

.yuanzhan-nav-home-links-fluid .widget-container > div:has(.links-widget) {
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    background: var(--main-bg-color);
}

.yuanzhan-nav-home-links-fluid .widget-container > div:has(.links-widget) > .box-body.notop {
    padding: 0 0 10px;
}

.yuanzhan-nav-home-links-fluid .widget-container > div:has(.links-widget) .widget-content > .mb20 {
    margin-bottom: 0;
}

.yuanzhan-nav-home-links-fluid .links-widget {
    margin-bottom: 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--main-border-color);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 767px) {
    .yuanzhan-nav-home-links-fluid {
        padding-right: 10px;
        padding-left: 10px;
    }
}

/* 一级分类、二级分类和网址列表组成一个连续的首页分组。 */
.yuanzhan-nav-group {
    min-width: 0;
    padding: 12px !important;
    scroll-margin-top: 82px;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    background: var(--main-bg-color);
}

.yuanzhan-nav-group .yuanzhan-nav-group-header {
    display: grid !important;
    grid-template-columns: minmax(180px, auto) minmax(0, 1fr) max-content;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-bottom: 10px !important;
}

.yuanzhan-nav-group-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 230px;
    color: var(--main-color);
    text-decoration: none !important;
}

.yuanzhan-nav-group-primary strong {
    display: block;
    min-width: 0;
    font-size: 18px;
    line-height: 1.35;
}

.yuanzhan-nav-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--main-border-color);
    border-radius: 7px;
    color: var(--focus-color);
    background: var(--muted-border-color);
    font-size: 17px;
}

.yuanzhan-nav-group-icon > svg.icon {
    width: 1.25em;
    height: 1.25em;
}

.yuanzhan-nav-child-terms {
    display: flex;
    grid-column: 2;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px;
    min-width: 0;
    min-height: 46px;
    padding: 5px;
    overflow-x: auto;
    border: 1px solid var(--main-border-color);
    border-radius: 7px;
    background: var(--muted-border-color);
    scrollbar-width: none;
}

.yuanzhan-nav-child-terms::-webkit-scrollbar {
    display: none;
}

.yuanzhan-nav-child-term {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--main-color);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none !important;
    white-space: nowrap;
    transition: color .16s ease, background-color .16s ease;
}

.yuanzhan-nav-child-term.is-featured,
.yuanzhan-nav-child-term:hover,
.yuanzhan-nav-child-term:focus {
    color: #fff;
    background: var(--focus-color);
}

.yuanzhan-nav-group-more {
    display: inline-flex;
    grid-column: 3;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 78px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--main-border-color);
    border-radius: 7px;
    color: var(--main-color);
    background: var(--muted-border-color);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
}

.yuanzhan-nav-group-more:hover,
.yuanzhan-nav-group-more:focus {
    color: var(--focus-color);
    background: var(--focus-color-opacity1);
}

@media (max-width: 767px) {
    .yuanzhan-nav-group {
        padding: 10px !important;
        scroll-margin-top: 64px;
    }

    .yuanzhan-nav-group .yuanzhan-nav-group-header {
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 8px;
    }

    .yuanzhan-nav-group-primary {
        max-width: none;
        gap: 8px;
    }

    .yuanzhan-nav-group-primary strong {
        font-size: 16px;
    }

    .yuanzhan-nav-group-icon {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .yuanzhan-nav-group .yuanzhan-nav-child-terms {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-height: 42px;
        padding: 4px;
    }

    .yuanzhan-nav-child-term {
        min-height: 32px;
        padding: 0 10px;
        font-size: 13px;
    }

    .yuanzhan-nav-group-more {
        grid-column: 2;
        grid-row: 1;
        min-width: 68px;
        min-height: 36px;
        padding: 0 10px;
    }

    .yuanzhan-nav-advert-page-wrap {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .yuanzhan-nav-advert-page-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .yuanzhan-nav-advert-page-card {
        padding: 12px;
    }

    .yuanzhan-nav-advert-location-nav_footer {
        min-height: 0 !important;
        margin-bottom: 0 !important;
    }

    .yuanzhan-nav-advert-location-nav_footer .new-swiper,
    .yuanzhan-nav-advert-location-nav_footer .swiper-slide img {
        height: 20px !important;
        max-height: 20px !important;
    }

    .yuanzhan-nav-advert-location-nav_footer .new-swiper .swiper-wrapper,
    .yuanzhan-nav-advert-location-nav_footer .new-swiper .swiper-slide {
        height: 20px !important;
        max-height: 20px !important;
    }

    .yuanzhan-nav-advert-location-nav_footer .yuanzhan-nav-footer-placeholder {
        height: 20px !important;
        max-height: 20px !important;
    }

    .yuanzhan-nav-friend-links .yuanzhan-friend-url-group {
        display: flex;
    }

    .yuanzhan-nav-friend-links .yuanzhan-friend-url-group > input {
        flex: 1 1 auto;
        min-width: 0;
    }

    .yuanzhan-nav-friend-links .yuanzhan-friend-url-group .input-group-btn {
        flex: 0 0 auto;
        width: auto;
    }

    .yuanzhan-nav-friend-links .yuanzhan-friend-url-group .input-group-btn .but {
        padding-left: 10px;
        padding-right: 10px;
        white-space: nowrap;
    }
}

/* Website detail showcase, aligned with the native Zibll card system. */
.yuanzhan-nav-site-preview {
    position: relative;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    background: var(--main-bg-color);
}

.yuanzhan-nav-site-breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 40px;
    padding: 0 14px;
    overflow-x: auto;
    color: var(--muted-color);
    font-size: 12px;
    white-space: nowrap;
    scrollbar-width: none;
}

.yuanzhan-nav-site-breadcrumb::-webkit-scrollbar {
    display: none;
}

.yuanzhan-nav-site-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    color: inherit;
}

.yuanzhan-nav-site-breadcrumb a:hover,
.yuanzhan-nav-site-breadcrumb a:focus {
    color: var(--focus-color);
}

.yuanzhan-nav-site-preview-media,
.yuanzhan-nav-site-preview-visual {
    position: relative;
    min-width: 0;
}

.yuanzhan-nav-site-preview-visual {
    overflow: hidden;
    background: var(--muted-border-color);
}

.yuanzhan-nav-site-preview-image-link {
    width: 100%;
    height: 100%;
}

.yuanzhan-nav-site-preview.is-preview-image-failed .yuanzhan-nav-site-preview-media {
    padding-top: 44px;
    background: var(--muted-border-color);
}

.yuanzhan-nav-site-preview.is-preview-image-failed .yuanzhan-nav-site-preview-image-link {
    display: none !important;
}

.yuanzhan-nav-site-preview.is-preview-image-failed .yuanzhan-nav-site-preview-visual {
    background: transparent;
}

.yuanzhan-nav-site-preview.is-preview-image-failed .yuanzhan-nav-site-preview-bar {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    margin: 0 12px 12px;
}

.yuanzhan-nav-site-preview-bar {
    position: absolute;
    z-index: 2;
    right: 16px;
    bottom: 16px;
    left: 16px;
    display: grid;
    grid-template-columns: 60px minmax(160px, 1fr) minmax(0, auto) auto;
    align-items: center;
    gap: 13px;
    min-width: 0;
    min-height: 90px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    color: #fff;
    background: rgba(24, 28, 36, .94);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.yuanzhan-nav-site-preview-icon,
.yuanzhan-nav-site-sticky-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--focus-color);
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
    font-weight: 700;
}

.yuanzhan-nav-site-preview-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    font-size: 22px;
}

.yuanzhan-nav-site-preview-icon img,
.yuanzhan-nav-site-sticky-icon img {
    display: block;
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    border-radius: 5px;
    object-fit: contain;
}

.yuanzhan-nav-site-preview-info,
.yuanzhan-nav-site-sticky-info {
    min-width: 0;
}

.yuanzhan-nav-site-preview-info h1 {
    margin: 0;
    overflow: hidden;
    font-size: 21px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yuanzhan-nav-site-preview-info h1 a {
    color: #fff;
}

.yuanzhan-nav-site-preview-info p {
    display: -webkit-box;
    margin: 5px 0 0;
    overflow: hidden;
    color: rgba(255, 255, 255, .68);
    font-size: 13px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.yuanzhan-nav-site-preview-open,
.yuanzhan-nav-site-sticky-inner > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex: 0 0 auto;
    min-width: 132px;
    min-height: 42px;
    padding: 0 17px;
    border-radius: 6px;
    color: #fff !important;
    background: var(--focus-color);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}

.yuanzhan-nav-site-preview-details {
    padding: 9px 15px 10px;
    border-top: 1px solid var(--main-border-color);
    color: var(--muted-color);
    background: var(--muted-bg-2-color);
}

.yuanzhan-nav-site-sticky {
    position: fixed;
    z-index: 95;
    top: 76px;
    left: 50%;
    width: min(900px, calc(100vw - 32px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -10px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.yuanzhan-nav-site-sticky.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.yuanzhan-nav-site-sticky-inner {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    padding: 9px 10px;
    border: 1px solid var(--main-border-color);
    border-radius: 8px;
    background: var(--main-bg-color);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

.yuanzhan-nav-site-sticky-icon {
    width: 42px;
    height: 42px;
    border-radius: 7px;
}

.yuanzhan-nav-site-sticky-info strong,
.yuanzhan-nav-site-sticky-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yuanzhan-nav-site-sticky-info strong {
    font-size: 14px;
}

.yuanzhan-nav-site-sticky-info span {
    margin-top: 3px;
    color: var(--muted-color);
    font-size: 11px;
}

.yuanzhan-nav-site-sticky-inner > a {
    min-width: 112px;
    min-height: 38px;
    font-size: 13px;
}

/* Final responsive layout for the Ping and weight panels. */
.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-summary.is-offline .yuanzhan-nav-connectivity-state,
.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-state:only-child {
    grid-column: 1 / -1;
}

.yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.yuanzhan-nav-site-weight-metrics {
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
}

.yuanzhan-nav-site-weight-metric {
    flex: 1 1 128px;
    max-width: 160px;
    min-width: 112px;
}

@media (max-width: 991px) {
    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-summary {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .yuanzhan-nav-site-weight-metric {
        max-width: none;
    }
}

@media (max-width: 680px) {
    .yuanzhan-nav-site-preview-tools {
        top: 8px;
        right: 8px;
        max-width: calc(100% - 16px);
    }

    .yuanzhan-nav-site-preview-tools > .item {
        width: 30px;
        min-width: 30px;
        padding: 0;
    }

    .yuanzhan-nav-site-preview-tools > .item text {
        display: none;
    }

    .yuanzhan-nav-site-preview-bar {
        position: relative;
        right: auto;
        bottom: auto;
        left: auto;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
        min-height: 0;
        padding: 12px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .yuanzhan-nav-site-preview-icon {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .yuanzhan-nav-site-preview-info h1 {
        font-size: 17px;
    }

    .yuanzhan-nav-site-preview-info p {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .yuanzhan-nav-site-preview-open {
        grid-column: 1 / -1;
        width: 100%;
    }

    .yuanzhan-nav-site-preview-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

@media (max-width: 560px) {
    .yuanzhan-nav-site-breadcrumb {
        min-height: 36px;
        padding: 0 11px;
    }

    .yuanzhan-nav-site-preview-details {
        padding: 10px 12px 12px;
    }

    .yuanzhan-nav-site-sticky {
        top: 58px;
        width: calc(100vw - 20px);
    }

    .yuanzhan-nav-site-sticky-inner {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        min-height: 56px;
        padding: 8px;
    }

    .yuanzhan-nav-site-sticky-icon {
        width: 38px;
        height: 38px;
    }

    .yuanzhan-nav-site-sticky-info span,
    .yuanzhan-nav-site-sticky-inner > a span {
        display: none;
    }

    .yuanzhan-nav-site-sticky-inner > a {
        min-width: 38px;
        width: 38px;
        min-height: 38px;
        padding: 0;
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .yuanzhan-nav-site-connectivity .yuanzhan-nav-connectivity-info-item {
        min-height: 38px;
    }

    .yuanzhan-nav-site-weight-metric {
        flex: 1 1 calc(33.333% - 6px);
        min-width: 100px;
        min-height: 46px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yuanzhan-nav-site-sticky {
        transition: none;
    }
}
