/* The listings map. Tokens come from style.css (:root); this file only
   dresses the map page and the pin card. Mobile first, one thumb. */

.mapshell { border-top: 1px solid var(--line); }
.mapbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; padding: 22px 0 16px; }
.mapbar-lead h1 { margin: 2px 0 0; font-size: clamp(26px, 4.6vw, 40px); }
.mapbar-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.mchips { display: flex; gap: 6px; background: var(--cream, #FFF3D9); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.mchip { border: 0; background: transparent; font: 600 13.5px/1 var(--sans, Inter, sans-serif); color: var(--clay, #4A5A72);
         padding: 10px 14px; min-height: 40px; border-radius: 999px; cursor: pointer; }
.mchip[aria-pressed="true"] { background: var(--ink, #1E2E44); color: #fff; }

.mlist-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
              background: var(--ink, #1E2E44); color: #fff; font: 600 14px/1 var(--sans, Inter, sans-serif); text-decoration: none; }
.mlist-pill:hover { background: var(--pop, #2A5F96); }

.mapstage { position: relative; }
#rosemap { width: 100%; height: calc(100dvh - var(--map-top, 210px)); min-height: 420px; background: var(--cream, #FFF3D9); }
@supports not (height: 100dvh) { #rosemap { height: calc(100vh - var(--map-top, 210px)); } }
/* the basemap wears the house palette: warm it, quiet it */
#rosemap canvas { filter: saturate(0.82) sepia(0.05) contrast(0.98); }

.mapload { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; justify-items: center;
           background: var(--cream, #FFF3D9); color: var(--clay, #4A5A72); font: 500 14px/1.4 var(--sans, Inter, sans-serif);
           transition: opacity .4s; z-index: 3; }
.mapload span { width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--pop, #2A5F96);
                border-radius: 50%; animation: maploadspin 0.9s linear infinite; }
@keyframes maploadspin { to { transform: rotate(360deg); } }
.mapload.off { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .mapload span { animation: none; } }

.mapcount { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 4; margin: 0;
            background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
            font: 600 13px/1 var(--sans, Inter, sans-serif); color: var(--ink, #1E2E44);
            box-shadow: 0 6px 18px rgba(30,46,68, 0.08); white-space: nowrap; }

.mapnotice { position: absolute; left: 10px; bottom: 10px; z-index: 4; max-width: min(78vw, 460px);
             background: rgba(255,251,242, 0.92); border: 1px solid var(--line); border-radius: 10px;
             padding: 7px 10px; font: 400 10.5px/1.45 var(--sans, Inter, sans-serif); color: var(--clay, #4A5A72); }
.mapnotice span { display: block; opacity: 0.85; }

.mapnojs { position: absolute; inset: 0; display: grid; place-content: center; background: var(--cream); z-index: 5;
           font: 400 16px/1.5 var(--sans, Inter, sans-serif); padding: 24px; text-align: center; }

/* ── the pin card ─────────────────────────────────────────────────────── */
.mapcard { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 18px;
           box-shadow: 0 18px 48px rgba(30,46,68, 0.18); overflow: hidden; width: min(360px, calc(100vw - 24px)); }
/* phone: docked above the bottom, thumb reach; desktop: floats by the pin bar */
.mapcard { left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .mapcard { left: auto; right: 26px; bottom: 26px; transform: none; } }
.mapcard-photo { aspect-ratio: 3 / 2; background: var(--blush, #FFF3D9); position: relative; }
.mapcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mapcard-status { position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, 0.94); color: var(--ink);
                  font: 600 11px/1 var(--sans, Inter, sans-serif); letter-spacing: 0.04em; text-transform: uppercase;
                  border-radius: 999px; padding: 7px 10px; }
.mapcard-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; border-radius: 50%;
             background: rgba(255, 255, 255, 0.94); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.mapcard-body { padding: 14px 16px 16px; }
.mapcard-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mapcard-price { margin: 0; font: 600 22px/1.1 var(--serif, Fraunces, Georgia, serif); color: var(--ink); }
.mapcard-mark img { height: 15px; width: auto; display: block; }
.mapcard-addr { margin: 6px 0 2px; font: 500 14.5px/1.35 var(--sans, Inter, sans-serif); color: var(--ink); }
.mapcard-meta { margin: 0 0 8px; font: 400 13px/1.4 var(--sans, Inter, sans-serif); color: var(--clay); }
.mapcard-courtesy { margin: 0 0 12px; font: 400 11.5px/1.45 var(--sans, Inter, sans-serif); color: var(--clay); }
.mapcard-go { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px;
              background: var(--pop, #2A5F96); color: #fff; text-decoration: none;
              font: 600 14.5px/1 var(--sans, Inter, sans-serif); }
.mapcard-go:hover { background: var(--rose-deep, #2A5F96); }

/* ── the Map pill on /homes ───────────────────────────────────────────── */
.map-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; margin-top: 12px;
            border-radius: 999px; background: var(--ink, #1E2E44); color: #fff; text-decoration: none;
            font: 600 14px/1 var(--sans, Inter, sans-serif); }
.map-pill:hover { background: var(--pop, #2A5F96); }
@media (max-width: 899px) {
  .map-pill { position: fixed; z-index: 55; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%;
              transform: translateX(-50%); margin: 0; box-shadow: 0 10px 30px rgba(30,46,68, 0.28); padding: 0 22px; min-height: 48px; }
}

/* the hub's words, carried onto the map, with the exit */
.maphubchips { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); z-index: 4; }
.maphub-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--ink, #1E2E44); color: #fff;
               border-radius: 999px; padding: 9px 10px 9px 16px; font: 600 13px/1 var(--sans, Inter, sans-serif);
               box-shadow: 0 6px 18px rgba(30,46,68, 0.16); white-space: nowrap; }
.maphub-x { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
            background: rgba(255, 255, 255, 0.16); color: #fff; text-decoration: none; font-size: 15px; }
.maphub-x:hover { background: var(--pop, #2A5F96); }

/* ── the filter panel ─────────────────────────────────────────────────── */
.mfilters-pill { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
                 border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer;
                 font: 600 14px/1 var(--sans, Inter, sans-serif); color: var(--ink, #1E2E44); }
.mtools-break { display: none; }
.mtools-chips { display: contents; }   /* desktop: the wrapper vanishes from layout */
.mfilters-pill:hover { border-color: var(--pop, #2A5F96); color: var(--pop, #2A5F96); }
.mfilters-pill em { font-style: normal; min-width: 0; }
.mfilters-pill.on em { background: var(--pop, #2A5F96); color: #fff; border-radius: 999px;
                       min-width: 20px; height: 20px; display: grid; place-items: center;
                       font-size: 12px; padding: 0 5px; }
.mapfilters { position: absolute; z-index: 58; background: #fff; border: 1px solid var(--line);
              display: none; flex-direction: column; gap: 14px; }
.mapfilters.open { display: flex; }
/* phone: a bottom sheet in thumb reach; desktop: a card by the toolbar */
@media (max-width: 899px) {
  .mapfilters { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 18px 18px 0 0;
                padding: 16px 16px calc(14px + env(safe-area-inset-bottom)); gap: 12px;
                box-shadow: 0 -14px 44px rgba(30,46,68, 0.22); }
}
@media (min-width: 900px) {
  .mapfilters { top: 12px; right: 58px; width: 320px; border-radius: 16px; padding: 18px;
                box-shadow: 0 16px 44px rgba(30,46,68, 0.16); }
}
.mf-head { display: flex; align-items: center; justify-content: space-between; }
.mf-head strong { font: 600 15px/1 var(--sans, Inter, sans-serif); color: var(--ink); padding-left: 2px; }
.mf-x { width: 44px; height: 44px; margin: -10px -12px -10px 0; border: 0; background: none;
        font-size: 22px; color: var(--clay, #4A5A72); cursor: pointer; }
.mf-field { display: flex; flex-direction: column; gap: 6px; padding-left: 2px;
            font: 600 12.5px/1 var(--sans, Inter, sans-serif); color: var(--clay, #4A5A72); }
.mf-field select { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px;
                   font: 500 15px/1.2 var(--sans, Inter, sans-serif); color: var(--ink); background: #fff; }
.mf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mf-beds { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mf-beds span { font: 600 12.5px/1 var(--sans, Inter, sans-serif); color: var(--clay, #4A5A72); }
.mbed { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px;
        background: #fff; font: 600 14px/1 var(--sans, Inter, sans-serif); color: var(--ink); cursor: pointer; }
.mbed[aria-pressed="true"] { background: var(--ink, #1E2E44); border-color: var(--ink, #1E2E44); color: #fff; }
.mf-clear { min-height: 44px; border: 0; border-radius: 10px; background: var(--cream, #FFF3D9);
            font: 600 13.5px/1 var(--sans, Inter, sans-serif); color: var(--clay, #4A5A72); cursor: pointer; }
.mf-clear:hover { color: var(--pop, #2A5F96); }

/* ── phone toolbar: two deliberate lines (Eric, 2026-09-01, second pass) ──
   Line one is the status chips alone; the break span forces the wrap; line
   two is the view toggle, then List, then Filters as a knobs icon. Measured
   facts behind the numbers: this page's .wrap pads 0 on phones (the eyebrow
   sat at x=0), so the bar pads itself; and the pill's 8px flex-gap against
   the zero-width count badge skewed the icon 8px left, so the gap goes. */
@media (max-width: 899px) {
  .mapbar { padding-left: 14px; padding-right: 14px; }
  .mapbar-tools { row-gap: 10px; }
  .mtools-chips { display: contents; }
  .mchips { order: 1; }
  .mtools-break { display: block; order: 2; flex-basis: 100%; height: 0; }
  .mchips.mview { order: 3; }
  .mlist-pill { order: 4; }
  .mfilters-pill { order: 5; width: 44px; padding: 0; gap: 0; justify-content: center; }
  .mfp-word { display: none; }
  .mfilters-pill.on em { position: absolute; top: -5px; right: -5px; }
}
/* The sheet's selects: WebKit ignores author padding on a native-appearance
   <select> (and reports 0), which is why the option text hugged the left
   edge on phones. Draw it ourselves: no native chrome, our chevron, real
   padding. Same move .msort makes on /homes. */
.mapfilters .mf-field select {
  -webkit-appearance: none; appearance: none;
  padding: 0 34px 0 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234A5A72' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 8px;
}
