/* ==========================================================================
   bl-responsive.css — loaded LAST so it settles the cascade.
   --------------------------------------------------------------------------
   The explore card (list + map) had no mobile layout: its split stayed two
   470px columns at every width, so the card measured 982px on a 375px phone
   and pushed the whole document sideways. Everything else that "overflowed"
   — the fixed nav, the report overlay — was only sizing to that widened
   document, not broken itself.
   ========================================================================== */

/* ---------- 1. let grid and flex items actually shrink ----------
   min-width:auto is the default on a grid/flex item and refuses to go below
   the content's min-content width, which is what pinned the card open. */
.bl-lab-explore-card,
.bl-lab-explore-split,
.bl-lab-explore-list-pane,
.bl-lab-explore-map-pane,
.bl-lab-explore,
.bl-ref-lab-wrap,
.bl-plan-builder {
  min-width: 0;
}

/* ---------- 1b. the actual root cause ----------
   #hl-explore is a column flex container with align-items:start, so its
   children are sized to max-content rather than to the container. That is
   what made the explore card 982px wide inside a 319px parent and pushed the
   whole document sideways on every phone and tablet. */
.bl-lab-explore > *,
#hl-explore > * {
  align-self: stretch;
  max-width: 100%;
}
.bl-lab-explore-card,
#hl-explore-card {
  width: 100%;
  max-width: 100%;
}

/* ---------- 2. tablet and below: stack the list over the map ---------- */
@media (max-width: 900px) {
  .bl-lab-explore-split,
  .bl-ref-lab-wrap .bl-lab-explore-split,
  .bl-lab-explore-card .bl-lab-explore-split {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    gap: 14px !important;
    overflow: visible !important;
  }
  .bl-ref-lab-wrap .bl-lab-explore-list-pane,
  .bl-ref-lab-wrap .bl-lab-explore-map-pane,
  .bl-lab-explore-list-pane,
  .bl-lab-explore-map-pane {
    height: auto !important;
    max-height: none !important;
  }
  /* the map still needs a definite height or Leaflet collapses to nothing */
  .bl-lab-explore-map-pane { min-height: 340px !important; }
  #hl-map-canvas, .bl-lab-map-canvas { min-height: 340px !important; }
  /* the opportunity list scrolls inside itself rather than running forever */
  .bl-lab-opp-list-lux,
  .bl-lab-explore-card .bl-lab-opp-list-lux {
    max-height: 60vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* ---------- 3. phones ---------- */
@media (max-width: 640px) {
  .bl-lab-explore-map-pane, #hl-map-canvas, .bl-lab-map-canvas { min-height: 280px !important; }
  .bl-explore-section-head { flex-wrap: wrap; gap: 6px; }
  .bl-mock-results-title { font-size: clamp(19px, 5.2vw, 24px); }
  /* filter chips and the sort control scroll horizontally instead of wrapping
     into a tall stack — the row is the one place sideways scroll is right */
  .bl-explore-filters, .bl-lab-opp-filters {
    display: flex; flex-wrap: nowrap;
    overflow-x: auto; overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .bl-explore-filters::-webkit-scrollbar,
  .bl-lab-opp-filters::-webkit-scrollbar { display: none; }
  .bl-explore-filters > *, .bl-lab-opp-filters > * { flex: 0 0 auto; }
}

/* ---------- 4. touch targets ----------
   Footer and nav links were 22px tall; the WCAG 2.2 minimum is 24px and the
   comfortable target is 44px. */
@media (pointer: coarse) {
  .lo-footer-col a,
  .lo-amenu-dd-item,
  .bl-opp-add, .bl-opp-bookmark {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  /* the budget slider's hit area — the track is deliberately thin, so grow
     the invisible target rather than the visual */
  #hl-budget { padding: 14px 0; background-clip: content-box; }
  #hl-budget::-webkit-slider-thumb { width: 26px; height: 26px; }
  #hl-budget::-moz-range-thumb { width: 26px; height: 26px; }
}

/* ---------- 5. wide content never scrolls the page sideways ---------- */
.bl-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 6. very large screens: stop the plan sprawling ---------- */
@media (min-width: 1800px) {
  .bl-plan-page-inner, .bl-sum-head, .bl-results { max-width: 1280px; margin-inline: auto; }
}

/* ---------- 7. the last two overflow sources ---------- */

/* The pricing matrix table scrolls inside its card — not the whole section. */
.bl-table-scroll,
.bl-matrix-body {
  max-width: 100%;
  min-width: 0;
}

#bl-matrix-body,
.bl-cat-body,
.lo-pricing-inner,
.bl-matrix {
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.bl-table-scroll > table { min-width: 640px; }

/* A single hint line under the map was set not to wrap, so it ran 593px wide. */
.bl-lab-explore-foot-hint,
#hl-map-insight-body,
#hl-map-insight-title {
  white-space: normal !important;
  min-width: 0 !important;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ---------- 8. comfortable targets in the shared chrome ----------
   Nav and footer links were 14–22px tall; 44px is the comfortable minimum on
   touch. Applies only to coarse pointers, so the desktop layout is untouched. */
@media (pointer: coarse) {
  .lo-footer a,
  .lo-amenu-link,
  .lo-amenu-dd-item,
  .lo-footer-bottom a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ---------- 9. phone layout tweaks (campaign pill is in §15 at ≤1024) */
@media (max-width: 900px) {
  html, body {
    overflow-x: clip;
  }
  .bl-ref-hero-band {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
  body.bl-lab-awake .lo-amenu-row .bl-lab-back-btn {
    font-size: 12px;
    padding: 8px 12px;
    min-height: 40px;
  }
  .bl-ref-hero--mobile .bl-ref-title {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  /* Forecast card was position:sticky on phones, so its KPI grid sat under
     the fixed explore plan bar. Keep it in document flow and clear the bar. */
  .bl-mock-results-sticky {
    position: static !important;
    box-shadow: none !important;
    margin: 0 !important;
    top: auto !important;
  }
  .bl-ref-lab-wrap.is-explore,
  main.bl-ref-page {
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .bl-lab-kpi-strip.bl-mock-kpi-strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px !important;
    margin-bottom: 12px !important;
  }
  .bl-lab-kpi-strip.bl-mock-kpi-strip::-webkit-scrollbar { display: none; }
  .bl-mock-kpi-card {
    flex: 0 0 72% !important;
    padding: 10px 10px 8px !important;
    min-width: 0 !important;
  }
  .bl-mock-kpi-card .bl-mock-card-icon {
    width: 28px !important;
    height: 28px !important;
    margin-bottom: 6px !important;
  }
  .bl-mock-kpi-value b {
    white-space: normal !important;
    font-size: 1.05rem !important;
  }
  .bl-mock-forecast-card,
  .bl-mock-metrics-deck {
    max-width: 100%;
    overflow: hidden;
  }
  .bl-mock-plan-compact {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .bl-mock-plan-cta {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* ---------- 10. chip rows scroll sideways instead of widening the page ----
   A row of filter chips or sheet tabs is the one place horizontal scroll is
   the right answer — wrapping them into a tall stack pushes the content the
   user came for off the screen. */
@media (max-width: 1024px) {
  .bl-filter-bar, #hl-filter-bar,
  .bl-filter-chips, #hl-filter-chips,
  .bl-campaign-sheet-tabs, #hl-sheet-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bl-filter-bar::-webkit-scrollbar,
  .bl-filter-chips::-webkit-scrollbar,
  .bl-campaign-sheet-tabs::-webkit-scrollbar { display: none; }
  .bl-filter-chip, .bl-campaign-sheet-tab, .bl-filter-divider { flex: 0 0 auto; }
}

/* ---------- 11. the remaining small targets on touch ----------
   WCAG 2.2 AA asks for 24px minimum; 44px is the comfortable size. These were
   9px (a social icon whose label is a single character), 16px (the pre-booking
   checkboxes) and 21px (FAQ question rows). */
@media (pointer: coarse) {
  .lo-footer-socials a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* grow the checkbox's hit area without inflating the tick itself */
  .bl-act-check input[type="checkbox"] {
    width: 24px;
    height: 24px;
  }
  .bl-act-check input[type="checkbox"]:checked::after {
    width: 6px;
    height: 11px;
    margin: 2px 0 0 7px;
  }
}

/* ---------- 12. last two ----------
   The social icon link is a single character, so it needs a width floor at
   every pointer type, not just touch. The Loud AI footer's "Advanced settings"
   is a 12px text button. */
.lo-footer-socials a {
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bl-lab-ai-fine-tune, #hl-fine-tune {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
@media (pointer: coarse) {
  .bl-lab-ai-fine-tune, #hl-fine-tune { min-height: 44px; }
}

/* ---------- 13. breadcrumb links ----------
   Bare <a> elements in the breadcrumb were 14px tall. */
.lo-breadcrumb-list a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
@media (pointer: coarse) {
  .lo-breadcrumb-list a { min-height: 44px; }
}

/* Footer link rows were 20px on desktop; 24px is the WCAG 2.2 AA floor. */
.lo-footer-col a, .lo-footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}

/* FAQ question rows were 21px at every pointer type. */
.lo-faq-q, .bl-faq-q, summary.lo-faq-q {
  display: flex;
  align-items: center;
  min-height: 24px;
}
@media (pointer: coarse) {
  .lo-faq-q, .bl-faq-q, summary.lo-faq-q { min-height: 44px; }
}

/* Budget preset chips (£5K … £100K+) were 23px on desktop. */
.bl-campaign-preset { min-height: 24px; }
@media (pointer: coarse) { .bl-campaign-preset { min-height: 40px; } }


/* ---------- 14. the plan's own top edge on a phone ----------
   The collapsed campaign control (the Budget / Duration / Location chips) is
   drawn over the top of the page in explore mode and overlaps the first ~70px
   of the plan, which is exactly where the verdict headline sits. Give the plan
   a top edge of its own on small screens so its opening line is never read
   through a control bar. */
@media (max-width:1024px){
  .bl-results{ padding-top:96px; }
}

@media (max-width: 1024px) {
  .bl-results {
    padding-top: 0 !important;
  }
}

.bl-ref-lab-wrap .bl-mock-forecast-card,
.bl-ref-lab-wrap .bl-mock-metrics-deck {
  background: #fff !important;
  background-color: #fff !important;
}

.bl-ref-lab-wrap .bl-mock-forecast-card .bl-mock-metrics-deck,
.bl-ref-lab-wrap .bl-mock-forecast-card .bl-lab-kpi-strip,
.bl-ref-lab-wrap .bl-mock-forecast-card .bl-mock-campaign-stats {
  background: transparent !important;
  background-color: transparent !important;
}

.bl-mock-metrics-deck .bl-mock-delta-up {
  color: #156b34 !important;
  background: transparent !important;
}

@media (max-width: 720px) {
  .bl-mock-forecast-card,
  .bl-mock-metrics-deck {
    padding: 12px;
    border-radius: 14px;
  }

  .bl-mock-forecast-card .bl-mock-metrics-deck {
    padding: 0;
    border-radius: 0;
  }

  .bl-mock-results-head--forecast {
    margin-bottom: 12px;
  }
}

/* ---------- 15. stacked/tablet campaign UX — pill + sheet (source rail hidden) */
@media (max-width: 1024px) {
  .bl-ref-hero-band {
    padding: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    position: sticky;
    top: var(--lo-chrome-h, 72px);
    z-index: 200;
  }

  body.is-planning .bl-ref-hero-band {
    top: var(--lo-chrome-h, 72px) !important;
    z-index: 200 !important;
    overflow: hidden !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .bl-ref-hero-band .bl-campaign-bar-shell,
  #hl-campaign-shell {
    display: none !important;
  }

  .bl-ref-hero--mobile {
    padding: 14px 16px 6px !important;
  }

  .bl-ref-hero--mobile .bl-ref-powered {
    margin-bottom: 0;
  }

  .bl-mobile-campaign-strip {
    display: block;
    padding: 0 16px 14px;
    position: relative;
    z-index: 12;
  }

  .bl-mobile-campaign-eyebrow {
    margin: 0 0 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
  }

  .bl-ref-search-wrap--source {
    display: none !important;
  }

  .bl-campaign-mobile-pill {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    text-align: left !important;
    color: #0a1f3d !important;
    background: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22) !important;
    cursor: pointer;
  }

  .bl-campaign-mobile-pill::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #ff4a00;
    border-bottom: 2px solid #ff4a00;
    transform: translateY(-60%) rotate(-45deg);
  }

  .bl-mobile-pill-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ff4a00;
    line-height: 1.2;
  }

  .bl-mobile-pill-summary {
    display: block;
    padding-right: 18px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: #0a1f3d;
  }

  .bl-campaign-mobile-pill[aria-expanded="true"] {
    border-color: rgba(255, 74, 0, 0.45) !important;
    box-shadow: 0 10px 28px rgba(255, 74, 0, 0.18) !important;
  }

  body.is-planning .bl-mobile-campaign-strip {
    position: sticky;
    top: var(--lo-chrome-h, 72px);
    z-index: 201;
    padding-top: 8px;
    padding-bottom: 10px;
    background: linear-gradient(180deg, rgba(10, 31, 61, 0.98) 0%, rgba(10, 31, 61, 0.94) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.is-planning .bl-ref-hero--mobile {
    display: none !important;
  }

  .bl-campaign-sheet:not(.is-open) {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .bl-campaign-sheet.is-open {
    visibility: visible !important;
    z-index: 220 !important;
  }

  .bl-campaign-sheet-body {
    max-height: min(92vh, 760px) !important;
    padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  .bl-campaign-sheet-content {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 12px;
  }

  .bl-campaign-sheet-tabs {
    flex-shrink: 0;
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
  }

  .bl-campaign-sheet-tab {
    min-height: 40px;
    padding: 10px 14px !important;
    font-size: 12px !important;
  }

  .bl-campaign-sheet-content .bl-sidebar-budget-card,
  .bl-campaign-sheet-content .bl-campaign-panel-head--sidebar,
  .bl-campaign-sheet-content .bl-campaign-panel-head--flyout,
  .bl-campaign-sheet-content .bl-adv-intro {
    color: #0a1f3d !important;
  }

  .bl-campaign-sheet-content .bl-campaign-aud-row,
  .bl-campaign-sheet-content .bl-campaign-picker-row,
  .bl-campaign-sheet-content .bl-campaign-opt,
  .bl-campaign-sheet-content .bl-campaign-obj-card,
  .bl-campaign-sheet-content .bl-campaign-loc-item {
    color: #0a1f3d !important;
    background: #f7f8fa !important;
    border: 1px solid rgba(10, 31, 61, 0.08) !important;
    border-radius: 12px !important;
  }

  .bl-campaign-sheet-content .bl-campaign-aud-row.is-on,
  .bl-campaign-sheet-content .bl-campaign-picker-row.is-on,
  .bl-campaign-sheet-content .bl-campaign-opt.is-on,
  .bl-campaign-sheet-content .bl-campaign-obj-card.is-on,
  .bl-campaign-sheet-content .bl-campaign-loc-item.is-on {
    background: rgba(255, 74, 0, 0.08) !important;
    border-color: rgba(255, 74, 0, 0.35) !important;
  }

  .bl-campaign-sheet-content .bl-campaign-option-meta,
  .bl-campaign-sheet-content .bl-campaign-loc-text small {
    color: rgba(10, 31, 61, 0.55) !important;
  }

  .bl-campaign-sheet-content .bl-sidebar-budget-display input {
    color: #0a1f3d !important;
  }

  main.bl-ref-page,
  .bl-ref-lab-wrap.is-explore {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .bl-results {
    padding-top: 0 !important;
  }

  .bl-ref-lab-wrap {
    padding: 12px 16px calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    position: relative;
    z-index: 1;
  }

  #hl-mix-panel.bl-lab-mix-lux {
    padding: 16px;
    border-radius: 16px;
  }

  #hl-mix-panel .bl-lab-mix-head {
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
  }

  #hl-mix-panel .bl-lab-mix-summary {
    width: 100%;
    white-space: normal;
    text-align: left;
  }
}

/* Plan hub: format mix only — Loud AI stays in the desktop sidebar */
#hl-ai-experiment {
  display: none !important;
}

#hl-plan-hub {
  display: block !important;
  margin: 0 0 12px;
  grid-template-columns: none !important;
}

#hl-explore {
  gap: 12px;
}

#hl-mix-panel.bl-lab-mix-lux {
  margin: 0;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(10, 31, 61, 0.08);
  background: #fff;
  box-shadow: 0 16px 48px -32px rgba(10, 31, 61, 0.14);
}

#hl-mix-panel .bl-lab-mix-head {
  margin-bottom: 14px;
  align-items: center;
}

#hl-mix-panel .bl-lab-mix-head h3 {
  font-size: clamp(16px, 1.4vw, 18px);
}

#hl-mix-panel .bl-lab-mix-summary {
  font-size: 11px;
  padding: 7px 11px;
}

#hl-mix-panel .bl-lab-donut-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0 !important;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

#hl-mix-panel .bl-donut-wrap-lux {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
}

#hl-mix-panel .bl-donut-wrap-lux svg {
  width: 96px;
  height: 96px;
}

#hl-mix-panel .bl-donut-wrap-lux::before {
  inset: 8px;
}

#hl-mix-panel .bl-donut-center b {
  font-size: 14px;
}

#hl-mix-panel .bl-donut-center span {
  font-size: 9px;
}

#hl-mix-panel .bl-lab-legend-lux {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 14px;
  align-content: center;
  max-height: none;
  overflow: visible;
}

#hl-mix-panel .bl-lab-legend-lux .bl-legend-row {
  padding: 5px 0;
}

#hl-mix-panel .bl-lab-legend-lux .bl-legend-total {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(10, 31, 61, 0.06);
}

@media (min-width: 1025px) {
  .bl-mobile-campaign-strip {
    display: none !important;
  }
}

/* ---------- 11. Explore card mobile/tablet — list/map toggle + scroll ---------- */
@media (max-width: 1024px) {
  #hl-explore-card,
  .bl-ref-lab-wrap .bl-lab-explore-card,
  .bl-lab-explore-card {
    overflow: visible !important;
    min-height: auto !important;
  }

  .bl-ref-lab-wrap .bl-lab-explore-split,
  .bl-lab-explore-card .bl-lab-explore-split,
  .bl-lab-explore-split {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    gap: 0 !important;
  }

  .bl-ref-lab-wrap .bl-lab-explore-list-pane,
  .bl-ref-lab-wrap .bl-lab-explore-map-pane,
  .bl-lab-explore-list-pane,
  .bl-lab-explore-map-pane {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    border: none !important;
    flex: none !important;
  }

  body:not(.explore-map-only) .bl-lab-explore-map-pane {
    display: none !important;
  }

  body.explore-map-only .bl-lab-explore-list-pane {
    display: none !important;
  }

  body.explore-map-only .bl-lab-explore-map-pane {
    display: flex !important;
    flex-direction: column !important;
  }

  .bl-ref-lab-wrap .bl-lab-explore-list-pane .bl-lab-opp-list-lux,
  .bl-ref-lab-wrap .bl-lab-explore-list-pane .bl-lab-opp-list,
  .bl-lab-explore-card .bl-lab-explore-list-pane .bl-lab-opp-list-lux,
  .bl-lab-explore-card .bl-lab-opp-list-lux {
    height: auto !important;
    flex: none !important;
    min-height: 220px !important;
    max-height: min(58vh, 520px) !important;
    padding: 4px 2px 8px 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.explore-map-only .bl-ref-lab-wrap .bl-lab-explore-map-pane .bl-lab-map,
  body.explore-map-only .bl-lab-explore-map-pane .bl-lab-map {
    min-height: min(52vh, 420px) !important;
    height: min(52vh, 420px) !important;
    flex: none !important;
  }

  body.explore-map-only #hl-map-canvas,
  body.explore-map-only .bl-lab-map-canvas {
    position: relative !important;
    min-height: min(52vh, 420px) !important;
    height: 100% !important;
  }

  .bl-explore-toolbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
  }

  .bl-explore-toolbar .bl-filter-chips {
    flex: 1 1 100%;
    order: 1;
  }

  .bl-explore-toolbar .bl-explore-sort {
    order: 2;
    margin-left: 0;
    flex: 1 1 auto;
  }

  .bl-explore-toolbar .bl-mobile-view-toggle {
    display: inline-flex !important;
    order: 3;
    margin-left: auto;
    flex-shrink: 0;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(10, 31, 61, 0.06);
    border: 1px solid rgba(10, 31, 61, 0.08);
  }

  .bl-explore-toolbar .bl-mobile-view-toggle button {
    min-height: 36px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--navy, #0a1f3d);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .bl-explore-toolbar .bl-mobile-view-toggle button.is-on {
    background: #fff;
    color: var(--navy, #0a1f3d);
    box-shadow: 0 2px 8px rgba(10, 31, 61, 0.12);
  }

  #hl-map-plan-bar.bl-explore-plan-foot {
    left: 0 !important;
    right: 0 !important;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .bl-lab-explore-card .bl-explore-plan-foot-spacer {
    flex: 0 0 calc(var(--bl-explore-plan-foot-h, 56px) + env(safe-area-inset-bottom, 0px));
    height: calc(var(--bl-explore-plan-foot-h, 56px) + env(safe-area-inset-bottom, 0px));
  }
}
