.pwa-install-trigger {
  display: none;
  width: 100%;
  min-height: 48px;
  margin: 14px 0 18px;
  padding: 11px 16px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text, #f6f8fb);
  font: inherit;
  font-weight: 800;
  border: 1px solid rgba(255, 107, 0, .36);
  border-radius: 14px;
  background: rgba(255, 107, 0, .09);
  cursor: pointer;
}
.pwa-install-trigger.show { display: flex; }
.pwa-install-trigger img { width: 28px; height: 28px; border-radius: 8px; }
.pwa-install-trigger svg { width: 19px; height: 19px; color: #ff6b00; }

.pwa-install-backdrop {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(2, 5, 9, .76);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
}
.pwa-install-backdrop.show { opacity: 1; visibility: visible; }
.pwa-install-sheet {
  position: relative;
  width: min(100%, 430px);
  max-height: min(760px, calc(100dvh - 32px));
  overflow: auto;
  padding: 26px 20px 20px;
  color: #f6f8fb;
  direction: rtl;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 2%, rgba(255, 107, 0, .18), transparent 34%),
    #101721;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .5);
  transform: translateY(24px) scale(.98);
  transition: transform .24s ease;
}
.pwa-install-backdrop.show .pwa-install-sheet { transform: translateY(0) scale(1); }
.pwa-install-close {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #c8d0db;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
}
.pwa-install-close svg { width: 19px; height: 19px; }
.pwa-install-brand { display: flex; align-items: center; gap: 12px; padding-left: 46px; }
.pwa-install-brand img { width: 62px; height: 62px; border-radius: 18px; box-shadow: 0 12px 28px rgba(0, 0, 0, .28); }
.pwa-install-brand small { display: block; margin-bottom: 3px; color: #9ca8b8; font-size: 12px; font-weight: 700; }
.pwa-install-brand strong { display: block; font-size: 18px; }
.pwa-install-sheet h2 { margin: 24px 0 8px; font-size: clamp(22px, 6vw, 29px); line-height: 1.35; }
.pwa-install-intro { margin: 0; color: #aab4c2; font-size: 14px; line-height: 1.9; }
.pwa-install-steps { display: grid; gap: 10px; margin: 22px 0; padding: 0; list-style: none; counter-reset: install-step; }
.pwa-install-steps li {
  counter-increment: install-step;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
}
.pwa-install-step-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #ff6b00;
  border-radius: 14px;
  background: rgba(255, 107, 0, .12);
}
.pwa-install-step-icon img { width: 34px; height: 34px; border-radius: 10px; }
.pwa-install-step-icon svg { width: 23px; height: 23px; }
.pwa-install-step-copy b { display: block; margin-bottom: 3px; font-size: 14px; }
.pwa-install-step-copy span { color: #95a1b1; font-size: 12px; line-height: 1.65; }
.pwa-install-step-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #0c1117;
  font-size: 12px;
  font-weight: 900;
  border-radius: 50%;
  background: #d6ff69;
}
.pwa-install-primary {
  width: 100%;
  min-height: 52px;
  color: #fff;
  font: inherit;
  font-weight: 900;
  border: 0;
  border-radius: 15px;
  background: #ff6b00;
  box-shadow: 0 12px 28px rgba(255, 107, 0, .23);
  cursor: pointer;
}
.pwa-install-note { margin: 12px 0 0; color: #7f8b9b; font-size: 11px; line-height: 1.7; text-align: center; }
body.pwa-modal-open { overflow: hidden; }

body.light-mode .pwa-install-trigger { color: #101721; background: rgba(255, 107, 0, .08); }

@media (max-width: 480px) {
  .pwa-install-backdrop { place-items: end center; padding: 0; }
  .pwa-install-sheet {
    width: 100%;
    max-height: calc(100dvh - max(10px, env(safe-area-inset-top)));
    padding: 25px 17px max(18px, env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-backdrop, .pwa-install-sheet { transition: none; }
}
