/* One compact masthead row. Keep existing controls, labels and focus feedback.
   Scoped to the compact controls; keep sticky safe-area/rail offsets in sync. */
body[data-catalog-style="white"] .theme-masthead[data-compact-header] {
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:8px;
  padding:4px 12px 8px;
  padding-left:max(12px,env(safe-area-inset-left,0px));
  padding-right:max(12px,env(safe-area-inset-right,0px));
  min-width:0;
}
body[data-catalog-style="white"] .theme-masthead[data-compact-header] .shelf-brand {
  flex:0 0 auto;
  margin:0;
  padding:0;
  padding-inline:0;
  gap:0;
}
body[data-catalog-style="white"] .theme-masthead[data-compact-header] .shelf-brand h1 {
  margin:0;
  font-size:20px;
  line-height:1.3;
  white-space:nowrap;
}
body[data-catalog-style="white"] .theme-masthead[data-compact-header] .top-tools {
  flex:1 1 0%;
  min-width:0;
  margin:0;
  padding:0;
}
body[data-catalog-style="white"] .theme-masthead[data-compact-header] .toolbar {
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:8px;
  min-width:0;
  margin:0;
}
body[data-catalog-style="white"] .theme-masthead[data-compact-header] .search-box {
  flex:1 1 0%;
  min-width:0;
  height:44px;
  min-height:44px;
  padding:0 10px;
  gap:8px;
}
body[data-catalog-style="white"] .theme-masthead[data-compact-header] .search-box input {
  flex:1 1 0%;
  min-width:0;
  height:100%;
  font-size:16px;
}
body[data-catalog-style="white"] .theme-masthead[data-compact-header] .search-icon {
  flex:0 0 20px;
  width:20px;
  height:20px;
}
body[data-catalog-style="white"] .theme-masthead[data-compact-header] .service-trigger {
  flex:0 0 auto;
  min-width:60px;
  min-height:44px;
  height:44px;
  padding:0 2px;
  gap:5px;
  font-size:14px;
  white-space:nowrap;
  touch-action:manipulation;
}
body[data-catalog-style="white"] .theme-masthead[data-compact-header] .service-icon {
  flex:0 0 22px;
  width:22px;
  height:22px;
}
@media(max-width:374px) {
  body[data-catalog-style="white"] .theme-masthead[data-compact-header] .shelf-brand h1 { font-size:18px; }
}
@media(min-width:701px) {
  body[data-catalog-style="white"] .theme-masthead[data-compact-header] {
    padding:4px 24px 8px;
    padding-left:max(24px,env(safe-area-inset-left,0px));
    padding-right:max(24px,env(safe-area-inset-right,0px));
    gap:12px;
  }
  body[data-catalog-style="white"] .theme-masthead[data-compact-header] .shelf-brand h1 { font-size:22px; }
}
/* 44px controls + 1px divider. Safe-area padding remains for sticky navigation.
   The masthead leaves 8px BELOW controls, preserving vertical touch separation. */
body[data-catalog-style="white"][data-compact-controls] {
  --catalog-nav-height:calc(45px + env(safe-area-inset-top,0px));
}
body[data-catalog-style="white"][data-compact-controls] .primary-nav-wrap {
  gap:8px;
  padding-left:max(12px,env(safe-area-inset-left,0px));
  padding-right:max(12px,env(safe-area-inset-right,0px));
}
body[data-catalog-style="white"][data-compact-controls] .primary-nav-wrap .primary-nav {
  padding:0;
}
body[data-catalog-style="white"][data-compact-controls] .primary-nav-wrap .primary-chip {
  min-height:44px;
  min-width:44px;
  padding:6px 2px;
  line-height:1.25;
}
@media(min-width:701px) {
  body[data-catalog-style="white"][data-compact-controls] .primary-nav-wrap {
    padding-left:max(24px,env(safe-area-inset-left,0px));
    padding-right:max(24px,env(safe-area-inset-right,0px));
  }
}
