:root {
  --bg: #f4f6fb; --surface: #fff; --border: #e4e8f0; --text: #0f172a; --muted: #64748b;
  --accent: #2563eb; --accent-2: #1d4ed8; --accent-soft: #e8f0fe; --bad: #dc2626; --bad-soft: #fdecec;
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 14px/1.45 var(--font); color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, #dbe7ff 0%, transparent 60%),
    radial-gradient(900px 500px at 110% 110%, #e3ecff 0%, transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
.wrap { min-height: 100vh; display: grid; place-content: center; padding: 24px 16px; gap: 14px; }
.card {
  width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px 28px 26px; text-align: center;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 24px 60px rgba(15,23,42,.10);
}
.card.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
.logo {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,.35);
}
.logo svg { width: 26px; height: 26px; }
h1 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 4px 0 18px; font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#pin { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.dots { display: flex; justify-content: center; gap: 10px; min-height: 22px; margin-bottom: 6px; cursor: text; }
.dots span {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  animation: pop .15s ease-out;
}
.dots .ph { background: #e2e8f0; animation: none; }
@keyframes pop { from { transform: scale(.4); } to { transform: scale(1); } }
.msg { min-height: 20px; font-size: 12.5px; font-weight: 600; color: var(--bad); margin: 4px 0 12px; }

.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pad button {
  height: 54px; border-radius: 14px; border: 1px solid var(--border); background: #f8fafc;
  font: 600 20px var(--font); color: var(--text); cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
}
.pad button:hover { background: var(--accent-soft); border-color: #bfd3fb; }
.pad button:active { transform: scale(.96); }
.pad .aux { font-size: 13px; color: var(--muted); display: grid; place-items: center; }
.pad .aux svg { width: 22px; height: 22px; }
.unlock {
  margin-top: 16px; width: 100%; height: 46px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: #fff; font: 650 15px var(--font);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 18px rgba(37,99,235,.3); transition: background .15s, opacity .15s;
}
.unlock:hover { background: var(--accent-2); }
.unlock:disabled { opacity: .55; cursor: not-allowed; }
.unlock svg { width: 18px; height: 18px; }
button:focus-visible { outline: 3px solid rgba(37,99,235,.35); outline-offset: 2px; }

.locked { padding: 8px 0 4px; }
.lock-ico {
  width: 56px; height: 56px; margin: 4px auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bad-soft); color: var(--bad);
}
.lock-ico svg { width: 28px; height: 28px; }
.lock-title { font-weight: 700; font-size: 16px; }
.lock-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.countdown { font: 700 40px/1.2 "Cascadia Mono", Consolas, monospace; margin-top: 10px; color: var(--text); letter-spacing: .02em; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin: 0; }
