:root {
  --pwa-safe-bottom: env(safe-area-inset-bottom, 0px);
}
body {
  padding-bottom: var(--pwa-safe-bottom);
}
.pwa-install {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + var(--pwa-safe-bottom));
  z-index: 99980;
  max-width: 560px;
  margin: auto;
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 20px 50px #11182733;
  padding: 16px;
}
.pwa-install[hidden] {
  display: none;
}
.pwa-install__row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.pwa-install__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.pwa-install__body {
  flex: 1;
  min-width: 0;
}
.pwa-install__title {
  font-weight: 750;
}
.pwa-install__text {
  font-size: 13px;
  color: #4b5563;
  margin-top: 2px;
}
.pwa-install__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}
.pwa-btn {
  border: 1px solid #d1d5db;
  border-radius: 11px;
  padding: 10px 14px;
  background: #fff;
  color: #111827;
  font-weight: 650;
}
.pwa-btn--primary {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.pwa-update {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--pwa-safe-bottom));
  z-index: 99985;
  background: #111827;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 35px #0004;
}
.pwa-update[hidden] {
  display: none;
}
.pwa-pin-lock {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #f9fafb;
  display: grid;
  place-items: center;
  padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + var(--pwa-safe-bottom));
}
.pwa-pin-lock[hidden] {
  display: none;
}
.pwa-pin-card {
  width: min(100%, 380px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 65px #1118271f;
  text-align: center;
}
.pwa-pin-card img {
  width: 68px;
  height: 68px;
  border-radius: 16px;
}
.pwa-pin-card input {
  width: 100%;
  box-sizing: border-box;
  margin: 18px 0 10px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.3em;
}
.pwa-pin-error {
  min-height: 24px;
  color: #b91c1c;
  font-size: 13px;
}
.pwa-pin-tools {
  display: flex;
  gap: 8px;
}
.pwa-pin-tools button {
  flex: 1;
}
.pwa-settings-trigger {
  position: fixed;
  right: 14px;
  bottom: calc(14px + var(--pwa-safe-bottom));
  z-index: 9000;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  box-shadow: 0 8px 24px #11182733;
  font-size: 20px;
}
.pwa-settings-trigger[hidden] {
  display: none;
}
.pwa-push-trigger {
  position: fixed;
  right: 14px;
  bottom: calc(66px + var(--pwa-safe-bottom));
  z-index: 9000;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  box-shadow: 0 8px 24px #11182733;
  font-size: 19px;
}
.pwa-push-trigger:disabled {
  opacity: 0.55;
}
@media (min-width: 769px) {
  .pwa-install {
    left: auto;
    right: 20px;
  }
  .pwa-settings-trigger {
    display: none !important;
  }
  .pwa-push-trigger {
    display: none !important;
  }
}
@media (display-mode: standalone) {
  html,
  body {
    min-height: 100%;
    overscroll-behavior-y: none;
  }
  body {
    padding-top: env(safe-area-inset-top, 0px);
  }
}
