/* 在线咨询沿用截图的双绿入口，主页面配色和布局保持不变。 */
.contact-dock {
    position: fixed;
    top: 54%;
    right: 16px;
    z-index: 80;
    display: grid;
    gap: 10px;
    transform: translateY(-50%);
}

.contact-dock-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 178px;
    min-height: 68px;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: #168e49;
    box-shadow: 0 5px 18px rgb(13 82 47 / 14%);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.contact-dock-item--wechat { background: #139b57; }
.contact-dock-item:hover { color: #fff; filter: brightness(.93); }
.contact-dock-item svg { flex: 0 0 30px; width: 30px; height: 30px; }
.contact-dock-copy { display: grid; gap: 4px; font-size: 13px; line-height: 1.4; }
.contact-dock-copy strong { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.contact-dock-item:focus-visible,
.wechat-dialog button:focus-visible { outline: 3px solid #d4aa46; outline-offset: 4px; }

/* 弹窗处于浏览器顶层，不受页面导航和遮罩层级干扰。 */
.wechat-dialog {
    width: min(390px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 22px;
    color: #23323d;
    background: #fff;
    box-shadow: 0 24px 70px rgb(0 0 0 / 20%);
}

.wechat-dialog:not([open]) { display: none; }
.wechat-dialog::backdrop { background: rgb(17 26 35 / 38%); backdrop-filter: blur(3px); }
.wechat-dialog-inner { position: relative; padding: 30px 24px 18px; text-align: center; }
.wechat-dialog h2 { margin: 0 0 20px; font: 700 21px/1.5 var(--font-body); }
.wechat-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #77858e;
    font: 28px/1 sans-serif;
    cursor: pointer;
}
.wechat-close:hover { background: #f1f4f3; }
.wechat-qr { width: 200px; max-width: 100%; margin: 0 auto 16px; }
.wechat-qr img { display: block; width: 100%; height: auto; object-fit: contain; }
.wechat-help { margin: 0 0 14px; color: #677681; font-size: 13px; line-height: 1.7; }
.wechat-account { margin: 0 0 16px; font-size: 14px; overflow-wrap: anywhere; }
.wechat-account strong { user-select: all; }
.wechat-copy { padding: 11px 26px; border: 0; border-radius: 24px; color: #fff; background: #168e49; font: 600 14px/1.5 var(--font-body); cursor: pointer; }
.wechat-copy:hover { background: #11753b; }
.wechat-status { min-height: 20px; margin: 10px 0 0; color: #356248; font-size: 12px; line-height: 1.6; }
body.has-contact-dialog { overflow: hidden; }

/* 屏幕较窄时收为图标，避免大块浮窗遮挡正文。悬停/聚焦时显示文字。 */
@media (max-width: 1879px) {
    .contact-dock { right: 12px; }
    .contact-dock-item { position: relative; width: 52px; min-height: 52px; padding: 11px; }
    .contact-dock-copy { display: none; }
}
@media (min-width: 861px) and (max-width: 1879px) {
    .contact-dock-item:hover .contact-dock-copy,
    .contact-dock-item:focus-visible .contact-dock-copy {
        position: absolute;
        right: 62px;
        display: grid;
        width: 165px;
        padding: 12px 14px;
        border-radius: 12px;
        color: #fff;
        background: #168e49;
    }
}
@media (max-width: 860px) {
    .contact-dock { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); transform: none; gap: 8px; }
    .contact-dock-item { width: 46px; min-height: 46px; padding: 8px; border-radius: 13px; }
}
@media print {
    .contact-dock, .wechat-dialog { display: none !important; }
}
