/* Sign-in screens: one centred card over the page, in the app's own type, colours and buttons. */
.auth { position: fixed; inset: 0; z-index: 200; background: var(--bg); display: grid; place-items: center; overflow-y: auto;
  padding: max(20px, env(safe-area-inset-top, 0px)) 16px max(20px, env(safe-area-inset-bottom, 0px)); }
.auth[hidden] { display: none; }
.auth-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px 24px; }
.auth-brand { font-family: var(--f-display); font-weight: 700; font-size: 24px; color: var(--accent); letter-spacing: -0.01em; }
.auth-brand small { display: block; font-family: var(--f-body); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.auth-card h1 { font-family: var(--f-display); font-size: 22px; letter-spacing: -0.01em; margin: 22px 0 4px; }
.auth-card h1 + .auth-f, .auth-card h1 + .auth-err, .auth-card h1 + .auth-ok { margin-top: 16px; }
.auth-sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.auth-f { display: grid; gap: 6px; margin-bottom: 14px; }
.auth-f > span { font-size: 13px; font-weight: 500; }
.auth-f input { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; color: inherit; min-height: 44px; }
.auth-f input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-code input { font-family: var(--f-mono); font-size: 24px; letter-spacing: .32em; text-align: center; padding-left: calc(12px + .32em); }
.auth-go { width: 100%; min-height: 44px; font-size: 15px; margin-top: 4px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; }
.auth-lnk { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 500; padding: 4px 0; cursor: pointer; }
@media (hover: hover) { .auth-lnk:hover { text-decoration: underline; } }
.auth-err { background: var(--danger-soft); color: var(--danger); border-radius: 8px; padding: 9px 12px; font-size: 14px; margin-bottom: 14px; }
.auth-ok { background: var(--inst-soft); color: var(--ink); border-radius: 8px; padding: 9px 12px; font-size: 14px; margin-bottom: 14px; }
.auth-note { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.auth-steps { margin: 0 0 16px; padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }
.auth-qr { display: grid; justify-items: center; gap: 10px; margin: 4px 0 16px; }
.auth-qr img { width: 176px; height: 176px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.auth-key { font-family: var(--f-mono); font-size: 13px; background: var(--surface-2); border-radius: 6px; padding: 6px 10px; word-break: break-all; text-align: center; user-select: all; }
.auth-who { font-size: 13px; color: var(--muted); margin: -10px 0 16px; }
