/* Mobile map results must use the full content width. */
@media (max-width: 720px) {
  .dashboard.business-map-results-mode:not(.board-mode):not(.detail-mode),
  .dashboard.search-results-mode:not(.board-mode):not(.detail-mode) {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
  }

  .dashboard.business-map-results-mode:not(.board-mode):not(.detail-mode) .result-panel,
  .dashboard.business-map-results-mode:not(.board-mode):not(.detail-mode) .section-head,
  .dashboard.business-map-results-mode:not(.board-mode):not(.detail-mode) .results,
  .dashboard.business-map-results-mode:not(.board-mode):not(.detail-mode) .massage-map-results,
  .dashboard.business-map-results-mode:not(.board-mode):not(.detail-mode) .massage-map-result-section,
  .dashboard.business-map-results-mode:not(.board-mode):not(.detail-mode) .massage-map-listing-list,
  .dashboard.business-map-results-mode:not(.board-mode):not(.detail-mode) .massage-map-listing-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none;
    align-self: stretch;
    margin-right: 0;
    margin-left: 0;
  }

  .dashboard.search-results-mode:not(.board-mode):not(.detail-mode) .result-panel,
  .dashboard.search-results-mode:not(.board-mode):not(.detail-mode) .section-head,
  .dashboard.search-results-mode:not(.board-mode):not(.detail-mode) .results {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none;
    align-self: stretch;
    margin-right: 0;
    margin-left: 0;
  }

  .dashboard.business-map-results-mode:not(.board-mode):not(.detail-mode) .result-panel {
    padding-right: 12px;
    padding-left: 12px;
  }

  .dashboard.search-results-mode:not(.board-mode):not(.detail-mode) .result-panel {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* Restaurant map directory: compact ranked cards with cuisine filters. */
.food-map-directory {
  align-content:start;
  grid-template-rows:auto auto;
  gap:10px;
}
.food-map-cuisine-filter {
  display:flex;
  align-self:start;
  box-sizing:border-box;
  width:100%;
  height:40px;
  min-height:40px;
  max-height:40px;
  flex:0 0 40px;
  gap:6px;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  padding:2px 1px 6px;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.food-map-cuisine-filter::-webkit-scrollbar { display:none; }
.food-map-cuisine-filter button {
  flex:0 0 auto;
  min-height:32px;
  border:1px solid #dfd2c8;
  border-radius:999px;
  padding:0 11px;
  background:#fffdf9;
  color:#4f4540;
  font-size:10px;
  font-weight:850;
  white-space:nowrap;
}
.food-map-cuisine-filter button.active { border-color:#6f1730; background:#6f1730; color:#fff; }
.food-map-compact-list { gap:5px; }
.massage-map-listing-card.is-food-compact,
.massage-map-listing-card.is-food-compact.has-top-image {
  position:relative;
  grid-template-columns:64px minmax(0,1fr);
  min-height:68px;
  gap:9px;
  border-color:#e7d9d1;
  border-radius:11px;
  padding:5px;
  background:#fffdf9;
}
.massage-map-listing-card.is-food-compact:hover,
.massage-map-listing-card.is-food-compact:focus-within,
.massage-map-listing-card.is-food-compact.is-selected { border:2px solid #6f1730; padding:4px; background:#fff9f7; }
.massage-map-listing-card.is-food-compact .massage-map-listing-thumb,
.massage-map-listing-card.is-food-compact.has-top-image .massage-map-listing-thumb {
  position:relative;
  width:64px;
  height:56px;
  border-radius:9px;
}
.massage-map-listing-card.is-food-compact .massage-map-listing-thumb b {
  position:absolute;
  right:3px;
  bottom:3px;
  display:grid;
  width:19px;
  height:19px;
  place-items:center;
  border-radius:50%;
  background:#6f1730;
  color:#fff;
  font-size:9px;
}
.business-map-thumb-image[hidden] { display:none!important; }
.massage-map-listing-card.is-food-compact .massage-map-listing-copy { position:relative; align-content:center; padding-right:45px; }
.massage-map-listing-card.is-food-compact .massage-map-listing-copy > small { color:#8c6c61; font-size:8px; }
.massage-map-listing-card.is-food-compact .massage-map-listing-copy > strong { color:#292421; font-size:13px; }
.massage-map-listing-card.is-food-compact .massage-map-listing-copy > span:not(.massage-map-listing-actions) { color:#554a45; font-size:9px; font-weight:700; }
.massage-map-listing-card.is-food-compact .massage-map-listing-actions { display:none; }
.food-map-promoted { position:absolute; top:0; right:0; border-radius:999px; padding:3px 7px; background:#6f1730; color:#fff; font-size:7px; font-style:normal; font-weight:900; letter-spacing:.04em; }
.food-map-filter-empty { margin:0; border:1px dashed #dfd2c8; border-radius:10px; padding:18px 10px; color:#80736c; font-size:11px; text-align:center; }
.food-map-filter-empty[hidden],.massage-map-listing-card[hidden] { display:none!important; }
/*
 * Keep the complete uploaded cover visible in every map-directory category.
 * The compact mobile restaurant rows intentionally retain their square thumbs.
 */
.massage-map-results .massage-map-listing-card.has-top-image:not(.is-food-compact) .massage-map-listing-thumb {
  display:block;
  height:auto;
  background:#f5ece7;
}
.massage-map-results .massage-map-listing-card.has-top-image:not(.is-food-compact) .business-map-thumb-image {
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  object-position:center;
}
@media (max-width:720px) {
  .map-my-location { top:56px; right:8px; width:38px; padding:0; justify-content:center; }
  .map-my-location b { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .food-map-cuisine-filter { margin:0 -2px; }
}
html[data-theme="dark"] .food-map-cuisine-filter button { border-color:#45404a; background:#242126; color:#eee7e3; }
html[data-theme="dark"] .food-map-cuisine-filter button.active { border-color:#b85b76; background:#7b2941; color:#fff; }
html[data-theme="dark"] .massage-map-listing-card.is-food-compact { border-color:#403a40; background:#1d1b1f; }
html[data-theme="dark"] .massage-map-listing-card.is-food-compact.is-selected { border-color:#c66b84; background:#272027; }
html[data-theme="dark"] .massage-map-listing-card.is-food-compact .massage-map-listing-copy > strong { color:#f4efec; }
html[data-theme="dark"] .massage-map-listing-card.is-food-compact .massage-map-listing-copy > span:not(.massage-map-listing-actions) { color:#c9c0bc; }
html[data-theme="dark"] .map-my-location { border-color:#4a444b; background:rgba(29,27,31,.96); color:#f4efec; }
html[data-theme="dark"] .business-coupon-register { border-color:#4e3b43; background:#1d1a1f; }
html[data-theme="dark"] .business-coupon-toggle strong { color:#f1c3d0; }
html[data-theme="dark"] .business-coupon-toggle small { color:#bdb4b8; }
html[data-theme="dark"] .business-coupon-fields { border-color:#44363c; }
html[data-theme="dark"] .business-coupon-card { border-color:#765a34; background:linear-gradient(135deg,#292217,#211c1f); }
html[data-theme="dark"] .business-coupon-card > span { color:#ddb979; }
html[data-theme="dark"] .business-coupon-card h5 { color:#f3c7d3; }
html[data-theme="dark"] .business-coupon-card p,
html[data-theme="dark"] .business-coupon-card small { color:#d8c9b2; }

/* Mobile full-screen map explorer. Reuses the live map and result panels. */
.mobile-map-fullscreen-button,
.mobile-map-explorer { display:none; }

@media (max-width:720px) {
  .mobile-map-fullscreen-button {
    position:absolute;
    right:8px;
    bottom:10px;
    z-index:8;
    display:flex;
    min-width:66px;
    height:38px;
    align-items:center;
    justify-content:center;
    gap:5px;
    border:1px solid rgba(111,23,48,.24);
    border-radius:999px;
    padding:0 13px;
    background:rgba(255,253,249,.96);
    color:#6f1730;
    box-shadow:0 5px 16px rgba(37,25,31,.18);
    font-size:12px;
    font-weight:900;
    backdrop-filter:blur(8px);
  }
  .mobile-map-fullscreen-button span { font-size:17px; line-height:1; }
  .mobile-map-explorer {
    position:fixed;
    inset:0;
    z-index:10020;
    grid-template-rows:58px minmax(0,1fr);
    background:#f6f2ed;
  }
  .mobile-map-explorer[aria-hidden="false"] { display:grid; }
  body.mobile-map-explorer-open { overflow:hidden!important; overscroll-behavior:none; }
  .mobile-map-explorer-header {
    display:grid;
    grid-template-columns:38px minmax(0,1fr) 38px;
    align-items:center;
    gap:7px;
    border-bottom:1px solid #e2d8d1;
    padding:8px 10px;
    background:#17161a;
    box-shadow:0 2px 12px rgba(0,0,0,.18);
  }
  .mobile-map-explorer-header > button {
    display:grid;
    width:38px;
    height:38px;
    place-items:center;
    border:0;
    border-radius:50%;
    padding:0;
    background:#29272d;
    color:#fff;
    font-size:27px;
    line-height:1;
  }
  #mobileMapExplorerSearchForm {
    display:grid;
    grid-template-columns:minmax(0,1fr) 52px;
    overflow:hidden;
    border:1px solid #403c44;
    border-radius:999px;
    background:#242228;
  }
  #mobileMapExplorerSearchInput {
    width:100%;
    min-width:0;
    height:38px;
    border:0;
    outline:0;
    padding:0 14px;
    background:transparent;
    color:#fff;
    font-size:13px;
  }
  #mobileMapExplorerSearchInput::placeholder { color:#aaa4ad; }
  #mobileMapExplorerSearchForm button {
    border:0;
    border-left:1px solid #403c44;
    background:#6f1730;
    color:#fff;
    font-size:11px;
    font-weight:900;
  }
  .mobile-map-explorer-content {
    position:relative;
    display:block;
    --mobile-map-sheet-height:18%;
    min-height:0;
    overflow:hidden;
  }
  .mobile-map-explorer-content > .map-panel,
  .mobile-map-explorer-content > .result-panel {
    display:block!important;
    align-self:stretch!important;
    height:100%!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    box-sizing:border-box;
  }
  .mobile-map-explorer-content > .map-panel {
    position:absolute!important;
    inset:0;
    z-index:1;
    padding:0!important;
    background:#dce9e7;
  }
  .mobile-map-explorer-content .business-map-wrap,
  .mobile-map-explorer-content .business-map { height:100%!important; min-height:100%!important; border-radius:0!important; }
  .mobile-map-explorer-content .mobile-map-fullscreen-button { display:none; }
  .mobile-map-explorer-content .map-my-location { top:auto; right:12px; bottom:14px; width:42px; height:42px; }
  .mobile-map-explorer-content > .result-panel {
    position:absolute!important;
    right:0;
    bottom:0;
    left:0;
    z-index:12;
    height:var(--mobile-map-sheet-height)!important;
    max-height:82%!important;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    border-radius:18px 18px 0 0!important;
    padding:0 12px calc(24px + env(safe-area-inset-bottom))!important;
    background:#f6f2ed;
    box-shadow:0 -7px 24px rgba(22,17,20,.22)!important;
    transition:height .22s ease;
    -webkit-overflow-scrolling:touch;
  }
  .mobile-map-explorer-content.is-sheet-dragging > .result-panel { transition:none; }
  .mobile-map-sheet-handle {
    position:sticky;
    top:0;
    right:0;
    left:0;
    z-index:6;
    display:flex;
    flex:0 0 24px;
    height:24px;
    margin:0 -12px;
    align-items:center;
    justify-content:center;
    border:0;
    padding:0;
    background:transparent;
    touch-action:none;
    cursor:ns-resize;
    background:linear-gradient(to bottom, rgba(246,242,237,.98), rgba(246,242,237,.9));
  }
  .mobile-map-sheet-handle::before {
    width:42px;
    height:5px;
    border-radius:999px;
    background:#b8afb2;
    content:"";
  }
  .mobile-map-explorer-content > .result-panel .section-head {
    position:relative;
    top:auto;
    z-index:3;
    margin:0 -12px 8px;
    padding:8px 14px 10px;
    background:rgba(246,242,237,.96);
    backdrop-filter:blur(8px);
    touch-action:none;
    cursor:ns-resize;
    user-select:none;
  }
  /* The result panel is moved outside `.dashboard` while the full-screen map is
     open, so the dashboard-scoped business-search visibility rules no longer
     apply. Keep this sheet strictly focused on map businesses. */
  .mobile-map-explorer-content > .result-panel .board-search-form,
  .mobile-map-explorer-content > .result-panel .bookmark-category-tabs,
  .mobile-map-explorer-content > .result-panel .food-subcategory-filter,
  .mobile-map-explorer-content > .result-panel .board-result-promos,
  .mobile-map-explorer-content > .result-panel .daily-info-grid,
  .mobile-map-explorer-content > .result-panel .home-briefing,
  .mobile-map-explorer-content > .result-panel .home-trend-grid,
  .mobile-map-explorer-content > .result-panel .home-community-trends,
  .mobile-map-explorer-content > .result-panel .home-result-promos {
    display:none!important;
  }
  .mobile-map-explorer-content .massage-map-listing-list { overflow:visible!important; max-height:none!important; }
  .mobile-map-explorer-content .food-map-cuisine-filter {
    position:relative;
    top:auto;
    z-index:7;
    margin:0 -12px 8px;
    padding:7px 12px 9px;
    background:rgba(246,242,237,.98);
    box-shadow:0 5px 9px rgba(39,25,30,.08);
    backdrop-filter:blur(8px);
  }
  .mobile-map-explorer-content > .result-panel.food-map-sheet-mode {
    display:flex!important;
    flex-direction:column;
    overflow:hidden;
  }
  .mobile-map-explorer-content > .result-panel.food-map-sheet-mode > .mobile-map-sheet-handle,
  .mobile-map-explorer-content > .result-panel.food-map-sheet-mode > .section-head {
    flex:0 0 auto;
  }
  .mobile-map-explorer-content > .result-panel.food-map-sheet-mode > #results {
    flex:1 1 auto;
    min-height:0;
    overflow:hidden;
  }
  .mobile-map-explorer-content .food-map-directory {
    display:flex;
    flex-direction:column;
    height:100%;
    min-height:0;
  }
  .mobile-map-explorer-content .food-map-listing-scroll {
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:0 0 calc(14px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling:touch;
  }
  .mobile-map-explorer-content .food-map-directory .massage-map-listing-list {
    display:grid!important;
    gap:6px!important;
  }
  .mobile-map-explorer-content .food-map-directory .massage-map-listing-card.is-food-compact {
    display:grid!important;
    grid-template-columns:74px minmax(0,1fr)!important;
    min-height:66px!important;
    width:100%!important;
  }
  html[data-theme="dark"] .mobile-map-explorer,
  html[data-theme="dark"] .mobile-map-explorer-content > .result-panel,
  html[data-theme="dark"] .mobile-map-explorer-content .food-map-cuisine-filter { background:#17161a; }
  html[data-theme="dark"] .mobile-map-explorer-content > .result-panel .section-head { background:rgba(23,22,26,.96); }
  html[data-theme="dark"] .mobile-map-sheet-handle::before { background:#77717b; }
  html[data-theme="dark"] .mobile-map-sheet-handle { background:linear-gradient(to bottom, rgba(23,22,26,.98), rgba(23,22,26,.9)); }
}
