/* Keep text-entry controls at a readable size before focus, rather than
   disabling accessibility zoom with maximum-scale or user-scalable=no. */
html.ivy-duo-mode :is(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),textarea,select,[contenteditable="true"]) {
  font-size: max(16px, var(--duo-input-font-size, 1em)) !important;
}
html.ivy-duo-mode .duo-account-fields input { --duo-input-font-size: 20px; }

/* WebKit must not pan the document or a hidden-overflow wrapper to focus a
   field. Nested overflow:auto areas retain normal touch/caret scrolling. */
html:root.ivy-duo-mode {height:100%;overflow:clip!important;}
html:root.ivy-duo-mode body {
  position:fixed!important;inset:0!important;width:100%!important;margin:0!important;
  height:var(--ivy-duo-viewport-height,100%)!important;min-height:0!important;
  overflow:clip!important;
}
html:root.ivy-duo-mode .ivy-keyboard-clip {overflow:clip!important;}
html:root.ivy-duo-mode.ivy-keyboard-open .ivy-keyboard-panel:not(.ai-panel) {
  max-height:var(--ivy-keyboard-panel-height)!important;
}
/* The permanent canvas stays full-height. Only Billie's flex content above
   the keyboard shortens, with its header anchored and its composer reachable. */
html:root.ivy-duo-mode #ivy-duo-billie-panel.ivy-keyboard-panel>.bw-workspace {
  bottom:auto;height:var(--ivy-keyboard-panel-height);
}
html:root.ivy-duo-mode .ivy-keyboard-panel .bw-tabs {display:none;}
