/* 只保留一个客服球：隐藏原版 Vue 悬浮，避免重叠 */
#cs-float-container {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

#ly-cs-fab{
  position: fixed !important;
  right: 14px !important;
  top: 28% !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 2147483002 !important;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: #07C160 url(/uploads/cs/wechat-cs.svg) center/cover no-repeat;
  box-shadow: 0 4px 14px rgba(7,193,96,.45);
  cursor: grab;
  padding: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#ly-cs-fab:active { cursor: grabbing; }
#ly-cs-fab span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -18px;
  font-size: 12px;
  color: #07C160;
  font-weight: 700;
  background: rgba(255,255,255,.92);
  padding: 1px 6px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
}

#ly-cs-root { position:fixed; inset:0; z-index:2147483600; font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",sans-serif; }
#ly-cs-root.hidden { display:none!important; }
#ly-cs-mask { position:absolute; inset:0; background:rgba(0,0,0,.4); }
#ly-cs-panel { position:absolute; top:auto; bottom:0; right:0; left:auto; width:min(100vw,480px); height:50vh; max-height:50vh; background:#f5f5f5; display:flex; flex-direction:column; box-shadow:-4px 0 20px rgba(0,0,0,.15); border-radius:16px 16px 0 0; }
#ly-cs-hd { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px 8px 12px; background:linear-gradient(135deg,#2aae67,#07C160); color:#fff; }
#ly-cs-hd h3 { margin:0; font-size:16px; font-weight:700; line-height:1.2; }
#ly-cs-close { width:40px; height:40px; border:0; border-radius:20px; background:rgba(255,255,255,.25); color:#fff; font-size:22px; line-height:1; cursor:pointer; flex:0 0 auto; }
#ly-cs-msgs { flex:1; overflow-y:auto; padding:12px; -webkit-overflow-scrolling:touch; }
.ly-cs-empty { text-align:center; color:#999; padding:48px 12px; font-size:15px; }
.ly-cs-row { display:flex; margin:8px 0; }
.ly-cs-row.mine { justify-content:flex-end; }
.ly-cs-bubble { max-width:78%; padding:10px 12px; border-radius:12px; font-size:15px; line-height:1.45; word-break:break-word; white-space:pre-wrap; }
.ly-cs-row.mine .ly-cs-bubble { background:#95ec69; color:#111; border-bottom-right-radius:4px; }
.ly-cs-row.theirs .ly-cs-bubble { background:#fff; color:#111; border-bottom-left-radius:4px; }
#ly-cs-bar { flex:0 0 auto; display:flex; gap:8px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); background:#fff; border-top:1px solid #eee; }
#ly-cs-input { flex:1; height:42px; border:1px solid #ddd; border-radius:21px; padding:0 14px; font-size:16px; outline:none; }
#ly-cs-send { height:42px; min-width:72px; border:0; border-radius:21px; background:#07C160; color:#fff; font-size:16px; font-weight:600; cursor:pointer; }

#ly-cs-fab .ly-cs-fab-badge{
  position:absolute; top:-3px; right:-3px; width:18px; height:18px; min-width:18px; padding:0;
  border-radius:50%; background:#e53935; color:#fff; font-size:0; line-height:18px;
  text-align:center; font-weight:700; box-shadow:0 0 0 3px #fff, 0 2px 6px rgba(229,57,53,.55);
  pointer-events:none; z-index:3;
}
#ly-cs-fab .ly-cs-fab-badge.has-num{
  width:auto; min-width:22px; height:22px; padding:0 6px; border-radius:11px;
  font-size:13px; line-height:22px; font-weight:800;
}

/* 发图片按钮（中老年：大、好点） */
#ly-cs-img-btn {
  flex: 0 0 auto;
  height: 44px;
  min-width: 56px;
  padding: 0 12px;
  border: 0;
  border-radius: 22px;
  background: #e8f8ef;
  color: #07C160;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
#ly-cs-img-btn:disabled { opacity: .55; }
#ly-cs-bar { align-items: center; }
#ly-cs-input { height: 44px; font-size: 17px; }
#ly-cs-send { height: 44px; min-width: 76px; font-size: 17px; }

.ly-cs-bubble .ly-cs-img {
  display: block;
  max-width: 200px;
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: 8px;
  cursor: zoom-in;
  background: #eee;
}
.ly-cs-bubble:has(.ly-cs-img) {
  padding: 6px;
  background: transparent !important;
}

#ly-cs-lightbox {
  position: fixed; inset: 0; z-index: 2147483700;
  display: flex; align-items: center; justify-content: center;
}
#ly-cs-lightbox.hidden { display: none !important; }
#ly-cs-lightbox .ly-cs-lb-mask {
  position: absolute; inset: 0; background: rgba(0,0,0,.85);
}
#ly-cs-lightbox .ly-cs-lb-img {
  position: relative; z-index: 1;
  max-width: 96vw; max-height: 88vh;
  object-fit: contain; border-radius: 4px;
}
#ly-cs-lightbox .ly-cs-lb-close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 48px; height: 48px; border: 0; border-radius: 24px;
  background: rgba(255,255,255,.25); color: #fff; font-size: 26px; cursor: pointer;
}


/* 标题栏内红胶囊「加客服微信」；黄底引导区已移除 */
#ly-cs-wx { display: none !important; }
.ly-cs-hd-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 8px;
}
.ly-cs-wx-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 17px;
  background: #e53935;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(229,57,53,.35);
}
.ly-cs-wx-btn.hidden { display: none !important; }
#ly-cs-wx-modal {
  position: fixed; inset: 0; z-index: 2147483700;
  display: flex; align-items: center; justify-content: center;
}
#ly-cs-wx-modal.hidden { display: none !important; }
.ly-cs-wx-mask { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.ly-cs-wx-box {
  position: relative; z-index: 1;
  width: min(88vw, 360px);
  background: #fff;
  border-radius: 16px;
  padding: 22px 18px 20px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.ly-cs-wx-x {
  position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; border: 0; border-radius: 20px;
  background: #f5f5f5; color: #333; font-size: 22px; cursor: pointer;
}
.ly-cs-wx-title { font-size: 20px; font-weight: 800; color: #111; margin-bottom: 14px; }
.ly-cs-wx-qr {
  width: min(70vw, 240px); height: min(70vw, 240px);
  object-fit: contain; background: #fafafa; border-radius: 8px;
  border: 1px solid #eee; margin: 0 auto 12px;
}
.ly-cs-wx-id {
  font-size: 18px; font-weight: 700; color: #07C160;
  margin-bottom: 14px; word-break: break-all;
}
.ly-cs-wx-copy {
  width: 100%; height: 48px; border: 0; border-radius: 24px;
  background: #07C160; color: #fff; font-size: 18px; font-weight: 800; cursor: pointer;
}
