/* base-mw.css — slim mobile base for Munshi AI V1. Reset + app frame only; every component's
   look lives in kit.css, every colour/size in tokens-mw.css. No desktop chrome (old base.css is
   reference-only). Mobile-first, phone width; 360px is the floor. */

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--m-bg, #F6F5F0);
  color: var(--m-ink, #141F19);
  font-family: var(--m-font, Inter, system-ui, sans-serif);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100dvh; overscroll-behavior-y: none; }
a { color: var(--m-green, #0A7A4B); text-decoration: none; }

/* app frame: a full-height column — scrolling screen content + a pinned bottom NavBar.
   The screen module fills .m-screen; the NavBar (mNavBar → .m-nav) pins to the bottom. */
#app.m-root { min-height: 100dvh; display: flex; flex-direction: column; }
.m-screen {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  /* clear the fixed NavBar so the last row is never hidden behind it */
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}
/* NavBar pinned to the viewport bottom (kit.css styles .m-nav itself) */
#app.m-root > .m-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--m-z-overlay, 900); }

/* width guard: centre on anything wider than a phone, never stretch the UI */
@media (min-width: 520px) {
  #app.m-root { max-width: 440px; margin: 0 auto; box-shadow: 0 0 0 1px var(--m-line, #E7E6DF); }
  #app.m-root > .m-nav { left: 50%; transform: translateX(-50%); width: 100%; max-width: 440px; }
}

/* offline banner (shown by boot on network loss) */
.net-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--m-z-toast, 4000);
  background: var(--m-orange, #C2410C); color: #fff;
  font-size: 12.5px; font-weight: 600; text-align: center; padding: 7px 14px;
}
.net-banner[hidden] { display: none; }
