/* Installable app: the one-time offer and the Add to Home Screen steps (app-install.js). It floats above the
   phone tab bar and reply dock, never wider than the screen less a 16px gutter, and every line wraps inside it. */
.app-offer { position: fixed; z-index: 97; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom)); margin: 0 auto; box-sizing: border-box;
  width: min(420px, calc(100% - 32px)); max-height: calc(100vh - 120px); overflow-y: auto; display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 14px 16px 16px; border-radius: var(--r-lg); background: var(--surface-solid); color: var(--text); box-shadow: var(--rim), var(--e-3);
  animation: app-offer-in var(--t-slow) var(--ease-spring) both; transition: opacity 220ms var(--ease-glide), transform 220ms var(--ease-glide); }
.app-offer.out { opacity: 0; transform: translateY(12px) scale(.98); }
@keyframes app-offer-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.ai-ico { flex: none; width: 52px; height: 52px; border-radius: 14px; object-fit: cover; box-shadow: 0 0 0 1px var(--border); }
.ai-body { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-sm); line-height: 1.45; }
.ai-t { display: block; font: 650 var(--fs-md, 16px)/1.3 var(--font-display); padding-top: 2px; }
.ai-d { margin: 4px 0 0; color: var(--text-muted); }
.ai-steps { margin: 8px 0 0; padding-left: 1.3em; color: var(--text-muted); display: grid; gap: 6px; }
.ai-steps b { color: var(--text); }
.ai-nw { white-space: nowrap; }
.ai-i { width: 1.15em; height: 1.15em; vertical-align: -.2em; color: var(--accent); }
.ai-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ai-acts .btn { max-width: 100%; }
.ai-x { flex: none; margin: -6px -4px 0 0; border: 0; background: none; color: var(--text-faint); font-size: 20px; line-height: 1; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.ai-x:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 760px) {
  .app-offer { bottom: calc(86px + env(safe-area-inset-bottom)); }   /* above the tab bar, and above the reply dock on threads */
}
@media (max-width: 340px) {
  .app-offer { gap: 10px; padding: 14px 10px 14px 12px; }
  .ai-ico { width: 40px; height: 40px; border-radius: 11px; }
}
@media (prefers-reduced-motion: reduce) { .app-offer { animation: none; transition: none; } }
