:root {
  color-scheme: dark;
  --page: #10171e;
  --ink: #f4f6f8;
  --muted: #a2b0bc;
  --accent: #9fdcd5;
  --error: #ffb9b5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 0%, #25403e55, transparent 54%), radial-gradient(ellipse at 80% 100%, #22303c66, transparent 55%), var(--page);
}
button, input { font: inherit; }
button, input, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
p, h1 { margin: 0; }
.unlock-shell {
  width: min(100%, 390px);
  padding: max(30px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  text-align: center;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border: 1px solid #a4d7d424;
  border-radius: 15px;
  color: #b6e5df;
  background: linear-gradient(140deg, #b2e4dc18, #b2e4dc05);
  box-shadow: 0 9px 28px #080e1226;
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-name { font-size: 13px; font-weight: 600; letter-spacing: .5px; color: #c1d8d8; margin-bottom: 22px; }
h1 { font-size: 25px; line-height: 1.25; font-weight: 600; letter-spacing: -.65px; }
.unlock-description { font-size: 14px; line-height: 1.5; margin-top: 9px; color: var(--muted); }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.pin-entry { position: relative; width: 216px; height: 56px; margin: 16px auto 16px; border-radius: 12px; }
.pin-entry:focus-within { outline: 2px solid #9fdcd570; outline-offset: 0; }
#pin-input { position: absolute; inset: 0; z-index: 1; width: 100%; border: 0; border-radius: 12px; padding: 0; opacity: 0; cursor: text; }
.pin-dots { display: flex; align-items: center; justify-content: center; height: 100%; gap: 18px; pointer-events: none; }
.pin-dots span { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #d7e4e5ad; transition: background-color .12s, border-color .12s, transform .12s; }
.pin-dots span[data-filled="true"] { background: #e4f3f0; border-color: #e4f3f0; transform: scale(1.04); }
.pin-entry[data-invalid="true"] .pin-dots span { border-color: var(--error); }
.pin-entry[data-feedback="true"] { animation: pin-shake .35s ease-out; }
.keypad { display: grid; grid-template-columns: repeat(3, 78px); justify-content: center; gap: 15px 28px; }
.key { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 78px; height: 78px; padding: 0; border: 1px solid #e1edf208; border-radius: 50%; background: #d7e9f017; color: var(--ink); user-select: none; transition: background-color .12s, transform .12s; }
.key:hover { background: #d7e9f02b; }
.key:active { background: #d7e9f040; transform: scale(.95); }
.key-number { font-size: 31px; line-height: 1.08; font-weight: 400; }
.key-letters { font-size: 9px; line-height: 1.2; font-weight: 600; letter-spacing: 1.8px; margin-top: 3px; margin-left: 2px; color: #e5eef4; }
.key-zero .key-number { line-height: 1; }
.key-delete { display: grid; place-items: center; width: 78px; height: 78px; padding: 0; border: 0; border-radius: 50%; color: #dce5eb; background: transparent; }
.key-delete svg { width: 25px; height: 25px; }
.key-delete:hover { background: #d7e9f012; }
.remember-option { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; width: fit-content; max-width: 100%; margin: 20px auto 4px; cursor: pointer; text-align: left; }
.remember-option input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); flex: none; cursor: pointer; }
.remember-title { display: block; font-size: 12px; font-weight: 500; line-height: 1.5; color: #d5dfe6; }
.remember-detail { display: block; font-size: 11px; line-height: 1.6; color: var(--muted); }
.method-button, .retry-button { min-height: 44px; padding: 8px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--accent); font-size: 13px; font-weight: 500; }
.method-button:hover, .retry-button:hover { background: #9fdcd510; }
.unlock-status { display: flex; justify-content: center; align-items: center; min-height: 42px; margin: 0 auto; max-width: 300px; font-size: 12px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.unlock-status[data-tone="error"] { color: var(--error); }
.unlock-status[data-tone="success"] { color: var(--accent); }
.unlock-footer { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 4px; font-size: 10px; letter-spacing: .25px; color: #84929f; }
.unlock-footer svg { width: 12px; height: 12px; }
.password-panel { max-width: 300px; margin: 32px auto 0; text-align: left; }
.password-panel label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 9px; color: #c9d5df; }
.password-entry { position: relative; }
#password-input { display: block; width: 100%; min-height: 50px; border: 1px solid #b9cbd72e; border-radius: 12px; padding: 12px 50px 12px 15px; background: #dae9f00a; color: var(--ink); font-size: 16px; line-height: 1.4; }
#password-input:focus-visible { outline-offset: 3px; }
#password-input[aria-invalid="true"] { border-color: var(--error); }
#password-visibility { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; }
#password-visibility svg { width: 21px; height: 21px; }
#password-visibility:hover { color: var(--ink); background: #d7e9f010; }
.unlock-button { width: 100%; min-height: 48px; margin-top: 17px; padding: 12px; border: 0; border-radius: 12px; background: #aeddd6; color: #142622; font-size: 14px; font-weight: 650; }
.unlock-button:hover { background: #c1e9e3; }
#unlock-form[aria-busy="true"] .key, #unlock-form[aria-busy="true"] .unlock-button { opacity: .55; }
.noscript-message { margin-top: 14px; color: var(--error); font-size: 13px; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes pin-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@media (max-height: 740px) and (orientation: portrait) {
  .unlock-shell { padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .brand-name { margin-bottom: 18px; }
  .pin-entry { margin-top: 12px; margin-bottom: 10px; }
  .keypad { gap: 11px 28px; }
  .remember-option { margin-top: 16px; }
  .unlock-footer { margin-top: 9px; }
}
@media (max-width: 330px) {
  .unlock-shell { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 22px; }
  .keypad { grid-template-columns: repeat(3, 70px); gap: 12px 20px; }
  .key, .key-delete { width: 70px; height: 70px; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .unlock-shell { width: min(100%, 760px); display: grid; grid-template-columns: minmax(220px, 1fr) minmax(250px, 1fr); align-items: center; gap: 0 32px; padding: max(16px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left)); }
  .unlock-heading { grid-column: 1; grid-row: 1; }
  .brand-name { margin-bottom: 14px; }
  #unlock-form, #unlock-controls { display: contents; }
  #pin-panel, #password-panel { grid-column: 2; grid-row: 1 / 6; }
  .remember-option { grid-column: 1; grid-row: 2; margin: 12px auto 0; }
  .method-button { grid-column: 1; grid-row: 3; justify-self: center; }
  .unlock-status { grid-column: 1; grid-row: 4; min-height: 34px; }
  .retry-button { grid-column: 1; grid-row: 5; justify-self: center; }
  .unlock-footer { grid-column: 1; grid-row: 6; margin-top: 4px; }
  .pin-entry { height: 40px; margin: 0 auto 12px; }
  .keypad { grid-template-columns: repeat(3, 58px); gap: 9px 24px; }
  .key, .key-delete { width: 58px; height: 58px; }
  .key-number { font-size: 26px; }
  .key-letters { font-size: 8px; }
  .password-panel { width: 100%; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
