/* Native modal keeps focus inside; the launcher remains a normal contact link without JS. */
.wechat-launcher { position: fixed; z-index: 60; right: max(22px, env(safe-area-inset-right)); bottom: max(32px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 14px 12px; min-width: 78px; min-height: 84px; border: 1px solid #4776ff; border-radius: 25px; color: #fff; background: #285cf6; box-shadow: 0 10px 32px -12px #234b9d; text-decoration: none; transition: background .2s, transform .2s; }
.wechat-launcher:hover { background: #204fd5; transform: translateY(-3px); }
.wechat-launcher svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.wechat-launcher svg circle { fill: currentColor; stroke: none; }
.wechat-launcher span { font-size: .875rem; font-weight: 600; line-height: 1.5; }
.wechat-launcher:focus-visible, .wechat-dialog :focus-visible { outline: 3px solid #285cf6; outline-offset: 5px; }
.wechat-launcher:focus-visible { outline-color: #202a2f; }
.wechat-dialog { width: min(460px, calc(100% - 28px)); max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 26px; border: 1px solid #dbe3e6; border-radius: 30px; background: #fff; color: #202a2f; box-shadow: 0 24px 90px -20px #13263780; overflow-y: auto; overscroll-behavior: contain; }
.wechat-dialog:not([open]) { display: none; }
.wechat-dialog::backdrop { background: #14252cb3; }
body.wechat-modal-open { overflow: hidden; }
.wechat-dialog__header { display: flex; align-items: flex-start; gap: 16px; }
.wechat-dialog__header > div { flex: 1; min-width: 0; }
.wechat-dialog__header p { margin: 0 0 10px; font-size: .875rem; line-height: 1.6; color: #536169; }
.wechat-dialog__header h2 { font-size: 1.5rem; letter-spacing: -.025em; line-height: 1.35; }
.wechat-dialog__close { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid #d9e2e6; border-radius: 50%; background: #f1f5f5; color: #202a2f; cursor: pointer; font-size: 1.75rem; line-height: 1; }
.wechat-dialog__close:hover { background: #e2eaf1; }
.wechat-dialog__image { display: block; width: 270px; max-width: 100%; height: auto; margin: 16px auto; object-fit: contain; background: #fff; }
.wechat-dialog > p { font-size: 1rem; color: #536169; line-height: 1.8; overflow-wrap: anywhere; }
.wechat-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.wechat-dialog__actions a { display: flex; align-items: center; justify-content: center; gap: 14px; flex: 1 1 150px; min-height: 48px; padding: 12px 16px; border-radius: 100px; background: #285cf6; color: #fff; text-decoration: none; font-size: 1rem; }
.wechat-dialog__actions a:last-child { color: #234882; background: #edf2f7; }
.wechat-dialog > .wechat-dialog__privacy { margin-top: 16px; font-size: .875rem; }
/* Keep footer links clear of the floating control. */
.site-footer { padding-bottom: 112px; }
@media (max-width: 640px) {
    .wechat-launcher { right: max(14px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); border-radius: 50%; width: 58px; height: 58px; min-width: 58px; min-height: 58px; padding: 12px; }
    .wechat-launcher span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .wechat-dialog { padding: 20px; border-radius: 24px; }
    .wechat-dialog__header h2 { font-size: 1.375rem; }
    .site-footer { padding-bottom: 84px; }
}
@media (max-width: 420px) {
    .wechat-dialog__actions { display: grid; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .wechat-launcher { transition: none; } .wechat-launcher:hover { transform: none; } }
@media print { .wechat-launcher, .wechat-dialog { display: none !important; } .site-footer { padding-bottom: 0; } }