.pwa-install-notice,
.pwa-install-instructions {
  display: none;
}

@media (max-width: 599px), (hover: none) and (pointer: coarse) {
  .pwa-install-notice {
    position: fixed;
    z-index: 2400;
    right: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 14px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 66px;
    padding: 10px 9px 10px 10px;
    border: 1px solid rgba(255, 255, 255, .84);
    border-radius: 23px;
    background: rgba(249, 249, 247, .88);
    box-shadow: 0 16px 42px rgba(15, 23, 42, .16), inset 0 0 0 1px rgba(15, 23, 42, .05);
    color: #12161c;
    backdrop-filter: blur(24px) saturate(165%);
    -webkit-backdrop-filter: blur(24px) saturate(165%);
    animation: pwaNoticeIn .42s cubic-bezier(.22, 1, .36, 1) both;
  }

  .pwa-install-notice--portal {
    bottom: 96px;
  }

  .pwa-install-notice--login {
    right: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: auto;
    width: min(calc(100% - 28px), 430px);
    animation-name: pwaLoginNoticeIn;
  }

  .pwa-install-floating {
    position: fixed;
    z-index: 2380;
    top: calc(env(safe-area-inset-top) + 10px);
    right: max(13px, env(safe-area-inset-right));
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 15px;
    color: #111827;
    background: rgba(249, 249, 247, .76);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12), inset 0 0 0 1px rgba(15, 23, 42, .05);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .pwa-install-floating > span {
    position: relative;
    width: 19px;
    height: 21px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    font-weight: 720;
    line-height: 1;
  }

  .pwa-install-floating > span::after {
    position: absolute;
    right: 1px;
    bottom: -1px;
    left: 1px;
    height: 6px;
    border: solid currentColor;
    border-width: 0 1.8px 1.8px;
    border-radius: 0 0 4px 4px;
    content: "";
  }

  .pwa-install-floating:active {
    transform: scale(.93);
  }

  .pwa-install-notice > img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
  }

  .pwa-install-copy {
    min-width: 0;
  }

  .pwa-install-copy strong,
  .pwa-install-copy small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .pwa-install-copy strong {
    font-size: .82rem;
    line-height: 1.25;
  }

  .pwa-install-copy small {
    margin-top: 2px;
    color: #667085;
    font-size: .68rem;
  }

  .pwa-install-action,
  .pwa-install-dialog-ok {
    border: 1px solid rgba(177, 126, 8, .2);
    border-radius: 999px;
    background: linear-gradient(145deg, #ffd95a, #f5b91c);
    color: #211a08;
    font: inherit;
    font-size: .72rem;
    font-weight: 850;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .pwa-install-action {
    height: 36px;
    padding: 0 13px;
  }

  .pwa-install-dismiss,
  .pwa-install-dialog-close {
    border: 0;
    background: transparent;
    color: #667085;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .pwa-install-dismiss {
    width: 28px;
    height: 36px;
    padding: 0;
    font-size: 1.22rem;
  }

  .pwa-install-instructions {
    position: fixed;
    z-index: 2600;
    inset: 0;
    display: grid;
    place-items: end center;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    background: rgba(15, 23, 42, .32);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
  }

  .pwa-install-dialog {
    position: relative;
    width: min(100%, 430px);
    padding: 23px 20px 19px;
    border: 1px solid rgba(255, 255, 255, .84);
    border-radius: 28px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 22px 65px rgba(15, 23, 42, .22);
    color: #111827;
    text-align: center;
    animation: pwaDialogIn .38s cubic-bezier(.22, 1, .36, 1) both;
  }

  .pwa-install-dialog > img {
    width: 58px;
    height: 58px;
    margin-bottom: 10px;
    border-radius: 17px;
  }

  .pwa-install-dialog-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 1.45rem;
  }

  .pwa-install-kicker {
    display: block;
    color: #9a6b00;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .14em;
  }

  .pwa-install-dialog h2 {
    margin: 5px 0 8px;
    font-size: 1.28rem;
    line-height: 1.15;
  }

  .pwa-install-dialog p {
    margin: 0;
    color: #667085;
    font-size: .83rem;
    line-height: 1.5;
  }

  .pwa-install-dialog-ok {
    width: 100%;
    height: 44px;
    margin-top: 17px;
  }

  body.dark-theme .pwa-install-notice {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(24, 25, 29, .82);
    color: #f8fafc;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .34), inset 0 0 0 1px rgba(255, 255, 255, .06);
  }

  body.dark-theme .pwa-install-copy small {
    color: #aeb5c0;
  }

  body.dark-theme .pwa-install-floating {
    border-color: rgba(255, 255, 255, .16);
    color: #f8fafc;
    background: rgba(24, 25, 29, .76);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(255, 255, 255, .06);
  }

  html.portal-mobile-device body.dark-theme .pwa-install-notice,
  html.login-mobile-device body.dark-theme .pwa-install-notice,
  html.portal-mobile-device body.dark-theme .pwa-install-dialog,
  html.login-mobile-device body.dark-theme .pwa-install-dialog {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, .1);
    background: rgba(16, 16, 17, .96);
    background-image: none;
    box-shadow: none;
  }

  html.portal-mobile-device body.dark-theme .pwa-install-instructions,
  html.login-mobile-device body.dark-theme .pwa-install-instructions {
    background: rgba(0, 0, 0, .74);
  }

  html.portal-mobile-device body.dark-theme .pwa-install-floating,
  html.login-mobile-device body.dark-theme .pwa-install-floating {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, .1);
    background: rgba(16, 16, 17, .88);
    background-image: none;
    box-shadow: none;
  }

  html.portal-mobile-device body.dark-theme .pwa-install-action,
  html.portal-mobile-device body.dark-theme .pwa-install-dialog-ok,
  html.login-mobile-device body.dark-theme .pwa-install-action,
  html.login-mobile-device body.dark-theme .pwa-install-dialog-ok {
    color: #f5f5f7;
    border-color: rgba(255, 255, 255, .13);
    background: #1c1c1e;
    background-image: none;
    box-shadow: none;
  }

  html.portal-mobile-device body.dark-theme .pwa-install-dialog p,
  html.login-mobile-device body.dark-theme .pwa-install-dialog p {
    color: #98989f;
  }

  html.pwa-standalone,
  html.pwa-standalone body,
  html.pwa-standalone #app {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    margin: 0;
    overscroll-behavior: none;
  }

  html.pwa-standalone .pwa-install-notice,
  html.pwa-standalone .pwa-install-floating,
  html.pwa-standalone .pwa-install-instructions {
    display: none !important;
  }
}

@keyframes pwaNoticeIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pwaLoginNoticeIn {
  from { opacity: 0; transform: translate(50%, 14px) scale(.98); }
  to { opacity: 1; transform: translate(50%, 0) scale(1); }
}

@keyframes pwaDialogIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-notice,
  .pwa-install-dialog {
    animation: none !important;
  }
}
