/* 首页账号入口：沿用纸色、墨色和金色，不影响其他页面。 */
.home-account{position:relative;display:flex;align-items:center;gap:8px;min-width:0;max-width:260px}
.home-account [hidden]{display:none!important}
.account-name{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;min-width:44px;max-width:100%;padding:8px;border:0;background:transparent;color:var(--ink);font-size:14px;font-weight:700}
.account-name svg{width:20px;height:20px;flex-shrink:0}
.account-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-dot{width:7px;height:7px;background:var(--ink);box-shadow:0 0 0 4px var(--gold);border-radius:50%;flex-shrink:0}
.account-name:hover{background:var(--gold)}
.account-logout{flex-shrink:0;min-height:44px;padding:8px;border:0;background:transparent;color:var(--muted);font-size:12px}
.account-logout:hover{color:var(--ink);text-decoration:underline;text-underline-offset:5px}
.account-logout:disabled{opacity:.5;cursor:wait}
.account-status{position:absolute;right:0;top:calc(100% + 8px);width:max-content;max-width:min(280px,85vw);z-index:10;background:var(--ink);color:var(--paper);font-size:12px;padding:8px 12px;pointer-events:none}
.account-status:empty{display:none}
.account-spark{color:var(--ink)}
.account-name.is-cheering{animation:account-bounce .55s ease-out;background:var(--gold)}
.account-name.is-cheering .account-spark{animation:account-spin .55s ease-out}
@keyframes account-bounce{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-7px) rotate(-4deg)}65%{transform:translateY(-2px) rotate(3deg)}}
@keyframes account-spin{to{transform:rotate(180deg)}}
.home-login-dialog{position:fixed;inset:92px max(48px,calc((100vw - 1280px)/2)) auto auto;margin:0;width:380px;max-width:calc(100vw - 36px);max-height:calc(100dvh - 116px);overflow:auto;padding:26px;border:1px solid var(--ink);box-shadow:6px 6px 0 var(--ink);background:var(--paper);color:var(--ink)}
.home-login-dialog::backdrop{background:#191b1940}
.home-login-heading{display:flex;align-items:flex-start;gap:12px;justify-content:space-between}
.home-login-heading h2{font-size:26px;letter-spacing:-1px;margin:10px 0 0}
.home-login-heading>button{flex-shrink:0;width:44px;height:44px;border:1px solid var(--line);background:transparent;color:var(--ink);font-size:26px}
.home-login-heading>button:hover{background:var(--gold)}
.home-login-dialog>p{font-size:13px;margin:14px 0 22px}
.home-login-dialog label{display:block;font-size:14px;font-weight:700;margin:16px 0 6px}
.home-login-dialog input{width:100%;min-height:48px;padding:10px 12px;border:1px solid var(--muted);border-radius:0;background:var(--paper);color:var(--ink);font:inherit;font-size:16px}
.home-login-dialog input:focus-visible{outline:3px solid #b8681f;outline-offset:2px}
.home-login-dialog form>.button{width:100%;margin-top:12px;justify-content:space-between}
.home-login-dialog form>.button:disabled{opacity:.55;cursor:wait}
#home-login-error{color:#9b3022;font-size:13px;margin:12px 0 0}
#home-login-error:empty{display:none}
.home-register{display:flex;align-items:center;min-height:44px;margin-top:16px;font-size:12px;text-decoration:underline;text-underline-offset:4px}
body:has(.home-login-dialog[open]){overflow:hidden}
@media(max-width:1050px){.home-login-dialog{right:24px}.header nav{gap:16px}}
@media(max-width:720px){.home-account{max-width:calc(100% - 155px)}.account-name{font-size:13px;gap:7px}.home-login-dialog{top:74px;right:18px;max-height:calc(100dvh - 98px);padding:22px}}
@media(prefers-reduced-motion:reduce){.account-name.is-cheering,.account-name.is-cheering .account-spark{animation:none}}
