/* AMAC Suite — iOS / installed-PWA hardening — v1.0.0 (suite-pwa v2.2.0)
   ---------------------------------------------------------------------------
   Shared primitive. Everything here is scoped to `display-mode: standalone`,
   so it is COMPLETELY INERT in a normal browser tab and on desktop — it only
   takes effect once the suite has been installed to a home screen and launched
   without browser chrome. Safe to link from any app's <head>; suite-wide
   rollout is a one-line <link> per app (or via the auto-wire block) later.

   Status-bar note: the suite uses `apple-mobile-web-app-status-bar-style:
   black` (a SOLID bar above the web view), so web content already starts BELOW
   the notch/status bar — we deliberately do NOT pad the top here. We do honour
   the bottom home-indicator and the landscape side insets. Switching to
   `black-translucent` (full-bleed under the status bar) would require a
   top-inset pad on every app's header and is intentionally avoided for now
   (documented as a known limitation in index.html). */

@media all and (display-mode: standalone) {
  :root {
    --amac-safe-top: env(safe-area-inset-top, 0px);
    --amac-safe-right: env(safe-area-inset-right, 0px);
    --amac-safe-bottom: env(safe-area-inset-bottom, 0px);
    --amac-safe-left: env(safe-area-inset-left, 0px);
  }

  /* Keep content clear of the home indicator and (in landscape) the side
     notch. Top is handled by the solid status bar, so it is left untouched. */
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  /* iOS standalone niceties: stop the engine inflating text on rotate, and
     remove the grey tap-flash so buttons feel native. */
  html { -webkit-text-size-adjust: 100%; }
  a, button, [role="button"], .btn { -webkit-tap-highlight-color: transparent; }
}
