/* Shared contact channels. Every QR image includes an unbroken light quiet zone. */
#contact-dock, #site-contact, #site-footer { min-width: 0; overflow-wrap: anywhere; }
.contact-qr { min-width: 0; margin: 0; text-align: center; }
.qr-frame {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 130px;
  aspect-ratio: 1;
  margin-inline: auto;
  padding: 6px;
  overflow: hidden;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  background: #fff;
  color: #536378;
}
.qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
button.qr-frame { cursor: zoom-in; }
button.qr-frame:hover { box-shadow: 0 0 0 2px var(--accent); }
button.qr-frame:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#contact-qr-viewer { width: min(372px, calc(100vw - 28px)); max-height: 92dvh; margin: auto; padding: 0; overflow: auto; }
#contact-qr-viewer::backdrop { background: rgb(12 17 25 / 72%); }
.qr-view-content { padding: clamp(16px, 4vw, 25px); }
.qr-view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.qr-view-head h2 { font: inherit; font-size: 21px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
.qr-view-close { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--pale); color: var(--ink); font: 25px/1 sans-serif; cursor: pointer; }
.qr-view-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qr-view-image { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; padding: 8px; border: 1px solid #dce2e9; border-radius: 8px; background: #fff; -webkit-touch-callout: default; }
#contact-qr-help { margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }
.qr-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  border: 1px dashed #cbd4df;
  border-radius: 4px;
  background: #f3f6f9;
}
.qr-placeholder svg { width: 37%; max-width: 40px; height: auto; }
.qr-placeholder span { font-size: 11px; line-height: 1.2; }
.contact-qr figcaption small { display: block; margin-top: 2px; color: var(--muted); font-weight: 400; font-size: 11px; }
.contact-qr figcaption { margin-top: 7px; font-size: 13px; line-height: 1.45; font-weight: 600; }

.contact-details { display: grid; gap: 7px; margin: 0; }
.contact-details div { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 14px; }
.contact-details dt { color: var(--muted); font-size: 13px; line-height: 1.7; }
.contact-details dd { min-width: 0; margin: 0; font-size: 15px; line-height: 1.55; }
.contact-details dd a { font-weight: 560; }
.contact-details dd a:hover { text-decoration: underline; text-underline-offset: .2em; }
.contact-pending { font-size: 13px; font-weight: 400; color: var(--muted); }

@property --dock-beam-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 38deg;
}
#contact-dock {
  --dock-inset: clamp(12px, 1.7vw, 28px);
  position: fixed;
  z-index: 8;
  right: max(var(--dock-inset), env(safe-area-inset-right));
  bottom: max(var(--dock-inset), env(safe-area-inset-bottom));
  max-width: calc(100vw - 2 * var(--dock-inset));
}
.dock-card {
  position: relative;
  width: max-content;
  max-width: 100%;
  --muted: #394b63;
  isolation: isolate;
  color: #14253c;
  border: 1px solid rgb(238 247 255 / 85%);
  border-radius: 24px;
  background: linear-gradient(140deg, rgb(252 254 255 / 94%), rgb(223 236 255 / 85%));
  -webkit-backdrop-filter: blur(14px) saturate(118%);
  backdrop-filter: blur(14px) saturate(118%);
  box-shadow: 0 12px 34px -12px rgb(14 32 61 / 32%), inset 0 1px 2px #fff9;
}
/* Cut the angular highlight into a narrow rim so the QR images stay clear. */
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
  .dock-card::before, .dock-card::after {
    content: "";
    pointer-events: none;
    position: absolute;
    border-radius: inherit;
    background: conic-gradient(from var(--dock-beam-angle, 38deg),
      transparent 0deg 274deg, rgb(57 102 246 / 24%) 294deg,
      #3472ff 318deg, #55c8ff 338deg, #e4ffff 349deg, #fff 353deg, transparent 359deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
  }
  .dock-card::before { inset: -3px; padding: 5px; border-radius: inherit; opacity: .28; }
  .dock-card::after { inset: -1px; padding: 2px; }
  @media (prefers-reduced-motion: no-preference) {
    .dock-card::before, .dock-card::after {
      animation: dock-beam 6s linear infinite;
    }
  }
}
@keyframes dock-beam {
  from { --dock-beam-angle: 38deg; }
  to { --dock-beam-angle: 398deg; }
}
.dock-card[open] { width: 324px; border-radius: 18px; }
.dock-card summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 44px;
  padding: 6px 13px 6px 7px;
  border-radius: inherit;
  list-style: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.dock-card summary::-webkit-details-marker { display: none; }
#contact-dock summary::after { content: none; }
.dock-card summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.dock-phone {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #e0eafe;
  color: var(--accent);
}
.dock-phone svg { width: 17px; height: 17px; }
.dock-chevron {
  width: 8px;
  height: 8px;
  margin: 3px 3px 0 auto;
  border: solid #465973;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(-45deg);
}
.dock-card[open] summary { padding: 9px 14px 7px 12px; font-size: 16px; }
.dock-card[open] .dock-chevron { margin-top: -3px; transform: rotate(135deg); }
.dock-body {
  display: grid;
  grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr);
  gap: 12px;
  align-items: start;
  margin-inline: 13px;
  padding: 10px 0 12px;
  border-top: 1px solid rgb(75 110 157 / 18%);
  max-height: calc(100dvh - 54px - max(var(--dock-inset), env(safe-area-inset-bottom)) - var(--dock-inset));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dock-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dock-codes .qr-frame { padding: 3px; }
.dock-codes .contact-qr figcaption { font-size: 12px; margin-top: 5px; }
.dock-body .contact-details { gap: 8px; padding-top: 2px; }
.dock-body .contact-details div { display: block; }
.dock-body .contact-details dt { font-size: 12px; line-height: 1.5; }
.dock-body .contact-details dd { font-size: 14px; font-weight: 600; line-height: 1.45; }
.dock-body .contact-pending { font-size: 13px; }
@media print { #contact-dock { display: none; } }
@media (max-width: 480px) and (max-height: 700px) {
  .dock-card:not([open]) summary {
    width: 44px;
    height: 44px;
    justify-content: center;
    gap: 0;
    padding: 4px;
    font-size: 0;
  }
  .dock-card:not([open]) .dock-chevron { display: none; }
}

.contact-section { padding-block: 0 clamp(42px,5vw,82px); }
.contact-banner {
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(105px, 145px);
  justify-content: center;
  align-items: center;
  gap: clamp(20px,3vw,56px);
  padding: clamp(16px,1.6vw,28px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(122deg, color-mix(in srgb, var(--accent) 5%, var(--paper)), var(--pale));
}
.contact-banner-copy { min-width: 0; padding-block: 10px; }
.contact-banner-copy h2 { font-size: clamp(25px,2.2vw,35px); line-height: 1.32; letter-spacing: -.035em; }
.contact-banner-copy > p { margin: 10px 0 17px; line-height: 1.7; color: var(--muted); }
.contact-banner-copy .contact-details { margin-bottom: 19px; }
.contact-banner-copy .btn { min-height: 40px; font-size: 14px; }
.contact-banner-code { width: min(100%,145px); justify-self: center; }
.contact-wechat { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; }
.contact-wechat button { padding: 0; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.contact-copy-status { color: var(--muted); font-size: 12px; }

#site-footer {
  --footer-ink: #eef2f7;
  --footer-dim: #aeb8c6;
  --footer-edge: #ffffff24;
  --muted: var(--footer-dim);
  color: var(--footer-ink);
  background: #17202c;
  border: none;
}
.contact-footer-body {
  display: grid;
  grid-template-columns: minmax(0,1.1fr) minmax(85px,.48fr) minmax(0,1fr);
  gap: clamp(25px,5vw,80px);
  padding-block: clamp(32px,4vw,61px);
}
.footer-wordmark { display: inline-block; }
.footer-wordmark strong, .footer-wordmark small { display: block; }
.footer-wordmark strong { font-size: 24px; line-height: 1.15; letter-spacing: .065em; }
.footer-wordmark small { margin-top: 4px; font-size: 9px; line-height: 1.3; letter-spacing: .21em; }
.footer-tagline { margin-top: 12px; color: var(--footer-dim); font-size: 14px; }
.footer-channels { display: grid; grid-template-columns: repeat(3,minmax(0,88px)); gap: clamp(8px,1.15vw,19px); margin-top: 18px; }
.footer-channels .qr-frame { border-color: transparent; border-radius: 6px; padding: 4px; }
.footer-channels .contact-qr figcaption { color: var(--footer-dim); font-weight: 500; }
.footer-quick { align-content: start; }
.footer-quick a { display: table; margin-bottom: 7px; color: var(--footer-dim); font-size: 14px; }
.contact-footer-body h2 { font-family: inherit; font-size: 16px; font-weight: 650; line-height: 1.5; letter-spacing: .02em; margin: 0 0 12px; }
.footer-info .contact-details div { grid-template-columns: 66px minmax(0,1fr); }
.footer-info .contact-details :is(dt,dd) { font-size: 14px; }
.footer-info .contact-details dd a { font-weight: 500; }
.contact-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; border-top: 1px solid var(--footer-edge); padding-block: 17px; color: var(--footer-dim); }
@media (min-width: 1100px) {
  .contact-footer-bottom { padding-inline-end: 130px; }
  body:has(.dock-card[open]) .contact-footer-bottom { padding-inline-end: 328px; }
}
@media (max-width: 1099px) {
  .contact-footer-bottom { padding-bottom: max(70px, calc(env(safe-area-inset-bottom) + 60px)); }
}
.contact-footer-bottom > div { display: flex; flex-wrap: wrap; gap: 6px 15px; }
.contact-footer-bottom :is(span,a) { font-size: 12px; }
#site-footer a:hover, #site-footer a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1000px) {
  .contact-banner { grid-template-columns: minmax(0,1fr) 104px; gap: 17px; }
  .contact-footer-body { grid-template-columns: minmax(0,1fr) minmax(85px,.4fr) minmax(0,1fr); gap: 26px; }
}
@media (max-width: 730px) {
  .contact-banner { grid-template-columns: minmax(0,1fr) 100px; padding: 15px; gap: 17px 14px; }
  .contact-banner-copy { padding-block: 0; }
  .contact-banner-copy h2 { font-size: 24px; }
  .contact-banner-copy > p { font-size: 15px; }
  .contact-footer-body { grid-template-columns: 1fr 1fr; gap: 25px; }
  .footer-brand-block { grid-column: 1/-1; }
  .footer-info { grid-row: 2; grid-column: 1; }
  .footer-quick { grid-column: 2; }
}
@media (max-width: 480px) {
  .contact-banner { grid-template-columns: minmax(0,1fr) 93px; align-items: start; }
  .contact-banner-copy { display: contents; }
  .contact-banner-copy h2, .contact-banner-copy > p { grid-column: 1/-1; margin: 0; }
  .contact-banner-copy > p { margin-top: -8px; }
  .contact-banner-copy .contact-details { grid-column: 1; align-self: center; margin-bottom: 0; }
  .contact-banner-code { grid-column: 2; grid-row: 3 / span 2; }
  .contact-banner-copy .btn { grid-column: 1; justify-self: start; }
  .contact-banner-copy .contact-details div { gap: 8px; }
  .contact-footer-body { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .footer-quick, .footer-info { grid-column: 1; grid-row: auto; }
  .footer-quick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 17px; }
  .footer-quick h2 { flex-basis: 100%; margin-bottom: 0; }
  .footer-quick a { margin: 0; }
}
