* { box-sizing: border-box; }
html { min-width: 0; scroll-padding: 24px; }
body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-canvas);
  font: 14px/1.65 var(--font-sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button, input, a { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--color-focus); }
[hidden] { display: none !important; }
.icon-definitions { width: 0; height: 0; position: absolute; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: 12px; padding: 11px 16px; background: var(--color-surface); z-index: 30; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.page-container { width: 100%; min-height: 100dvh; padding: 0 28px; display: flex; flex-direction: column; }
.site-header { min-height: 148px; display: flex; align-items: center; justify-content: center; }
.brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 23px; line-height: 1; font-weight: 600; }
.account-shell { width: 100%; max-width: 400px; margin: 24px auto 55px; }
.auth-panel { display: flex; justify-content: center; }
.auth-content { width: 100%; min-width: 0; outline: none; }
.auth-navigation { display: flex; justify-content: center; gap: 42px; margin-bottom: 38px; }
.auth-navigation a { min-height: 44px; display: flex; align-items: center; justify-content: center; position: relative; color: var(--color-muted); padding: 8px 0 13px; }
.auth-navigation a[aria-current="page"] { color: var(--color-text); font-weight: 600; }
.auth-navigation a[aria-current="page"]::after { content: ""; position: absolute; height: 2px; background: var(--color-primary); bottom: -1px; left: 0; right: 0; }
.auth-heading { text-align: center; margin-bottom: 36px; }
.auth-heading h1 { font-size: 29px; line-height: 1.5; margin: 0; font-weight: 550; outline: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { margin-bottom: 22px; }
.field > label { display: inline-block; font-size: 14px; margin-bottom: 9px; font-weight: 500; }
.input-wrap { min-width: 0; position: relative; }
.input-wrap input { width: 100%; min-width: 0; height: 50px; border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-surface); color: var(--color-text); padding: 0 15px; font-size: 14px; transition: border-color var(--duration-feedback), box-shadow var(--duration-feedback), background var(--duration-feedback); }
.input-wrap:has(.password-toggle) input { padding-right: 50px; }
/* 已有站点密码切换按钮时，避免 Edge 再显示原生眼睛按钮。 */
.input-wrap:has(.password-toggle) input::-ms-reveal { display: none; }
.input-wrap input::placeholder { color: var(--color-subtle); }
.input-wrap input:hover { border-color: var(--color-muted); }
.input-wrap input:focus { outline: none; border-color: var(--color-focus); background: var(--color-canvas); box-shadow: 0 0 0 3px #00000009; }
.input-wrap input[aria-invalid="true"] { border-color: var(--color-error); }
.input-wrap:has(input:disabled) { opacity: .65; }
.password-toggle { width: 44px; height: 44px; position: absolute; right: 3px; top: 3px; display: grid; place-items: center; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--color-muted); transition: color var(--duration-feedback), background var(--duration-feedback); }
.password-toggle:hover { color: var(--color-primary); background: var(--color-primary-soft); }
.password-toggle .icon { width: 18px; height: 18px; }
.field-hint, .field-error, .code-status { margin: 8px 0 0; font-size: 13px; line-height: 1.75; }
.field-hint { color: var(--color-muted); }
.field-error, .code-status[data-state="error"] { color: var(--color-error); }
.code-status { color: var(--color-success); overflow-wrap: anywhere; }
.form-options { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -2px 0 18px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-muted); cursor: pointer; min-height: 44px; }
.checkbox-label input { width: 15px; height: 15px; margin: 0; accent-color: var(--color-primary); }
.text-button { font-size: 13px; padding: 10px 0 10px 10px; min-height: 44px; color: var(--color-primary); border: 0; background: transparent; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.primary-button { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--color-primary); border-radius: 999px; background: var(--color-primary); color: var(--color-on-primary); font-size: 14px; font-weight: 550; transition: background var(--duration-feedback), transform var(--duration-feedback); }
.primary-button:hover:not(:disabled) { background: var(--color-primary-hover); }
.primary-button:active:not(:disabled) { transform: scale(.99); }
.primary-button:disabled { opacity: .6; }
.button-arrow { display: none; }
.spinner { width: 16px; height: 16px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 800ms linear infinite; }
.verification-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 10px; }
.verification-row input { padding-right: 10px; }
.code-button { min-height: 50px; padding: 0 6px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--color-primary); border: 1px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-primary-soft); font-size: 13px; font-variant-numeric: tabular-nums; }
.code-button:hover:not(:disabled) { border-color: var(--color-primary); }
.code-button:disabled { opacity: .6; }
.code-button .spinner { width: 12px; height: 12px; }
.error-summary, .form-feedback { color: var(--color-error); border: 1px solid color-mix(in srgb, var(--color-error) 35%, transparent); background: var(--color-error-soft); padding: 12px 14px; font-size: 13px; line-height: 1.8; border-radius: var(--radius-control); overflow-wrap: anywhere; }
.error-summary { margin-bottom: 22px; }
.error-summary strong { font-weight: 600; }
.error-summary ul { margin: 5px 0 0; padding-left: 17px; }
.error-summary a { text-decoration: underline; text-underline-offset: 3px; }
.form-feedback { display: flex; gap: 9px; align-items: flex-start; margin-top: 16px; }
.form-feedback > .icon { width: 16px; height: 16px; margin-top: 2px; }
.form-feedback[data-state="success"] { color: var(--color-success); border-color: var(--color-border); background: var(--color-success-soft); }
.site-footer { min-height: 74px; margin-top: auto; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--color-muted); }
.account-dialog { width: calc(100% - 40px); max-width: 430px; max-height: calc(100dvh - 40px); overflow-y: auto; padding: 34px 30px 30px; color: var(--color-text); background: var(--color-canvas); border: 1px solid var(--color-border); border-radius: var(--radius-card); box-shadow: 0 24px 90px #00000020; }
.account-dialog::backdrop { background: #00000055; }
.account-dialog h2 { margin: 0 0 10px; font-size: 25px; font-weight: 600; }
.account-dialog > p { font-size: 14px; line-height: 1.9; color: var(--color-muted); margin: 0 0 24px; }
.dialog-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--color-muted); border-radius: var(--radius-control); }
.dialog-close:hover { background: var(--color-primary-soft); }
.noscript { padding: 20px; text-align: center; color: var(--color-error); }
.human-challenge { margin: 24px 0 18px; display: flex; align-items: flex-end; flex-direction: column; }
.human-challenge img { display: block; width: 100%; height: auto; min-height: 88px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-control); }
#human-answer { text-transform: uppercase; }
.auth-form:not([hidden]) { animation: reveal 180ms var(--ease-enter) both; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 680px) {
  .page-container { padding: 0 25px; }
  .site-header { min-height: 108px; }
  .account-shell { margin: 24px auto 35px; }
  .auth-heading h1 { font-size: 26px; }
  .input-wrap input { font-size: 16px; }
  .input-wrap input::placeholder { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
