/* Only the existing login card changes. The original background and motion remain. */
body.auth-mode .auth-card .auth-methods,
body.auth-mode .auth-card .auth-submethods { display:flex; gap:8px; margin:0 0 16px; }
body.auth-mode .auth-card .auth-methods button,
body.auth-mode .auth-card .auth-submethods button {
  flex:1; min-height:38px; border:1px solid #8ba997; border-radius:7px;
  background:transparent; color:#c5d9cb; font-size:13px; font-weight:600; cursor:pointer;
}
body.auth-mode .auth-card .auth-submethods button { min-height:32px; font-size:12px; }
body.auth-mode .auth-card .auth-methods button.active,
body.auth-mode .auth-card .auth-submethods button.active { background:#245642; border-color:#5c9d77; color:#fff; }
body.auth-mode .auth-card .auth-code-row { display:flex; gap:8px; }
body.auth-mode .auth-card .auth-code-row input { min-width:0; flex:1; }
body.auth-mode .auth-card .auth-code-row button { flex:0 0 102px; border:1px solid #6a9f7c; border-radius:7px; background:#e3f1e5; color:#235c3e; font-size:12px; font-weight:700; cursor:pointer; }
body.auth-mode .auth-card .auth-code-row button:disabled { opacity:.52; cursor:not-allowed; }
body.auth-mode .auth-card .auth-inline-row { display:flex; justify-content:space-between; align-items:center; margin:0 0 12px; color:#c5d9cb; font-size:12px; }
body.auth-mode .auth-card .auth-inline-row label { display:flex; align-items:center; gap:5px; }
body.auth-mode .auth-card .auth-inline-row input { accent-color:#388656; }
body.auth-mode .auth-card .auth-inline-row button,
body.auth-mode .auth-card .auth-text-button { border:0; background:none; color:#9cdab1; text-decoration:underline; cursor:pointer; font-size:12px; }
body.auth-mode .auth-card .auth-text-button { display:block; margin:13px auto 0; }
body.auth-mode .auth-card #auth-wechat-description,
body.auth-mode .auth-card #auth-wechat-status { margin:8px 0 14px; color:#cadbce; font-size:12px; line-height:1.6; }
body.auth-mode .auth-card #auth-wechat-status { min-height:18px; }
body.auth-mode .auth-card .auth-invite-notice { margin-bottom:14px; padding:9px 11px; border:1px solid #6aa77b; border-radius:7px; background:#e8f4e9; color:#245c3c; font-size:12px; font-weight:700; line-height:1.5; }
body.auth-mode .auth-card .auth-migration-note { color:#9fc8ab; font-size:12px; line-height:1.6; }
body.auth-mode .auth-card .legal-consent-fields { margin:8px 0; }
body.auth-mode .auth-card .legal-consent-fields button.legal-read-link { padding:0; border:0; background:transparent; color:#8ddaa7; text-decoration:underline; font:inherit; cursor:pointer; }
body.auth-mode .auth-card .legal-consent-fields input[type=checkbox] { accent-color:#378252 !important; }
body.auth-mode .auth-card :is(#auth-login-code-fields,#auth-login-password-fields,#auth-phone-panel,#auth-wechat-panel,#auth-reset-panel,#auth-admin-panel,#auth-migration-panel,.auth-methods,.form-group,#reg-use-wechat-name,#reg-name-optional)[hidden] { display:none !important; }
body.auth-mode .auth-card :is(.auth-methods,.auth-submethods) button:focus-visible,
body.auth-mode .auth-card .auth-code-row button:focus-visible { outline:2px solid #49986d; outline-offset:2px; }

html[data-theme="light"] body.auth-mode .auth-card .tab-btn.active { color:#235a3d !important; border-color:#a5c4aa !important; background:#f6fbf5 !important; }
html[data-theme="light"] body.auth-mode .auth-card .auth-methods button,
html[data-theme="light"] body.auth-mode .auth-card .auth-submethods button { color:#456a51; border-color:#c3d5c7; }
html[data-theme="light"] body.auth-mode .auth-card .auth-methods button.active,
html[data-theme="light"] body.auth-mode .auth-card .auth-submethods button.active { color:#fff; background:#245642; border-color:#245642; }
html[data-theme="light"] body.auth-mode .auth-card .form-btn { background:#1e493b !important; background-image:none !important; color:#fff !important; border-color:#1e493b !important; box-shadow:0 5px 15px #173c3527 !important; }
html[data-theme="light"] body.auth-mode .auth-card .form-btn:hover { background:#2a624b !important; background-image:none !important; }
html[data-theme="light"] body.auth-mode .auth-card .auth-password-toggle { color:#245b3d !important; background:#e5f0e7 !important; }
html[data-theme="light"] body.auth-mode .auth-card .auth-inline-row,
html[data-theme="light"] body.auth-mode .auth-card :is(#auth-wechat-description,#auth-wechat-status,.auth-migration-note) { color:#456a51; }
html[data-theme="light"] body.auth-mode .auth-card .auth-inline-row button,
html[data-theme="light"] body.auth-mode .auth-card .auth-text-button,
html[data-theme="light"] body.auth-mode .auth-card .legal-consent-fields button.legal-read-link { color:#236b43; }
html[data-theme="light"] body.auth-mode .auth-card .auth-code-row button { background:#e5f2e8; color:#225d3d; border-color:#9dc8a6; }
html[data-theme="dark"] body.auth-mode .auth-card .auth-code-row button { background:#234631; color:#e8f3eb; }
html[data-theme="dark"] body.auth-mode .auth-card .auth-invite-notice { background:#1e452d; color:#e7f2e8; }
html[data-theme="dark"] body.auth-mode .auth-card .legal-consent-fields { background:#14291e; border-color:#5b8d67; color:#e7f1e8; }
html[data-theme="dark"] body.auth-mode .auth-card .legal-consent-fields :is(p,legend,label) { color:#e7f1e8; }
html[data-theme="dark"] body.auth-mode .auth-card .form-btn { background:#2d7650 !important; background-image:none !important; color:#fff !important; }
@media (min-width:701px) {
  html[data-theme] body.auth-mode:not(.auth-register-mode) #auth-view { padding-top:20px !important; padding-bottom:20px !important; }
  html[data-theme] body.auth-mode:not(.auth-register-mode) .auth-card { padding-bottom:12px !important; }
  html[data-theme] body.auth-mode:not(.auth-register-mode) .auth-card-intro { margin-bottom:9px !important; padding-top:15px !important; padding-bottom:12px !important; }
  html[data-theme] body.auth-mode:not(.auth-register-mode) .auth-card .tabs { margin-bottom:9px !important; }
  body.auth-mode:not(.auth-register-mode) .auth-card :is(.auth-methods,.auth-submethods) { margin-bottom:9px; }
  body.auth-mode:not(.auth-register-mode) .auth-card .form-group { margin-bottom:9px; }
  body.auth-mode:not(.auth-register-mode) .auth-card .form-btn { margin-top:4px; }
}
@media (max-width:700px) { body.auth-mode .auth-card { max-height:none; } body.auth-mode .auth-card .registration-fields-grid { grid-template-columns:1fr; } }

/* Approved QR-first card. Keep the original hero and motion layers. */
body.auth-mode .auth-card [hidden],body.auth-mode .auth-card .tabs[hidden]{display:none!important}
html[data-theme] body.auth-mode .auth-panel{width:440px!important;max-width:100%!important;flex:0 1 440px!important}
html[data-theme] body.auth-mode .auth-card{padding:28px 32px 24px!important;border-radius:20px!important}
body.auth-mode .auth-card-brand{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 0 25px;color:#bdd9c8}
.auth-card-brand strong{font-family:SimSun,serif;font-size:25px;letter-spacing:3px}.auth-card-brand small{display:block;font-size:10px;letter-spacing:1.5px;margin-top:6px}.auth-two-stones{display:grid;place-items:center;width:43px;height:43px;border-radius:12px;background:#285342;color:#ecf3eb;font-size:23px;letter-spacing:-10px;padding-right:10px}
html[data-theme=light] .auth-card-brand{color:#205742!important}
body.auth-mode .auth-card .auth-methods{padding:4px;border:1px solid #6b8b79;border-radius:10px;gap:4px;margin-bottom:22px}
body.auth-mode .auth-card .auth-methods button{border:0;min-height:42px}.login-consent{border-top:1px solid #8aaa904f;margin-top:20px;padding-top:16px;font-size:11px;line-height:1.9;color:#bdd9c8;text-align:center}.login-consent label{display:inline!important}.login-consent input{width:15px!important;height:15px;accent-color:#205742;vertical-align:middle}.login-consent button{border:0;background:none;padding:0;font:inherit;color:inherit;cursor:pointer;font-weight:600}
html[data-theme=light] .login-consent{color:#426653}#auth-qr-container{height:310px;width:300px;max-width:100%;margin:auto;display:grid;place-items:center;border-radius:12px;background:#fff;overflow:hidden;color:#315e49}#auth-qr-container iframe{width:300px;height:400px;border:0;align-self:start}#auth-qr-gate{font-size:13px}#auth-wechat-panel{text-align:center}
body.auth-register-mode .registration-layout{display:block!important}body.auth-register-mode .registration-fields-grid{grid-template-columns:1fr!important}body.auth-register-mode .registration-section-title{display:none}body.auth-register-mode .registration-consent-column{border:0;padding:0}
#initial-phone-password input{width:100%;padding:12px;border:1px solid #91b29c;border-radius:8px}#initial-phone-password button{margin-top:12px}
@media(max-width:700px){html[data-theme] body.auth-mode .auth-card{padding:24px 20px!important}body.auth-mode .auth-shell{width:100%!important}.login-consent{font-size:11px}}

body.auth-mode .auth-card-brand{gap:15px;margin-bottom:26px;text-align:left}.auth-login-mark{width:76px;height:76px;flex:none;filter:drop-shadow(0 5px 8px #103c2520)}body.auth-mode .auth-card-brand strong{display:block;font-size:32px;line-height:1.25;letter-spacing:4px;color:#d6eedf}.auth-brand-en{display:block;font-size:15px;letter-spacing:2.5px;font-weight:700;line-height:1.5;color:#a8cfb9}.auth-card-brand small{font-size:10px;letter-spacing:1px;color:#a5bbae}html[data-theme=light] body.auth-mode .auth-card-brand strong{color:#194d3c}html[data-theme=light] .auth-brand-en{color:#356953}html[data-theme=light] .auth-card-brand small{color:#607c6b}@media(max-width:400px){.auth-login-mark{width:64px;height:64px}body.auth-mode .auth-card-brand strong{font-size:29px;letter-spacing:2px}}

@media(max-width:700px){html[data-theme] body.auth-mode .auth-shell{display:block!important;min-width:0!important}html[data-theme] body.auth-mode .auth-panel{width:100%!important;min-width:0!important;max-width:100%!important}html[data-theme] body.auth-mode .auth-card{width:100%!important;min-width:0!important}}
/* Registration: readable native rank choices and a compact consent row. */
html[data-theme] body.auth-mode #reg-rank { color:#e8f3ec!important; background:#183b2e!important; color-scheme:dark; opacity:1; }
html[data-theme] body.auth-mode #reg-rank :is(option,optgroup) { color:#e8f3ec; background:#183b2e; }
html[data-theme=light] body.auth-mode #reg-rank { color:#214d3c!important; background:#fffefa!important; color-scheme:light; }
html[data-theme=light] body.auth-mode #reg-rank :is(option,optgroup) { color:#214d3c; background:#fffefa; }
body.auth-register-mode #register-form .legal-consent-fields { height:auto; padding:5px 8px; display:flex; flex-wrap:wrap; gap:0 12px; font-size:12px; }
body.auth-register-mode #register-form .legal-consent-fields legend { font-size:11px; }
body.auth-register-mode #register-form .legal-consent-fields label { margin:0; min-height:32px; align-items:center; gap:5px; }
body.auth-register-mode #register-form .legal-consent-fields input { width:16px; height:16px; flex:0 0 16px; margin:0; accent-color:#287552; }
@media(max-width:700px) {
  html[data-theme] body.auth-register-mode #auth-view { padding:12px 12px 34px!important; align-items:flex-start!important; overflow-y:auto; }
  html[data-theme] body.auth-register-mode .auth-card { padding:14px 16px!important; }
  body.auth-register-mode .auth-card-brand { margin-bottom:8px; gap:10px; }
  body.auth-register-mode .auth-login-mark { width:44px; height:44px; }
  body.auth-register-mode .auth-card-brand strong { font-size:25px; }
  body.auth-register-mode .auth-card-brand small { display:none; }
  body.auth-register-mode #register-form > .auth-text-button { margin:0 0 6px; }
  body.auth-register-mode #register-status { margin:0 0 8px; padding:6px 8px; font-size:11px; line-height:1.4; }
  body.auth-register-mode #register-form .registration-fields-grid { gap:0; }
  body.auth-register-mode #register-form .form-group { margin-bottom:7px; }
  body.auth-register-mode #register-form .form-group label { font-size:11px; margin-bottom:3px; line-height:1.3; letter-spacing:0; }
  body.auth-register-mode #register-form .form-group :is(input,select) { height:36px; min-height:36px; padding:5px 9px; font-size:16px; line-height:24px; }
  body.auth-register-mode #reg-use-wechat-name { margin:3px 0; }
  body.auth-register-mode #register-form > .form-err { margin:4px 0; min-height:0; }
  body.auth-register-mode #register-form > .form-err:empty { display:none; }
  body.auth-register-mode #register-form > .form-btn { margin:8px 0 0; width:100%; max-width:none; min-height:44px; padding:10px; }
}

/* Full WeChat document; scale the frame rather than clipping the QR. */
#auth-qr-container{width:300px;height:400px;max-width:100%;position:relative;overflow:hidden;display:block}
#auth-qr-container iframe{display:block;width:300px;height:400px;max-width:none;position:absolute;top:0;left:50%;transform:translateX(-50%);transform-origin:top center}
#auth-qr-gate{padding:100px 16px;text-align:center}
@media(max-width:380px){#auth-qr-container{width:255px;height:340px}#auth-qr-container iframe{transform:translateX(-50%) scale(.85)}}
.service-contact-card{display:grid;justify-items:center;gap:12px;padding:16px;text-align:center;color:var(--ink)}
.service-contact-card img{width:min(260px,100%);height:auto;object-fit:contain;border-radius:8px}
.service-contact-card p{margin:0;overflow-wrap:anywhere}
#site-service-modal .service-contact-qr{position:relative;width:min(300px,100%);aspect-ratio:1;overflow:hidden;background:#fff;border-radius:8px}
#site-service-modal .service-contact-qr img{position:absolute;width:125.142857%;max-width:none;height:auto;left:-12.571429%;top:-49.428571%;border-radius:0;object-fit:contain}
#site-message-badge{width:8px!important;height:8px!important;min-width:8px!important;padding:0!important;border-radius:50%;background:#26985a!important}
#announce-modal .modal{width:min(480px,94vw)!important;max-height:85dvh;overflow:auto}
#announce-content{white-space:pre-wrap;overflow-wrap:anywhere}

@media(max-width:700px){#auth-qr-container{width:255px;height:340px}#auth-qr-container iframe{transform:translateX(-50%) scale(.85)}}

/* Fixed WeChat viewport: QR and signed-in quick login both remain complete. */
body.auth-mode #auth-wechat-panel{display:grid;place-items:center;margin:0;padding:0}
body.auth-mode #auth-wechat-panel[hidden]{display:none!important}
body.auth-mode #auth-qr-container{width:240px;height:304px;max-width:100%;margin:0 auto;position:relative;overflow:hidden;overscroll-behavior:none;touch-action:manipulation;display:block;border:1px solid #d9e1d9;border-radius:8px;background:#fff;box-sizing:border-box}
body.auth-mode #auth-qr-container iframe{display:block;width:300px;height:380px;max-width:none;position:absolute;left:50%;top:0;border:0;overflow:hidden;transform:translateX(-50%) scale(.8);transform-origin:top center}
body.auth-mode :is(#auth-qr-gate,#auth-wechat-description,#auth-wechat-start,#auth-wechat-status){display:none!important}
@media(max-width:380px){body.auth-mode #auth-qr-container{width:222px;height:282px}body.auth-mode #auth-qr-container iframe{transform:translateX(-50%) scale(.74)}}

/* Keep the provider frame square: the QR and the quick-login card sit in the
 * same centered viewport instead of leaving a tall empty lower half. */
body.auth-mode #auth-qr-container {
  width:240px;
  height:240px;
  display:block;
  position:relative;
  overflow:hidden;
  margin:0 auto;
  box-sizing:border-box;
}
body.auth-mode #auth-qr-container iframe {
  width:300px;
  height:380px;
  left:50%;
  top:28px;
  transform:translateX(-50%) scale(.8);
  transform-origin:top center;
}
@media(max-width:380px){
  body.auth-mode #auth-qr-container { width:222px; height:222px; }
  body.auth-mode #auth-qr-container iframe { top:22px; transform:translateX(-50%) scale(.74); }
}

body.auth-mode .auth-card .auth-remember { display:flex; align-items:center; gap:6px; margin:0 0 12px; font-size:12px; }
body.auth-mode .auth-card .auth-remember input[type=checkbox] { width:auto; flex:none; margin:0; accent-color:#388656; }
body.auth-mode .auth-card .auth-remember { color:#c5d9cb; line-height:1.5; }
html[data-theme="light"] body.auth-mode .auth-card .auth-remember { color:#375a46; }

/* 手机号找回密码：松烟浅底，入口在两种登录方式下均可见。 */
body.auth-mode .auth-card #auth-reset-panel{padding:18px;background:#fffdf7;border:1px solid #d4c29e;border-radius:12px;color:#3c3325;}
body.auth-mode .auth-card #auth-reset-panel h3{font-size:20px;color:#3c3325;margin:0 0 8px;}
body.auth-mode .auth-card #auth-reset-panel .auth-reset-note{font-size:13px;color:#78674b;margin:0 0 16px;}
body.auth-mode .auth-card #auth-reset-panel .form-group label{color:#62533c;}
body.auth-mode .auth-card #auth-reset-panel input{background:#fbf7ec;color:#302a20;border:1px solid #d9cdb0;}
body.auth-mode .auth-card #auth-reset-panel button{color:#715525;}
body.auth-mode .auth-card #auth-reset-panel .form-btn{background:linear-gradient(110deg,#b49455,#957035);color:#fffdf5;}
body.auth-mode .auth-card #auth-reset-launch{font-size:14px;margin:6px auto 12px;}
body.auth-mode .auth-card #auth-reset-launch[hidden]{display:none!important;}
