.wechat-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(.8rem, 2.4vw, 1.65rem);
  padding: clamp(1rem, 2.6vw, 1.85rem);
  background: var(--warm);
  border-block: 1px solid var(--steel);
}

.wechat-contact-copy { flex: 1 1 15rem; min-width: 0; }
.wechat-contact h2 { color: var(--ink); font-size: clamp(1.25rem, 2.6vw, 1.75rem); }
.wechat-contact p { max-width: 43ch; margin-block-start: .5rem; color: var(--muted); font-size: .95rem; }
.wechat-contact .wechat-contact-purpose { color: var(--ink); font-weight: 620; }
.wechat-contact-original { display: inline-flex; align-items: center; min-height: 44px; margin-block-start: .2rem; font-size: .92rem; }

.wechat-contact-figure {
  flex: 0 1 14rem;
  width: 100%;
  max-width: 14rem;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--white);
}

.wechat-contact-figure img {
  width: 100%;
  height: auto;
}

.wechat-contact-dialog:not([open]) { display: none; }
.wechat-contact-dialog {
  width: min(calc(100% - 1rem), 26rem);
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  padding: clamp(1rem, 4vw, 1.5rem);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--steel);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}

.wechat-contact-dialog::backdrop { background: rgb(32 37 40 / .55); }
html:has(.wechat-contact-dialog[open]) { overflow: hidden; }

.wechat-contact-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.wechat-contact-dialog-header h2 { font-size: clamp(1.35rem, 5vw, 1.8rem); }
.wechat-contact-dialog-header button {
  min-width: 44px;
  min-height: 44px;
  padding-inline: .65rem;
  border: 1px solid var(--steel);
  border-radius: 4px;
  background: var(--white);
  color: var(--accent);
  font: 620 .9rem var(--sans);
  cursor: pointer;
}

.wechat-contact-dialog-header button:hover { border-color: var(--accent); }
.wechat-contact-dialog-header button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wechat-contact-dialog p { color: var(--muted); font-size: .925rem; line-height: 1.5; }
.wechat-contact-dialog .wechat-contact-purpose { margin-top: .45rem; color: var(--ink); }
.wechat-contact-dialog .wechat-contact-figure { margin: 1rem auto; }
