/* Instalar la app (PWA): tarjeta de invitación, guía para iPhone y botones. Funciona sobre páginas claras y oscuras. */
:root {
  --pwa-ink: #0b0f00;
  --pwa-volt: #d4ff3a;
  --pwa-card: rgba(14, 17, 25, .92);
  --pwa-line: rgba(255, 255, 255, .12);
  --pwa-text: #f3f5f9;
  --pwa-muted: #a3aabd;
  --pwa-font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-install][hidden], .pwa-standalone [data-install] { display: none !important; }
.pwa-btn-ico { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }

/* ----- Tarjeta de invitación ----- */
.pwa-promo {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 2400;
  max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px;
  border-radius: 22px; background: var(--pwa-card); border: 1px solid var(--pwa-line); color: var(--pwa-text);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .08);
  font: 14px/1.35 var(--pwa-font); transform: translateY(140%); opacity: 0;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}
.pwa-promo.in { transform: none; opacity: 1; }
.pwa-promo.raised { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
.pwa-promo-icon { width: 54px; height: 54px; border-radius: 14px; flex: none; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .6); }
.pwa-promo-txt { flex: 1; min-width: 0; }
.pwa-promo-txt b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-promo-txt span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--pwa-muted); }
.pwa-promo-go {
  flex: none; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--pwa-volt); color: var(--pwa-ink); font: 700 14px var(--pwa-font);
  box-shadow: 0 8px 22px -8px rgba(212, 255, 58, .7);
}
.pwa-promo-go:active { transform: scale(.97); }
.pwa-promo-x {
  position: absolute; top: -9px; right: -6px; width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--pwa-line); background: #1a1f2c; color: var(--pwa-muted); font: 600 16px/1 var(--pwa-font);
}

/* ----- Guía para iPhone / iPad (hoja inferior) ----- */
.pwa-sheet-bg {
  position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(5, 7, 12, 0); transition: background .28s;
}
.pwa-sheet-bg.in { background: rgba(5, 7, 12, .55); }
.pwa-sheet {
  position: relative; width: 100%; max-width: 520px; padding: 10px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  border-radius: 26px 26px 0 0; background: #0f121a; color: var(--pwa-text); border: 1px solid var(--pwa-line); border-bottom: 0;
  font: 15px/1.45 var(--pwa-font); box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
  transform: translateY(100%); transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.pwa-sheet-bg.in .pwa-sheet { transform: none; }
.pwa-sheet-handle { width: 42px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .22); margin: 0 auto 14px; }
.pwa-sheet-x {
  position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: var(--pwa-muted); font: 600 20px/1 var(--pwa-font);
}
.pwa-sheet-app { display: flex; align-items: center; gap: 14px; margin: 4px 30px 16px 0; }
.pwa-sheet-app img { width: 72px; height: 72px; border-radius: 18px; flex: none; box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .7); }
.pwa-sheet-app h3 { margin: 0 0 3px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.pwa-sheet-app span { font-size: 13px; color: var(--pwa-muted); }
.pwa-sheet-note { margin: 0 0 12px; font-size: 14px; color: #ffd9a8; }
.pwa-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 10px; }
.pwa-steps li {
  counter-increment: s; position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 44px;
  border-radius: 16px; background: rgba(255, 255, 255, .045); border: 1px solid var(--pwa-line);
}
.pwa-steps li::before {
  content: counter(s); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pwa-volt); color: var(--pwa-ink); font: 800 12px/1 var(--pwa-font);
}
.pwa-steps small { display: block; color: var(--pwa-muted); font-size: 12.5px; margin-top: 2px; }
.pwa-step-ico {
  width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: rgba(10, 132, 255, .14); color: #3ea0ff;
}
.pwa-step-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pwa-step-ico svg circle[r="1.6"] { fill: currentColor; stroke: none; }
.pwa-sheet-ok, .pwa-sheet-copy {
  width: 100%; height: 50px; margin-top: 16px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--pwa-volt); color: var(--pwa-ink); font: 700 16px var(--pwa-font);
}
@media (prefers-reduced-motion: reduce) {
  .pwa-promo, .pwa-sheet, .pwa-sheet-bg { transition: none; }
}
