@media screen {
  /* Let the text take a second line before it pushes adjacent controls out of view. */
  .portal :is(.field, .admin-notification-text, .admin-table-wrap, .settings-section),
  .hub-dispatch :is(.launcher-info, .dispatch-toolbar, .hub-links),
  #mobileApp :is(.bm-profile-identity, .bm-search-field, .bm-option-controls, .bm-customer-line, .bm-sheet-body),
  html[data-admin-app] :is(.main, .main-shell, .studio-card, .studio-quote-notes, .de-notes, .modal-body, .field) {
    min-inline-size: 0;
  }

  .portal :is(.field > span, .admin-notification-text, .form-error, .header-right a),
  .hub-dispatch :is(.launcher-info b, .hub-links a, .launcher-info small),
  #mobileApp :is(.bm-guide-heading, .bm-profile-identity b, .bm-choice-option, .bm-spec-caption, .bm-local-note),
  html[data-admin-app] :is(.field > span, .studio-lead h1, .studio-card h2, .modal-title, .card-title, .de-title) {
    overflow-wrap: anywhere;
    word-break: keep-all;
    line-height: 1.4;
  }

  .portal .admin-notification-actions { align-items: center; }
  #mobileApp :is(.bm-option-controls, .bm-sheet-body) :is(label, .bm-choice-trigger),
  html[data-admin-app] :is(.field, .studio-customer-fields, .studio-quote-notes, .de-notes) :is(input, select, textarea) {
    box-sizing: border-box;
    min-inline-size: 0;
    max-inline-size: 100%;
  }

  #mobileApp :is(.bm-sheet-body, .bm-option-controls) :is(.bm-choice-trigger, .bm-choice-option) {
    height: auto;
    min-height: 40px;
    white-space: normal;
  }
  #mobileApp :is(.bm-choice-label, .bm-choice-option > span:first-child) {
    min-inline-size: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
  }
  #mobileApp .bm-web-account-links { display: flex; flex-wrap: wrap; gap: 8px; }
  #mobileApp .bm-web-account-links a { min-height: 40px; display: inline-flex; align-items: center; }
  #mobileApp .bm-web-account-links select { max-inline-size: 100%; }

  html[data-admin-app] :is(.de-foot, .studio-lead-actions, .studio-card > header, .card-head, .modal-footer) {
    flex-wrap: wrap;
    min-inline-size: 0;
  }
  html[data-admin-app] :is(.card-head, .modal-footer) button {
    max-inline-size: 100%;
    min-height: 34px;
    height: auto;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  html[data-admin-app] :is(.lines-wrap, .studio-table, .table-wrap, .table-scroll) {
    max-inline-size: 100%;
    min-inline-size: 0;
    overflow-x: auto;
  }
  html[data-admin-app] :is(.studio-table, .table-wrap, .table-scroll) th:not(.studio-num) {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: keep-all;
    line-height: 1.35;
  }
}

@media screen and (max-width: 430px) {
  #mobileApp #bmOptions .bm-spec-values .bm-cylinder-row { grid-template-columns: minmax(0, 1fr); }
  .portal .admin-notification-actions { flex-basis: 100%; }
}
