/* JitArchives contact consultation popup */
.contact-fab {
  position: fixed;
  right: 24px;
  bottom: 86px;
  z-index: 1200;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: linear-gradient(145deg, #347cff 0%, #165dff 72%, #1451df 100%);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(22, 93, 255, .28), 0 3px 8px rgba(23, 51, 105, .12);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.contact-fab:hover {
  transform: translateY(-3px);
  filter: saturate(1.08);
  box-shadow: 0 16px 34px rgba(22, 93, 255, .34), 0 4px 10px rgba(23, 51, 105, .13);
}
.contact-fab:focus-visible,
.contact-modal-close:focus-visible {
  outline: 3px solid rgba(22, 93, 255, .28);
  outline-offset: 4px;
}
.contact-fab img { width: 25px; height: 25px; }
.contact-fab::before {
  position: absolute;
  right: calc(100% + 11px);
  top: 50%;
  padding: 8px 11px;
  color: #34425a;
  background: #fff;
  border: 1px solid #e7edf7;
  border-radius: 9px;
  box-shadow: 0 7px 20px rgba(25, 48, 91, .1);
  content: "联系咨询";
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(5px, -50%);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}
.contact-fab:hover::before,
.contact-fab:focus-visible::before {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

.contact-modal[hidden] { display: none !important; }
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 25, 49, .48);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.contact-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.contact-dialog {
  width: min(780px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  padding: 28px;
  background: #fff;
  border: 1px solid rgba(224, 233, 248, .95);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(12, 32, 72, .24);
  transform: translateY(14px) scale(.985);
  transition: transform .22s cubic-bezier(.2, .75, .25, 1);
  overscroll-behavior: contain;
}
.contact-modal.is-open .contact-dialog { transform: translateY(0) scale(1); }
.contact-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 7px;
}
.contact-modal-heading { min-width: 0; }
.contact-modal-kicker {
  display: block;
  margin-bottom: 7px;
  color: #3978ee;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.contact-modal-title {
  margin: 0;
  color: #202c42;
  font-size: 25px;
  font-weight: 760;
  letter-spacing: -.5px;
  line-height: 1.35;
}
.contact-modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  color: #78869c;
  background: #f4f7fc;
  border: 1px solid #edf1f7;
  border-radius: 11px;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.contact-modal-close:hover {
  color: #245fe0;
  background: #eaf1ff;
  transform: rotate(90deg);
}
.contact-modal-close img { width: 17px; height: 17px; }
.contact-modal-intro {
  margin: 0 0 21px;
  color: #7d899d;
  font-size: 13px;
  line-height: 1.8;
}
.contact-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.contact-qr-card {
  min-width: 0;
  padding: 17px;
  background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%);
  border: 1px solid #e7edf7;
  border-radius: 16px;
  text-align: center;
}
.contact-qr-card h3 {
  margin: 0 0 5px;
  color: #2c3b55;
  font-size: 15px;
  font-weight: 720;
}
.contact-qr-card p {
  min-height: 20px;
  margin: 0 0 13px;
  color: #8793a6;
  font-size: 11px;
  line-height: 1.65;
}
.contact-qr-frame {
  height: 286px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 12px;
}
.contact-qr-frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.contact-modal-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 17px 0 0;
  color: #9aa5b5;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
.contact-modal-foot img { width: 15px; height: 15px; opacity: .65; }

body.contact-modal-open { overflow: hidden; }

@media (max-width: 680px) {
  .contact-fab {
    right: 16px;
    bottom: 82px;
    width: 54px;
    height: 54px;
  }
  .contact-fab img { width: 23px; height: 23px; }
  .contact-modal {
    align-items: center;
    padding: 12px;
  }
  .contact-dialog {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 19px;
    border-radius: 18px;
  }
  .contact-modal-title { font-size: 22px; }
  .contact-modal-intro { margin-bottom: 15px; font-size: 12px; }
  .contact-qr-grid { grid-template-columns: 1fr; gap: 11px; }
  .contact-qr-card {
    display: block;
    padding: 12px;
    text-align: center;
  }
  .contact-qr-card h3 { margin: 0 0 4px; }
  .contact-qr-card p { min-height: 0; margin: 0 0 10px; }
  .contact-qr-frame {
    height: clamp(190px, 58vw, 230px);
    padding: 6px;
  }
  .contact-modal-foot { margin-top: 12px; font-size: 10px; }
}

@media (max-width: 390px) {
  .contact-qr-card { padding: 10px; }
  .contact-qr-frame { height: clamp(180px, 56vw, 210px); }
  .contact-qr-card h3 { font-size: 13px; }
  .contact-qr-card p { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact-fab,
  .contact-fab::before,
  .contact-modal,
  .contact-dialog,
  .contact-modal-close { transition: none !important; }
}


/* Compact contact dialog: keep the QR codes clear without dominating the page. */
.contact-modal {
  padding: 16px;
}
.contact-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: min(560px, calc(100dvh - 32px));
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 22px 68px rgba(12, 32, 72, .22);
}
.contact-modal-header {
  align-items: center;
  gap: 12px;
  margin-bottom: 5px;
}
.contact-modal-kicker {
  margin-bottom: 4px;
  font-size: 9px;
  letter-spacing: 1.2px;
}
.contact-modal-title {
  font-size: 21px;
  letter-spacing: -.35px;
  line-height: 1.3;
}
.contact-modal-close {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 9px;
}
.contact-modal-close img {
  width: 14px;
  height: 14px;
}
.contact-modal-intro {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.55;
}
.contact-qr-grid {
  gap: 12px;
}
.contact-qr-card {
  padding: 10px;
  border-radius: 12px;
}
.contact-qr-card h3 {
  margin-bottom: 4px;
  font-size: 13px;
}
.contact-qr-card p {
  min-height: 16px;
  margin-bottom: 8px;
  font-size: 10px;
  line-height: 1.5;
}
.contact-qr-frame {
  height: 154px;
  padding: 7px;
  border-radius: 10px;
}
.contact-qr-frame img {
  max-width: 100%;
  max-height: 100%;
}
.contact-modal-foot {
  gap: 6px;
  margin-top: 10px;
  font-size: 10px;
}
.contact-modal-foot img {
  width: 13px;
  height: 13px;
}

@media (max-width: 680px) {
  .contact-modal {
    padding: 12px;
  }
  .contact-dialog {
    width: min(520px, 100%);
    max-height: calc(100dvh - 24px);
    padding: 15px;
    border-radius: 16px;
  }
  .contact-modal-title {
    font-size: 19px;
  }
  .contact-modal-intro {
    margin-bottom: 10px;
    font-size: 11px;
  }
  .contact-qr-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .contact-qr-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(96px, 28vw, 112px);
    align-items: center;
    gap: 3px 10px;
    padding: 10px 12px;
    text-align: left;
  }
  .contact-qr-card h3 {
    grid-column: 1;
    margin: 0 0 3px;
    font-size: 13px;
  }
  .contact-qr-card p {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    margin: 0;
    font-size: 10px;
  }
  .contact-qr-frame {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: clamp(96px, 28vw, 112px);
    height: clamp(96px, 28vw, 112px);
    margin: 0;
    padding: 5px;
  }
  .contact-modal-foot {
    margin-top: 9px;
    font-size: 9px;
  }
}

@media (max-width: 390px) {
  .contact-dialog {
    padding: 12px;
  }
  .contact-qr-card {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 3px 8px;
    padding: 9px 10px;
  }
  .contact-qr-frame {
    width: 96px;
    height: 96px;
  }
}
