/* BIOS Personal R26: vertically balanced device-PIN unlock on mobile/PWA. */
@media (max-width: 560px) {
  .device-pin-lock {
    box-sizing: border-box;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding:
      max(16px, env(safe-area-inset-top))
      12px
      max(16px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .device-pin-card {
    width: min(430px, 100%);
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 30px 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Keep every control reachable when the visual viewport is shortened by the
   software keyboard or the device is in landscape orientation. */
@media (max-width: 560px) and (max-height: 620px) {
  .device-pin-lock {
    align-items: start;
  }

  .device-pin-card {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .device-pin-card > img {
    width: 38px;
    height: 38px;
  }

  .device-pin-card h1 {
    margin-top: 12px;
    font-size: 26px;
  }
}
