/* Passcode gate. While body.gate-locked the app chrome and content are hidden. */
body.gate-locked > header, body.gate-locked > main, body.gate-locked > noscript { display: none !important; }
#gate {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: #17233a; color: #fff; padding: calc(1.5rem + env(safe-area-inset-top, 0px)) 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  font: 20px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
#gate .gate-box { width: 100%; max-width: 520px; text-align: center; }
#gate .gate-logo { font-size: 4.5rem; line-height: 1; margin-bottom: .5rem; }
#gate h1 { font-size: 2.4rem; margin: 0 0 .25rem; }
#gate h2 { font-size: 1.6rem; font-weight: 500; margin: 0 0 1.5rem; color: #d5dbe1; }
#gate form { display: flex; flex-direction: column; gap: 1rem; }
#gate input {
  width: 100%; font-size: 2rem; text-align: center; letter-spacing: .15em; padding: 1rem; min-height: 72px;
  border-radius: 16px; border: 3px solid #52606d; background: #fff; color: #17233a;
}
#gate input:focus { outline: none; border-color: #c65d3b; }
#gate button {
  font-size: 1.6rem; font-weight: 700; min-height: 72px; border: 0; border-radius: 16px; background: #c65d3b; color: #fff; cursor: pointer;
}
#gate button:disabled { opacity: .55; cursor: not-allowed; }
#gate .gate-msg { min-height: 2.6em; font-size: 1.15rem; color: #ffb4a8; margin: 1rem 0 0; }
#gate .gate-note { font-size: .95rem; color: #9aa5b1; margin-top: 1.5rem; }
/* cloud sign-in (same screen, extra bits) */
#gate .gate-link { background: none; color: #ffcf99; font-size: 1.05rem; font-weight: 500; min-height: 44px; text-decoration: underline; border: 0; cursor: pointer; }
#gate .gate-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
#gate.cloud-login input[type="email"], #gate.cloud-login input[type="text"] { letter-spacing: normal; font-size: 1.5rem; }
#gate.cloud-login > .gate-box > .gate-link { margin-top: 1rem; }
#gate .gate-note { margin: 0 0 1.25rem; }
