/* One stable category row on phones; search expands over the map on demand. */
.toolbar-search-panel { display: flex; align-items: center; flex: 0 0 auto; }
.mobile-search-control { display: none; }

@media (max-width: 700px) {
  body { --mobile-header-height: 65px; --mobile-toolbar-height: 52px; }
  .site-header { height: var(--mobile-header-height); }
  .toolbar {
    display: flex;
    align-items: center;
    height: var(--mobile-toolbar-height);
    padding: 3px 10px 4px;
    gap: 6px;
    overflow: visible;
  }
  .toolbar .category-scroller {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: 44px;
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
  }
  .toolbar .categories {
    flex: none;
    width: max-content;
    height: 44px;
    gap: 4px;
    padding: 0 4px 0 0;
  }
  .toolbar .category {
    flex: none;
    height: 40px;
    padding: 0 10px;
    line-height: 1.2;
  }
  .mobile-search-control,
  .toolbar .filter-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
  }
  .mobile-search-control .icon,
  .toolbar .filter-trigger .icon { width: 18px; height: 18px; }
  .toolbar .filter-label { display: none; }
  .mobile-search-toggle[aria-expanded="true"] { background: #1b2631; color: #fff; }
  .mobile-search-toggle.has-query::after {
    content: "";
    position: absolute;
    top: 5px;
    right: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cd7f32;
  }
  .toolbar-search-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 10px;
    right: 10px;
    z-index: 1;
    gap: 6px;
    padding: 8px;
    border: 1px solid #cdd7de;
    border-radius: 12px;
    background: #f8fafb;
    box-shadow: 0 8px 28px #1b263129;
  }
  .toolbar.search-open .toolbar-search-panel { display: flex; }
  .toolbar-search-panel .search-box { flex: 1; width: auto; min-width: 0; height: 44px; }
  .toolbar-search-panel .search-box input { font-size: 16px; }
  .toolbar-search-panel .mobile-search-control { border-color: transparent; background: transparent; }
  .workspace { height: calc(100dvh - var(--mobile-header-height) - var(--mobile-toolbar-height)); }
}
