/* app.css — shared cross-page layer (loaded after each page's inline <style>).
   Owns: native-app feel + iOS safe-area for the installed PWA.
   Single source of truth — every page links this; edit here, not per page. */

:root { color-scheme: light dark; }

/* --- native-app feel: kill the "this is a web page" tells --- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: contain; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* --- iOS safe-area: only when launched as an installed app (notch / home indicator) --- */
@media (display-mode: standalone) {
  body {
    padding-top: max(1.6rem, env(safe-area-inset-top));
    padding-right: max(1.5rem, env(safe-area-inset-right));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    padding-left: max(1.5rem, env(safe-area-inset-left));
  }
  /* ibd-sim centers content in .wrap rather than padding the body */
  .wrap { padding-top: max(40px, env(safe-area-inset-top)); }
}
/* iOS <16.4 has no display-mode:standalone — app.js adds .standalone to <html> */
html.standalone body {
  padding-top: max(1.6rem, env(safe-area-inset-top));
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}
