  /* ===== MAP PAGE ===== */
  .maptop{position:sticky;top:69px;z-index:30;background:rgba(247,243,236,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--bruma)}
  .maptop-in{max-width:1600px;margin:0 auto;display:flex;align-items:center;gap:9px;padding:12px 24px;overflow-x:auto;scrollbar-width:none}
  .maptop-in::-webkit-scrollbar{display:none}
  .fchip{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:13px;font-weight:600;color:var(--tinta);
    background:var(--blanco);border:1px solid var(--bruma);border-radius:999px;padding:9px 15px;transition:.18s var(--ease)}
  .fchip:hover{border-color:var(--noir)}
  .fchip .ic{width:15px;height:15px;stroke:var(--gris)}
  .fchip.on{background:var(--noir);color:#fff;border-color:var(--noir)}.fchip.on .ic{stroke:#fff}
  .fchip.gold .ic{stroke:var(--dorado-d)}
  .fcount{margin-left:auto;font-size:12.5px;color:var(--gris);white-space:nowrap;padding-left:12px;font-weight:500}

  .split{display:grid;grid-template-columns:43% 57%;height:calc(100vh - 118px);min-height:560px}
  .listpane{overflow-y:auto;overflow-x:hidden;border-right:1px solid var(--bruma);background:var(--arena)}
  .listpane::-webkit-scrollbar{width:9px}.listpane::-webkit-scrollbar-thumb{background:var(--bruma);border-radius:9px}
  /* Row 1: title + action icons (bookmark/share). Row 2: sort control below. */
  .lhead{display:flex;flex-direction:column;gap:12px;padding:18px 24px 8px}
  .lhead__top{display:flex;align-items:center;justify-content:space-between;gap:12px}
  .lhead h1{font-family:'Fraunces',serif;font-weight:500;font-size:20px;color:var(--noir)}
  .lhead__actions{display:flex;align-items:center;gap:8px;flex:none}
  .lhead__sort{display:flex}
  .licon{width:34px;height:34px;border-radius:50%;border:1px solid var(--bruma);background:var(--blanco);display:grid;place-items:center;cursor:pointer;transition:.18s var(--ease)}
  .licon:hover{border-color:var(--noir);transform:translateY(-1px)}
  .licon .ic{width:16px;height:16px;stroke:var(--noir)}
  .licon.gold:hover{border-color:var(--dorado-d)}.licon.gold .ic{stroke:var(--dorado-d)}
  .lgrid{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:8px 24px 28px}

  .mrow{background:var(--blanco);border:1px solid var(--bruma);border-radius:var(--r-m);overflow:hidden;cursor:pointer;transition:.22s var(--ease)}
  .mrow:hover,.mrow.hot{transform:translateY(-3px);box-shadow:var(--shadow);border-color:var(--bruma)}
  .mrow .ph{position:relative;aspect-ratio:16/10;overflow:hidden;background:var(--arena-2)}
  .mrow .ph .img{position:absolute;inset:0;transition:transform .6s var(--ease)}
  .mrow:hover .ph .img{transform:scale(1.06)}
  .mrow .ph .sheen{position:absolute;inset:0;background:linear-gradient(0deg,rgba(26,23,20,.26),transparent 55%)}
  .mrow .badge{position:absolute;top:10px;left:10px;font-size:9.5px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;padding:5px 9px;border-radius:999px;color:#fff;backdrop-filter:blur(3px)}
  .mrow .badge.signature{background:rgba(194,160,86,.96);color:#3a2f14}
  .mrow .badge.lifestyle{background:rgba(47,110,80,.94)}
  .mrow .badge.smart{background:rgba(110,154,126,.96)}
  .mrow .heart{position:absolute;top:9px;right:9px;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.9);display:grid;place-items:center;z-index:2;transition:.2s}
  .mrow .heart:hover{transform:scale(1.09)}.mrow .heart .ic{width:15px;height:15px;stroke:var(--noir)}
  .mrow .heart.liked .ic{fill:var(--jade);stroke:var(--jade)}
  .mrow .body{padding:12px 13px 14px}
  .mrow .loc{display:flex;align-items:center;gap:5px;font-size:11.5px;color:var(--gris);font-weight:500;margin-bottom:3px}
  .mrow .loc .ic{width:13px;height:13px;stroke:var(--gris)}
  .mrow .ttl{font-size:13.5px;font-weight:600;line-height:1.3;color:var(--tinta);margin-bottom:8px;min-height:35px}
  .mrow .meta{display:flex;gap:11px;font-size:11.5px;color:var(--gris);margin-bottom:9px}
  .mrow .meta span{display:flex;align-items:center;gap:4px}.mrow .meta .ic{width:13px;height:13px;stroke:var(--gris)}
  .mrow .pr{font-family:'Fraunces',serif;font-weight:500;font-size:17px;color:var(--noir);border-top:1px solid var(--bruma);padding-top:9px}

  /* z-index:0 keeps Leaflet's internal panes (markers 600, popups 700, controls 800) contained
     in this stacking context so they can't paint over the filter picker modal (z-index 200). */
  .mappane{position:relative;z-index:0;overflow:hidden;background:#0E211D}
  .mapcanvas{position:absolute;inset:0}
  /* Leaflet DivIcon: reset the default white box; the .pin anchors its bottom-centre at the point. */
  .leaflet-div-icon.scb-pin-wrap{background:transparent;border:0;width:0!important;height:0!important}
  /* width:max-content so the price pill sizes to its text — the Leaflet DivIcon wrapper is 0×0, which
     otherwise collapses the pill and clips the price ("R$ 800k" showing as a cut-off oval). */
  .pin{position:relative;width:max-content;transform:translate(-50%,-100%);z-index:3;cursor:pointer;border:none}
  /* No drop shadow on price pins — with many pins close together the stacked shadows look muddy.
     The 1.5px white border keeps each pin crisp against the map. */
  .pin .dot{display:flex;align-items:center;gap:5px;font-family:'Fraunces',serif;font-weight:500;font-size:13px;color:#fff;
    padding:6px 11px;border-radius:999px;white-space:nowrap;border:1.5px solid rgba(255,255,255,.28);transition:.16s var(--ease)}
  .pin.signature .dot{background:#C2A056;color:#2a2110;border-color:rgba(255,255,255,.5)}
  .pin.lifestyle .dot{background:#2F6E50}
  .pin.smart .dot{background:#6E9A7E}
  .pin:hover .dot,.pin.hot .dot{transform:scale(1.08);z-index:5}
  .pin:hover{z-index:6}
  /* Cluster pin: a round count badge with a subtle "stacked" ring. Click zooms into the group. */
  .pin.cluster .dot{justify-content:center;min-width:34px;height:34px;padding:0 9px;border-radius:999px;font-size:14px;font-weight:600;
    box-shadow:0 0 0 5px rgba(255,255,255,.22)}
  .pin.cluster.signature .dot{background:#C2A056;color:#2a2110}
  .pin.cluster.lifestyle .dot{background:#2F6E50}
  .pin.cluster.smart .dot{background:#6E9A7E}
  .pin.cluster.mixed .dot{background:#1f2a26}

  .popcard{position:absolute;z-index:8;width:230px;background:var(--blanco);border-radius:14px;overflow:hidden;box-shadow:0 22px 44px -18px rgba(0,0,0,.6);
    transform:translate(-50%,calc(-100% - 18px));pointer-events:none;opacity:0;transition:opacity .14s var(--ease);border:1px solid rgba(255,255,255,.5)}
  .popcard.show{opacity:1}
  .popcard .pimg{position:relative;aspect-ratio:16/9;background:var(--arena-2)}
  .popcard .pimg .img{position:absolute;inset:0}
  .popcard .pb{padding:10px 12px 12px}
  .popcard .pb .l{font-size:11px;color:var(--gris);font-weight:500;display:flex;align-items:center;gap:4px}.popcard .pb .l .ic{width:12px;height:12px;stroke:var(--gris)}
  .popcard .pb .t{font-size:12.5px;font-weight:600;color:var(--tinta);margin:2px 0 6px;line-height:1.3}
  .popcard .pb .p{font-family:'Fraunces',serif;font-weight:500;font-size:16px;color:var(--noir)}

  /* Leaflet popup styled as the SCB popcard (image · hood · title · price). */
  .leaflet-popup.scb-popwrap .leaflet-popup-content-wrapper{border-radius:14px;padding:0;overflow:hidden;box-shadow:0 22px 44px -18px rgba(0,0,0,.5);border:1px solid rgba(255,255,255,.6)}
  .leaflet-popup.scb-popwrap .leaflet-popup-content{margin:0;width:220px!important}
  /* No downward tip/pointer — the card floats cleanly above the pin. */
  .leaflet-popup.scb-popwrap .leaflet-popup-tip-container{display:none}
  .scb-pop{cursor:pointer;width:220px}
  .scb-pop .img{display:block;aspect-ratio:16/9;background:var(--arena-2)}
  .scb-pop .img img{width:100%;height:100%;object-fit:cover;display:block}
  .scb-pop .pb{padding:10px 12px 12px}
  .scb-pop .l{font-size:11px;color:var(--gris);font-weight:600;text-transform:uppercase;letter-spacing:.05em}
  .scb-pop .t{font-size:12.5px;font-weight:600;color:var(--tinta);margin:2px 0 6px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .scb-pop .p{font-family:'Fraunces',serif;font-weight:500;font-size:16px;color:var(--noir)}

  .legend{position:absolute;left:18px;bottom:18px;z-index:7;background:rgba(26,23,20,.82);backdrop-filter:blur(8px);border:1px solid rgba(194,160,86,.24);
    border-radius:14px;padding:12px 14px;color:#f0e7d3}
  .legend .lt{font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:rgba(240,231,211,.55);margin-bottom:8px}
  .legend .lr{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;padding:2px 0}
  .legend .sw{width:12px;height:12px;border-radius:4px;flex:none}

  /* Sort control in the list header — compact select styled to match the toolbar. */
  .scb-sort{display:flex;align-items:center;gap:8px;width:100%;font-size:13px;font-weight:600;color:var(--gris)}
  /* Label (icon + "Ordenar") on the left, the select pushed to the right. */
  .scb-sort__sel{margin-left:auto}
  /* Re-sort spinner: sits immediately to the left of the dropdown while the page navigates.
     When hidden it collapses and the select's own auto-margin keeps the layout intact. */
  .scb-sort__spin{margin-left:auto;flex:none}
  .scb-sort__spin:not([hidden]) + .scb-sort__sel{margin-left:0}
  .scb-sort .ic{width:14px;height:14px;stroke:var(--gris)}
  .scb-sort__lbl{white-space:nowrap}
  /* Match the .fchip filter pills: white pill, bruma border, custom chevron (consistent across OS). */
  .scb-sort__sel{font:inherit;font-size:13px;font-weight:600;color:var(--tinta);background:var(--blanco);border:1px solid var(--bruma);border-radius:999px;padding:7px 30px 7px 14px;cursor:pointer;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237C7468' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center}
  .scb-sort__sel:hover{border-color:var(--noir)}
  .scb-sort__sel:focus-visible{outline:2px solid var(--jade);outline-offset:2px}

  /* Mobile list/map toggle — hidden on desktop (panes are side by side there). */
  .mapswitch{display:none}
  .fchip--filters{position:relative}
  .scb-filters-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--dorado);color:var(--noir);font-size:11px;font-weight:800;line-height:18px}

  @media(max-width:900px){
    .split{grid-template-columns:1fr;height:auto}
    /* No bottom border: panes toggle one at a time (never stacked), so the list pane's last row
       sits directly above the footer — its own top border is the only separator we want there. */
    .listpane{border-right:none}
    .lgrid{grid-template-columns:1fr 1fr}
    .mappane{height:62vh}
    .maptop{top:0}
    /* One pane at a time on phones, driven by the toggle (default: list). */
    .mapswitch{display:flex;gap:8px;position:sticky;top:52px;z-index:29;padding:10px 24px;background:rgba(247,243,236,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--bruma)}
    .mapswitch__btn{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:9px 12px;border:1px solid var(--bruma);border-radius:999px;background:var(--blanco);font-size:13px;font-weight:700;color:var(--tinta)}
    .mapswitch__btn .ic{width:15px;height:15px;stroke:var(--gris)}
    .mapswitch__btn.on{background:var(--noir);color:#fff;border-color:var(--noir)}.mapswitch__btn.on .ic{stroke:#fff}
    .split.-showlist .mappane{display:none}
    .split.-showmap .listpane{display:none}
    .split.-showmap{min-height:0}
  }
  @media(max-width:560px){
    .lgrid{grid-template-columns:1fr}
    /* Mobile: action icons ABOVE the title (right-aligned), then the sort control on its own line. */
    .lhead h1{font-size:22px;line-height:1.15}
    .lhead__top{flex-direction:column-reverse;align-items:stretch;gap:10px}
    .lhead__actions{align-self:flex-end}
    .lhead__sort .scb-sort{width:100%;justify-content:flex-start}
  }
  @media (prefers-reduced-motion: reduce){*{animation-duration:.001ms!important;transition-duration:.001ms!important}}

/* AdvancedMarkerElement context: Google anchors the element, so drop the mockup's
   absolute positioning; keep the price-pin bubble + popcard visuals. */
.scb-advpin{position:static;transform:none}
.scb-advpin .dot{cursor:pointer}
.scb-advpop{position:static;transform:translateY(-52px);cursor:pointer;pointer-events:auto}
