/* cachebust 20251127m69515 */
/* wecom dock v11: geo + card stacked together */
#ky-wecom-dock {
  position: fixed !important;
  right: 16px !important;
  bottom: 16px !important;
  left: auto !important;
  top: auto !important;
  z-index: 2147483646 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 10px !important;
  width: auto !important;
  max-width: calc(100vw - 32px) !important;
  pointer-events: none !important;
  transform: none !important;
}

#ky-wecom-dock > * {
  pointer-events: auto !important;
}

/* WeCom launcher lives in dock — kill its own fixed positioning */
#ky-wecom-dock #geo-website-wecom,
#geo-website-wecom.ky-in-dock {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 0 !important;
  max-width: none !important;
  z-index: 2 !important;
  width: 56px !important;
  height: 56px !important;
}

/* our card image (replaces aifanfan embed when missing) */
#ky-wecom-card {
  position: relative !important;
  width: 190px !important;
  height: 314px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #fff url("/public/static/officialweb/img/wecom-card.jpg?v=4") center top / 100% 100% no-repeat !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.16) !important;
  z-index: 1 !important;
  transition: opacity .2s ease, transform .25s ease, max-height .25s ease !important;
  transform-origin: right bottom !important;
}

body.ky-card-collapsed #ky-wecom-card {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

/* hide leftover aifanfan card if any — dock owns the card */
#aff-im-root .embed-icon,
.embed-icon,
#aff-im-root .embed-icon-default,
.embed-icon-default {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

#aff-im-root .embed-messageboard,
#aff-im-root .embed-messageboard-base,
.embed-messageboard,
.embed-messageboard-base,
#aff-im-root .embed-hot-issue,
.embed-hot-issue,
.embed-hot-issue-item,
.embed-hot-issue-icon,
.embed-hot-issue-text,
#aff-im-root .embed-chat-container,
.embed-chat-container,
.embed-chat,
.embed-chat-tip,
#aff-im-root .embed-icon-unread-num,
.embed-icon-unread-num {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -99999px !important;
}

#ky-card-toggle {
  position: relative !important;
  right: auto !important;
  bottom: auto !important;
  width: 56px !important;
  height: 56px !important;
  border: 0 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.18) !important;
  background: #ff8813 url("/public/static/officialweb/img/wecom-card.jpg?v=4") center/cover no-repeat !important;
  color: #fff !important;
  font-size: 12px !important;
  line-height: 1 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}
#ky-card-toggle::after {
  content: "名片";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,136,19,.82);
  font-weight: 600;
  letter-spacing: 1px;
}
body.ky-card-collapsed #ky-card-toggle {
  display: flex !important;
}

#ky-card-close {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  top: -13px !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  width: 26px !important;
  height: 26px !important;
  border: 0 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 5 !important;
  cursor: pointer !important;
  background: #ffffff !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.2) !important;
  transition: transform .15s ease, box-shadow .15s ease !important;
}
#ky-card-close::before,
#ky-card-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: #666666;
  transform-origin: center;
}
#ky-card-close::before { transform: translate(-50%, -50%) rotate(45deg); }
#ky-card-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
#ky-card-close:hover {
  transform: translateX(-50%) scale(1.08) !important;
  box-shadow: 0 3px 12px rgba(0,0,0,.28) !important;
}
#ky-card-close:hover::before,
#ky-card-close:hover::after {
  background: #ff8813;
}
body.ky-card-collapsed #ky-card-close {
  display: none !important;
}

/* fallback: if geo not yet in dock, keep it above dock footprint */
#geo-website-wecom:not(.ky-in-dock) {
  position: fixed !important;
  right: 16px !important;
  left: auto !important;
  top: auto !important;
  bottom: calc(16px + 314px + 10px) !important;
  transform: none !important;
  z-index: 2147483647 !important;
}
body.ky-card-collapsed #geo-website-wecom:not(.ky-in-dock) {
  bottom: calc(16px + 56px + 10px) !important;
}
