/* THE APP BARS (ui/AppHeader.astro, ui/AppFooter.astro; Maayan, 2026-11-19): a phone's own bars. The header sticks under the
   site's header, its title in the middle, its start and end at the sides; the footer holds a page's CTA at the screen's
   foot over everything, and the tab bar makes way for it ("appFooter always 'wins'"). A wide screen: no header, the footer
   a plain block where it is placed. Tokens only. */
.g-apphead { display: none; }
@media (max-width: 899px) {
  .g-apphead { position: sticky; top: var(--g-head-h); z-index: var(--g-z-head); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--g-2);
    min-height: var(--g-bar); padding: 0 var(--g-3); background: linear-gradient(var(--g-bar-material), var(--g-bar-material)), var(--g-bg); box-shadow: 0 var(--g-hair) 0 var(--g-separator); }
  .g-apphead__start { justify-self: start; display: flex; }
  .g-apphead__title { justify-self: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--g-w-semibold); font-size: var(--g-t-title3); color: var(--g-text); }
  .g-apphead__end { justify-self: end; display: flex; }
  .g-appfoot { position: fixed; inset: auto 0 0 0; z-index: var(--g-z-toast); display: flex; gap: var(--g-3); padding: var(--g-3) var(--g-4) calc(var(--g-3) + env(safe-area-inset-bottom, 0px));
    background: var(--g-bg); box-shadow: 0 calc(-1 * var(--g-hair)) 0 var(--g-separator); }
  .g-appfoot > * { flex: 1 1 0; min-width: 0; }
  .g-appbar--still { position: relative; inset: auto; top: auto; z-index: auto; }
  /* the tab bar makes way for a page's footer, and the page's foot its room */
  body:has(.g-appfoot:not(.g-appbar--still)) gm-tabbar { display: none; }
  body:has(.g-appfoot:not(.g-appbar--still)) .gm2-main { padding-bottom: calc(var(--g-appfoot-h) + env(safe-area-inset-bottom, 0px)); }
}
