:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #202024;
    background: #474548;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #31313a; outline-offset: 3px; }

.gallery { position: fixed; inset: 0; overflow: hidden; }
.gallery picture, .gallery img { display: block; width: 100%; height: 100%; }
.gallery img { object-fit: cover; }
.gallery::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 32%, rgb(11 10 14 / 25%) 100%);
}
.gallery canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

main {
    position: relative; min-height: 100vh; min-height: 100svh;
    display: grid; place-items: center;
    padding: 20px; pointer-events: none;
}
.glass {
    width: min(100%, 380px); padding: 30px 32px 32px; pointer-events: auto;
    color: #fff; border: 1px solid rgb(255 255 255 / 63%); border-radius: 30px;
    background: rgb(28 28 32 / 82%);
    box-shadow: inset 1px 1px 1px #ffffffa3, inset -1px -1px 2px #ffffff45, 0 12px 44px #14121854;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass {
        background: linear-gradient(145deg, rgb(49 47 51 / 40%), rgb(17 17 21 / 53%) 64%, rgb(51 48 52 / 39%));
        -webkit-backdrop-filter: blur(5px) saturate(.9);
        backdrop-filter: blur(5px) saturate(.9);
    }
}
.brand { display: block; width: 58px; height: 58px; margin: 0 auto; }
h1 {
    margin: 11px 0 25px; font: 500 clamp(32px, 5vw, 40px)/1.12 Georgia, "Times New Roman", serif;
    letter-spacing: -.055em; text-align: center;
}
form { display: grid; gap: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.field input {
    display: block; width: 100%; min-height: 46px; padding: 10px 14px;
    border: 1px solid #ffffff80; border-radius: 12px; color: #fff;
    background: linear-gradient(135deg, #ffffff20, #16151b38); font-size: 16px;
    box-shadow: inset 0 1px 1px #ffffff36; caret-color: white;
}
.field input::placeholder { color: #f2f0ed; }
.field input:autofill { background-clip: text; -webkit-text-fill-color: white; }
.field input:-webkit-autofill { -webkit-background-clip: text; -webkit-text-fill-color: white; }
.field input[aria-invalid="true"] { border-color: #ffbcb7; }
.glass :focus-visible { outline: 2px solid white; outline-offset: 3px; }
h1, .field label, .error { text-shadow: 0 1px 4px #0009; }
.error { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: #ffe2df; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.eye {
    position: absolute; inset: 1px 1px 1px auto; width: 44px; display: grid; place-items: center;
    border: 0; border-radius: 11px; background: transparent; color: white;
}
.eye svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.eye .slash { display: none; }
.eye[aria-pressed="true"] .slash { display: block; }
.enter {
    min-height: 47px; margin-top: 4px; border: 1px solid #ffffffe0; border-radius: 13px;
    background: linear-gradient(#fffffff0, #e7e5e4df); color: #202023;
    box-shadow: inset 0 1px 0 #ffffff38, 0 2px 4px #19181a24; font-size: 15px; font-weight: 600;
}
.enter:hover { background: #fff; }
.enter:active { background: #dedcdd; }

@media (max-width: 640px) {
    .glass { max-width: 352px; padding: 25px 24px; border-radius: 26px; }
    .brand { width: 50px; height: 50px; }
    h1 { margin-bottom: 21px; }
}
@media (max-height: 480px) {
    main { padding-block: 12px; }
    .glass { padding-block: 16px; }
    .brand { width: 36px; height: 36px; }
    h1 { font-size: 30px; margin: 4px 0 12px; }
    form { gap: 9px; }
}
@media (prefers-reduced-transparency: reduce) {
    .glass { background: linear-gradient(145deg, rgb(40 39 43 / 54%), rgb(19 19 23 / 62%)); }
}
@media (prefers-contrast: more) {
    .glass { background: #29292d; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
