/* 避免顶栏裁切向下展开的 tooltip */
.nav-wrapper {
    overflow: visible;
}

/* 顶栏工具栏：微信 / 指南 / 主题 — 三图标等距 */
.nav-wrapper .nav-toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px;
    margin-right: 8px;
    list-style: none;
    height: 100%;
    overflow: visible;
    flex-shrink: 0;
}

.nav-wrapper #nav-mobile .nav-toolbar-actions {
    overflow: visible;
}

.nav-wrapper .nav-toolbar-actions .nav-toolbar-btn {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    margin: 0;
    box-sizing: border-box;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: auto;
    overflow: visible;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-wrapper .nav-toolbar-actions .contact-toggle {
    color: #888;
}

.nav-wrapper .nav-toolbar-actions .theme-toggle {
    color: #FFD016;
}

.nav-wrapper .nav-toolbar-actions .theme-toggle i {
    -webkit-text-stroke: 1px #999;
    paint-order: stroke fill;
}

.nav-wrapper .nav-toolbar-actions .guide-toggle {
    color: #45a049;
    display: none;
}

.nav-wrapper .nav-toolbar-actions .guide-toggle.is-visible {
    display: flex;
}

.nav-wrapper .nav-toolbar-actions .guide-toggle.guide-login-prompt-highlight {
    z-index: 10003;
}

.nav-wrapper .nav-toolbar-actions .nav-toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: none;
}

.nav-wrapper .nav-toolbar-actions .theme-toggle:hover i {
    transform: scale(1.15);
}

.nav-wrapper .nav-toolbar-actions .guide-toggle:hover,
.nav-wrapper .nav-toolbar-actions .guide-toggle:active {
    transform: none !important;
}

.nav-wrapper .nav-toolbar-actions .guide-toggle:hover i {
    transform: none !important;
}

.nav-wrapper .nav-toolbar-actions .nav-toolbar-btn i {
    transition: transform 0.2s ease;
}

[data-theme="light"] .nav-wrapper .nav-toolbar-actions .nav-toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* 微信二维码下拉 */
.nav-wrapper .nav-toolbar-actions .contact-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    align-self: stretch;
    height: 100%;
    flex: 0 0 40px;
}

.nav-wrapper .nav-toolbar-actions .contact-qr-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin-top: 0;
    min-width: auto;
    padding: 10px;
    border: 1px solid #e3e5e7;
    border-radius: 10px;
    z-index: 1001;
}

.nav-wrapper .nav-toolbar-actions .contact-qr-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 7px 7px;
    border-style: solid;
    border-color: transparent transparent #fff;
    filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.06));
}

.nav-wrapper .nav-toolbar-actions .contact-qr-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.nav-wrapper .nav-toolbar-actions .contact-qr-caption {
    margin: 0 0 8px;
    padding: 0;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    line-height: 2;
    letter-spacing: 0.02em;
}

:root:not([data-theme="light"]) .nav-wrapper .nav-toolbar-actions .contact-qr-caption {
    color: #b0b0b0;
}

.nav-wrapper .nav-toolbar-actions .contact-qr-hint {
    margin: -4px 0 10px;
    padding: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 400;
    color: #9499a0;
    line-height: 1.4;
}

:root:not([data-theme="light"]) .nav-wrapper .nav-toolbar-actions .contact-qr-hint {
    color: #888;
}

.nav-wrapper .contact-qr-image {
    display: block;
    width: 200px;
    height: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

:root:not([data-theme="light"]) .nav-wrapper .nav-toolbar-actions .contact-qr-dropdown {
    background: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

:root:not([data-theme="light"]) .nav-wrapper .nav-toolbar-actions .contact-qr-dropdown::before {
    border-bottom-color: #2c2c2c;
    filter: none;
}
