.push-pwa-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 92%;
  padding: 0.75rem 1rem;
  background: #1f2430;
  color: #fff;
  border-radius: 0.6rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
}

.push-pwa-banner__text { flex: 1; }

.push-pwa-banner__action {
  border: 0;
  border-radius: 0.4rem;
  padding: 0.45rem 0.8rem;
  background: #0b5fff;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.push-pwa-banner__close {
  border: 0;
  background: transparent;
  color: #aab;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

/* --- In-app foreground notification toast (iOS-style) --- */
#push-pwa-toast-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem;
  pointer-events: none;
}

.push-pwa-toast {
  pointer-events: auto;
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 1.25rem;
  background: rgba(245, 245, 247, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  color: #1a1a1c;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-120%);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.push-pwa-toast--in { opacity: 1; transform: translateY(0); }
.push-pwa-toast--out { opacity: 0; transform: translateY(-120%); }

.push-pwa-toast__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex: 0 0 auto;
  object-fit: cover;
  background: #fff;
}

.push-pwa-toast__body { flex: 1; min-width: 0; }

.push-pwa-toast__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 0.1rem;
}

.push-pwa-toast__title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
}

.push-pwa-toast__text {
  font-size: 0.9rem;
  line-height: 1.3;
  margin-top: 0.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .push-pwa-toast {
    background: rgba(44, 44, 46, 0.72);
    color: #f5f5f7;
  }
  .push-pwa-toast__head { color: rgba(255, 255, 255, 0.55); }
}

/* --- iOS "Add to Home Screen" install sheet --- */
.push-pwa-ios-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
}
.push-pwa-ios-overlay--in { background: rgba(0, 0, 0, 0.45); }
.push-pwa-ios-overlay--out { background: rgba(0, 0, 0, 0); }

.push-pwa-ios-sheet {
  width: 100%;
  max-width: 520px;
  background: #fff;
  color: #1a1a1c;
  border-radius: 22px 22px 0 0;
  padding: 0.5rem 1.4rem 2rem;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.push-pwa-ios-overlay--in .push-pwa-ios-sheet { transform: translateY(0); }
.push-pwa-ios-overlay--out .push-pwa-ios-sheet { transform: translateY(100%); }

.push-pwa-ios-handle {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: #d0d0d5;
  margin: 0.4rem auto 1.1rem;
  cursor: pointer;
}

.push-pwa-ios-app {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.4rem;
}
.push-pwa-ios-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  flex: 0 0 auto;
  background: #f2f2f5;
}
.push-pwa-ios-name { font-size: 1.15rem; font-weight: 700; }
.push-pwa-ios-desc { font-size: 0.95rem; line-height: 1.35; color: #555; margin-top: 0.15rem; }

.push-pwa-ios-head {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.push-pwa-ios-steps {
  margin: 0;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.push-pwa-ios-steps li {
  font-size: 1rem;
  line-height: 1.4;
  color: #333;
}
.push-pwa-ios-share {
  vertical-align: -4px;
  color: #0b7bd6;
  margin: 0 1px;
}

@media (prefers-color-scheme: dark) {
  .push-pwa-ios-sheet { background: #1c1c1e; color: #f5f5f7; }
  .push-pwa-ios-desc { color: #a0a0a8; }
  .push-pwa-ios-steps li { color: #d8d8dc; }
  .push-pwa-ios-handle { background: #48484a; }
  .push-pwa-ios-icon { background: #2c2c2e; }
}

/* --- "View in app" top bar --- */
.push-pwa-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1150;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.85rem;
  padding-top: max(0.6rem, env(safe-area-inset-top));
  background: #1c1c1e;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  transform: translateY(-110%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.push-pwa-bar--in { transform: translateY(0); }

.push-pwa-bar__icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  flex: 0 0 auto;
  background: #fff;
  cursor: pointer;
}
.push-pwa-bar__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  line-height: 1.25;
}
.push-pwa-bar__title { font-weight: 700; font-size: 0.95rem; }
.push-pwa-bar__sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.push-pwa-bar__open {
  flex: 0 0 auto;
  border: 0;
  border-radius: 100px;
  padding: 0.4rem 0.9rem;
  background: #0b7bd6;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.push-pwa-bar__close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0 0.2rem;
  cursor: pointer;
}
