/* 客服浮窗：固定位置的药丸悬浮按钮（图标 + 文字）+ 信息面板 */
/* 固定在公告按钮上方：公告 74px < 客服 122px < 返回 170px（移动端） */
/* 组件盒子恒等于按钮尺寸（高度 40px），让面板按按钮基线对齐 */
.cs-widget {
  position: fixed;
  right: 14px;
  bottom: calc(122px + env(safe-area-inset-bottom));
  z-index: 6;
  height: 40px;
  display: inline-block;
}
.cs-fab {
  height: 40px;
  min-width: 76px;
  padding: 0 14px 0 12px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 8px 20px rgba(141, 103, 245, 0.35);
  border: 2px solid #fff;
  transition: transform 0.2s ease;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .02em;
}
.cs-fab .fab-icon { font-size: 18px; line-height: 1; }
.cs-fab .fab-label { display: inline-block; }
.cs-fab:active {
  transform: scale(0.92);
}
/* 客服居中模态：点击按钮直接展示完整客服信息（与公告模态同款交互） */
.cs-modal {
  position: fixed;
  inset: 0;
  z-index: 21;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(20, 18, 32, 0.62);
  animation: cs-in 0.18s ease;
}
.cs-modal-card {
  width: min(440px, 100%);
  max-height: 86vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@keyframes cs-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cs-modal-card > * { animation: cs-in-up 0.2s ease; }
@keyframes cs-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.cs-modal-head {
  padding: 18px 18px 12px;
  background: linear-gradient(135deg, #fdeef3, #f3eefe);
  flex: none;
}
.cs-modal-head p.eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #9d7bfa;
  font-weight: 800;
}
.cs-modal-head h3 {
  margin: 0;
  font-size: 18px;
}
.cs-modal-head small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.cs-modal-body {
  padding: 4px 18px 8px;
  overflow-y: auto;
  flex: 1;
}
.cs-modal-foot {
  padding: 12px 18px 16px;
  flex: none;
}
.cs-modal-foot button {
  width: 100%;
  padding: 12px 0;
  border-radius: 11px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
}
.cs-modal-foot button:active { transform: scale(0.98); }
.cs-rows {
  padding: 6px 0 2px;
}
.cs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cs-row:last-child {
  border-bottom: 0;
}
.cs-row-label {
  width: 56px;
  flex: none;
  color: var(--muted);
  font-size: 11px;
}
.cs-row-value {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.cs-row-value {
  color: var(--accent);
  text-decoration: none;
}
.cs-copy {
  flex: none;
  background: #f5f4f7;
  color: #575561;
  font-size: 11px;
  font-weight: 700;
  border-radius: 13px;
  padding: 5px 11px;
}
.cs-copy:active {
  background: #e9e7ef;
}
.cs-empty {
  padding: 18px 14px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.cs-note {
  margin: 8px 0 6px;
  padding: 10px 12px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  background: #fafafc;
  border-top: 1px dashed var(--line);
}
/* 客服按钮固定位置：桌面端排在公告（24px）上方 */
@media (min-width: 700px) {
  .cs-widget {
    bottom: 72px;
  }
}
