:root {
  --contact-height: calc(58px + env(safe-area-inset-bottom, 0px));
}
.contact-bar {
  min-height: var(--contact-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--wine);
  font-size: 13px;
  line-height: 1.4;
}
.contact-bar .wrap {
  display: grid;
  grid-template-columns: repeat(4, auto);
  align-items: center;
  justify-content: space-between;
  gap: 7px 12px;
  min-height: 57px;
}
.contact-bar p { margin: 0; min-width: 0; }
.contact-bar small { display: block; color: var(--ink); font-size: 11px; }
.contact-bar a { color: inherit; text-decoration: none; }
.contact-bar a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 620px) {
  :root { --contact-height: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .contact-bar .wrap {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    min-height: 91px;
    padding-block: 7px;
  }
  .contact-bar a { overflow-wrap: anywhere; }
}

:root.home-page {
  --contact-height: calc(68px + env(safe-area-inset-bottom, 0px));
}
.home-page .contact-bar { font-size: 15px; }
.home-page .contact-bar .wrap {
  min-height: calc(var(--contact-height) - env(safe-area-inset-bottom, 0px) - 1px);
}
.home-page .contact-bar small { font-size: 12px; }

.wechat-contact { position: relative; min-width: 0; }
.wechat-contact button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wechat-contact button span {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.wechat-contact button:hover span { text-decoration-color: currentColor; }
.wechat-popover {
  position: absolute;
  inset: auto 0 100% auto;
  width: min(232px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  text-align: center;
  box-shadow: 0 8px 30px #38251b24;
}
.wechat-popover svg { display: block; width: 100%; height: auto; }
.wechat-popover p { margin-top: 3px; }

@media (max-width: 620px) {
  :root.home-page { --contact-height: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .home-page .contact-bar { font-size: 14px; }
  .wechat-popover { inset: auto auto 100% 0; }
}
