/* 本站原有回顶页面共用；保留原回顶的桌面断点、右侧与底部位置。 */
.customer-service {
    position: fixed;
    right: 70px;
    bottom: 100px;
    z-index: 50;
    width: 64px;
    height: 144px;
    color: #1f2937;
}

.customer-service,
.customer-service * {
    box-sizing: border-box;
}

.customer-service [hidden] {
    display: none !important;
}

/* 预留回顶槽位，隐藏回顶时客服位置保持不变。 */
.customer-service__contact {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 72px;
}

.customer-service__trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 64px;
    height: 72px;
    border-radius: 4px;
    background: #0077ff;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-decoration: none;
    white-space: nowrap;
}

.customer-service__trigger:hover,
.customer-service__trigger[aria-expanded="true"],
.customer-service__top:hover,
.customer-service__action:hover {
    background-color: #0045ff;
    color: #fff;
}

.customer-service__trigger:focus-visible,
.customer-service__action:focus-visible,
.customer-service__top:focus-visible {
    outline: 2px solid #0045ff;
    outline-offset: 3px;
}

.customer-service__panel {
    position: absolute;
    right: 76px;
    bottom: -72px;
    width: 240px;
}

/* 将 12px 间隔纳入悬停范围，鼠标移向二维码或按钮时不关闭卡片。 */
.customer-service__panel::after {
    position: absolute;
    top: 0;
    right: -12px;
    width: 12px;
    height: 100%;
    content: "";
}

.customer-service__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    height: 344px;
    max-height: calc(100vh - 32px);
    padding: 20px 31px 22px;
    overflow-y: auto;
    border: 1px solid #e5ebf3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(31, 61, 112, .12);
}

.customer-service__title,
.customer-service__caption {
    flex-shrink: 0;
    width: 176px;
    margin: 0;
    text-align: center;
}

.customer-service__title {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.customer-service__scan {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 176px;
    height: 204px;
}

.customer-service__qrcode {
    position: relative;
    flex-shrink: 0;
    width: 176px;
    height: 176px;
    overflow: hidden;
}

/* 保留设计稿对正式原图的裁切，底部宣传文字不挤占扫码区域。 */
.customer-service__qrcode img {
    position: absolute;
    top: 0;
    left: -1.02%;
    width: 102.04%;
    max-width: none;
    height: 132.65%;
}

.customer-service__caption {
    color: #6b7280;
    font-size: 12px;
    line-height: 20px;
}

.customer-service__action {
    position: relative;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 176px;
    height: 40px;
    border-radius: 4px;
    background: #0045ff;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    text-decoration: none;
}

.customer-service__action img {
    position: absolute;
    top: 13px;
    left: 146px;
}

.customer-service__top {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #0077ff;
    cursor: pointer;
}

@media (max-width: 1023.98px) {
    .customer-service {
        display: none;
    }
}

@media (max-height: 480px) {
    .customer-service {
        bottom: 16px;
    }
}
