.contact-detail.contact-wechat {
  grid-template-columns: 24px minmax(0, 1fr) 128px;
  align-items: start;
  padding-block: 24px;
}
.contact-wechat .contact-detail-number { align-self: start; }
.contact-wechat .contact-detail-label { color: #f6f2e9; font-size: 17px; margin-bottom: 8px; }
.creative-contact .contact-wechat p { color: #b7b2a8; font-size: 12px; line-height: 1.8; }
.wechat-qr {
  display: block;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
}
.wechat-qr img {
  position: absolute;
  width: 153.076923%;
  max-width: none;
  height: auto;
  left: -28.205128%;
  top: -10.256410%;
}
.wechat-qr-trigger {
  display: block;
  width: 128px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b7b2a8;
  font: inherit;
}
.wechat-qr-caption { display: block; font-size: 10px; line-height: 1.6; margin-top: 7px; text-align: center; }
.footer-wechat {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 42px;
  margin: 16px 0;
  padding: 8px 14px;
  border: 1px solid #b58a5066;
  border-radius: 2px;
  color: #795b32;
  background: transparent;
  font: inherit;
  font-size: 13px;
  transition: background .2s, border-color .2s;
}
.footer-wechat:hover { background: #b58a5014; border-color: #b58a50; }
.footer-wechat svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.footer-wechat svg circle { fill: currentColor; stroke: none; }
html.wechat-dialog-open { overflow: hidden; }
.wechat-dialog {
  width: min(380px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 34px 28px 28px;
  border: 1px solid #e7e3db;
  border-radius: 8px;
  background: #f7f5f0;
  color: #252522;
  text-align: center;
  overflow: auto;
}
.wechat-dialog::backdrop { background: #171714b8; }
.wechat-dialog h2 { margin: 0 28px 7px; font-size: 23px; font-weight: 500; line-height: 1.35; }
.wechat-dialog-description { margin: 0 0 20px; color: #7b786f; font-size: 13px; line-height: 1.7; }
.wechat-dialog .wechat-qr { width: min(100%, 280px); margin-inline: auto; }
.wechat-dialog-close {
  position: absolute;
  inset: 7px 7px auto auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #7b786f;
}
.wechat-dialog-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.wechat-dialog-hint { margin: 16px 0 13px; color: #7b786f; font-size: 12px; line-height: 1.7; }
.wechat-save { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 22px; border: 1px solid #b58a50; color: #795b32; font-size: 13px; }
.wechat-save:hover { background: #b58a5014; }
@media (max-width: 960px) {
  .contact-detail.contact-wechat { grid-template-columns: 16px minmax(0, 1fr) 112px; gap: 11px; }
  .wechat-qr-trigger { width: 112px; }
}
@media (max-width: 600px) {
  .contact-detail.contact-wechat { grid-template-columns: 18px minmax(0, 1fr) 112px; padding-block: 20px; }
  .contact-wechat .contact-detail-label { font-size: 16px; }
  .creative-contact .contact-wechat p { font-size: 11px; }
  .wechat-dialog { padding: 34px 22px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .footer-wechat { transition: none; }
}

.floating-contact {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: grid;
  width: 64px;
  border: 1px solid #e5dfd3;
  border-radius: 8px;
  background: #faf9f5;
  box-shadow: 0 8px 28px #25252212;
}
.floating-contact-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 67px;
  margin: 0;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: #795b32;
  font: inherit;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s, color .2s;
}
.floating-contact-item:first-child { border-radius: 7px 7px 0 0; }
.floating-contact-item:last-child { border-radius: 0 0 7px 7px; }
.floating-contact-item + .floating-contact-item { border-top: 1px solid #e5dfd3; }
.floating-contact-item > svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.floating-contact-item > svg circle { fill: currentColor; stroke: none; }
.floating-contact-item:focus-visible { outline: 2px solid #795b32; outline-offset: 3px; }
.floating-contact-popover {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  display: block;
  width: max-content;
  padding: 18px 22px;
  border: 1px solid #e5dfd3;
  border-radius: 7px;
  background: #faf9f5;
  box-shadow: 0 8px 28px #25252212;
  color: #252522;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(8px, -50%);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.floating-contact-popover strong { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.floating-contact-number { display: block; font-family: Arial, sans-serif; font-size: 22px; letter-spacing: .3px; }
.floating-contact-popover .wechat-qr { width: 176px; margin: 12px auto 10px; }
.floating-contact-item:last-child .floating-contact-popover { top: auto; bottom: 0; transform: translateX(8px); }
.floating-contact-popover small { display: block; color: #7b786f; font-size: 11px; line-height: 1.6; }
html.navigation-open .floating-contact { visibility: hidden; }
@media (hover: hover) and (pointer: fine) {
  .floating-contact-item:hover { background: #f0eadf; color: #654921; }
  .floating-contact-item:is(:hover, :focus-visible) .floating-contact-popover { opacity: 1; visibility: visible; transform: translate(0, -50%); }
  .floating-contact-item:last-child:is(:hover, :focus-visible) .floating-contact-popover { transform: translateX(0); }
}
@media (max-width: 600px) {
  .floating-contact { right: max(8px, env(safe-area-inset-right)); width: 48px; border-radius: 6px; }
  .floating-contact-item { min-height: 54px; padding: 8px 2px; gap: 4px; font-size: 10px; }
  .floating-contact-item > svg { width: 21px; height: 21px; }
  .floating-contact-popover { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .floating-contact-item, .floating-contact-popover { transition: none; }
}
