:root {
  --accent: #2f6d4f;
  --marker: #2f6d4f;
  --highlight: #c2410c;
  --product-highlight: #fde8d7;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #14201a;
  --muted: #68756e;
  --line: #dde4de;
  --control-line: #cfd8d1;
  --control-height: 44px;
  --soft: #eef3ef;
  --shadow: 0 8px 24px rgba(20, 32, 26, .12);
}

* { box-sizing: border-box; }
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--bg);
  font: 14px/1.45 var(--font);
}
button, input, select { font: inherit; }
button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;
}
button.secondary { background: #fff; color: var(--accent); }
button:focus-visible,
input:focus-visible,
select:focus-visible,
.store-row:focus-visible,
.product-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
  outline-offset: 2px;
}

#locator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

.map-pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
#map { position: absolute; inset: 0; }
.map-loading-skeleton {
  position: absolute;
  inset: 0;
  z-index: 10;
  background:
    radial-gradient(circle at 28% 34%, rgba(255, 255, 255, .78), transparent 30%),
    linear-gradient(135deg, var(--soft), color-mix(in srgb, var(--accent) 7%, #f7f9f7));
  animation: locator-skeleton-pulse 1.8s ease-in-out infinite alternate;
}
#locator:not(.is-loading) .map-loading-skeleton,
#locator:not(.is-loading) .list-loading-skeleton {
  display: none;
}
.product-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 4;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 800;
}
.product-legend[hidden] { display: none; }
.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 999px;
  vertical-align: 1px;
}
.legend-dot.match { background: var(--highlight); }
.legend-dot.other { background: var(--marker); }
.maplibregl-popup-content {
  border-radius: 8px;
  box-shadow: var(--shadow);
  font: 13px/1.4 var(--font);
}

.list-pane {
  position: relative;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.list-loading-skeleton {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
}
.skeleton-controls {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.skeleton-control,
.skeleton-filters span,
.skeleton-count,
.skeleton-rows span {
  display: block;
  overflow: hidden;
  background: linear-gradient(100deg, #e8ece9 30%, #f7f9f7 45%, #e8ece9 60%);
  background-size: 260% 100%;
  animation: locator-skeleton-shimmer 1.35s ease-in-out infinite;
}
.skeleton-control {
  flex: 0 0 84px;
  height: var(--control-height);
  border-radius: 8px;
}
.skeleton-control-wide { flex: 1 1 auto; }
.skeleton-filters {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
}
.skeleton-filters span {
  width: 76px;
  height: 28px;
  border-radius: 999px;
}
.skeleton-filters span:nth-child(2) { width: 112px; }
.skeleton-filters span:nth-child(3) { width: 62px; }
.skeleton-sheet {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.skeleton-handle { display: none; }
.skeleton-count {
  width: 106px;
  height: 14px;
  margin: 11px 12px;
  border-radius: 5px;
}
.skeleton-rows {
  display: grid;
  gap: 7px;
  padding: 2px 8px 8px;
}
.skeleton-rows span {
  height: 66px;
  border-radius: 8px;
}

@keyframes locator-skeleton-pulse {
  from { opacity: .72; }
  to { opacity: 1; }
}
@keyframes locator-skeleton-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.location-field,
.radius-field select {
  height: var(--control-height);
  border: 1px solid var(--control-line);
  border-radius: 8px;
  color: var(--ink);
  background-color: #fff;
  font-size: 14px;
}
.location-field {
  flex: 1 1 190px;
  min-width: 0;
  padding: 0 12px;
}
.radius-field {
  flex: 0 0 128px;
  min-width: 0;
}
.radius-field[hidden] { display: none; }
.radius-field select {
  width: 100%;
  min-width: 0;
  padding: 0 32px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2368756e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  cursor: pointer;
}
.radius-field select:disabled {
  color: var(--muted);
  cursor: default;
  opacity: .7;
}
#location-button,
#near-button {
  flex: 0 0 auto;
  height: var(--control-height);
  padding: 0 10px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}
.search-icon { display: none; }
#location-button:hover {
  border-color: color-mix(in srgb, var(--accent) 82%, #000);
  background: color-mix(in srgb, var(--accent) 88%, #000);
}
#near-button {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}
#near-button:hover {
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
#near-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
#near-button[aria-pressed="true"]:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
}
@container (max-width: 420px) {
  .search-row {
    flex-wrap: wrap;
  }
  .search-row:has(.radius-field:not([hidden])) .location-field,
  .search-row:has(.radius-field:not([hidden])) .radius-field,
  .search-row:has(.radius-field:not([hidden])) #location-button,
  .search-row:has(.radius-field:not([hidden])) #near-button {
    flex: 1 1 calc(50% - 4px);
  }
  .search-row:not(:has(.radius-field:not([hidden]))) .location-field {
    flex: 1 1 100%;
  }
  .search-row:not(:has(.radius-field:not([hidden]))) #location-button,
  .search-row:not(:has(.radius-field:not([hidden]))) #near-button {
    flex: 1 1 calc(50% - 4px);
  }
}
.location-chip {
  min-height: 0;
  padding: 10px 12px;
}
.location-chip[hidden] { display: none; }
.near-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, #fff);
  color: var(--ink);
  padding: 4px 6px 4px 9px;
  font-size: 12px;
  font-weight: 800;
}
.near-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.near-chip button {
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  line-height: 1;
}
.location-error {
  min-height: 0;
  padding: 0 12px 8px;
  color: #a73535;
  font-size: 12px;
}
.location-error:not(:empty) {
  padding-top: 8px;
}
.location-error:empty {
  display: none;
}
.mobile-chip-row {
  display: none;
}
.product-toggle {
  display: none;
}
.status-line {
  padding: 8px 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  min-height: 37px;
}
.result-note {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.result-note[hidden] { display: none; }
.link-button {
  margin-left: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: inherit;
  font-weight: 800;
  text-decoration: underline;
}
.class-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 12px 2px;
}
.class-filter[hidden] { display: none; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}
.chip.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}
.product-filter {
  display: grid;
  gap: 8px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.product-filter > * {
  min-width: 0;
  max-width: 100%;
}
.product-filter label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.state-scope-line {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.state-scope-select {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 190px;
  height: 28px;
  border: 0;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  border-radius: 0;
  color: var(--accent);
  background: transparent;
  padding: 0 20px 0 4px;
  font-weight: 900;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%232F6D4F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 2px center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-combobox-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
}
.product-combobox-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}
.product-combobox {
  width: 100%;
  min-width: 0;
  height: var(--control-height);
  border: 1px solid var(--control-line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}
.product-clear {
  flex: 0 0 auto;
  min-width: 0;
  height: var(--control-height);
  border-color: var(--line);
  background: #fff;
  color: var(--accent);
  white-space: nowrap;
}
.product-done {
  display: none;
}
.product-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 8;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  max-height: 216px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 4px;
}
.product-options[hidden] { display: none; }
.product-options-heading,
.product-option-empty {
  padding: 7px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.product-options-heading {
  border-bottom: 1px solid var(--line);
  margin-bottom: 3px;
}
.product-option-empty {
  color: var(--ink);
}
.cross-sell-cta {
  display: block;
  max-width: 100%;
  margin: 5px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, #fff);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}
.cross-sell-cta a {
  color: var(--accent);
  font-weight: 800;
  overflow-wrap: anywhere;
}
.product-grid-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.product-grid-empty > p { margin: 0; }
.product-grid-empty .cross-sell-cta { margin: 0; }
.product-option {
  display: block;
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
}
.product-option:hover,
.product-option[aria-selected="true"] {
  background: var(--soft);
  color: var(--accent);
}
.selected-products {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: min(18vh, 156px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  gap: 6px;
  padding-right: 3px;
}
.selected-products:empty { display: none; }
.selected-product-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--highlight) 45%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--highlight) 10%, #fff);
  color: var(--ink);
  padding: 4px 7px 4px 9px;
  font-size: 12px;
  font-weight: 800;
}
.selected-product-chip span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}
.selected-product-chip button {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--highlight);
  line-height: 1;
}

.store-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}
.store-row {
  display: grid;
  gap: 3px;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 11px 12px;
  margin: 0 0 7px;
  cursor: pointer;
}
.store-row:hover,
.store-row.active {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--soft);
}
.store-row .name { font-weight: 800; }
.store-row .name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.store-row .match-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 999px;
  background: var(--highlight);
}
.store-row .selection-note {
  display: none;
  color: var(--highlight);
  font-size: 12px;
  font-weight: 800;
}
.store-row.matching .selection-note {
  display: block;
}
.store-row .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.store-row .distance {
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
}
.empty-state {
  display: grid;
  gap: 10px;
  padding: 18px 12px;
  color: var(--muted);
}
.empty-state p {
  margin: 0;
}
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.disclaimer {
  margin: 0;
  padding: 10px 12px 12px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
}
.mobile-sheet {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sheet-handle {
  display: none;
}
.sheet-body,
.sheet-list-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sheet-detail-view,
.mobile-legend-slot {
  display: none;
}
.sheet-header {
  display: block;
}
.legend-short {
  display: none;
}

.store-card {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  width: min(420px, calc(100% - 28px));
  max-height: min(76vh, 560px);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.store-card header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.store-card h2 {
  margin: 0 28px 4px 0;
  font-size: 17px;
  line-height: 1.25;
}
.store-card .address { color: var(--muted); font-size: 13px; }
.store-card .distance-line {
  margin-top: 3px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.store-card .close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.card-actions {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 11px;
  font-weight: 800;
  text-decoration: none;
}
.product-search {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.product-grid {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: 9px;
  overflow: auto;
  padding: 12px 16px 16px;
}
.product-tile {
  --product-label-height: 4.05em;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: max-content;
}
.product-tile.product-match {
  border-color: color-mix(in srgb, var(--highlight) 40%, var(--line));
  background: var(--product-highlight);
}
.product-tile.has-image .image-wrap {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
}
.product-tile.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-tile.no-image {
  gap: 8px;
  padding: 10px;
}
.product-tile .label {
  flex: 0 0 var(--product-label-height);
  height: var(--product-label-height);
  min-height: var(--product-label-height);
  max-height: var(--product-label-height);
  margin: 8px 0;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.product-tile.no-image .label {
  margin: 0;
  padding: 0;
  font-size: 13px;
}

@media (max-width: 760px) {
  html,
  body {
    overscroll-behavior: none;
    background: #fff;
  }
  #locator {
    position: relative;
    display: block;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    background: #fff;
    overflow: hidden;
  }
  .map-pane {
    position: absolute;
    inset: 0;
    z-index: 0;
  }
  .list-pane {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    pointer-events: none;
  }
  .list-loading-skeleton {
    z-index: 20;
    display: block;
    background: transparent;
    pointer-events: auto;
  }
  .skeleton-controls {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    height: 52px;
    padding: 4px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(20, 32, 26, .14);
  }
  .skeleton-control { height: 44px; }
  .skeleton-control:not(.skeleton-control-wide) {
    flex-basis: 44px;
    border-radius: 10px;
  }
  .skeleton-filters {
    position: absolute;
    top: calc(max(12px, env(safe-area-inset-top)) + 60px);
    left: 0;
    right: 0;
    padding: 4px 12px;
  }
  .skeleton-filters span { height: 36px; }
  .skeleton-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50dvh;
    min-height: 240px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -12px 34px rgba(20, 32, 26, .16);
  }
  .skeleton-handle {
    display: block;
    width: 36px;
    height: 5px;
    margin: 19px auto 12px;
    border-radius: 999px;
    background: #c8d3cc;
  }
  .skeleton-count { margin-top: 8px; }
  .skeleton-rows {
    gap: 0;
    padding: 0;
  }
  .skeleton-rows span {
    height: 58px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .search-row {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    z-index: 6;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    height: 52px;
    padding: 4px;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(20, 32, 26, .18);
    pointer-events: auto;
  }
  .location-field {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    border: 0;
    border-radius: 9px;
    padding: 0 10px;
    font-size: 16px;
  }
  #location-button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #location-button .search-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }
  #location-button .search-icon {
    display: block;
  }
  .mobile-chip-row {
    position: absolute;
    top: calc(max(12px, env(safe-area-inset-top)) + 60px);
    left: 0;
    right: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 44px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding: 0 12px 5px;
    scrollbar-width: none;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-chip-row::-webkit-scrollbar {
    display: none;
  }
  .mobile-chip-row > *,
  .mobile-chip-row .chip,
  .mobile-chip-row .near-chip,
  .product-toggle {
    flex: 0 0 auto;
  }
  .mobile-chip-row #near-button,
  .mobile-chip-row .radius-field,
  .product-toggle,
  .mobile-chip-row .near-chip,
  .mobile-chip-row .chip {
    min-height: 36px;
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    color: var(--ink);
    box-shadow: 0 4px 16px rgba(20, 32, 26, .13);
  }
  .mobile-chip-row #near-button,
  .product-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px;
    padding: 0 13px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
  }
  .mobile-chip-row #near-button::before {
    content: "\1F4CD";
    font-size: 13px;
    line-height: 1;
  }
  .mobile-chip-row #near-button[aria-pressed="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
  }
  .product-toggle[aria-expanded="true"] {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
  }
  .mobile-chip-row .radius-field {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 36px;
    padding-left: 12px;
  }
  .mobile-chip-row .radius-field[hidden] {
    display: none;
  }
  .mobile-chip-row .radius-field::before {
    content: "Radius:";
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
  }
  .mobile-chip-row .radius-field select {
    width: auto;
    min-width: 84px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background-color: transparent;
    font-size: 13px;
    font-weight: 800;
  }
  .mobile-chip-row .location-chip {
    display: block;
    min-width: 0;
    padding: 0;
  }
  .mobile-chip-row .location-chip[hidden] {
    display: none;
  }
  .mobile-chip-row .near-chip {
    max-width: min(66vw, 280px);
    height: 36px;
    padding: 0 5px 0 12px;
    font-size: 13px;
  }
  .mobile-chip-row .near-chip button {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }
  .mobile-chip-row .class-filter {
    display: contents;
    padding: 0;
  }
  .mobile-chip-row .class-filter[hidden] {
    display: none;
  }
  .mobile-chip-row .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }
  .mobile-chip-row .chip.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
  }
  .location-error {
    position: absolute;
    top: calc(max(12px, env(safe-area-inset-top)) + 104px);
    left: 12px;
    right: 12px;
    z-index: 7;
    min-height: 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
    pointer-events: auto;
  }
  .location-error:empty {
    display: none;
  }
  .product-filter {
    position: absolute;
    top: calc(max(12px, env(safe-area-inset-top)) + 108px);
    left: 12px;
    right: auto;
    z-index: 7;
    display: none;
    gap: 9px;
    width: calc(100% - 24px);
    max-width: calc(100vw - 24px);
    max-height: min(calc(100dvh - 132px), 560px);
    overflow: hidden;
    overscroll-behavior: contain;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(20, 32, 26, .22);
    pointer-events: auto;
    font-size: 16px;
  }
  #locator.product-panel-open .product-filter {
    display: grid;
  }
  .state-scope-line {
    max-width: 100%;
    font-size: 16px;
  }
  .state-scope-select {
    max-width: min(58vw, 220px);
    height: 34px;
    font-size: 16px;
  }
  .product-filter label {
    font-size: 16px;
  }
  .product-options-heading,
  .product-option-empty,
  .product-option {
    font-size: 16px;
  }
  .cross-sell-cta { font-size: 14px; }
  .product-combobox-row {
    flex-direction: column;
    width: 100%;
  }
  .product-combobox,
  .product-search {
    font-size: 16px;
  }
  .product-clear,
  .product-done {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
  }
  .product-done {
    display: block;
    position: sticky;
    bottom: 0;
    z-index: 2;
    border-color: var(--line);
    background: #fff;
    color: var(--accent);
  }
  .selected-products {
    max-height: min(22dvh, 180px);
    padding: 2px 5px 2px 0;
    touch-action: pan-y;
  }
  .product-options {
    width: 100%;
    max-width: 100%;
    max-height: 168px;
  }
  .mobile-sheet {
    --sheet-visible: 50dvh;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    height: 92vh;
    height: 92dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -12px 34px rgba(20, 32, 26, .2);
    transform: translateY(calc(100% - var(--sheet-visible)));
    transition: transform 200ms ease;
    pointer-events: auto;
    overscroll-behavior: contain;
    will-change: transform;
  }
  .mobile-sheet[data-sheet-state="peek"] {
    --sheet-visible: 110px;
  }
  .mobile-sheet[data-sheet-state="half"] {
    --sheet-visible: 50dvh;
  }
  .mobile-sheet[data-sheet-state="full"] {
    --sheet-visible: 92dvh;
  }
  /* At full height the sheet owns the screen: the floating search and chip
     row would otherwise sit on top of the sheet handle and steal its taps. */
  #locator.mobile-active.sheet-full .search-row,
  #locator.mobile-active.sheet-full .mobile-chip-row {
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms;
  }
  #locator.sheet-dragging .mobile-sheet {
    transition: none;
  }
  .sheet-handle {
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    color: var(--muted);
    cursor: grab;
    touch-action: none;
  }
  .sheet-handle span {
    display: block;
    width: 36px;
    height: 5px;
    border-radius: 999px;
    background: #c8d3cc;
  }
  .sheet-body {
    min-height: 0;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sheet-list-view {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
  }
  #locator.mobile-detail-open .sheet-list-view {
    display: none;
  }
  .sheet-detail-view {
    min-height: 0;
    display: none;
    flex: 1;
    overflow: hidden;
  }
  #locator.mobile-detail-open .sheet-detail-view {
    display: flex;
  }
  .sheet-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding: 0 12px;
  }
  .status-line {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 42px;
    padding: 10px 0;
    border-bottom: 0;
    font-size: 13px;
    font-weight: 800;
  }
  .mobile-legend-slot {
    display: block;
    flex: 0 0 auto;
  }
  .mobile-legend-slot:empty {
    display: none;
  }
  .product-legend {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 11px;
    white-space: nowrap;
  }
  .product-legend[hidden] {
    display: none;
  }
  .product-legend > div {
    display: inline-flex;
    align-items: center;
  }
  .legend-full {
    display: none;
  }
  .legend-short {
    display: inline;
  }
  .legend-dot {
    width: 8px;
    height: 8px;
    margin-right: 4px;
  }
  .result-note {
    flex: 0 0 auto;
    padding: 8px 12px;
  }
  .store-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 0;
    -webkit-overflow-scrolling: touch;
  }
  .store-row {
    min-height: 56px;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
  }
  .store-row:hover,
  .store-row.active {
    border-color: var(--line);
    background: var(--soft);
  }
  .store-row .name-line {
    gap: 6px;
  }
  .store-row .name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 800;
  }
  .store-row .selection-note {
    font-size: 12px;
  }
  .store-row .meta {
    align-items: baseline;
    font-size: 12px;
  }
  .empty-state {
    padding: 18px 12px;
  }
  .empty-actions button {
    min-height: 44px;
  }
  .disclaimer {
    flex: 0 0 auto;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
  }
  .maplibregl-ctrl-top-left {
    top: calc(max(12px, env(safe-area-inset-top)) + 108px);
    left: 12px;
  }
  #locator.product-panel-open .maplibregl-ctrl-top-left {
    top: calc(max(12px, env(safe-area-inset-top)) + 248px);
  }
  .maplibregl-ctrl-bottom-right {
    right: 8px;
    bottom: 8px;
  }
  .store-card {
    position: static;
    flex: 1;
    width: 100%;
    max-height: none;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
  }
  .store-card[hidden] {
    display: none;
  }
  .store-card header {
    padding: 0 14px 12px;
  }
  .store-card .close {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0 0 4px -8px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-weight: 800;
  }
  .store-card h2 {
    margin: 0 0 4px;
    font-size: 22px;
  }
  .store-card .address,
  .store-card .distance-line {
    font-size: 14px;
  }
  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }
  .card-actions a {
    min-height: 44px;
    width: 100%;
  }
  .product-search {
    min-height: 44px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 359px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .map-loading-skeleton,
  .skeleton-control,
  .skeleton-filters span,
  .skeleton-count,
  .skeleton-rows span {
    animation: none;
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .mobile-sheet {
    transition-duration: 0ms;
  }
}
