/* "Thêm vào màn hình chính" (install.js): the "Cài app" pill under Túi + Menu (phones), the entry in the Menu, and the
   how-to sheet. The pill's top follows #top (1rem) + the tile height (mobile-hud.css 2.9 / 3.5rem) + a gap. */
#menuInstall { flex: none; display: flex; align-items: center; justify-content: center; gap: .5rem; }
#menuInstall svg { width: 1.25rem; height: 1.25rem; flex: none; }
#hud > #hudInstall { position: absolute; right: 1rem; top: 4.35rem; display: flex; align-items: center; gap: .35rem; padding: .3rem .75rem .3rem .5rem;
  border-radius: 2rem; font: inherit; font-size: .72rem; font-weight: 700; line-height: 1.2; white-space: nowrap; color: var(--white); border-color: var(--edge); cursor: pointer; }
#hud > #hudInstall svg { width: 1.15rem; height: 1.15rem; flex: none; }
@media (pointer: coarse) { #hud > #hudInstall { top: 4.95rem; padding-block: .4rem; } }
#hud > #hudInstall.wait { opacity: .6; }
/* arrived from Zalo/Facebook (?cai=1): the pill pulses gold and a tip hangs under it */
#hud > #hudInstall.invite { animation: instPulse 1.5s ease-in-out infinite; }
@keyframes instPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 196, 46, .75), 0 .25rem .9rem rgba(6, 20, 45, .35); } 60% { box-shadow: 0 0 0 .55rem rgba(255, 196, 46, 0), 0 .25rem .9rem rgba(6, 20, 45, .35); } }
#hud > #installInvite { position: absolute; right: 1rem; top: 6.9rem; max-width: 12.5rem; padding: .45rem .7rem; border: 0; border-radius: .8rem; font: inherit; font-size: .74rem;
  font-weight: 700; line-height: 1.3; text-align: left; color: var(--ink); background: var(--gold); box-shadow: 0 .25rem .9rem rgba(6, 20, 45, .4); cursor: pointer; animation: instBob 1.5s ease-in-out infinite; }
#hud > #installInvite::before { content: ""; position: absolute; top: -.38rem; right: 1.7rem; border: .4rem solid transparent; border-top: 0; border-bottom-color: var(--gold); }
@keyframes instBob { 50% { transform: translateY(.25rem); } }
@media (pointer: coarse) { #hud > #installInvite { top: 7.7rem; } }
/* in Zalo/Facebook: one tap out to the real browser, the steps by hand folded under it */
.instOut { display: flex; align-items: center; justify-content: center; gap: .45rem; }
.instOut svg { width: 1.2rem; height: 1.2rem; flex: none; }
#installOk.ghostBtn { flex: none; }
.instHand summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: #41526b; text-decoration: underline; text-underline-offset: .2em; }
.instHand[open] summary { margin-bottom: .55rem; }
/* iPhone: a bouncing arrow at Safari's own Share (or •••) button, over the dimmed screen (install.js arrowSpot) */
#installArrow { position: fixed; z-index: 7; display: flex; align-items: center; gap: .45rem; padding: .35rem .45rem .35rem .4rem; border-radius: 2rem;
  font-size: .85rem; font-weight: 800; white-space: nowrap; color: var(--ink); background: var(--gold); box-shadow: 0 .3rem 1.1rem rgba(0, 0, 0, .45); pointer-events: none; }
#installArrow .ico { width: 1.75rem; height: 1.75rem; flex: none; display: grid; place-items: center; border-radius: 50%; background: #fff; }
#installArrow .ico svg { width: 1.15rem; height: 1.15rem; }
#installArrow .tip { width: 1.5rem; height: 1.5rem; flex: none; display: grid; place-items: center; }
#installArrow .tip svg { width: 100%; height: 100%; }
#installArrow.down-mid { left: 50%; translate: -50% 0; bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)); animation: instDown .9s ease-in-out infinite; }
#installArrow.down-right { right: .7rem; bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)); animation: instDown .9s ease-in-out infinite; }
#installArrow.up-right { right: .7rem; top: calc(.5rem + env(safe-area-inset-top, 0px)); animation: instUp .9s ease-in-out infinite; }
#installArrow.up-right .tip { rotate: 180deg; }
@keyframes instDown { 50% { transform: translateY(.5rem); } }
@keyframes instUp { 50% { transform: translateY(-.5rem); } }
.instSteps { margin: 0; padding: 0; list-style: none; counter-reset: inst; display: flex; flex-direction: column; gap: .55rem; }
.instSteps li { counter-increment: inst; display: flex; align-items: flex-start; gap: .65rem; padding: .6rem .7rem; border-radius: .8rem; background: var(--paper-soft); }
.instSteps li::before { content: counter(inst); flex: none; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: var(--ink); background: var(--gold); }
.instIco { flex: none; width: 2.1rem; height: 2.1rem; border-radius: .55rem; display: grid; place-items: center; background: #fff; box-shadow: 0 .05rem .25rem rgba(16, 38, 76, .18); }
.instIco svg { width: 1.35rem; height: 1.35rem; }
.instSteps svg.inl { width: 1.05em; height: 1.05em; vertical-align: -.18em; }
