:root {
  color-scheme: light dark;
  --page: light-dark(#f5f4f1, #151719);
  --panel: light-dark(#fff, #202326);
  --text: light-dark(#242728, #f0f1ed);
  --subtle: light-dark(#686d6f, #b1b6b8);
  --line: light-dark(#e4e5df, #3c4144);
  --field: light-dark(#fcfcfa, #181b1d);
  --accent: #bf4b13;
  --error: light-dark(#ad302b, #ffaaa0);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--page);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: 28px 32px 24px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
.workspace-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.5; font-weight: 600; letter-spacing: -.3px; }
.brand-divider { margin-inline: 4px; font-weight: 400; color: var(--subtle); }
.brand-mark { display: inline-block; width: 21px; height: 21px; border: 2px solid var(--accent); border-left-color: transparent; border-right-color: transparent; border-radius: 50%; transform: rotate(-18deg); position: relative; }
.brand-mark::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); top: -4px; right: -1px; }
.workspace-main { display: grid; place-items: center; padding-block: 40px; min-width: 0; }
.login-card { width: 100%; max-width: 360px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 8px 30px light-dark(#20202008, #00000018); }
h1 { margin: 0; font-size: 25px; line-height: 1.35; font-weight: 600; letter-spacing: -.8px; }
.description { margin: 8px 0 26px; font-size: 13px; line-height: 1.8; color: var(--subtle); overflow-wrap: anywhere; }
.credential-field { margin: 0 0 18px; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; line-height: 1.5; }
.input-wrap { position: relative; }
input { width: 100%; min-height: 48px; padding: 11px 58px 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--field); color: var(--text); font-size: 16px; line-height: 1.5; }
input::placeholder { color: var(--subtle); font-size: 13px; }
input[aria-invalid="true"] { border-color: var(--error); }
button, a { -webkit-tap-highlight-color: transparent; }
.reveal-button { position: absolute; right: 3px; top: 3px; min-width: 46px; min-height: 44px; padding: 6px; border: 0; border-radius: 6px; color: var(--subtle); background: transparent; font-size: 12px; cursor: pointer; }
.primary-button, .secondary-button { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 11px 16px; border: 0; border-radius: 9px; font-size: 14px; line-height: 1.6; font-weight: 500; text-decoration: none; cursor: pointer; }
.primary-button { position: relative; color: #fff; background: var(--accent); }
.primary-button:hover:not(:disabled) { background: #a13e0e; }
.primary-button:disabled { opacity: .65; cursor: default; }
input:disabled { opacity: .7; }
input:focus-visible { outline: none; background: light-dark(#fff, #262b2e); box-shadow: 0 0 12px light-dark(#20242816, #ffffff15); }
:is(button, a):focus-visible { outline: none; box-shadow: 0 0 12px light-dark(#20242824, #ffffff24); }
.reveal-button:focus-visible, .settings-link:focus-visible { background: light-dark(#2024280a, #ffffff12); color: var(--text); box-shadow: none; }
.secondary-button { margin-top: 10px; background: transparent; color: var(--subtle); }
.secondary-button:hover { background: var(--field); color: var(--text); }
.secondary-button[aria-disabled="true"] { pointer-events: none; opacity: .55; }
.button-arrow { font-size: 18px; line-height: 1; }
.button-spinner { display: none; flex: none; width: 14px; height: 14px; border: 2px solid #ffffff60; border-top-color: #fff; border-radius: 50%; animation: spin .85s linear infinite; }
button[aria-busy="true"] .button-spinner { display: inline-block; }
button[aria-busy="true"] .button-arrow { display: none; }
.notice { margin: 14px 0 0; color: var(--subtle); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.notice.is-error { color: var(--error); }
.save-reminder { margin: -10px 0 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.9; color: var(--subtle); }
footer { text-align: center; font-size: 11px; line-height: 1.6; color: var(--subtle); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) { body { padding: 22px 20px; } .login-card { padding: 27px 23px; } .workspace-main { padding-block: 32px; } }
@media (prefers-reduced-motion: reduce) { .button-spinner { animation: none; } }
.settings-link { display: block; width: fit-content; min-height: 44px; margin: 12px auto -9px; padding: 12px 8px; color: var(--subtle); font-size: 12px; line-height: 20px; text-decoration: none; }
.settings-link:hover { color: var(--text); background: light-dark(#20242808, #ffffff10); border-radius: 6px; text-decoration: none; }
.password-caption { margin: 14px 0 0; color: var(--subtle); font-size: 12px; line-height: 1.8; text-align: center; }
body[data-page="password"] .workspace-main { padding-block: 20px; }
body[data-page="password"] .login-card { padding: 26px 24px; }
body[data-page="password"] .description { margin-bottom: 20px; }
body[data-page="password"] .credential-field { margin-bottom: 14px; }
.plain-input { padding-right: 13px; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; margin-top: 12px; }
.account-actions .settings-link { margin: 0; }
.invitation-code { padding: 14px 12px; margin-bottom: 18px; border-radius: 9px; background: var(--field); color: var(--text); text-align: center; overflow-wrap: anywhere; font-size: 16px; letter-spacing: .5px; }
body[data-page="signup"] .workspace-main { padding-block: 20px; }
body[data-page="signup"] .login-card { padding: 26px 24px; }
body[data-page="signup"] .description { margin-bottom: 20px; }
body[data-page="signup"] .credential-field { margin-bottom: 14px; }
.loading-mark { width: 26px; height: 26px; margin: 24px auto; border: 3px solid var(--line); border-top-color: var(--subtle); border-radius: 50%; animation: spin .85s linear infinite; }
@media (prefers-reduced-motion: reduce) { .loading-mark { animation: none; } }
