/* Shared footer: three navigation groups and a wider, scannable contact area. */
.contact-footer-inner {
  height: auto;
  padding-top: clamp(34px, 4vw, 58px);
}
.contact-footer-columns {
  display: grid;
  grid-template-columns: repeat(var(--footer-nav-count, 3), minmax(0, 1fr)) minmax(255px, 1.4fr);
  gap: clamp(14px, 1.7vw, 26px);
  align-items: start;
  flex: 0 0 auto;
  min-height: 0;
}
.contact-footer-column {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  gap: clamp(8px, 1vh, 12px);
}
.contact-footer-column:not(:first-child) {
  padding-left: clamp(14px, 1.5vw, 24px);
  border-left: 1px solid rgba(157, 192, 247, .25);
}
.contact-footer-column h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.35;
}
.contact-footer-column > a {
  color: #d2dff7;
  font-size: clamp(14px, 1.05vw, 15px);
  line-height: 1.5;
}
.contact-footer .contact-footer-contact .contact-email {
  font-size: clamp(14px, 1.05vw, 15px);
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  letter-spacing: normal;
}
.contact-footer-qr-list {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 7px;
}
.contact-footer .contact-qr-link {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #d2dff7;
  text-align: center;
}
.contact-qr-frame {
  display: block;
  box-sizing: border-box;
  width: clamp(112px, 8vw, 128px);
  aspect-ratio: 1;
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 6px;
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.contact-qr-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.contact-footer .contact-qr-label { color: #c9d9f0; font-size: 14px; line-height: 1.4; }
.contact-screen .wechat-popover p,
.contact-screen .wechat-popover a { font-size: 14px; line-height: 1.5; }
.contact-footer .contact-qr-link:hover .contact-qr-frame,
.contact-footer .contact-qr-link:focus-visible .contact-qr-frame {
  border-color: #85c9ff;
  box-shadow: 0 0 0 2px rgba(133, 201, 255, .3);
}
.contact-footer .contact-qr-link:focus-visible { outline: 2px solid #a9d7ff; outline-offset: 5px; }
.contact-footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: clamp(36px, 4vw, 58px);
  padding: 22px 0 30px;
}
.contact-legal-links { flex-wrap: wrap; }

/* Inner pages and short screens use natural document height. */
html .contact-screen.overview-contact {
  position: relative;
  inset: auto;
  display: block;
  height: auto;
  min-height: 0;
  -webkit-mask-image: none;
  mask-image: none;
  clip-path: none;
}
html .overview-contact .contact-hero { min-height: clamp(320px, 44vh, 480px); }
html .overview-contact .contact-hero-content {
  height: auto;
  min-height: inherit;
  padding: 60px var(--edge) 50px;
}
.home-page .contact-screen { display: block; height: auto; min-height: 0; }
.home-page .contact-hero { min-height: clamp(360px, 48vh, 500px); }
.home-page .contact-hero-content { height: auto; min-height: inherit; padding: 60px var(--edge) 50px; }

/* Preserve the home page's existing pinned blue transition on desktop. */
@media (min-width: 881px) and (min-height: 687px) {
  html[data-motion='running'] .home-page .contact-screen {
    position: absolute;
    inset: 0;
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 48%) minmax(0, 52%);
  }
  html[data-motion='running'] .home-page .contact-hero { min-height: 0; }
  html[data-motion='running'] .home-page .contact-hero-content {
    height: 100%;
    min-height: 0;
    padding: clamp(18px, 3vh, 36px) var(--edge) 0;
  }
  html[data-motion='running'] .home-page .contact-footer-inner {
    height: 100%;
    padding-top: clamp(14px, 2.2vh, 25px);
  }
  html[data-motion='running'] .home-page .contact-footer-columns { flex: 1 1 auto; }
  html[data-motion='running'] .home-page .contact-footer-legal {
    margin-top: 10px;
    padding: 12px 0 16px;
    font-size: clamp(10px, .85vw, 12px);
  }
}
@media (min-width: 881px) and (min-height: 687px) and (max-height: 849px) {
  html[data-motion='running'] .home-page .contact-screen { grid-template-rows: minmax(0, 40%) minmax(0, 60%); }
  html[data-motion='running'] .home-page .contact-hero h2 { font-size: clamp(42px, 7vh, 60px); }
  html[data-motion='running'] .home-page .contact-subtitle { margin-top: 10px; font-size: 15px; }
  html[data-motion='running'] .home-page .wechat-contact { margin-top: 15px; }
  html[data-motion='running'] .home-page .wechat-contact summary { height: 44px; font-size: 15px; }
}
@media (min-width: 881px) and (min-height: 1000px) {
  html[data-motion='running'] .home-page .contact-screen { grid-template-rows: minmax(0, 54%) minmax(0, 46%); }
}
@media (max-width: 880px) {
  .contact-footer-inner { height: auto; padding: 40px 0 0; }
  .contact-footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
  .contact-footer-column, .contact-footer-column:not(:first-child) { padding: 0; border: 0; }
  .contact-footer-about {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
  }
  .contact-footer-about h3 { grid-column: 1 / -1; }
  .contact-footer-contact { grid-column: 1 / -1; }
  .contact-footer-legal { align-items: flex-start; flex-direction: column; margin-top: 38px; padding: 22px 0 30px; font-size: 12px; }
  .contact-legal-links { justify-content: flex-start; }
}
@media (max-width: 340px) {
  .contact-footer .contact-footer-contact .contact-email { white-space: normal; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-qr-frame { transition: none; }
}
html[data-motion='paused'] .contact-qr-frame { transition: none; }
