* { box-sizing: border-box; }
[hidden], #error:empty { display: none; }
:root { --accent: #643cd6; --muted: #60687c; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 5vh, 52px) 16px;
  color: #181d2e;
  background: radial-gradient(ellipse at top, #efeaff, transparent 72%), #f6f7fb;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
main {
  width: min(100%, 422px);
  padding: clamp(23px, 5vw, 36px);
  border: 1px solid #e4e3ef;
  border-radius: 24px;
  background: white;
  box-shadow: 0 15px 48px rgba(45, 24, 90, .08), 0 2px 6px rgba(45, 24, 90, .03);
}
.brand { display: flex; align-items: center; gap: 14px; color: #601f3d; font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.brand img { border-radius: 16px; }
small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; letter-spacing: normal; }
h1 { margin: 28px 0 0; font-size: clamp(24px, 6vw, 28px); line-height: 1.2; letter-spacing: -.7px; }
p { color: var(--muted); margin: 10px 0 0; }
form { display: grid; gap: 18px; margin-top: 24px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input, button { font: inherit; color: inherit; }
input:not([type=checkbox]) {
  width: 100%; height: 48px; padding: 0 13px; font-size: 16px;
  border-radius: 11px; border: 1px solid #c9cddd; background: #fff;
}
input:not([type=checkbox]):focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px #eee9ff;
}
.secret { position: relative; }
.secret input:not([type=checkbox]) { padding-right: 50px; }
#hint { margin-top: 6px; }
button { cursor: pointer; border: 0; }
button:focus-visible, input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eye {
  position: absolute; right: 3px; top: 3px; width: 42px; height: 42px;
  display: grid; place-items: center; border-radius: 9px; background: transparent; color: var(--muted);
}
.eye:hover { color: var(--accent); background: #f6f4ff; }
.eye svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.eye[aria-pressed=false] .slash { display: none; }
.remember { display: flex; align-items: center; gap: 9px; margin: 0; font-weight: 400; cursor: pointer; }
.remember input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.primary { width: 100%; min-height: 48px; padding: 10px; border-radius: 11px; color: white; background: var(--accent); font-weight: 650; }
.primary:hover { background: #5230ba; }
.primary:disabled { opacity: .65; cursor: wait; }
#error { margin: 0; font-size: 14px; color: #982132; overflow-wrap: anywhere; }
#retry { margin-top: 16px; }
