:root { color-scheme: light; font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; color: #fff7db; background: #391c09; }
body.dark-mode { background: #020202; }
#login-background { position: fixed; z-index: 0; inset: -16px; width: calc(100% + 32px); height: calc(100% + 32px); pointer-events: none; filter: blur(10px); }
#login-tracers { position: fixed; z-index: 1; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: blur(2px); }
.login-screen {
    position: relative; z-index: 2; display: grid; place-items: center; min-height: 100svh; overflow: hidden;
}
.login-form { z-index: 1; width: min(290px, calc(100vw - 48px)); margin: -20px 0 0; text-align: center; }
.account-tile {
    position: relative; overflow: hidden; width: 112px; height: 112px; margin: 0 auto 24px; border: 2px solid #e8ab17; border-radius: 15px;
    background: linear-gradient(165deg, rgba(255, 248, 172, .65), rgba(255, 183, 0, .24) 46%, rgba(93, 53, 0, .36) 48%, rgba(255, 182, 0, .25));
    box-shadow: inset 0 0 0 3px rgba(255, 226, 112, .4), inset 0 2px 6px #fff3a7, 0 2px 5px #563000, 0 0 24px rgba(255, 190, 0, .4);
    backdrop-filter: blur(12px);
}
.account-head { position: absolute; top: 24px; left: 37px; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(#fff0a3, #ca8b0c); box-shadow: 0 1px 3px #8e5800; }
.account-shoulders { position: absolute; bottom: 14px; left: 22px; width: 64px; height: 36px; border-radius: 34px 34px 9px 9px; background: linear-gradient(#ffe383, #b67708); box-shadow: 0 1px 3px #8e5800; }
.remembered-account { margin: -12px 0 10px; font-size: 13px; overflow-wrap: anywhere; }
.remembered-account[hidden] { display: none; }
.remembered-account button { display: block; margin: 3px auto 0; padding: 0; border: 0; background: transparent; color: rgba(255, 249, 217, .7); font-size: 11px; }
.credentials { position: relative; width: 188px; margin: auto; display: grid; gap: 5px; }
.credentials input {
    width: 100%; height: 25px; padding: 3px 7px; border: 1px solid rgba(255, 237, 211, .35); border-radius: 6px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 176, 93, .025)), rgba(35, 14, 4, .18);
    color: #fff; caret-color: #fff; font: 12px "Segoe UI", sans-serif;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 2px 8px rgba(30, 10, 0, .16);
    -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
}
.credentials input::placeholder { color: rgba(255, 255, 255, .72); opacity: 1; }
.credentials input:autofill { -webkit-background-clip: text; -webkit-text-fill-color: #fff; }
.credentials input:focus { outline: 2px solid rgba(255, 215, 156, .85); outline-offset: 2px; }
.credentials input[aria-invalid="true"] { border-color: #9c2500; }
button { cursor: pointer; color: #fff9d9; font: inherit; }
.sign-in { position: absolute; left: calc(100% + 7px); bottom: -1px; width: 29px; height: 29px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.sign-in img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sign-in:hover { filter: brightness(1.16); }
.sign-in:disabled { opacity: .6; cursor: wait; }
.create-account-link { display: block; margin-top: 3px; color: rgba(255, 249, 217, .6); font-size: 12px; text-decoration: none; }
.create-account-link:hover { color: rgba(255, 255, 255, .8); }
.anonymous-toggle { margin-top: 2px; padding: 2px 6px; border: 0; background: transparent; color: rgba(255, 249, 217, .6); font-size: 12px; text-decoration: none; }
.anonymous-toggle:hover { color: rgba(255, 255, 255, .8); }
button:focus-visible { outline: 2px solid #d5f3ff; outline-offset: 3px; }
.login-status { min-height: 42px; margin: 13px -4px 5px; font-size: 12px; line-height: 1.4; text-shadow: 0 1px 3px #422000; }
.login-brand { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 9px; font-size: 27px; letter-spacing: -.8px; text-shadow: 0 2px 3px #482700; }
.login-brand small { font-size: 13px; letter-spacing: 0; color: #e6bd67; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; font-size: 23px; font-weight: 700; border: 1px solid #ffd36b; border-radius: 8px; background: linear-gradient(145deg, #ffd25c, #ab6100); box-shadow: inset 0 1px 2px #fff2aa, 0 1px 4px #5d3000; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-height: 480px) { .login-screen { min-height: 420px; } .login-brand { bottom: 18px; } .account-tile { width: 96px; height: 96px; margin-bottom: 18px; } .account-head { left: 29px; top: 18px; } .account-shoulders { left: 14px; } }
.registration-screen { position: relative; z-index: 2; min-height: 100svh; display: grid; place-items: center; padding: 28px 16px; }
.registration-form { width: min(440px, 100%); padding: 20px; border: 1px solid rgba(255, 237, 211, .35); border-radius: 12px; background: rgba(35, 14, 4, .45); }
.registration-form h1 { margin: 0 0 16px; font-size: 20px; }
.registration-form > label { display: block; margin: 10px 0 4px; font-size: 13px; }
.registration-form > input { width: 100%; padding: 8px; border: 1px solid rgba(255, 237, 211, .4); border-radius: 6px; background: rgba(35, 14, 4, .35); color: white; }
.registration-form fieldset { margin: 16px 0; padding: 0; border: 0; }
.registration-form legend { margin-bottom: 8px; font-size: 13px; }
.registration-pictures { max-height: 180px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; }
.registration-picture { cursor: pointer; }
.registration-picture input { position: absolute; opacity: 0; }
.registration-picture img { width: 60px; height: 60px; object-fit: cover; border: 2px solid transparent; border-radius: 8px; }
.registration-picture input:checked + img, .registration-picture input:focus-visible + img { border-color: #ffe183; }
.registration-form > button { padding: 8px 14px; border: 1px solid #e8ab17; border-radius: 6px; background: #7a3d08; }
.registration-form > a { margin-left: 12px; color: #fff7db; font-size: 13px; }
