/* Applies only when nabu-ios-viewport.js identifies iOS WebKit.
 * Keep Flutter's canvas / semantic hit-test coordinate system untransformed.
 * A stable viewport root prevents document bounce, stray body margins and
 * the mismatch between Safari toolbar geometry and the engine's host element.
 */
html.nabu-ios-viewport,
html.nabu-ios-viewport body {
  box-sizing: border-box;
  width: 100%;
  height: var(--nabu-ios-viewport-height, 100%);
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
html.nabu-ios-viewport body {
  position: relative; /* NOT fixed: iOS WebKit can clip the keyboard/composer. */
}
html.nabu-ios-viewport flutter-view {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
  /* Deliberately no transform, translate, zoom or touch-action override. */
}
/* Flutter's hidden accessibility/text inputs can trigger Safari's >1x zoom
 * when the inherited font is below 16px, offsetting subsequent touch hits.
 * These selectors affect only the invisible DOM input hosts, not Dart UI.
 */
html.nabu-ios-viewport flt-semantics-host input,
html.nabu-ios-viewport flt-semantics-host textarea,
html.nabu-ios-viewport flt-text-editing-host input,
html.nabu-ios-viewport flt-text-editing-host textarea {
  font-size: 16px !important;
}
/* Native PWA install/update overlays respect the same bounded viewport. */
html.nabu-ios-viewport .nabu-pwa-card {
  max-height: calc(var(--nabu-ios-viewport-height, 100vh) - 120px);
  overflow-y: auto;
}
html.nabu-ios-viewport .nabu-pwa-shield {
  height: var(--nabu-ios-viewport-height, 100vh);
  box-sizing: border-box;
}
