/* Animated lock screen demo (lockdemo.js). Copied to public/ untouched by the gulp `css-modern` task:
   the Node 4 less/clean-css stages predate custom properties.

   Everything is laid out on the 375x812 Figma artboard ("PIN / Entry") and scaled to the host with
   --ld-scale, which lockdemo.js keeps in sync with the container width. */

.ld {
  --ld-bg: #ffffff;
  --ld-ink: #000000;
  --ld-ink-2: rgba(60, 60, 67, .6);
  --ld-accent: #007aff;
  --ld-pad-top: #309eff;
  --ld-pad-mid: #007aff;
  --ld-pad-end: #007aff;
  --ld-error: #ff3b30;
  --ld-wordmark: rgba(60, 60, 67, .3);
  --ld-tile: #f2f2f7;
  --ld-bar: rgba(249, 249, 249, .94);
  --ld-bar-line: rgba(0, 0, 0, .12);
  --ld-toast: rgba(30, 30, 32, .94);
  --ld-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ld-scale: 1;

  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: var(--ld-bg);
  font-family: var(--ld-font);
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  /* No fade-in: the demo is drawn under the static screenshot and simply replaces it when ready
     (the screenshot is hidden by the host), so there is nothing to crossfade against. */
}


.ld[data-theme="dark"] {
  --ld-bg: #000000;
  --ld-ink: #ffffff;
  --ld-ink-2: rgba(235, 235, 245, .6);
  --ld-accent: #0a84ff;
  --ld-pad-top: #37a6ff;
  --ld-pad-mid: #0c85ff;
  --ld-pad-end: #0984ff;
  --ld-error: #ff453a;
  --ld-wordmark: rgba(235, 235, 245, .3);
  --ld-tile: #1c1c1e;
  --ld-bar: rgba(22, 22, 24, .94);
  --ld-bar-line: rgba(255, 255, 255, .12);
  --ld-toast: rgba(44, 44, 46, .96);
}

.ld[data-platform="android"] {
  --ld-accent: #006aff;
  --ld-pad-top: #006aff;
  --ld-pad-mid: #006aff;
  --ld-pad-end: #006aff;
  --ld-ink-2: #666666;
  --ld-font: Roboto, "Google Sans", "Helvetica Neue", Arial, sans-serif;
}
.ld[data-platform="android"][data-theme="dark"] {
  --ld-bg: #121212;
  --ld-accent: #45a5ff;
  --ld-pad-top: #45a5ff;
  --ld-pad-mid: #45a5ff;
  --ld-pad-end: #45a5ff;
  --ld-ink-2: #a0a0a0;
  --ld-tile: #1e1e1e;
}

.ld-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 375px;
  height: 812px;
  transform-origin: 0 0;
  transform: scale(var(--ld-scale));
}
.ld-stage * {
  box-sizing: border-box;
}

/* ---- Status bar (shared by both screens) ----
   iOS: Dynamic Island layout. The clock and the signal/wifi/battery cluster are each centred in the
   "ear" between the island and the screen edge, on the island's vertical centre line. */
.ld-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  z-index: 6;
  color: var(--ld-ink);
}
.ld-time {
  position: absolute;
  left: 0;
  top: 19px;
  width: 138px;
  text-align: center;
  font-size: 16px;
  line-height: 21px;
  font-weight: 600;
  letter-spacing: -.3px;
  font-variant-numeric: tabular-nums;
}
.ld-status svg {
  position: absolute;
  right: 35px;
  top: 23px;
}
.ld-island {
  position: absolute;
  left: 50%;
  top: 11px;
  width: 122px;
  height: 36px;
  margin-left: -61px;
  border-radius: 18px;
  background: #000;
  z-index: 11;
}
.ld[data-platform="android"] .ld-island {
  display: none;
}
.ld[data-platform="android"] .ld-time {
  left: 24px;
  top: 16px;
  width: auto;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ld-ink);
}
.ld[data-platform="android"] .ld-status svg {
  top: 20px;
  right: 22px;
  color: var(--ld-ink);
}

/* ---- Vault (album list), sits under the lock screen ---- */
.ld-vault {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ld-bg);
  color: var(--ld-ink);
}
.ld-vault-title {
  position: absolute;
  left: 18px;
  top: 112px;
  margin: 0;
  font-size: 34px;
  line-height: 41px;
  font-weight: 700;
  letter-spacing: .3px;
}
.ld-grid {
  position: absolute;
  left: 13px;
  top: 165px;
  width: 349px;
  display: grid;
  grid-template-columns: 167px 167px;
  column-gap: 15px;
  row-gap: 15px;
}
.ld-album {
  opacity: 0;
  transform: translateY(18px) scale(.94);
}
.ld-album-cover {
  display: block;
  width: 167px;
  height: 176px;
  border-radius: 12px;
  background: var(--ld-tile) center / cover no-repeat;
}
.ld-album-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 4px 0;
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -.4px;
}
.ld-album-count {
  font-size: 13px;
  color: var(--ld-ink-2);
  letter-spacing: 0;
}
.ld.is-open .ld-album {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .7s cubic-bezier(.2, .9, .25, 1.15);
}
.ld.is-open .ld-album:nth-child(1) { transition-delay: .18s; }
.ld.is-open .ld-album:nth-child(2) { transition-delay: .26s; }
.ld.is-open .ld-album:nth-child(3) { transition-delay: .36s; }
.ld.is-open .ld-album:nth-child(4) { transition-delay: .44s; }
.ld.is-open .ld-album:nth-child(5) { transition-delay: .54s; }
.ld.is-open .ld-album:nth-child(6) { transition-delay: .62s; }

/* Liquid Glass controls floating over the albums: activity feed + messages up top, list / add / cloud below. */
.ld-glass {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ld-ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .58));
  -webkit-backdrop-filter: blur(14px) saturate(1.8);
  backdrop-filter: blur(14px) saturate(1.8);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .9), inset 0 1px 1px rgba(255, 255, 255, .9),
    0 6px 20px rgba(0, 0, 0, .13), 0 1px 3px rgba(0, 0, 0, .08);
  opacity: 0;
  transform: scale(.5);
}
.ld[data-theme="dark"] .ld-glass {
  background: linear-gradient(180deg, rgba(70, 70, 76, .62), rgba(40, 40, 44, .55));
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .16), inset 0 1px 1px rgba(255, 255, 255, .18),
    0 6px 20px rgba(0, 0, 0, .5);
}
.ld-glass-feed { left: 16px; top: 58px; }
.ld-glass-chat { right: 16px; top: 58px; }
.ld-glass-list { left: 14px; bottom: 42px; }
.ld-glass-cloud { right: 14px; bottom: 42px; }
.ld-glass-add,
.ld[data-theme="dark"] .ld-glass-add {
  left: 50%;
  bottom: 42px;
  margin-left: -22px;
  color: #fff;
  background: linear-gradient(180deg, #3d95ff, #1a7bf5);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .35), inset 0 1px 1px rgba(255, 255, 255, .45),
    0 6px 20px rgba(0, 90, 220, .35);
}
.ld-badge {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-size: 11.5px;
  line-height: 18px;
  font-weight: 600;
  text-align: center;
}
.ld.is-open .ld-glass {
  opacity: 1;
  transform: none;
  transition: opacity .4s ease, transform .7s cubic-bezier(.2, .9, .25, 1.3);
}
.ld.is-open .ld-glass-feed { transition-delay: .3s; }
.ld.is-open .ld-glass-chat { transition-delay: .38s; }
.ld.is-open .ld-glass-list { transition-delay: .55s; }
.ld.is-open .ld-glass-add { transition-delay: .62s; }
.ld.is-open .ld-glass-cloud { transition-delay: .69s; }

/* Android vault chrome (Material, from the "Albums - album states" frames): a plain top row with
   new-folder + overflow icons beside the title, a bottom app bar with menu + cloud, and a FAB. */
.ld-mtop,
.ld-mbar,
.ld-mfab {
  display: none;
  position: absolute;
  color: var(--ld-ink);
}
.ld[data-platform="android"] .ld-mtop,
.ld[data-platform="android"] .ld-mbar,
.ld[data-platform="android"] .ld-mfab {
  display: flex;
}
.ld[data-platform="android"] .ld-glass {
  display: none;
}
.ld[data-platform="android"] .ld-vault-title {
  top: 88px;
  font-size: 30px;
  line-height: 40px;
  font-weight: 400;
  letter-spacing: 0;
}
.ld[data-platform="android"] .ld-grid {
  top: 150px;
}
.ld-mtop {
  right: 18px;
  top: 96px;
  gap: 22px;
  align-items: center;
  color: var(--ld-ink-2);
  opacity: 0;
  transform: translateY(-8px);
}
.ld-mbar {
  left: 0;
  right: 0;
  bottom: 0;
  height: 76px;
  padding: 0 40px 22px;
  align-items: center;
  justify-content: space-between;
  background: var(--ld-bg);
  box-shadow: 0 -1px 0 rgba(128, 128, 128, .18);
  color: var(--ld-ink-2);
  opacity: 0;
  transform: translateY(100%);
}
/* top-bar actions with Material badges (activity feed, messages) */
.ld-mact {
  position: relative;
  display: flex;
}
.ld-mact b {
  position: absolute;
  right: -8px;
  top: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #b3261e;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  text-align: center;
}
.ld-mfab {
  left: 50%;
  bottom: 48px;
  width: 56px;
  height: 56px;
  margin-left: -28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--ld-accent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);
  opacity: 0;
  transform: scale(.4);
}
.ld[data-platform="android"][data-theme="dark"] .ld-mfab {
  color: #0b1a2e;
}
.ld.is-open .ld-mtop,
.ld.is-open .ld-mbar {
  opacity: 1;
  transform: none;
  transition: opacity .35s ease .25s, transform .55s cubic-bezier(.2, .8, .2, 1) .25s;
}
.ld.is-open .ld-mfab {
  opacity: 1;
  transform: none;
  transition: opacity .3s ease .55s, transform .6s cubic-bezier(.2, .9, .25, 1.3) .55s;
}

/* ---- Lock screen ---- */
.ld-lock {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}
.ld-lock-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ld-bg);
  transition: opacity .55s ease .1s;
}
.ld-nav-icon {
  position: absolute;
  top: 54px;
  color: var(--ld-accent);
  transition: opacity .3s ease;
}
.ld-nav-bio { left: 18px; }
.ld-nav-more { right: 18px; }
.ld[data-platform="android"] .ld-nav-icon {
  color: var(--ld-ink-2);
  top: 60px;
}
.ld-bio-android,
.ld-more-android,
.ld[data-platform="android"] .ld-bio-ios,
.ld[data-platform="android"] .ld-more-ios {
  display: none;
}
.ld[data-platform="android"] .ld-bio-android,
.ld[data-platform="android"] .ld-more-android {
  display: block;
}

.ld-upper {
  position: absolute;
  top: 88px;
  left: 0;
  width: 100%;
  height: 274px;
  transition: opacity .35s ease;
}
.ld-wordmark {
  position: absolute;
  left: 124px;
  top: 87px;
  width: 128px;
  height: 30px;
  fill: var(--ld-wordmark);
  transition: opacity .3s ease, transform .4s ease;
}
.ld.is-typing .ld-wordmark,
.ld.is-bio .ld-wordmark {
  opacity: 0;
  transform: translateY(-6px);
}

.ld-helper {
  position: absolute;
  left: 0;
  right: 0;
  top: 94px;
  text-align: center;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -.2px;
  color: var(--ld-error);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
}
.ld.is-error .ld-helper {
  opacity: 1;
  transform: none;
}

/* PIN indicators: a centred row; typed digits are 12px dots, the next slot is a faint 8px dot. */
.ld-dots {
  position: absolute;
  left: 0;
  right: 0;
  top: 130px;
  height: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.ld-dot {
  flex: none;
  width: 0;
  height: 12px;
  margin: 0;
  position: relative;
  transition: width .22s cubic-bezier(.3, 1.3, .5, 1), margin .22s cubic-bezier(.3, 1.3, .5, 1);
}
.ld-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--ld-accent);
  opacity: 0;
  transform: scale(0);
  transition: transform .22s cubic-bezier(.3, 1.6, .5, 1), opacity .15s ease, background-color .15s ease;
}
.ld-dot.is-next,
.ld-dot.is-on {
  width: 12px;
  margin: 0 5px;
}
.ld-dot.is-next::after {
  opacity: .3;
  transform: scale(.667);
}
.ld-dot.is-on::after {
  opacity: 1;
  transform: scale(1);
}
/* error: dots go red and tumble away (offsets from the "PIN - Error transition" frame) */
.ld-dots.is-wrong .ld-dot::after {
  background: var(--ld-error);
}
.ld-dots.is-falling .ld-dot::after {
  transition: transform .9s cubic-bezier(.3, 0, .7, 1), opacity .9s ease-in;
  opacity: 0;
}
.ld-dots.is-falling .ld-dot:nth-child(1)::after { transform: translate(-4px, 64px) scale(.8); transition-delay: .06s; }
.ld-dots.is-falling .ld-dot:nth-child(2)::after { transform: translate(2px, 30px) scale(.9); transition-delay: .2s; }
.ld-dots.is-falling .ld-dot:nth-child(3)::after { transform: translate(-2px, 52px) scale(.8); transition-delay: .12s; }
.ld-dots.is-falling .ld-dot:nth-child(4)::after { transform: translate(5px, 40px) scale(.85); transition-delay: 0s; }
/* success: a quick ripple through the row */
.ld-dots.is-right .ld-dot::after {
  animation: ld-dot-pop .5s ease both;
}
.ld-dots.is-right .ld-dot:nth-child(2)::after { animation-delay: .06s; }
.ld-dots.is-right .ld-dot:nth-child(3)::after { animation-delay: .12s; }
.ld-dots.is-right .ld-dot:nth-child(4)::after { animation-delay: .18s; }
@keyframes ld-dot-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* Biometric glyph (Face ID / fingerprint) shown in place of the wordmark */
.ld-bio {
  position: absolute;
  left: 50%;
  top: 70px;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  color: var(--ld-accent);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .3s ease, transform .45s cubic-bezier(.3, 1.4, .5, 1);
}
.ld.is-bio .ld-bio {
  opacity: 1;
  transform: none;
}
.ld-bio svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 64px;
}
.ld-bio-scan {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--ld-accent);
  box-shadow: 0 0 10px 1px var(--ld-accent);
  opacity: 0;
}
.ld.is-bio-scanning .ld-bio-scan {
  animation: ld-scan 1s ease-in-out infinite alternate;
  opacity: .9;
}
@keyframes ld-scan {
  from { transform: translateY(0); }
  to { transform: translateY(46px); }
}
.ld-bio-face,
.ld-bio-finger,
.ld-bio-check {
  transition: opacity .25s ease, transform .35s cubic-bezier(.3, 1.4, .5, 1);
}
.ld-bio-finger,
.ld[data-platform="android"] .ld-bio-face {
  display: none;
}
.ld[data-platform="android"] .ld-bio-finger {
  display: block;
}
.ld-bio-check {
  opacity: 0;
  transform: scale(.5);
  color: #34c759;
}
.ld.is-bio-ok .ld-bio-face,
.ld.is-bio-ok .ld-bio-finger {
  opacity: 0;
  transform: scale(.7);
}
.ld.is-bio-ok .ld-bio-check {
  opacity: 1;
  transform: none;
}

.ld-lower {
  position: absolute;
  top: 362px;
  left: 0;
  width: 100%;
  height: 450px;
  background: linear-gradient(180deg, var(--ld-pad-top) 0%, var(--ld-pad-mid) 66.7%, var(--ld-pad-end) 100%);
  transition: transform .85s cubic-bezier(.6, 0, .25, 1);
  will-change: transform;
}
.ld-error-wash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--ld-error) 0%, rgba(255, 59, 48, 0) 100%);
  opacity: 0;
  transition: opacity 1.1s ease;
}
.ld.is-error .ld-error-wash {
  opacity: 1;
  transition: opacity .18s ease;
}
.ld-wave {
  position: absolute;
  top: -1px;
  left: 0;
  width: 375px;
  height: 60px;
  /* a canvas (lockdemo.js draws it, in --ld-bg) */
}

/* The pads sit centred between the bottom of the wave (48px) and the home indicator. */
.ld-pattern {
  top: 60px;
}
.ld-pad {
  top: 74px;
}
.ld-pad,
.ld-pattern {
  position: absolute;
  left: 0;
  width: 100%;
  height: 368px;
  transition: opacity .35s ease, transform .45s ease;
}
.ld-key {
  position: absolute;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  line-height: 75px;
  text-align: center;
  font-weight: 400;
  letter-spacing: .4px;
}
.ld[data-platform="android"] .ld-key {
  font-weight: 400;
  letter-spacing: 0;
}
.ld-key::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transform: scale(.82);
  transition: opacity .75s ease, transform .75s ease;
}
.ld-key.is-pressed::before {
  opacity: .2;
  transform: none;
  transition: opacity .18s ease-out, transform .22s ease-out;
}
.ld-key svg {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -12px 0 0 -15px;
  opacity: .7;
}

/* Pattern pad (variant): 3x3 nodes with the drawn path on top */
.ld-pattern {
  opacity: 0;
  transform: scale(.96);
}
.ld.is-pattern .ld-pattern {
  opacity: 1;
  transform: none;
}
.ld.is-pattern .ld-pad {
  opacity: 0;
  transform: scale(1.04);
}
.ld-node {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s ease;
}
.ld-node.is-hit {
  transform: scale(1.5);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .22);
}
.ld-pattern svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 375px;
  height: 368px;
  overflow: visible;
}
.ld-pattern polyline {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .85;
}

.ld-home {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 3px;
  background: #fff;
  z-index: 7;
  transition: background-color .5s ease;
}
.ld.is-open .ld-home {
  background: var(--ld-ink);
}
.ld-androidnav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  z-index: 7;
  color: #fff;
  opacity: .55;
  transition: color .5s ease;
}
.ld.is-open .ld-androidnav {
  color: var(--ld-ink);
}
.ld[data-platform="android"] .ld-home {
  width: 108px;
  height: 4px;
  margin-left: -54px;
  bottom: 9px;
  opacity: .9;
}
.ld[data-platform="android"] .ld-androidnav { display: none; }

/* Unlock: the keypad drains away like a tide and the lock chrome fades, revealing the vault. */
.ld.is-open .ld-lower {
  transform: translateY(520px);
}
.ld.is-open .ld-lock-bg,
.ld.is-open .ld-upper,
.ld.is-open .ld-nav-icon {
  opacity: 0;
}
/* Re-lock, part one: the vault's contents fall away under their own weight, leaving it empty. */
.ld.is-closing .ld-album {
  opacity: 0;
  transition: opacity .7s cubic-bezier(.7, 0, 1, .6), transform .85s cubic-bezier(.5, 0, .9, .5);
}
.ld.is-closing .ld-album:nth-child(1) { transform: translateY(330px) rotate(-9deg) scale(.92); transition-delay: .26s; }
.ld.is-closing .ld-album:nth-child(2) { transform: translateY(360px) rotate(8deg) scale(.92); transition-delay: .32s; }
.ld.is-closing .ld-album:nth-child(3) { transform: translateY(300px) rotate(7deg) scale(.92); transition-delay: .13s; }
.ld.is-closing .ld-album:nth-child(4) { transform: translateY(335px) rotate(-8deg) scale(.92); transition-delay: .19s; }
.ld.is-closing .ld-album:nth-child(5) { transform: translateY(270px) rotate(-6deg) scale(.92); transition-delay: 0s; }
.ld.is-closing .ld-album:nth-child(6) { transform: translateY(295px) rotate(9deg) scale(.92); transition-delay: .06s; }
.ld-vault-title {
  transition: opacity .4s ease, transform .6s cubic-bezier(.55, 0, .9, .45);
}
.ld.is-closing .ld-vault-title {
  opacity: 0;
  transform: translateY(60px);
  transition-delay: .36s;
}
.ld.is-closing .ld-glass {
  opacity: 0;
  transform: scale(.5);
  transition: opacity .3s ease, transform .4s cubic-bezier(.5, 0, .9, .5);
}
.ld.is-closing .ld-glass-feed,
.ld.is-closing .ld-glass-chat {
  transition-delay: .3s;
}
.ld.is-closing .ld-mfab {
  opacity: 0;
  transform: scale(.4);
  transition: opacity .25s ease, transform .35s cubic-bezier(.5, 0, .9, .5);
}
.ld.is-closing .ld-mbar {
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .35s ease .1s, transform .45s cubic-bezier(.5, 0, .9, .5) .1s;
}
.ld.is-closing .ld-mtop {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .3s ease .3s, transform .4s ease .3s;
}

/* Once the albums have dropped out of the (same-coloured) empty vault, the lock screen assembles in
   place: the wordmark and icons fade in, and the keypad with its wave glides up from the bottom. */
.ld.is-locking .ld-lock-bg {
  transition: opacity .3s ease .45s;
}
.ld.is-locking .ld-lower {
  transition: transform 1.25s cubic-bezier(.16, 1, .3, 1);
}
.ld.is-locking .ld-upper,
.ld.is-locking .ld-nav-icon {
  transition: opacity .9s ease .4s;
}
.ld.is-locking .ld-wordmark {
  transform: none;
  transition: opacity .9s ease .4s;
}

/* ---- Overlays ---- */
.ld-touch {
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 2px 10px rgba(0, 0, 0, .18);
  opacity: 0;
  z-index: 8;
  /* the fingertip glides from key to key, hovering faintly between presses, rather than blinking in place */
  translate: var(--ld-tx, 187px) var(--ld-ty, 600px);
  scale: 1.25;
  transition: opacity .55s ease, scale .55s ease, translate .2s cubic-bezier(.4, 0, .2, 1);
}
.ld-touch.is-hover {
  opacity: .32;
}
.ld-touch.is-drag {
  transition: opacity .3s ease, scale .3s ease;
}
.ld-touch.is-down {
  opacity: .85;
  scale: 1;
  transition: opacity .2s ease-out, scale .24s ease-out;
}

.ld-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  opacity: 0;
  z-index: 9;
}
.ld-flash.is-firing {
  animation: ld-flash .5s ease-out;
}
@keyframes ld-flash {
  0% { opacity: 0; }
  12% { opacity: .92; }
  100% { opacity: 0; }
}

.ld-toast {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 90px; /* clear of the Face ID / menu icons, which end at 78px */
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 11px 14px 11px 12px;
  border-radius: 18px;
  background: var(--ld-toast);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(-120%);
  transition: transform .55s cubic-bezier(.2, 1.2, .3, 1), opacity .3s ease;
}
.ld-toast.is-shown {
  opacity: 1;
  transform: none;
}
.ld-toast-icon {
  flex: none;
  width: 36px;
  height: 36px;
  margin-right: 11px;
  border-radius: 9px;
  background: var(--ld-error);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ld-toast-title {
  font-size: 15px;
  line-height: 19px;
  font-weight: 600;
  letter-spacing: -.2px;
}
.ld-toast-body {
  font-size: 13px;
  line-height: 17px;
  color: rgba(255, 255, 255, .72);
  letter-spacing: -.1px;
}

/* Rejected PIN: the whole handset shakes. Applied by the host to the phone frame. */
@keyframes ld-shake {
  0%, 100% { translate: 0 0; }
  15% { translate: -9px 0; }
  30% { translate: 8px 0; }
  45% { translate: -6px 0; }
  60% { translate: 5px 0; }
  75% { translate: -3px 0; }
  90% { translate: 2px 0; }
}
.ld-host-shake {
  animation: ld-shake .5s cubic-bezier(.36, .07, .19, .97);
}


/* ---- Host glow, energy-driven (lockdemo.js with { energy: true } puts .fx-energy on the stage) ----
   --ks-energy 0..1   smoothed energy          --ks-bloom 0..1   energy above the resting level
   --ks-breath 0..~1  breathing waveform (quick inhale, slow exhale, pause)
   The glow is one radial gradient inside the stage (index.less); only its opacity and transform change
   per frame, so this stays on the compositor. Colour comes from the is-warm / is-red layers. */
.fx-energy > .ks-glow {
  opacity: calc(.26 + var(--ks-energy, 0) * .3);
  transform: scale(calc(1 + var(--ks-energy, 0) * .12 + var(--ks-breath, 0) * .025));
  transition: none;
}
/* fainter inside the mobile card */
@media (max-width: 859px) {
  .fx-energy > .ks-glow {
    opacity: calc(.1 + var(--ks-energy, 0) * .16);
  }
}
/* rim light (index.less draws it on ::after): its strength follows the bloom, no per-frame repaint */
.fx-energy > .ks-phone-frame::after {
  opacity: calc(.75 + var(--ks-bloom, 0) * .25);
  transition: box-shadow 1.6s ease;
}

/* ---- Calculator (the calc story, /products/): a working calculator over the lock screen. Android only,
   laid out from the "Calculator" Figma frames: the display up top, 4x5 keys with the operators down the
   right. Holding the K logo lifts it away and the lock screen is behind it. ---- */
.ld {
  --ld-calc-display: #f3f6fb;
  --ld-calc-op: #e1ecfd;
  --ld-calc-accent: #0b6cff;
}
.ld[data-theme="dark"] {
  --ld-calc-display: #2b3139;
  --ld-calc-op: #1a2a3f;
  --ld-calc-accent: #4da3ff;
}
.ld-calc {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  color: var(--ld-ink);
  font-family: Roboto, "Google Sans", "Helvetica Neue", Arial, sans-serif;
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.ld.is-calc .ld-calc {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: none;
}
/* Re-entrance (after the vault re-locks): the display settles down from above and the keypad glides up
   from the bottom, the same glide the lock screen's keypad makes. is-calc-entering is the start frame. */
.ld.is-calc-entering .ld-calc-display {
  opacity: 0;
  transform: translateY(-24px);
  transition: none;
}
.ld.is-calc-entering .ld-calc-pad {
  transform: translateY(470px);
  transition: none;
}
.ld.is-calc-entering .ld-calc-top {
  opacity: 0;
  transition: none;
}
/* the hold ends: the calculator lifts off the lock screen */
.ld.is-calc.is-calc-lifting .ld-calc {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity .45s cubic-bezier(.4, 0, .6, 1), transform .5s cubic-bezier(.3, 0, .2, 1);
}
.ld-calc-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 356px;
  background: var(--ld-calc-display);
  transition: opacity .7s ease .25s, transform .9s cubic-bezier(.16, 1, .3, 1) .25s;
}
.ld-calc-top {
  position: absolute;
  top: 56px;
  left: 22px;
  right: 22px;
  height: 32px;
  z-index: 1;
  color: var(--ld-ink-2);
  transition: opacity .6s ease .5s;
}
.ld-calc-top > svg {
  position: absolute;
  right: -2px;
  top: 4px;
}
.ld-calc-logo {
  position: absolute;
  left: 0;
  top: 4px;
  width: 24px;
  height: 24px;
  transition: color .3s ease, transform .3s ease;
}
.ld-calc-logo.is-held {
  color: var(--ld-calc-accent);
  transform: scale(.92);
}
/* the hold: a ring grows from the logo while the finger stays down */
.ld-calc-hold {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  border: 2px solid var(--ld-calc-accent);
  opacity: 0;
  transform: scale(.4);
}
.ld-calc-logo.is-held .ld-calc-hold {
  animation: ld-hold .9s cubic-bezier(.2, .6, .3, 1) forwards;
}
@keyframes ld-hold {
  0% { opacity: 0; transform: scale(.4); }
  30% { opacity: .8; }
  100% { opacity: 0; transform: scale(1.5); }
}
.ld-calc-expr {
  position: absolute;
  right: 22px;
  top: 198px;
  height: 60px;
  display: flex;
  align-items: center;
  font-size: 54px;
  line-height: 60px;
  font-weight: 500;
  letter-spacing: -1px;
  white-space: nowrap;
}
.ld-calc-expr b {
  font-weight: 500;
  color: var(--ld-calc-accent);
}
.ld-calc-caret {
  width: 3px;
  height: 50px;
  margin-left: 4px;
  border-radius: 2px;
  background: var(--ld-calc-accent);
  animation: ld-caret 1.1s steps(2, jump-none) infinite;
}
@keyframes ld-caret {
  from { opacity: 1; }
  to { opacity: 0; }
}
.ld-calc-result {
  position: absolute;
  right: 22px;
  top: 268px;
  font-size: 36px;
  line-height: 42px;
  font-weight: 500;
  letter-spacing: -.5px;
  color: var(--ld-ink-2);
  transition: opacity .2s ease;
}
.ld-calc-pad {
  position: absolute;
  top: 356px;
  left: 0;
  width: 100%;
  height: 456px;
  background: var(--ld-bg);
  transition: transform 1.2s cubic-bezier(.16, 1, .3, 1);
}
.ld-ckey {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  font-size: 34px;
  line-height: 72px;
  text-align: center;
  font-weight: 400;
  color: var(--ld-ink);
  transition: transform .35s ease, background-color .35s ease;
}
.ld-ckey-fn {
  color: var(--ld-calc-accent);
  font-size: 30px;
}
.ld-ckey-op {
  background: var(--ld-calc-op);
  color: var(--ld-calc-accent);
  font-weight: 500;
  font-size: 30px;
}
.ld-ckey-eq,
.ld[data-theme="dark"] .ld-ckey-eq {
  background: var(--ld-calc-accent);
  color: #fff;
}
.ld-ckey.is-pressed {
  transform: scale(.9);
  background-color: rgba(11, 108, 255, .14);
  transition: transform .12s ease-out, background-color .12s ease-out;
}
.ld-ckey-op.is-pressed {
  background-color: rgba(11, 108, 255, .3);
}
.ld-ckey-eq.is-pressed {
  background-color: #0a5be0;
}
