/* Mobile search bars: never overflow, shrink inside flex rows, no iOS zoom. Loaded last. */
.search-field,.header-search,.data-search,.command-palette-search-bar,.brand-artwork-search{max-width:100%;min-width:0}
.search-field input,.header-search input,.data-search input,.command-palette-search-bar input,.palette-search,#artwork-search,.brand-artwork-search,.brand-artwork-search input{min-width:0;max-width:100%;text-overflow:ellipsis}
.command-palette-search-bar input,.search-field input,.data-search input{flex:1 1 auto;width:100%}
.command-palette-search-bar input::placeholder,.search-field input::placeholder,.palette-search::placeholder,#artwork-search::placeholder,.brand-artwork-search::placeholder{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
#artwork-search,.palette-search{width:100%;box-sizing:border-box}
@media (max-width:760px){
  html body .search-field{width:100%!important;max-width:100%!important;box-sizing:border-box;margin-left:0;margin-right:0}
  html body .search-field input,html body .search-field input#catalog-search{font-size:16px!important;min-width:0}
  html body .data-toolbar{flex-wrap:wrap}
  html body .data-search{flex:1 1 100%;max-width:100%;min-width:0;width:100%}
  html body .data-search input{font-size:16px}
  html body #artwork-search,html body .palette-search,html body .brand-artwork-search,html body .brand-artwork-search input{font-size:16px!important;width:100%;box-sizing:border-box}
  html body .command-palette-overlay{padding:max(10px,env(safe-area-inset-top)) 10px 10px;align-items:flex-start}
  html body .command-palette-box{width:100%;max-width:100%;max-height:calc(100vh - 20px);max-height:calc(100dvh - 20px);border-radius:16px}
  html body .command-palette-search-bar{padding:12px 14px;gap:10px;min-width:0}
  html body .command-palette-search-bar input{font-size:16px;min-width:0}
  html body .command-palette-search-bar .command-esc-badge,html body .command-palette-footer{display:none}
  html body .command-palette-results{max-height:none;overflow-y:auto;-webkit-overflow-scrolling:touch}
}
/* General mobile safety net */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-wrap:anywhere}
img,video,canvas,iframe{max-width:100%}
pre,code,kbd{max-width:100%;overflow-x:auto}
.table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.search-field input{background:transparent}

/* Mobile: no search icon in the top bar (desktop keeps it) */
@media (max-width:760px){
  html body .topbar .top-actions button.quick-search:not(#_):not(#__),
  html body .quick-search:not(#_):not(#__){display:none!important}
}
