/* 统一悬浮联系方式 —— 全站共用 */
.contact-fab {
  position: fixed;
  right: 20px;
  top: 50%;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  transform: translateY(-50%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.fab-item { position: relative; }

.fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px 0 15px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .05em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 30, 60, .24), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.fab svg { width: 20px; height: 20px; flex: 0 0 auto; }

.fab:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 28px rgba(15, 30, 60, .3), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.fab:focus-visible { outline: 2px solid #b85f1f; outline-offset: 3px; }

.fab-wechat { background: linear-gradient(180deg, #2ecf72 0%, #07a34f 100%); }
.fab-phone { background: linear-gradient(180deg, #e08a3c 0%, #b85f1f 100%); }

.fab-panel {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  width: 236px;
  padding: 16px;
  border: 1px solid #e3ddd1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(20, 30, 50, .16);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}

.fab-panel::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-top: 1px solid #e3ddd1;
  border-right: 1px solid #e3ddd1;
  background: #fff;
  transform: rotate(45deg);
}

.fab-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
  transition: opacity .18s ease, transform .18s ease;
}

.panel-qr {
  display: block;
  width: 132px;
  height: 132px;
  margin: 14px auto 0;
  border: 1px solid #e6e6e0;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

#panel-wechat .panel-kicker,
#panel-wechat .panel-value,
#panel-wechat .panel-tip { text-align: center; }

.panel-kicker {
  margin: 0;
  color: #7a7d82;
  font-size: 11.5px;
  letter-spacing: .06em;
}

.panel-value {
  margin: 7px 0 0;
  color: #17181a;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .02em;
  word-break: break-all;
  user-select: all;
}

.panel-copy,
.panel-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  margin-top: 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.panel-copy {
  width: 100%;
  border: 1px solid #d8d9d4;
  background: #f7f7f3;
  color: #2d2f33;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.panel-copy:hover { background: #fff; border-color: #c6cad1; }
.panel-copy.is-done { background: #e9f7ee; border-color: #b7e3c6; color: #1a7f43; }

.panel-actions { display: flex; gap: 8px; margin-top: 12px; }
.panel-actions .panel-copy,
.panel-actions .panel-call { margin-top: 0; }

.panel-call {
  flex: 1;
  border: 1px solid #cf6a24;
  background: #cf6a24;
  color: #fff;
}

.panel-actions .panel-copy { flex: 1; width: auto; }

.panel-tip {
  margin: 10px 0 0;
  color: #7a7d82;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .contact-fab { right: 12px; bottom: 20px; top: auto; gap: 8px; transform: none; }
  .fab { height: 44px; padding: 0 15px 0 13px; font-size: 12.5px; gap: 7px; }
  .fab svg { width: 18px; height: 18px; }
  .fab-panel {
    top: auto;
    right: 0;
    bottom: calc(100% + 10px);
    width: 212px;
    padding: 14px;
    transform: none;
  }
  .fab-panel.is-open { transform: none; }
  .fab-panel::after { display: none; }
}

@media print { .contact-fab { display: none; } }
