@font-face {
  font-family: "Labomni Aspekta";
  src: url("./brand/aspekta-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Scoped component styles shared by the homepage overlay and direct entry. */
#login.auth-dialog {
  --auth-ink: #1c1c1c;
  --auth-muted: #63666b;
  --auth-border: #dfe1e3;
  --auth-danger: #a13730;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: min(440px, calc(100% - 32px));
  max-width: 440px;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 50px 32px 28px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--auth-ink);
  box-shadow: 0 18px 70px #10131826;
  font: 400 14px/1.5 "Labomni Aspekta", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: weight;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bfc2c6 #fff;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
}
/* A translucent frosted scrim retains the homepage's colors and spatial context. */
#login.auth-dialog::backdrop { background: rgb(15 17 21 / .44); }
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  #login.auth-dialog::backdrop { background: rgb(22 26 33 / .26); backdrop-filter: blur(8px) saturate(.8); -webkit-backdrop-filter: blur(8px) saturate(.8); }
}
#login.auth-dialog *, #login.auth-dialog *::before, #login.auth-dialog *::after { box-sizing: border-box; }
#login.auth-dialog [hidden] { display: none !important; }
#login :where(p, a, label, span) { font-family: inherit; }
#login :where(button, input) { font: inherit; -webkit-tap-highlight-color: transparent; }
#login :where(button, a) { touch-action: manipulation; }
#login button { cursor: pointer; }
#login button:disabled { cursor: default; }
#login ::selection { background: #dce7ff; color: #15171b; }
#login :is(button, a):focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }
#login .auth-topbar { position: absolute; inset: 8px 12px auto; display: flex; justify-content: space-between; align-items: center; }
#login .auth-topbar button { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border: 0; color: var(--auth-muted); background: transparent; }
#login .auth-language { border-radius: 0; font-size: 12px; }
#login .auth-language:is(:hover, :active, :focus-visible) { color: var(--auth-ink); background: transparent; text-decoration: underline; text-underline-offset: 3px; }
#login .auth-language:focus-visible { outline: none; text-decoration-thickness: 2px; }
#login .auth-close { border-radius: 50%; }
#login .auth-close:hover { color: var(--auth-ink); background: #f3f3f4; }
#login .auth-close svg { display: block; width: 20px; height: 20px; }
#login #auth-entry-title { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; }
#login .auth-join-prefix { color: #50545a; font-size: 25px; font-weight: 400; line-height: 1.25; letter-spacing: 0; white-space: nowrap; }
#login .auth-brand { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 146px; min-height: 44px; margin: 0; }
#login .auth-brand img { position: static; display: block; width: 146px; height: auto; max-width: none; transform: none; user-select: none; -webkit-user-drag: none; }
#login .auth-heading { text-align: center; margin-bottom: 26px; }
#login #login-title { margin: 0 0 8px; color: var(--auth-ink); font: 600 28px/1.25 "Labomni Aspekta", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: -.5px; text-wrap: balance; outline: none; }
#login[lang="zh-CN"] #login-title { font-size: 26px; letter-spacing: 0; }
#login #auth-subtitle { margin: 0; color: var(--auth-muted); font-size: 13px; line-height: 1.65; text-wrap: pretty; }
#login .auth-methods { display: flex; flex-direction: column; }
#login .auth-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
#login .auth-field { display: grid; gap: 8px; min-width: 0; }
#login .auth-field label { display: block; margin: 0; color: var(--auth-muted); font-size: 13px; font-weight: 400; line-height: 1.4; }
#login .auth-field input { display: block; width: 100%; min-width: 0; height: 48px; padding: 12px 14px; border: 1px solid var(--auth-border); border-radius: 12px; background: #fff; color: var(--auth-ink); caret-color: #15171b; font-size: 16px; line-height: 1.4; outline: none; scroll-margin-block: 24px; transition: border-color 160ms ease-out, background-color 160ms ease-out; }
#login .auth-field input::placeholder { color: #73777d; opacity: 1; }
#login .auth-field input:focus { border-color: #2563eb; outline: 2px solid #2563eb; outline-offset: 1px; }
#login .auth-field input[aria-invalid="true"] { border-color: var(--auth-danger); outline-color: var(--auth-danger); }
#login .auth-field input:disabled { color: var(--auth-muted); background: #f6f6f7; }
#login .auth-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 12px 32px; border: 1px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 400; line-height: 1.45; text-align: center; transition: background-color 160ms ease-out, border-color 160ms ease-out; }
#login .auth-primary { background: #15171b; color: #fff; }
#login .auth-primary:hover { background: #303238; }
#login .auth-primary:active { background: #070809; }
#login .auth-button:disabled { cursor: wait; opacity: .65; }
#login .auth-arrow { position: absolute; right: 14px; display: inline-flex; }
#login .auth-arrow svg { width: 17px; height: 17px; }
#login .auth-google, #login .auth-outline { background: #fff; color: #45494f; border-color: var(--auth-border); }
#login .auth-google:hover, #login .auth-outline:hover { background: #f7f7f8; border-color: #bfc2c6; }
#login .auth-google:active, #login .auth-outline:active { background: #f0f1f2; }
#login .auth-google-content { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
#login .auth-google-content img { position: static; display: block; flex: none; width: 18px; height: 18px; object-fit: contain; }
#login .auth-divider { display: flex; align-items: center; gap: 15px; padding: 17px 0; color: var(--auth-muted); font-size: 12px; line-height: 16px; }
#login .auth-divider::before, #login .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e5e6e6; }
#login .auth-inline-link { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 44px; padding: 0 5px; border: 0; border-radius: 3px; background: transparent; color: #50545a; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
#login .auth-inline-link:hover { color: #15171b; }
#login .auth-link { width: 100%; min-height: 44px; padding: 8px 0; border: 0; border-radius: 4px; background: transparent; color: var(--auth-muted); font-size: 13px; line-height: 1.5; text-align: center; }
#login .auth-link:hover { color: var(--auth-ink); text-decoration: underline; text-underline-offset: 3px; }
#login .auth-link:disabled { color: #888b90; cursor: default; text-decoration: none; }
#login .auth-form > .auth-link { margin-top: -7px; }
#login .auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; margin-top: -8px; }
#login .auth-forgot { min-height: 44px; margin-block: -6px; font-size: 12px; }
#login .auth-email-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: -8px 0 18px; padding-bottom: 10px; border-bottom: 1px solid #e5e6e6; color: #50545a; font-size: 13px; }
#login #auth-selected-email { min-width: 0; overflow-wrap: anywhere; }
#login .auth-password-field { position: relative; }
#login .auth-password-field input { padding-right: 56px; }
#login .auth-password-toggle { position: absolute; inset: 2px 2px 2px auto; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: var(--auth-muted); }
#login .auth-password-toggle:hover { color: var(--auth-ink); background: #f3f4f5; }
#login .auth-password-toggle:active { background: #e9ebee; }
#login .auth-password-toggle svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#login .auth-password-toggle[aria-pressed="false"] .auth-eye-off,
#login .auth-password-toggle[aria-pressed="true"] .auth-eye { display: none; }
#login .auth-hint { margin: 0; color: var(--auth-muted); font-size: 12px; line-height: 1.65; }
#login .auth-field .auth-code-input { height: 54px; padding-inline: 18px 9px; font-size: 24px; letter-spacing: .38em; text-align: center; font-variant-numeric: tabular-nums; }
#login .auth-field .auth-code-input::placeholder { color: #73777d; }
#login #auth-code-expiry { margin-top: -6px; text-align: center; }
#login .auth-resend { font-size: 12px; font-variant-numeric: tabular-nums; }
#login #auth-message { margin: 18px 0 0; padding: 10px 12px; border: 0; border-radius: 8px; color: var(--auth-danger); background: #fcf1f0; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
#login #auth-message[data-kind="info"] { color: #50545a; background: #f4f5f6; }
#login #auth-message[data-kind="success"] { color: #286042; background: #f0f7f2; }
#login .auth-agreement { margin: 24px 0 0; color: var(--auth-muted); font-size: 12px; line-height: 1.7; text-align: center; }
#login .auth-agreement-links { white-space: nowrap; }
#login .auth-agreement a { font: inherit; color: #50545a; text-decoration: underline; text-decoration-color: #989ca3; text-underline-offset: 3px; }
#login .auth-agreement a:hover { color: var(--auth-ink); }
#login .auth-spinner { display: none; flex: none; width: 14px; height: 14px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: auth-spin .7s linear infinite; }
#login .is-loading .auth-spinner { display: inline-block; }
#login .is-loading .auth-arrow { display: none; }
#login .auth-google.is-loading .auth-spinner { position: absolute; right: 14px; }
#login .auth-account { display: grid; gap: 12px; }
#login .auth-account-email { margin: 0 0 10px; color: var(--auth-muted); font-size: 13px; text-align: center; overflow-wrap: anywhere; }
#login .auth-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#login.auth-dialog[open] { animation: auth-enter 200ms cubic-bezier(.16, 1, .3, 1); }
#login .auth-methods.is-entering { animation: auth-step 180ms cubic-bezier(.16, 1, .3, 1); }
@keyframes auth-enter { from { opacity: .65; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes auth-step { from { opacity: .65; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  #login.auth-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 48px 24px 26px; border-radius: 22px; }
  #login #auth-entry-title { gap: 8px; }
  #login .auth-join-prefix { font-size: 24px; }
  #login .auth-brand, #login .auth-brand img { width: 138px; }
  #login .auth-heading { margin-bottom: 24px; }
  #login #login-title { font-size: 27px; }
  #login[lang="zh-CN"] #login-title { font-size: 25px; }
  #login[lang="en"] .auth-agreement-intro { display: block; }
}
@media (max-width: 350px) {
  #login.auth-dialog { padding-inline: 20px; }
  #login .auth-join-prefix { font-size: 23px; }
  #login .auth-brand, #login .auth-brand img { width: 132px; }
  #login .auth-button { padding-inline: 28px; }
  #login[lang="zh-CN"] .auth-agreement-intro { display: block; }
}
@media (max-height: 600px) {
  #login.auth-dialog { max-height: calc(100dvh - 16px); margin-block: 8px; padding-top: 46px; padding-bottom: 22px; }
  #login .auth-heading { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #login.auth-dialog[open], #login .auth-methods.is-entering, #login .auth-spinner { animation: none; }
  #login * { transition: none; }
}
