.wechat-dialog{box-sizing:border-box;width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:0;border-radius:20px;padding:28px;background:#fff;color:#1b3040;box-shadow:0 20px 100px #132e4855;font-family:system-ui,"Microsoft YaHei",sans-serif;text-align:center}.wechat-dialog::backdrop{background:#132e4870}.wechat-dialog h2{margin:12px 0}.wechat-dialog p{font-size:14px;line-height:1.7}.wechat-brand{font-weight:700;color:#215e87}.wechat-dialog button{padding:10px 18px;border:0;border-radius:10px;background:#215e87;color:#fff;font:inherit;cursor:pointer}.wechat-dialog button:disabled{opacity:.55}.wechat-dialog .wechat-close{position:absolute;top:12px;right:12px;padding:4px 10px;background:transparent;color:#52616e;font-size:26px}.wechat-dialog a{display:block;margin-top:16px;color:#225e8b;font-size:13px}.wechat-dialog button:focus-visible,.wechat-dialog a:focus-visible{outline:3px solid #c27822;outline-offset:3px}#wechat-widget{min-height:40px;max-width:100%;overflow:hidden}#wechat-widget iframe{display:block;width:300px;height:400px;max-width:100%;border:0;margin:auto}#home-auth-status{margin:12px auto;padding:12px 20px;max-width:1100px;color:#7d4224;background:#fff3e4;border-radius:12px}.nav-login{border:0;background:#215e87;color:white;padding:10px 18px;border-radius:12px;cursor:pointer;font:inherit}[hidden]{display:none!important}

#wechat-widget{width:300px;position:relative;margin:0 auto;height:calc(400px * var(--wechat-scale,1))}#wechat-widget:empty{height:40px}#wechat-widget iframe{position:absolute;top:0;left:0;max-width:none;margin:0;transform:scale(var(--wechat-scale,1));transform-origin:top left}
.home-login-card{padding:28px;border:1px solid #d9e3ee;border-radius:22px;background:linear-gradient(145deg,#fff,#f3f7fc);box-shadow:0 14px 40px #1720330a;align-self:start;min-width:0}.home-login-card h2{font-family:inherit;font-size:24px;line-height:1.4;letter-spacing:-.03em;margin:10px 0 12px}.login-emblem{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;color:white;background:#172033;font:italic 30px Georgia,serif;margin-bottom:16px}.login-eyebrow{font-size:12px;font-weight:650;letter-spacing:.08em;color:#647187;margin:0}.login-description,.home-login-card p{color:#647187;font-size:14px;line-height:1.8}.login-consent{display:flex;align-items:flex-start;gap:9px;margin:22px 0 16px;font-size:12px;color:#647187;line-height:1.9}.login-consent input{margin:5px 0 0;width:16px;height:16px;flex:0 0 16px;accent-color:#1d7a68}.login-consent label{cursor:pointer;min-width:0}.login-consent a{color:#215e87;text-decoration:underline;text-underline-offset:3px}.login-primary{display:block;width:100%;padding:13px 16px;border:0;border-radius:12px;background:#1d7a68;color:#fff;text-align:center;font:inherit;font-weight:650;cursor:pointer}.login-primary:disabled{color:#77869a;background:#e6ecf0;cursor:not-allowed}.home-login-card .login-footnote{font-size:11px;margin:12px 0 0}.wechat-panel{text-align:center;color:#1b3040}.wechat-panel h2{font-size:22px}.wechat-panel p{font-size:13px}.wechat-panel .wechat-close{display:block;padding:0;margin-bottom:18px;color:#647187;background:none;border:0;cursor:pointer;font:inherit;font-size:13px}.wechat-panel #wechat-refresh{background:#1d7a68;color:white;border:0;border-radius:10px;padding:10px 18px;font:inherit;cursor:pointer}.wechat-panel #wechat-refresh:disabled{opacity:.5}.wechat-panel>a{display:block;margin-top:14px;font-size:12px;color:#215e87}.hero:has(.home-login-card){grid-template-columns:minmax(0,1fr) minmax(330px,390px);align-items:center}.home-login-card:focus-within{border-color:#a2bbce}@media(max-width:900px){.hero:has(.home-login-card){grid-template-columns:1fr;gap:28px}.home-login-card{width:100%;max-width:470px;justify-self:center}}@media(max-width:400px){.home-login-card{padding:20px}.home-login-card h2{font-size:22px}}

/* The introduction defines a stable frame shared by homepage and account. */
.home-login-card{--login-inset:24px;box-sizing:border-box;position:relative;display:grid;width:100%;max-width:390px;height:auto;padding:var(--login-inset);overflow:visible}
#home-login-intro{min-height:360px;display:flex;flex-direction:column;justify-content:center}
.home-login-card #home-login-intro[hidden]{display:flex!important;visibility:hidden;pointer-events:none}
.home-login-card .wechat-panel,#home-login-summary{position:absolute;inset:var(--login-inset);min-height:0}
#home-login-summary{display:flex;flex-direction:column;justify-content:center}
.wechat-panel{text-align:center}
.wechat-panel .wechat-brand,.wechat-panel>h2,.wechat-panel #wechat-widget+p{display:none}
.wechat-panel .wechat-close{line-height:1.4;margin:0 0 6px}
.wechat-panel #wechat-status{font-size:13px;line-height:1.6;margin:0 0 6px}
.wechat-panel #wechat-widget{width:var(--wechat-width,220px)}
.wechat-panel #wechat-refresh{padding:7px 14px;margin-top:6px}
.wechat-panel>a{font-size:12px;line-height:1.5;margin-top:6px}
.home-login-card .login-consent{font-size:13px;line-height:1.8;margin:16px 0}
.home-login-card .login-footnote{font-size:12px;margin:10px 0 0}
.home-login-card .login-description{margin-bottom:4px}
.home-login-card .login-emblem{margin-bottom:12px}
.hero:has(.home-login-card){align-items:center;padding-top:32px;padding-bottom:32px;gap:40px}
@media(max-width:900px){.hero:has(.home-login-card){grid-template-columns:minmax(0,1fr) minmax(300px,350px);gap:24px}}
@media(max-width:680px){.hero:has(.home-login-card){grid-template-columns:1fr;padding-top:24px;padding-bottom:24px;gap:20px}.home-login-card{--login-inset:20px;justify-self:center}.home-login-card h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* The account page uses a compact modal; homepage QR stays inside its card. */
.wechat-dialog{width:min(340px,calc(100vw - 24px));padding:20px;border-radius:16px}
.wechat-dialog .wechat-brand,.wechat-dialog #wechat-widget+p{display:none}
.wechat-dialog h2{font-size:20px;line-height:1.4;margin:6px 24px 10px}
.wechat-dialog #wechat-status{font-size:12px;line-height:1.6;margin:8px 0}
.wechat-dialog #wechat-widget{width:240px;max-width:100%}
.wechat-dialog #wechat-refresh{font-size:14px;padding:9px 16px;margin-top:8px}
.wechat-dialog>a{font-size:12px;line-height:1.5;margin-top:12px}
@media(max-height:620px){.wechat-dialog #wechat-widget{width:210px}}
@media(max-height:460px){.wechat-dialog #wechat-widget{width:180px}.wechat-dialog{padding:14px}}

/* Tighten desktop section spacing without shrinking the sign-in/QR frame. */
@media(min-width:901px){.hero:has(.home-login-card){padding-top:16px;padding-bottom:16px}}
@media(min-width:901px) and (max-height:820px){.hero:has(.home-login-card){padding-top:12px;padding-bottom:12px}}
