.of-auth {
  --auth-sans:system-ui,-apple-system,BlinkMacSystemFont,"PingFang SC","Noto Sans CJK SC","Microsoft YaHei UI","Microsoft YaHei",sans-serif;
  --auth-edge:#c7d2ff24;
  --auth-soft:#b6bbcd;
  --auth-blue:#c8d3ff;
  --auth-ease:cubic-bezier(.22,1,.36,1);
  width:min(1080px,calc(100% - 2 * clamp(20px,5vw,72px)));
  padding-block:clamp(44px,6vw,88px);
  font-family:var(--auth-sans);
}
.of-auth-frame {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,29rem);
  align-items:center;
  gap:clamp(30px,6vw,96px);
  min-width:0;
}
.of-auth-sky {
  isolation:isolate;
  position:relative;
  display:flex;
  align-items:end;
  min-width:0;
  align-self:stretch;
  min-height:29rem;
  padding:3rem clamp(16px,3vw,40px);
  animation:of-auth-arrive 680ms var(--auth-ease) both;
}
.of-auth-plate {
  position:absolute;
  inset:-5% -12%;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(180deg,#0b0d1414 28%,#08091064 68%,#080910de),
    url('./assets/onlyfast-galaxy.webp?v=a270b1a2eae7') 69% 52%/cover no-repeat;
  mask-image:radial-gradient(ellipse 72% 68% at 50% 49%,#000 30%,#000b 45%,transparent 68%);
  animation:of-auth-drift 24s ease-in-out infinite alternate;
}
.of-auth-poem { display:grid; gap:14px; text-shadow:0 3px 22px #06070c; }
.of-auth-poem img { display:block; width:36px; height:36px; margin-left:-3px; opacity:.9; }
.of-auth-poem p { margin:0; color:#eeedf8; font:500 clamp(1.65rem,3vw,2.9rem)/1.27 "Songti SC","Noto Serif CJK SC",SimSun,serif; letter-spacing:.13em; }
.of-auth-pane {
  position:relative;
  isolation:isolate;
  min-width:0;
  width:100%;
  max-width:29rem;
  margin-inline:auto;
  padding:clamp(27px,4.3vw,48px);
  border:1px solid var(--auth-edge);
  border-radius:27px;
  background:radial-gradient(ellipse at 87% -16%,#8597ef21,transparent 61%),linear-gradient(155deg,#191b26,#101119 70%);
  box-shadow:0 24px 64px #0005,inset 0 1px #f0f3ff12;
  animation:of-auth-arrive 540ms var(--auth-ease) both;
}
.of-auth-pane::before {
  position:absolute;
  inset:0 22% auto 12%;
  height:1px;
  content:"";
  pointer-events:none;
  background:linear-gradient(90deg,transparent,#d6dfff55 43%,transparent);
}
.of-auth-heading { margin-bottom:25px; }
.of-auth-heading h1 { margin-bottom:9px; color:#f4f4fb; font:540 clamp(1.95rem,3.3vw,2.65rem)/1.16 var(--auth-sans); letter-spacing:.022em; }
.of-auth-lead { margin:0; color:var(--auth-soft); font-size:.87rem; line-height:1.65; letter-spacing:.015em; }
.of-auth-modes {
  position:relative;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-bottom:23px;
  border-bottom:1px solid var(--auth-edge);
}
.of-auth-modes:has(>button[hidden]) { display:none; }
.of-auth-modes::after {
  position:absolute;
  left:0;
  bottom:-1px;
  width:50%;
  height:2px;
  border-radius:2px;
  content:"";
  pointer-events:none;
  background:linear-gradient(90deg,transparent 9%,#aabbff 45%,#dbe1ff 56%,transparent 91%);
  transition:transform 370ms var(--auth-ease);
}
.of-auth-modes:has(>button:last-child[aria-pressed=true])::after { transform:translateX(100%); }
.of-auth-modes button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:5px 7px 10px; background:transparent; color:#aeb5cc; font-size:.83rem; font-weight:540; border:0; border-radius:7px; transition:color 170ms ease; }
.of-auth-modes .icon { width:15px; height:15px; }
.of-auth-modes button[aria-pressed=true],.of-auth-modes button:not(:disabled):hover { color:#f3f4ff; }
.of-auth-form,.of-auth-field { min-width:0; display:grid; }
.of-auth-form { gap:17px; }
.of-auth-field { gap:7px; }
.of-auth-field label { width:fit-content; color:#e5e7f0; font-size:.84rem; font-weight:570; letter-spacing:.025em; }
.of-auth :is(#auth-password-group,#auth-code-group):not([hidden]) { animation:of-auth-field-arrive 290ms var(--auth-ease) both; }
.of-auth-field-head { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:3px 10px; }
.of-auth-field-head>span { font-size:.74rem; color:var(--auth-soft); }
.of-auth .of-auth-link { color:var(--auth-blue); font-weight:550; text-underline-offset:3px; }
.of-auth .of-auth-link:hover { color:#e4eaff; text-decoration:underline; }
.of-auth-field-head>.of-auth-link { font-size:.77rem; }
.of-auth-field input { display:block; width:100%; min-width:0; min-height:49px; padding:9px 13px; border:1px solid #aab7ed38; border-radius:12px; background:#090b147a; color:#f1f2f8; font:inherit; font-size:.93rem; line-height:1.5; transition:background 180ms ease,border-color 180ms ease,box-shadow 180ms ease; }
.of-auth-field input::placeholder { color:#a0a8bc; opacity:1; }
.of-auth-field input:not(:disabled,[aria-invalid=true],:focus):hover { border-color:#afbeff64; }
.of-auth-field input:focus { border-color:#aabaff; outline:2px solid transparent; background:#111522; box-shadow:0 0 0 3px #a6b8ff25; }
.of-auth-field input[aria-invalid=true] { border-color:#ef9aa1; }
.of-auth-field input[aria-invalid=true]:focus { box-shadow:0 0 0 3px #ef9aa128; }
.of-auth-field input:read-only { color:#c4c6d3; }
.of-auth-field-note,.of-auth-mail-head p { color:var(--auth-soft); font-size:.75rem; line-height:1.65; overflow-wrap:anywhere; }
.of-auth-field-note b { color:#c9cddd; font:500 .76rem/1.6 var(--mono); }
.of-auth-password-box { position:relative; min-width:0; }
.of-auth-password-box input { padding-right:54px; }
.of-auth-password-box button { position:absolute; right:3px; top:3px; bottom:3px; min-width:46px; padding:3px 7px; border:0; border-radius:9px; background:transparent; color:#c0c6dd; font:550 .75rem/1.3 var(--auth-sans); }
.of-auth-password-box button:hover { color:white; background:#bbc6ff0c; }
.of-auth-code-box { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.of-auth-code-box input { font-family:var(--mono); letter-spacing:.11em; }
.of-auth-code-box input::placeholder { letter-spacing:.02em; font-family:var(--auth-sans); }
.of-auth-primary,.of-auth-secondary,.of-auth-small { min-width:0; display:inline-flex; align-items:center; justify-content:center; gap:10px; border:1px solid; border-radius:12px; font-weight:620; line-height:1.45; }
.of-auth-primary { min-height:50px; margin-top:5px; padding:9px 14px; border-color:#e9edff; background:linear-gradient(130deg,#f4f5ff,#dce3ff 77%,#cad6ff); color:#161c2d; font-size:.93rem; box-shadow:0 6px 19px #a6b6ff24,inset 0 1px #fff8; transition:background-color 180ms ease,box-shadow 180ms ease,transform 180ms var(--auth-ease); }
.of-auth-primary .icon { width:16px; height:16px; transition:transform 230ms var(--auth-ease); }
.of-auth-primary:not(:disabled):hover { box-shadow:0 7px 24px #a6b6ff42,inset 0 1px #fff9; }
.of-auth-primary:not(:disabled):hover .icon { transform:translateX(3px); }
.of-auth-primary:not(:disabled):active { transform:translateY(1px); }
.of-auth-secondary,.of-auth-small { background:#1d202b; border-color:#444a5c; color:#d9def4; }
.of-auth-secondary { min-height:44px; padding:7px 13px; font-size:.81rem; }
.of-auth-small { min-height:36px; padding:5px 10px; font-size:.75rem; }
.of-auth-secondary:not(:disabled):hover,.of-auth-small:not(:disabled):hover { border-color:#8290bc; background:#272c3a; }
.of-auth button:disabled { cursor:not-allowed; }
.of-auth-primary:disabled { border-color:#686f88; color:#d6d9e8; background:#424755; box-shadow:none; }
.of-auth-secondary:disabled,.of-auth-small:disabled { color:#adb1c3; border-color:#363945; background:#1b1d25; }
.of-auth-error,.of-auth-notice { padding:8px 11px; border-left:2px solid; font-size:.81rem; line-height:1.65; overflow-wrap:anywhere; }
.of-auth-error { border-color:#db8e99; color:#ffccd1; background:#41252c60; }
.of-auth-notice { border-color:#96a7e9; color:#d0d9ff; background:#28314965; }
.of-auth-alternate { display:flex; justify-content:center; flex-wrap:wrap; align-items:center; gap:4px 7px; margin:13px 0 0; color:var(--auth-soft); font-size:.8rem; }
.of-auth-alternate .of-auth-link { display:inline-flex; align-items:center; min-height:32px; }
.of-auth-mail { margin:17px 0 0; border-top:1px solid var(--auth-edge); }
.of-auth-mail-toggle { display:flex; align-items:center; width:100%; gap:8px; min-height:46px; padding:7px 0; color:#c7cce0; font-weight:550; font-size:.8rem; text-align:left; background:transparent; border:0; }
.of-auth-mail-toggle:hover { color:white; }
.of-auth-mail-tag { display:none; }
.of-auth-mail-toggle .icon { width:16px; height:16px; }
.of-auth-mail-toggle .of-auth-chevron { margin-left:auto; width:14px; transition:transform 250ms var(--auth-ease); }
.of-auth-mail-toggle[aria-expanded=true] .of-auth-chevron { transform:rotate(180deg); }
.of-auth-mail-panel { padding:12px; border:1px solid var(--auth-edge); border-radius:7px; background:#101117; }
.of-auth-mail-head { display:flex; gap:10px; align-items:center; justify-content:space-between; }
.of-auth-mail-head p { min-width:0; }
.of-auth-mail-head button { flex:none; }
.of-auth-mail-status { color:#c1c9eb; font-size:.78rem; overflow-wrap:anywhere; }
.of-auth-mail-status:not(:empty) { margin-top:10px; }
.of-auth-mail-list { margin:0; padding:0; list-style:none; max-height:19rem; overflow:auto; overscroll-behavior:contain; }
.of-auth-mail-list:not(:empty) { margin-top:10px; }
.of-auth-mail-list li { padding:12px 4px; border-top:1px solid #343744; }
.of-auth-message-line,.of-auth-message-value,.of-auth-message-times { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:3px 10px; }
.of-auth-message-line { color:#d8ddf4; font-size:.78rem; }
.of-auth-address { min-width:0; color:#b3b7ca; overflow-wrap:anywhere; font:.71rem/1.55 var(--mono); }
.of-auth-message-value { align-items:center; margin:7px 0; }
.of-auth-message-value strong { color:#eef0fc; font:580 1.32rem/1.45 var(--mono); letter-spacing:.14em; }
.of-auth-message-times { justify-content:flex-start; color:#aeb3c7; font-size:.67rem; font-variant-numeric:tabular-nums; }
.of-auth :is(input,button,a) { scroll-margin-top:115px; }
.of-auth :is(button,a):focus-visible { outline:2px solid #c4d0ff; outline-offset:2px; }
@keyframes of-auth-arrive {
  from { opacity:.25; transform:translateY(12px); }
  to { opacity:1; transform:translateY(0); }
}
@keyframes of-auth-drift {
  from { transform:translate3d(-1%,0,0) scale(1); }
  to { transform:translate3d(2%,-1%,0) scale(1.05); }
}
@keyframes of-auth-field-arrive {
  from { opacity:.68; transform:translateY(3px); }
  to { opacity:1; transform:translateY(0); }
}
@media (max-width:860px) {
  .of-auth { width:min(30rem,calc(100% - 40px)); padding-block:33px 42px; }
  .of-auth-frame { grid-template-columns:minmax(0,1fr); gap:0; }
  .of-auth-sky { display:none; }
  .of-auth-pane {
    max-width:none;
    padding:32px clamp(23px,6vw,39px) 24px;
    overflow:hidden;
    background:radial-gradient(ellipse at 100% 0,#8ba0f122,transparent 55%),linear-gradient(155deg,#191b26,#101119 73%);
  }
  .of-auth-pane::after {
    position:absolute;
    inset:0 0 auto 20%;
    z-index:-1;
    height:178px;
    content:"";
    pointer-events:none;
    background:url('./assets/onlyfast-galaxy.webp?v=a270b1a2eae7') 71% 33%/cover no-repeat;
    mask-image:radial-gradient(ellipse 92% 80% at 97% 0,#000 3%,#0009 37%,transparent 83%);
    opacity:.67;
  }
  .of-auth-heading h1 { font-size:2.15rem; }
}
@media (max-width:640px) {
  .of-auth { width:min(30rem,calc(100% - 2 * var(--phone-inset,15px))); padding-block:21px max(26px,env(safe-area-inset-bottom)); }
  .of-auth-pane { padding:26px clamp(17px,6vw,30px) 17px; border-radius:23px; box-shadow:0 15px 38px #0004,inset 0 1px #f0f3ff12; }
  .of-auth-heading { margin:0 0 19px; }
  .of-auth-heading h1 { font-size:clamp(1.9rem,7.15vw,2.2rem); line-height:1.2; }
  .of-auth-lead { font-size:.84rem; }
  .of-auth-form { gap:13px; }
  .of-auth-field { gap:5px; }
  .of-auth-field label { font-size:.83rem; line-height:1.45; }
  .of-auth-field-head { align-items:center; }
  .of-auth-field input { min-height:48px; padding:9px 11px; font-size:max(16px,1rem); line-height:1.4; }
  .of-auth-field-note { color:#b9bdcd; line-height:1.5; }
  .of-auth-password-box input { padding-right:62px; }
  .of-auth-password-box button { top:1px; bottom:1px; right:1px; min-height:44px; min-width:54px; color:#c6cdec; }
  .of-auth-field-head>.of-auth-link { display:inline-flex; align-items:center; min-height:44px; margin-block:-8px 0; }
  .of-auth-code-box { grid-template-columns:minmax(0,1fr) minmax(6.1rem,auto); gap:7px; }
  .of-auth-code-box input { font-variant-numeric:tabular-nums; }
  .of-auth-secondary { padding-inline:10px; font-variant-numeric:tabular-nums; }
  .of-auth-primary { min-height:48px; margin:0; font-size:.95rem; }
  .of-auth-small,.of-auth-modes button,.of-auth-alternate .of-auth-link { min-height:44px; }
  .of-auth-modes { margin:0 0 17px; }
  .of-auth-alternate { margin-top:7px; }
  .of-auth-error,.of-auth-notice { padding:6px 9px; line-height:1.5; }
  .of-auth-field>.of-auth-error { font-size:.78rem; border-radius:0 4px 4px 0; }
  .of-auth-mail { min-width:0; margin:0; border:0; }
  .of-auth-mail-toggle { min-height:44px; padding:6px 8px; border:1px solid transparent; border-radius:7px; gap:7px; color:#bac2da; }
  .of-auth-mail-prompt .of-auth-mail-toggle { background:#202637; border-color:#4a5574; color:#e1e8ff; }
  .of-auth-mail-prompt .of-auth-mail-tag { display:inline; margin-left:auto; font-size:.71rem; font-weight:450; color:#b8c3e4; }
  .of-auth-mail-prompt .of-auth-chevron { margin-left:0; }
  .of-auth-mail-panel { margin-top:4px; padding:8px 10px; }
  .of-auth-mail-head { gap:8px; }
  .of-auth-mail-list { max-height:min(19rem,58vh); max-height:min(19rem,58dvh); overscroll-behavior:auto; }
  .of-auth-mail-list li { padding:9px 2px; }
  .of-auth-mail-list .of-auth-match { border-top-color:#66759d; }
  .of-auth-message-value { margin:2px 0; }
  .of-auth :is(input,button,a) { scroll-margin-block:calc(64px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-bottom)); }
}
html[data-motion=off] .of-auth *,html[data-motion=off] .of-auth *::after { animation:none!important; transition:none!important; }
html[data-motion=off] .of-auth-primary:not(:disabled):hover .icon,html[data-motion=off] .of-auth-primary:not(:disabled):active { transform:none; }
@media (prefers-reduced-motion:reduce) {
  .of-auth-primary:not(:disabled):hover .icon,.of-auth-primary:not(:disabled):active { transform:none; }
}
@media (forced-colors:active) {
  .of-auth-pane,.of-auth-field input,.of-auth-modes,.of-auth-primary,.of-auth-mail-panel { border-color:CanvasText; }
  .of-auth-field input:focus { outline-color:Highlight; }
  .of-auth-plate,.of-auth-pane::after { display:none; }
  .of-auth-modes button[aria-pressed=true] { text-decoration:underline; }
}
/* Invitation code and captcha (shown only when the instance asks for them) */
.of-auth-label { width:fit-content; color:#e8e9f1; font-size:.84rem; font-weight:590; }
.of-auth-captcha { min-height:65px; max-width:100%; overflow:hidden; }
#auth-captcha-status:empty { display:none; }
/* Live feedback under the new-password fields */
.of-auth-check:empty { display:none; }
.of-auth-check.is-good { color:#9fdcb4; }
.of-auth-check.is-bad { color:#f0b4a8; }
.of-auth-optional { margin-left:6px; font-size:.74em; font-weight:400; opacity:.65; }
