/* 全站顶栏。样式挂在 .lb-site-nav 上，避免被各页 .header 旧样式覆盖。 */
#header.lb-site-nav {
    position: fixed;
    top: var(--lb-promo-h, 0px);
    left: 0;
    right: 0;
    z-index: 1100;
    height: 72px;
    box-sizing: border-box;
    background: transparent;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    color: #31415c;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    transition: box-shadow 0.25s, border-color 0.25s;
}

#header.lb-site-nav.lb-site-nav--flow {
    position: sticky;
    z-index: 30;
}

#header.lb-site-nav.is-stuck {
    box-shadow: 0 8px 24px rgba(28, 60, 120, 0.06);
    border-bottom-color: #e8eef6;
}

#header.lb-site-nav:has(.lb-nav-drop:hover:not(.is-dismissed)),
#header.lb-site-nav:has(.lb-nav-drop:focus-within:not(.is-dismissed)),
#header.lb-site-nav:has(.lb-nav-drop.is-open),
#header.lb-site-nav.lb-site-nav--flow:has(.lb-nav-drop:hover:not(.is-dismissed)),
#header.lb-site-nav.lb-site-nav--flow:has(.lb-nav-drop:focus-within:not(.is-dismissed)),
#header.lb-site-nav.lb-site-nav--flow:has(.lb-nav-drop.is-open) {
    z-index: 1200;
    background: #fff;
    border-bottom-color: #eef2f8;
}

#header.lb-site-nav::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    pointer-events: none;
}

#header.lb-site-nav:has(.lb-nav-drop:hover:not(.is-dismissed))::before,
#header.lb-site-nav:has(.lb-nav-drop:focus-within:not(.is-dismissed))::before,
#header.lb-site-nav:has(.lb-nav-drop.is-open)::before,
#header.lb-site-nav.lb-site-nav--flow:has(.lb-nav-drop:hover:not(.is-dismissed))::before,
#header.lb-site-nav.lb-site-nav--flow:has(.lb-nav-drop:focus-within:not(.is-dismissed))::before,
#header.lb-site-nav.lb-site-nav--flow:has(.lb-nav-drop.is-open)::before {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.lb-site-nav *,
.lb-site-nav *::before,
.lb-site-nav *::after {
    box-sizing: border-box;
}

.lb-site-nav a {
    color: inherit;
    text-decoration: none;
}

.lb-site-nav__bar {
    width: min(1240px, calc(100% - 64px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

.lb-site-nav__brand {
    display: inline-flex;
    align-items: center;
    flex: none;
}

.lb-site-nav__brand img {
    display: block;
    height: 52px;
    width: auto;
}

.lb-site-nav__burger {
    display: none;
    margin-left: auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #e8eef6;
    border-radius: 10px;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
}

.lb-site-nav__burger span {
    display: block;
    width: 16px;
    height: 2px;
    background: #24324a;
}

.lb-site-nav__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 0;
    white-space: nowrap;
}

.lb-site-nav__menu > a,
.lb-nav-drop__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    line-height: 1.4;
    color: #31415c;
}

.lb-site-nav__menu > a:hover,
.lb-site-nav__menu > a.is-current,
.lb-nav-drop:hover:not(.is-dismissed) .lb-nav-drop__link,
.lb-nav-drop:focus-within:not(.is-dismissed) .lb-nav-drop__link,
.lb-nav-drop__link:hover,
.lb-nav-drop__link.is-current {
    color: #2f7bff;
    background: #f3f7ff;
}

.lb-nav-caret {
    width: 12px;
    height: 12px;
    flex: none;
    transition: transform 0.15s ease;
}

.lb-nav-drop:hover:not(.is-dismissed) .lb-nav-caret,
.lb-nav-drop:focus-within:not(.is-dismissed) .lb-nav-caret,
.lb-nav-drop.is-open .lb-nav-caret {
    transform: rotate(180deg);
}

.lb-help-panel {
    display: none;
    font-weight: 400;
    color: #333;
    text-align: left;
    white-space: normal;
}

.lb-help-sheet {
    width: min(1240px, calc(100% - 64px));
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 36px;
}

.lb-help-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.lb-help-col--main {
    flex: 1 1 auto;
}

.lb-help-col--mid {
    flex: 0 0 280px;
}

.lb-help-col--ent {
    flex: 0 0 280px;
}

.lb-help-label {
    color: #6a768b;
    font-size: 14px;
    font-weight: 400;
    line-height: 19px;
    white-space: nowrap;
}

.lb-help-rule {
    display: block;
    height: 1px;
    margin: 10px 0 12px;
    background: #e1eaff;
}

.lb-help-docs {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.lb-help-doc {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 268px;
    flex: none;
    min-height: 286px;
    padding: 26px 20px 18px;
    border-radius: 10px;
    background: #eff4ff;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lb-help-doc::before {
    content: "";
    position: absolute;
    top: -36px;
    right: -28px;
    width: 140px;
    height: 140px;
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(47, 123, 255, 0.16), rgba(47, 123, 255, 0));
    transform: rotate(18deg);
}

.lb-help-doc:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -16px rgba(16, 30, 44, 0.3);
}

.lb-help-doc__ic,
.lb-help-mini__ic,
.lb-help-row__ic {
    display: grid;
    place-items: center;
    flex: none;
    color: #2f7bff;
}

.lb-help-doc__ic {
    position: relative;
    width: 40px;
    height: 40px;
}

.lb-help-doc__cover {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.lb-help-doc__ic svg,
.lb-help-mini__ic svg,
.lb-help-row__ic svg,
.lb-help-doc__btn svg {
    width: 100%;
    height: 100%;
}

.lb-help-doc b,
.lb-help-mini b,
.lb-help-row b {
    display: block;
    font-weight: 600;
    color: #333;
}

.lb-help-doc b {
    position: relative;
    margin-top: 16px;
    font-size: 20px;
    line-height: 28px;
}

.lb-help-doc p,
.lb-help-mini i,
.lb-help-row i {
    font-style: normal;
    font-weight: 400;
    color: #9aa3b2;
}

.lb-help-doc p {
    position: relative;
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 26px;
}

.lb-help-doc__foot {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    margin-top: auto;
    padding-top: 16px;
}

.lb-help-doc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    align-self: flex-start;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: #2b74f6;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
}

.lb-help-doc__btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.15s ease;
}

.lb-help-doc:hover .lb-help-doc__btn svg {
    transform: translateX(4px);
}

.lb-help-doc__tabs {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    color: #9aa3b2;
    font-size: 14px;
    line-height: 20px;
}

.lb-help-doc__tabs a:hover {
    color: #2f7bff;
}

.lb-help-minis {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 16px;
    min-width: 220px;
}

.lb-help-mini {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 135px;
    padding: 20px 18px 16px;
    border-radius: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lb-help-mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -16px rgba(16, 30, 44, 0.28);
}

.lb-help-mini--dev {
    background: #f8f0ff;
}

.lb-help-mini--api {
    background: #f1f0ff;
}

.lb-help-mini--dev .lb-help-mini__ic {
    color: #9a4dff;
}

.lb-help-mini--api .lb-help-mini__ic {
    color: #5b61f6;
}

.lb-help-mini__ic {
    width: 28px;
    height: 28px;
}

.lb-help-mini b {
    margin-top: 12px;
    font-size: 18px;
    line-height: 25px;
}

.lb-help-mini i {
    margin-top: 6px;
    font-size: 14px;
    line-height: 22px;
}

.lb-help-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lb-help-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 4px 0;
    border-radius: 10px;
}

.lb-help-row__ic {
    width: 36px;
    height: 36px;
    margin-top: 2px;
    border-radius: 50%;
    background: #f2f5fa;
}

.lb-help-row__ic svg {
    width: 18px;
    height: 18px;
}

.lb-help-row b {
    font-size: 18px;
    line-height: 25px;
}

.lb-help-row i {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    line-height: 20px;
}

.lb-help-row:hover b {
    color: #2f7bff;
}

.lb-help-row:hover .lb-help-row__ic {
    background: #fff;
    box-shadow: inset 0 0 0 1px #e3ebf8;
}

.lb-help-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    margin: 28px auto 0;
}

.lb-help-qr img {
    width: 96px;
    height: 96px;
    border-radius: 6px;
    object-fit: cover;
}

.lb-help-qr figcaption {
    margin-top: 8px;
    color: #999;
    font-size: 14px;
    line-height: 19px;
    text-align: center;
    white-space: nowrap;
}

.lb-site-nav__new {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    border-radius: 4px;
    background: #ff5a36;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.4;
    vertical-align: 1px;
}

.lb-site-nav__auth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.lb-site-nav__login {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 14px;
    color: #31415c;
}

.lb-site-nav__login:hover {
    color: #2f7bff;
}

.lb-site-nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #4b90ff, #2b74f6);
    box-shadow: 0 8px 18px rgba(43, 116, 246, 0.28);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.lb-site-nav__cta:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(43, 116, 246, 0.34);
}

@media (min-width: 981px) {
    .lb-site-nav__menu {
        align-self: stretch;
    }

    .lb-nav-drop {
        display: flex;
        align-items: center;
        align-self: stretch;
    }

    .lb-help-panel {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% - 12px);
        z-index: 20;
        padding: 26px 0 36px;
        background: #fff;
        border-top: 1px solid #eef2f8;
        box-shadow: 0 24px 48px -20px rgba(16, 30, 44, 0.16);
    }

    .lb-nav-drop:hover:not(.is-dismissed) .lb-help-panel,
    .lb-nav-drop:focus-within:not(.is-dismissed) .lb-help-panel,
    .lb-nav-drop.is-open .lb-help-panel {
        display: block;
    }
}

@media (max-width: 1180px) and (min-width: 981px) {
    .lb-help-sheet {
        flex-wrap: wrap;
    }

    .lb-help-col--main {
        flex: 1 1 100%;
    }

    .lb-help-col--mid,
    .lb-help-col--ent {
        flex: 1 1 280px;
    }
}

@media (max-width: 1150px) {
    .lb-site-nav__bar {
        width: calc(100% - 48px);
        gap: 16px;
    }

    .lb-site-nav__menu > a,
    .lb-nav-drop__link {
        padding: 8px 8px;
    }

    .lb-help-sheet {
        width: calc(100% - 48px);
    }
}

@media (max-width: 980px) {
    .lb-site-nav__burger {
        display: inline-flex;
    }

    .lb-site-nav__menu {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 72px;
        z-index: 40;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 12px 16px;
        background: #fff;
        border-bottom: 1px solid #e8eef6;
        box-shadow: 0 16px 30px rgba(20, 40, 80, 0.08);
        white-space: normal;
    }

    .lb-site-nav__menu.open {
        display: flex;
        position: fixed;
        top: calc(72px + var(--lb-promo-h, 0px));
        right: 0;
        bottom: 0;
        left: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    body.lb-site-nav-open {
        overflow: hidden;
    }

    .lb-site-nav__auth {
        margin: 6px 0 0;
        padding-left: 8px;
    }

    .lb-nav-drop.is-open .lb-help-panel,
    .lb-nav-drop:focus-within:not(.is-dismissed) .lb-help-panel {
        display: block;
        margin: 4px 0 8px;
        padding: 12px;
        background: #f7f9fc;
        border-radius: 12px;
    }

    .lb-help-sheet {
        width: 100%;
        flex-direction: column;
        gap: 18px;
    }

    .lb-help-col--mid,
    .lb-help-col--ent {
        flex-basis: auto;
    }

    .lb-help-docs {
        flex-direction: column;
    }

    .lb-help-doc,
    .lb-help-minis {
        width: 100%;
        min-width: 0;
    }

    .lb-help-doc {
        min-height: 0;
    }

    .lb-help-label {
        white-space: normal;
    }
}

@media (max-width: 680px) {
    .lb-site-nav__bar {
        width: calc(100% - 40px);
    }
}

/* 顶栏公告：首页随文档滚动；其余主菜单页固定在导航上方 */
html:not(.auth-page-root):not(.lb-promo-off) body:not(#home) {
    --lb-promo-h: 36px;
}

#promo {
    height: 36px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    z-index: 1200;
    margin: 0;
    padding: 0;
    text-align: left;
    background: linear-gradient(90deg, #f4f0ff, #eef4ff 45%, #f7f3ff);
    color: #3d4d6b;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
}

body#home #promo {
    position: relative;
    z-index: 40;
}

html.auth-page-root #promo,
html.lb-promo-off #promo {
    display: none !important;
}

#promo:before,
#promo:after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: .7;
    animation: lb-confetti 4.5s linear infinite;
}

#promo:before {
    background: #7aa7ff;
    left: 8%;
    top: 8px;
}

#promo:after {
    background: #f0b429;
    right: 18%;
    bottom: 6px;
    animation-delay: -2s;
}

#promo .confetti {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    opacity: .55;
    animation: lb-confetti 5s linear infinite;
}

#promo .promo-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    padding: 0 48px;
    white-space: nowrap;
}

#promo b {
    color: #5b4bdb;
    font-weight: 700;
}

#promo em {
    font-style: normal;
    color: #e23b4a;
    font-weight: 700;
}

#promo span {
    display: inline;
}

#promo .promo-go {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 10px;
    border-radius: 99px;
    background: #6d5efc;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

#promo .promo-go:hover {
    color: #fff;
    text-decoration: none;
}

#promo .promo-x {
    position: absolute;
    right: 14px;
    top: 6px;
    border: 0;
    background: transparent;
    color: #8b97ab;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

@keyframes lb-confetti {
    0% { transform: translateY(0) rotate(0); }
    100% { transform: translateY(-18px) rotate(40deg); }
}

/* 内页占位只留出公告 + 导航，不再叠加各页自己的下边距 */
body:not(#home):not(.auth-page) .header-spacer {
    box-sizing: border-box !important;
    height: calc(72px + var(--lb-promo-h, 0px)) !important;
    margin: 0 !important;
    padding: 0 !important;
}

body:not(#home) .home-page > .header-spacer {
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 760px) {
    #promo {
        font-size: 12px;
    }

    #promo .promo-track {
        justify-content: flex-start;
        gap: 12px;
        padding: 0 36px 0 16px;
    }

    #promo .promo-track span:nth-child(2) {
        display: none;
    }
}

.lb-dev-notice {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.lb-dev-notice__mask {
    position: absolute;
    inset: 0;
    background: rgba(25, 46, 73, 0.45);
}

.lb-dev-notice__panel {
    position: relative;
    width: min(360px, 100%);
    padding: 28px 28px 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(28, 60, 120, 0.18);
    text-align: center;
}

.lb-dev-notice__title {
    margin: 0;
    color: #192e49;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.lb-dev-notice__text {
    margin: 10px 0 0;
    color: #647993;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

.lb-dev-notice__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 40px;
    margin-top: 22px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #4b90ff, #2b74f6);
    box-shadow: 0 8px 18px rgba(43, 116, 246, 0.28);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.lb-dev-notice__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(43, 116, 246, 0.34);
}

.lb-dev-notice__btn:focus-visible {
    outline: 3px solid #faad50;
    outline-offset: 3px;
}
