/* Web app only: safe areas, sign-in dialog, hiding extension-only parts. */
.pwa .ext-only { display: none !important; }
@media (max-width: 640px) {
  /* Phones: keep tables scrollable and buttons reachable. */
  body { padding-bottom: env(safe-area-inset-bottom); }
  html.pwa .page main { padding-top: max(16px, env(safe-area-inset-top)); }
}

/* Thrift mode link: the web app only (the extension has no scan page). */
.pwa-only { display: none; }
html.pwa .pwa-only { display: inline-flex; }
.scan-link { font-weight: 600; margin-right: 12px; }
/* Web-app-only text (a paragraph or part of a sentence) shows as text, not as a flex box. */
html.pwa p.pwa-only, html.pwa div.pwa-only { display: block; }
html.pwa span.pwa-only { display: inline; }

/* Big buttons that pages make taller on purpose (the scanner's 56px) keep their size: those rules use doubled classes to outrank this one. */
/* Phones: every tap target at least 44px tall. */
@media (max-width: 600px) {
  html.pwa button:not(.link-btn), html.pwa .menu > summary, html.pwa .segmented button,
  html.pwa input[type="text"], html.pwa input[type="number"], html.pwa input[type="date"], html.pwa input:not([type]), html.pwa select { min-height: 44px; }
  html.pwa .field > input { min-height: 42px; }
  html.pwa .menu-list button { padding: 10px 12px; }
  html.pwa .account-bar .link-btn, html.pwa .plan-buy .link-btn { min-height: 44px; padding: 0 4px; }
  html.pwa .filter-bar .segmented button { padding: 3px 12px; }
  html.pwa .scan-link, html.pwa .appbar > a { min-height: 44px; align-items: center; display: inline-flex; }
}
