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

[data-pwa-action].is-installing {
  opacity: .62;
  cursor: wait !important;
  pointer-events: none;
}

.pwa-install-card {
  position: fixed;
  z-index: 250;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(103, 221, 232, .35);
  border-radius: 18px;
  color: #edf9fb;
  background: rgba(7, 24, 45, .97);
  box-shadow: 0 22px 60px rgba(2, 15, 29, .32);
  font-family: Inter, Arial, sans-serif;
  backdrop-filter: blur(14px);
}

.pwa-install-card > img {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}

.pwa-install-copy { min-width: 0; display: grid; gap: 3px; }
.pwa-install-copy strong { font-size: 13px; line-height: 1.3; }
.pwa-install-copy span { color: #b7cbd8; font-size: 11px; line-height: 1.45; }
.pwa-install-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.pwa-install-actions button,
.pwa-help-done {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.pwa-install-primary,
.pwa-help-done { border: 0; color: #052233; background: #58d7e4; }
.pwa-install-later { border: 1px solid rgba(255, 255, 255, .14); color: #d8e6ee; background: transparent; }
.pwa-install-actions button:focus-visible,
.pwa-help button:focus-visible { outline: 3px solid rgba(88, 215, 228, .4); outline-offset: 2px; }

.pwa-help {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  font-family: Inter, Arial, sans-serif;
}

.pwa-help-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 15, 29, .76);
  backdrop-filter: blur(5px);
}

.pwa-help-dialog {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  border-radius: 24px;
  color: #102c3f;
  background: #fff;
  box-shadow: 0 28px 80px rgba(1, 12, 24, .34);
  text-align: center;
}

.pwa-help-dialog > img { border-radius: 18px; }
.pwa-help-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: #5c7180;
  background: #edf4f7;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.pwa-help-eyebrow { color: #168b9b; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.pwa-help h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.pwa-help ol { width: 100%; margin: 8px 0; padding: 0; display: grid; gap: 9px; list-style: none; text-align: left; }
.pwa-help li { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 10px; padding: 11px; border-radius: 12px; background: #f1f7f9; }
.pwa-help li b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #0e8190; }
.pwa-help li span { font-size: 12px; line-height: 1.45; }
.pwa-help p { margin: 0; color: #607686; font-size: 11px; line-height: 1.55; }
.pwa-help-done { width: 100%; margin-top: 6px; }

@media (max-width: 560px) {
  .pwa-install-card {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    border-radius: 16px;
  }
  .pwa-help-dialog { padding: 25px 18px 20px; border-radius: 20px; }
}

@media (display-mode: standalone) {
  .pwa-install-card { display: none !important; }
}
