footer .ym-wechat-footer {
  position: absolute;
  top: clamp(0px, calc(7vw - 89.6px), 16px);
  left: 70%;
  transform: translateX(-50%);
  z-index: 5;
  display: grid;
  justify-items: center;
  border: 0;
  color: #63766a;
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
  text-decoration: none;
}

.ym-wechat-footer .ym-wechat-qr {
  width: 100px;
}

@media (min-width: 1152px) {
  .ym-wechat-footer .ym-wechat-qr {
    width: 112px;
  }
}

@media (min-width: 1280px) {
  .ym-wechat-footer .ym-wechat-qr {
    width: 120px;
  }
}

.ym-wechat-qr {
  display: block;
  height: auto;
  border: 0;
}

header.true .side_icon .ym-wechat-float {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  box-sizing: border-box;
  color: #fff;
  font-size: 10px;
  line-height: 13px;
  white-space: nowrap;
  text-decoration: none;
}

.ym-wechat-float svg {
  width: 18px;
  height: 15px;
}

@media (max-width: 960px) {
  html {
    scroll-padding-bottom: calc(144px + env(safe-area-inset-bottom, 0px));
  }

  body::after {
    content: "";
    display: block;
    clear: both;
    height: calc(144px + env(safe-area-inset-bottom, 0px));
  }

  footer .ym-wechat-footer {
    display: none;
  }

  header.true .side_icon.ym-wechat-rail {
    top: auto;
    right: env(safe-area-inset-right, 0px);
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: 48px;
    background: #24b35d;
    z-index: 10;
  }

  header.true .side_icon.ym-wechat-rail > a {
    display: grid;
    place-content: center;
    box-sizing: border-box;
    min-height: 44px;
    border: 0;
  }

  header.true .side_icon.ym-wechat-rail > a + a {
    border-top: 1px solid rgba(255, 255, 255, .8);
  }

  header.true .side_icon.ym-wechat-rail a img {
    width: 44px;
  }

  header.true .side_icon.ym-wechat-rail a:focus-visible {
    outline: 2px solid #173d28;
    outline-offset: -3px;
  }

  header.true #site-navigation {
    z-index: 11;
  }
}

.ym-wechat-dialog:not([open]) {
  display: none;
}

.ym-wechat-dialog {
  box-sizing: border-box;
  width: min(240px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #24362a;
  box-shadow: 0 8px 28px rgba(20, 43, 30, .25);
}

.ym-wechat-dialog::backdrop {
  background: rgba(16, 35, 23, .48);
}

.ym-wechat-dialog-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
}

.ym-wechat-dialog-card h2 {
  color: #21683f;
  font-size: 17px;
  line-height: 24px;
}

.ym-wechat-dialog-card form {
  position: absolute;
  top: 2px;
  right: 2px;
}

.ym-wechat-dialog-card button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #405548;
  font-size: 24px;
  cursor: pointer;
}

.ym-wechat-dialog-card .ym-wechat-qr {
  width: 184px;
  width: clamp(104px, calc(100dvh - 134px), 184px);
  max-width: 100%;
}

.ym-wechat-dialog-card p {
  color: #526359;
  font-size: 13px;
  line-height: 18px;
}

.ym-wechat-dialog-card a {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: #21683f;
  font-size: 14px;
  text-decoration: underline;
}

.ym-wechat-contact {
  display: grid;
  grid-template-columns: max-content minmax(0, max-content);
  grid-template-rows: 1fr 1fr;
  align-items: center;
  justify-content: center;
  gap: 6px 24px;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 24px;
  padding: 16px;
  background: #f4f7f1;
  color: #24362a;
  scroll-margin-top: 86px;
}

.ym-wechat-contact .ym-wechat-qr {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 208px;
  box-sizing: content-box;
  padding: 8px;
  background: #fff;
}

.ym-wechat-contact h2 {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.ym-wechat-contact p {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .ym-wechat-contact .ym-wechat-qr {
    width: 176px;
  }
}

@media (max-width: 520px) {
  .ym-wechat-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 12px 16px;
    border-radius: 14px;
    background: #f2f7f1;
    text-align: center;
  }

  .ym-wechat-contact h2,
  .ym-wechat-contact p {
    align-self: center;
  }

  .ym-wechat-contact h2 {
    color: #21683f;
    font-weight: 700;
  }

  .ym-wechat-contact p {
    color: #42554a;
  }
}

@media (max-width: 960px) and (max-height: 420px) {
  header.true #site-navigation .crosswise {
    max-height: calc(100vh - 160px);
    max-height: calc(100dvh - 160px);
    overflow-y: auto;
  }

  .ym-wechat-contact {
    scroll-margin-top: 124px;
  }

  .ym-wechat-contact .ym-wechat-qr {
    width: clamp(108px, calc(100vh - 135px), 176px);
    width: clamp(108px, calc(100dvh - 135px), 176px);
  }
}
