/* Mobile header clarity guard.
 *
 * iOS Safari can composite sibling text into the same blurred layer when
 * backdrop-filter is used on several controls in a shared grid row. Keep the
 * header copy in a clean layer and render the controls with a static glass
 * tint on narrow screens. No JavaScript or continuous rendering is involved.
 */
@media (max-width: 767px) {
  #app:not(.visual-export-mode) .header-top.page-hero {
    isolation: isolate !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    -webkit-filter: none !important;
    filter: none !important;
  }

  #app:not(.visual-export-mode) .header-title-block,
  #app:not(.visual-export-mode) .header-title-row,
  #app:not(.visual-export-mode) .header-title,
  #app:not(.visual-export-mode) .header-subtitle {
    position: relative !important;
    z-index: 2 !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    text-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    -webkit-filter: none !important;
    filter: none !important;
  }

  #app:not(.visual-export-mode) .header-title,
  #app:not(.visual-export-mode) .header-subtitle {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  #app:not(.visual-export-mode) .header-top-actions {
    position: relative !important;
    z-index: 1 !important;
    isolation: isolate !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    -webkit-filter: none !important;
    filter: none !important;
  }

  #app:not(.visual-export-mode) .header-top-actions :is(
    .aa-launch-link,
    .top-action-btn,
    .settings-btn,
    .kd-liquid-js-surface,
    .kd-liquid-fallback
  ) {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.72)) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    -webkit-filter: none !important;
    filter: none !important;
    will-change: auto !important;
  }
}
