/* The lock screen. LOCKED = the iPhone app's native splash exactly (SplashView.swift): the time and the day in the
   middle of a plain ground, nothing else, so splash -> lock does not jump. A tap, a swipe up or any key slides the
   sign-in up as a sheet from the bottom (auth.js; the fields are in the page from the start, for password managers).
   Id selectors on purpose: every look restates .lk-* for the old two-column sign-in, and the face is the same in
   every look (the splash is). The sheet's fields keep each look's own .lk-in / .btn styling. */
#lock.lock {
  --lk-bg: #17191A; --lk-time: #F4F6F8; --lk-date: #C7CDD5; --lk-quiet: #9AA1AA;      /* ShellPalette.dark */
  position: fixed; inset: 0; height: auto; display: block; overflow: hidden; overflow: clip; background: var(--lk-bg); color: var(--lk-time);
  -webkit-user-select: none; user-select: none; touch-action: none; cursor: default;
}
html[data-theme="light"] #lock.lock { --lk-bg: #EFEBE3; --lk-time: #191713; --lk-date: #423E37; --lk-quiet: #57524A; }   /* ShellPalette.light */

/* the face: one stack in the middle of the WHOLE screen (safe areas ignored), its centre 26 px above the middle */
#lock .lk-face { position: absolute; inset: 0; display: grid; place-items: center; }
#lock .lk-now { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  translate: 0 calc(-26px - var(--lk-lift, 0px)); transition: translate 320ms var(--ease, cubic-bezier(.2, .7, .2, 1)); }
#lock .lk-time { margin: 0; font: 300 64px/76px -apple-system, BlinkMacSystemFont, var(--sans); letter-spacing: -1.9px; color: var(--lk-time); font-variant-numeric: tabular-nums; }
#lock .lk-date { margin: 0; font: 400 17px/20px -apple-system, BlinkMacSystemFont, var(--sans); letter-spacing: 0; color: var(--lk-date); }
/* Claude is waiting: one amber line under the day; it hangs below the stack, so the clock never moves for it */
#lock .lk-wait { position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% 0; margin: 0; white-space: nowrap; font: 500 15px/20px var(--sans); color: var(--hold-ink); }
/* the hint: only after a few seconds of nothing (data-hint, auth.js) */
#lock .lk-tap { position: absolute; left: 0; right: 0; bottom: calc(44px + env(safe-area-inset-bottom)); margin: 0; text-align: center;
  font: 400 15px/20px var(--sans); color: var(--lk-quiet); opacity: 0; pointer-events: none; }
#lock[data-lk="locked"][data-hint] .lk-tap { opacity: 1; transition: opacity 600ms linear; }

/* the sheet: today's sign-in, parked below the screen until asked for */
#lock .lk-sheet { position: absolute; left: 0; right: 0; bottom: var(--kb, 0px); margin: 0 auto; width: min(480px, 100%); box-sizing: border-box;
  padding: 24px 24px calc(20px + env(safe-area-inset-bottom)); background: var(--panel); border: 1px solid var(--rule); border-bottom: 0;
  border-radius: var(--r-6) var(--r-6) 0 0; -webkit-user-select: text; user-select: text; touch-action: manipulation;
  translate: 0 calc(100% + var(--kb, 0px) + 8px); transition: translate 320ms var(--ease, cubic-bezier(.2, .7, .2, 1)); }
#lock[data-lk="open"] .lk-sheet { translate: 0 0; }
#lock[data-lk="open"] { --lk-lift: calc((var(--lk-sheet-h, 0px) + var(--kb, 0px)) / 2); }
@media (prefers-reduced-motion: reduce) { #lock .lk-now, #lock .lk-sheet, #lock[data-hint] .lk-tap { transition: none; } }

#lock .lk-f { display: block; }
#lock .lk-user { margin-top: 0; }
#lock .lk-form { display: flex; align-items: stretch; width: 100%; max-width: 100%; min-width: 0; margin-top: 16px; }
#lock .lk-form + .lk-form { margin-top: 10px; }
#lock .lk-in { flex: 1; min-width: 0; cursor: text; }
#lock .lk-u .lk-in { width: 100%; }
.lk-in { outline: none; border-color: var(--rule-2); }
.lk-in:focus-within { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; }
.lk-in input { flex: 1; min-width: 0; width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--ink); font: 500 17px/24px var(--sans); -webkit-appearance: none; appearance: none; }
.lk-in input[type="password"] { letter-spacing: .12em; }
.lk-in input::placeholder { color: var(--ink-3); letter-spacing: 0; opacity: 1; }
.lk-form .btn.off { background: var(--panel-2); border-color: var(--rule-2); color: var(--ink-3); }
.lk-err { margin-top: 12px; font: 600 16px/22px var(--sans); color: var(--stop); }
.lk-swap { display: block; margin-top: 14px; min-height: 32px; font: var(--do); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
/* Connect a PC (lock-pc.js): a quiet link under the sign-in; its code field reads like the code (capitals, spaced) */
#lock .lk-pc { margin-top: 4px; }
#lock .lk-pcf input { letter-spacing: .14em; text-transform: uppercase; }
#lock .lk-pcf input::placeholder { text-transform: none; }
/* is the machine answering? one quiet row at the foot of the sheet (before sign-in that is all we may know) */
#lock .lk-mach { display: flex; align-items: center; gap: 8px; height: auto; min-height: 20px; margin: 16px 0 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--rule); font: var(--meta); color: var(--ink-3); }
#lock .lk-mach b, #lock .lk-mach span { font: inherit; color: inherit; }
#lock .lk-mach em { margin-left: auto; font: inherit; font-style: normal; color: inherit; font-variant-numeric: tabular-nums; }

.phone #lock .lk-in { height: 56px; }
.phone #lock .lk-form .btn { height: 56px; padding: 0 18px; }
.phone #lock .lk-swap { min-height: 44px; }
.phone #lock .lk-hint:empty { display: none; }
/* a desk-sized screen: the same face at Home's desk size */
@media (min-width: 700px) and (min-height: 600px) {
  body:not(.phone) #lock .lk-time { font-size: 112px; line-height: 116px; letter-spacing: -.03em; }
  body:not(.phone) #lock .lk-date { font-size: 20px; line-height: 28px; }
  body:not(.phone) #lock .lk-sheet { bottom: 0; }
}
