/* Homepage account entry. Scoped away from the profile and admin interfaces. */
#authModal.auth-refined {
  --auth-paper:#fffefa; --auth-field:#f7f8f4; --auth-ink:#24392f; --auth-muted:#627067;
  --auth-line:#dce2d9; --auth-accent:#315d45; --auth-on-accent:#fff; --auth-soft:#edf2e9;
  --auth-error:#a73732; --auth-error-bg:#fff0ee;
  font-family:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
}
html[data-theme="dark"] #authModal.auth-refined {
  --auth-paper:#19271f; --auth-field:#142219; --auth-ink:#eef4ee; --auth-muted:#afc0b2;
  --auth-line:#3b5042; --auth-accent:#b9d9af; --auth-on-accent:#1c3524; --auth-soft:#24372a;
  --auth-error:#ffb8b0; --auth-error-bg:#3c2525;
}
#authModal.auth-refined:not(.profile-mode) { padding:24px; place-items:center; }
#authModal.auth-refined:not(.profile-mode) .modal-mask { background:#10251dc2; backdrop-filter:blur(6px); }
#authModal.auth-refined:not(.profile-mode) .modal-card {
  width:min(480px,100%); max-height:calc(100dvh - 48px); padding:0; overflow:auto;
  overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:var(--auth-line) transparent;
  border:1px solid var(--auth-line); border-radius:22px; background:var(--auth-paper); color:var(--auth-ink);
  box-shadow:0 24px 80px #07170e38; isolation:isolate;
}
#authModal.auth-refined:not(.profile-mode) .modal-card::before { display:none; }
#authModal.auth-refined:not(.profile-mode) .modal-x {
  top:18px; right:18px; width:36px; height:36px; border:1px solid transparent; border-radius:50%;
  background:transparent; color:var(--auth-muted); font:400 24px/1 sans-serif; box-shadow:none;
}
#authModal.auth-refined:not(.profile-mode) .modal-x:hover { color:var(--auth-ink); background:var(--auth-soft); border-color:var(--auth-line); }
#authModal.auth-refined .auth-shell { display:block; min-height:0; max-height:none; background:transparent; }
#authModal.auth-refined.profile-mode .auth-shell { display:none; }
#authModal.auth-refined .auth-shell * { text-shadow:none; }
#authModal.auth-refined .auth-shell .auth-view { padding:34px 36px 26px; overflow:visible; background:transparent; color:var(--auth-ink); }
#authModal.auth-refined .auth-head { margin:0 0 24px; padding:0; }
#authModal.auth-refined .auth-wordmark { display:flex; align-items:center; gap:10px; margin:0 38px 25px 0; color:var(--auth-accent); font-size:11px; font-weight:700; letter-spacing:2px; }
#authModal.auth-refined .auth-wordmark i { display:block; position:relative; width:24px; height:24px; background:var(--auth-accent); border-radius:5px; }
#authModal.auth-refined .auth-wordmark i::before { content:""; position:absolute; width:4px; height:4px; left:5px; top:6px; background:var(--auth-paper); box-shadow:10px 0 var(--auth-paper),5px 5px var(--auth-paper),5px 9px var(--auth-paper); }
#authModal.auth-refined .auth-h { font:650 28px/1.3 "Segoe UI","Microsoft YaHei",sans-serif; letter-spacing:-.6px; color:var(--auth-ink); text-shadow:none; }
#authModal.auth-refined .auth-head p { margin:9px 0 0; font-size:13px; line-height:1.6; color:var(--auth-muted); }
#authModal.auth-refined .auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; margin:0 0 23px; border:1px solid var(--auth-line); border-radius:11px; background:var(--auth-soft); box-shadow:none; }
#authModal.auth-refined .auth-shell :is(button,input,a,label,p,span) { font-family:inherit; }
#authModal.auth-refined .auth-tab { min-height:38px; padding:8px 12px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--auth-muted); font-size:13px; line-height:1.5; font-weight:600; letter-spacing:0; box-shadow:none; }
#authModal.auth-refined .auth-tab.active { background:var(--auth-paper); border-color:var(--auth-line); color:var(--auth-ink); box-shadow:0 2px 4px #10251d08; }
#authModal.auth-refined .auth-form { display:block; margin:0; }
#authModal.auth-refined .field { display:block; margin:0 0 17px; min-width:0; }
#authModal.auth-refined .field-reg { display:none; }
#authModal.auth-refined.mode-register .field-reg { display:block; }
#authModal.auth-refined .field > span, #authModal.auth-refined .field > label { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin:0 0 8px; color:var(--auth-ink); font-size:13px; line-height:1.4; font-weight:550; letter-spacing:0; text-transform:none; }
#authModal.auth-refined .field small { font-size:11px; font-weight:400; color:var(--auth-muted); }
#authModal.auth-refined .field input {
  width:100%; height:46px; padding:0 13px; border:1px solid var(--auth-line); border-radius:9px;
  background:var(--auth-field); color:var(--auth-ink); -webkit-text-fill-color:var(--auth-ink);
  font:400 15px/1.5 "Segoe UI","Microsoft YaHei",sans-serif; letter-spacing:0; box-shadow:none;
  transition:border-color .15s,box-shadow .15s;
}
#authModal.auth-refined .field input::placeholder { color:var(--auth-muted); -webkit-text-fill-color:var(--auth-muted); opacity:.85; font-size:13px; }
#authModal.auth-refined .field input:hover { border-color:var(--auth-muted); }
#authModal.auth-refined .field input:focus { border-color:var(--auth-accent); background:var(--auth-paper); box-shadow:0 0 0 3px color-mix(in srgb,var(--auth-accent) 13%,transparent); outline:none; }
#authModal.auth-refined .field input:autofill { box-shadow:0 0 0 100px var(--auth-field) inset; -webkit-text-fill-color:var(--auth-ink); }
#authModal.auth-refined .auth-password-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:0 14px; }
#authModal.auth-refined.mode-register .auth-password-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
#authModal.auth-refined .auth-password-input { position:relative; }
#authModal.auth-refined .auth-password-input input { padding-right:44px; }
#authModal.auth-refined .auth-password-toggle { display:grid; place-items:center; position:absolute; right:2px; top:2px; width:42px; height:42px; padding:0; border:0; border-radius:7px; background:transparent; color:var(--auth-muted); box-shadow:none; cursor:pointer; }
#authModal.auth-refined .auth-password-toggle:hover { color:var(--auth-accent); background:var(--auth-soft); }
#authModal.auth-refined .auth-password-toggle svg { width:19px; height:19px; }
#authModal.auth-refined .auth-eye-slash { display:none; }
#authModal.auth-refined .auth-password-toggle[aria-pressed="true"] .auth-eye-slash { display:block; }
#authModal.auth-refined .auth-password-rules { margin:-4px 0 18px; gap:5px 14px; grid-template-columns:repeat(3,max-content); }
#authModal.auth-refined .auth-password-rules span { color:var(--auth-muted); font-size:11px; padding-left:12px; }
#authModal.auth-refined .auth-password-rules span::before { width:5px; height:5px; border-radius:50%; background:var(--auth-line); }
#authModal.auth-refined .auth-password-rules span.is-met { color:var(--auth-accent); }
#authModal.auth-refined .auth-password-rules span.is-met::before { background:var(--auth-accent); }
#authModal.auth-refined .registration-email-code { margin:0; gap:8px; }
#authModal.auth-refined .registration-email-code button { min-width:112px; padding:0 12px; border:1px solid var(--auth-line); border-radius:9px; background:var(--auth-soft); color:var(--auth-accent); font-size:12px; font-weight:600; box-shadow:none; }
#authModal.auth-refined .registration-email-status { margin-top:8px; color:var(--auth-muted); font-size:11px; line-height:1.65; overflow-wrap:anywhere; }
#authModal.auth-refined .registration-email-status[data-state="error"] { color:var(--auth-error); }
#authModal.auth-refined .registration-email-status[data-state="success"] { color:var(--auth-accent); }
#authModal.auth-refined .auth-options { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px 12px; margin:2px 0 20px; }
#authModal.auth-refined .auth-remember { display:flex; align-items:center; gap:8px; margin:0; padding:0; font-size:12px; color:var(--auth-muted); cursor:pointer; }
#authModal.auth-refined .auth-remember input { width:16px; height:16px; margin:0; accent-color:var(--auth-accent); }
#authModal.auth-refined .auth-forgot { color:var(--auth-accent); font-size:12px; text-decoration:none; text-underline-offset:4px; }
#authModal.auth-refined .auth-forgot:hover { text-decoration:underline; }
#authModal.auth-refined.mode-register .auth-forgot { display:none; }
#authModal.auth-refined .auth-msg { min-height:0; margin:0; color:var(--auth-error); font-size:12px; line-height:1.6; letter-spacing:0; }
#authModal.auth-refined .auth-msg:empty { display:none; }
#authModal.auth-refined .auth-msg:not(:empty) { margin:0 0 14px; padding:10px 12px; background:var(--auth-error-bg); border:1px solid color-mix(in srgb,var(--auth-error) 24%,transparent); border-radius:8px; }
#authModal.auth-refined .auth-submit { width:100%; min-height:46px; padding:11px 16px; border:1px solid var(--auth-accent); border-radius:9px; background:var(--auth-accent); color:var(--auth-on-accent); font-size:14px; font-weight:600; letter-spacing:1px; text-shadow:none; box-shadow:none; transform:none; }
#authModal.auth-refined .auth-submit:hover { filter:brightness(1.08); background:var(--auth-accent); transform:none; box-shadow:none; }
#authModal.auth-refined .auth-oauth { margin:21px 0 0; background:transparent; }
#authModal.auth-refined .auth-divider { display:flex; align-items:center; gap:12px; margin:0 0 14px; color:var(--auth-muted); font-size:11px; }
#authModal.auth-refined .auth-divider::before,#authModal.auth-refined .auth-divider::after { content:""; height:1px; flex:1; background:var(--auth-line); }
#authModal.auth-refined .auth-qq { width:100%; min-height:44px; gap:9px; border:1px solid var(--auth-line); border-radius:9px; background:transparent; color:var(--auth-ink); font-size:13px; font-weight:500; box-shadow:none; }
#authModal.auth-refined .auth-qq:hover { background:var(--auth-soft); border-color:var(--auth-muted); transform:none; box-shadow:none; }
#authModal.auth-refined .auth-note { display:block; margin:21px 0 0; padding:0; border:0; color:var(--auth-muted); text-align:center; font-size:11px; letter-spacing:.5px; }
#authModal.auth-refined.mode-register .auth-head { margin-bottom:18px; }
#authModal.auth-refined.mode-register .auth-wordmark { margin-bottom:18px; }
#authModal.auth-refined.mode-register .auth-tabs { margin-bottom:18px; }
#authModal.auth-refined.mode-register .field { margin-bottom:13px; }
#authModal.auth-refined.mode-register .auth-note { display:none; }
#authModal.auth-refined:not(.profile-mode) :is(button,a,input):focus-visible { outline:2px solid var(--auth-accent); outline-offset:3px; }
#authModal.auth-refined .auth-shell button:disabled { opacity:.55; cursor:default; transform:none; }
#authModal.auth-refined .auth-shell [hidden] { display:none !important; }
@media(max-width:520px) {
  #authModal.auth-refined:not(.profile-mode) { padding:12px; }
  #authModal.auth-refined:not(.profile-mode) .modal-card { width:100%; max-height:calc(100dvh - 24px); border-radius:18px; }
  #authModal.auth-refined .auth-shell .auth-view { padding:28px 24px 24px; }
  #authModal.auth-refined .auth-h { font-size:26px; }
  #authModal.auth-refined .field input { font-size:16px; }
  #authModal.auth-refined.mode-register .auth-password-grid { grid-template-columns:minmax(0,1fr); }
  #authModal.auth-refined .auth-wordmark { margin-bottom:22px; }
  #authModal.auth-refined .auth-password-rules { gap:6px 12px; }
}
@media(max-width:360px) {
  #authModal.auth-refined .auth-shell .auth-view { padding-inline:19px; }
  #authModal.auth-refined .auth-password-rules { gap:6px 8px; }
}
@media(prefers-reduced-motion:reduce) {
  #authModal.auth-refined,#authModal.auth-refined .modal-card,#authModal.auth-refined input { transition:none; }
}
