.pwa-install{color:inherit;background:none;border:0;font:inherit;cursor:pointer;margin-inline-start:1em;padding:.4em;opacity:.85;pointer-events:auto}
.pwa-install[hidden]{display:none}
.pwa-install:hover,.pwa-install:focus-visible{color:#f29224;opacity:1}
/* Reserve a real row before the install prompt arrives, avoiding footer jumps. */
.home-install-slot{position:relative;display:flex;justify-content:center;align-items:flex-start;box-sizing:border-box;width:100%;min-height:56px;margin:0;padding:28px 0 0;overflow:visible}
.home-install-slot>.pwa-install{position:static;width:max-content;max-width:100%;min-height:28px;margin:0;padding:4px 8px;font:12px/1.4 'Segoe UI',Arial,sans-serif;white-space:normal;text-align:center;opacity:.7}
.pwa-help{max-width:min(28rem,85vw);background:#191919;color:#eee;border:1px solid #555;border-radius:12px;padding:1.4rem;font:inherit;line-height:1.6}
.pwa-help::backdrop{background:#0009}
.pwa-help button,.pwa-offline a{color:#f29224;background:none;border:0;font:inherit;cursor:pointer}
.pwa-offline{margin:0;min-height:100dvh;display:grid;place-items:center;background:#111;color:#eee;font:17px/1.6 system-ui,sans-serif;text-align:center}
.pwa-offline main{max-width:32rem;padding:2rem}
.pwa-offline h1{font-size:1.4rem}.pwa-offline p{color:#bbb}

/* Standalone is an app window, not a mobile-device signal.
   Wide windows retain each page's normal desktop layout. */
@media(display-mode:standalone){
  html body.site-page{min-height:100dvh}
}
/* Only narrow app windows fill the viewport; preserve device cutouts. */
@media(display-mode:standalone) and (max-width:760px){
  html body.site-page:not(.home-page)>main{max-width:none;width:100%;padding-left:max(8px,env(safe-area-inset-left,0px))!important;padding-right:max(8px,env(safe-area-inset-right,0px))!important}
  html body.site-page>.site-header{padding-left:max(8px,env(safe-area-inset-left,0px))!important;padding-right:max(8px,env(safe-area-inset-right,0px))!important}
}
