/* RC7.4 - Install is a public action, including on mobile browsers.
   Phase C hides .pwa-install-btn on mobile; this id selector intentionally overrides it.
   Important: #adminShell is always present in the DOM, even on home.
   Hide the button ONLY when #adminView is actually open. */
#pwaInstallBtn:not([hidden]){
  display:inline-flex!important;align-items:center;justify-content:center;
  position:fixed!important;right:16px!important;top:auto!important;bottom:68px!important;
  z-index:1200!important;max-width:calc(100vw - 24px);min-height:44px;
  padding:11px 16px!important;border:1px solid #e0b56b!important;border-radius:999px!important;
  color:#10261b!important;background:#d5aa60!important;
  font:800 13px/1.1 system-ui,sans-serif!important;letter-spacing:.01em!important;
  box-shadow:0 6px 22px rgba(0,0,0,.28)!important;cursor:pointer;touch-action:manipulation;
}
#pwaInstallBtn[hidden]{display:none!important}
#pwaInstallBtn:not([hidden]):hover{background:#e7bd78!important}
#pwaInstallBtn:focus-visible{outline:3px solid #fff!important;outline-offset:3px}
@media(max-width:700px){
  #pwaInstallBtn:not([hidden]){
    right:max(12px,env(safe-area-inset-right))!important;
    bottom:calc(5.4rem + env(safe-area-inset-bottom))!important;
    min-height:44px;padding:10px 14px!important;font-size:12px!important;
  }
}
/* Focused workflows and modal dialogs must not be covered by a floating CTA. */
body:has(.auth-modal.open) #pwaInstallBtn,body:has(.modal.open) #pwaInstallBtn,
body:has(.chart-fullscreen-modal.open) #pwaInstallBtn,
body.g-tools-modal-open #pwaInstallBtn,body:has(#adminView.open) #pwaInstallBtn{
  display:none!important;
}
.g-install-guide{box-sizing:border-box;max-width:min(92vw,440px);width:100%;
  max-height:min(85dvh,680px);overflow:auto;margin:auto;padding:0;
  border:1px solid rgba(213,170,96,.6);border-radius:20px;background:#0e291d;color:#f4f2e8;
  box-shadow:0 20px 70px rgba(0,0,0,.55);font-family:system-ui,sans-serif;
}
.g-install-guide::backdrop{background:rgba(2,11,7,.8)}
.g-install-guide-inner{padding:23px 23px 20px}
.g-install-guide h2{margin:0 0 12px;font-size:22px;line-height:1.18;color:#fff}
.g-install-guide p{color:#d3dfd6;font-size:14px;line-height:1.5}
.g-install-guide ol{padding-left:22px;color:#f2f2e7;line-height:1.7;font-size:14px}
.g-install-guide li{margin:.4rem 0}
.g-install-guide-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.g-install-guide-actions button,.g-install-guide-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 15px;border-radius:12px;border:1px solid rgba(220,190,128,.5);background:#d5aa60;color:#112518;text-decoration:none;font-weight:800;font-size:14px;cursor:pointer}
.g-install-guide-actions a{background:transparent;color:#f2d49b}
@media(prefers-reduced-motion:reduce){#pwaInstallBtn{transition:none!important}}
