:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --line: #e5e7eb;
  --ink: #0f172a;
  --ink-2: #374151;
  --muted: #8a919c;
  --red: #dc2626;
  --navy: #212a3b;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f1115;
  --panel: #1a1d24;
  --line: #2a2f39;
  --ink: #eef0f4;
  --ink-2: #c3c8d1;
  --muted: #8b93a0;
  --red: #f06a6a;
  --navy: #2f9e60;
  color-scheme: dark;
}
:root[data-theme="dark"] .field { background: #242832; color: var(--ink); }
:root[data-theme="dark"] .field:focus { outline-color: #3b82f6; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.lock {
  min-height: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: max(56px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.logo { width: 72px; height: 72px; border-radius: 16px; }
h1 { font-size: 20px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }

#unlock { width: 100%; }

.card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hint { font-size: 13px; color: var(--muted); margin: 0 0 4px; line-height: 1.4; }
.lbl { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }

.field {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming in on focus */
  color: var(--ink);
  background: #fff;
}
.field:focus { outline: 2px solid var(--navy); outline-offset: -1px; }

.btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn.primary { background: var(--navy); color: #fff; margin-top: 8px; }
.btn:active { opacity: 0.85; }

.msg { min-height: 20px; font-size: 13px; color: var(--ink-2); text-align: center; margin: 0; line-height: 1.4; }
.msg.bad { color: var(--red); }
.link { text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 4px; }

[hidden] { display: none !important; }
