.pwa-install-root {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
}

.pwa-install-root[hidden],
.pwa-install-gate[hidden] {
  display: none !important;
}

.pwa-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 24, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.pwa-install-gate {
  position: relative;
  z-index: 1;
  width: min(100%, 22.5rem);
  padding: 1.35rem 1.2rem 1.25rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(227, 165, 9, 0.35);
  background:
    linear-gradient(165deg, rgba(227, 165, 9, 0.14), transparent 42%),
    rgba(13, 0, 71, 0.98);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55);
  color: #ffffff;
  text-align: center;
}

.pwa-install-gate__icon {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 0.85rem;
  border-radius: 0.95rem;
  box-shadow: 0 10px 28px rgba(227, 165, 9, 0.28);
}

.pwa-install-gate__title {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.pwa-install-gate__text {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.pwa-install-gate__actions {
  display: grid;
  gap: 0.55rem;
}

.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #EA0800 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  transition: transform 0.15s ease, opacity 0.15s ease, filter 0.15s ease, background 0.2s ease;
}

.pwa-install-btn:active {
  transform: scale(0.98);
}

.pwa-install-btn.is-installing {
  opacity: 0.85;
  cursor: wait;
}

.pwa-install-btn.is-open {
  background: #16a34a !important;
  border-color: rgba(255, 255, 255, 0.28);
}

.pwa-install-btn--ghost {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.92) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
}

.pwa-install-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.pwa-install-ios-hint {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(227, 165, 9, 0.12);
  border: 1px solid rgba(227, 165, 9, 0.28);
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92) !important;
  text-align: left;
}

.pwa-install-ios-hint[hidden] {
  display: none !important;
}

body.has-pwa-gate {
  overflow: hidden;
}

body:has(.modal-backdrop.active) .pwa-install-root:not([hidden]) {
  visibility: visible;
  pointer-events: auto;
}
