/* stylelint-disable selector-class-pattern -- 兼容官网现有类名 */
:root {
    --passto-surface: #1e2024;
    --passto-surface-elevated: #fff;
    --passto-text: #fff;
    --passto-text-secondary: #9ea3ac;
    --passto-accent: #dad4a9;
    --passto-border: rgb(218 212 169 / 25%);
    --passto-border-subtle: rgb(255 255 255 / 8%);
    --passto-hover: rgb(255 255 255 / 8%);
    --passto-shadow: 0 20px 48px rgb(0 0 0 / 60%), 0 4px 12px rgb(0 0 0 / 30%);
}

.nav-icon-trigger {
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 36px 3px 5px !important;
    margin: 0 12px !important;
    width: 24px;
    height: 24px;
    box-sizing: content-box;
}

.affix.header-1 .nav-icon-trigger {
    padding: 18px 3px 5px !important;
    margin: 0 12px !important;
}

.nav-icon-trigger > img {
    display: block;
    margin: 0;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

#main-menu .qrcode-li {
    position: relative !important;
}

#main-menu .navbar .nav > li.nav-app-download-item {
    display: none;
}

#main-menu .sub.qrcodeBox {
    top: 100%;
    right: 0;
    padding: 24px 20px 20px;
    margin: 4px 0 0;
    width: 416px;
    max-width: calc(100vw - 32px);
    text-align: center;
    color: var(--passto-text);
    background: var(--passto-surface);
    border: 1px solid var(--passto-border);
    border-radius: 16px;
    box-shadow: var(--passto-shadow);
}

#main-menu .parent:hover > .sub.qrcodeBox,
#main-menu .qrcode-li.is-open > .sub.qrcodeBox {
    display: block !important;
    animation: qrcode-fade-in .22s cubic-bezier(.16, 1, .3, 1);
}

@keyframes qrcode-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#main-menu .sub.qrcodeBox::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    width: 100%;
    height: 10px;
    content: '';
}

.download-popover-title {
    margin: 0 0 6px;
    font-size: 16px;
    text-align: center;
    letter-spacing: -.01em;
    color: var(--passto-text);
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.download-popover-subtitle {
    margin: 0 0 18px;
    font-size: 12.5px;
    text-align: center;
    color: var(--passto-text-secondary);
    line-height: 1.45;
    word-break: break-word;
}

.download-popover-options {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-direction: row;
    gap: 16px;
}

.download-popover-options::after {
    content: none;
}

.download-popover-option {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    padding: 14px 12px;
    margin: 0;
    width: 178px;
    min-width: 0;
    flex-direction: column;
    background: rgb(255 255 255 / 4%);
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: 14px;
    box-shadow: none;
    box-sizing: border-box;
    transition: all .2s ease;
}

.download-popover-option:hover {
    background: rgb(255 255 255 / 6%);
    border-color: rgb(218 212 169 / 35%);
    transform: translateY(-1px);
}

.download-popover-platform-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 4px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.download-popover-platform-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.download-popover-platform-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.download-popover-qr-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 156px;
    height: 156px;
    padding: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgb(0 0 0 / 40%);
    box-sizing: border-box;
}

.download-popover-qr {
    display: block;
    margin: 0;
    width: 140px;
    height: 140px;
    object-fit: contain;
}

.download-popover-option .qrcodeRemark {
    display: block;
    margin: 12px 0 0;
    color: #c5cad2;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    text-align: center;
}

.download-popover-option::after {
    content: none;
}

.download-popover-option-title {
    margin: 0;
    font-size: 14px;
    color: #212b36;
    font-weight: 700;
    line-height: 22px;
}

@media only screen and (max-width: 420px) {
    #main-menu .sub.qrcodeBox {
        right: -44px;
        width: 328px;
        padding: 20px 10px 16px;
    }

    .download-popover-options {
        gap: 8px;
    }

    .download-popover-option {
        width: 144px;
        padding: 10px 6px;
    }

    .download-popover-qr-wrap {
        width: 132px;
        height: 132px;
        padding: 6px;
    }

    .download-popover-qr {
        width: 120px;
        height: 120px;
    }
}

@media only screen and (max-width: 1024px) {
    .nav > .qrcode-li {
        display: none;
    }

    #main-menu .navbar .nav > li.nav-app-download-item {
        display: block;
    }

    #main-menu .navbar .nav > li.nav-app-download-item > a {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .nav-app-download-item img {
        display: block;
        flex: 0 0 18px;
        margin: 0;
        width: 18px;
        height: 18px;
        object-fit: contain;
    }
}
