body:not(.is-authenticated) > :not(.auth-gate) { visibility: hidden; }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  background: var(--paper);
}
.auth-gate[hidden] { display: none; }
.auth-panel { width: min(100%, 390px); }
.auth-mark { margin: 0 0 28px; color: var(--lake); font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.auth-panel h1 { margin: 0; font-size: 36px; line-height: 1.08; letter-spacing: 0; }
.auth-panel > p { margin: 12px 0 26px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.auth-form { display: grid; gap: 14px; }
.auth-field { display: grid; gap: 7px; }
.auth-field span { color: var(--muted); font-size: 12px; font-weight: 720; }
.auth-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}
.auth-field input:focus { border-color: var(--lake); box-shadow: 0 0 0 3px rgba(40,123,144,.12); }
.auth-form button {
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 760;
  cursor: pointer;
}
.auth-form button:disabled { opacity: .6; cursor: wait; }
.auth-status { min-height: 20px; margin: 0; color: var(--muted); font-size: 12px; }
.auth-status.is-error { color: var(--warning); }
.auth-account { display: flex; align-items: center; gap: 10px; }
.auth-identity { color: var(--muted); font-size: 11px; }
.auth-logout { padding: 0; border: 0; background: transparent; color: var(--lake); font-size: 11px; cursor: pointer; }

