/* 右侧悬浮「联系作者」二维码：宽屏常驻侧栏，窄屏收成右下角按钮 */
.contact-fab {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 940;
    font-size: 13px;
    color: var(--text-primary);
}

.contact-fab__toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.contact-fab__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 24px rgb(6 78 74 / 22%);
    transition: background-color .15s ease;
}

.contact-fab__btn:hover { background: var(--brand-deep); }

.contact-fab__toggle:focus-visible + .contact-fab__btn {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

.contact-fab__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    display: none;
    width: 178px;
    padding: 10px;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 32px rgb(6 78 74 / 14%);
    text-align: center;
}

.contact-fab__toggle:checked ~ .contact-fab__panel { display: block; }

.contact-fab__panel img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.contact-fab__panel p {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-secondary);
}

.contact-fab__caption { display: none; }

/* 宽屏：容器 1080px 居中，≥1500px 右侧才有足够边距，常驻显示侧栏卡片 */
@media (min-width: 1500px) {
    .contact-fab {
        top: 50%;
        bottom: auto;
        right: 8px;
        transform: translateY(-50%);
    }

    .contact-fab__btn { display: none; }

    .contact-fab__panel {
        position: static;
        display: block;
        width: 176px;
        padding: 12px;
        box-shadow: 0 10px 28px rgb(6 78 74 / 10%);
    }

    .contact-fab__caption {
        display: block;
        margin-bottom: 10px;
        font-size: 13px;
        font-weight: 700;
        color: var(--brand-deep);
    }
}
