/* Passcode page — CSS-only surface, no image assets, system fonts only */
:root {
  --navy-950: #08111F;
  --navy-900: #0D1A2E;
  --ivory: #F5EFE3;
  --ivory-dim: rgba(245, 239, 227, .62);
  --copper: #C98458;
  --copper-hi: #E0A27A;
  --teal: #6FA8A2;
  --err: #F0A58F;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--navy-950);
  background-image:
    radial-gradient(120vmax 90vmax at 50% 120%, rgba(111, 168, 162, .10), transparent 60%),
    radial-gradient(60vmax 60vmax at 50% -10%, rgba(201, 132, 88, .10), transparent 65%),
    repeating-radial-gradient(circle at 50% 50%, rgba(245, 239, 227, .045) 0 1px, transparent 1px 64px);
  color: var(--ivory);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.gate__form {
  width: 100%;
  max-width: 420px;
  padding: 40px 28px 30px;
  border-top: 1px solid var(--copper);
  border-bottom: 1px solid rgba(245, 239, 227, .14);
  background: linear-gradient(180deg, rgba(13, 26, 46, .82), rgba(8, 17, 31, .82));
  animation: rise .7s cubic-bezier(.2, .7, .2, 1) both;
}
.gate__label {
  display: block;
  margin: 0 0 14px;
  font: 500 12px/1.2 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--copper-hi);
}
.gate__row { display: flex; gap: 10px; }
.gate__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  font-size: 17px;
  letter-spacing: .08em;
  color: var(--ivory);
  background: rgba(245, 239, 227, .06);
  border: 1px solid rgba(245, 239, 227, .28);
  border-radius: 2px;
  outline: none;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.gate__input:focus-visible,
.gate__input:focus { border-color: var(--copper-hi); background: rgba(245, 239, 227, .09); box-shadow: 0 0 0 3px rgba(224, 162, 122, .28); }
.gate__btn {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .06em;
  color: var(--navy-950);
  background: var(--ivory);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.gate__btn:hover { background: var(--copper-hi); }
.gate__btn:active { transform: translateY(1px); }
.gate__btn:focus-visible { outline: 2px solid var(--copper-hi); outline-offset: 3px; }
.gate__msg { min-height: 1.4em; margin: 14px 0 0; font-size: 14px; line-height: 1.4; color: var(--teal); }
.gate__form[data-state="error"] .gate__msg { color: var(--err); }
.gate__form[data-state="error"] .gate__input { border-color: var(--err); animation: nudge .32s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateX(-5px); } 70% { transform: translateX(4px); } }
@media (max-width: 360px) {
  .gate__form { padding: 32px 18px 24px; }
  .gate__row { flex-direction: column; }
  .gate__btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
