/* ── Chica Charmer · PWA install notification (pwa-install.js) ───
   Additive stylesheet, namespaced .pwa-install*. Slides down from the top like a system banner:
   the bottom is where the primary buttons live (map CTA, Check, microphone), so it stays clear of them.
   z-index sits above the screens, the map and the level-up overlay, so it is visible exactly 2 s after
   the unlock even while the level-up celebration is open; it only covers a strip at the very top. */
.pwa-install {
  position: fixed;
  z-index: 1150;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  width: min(calc(100% - 24px), 440px);
  transform: translate(-50%, calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
  transition: transform .42s cubic-bezier(.2, .9, .3, 1.15), opacity .28s ease;
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--text, #edf2f4);
  -webkit-tap-highlight-color: transparent;
}
.pwa-install.is-in  { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.pwa-install.is-out { transform: translate(-50%, calc(-100% - 24px)); opacity: 0; pointer-events: none; transition-duration: .3s, .25s; transition-timing-function: ease-in; }

.pwa-install__card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  column-gap: 12px;
  padding: 11px 10px 11px 12px;
  background: var(--surface, #1a1a2e);
  border: 2px solid var(--accent, #ef233c);
  border-radius: 18px;
  box-shadow: 0 4px 0 #a2301f, 0 14px 34px rgba(0, 0, 0, .5);
}
.pwa-install__icon { width: 44px; height: 44px; border-radius: 11px; display: block; background: var(--bg, #0f0f1a); }
.pwa-install__text { min-width: 0; }
.pwa-install__title {
  margin: 0;
  font-family: var(--font-display, inherit);
  font-size: .98rem; font-weight: 800; line-height: 1.2; letter-spacing: .01em;
}
.pwa-install__sub { margin: 2px 0 0; font-size: .8rem; line-height: 1.3; color: var(--text-muted, #a9b4c0); text-wrap: pretty; }

.pwa-install__btn {
  appearance: none; border: 0; cursor: pointer;
  padding: .55rem .95rem; border-radius: 12px;
  font: 800 .88rem/1 var(--font-body, system-ui, sans-serif);
  color: #fff; background: var(--accent, #ef233c);
  box-shadow: 0 3px 0 #a2301f;
  transition: transform .1s ease, box-shadow .1s ease, opacity .2s;
}
.pwa-install__btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #a2301f; }
.pwa-install__btn:disabled { opacity: .6; cursor: default; }

.pwa-install__close {
  appearance: none; border: 0; cursor: pointer;
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-muted, #a9b4c0); background: transparent;
}
.pwa-install__close svg { width: 16px; height: 16px; }
.pwa-install__close:hover { background: rgba(255, 255, 255, .08); color: var(--text, #edf2f4); }

/* manual instructions (iOS / Android fallback) span the full card width under the header row */
.pwa-install__steps {
  grid-column: 1 / -1;
  list-style: none; counter-reset: pwa;
  margin: 10px 0 0; padding: 10px 2px 0;
  border-top: 1px solid var(--surface2, #2a2a42);
  display: grid; gap: 7px;
}
.pwa-install__steps li { counter-increment: pwa; display: flex; align-items: center; gap: 10px; font-size: .86rem; line-height: 1.35; }
.pwa-install__steps li::before {
  content: counter(pwa);
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .74rem; font-weight: 800; color: #fff; background: var(--accent, #ef233c);
}
.pwa-install__steps b { font-weight: 800; }
.pwa-ico { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.22em; margin: 0 .1em; color: var(--accent2, #ffb703); }

@media (prefers-reduced-motion: reduce) {
  .pwa-install, .pwa-install.is-out { transition: opacity .15s linear; transform: translate(-50%, 0); }
}
@media (display-mode: standalone) { .pwa-install { display: none; } }   /* belt and braces: never inside the installed app */
