
/* Compact text chrome only. Portal menus keep their existing document owner. */
body:has([data-editor-mobile-text-controls]) :is(
  [data-editor-mobile-text-format], [data-editor-mobile-text-link],
  [data-editor-text-size-menu], [data-editor-line-spacing-menu],
  [data-editor-text-alignment-menu], [data-editor-font-library],
  [aria-label="Selected words color picker"]
) :is(button, [role="button"], input, select, textarea) {
  min-height: 44px;
  min-width: 44px;
}
body:has([data-editor-mobile-text-controls]) :is(
  [data-editor-mobile-text-format], [data-editor-mobile-text-link],
  [data-editor-text-size-menu], [data-editor-line-spacing-menu],
  [data-editor-text-alignment-menu], [data-editor-font-library],
  [aria-label="Selected words color picker"]
) :is(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  font-size: 16px;
  line-height: 1.4;
}
body:has([data-editor-mobile-text-controls]) [data-editor-font-library] input[type="search"] {
  padding-inline-end: 56px;
}

/* The nested words-color palette must sit above its Format owner. */
body:has([data-editor-mobile-text-controls]) [aria-label="Selected words color picker"] {
  z-index: 270;
}
