:root {
  --ax-pwa-safe-top: env(safe-area-inset-top, 0px);
  --ax-pwa-safe-right: env(safe-area-inset-right, 0px);
  --ax-pwa-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ax-pwa-safe-left: env(safe-area-inset-left, 0px);
}

html,
body {
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
}

html.ax-pwa-standalone,
html.ax-pwa-standalone body {
  min-height: 100%;
  min-height: 100dvh;
}

button,
a,
input,
select,
textarea,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.ax-pwa-install-trigger {
  position: fixed;
  right: calc(14px + var(--ax-pwa-safe-right));
  bottom: calc(18px + var(--ax-pwa-safe-bottom));
  z-index: 10050;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(132, 255, 188, 0.34);
  border-radius: 999px;
  padding: 7px 14px 7px 7px;
  color: #f4fff8;
  background: rgba(16, 21, 19, 0.94);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  font: 700 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}

.ax-pwa-install-trigger[hidden],
.ax-pwa-install-help[hidden] {
  display: none !important;
}

.ax-pwa-install-trigger img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
}

.ax-pwa-install-trigger:focus-visible {
  outline: 3px solid rgba(80, 255, 151, 0.48);
  outline-offset: 3px;
}

.ax-pwa-notification-trigger {
  bottom: calc(74px + var(--ax-pwa-safe-bottom));
  border-color: rgba(93, 181, 255, 0.48);
  background: rgba(12, 28, 44, 0.96);
}

.ax-pwa-notification-trigger.is-error {
  border-color: rgba(255, 112, 112, 0.65);
}

.ax-pwa-install-help {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: grid;
  place-items: end center;
  padding: 20px max(16px, var(--ax-pwa-safe-right)) max(20px, calc(16px + var(--ax-pwa-safe-bottom))) max(16px, var(--ax-pwa-safe-left));
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ax-pwa-install-help__card {
  width: min(100%, 440px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 20px;
  color: #edf7f1;
  background: #111714;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ax-pwa-install-help__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ax-pwa-install-help__head img {
  width: 48px;
  height: 48px;
  border-radius: 13px;
}

.ax-pwa-install-help__head strong,
.ax-pwa-install-help__head span {
  display: block;
}

.ax-pwa-install-help__head strong {
  font-size: 17px;
}

.ax-pwa-install-help__head span,
.ax-pwa-install-help p {
  color: #b8c9bf;
  font-size: 13px;
  line-height: 1.5;
}

.ax-pwa-install-help__steps {
  margin: 18px 0;
  padding-left: 22px;
  color: #e8f5ed;
  font-size: 14px;
  line-height: 1.65;
}

.ax-pwa-install-help__close {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  color: #07130c;
  background: #53ed8c;
  font: 800 14px system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}

@media (display-mode: standalone) {
  .ax-pwa-install-trigger:not(.ax-pwa-notification-trigger),
  .ax-pwa-install-help {
    display: none !important;
  }
}

@media (min-width: 761px) {
  .ax-pwa-install-help {
    place-items: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ax-pwa-install-trigger {
    animation: ax-pwa-enter 280ms ease-out both;
  }

  @keyframes ax-pwa-enter {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: none; }
  }
}
