/* ProFolio 5 goals — integrates with current compact property explorer */
.pf-goals{padding:12px 14px 10px;border-bottom:1px solid rgba(154,90,111,.17)}
.pf-goals>h2{font-size:10px;letter-spacing:.15em;font-weight:800;color:#815e6b;margin:0 0 9px}
.pf-goal-launches{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.pf-goal-launch{min-width:0;min-height:64px;padding:8px 3px;border:1px solid #e4dce0;background:linear-gradient(145deg,#fff,#fbf6f8);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;color:#421a31;transition:background .18s,transform .18s,border-color .18s}
.pf-goal-launch:hover,.pf-goal-launch:focus-visible,.pf-goal-launch[aria-pressed=true]{background:#fbebf1;border-color:#a64672;transform:translateY(-1px);outline-offset:2px}
.pf-goal-launch span{font-size:23px;line-height:23px;color:#a33265}
.pf-goal-launch b{font-size:9px;line-height:1.15;overflow-wrap:anywhere;text-align:center}
.pf-goal-dialog{border:0;max-width:min(640px,calc(100vw - 24px));width:100%;max-height:min(86vh,900px);padding:0;border-radius:22px;box-shadow:0 28px 90px #1c0d18a8;color:#2c1b28;overflow:auto}
.pf-goal-dialog::backdrop{background:rgba(17,10,19,.67);backdrop-filter:blur(5px)}
.pf-goal-sheet{background:linear-gradient(160deg,#fff,#fcf7f8);font-family:inherit}
.pf-goal-sheet-head{padding:24px 26px 18px;display:flex;justify-content:space-between;align-items:flex-start;gap:10px;border-bottom:1px solid #e8dde1}
.pf-goal-eyebrow{font-size:10px;font-weight:800;color:#9e4266;letter-spacing:.13em}
.pf-goal-sheet-head h2{font-size:26px;line-height:1.1;margin:8px 0;color:#3f1830}
.pf-goal-sheet-head p{font-size:13px;color:#645661;line-height:1.5;margin:8px 0 0}
.pf-goal-close{border:1px solid #dec8d2;background:#fff;border-radius:50%;height:38px;width:38px;min-width:38px;font-size:26px;cursor:pointer;color:#6b3650}
.pf-goal-sheet-content{padding:20px 26px 28px;display:grid;gap:14px}
.pf-goal-sheet-content h3{font-size:15px;margin:7px 0;color:#461f35}
.pf-goal-muted{font-size:12px;line-height:1.6;color:#6c5f68;margin:0}
.pf-goal-actions{display:flex;gap:9px;flex-wrap:wrap}
.pf-goal-action,.pf-goal-choices button{display:inline-flex;align-items:center;justify-content:center;text-align:center;border:1px solid #dbcbd2;border-radius:12px;padding:10px 13px;color:#57233c;background:#fff;font-size:12px;font-weight:700;text-decoration:none;cursor:pointer}
.pf-goal-action:hover,.pf-goal-action:focus-visible,.pf-goal-choices button:hover{border-color:#aa3b6b;background:#fff3f7}
.pf-goal-action--primary{background:#4d1835;color:#fff;border-color:#4d1835}
.pf-goal-action--primary:hover{background:#73274e;color:#fff}
.pf-goal-business{background:#fff;border:1px solid #eee2e7;border-radius:14px;padding:15px;margin:9px 0;display:grid;gap:9px}
.pf-goal-business h4{margin:0 0 4px;font-size:15px;color:#37192b}
.pf-goal-business p{margin:0;font-size:12px;color:#776773}
.pf-goal-card-actions{display:flex;gap:7px;flex-wrap:wrap}
.pf-goal-card-actions .pf-goal-action{padding:7px 11px;font-size:11px}
.pf-goal-search label,.pf-goal-note-label{font-size:12px;font-weight:700;color:#4b2a3e}
.pf-goal-search>div{display:flex;gap:8px;margin-top:6px}
.pf-goal-search input,.pf-goal-food-card textarea{width:100%;min-width:0;border:1px solid #dacbd2;border-radius:10px;padding:12px;font:inherit;font-size:14px;color:#321d29;background:#fff}
.pf-goal-search button{background:#591c3b;color:#fff;border:0;border-radius:10px;padding:10px 13px;font-weight:700;cursor:pointer}
.pf-goal-stars{display:flex;gap:4px}
.pf-goal-stars button{border:0;background:transparent;color:#b47512;font-size:26px;cursor:pointer;padding:2px}
.pf-goal-stars button:focus-visible{outline:2px solid #7e3154}
.pf-goal-food-card textarea{display:block;margin-top:7px;resize:vertical}
.pf-goal-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.pf-goal-choices button{display:flex;flex-direction:column;gap:4px;padding:18px 8px}
.pf-goal-choices strong{font-size:13px}
.pf-goal-choices small{font-size:10px;line-height:1.35;color:#7d6573}
.pf-goal-tags{display:flex;gap:7px;flex-wrap:wrap}
.pf-goal-tags button{border:1px solid #dfcbd4;background:#fff;border-radius:999px;padding:9px 12px;color:#5e2845;cursor:pointer;font-size:12px}
.pf-goal-tags button[aria-pressed=true]{background:#4d1835;color:#fff;border-color:#4d1835}
@media(max-width:640px){.pf-goals{padding:10px 11px}.pf-goal-launch{min-height:58px}.pf-goal-launch b{font-size:8px}.pf-goal-dialog{max-height:93dvh;margin:auto}.pf-goal-sheet-head{padding:19px 17px 15px}.pf-goal-sheet-content{padding:16px 17px 23px}.pf-goal-sheet-head h2{font-size:22px}.pf-goal-choices{grid-template-columns:1fr}.pf-goal-choices button{padding:12px}.pf-goal-search>div{flex-wrap:wrap}.pf-goal-search button{width:100%}}
@media(prefers-reduced-motion:reduce){.pf-goal-launch{transition:none}}

/* ProFolio module colors and property map */
.pf-goals {
  border-bottom-color: #352c44;
  background: linear-gradient(145deg, #181226, #27152c 55%, #111d31);
}
.pf-goals > h2 { color: #e9dbeb; }
.pf-goal-launch {
  --goal-accent: #8bddfa;
  --goal-surface: #13263b;
  color: #f9f5fc;
  background: var(--goal-surface);
  border-color: color-mix(in srgb, var(--goal-accent) 48%, var(--goal-surface));
}
.pf-goal-launch[data-goal="reports"] { --goal-accent: #f6a9d8; --goal-surface: #3a1834; }
.pf-goal-launch[data-goal="food"] { --goal-accent: #ffbc91; --goal-surface: #3b231d; }
.pf-goal-launch[data-goal="realestate"] { --goal-accent: #ffe078; --goal-surface: #332918; }
.pf-goal-launch[data-goal="agents"] { --goal-accent: #c8b7ff; --goal-surface: #272043; }
.pf-goal-launch span { color: var(--goal-accent); }
.pf-goal-launch:hover,
.pf-goal-launch:focus-visible,
.pf-goal-launch[aria-pressed="true"] {
  background: color-mix(in srgb, var(--goal-accent) 22%, var(--goal-surface));
  border-color: var(--goal-accent);
}
.pf-goal-launch:focus-visible { outline: 2px solid var(--goal-accent); }
body:is([data-map-view="properties"], [data-map-view="venta"], [data-map-view="arriendo"])
  .map-shell:not(.satellite) .leaflet-tile-pane {
  filter: brightness(.82) saturate(.72);
}
body:is([data-map-view="properties"], [data-map-view="venta"], [data-map-view="arriendo"]) .price-marker {
  background: #ffdc70;
  border-color: #322111;
  color: #241810;
  box-shadow: 0 2px 8px #21110665;
}
body:is([data-map-view="properties"], [data-map-view="venta"], [data-map-view="arriendo"]) .price-marker.selected {
  background: #352417;
  border-color: #ffe078;
  color: #fff0b5;
}

/* Mobile viewport and map controls */
@media (max-width: 650px) {
  body {
    --pf-header-height: calc(62px + env(safe-area-inset-top));
    --pf-rail-height: calc(60px + env(safe-area-inset-bottom));
    --pf-left: max(10px, env(safe-area-inset-left));
    --pf-right: max(10px, env(safe-area-inset-right));
  }

  .topbar {
    height: var(--pf-header-height);
    padding: env(safe-area-inset-top) var(--pf-right) 0 var(--pf-left);
  }

  .topbar .brand { flex-shrink: 1; }
  .topbar .brand .brand-word { white-space: nowrap; }
  .topbar .header-right { flex-shrink: 0; gap: 4px; }
  .topbar .publish-btn { min-height: 44px; white-space: nowrap; }
  .topbar .sign-in-entry,
  .topbar .settings-entry,
  .topbar .avatar { min-width: 36px; width: 36px; min-height: 44px; }
  .topbar .sign-in-entry { justify-content: center; }

  .workspace {
    height: calc(100dvh - var(--pf-header-height));
    padding-bottom: var(--pf-rail-height);
  }

  .rail {
    height: var(--pf-rail-height);
    padding: 4px var(--pf-right) env(safe-area-inset-bottom) var(--pf-left);
  }

  .rail .rail-btn { flex: 1 1 0; min-width: 0; min-height: 50px; }
  .workspace .discovery {
    bottom: var(--pf-rail-height);
    left: var(--pf-left);
    right: var(--pf-right);
    max-height: calc(100% - var(--pf-rail-height) - 100px);
    overscroll-behavior-y: contain;
  }

  .map-shell #destination-launch,
  .map-shell #map-inline-results {
    left: var(--pf-left);
    right: var(--pf-right);
    width: auto;
  }

  .map-shell #destination-launch { min-height: 56px; }
  .map-shell #destination-launch #map-inline-query { font-size: 16px; }
  .map-shell #destination-launch button,
  .map-shell #destination-launch #map-voice-lang { height: 44px; }
  .map-shell #destination-launch #map-inline-mic { width: 44px; }
  .map-shell #destination-launch[data-voice-state] { padding-bottom: 23px; }
  .map-shell:has(#destination-launch[data-voice-state]) #map-inline-results { top: 91px; }

  .map-shell .map-view-root { top: 92px; right: var(--pf-right); }
  .map-shell .map-view-trigger,
  .map-shell .map-quick-report { min-height: 44px; }
  .map-shell .map-quick-report { right: var(--pf-right); }
  .map-shell .map-view-menu {
    width: min(326px, calc(100vw - var(--pf-left) - var(--pf-right)));
    max-height: min(70dvh, calc(100dvh - var(--pf-header-height) - var(--pf-rail-height) - 148px));
  }

  .map-shell.list-hidden .map-controls { bottom: 26px; right: var(--pf-right); }
  .map-shell .leaflet-control-attribution { max-width: calc(100vw - 20px); }
  .pf-goals .pf-goal-launch b { font-size: clamp(9px, 2.6vw, 11px); }
  body .pfu-panel { padding-bottom: env(safe-area-inset-bottom); overscroll-behavior: contain; }
  body .pf-live-dialog,
  body .pf-goal-dialog {
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
    overscroll-behavior: contain;
  }
}

@media (max-width: 360px) {
  .topbar .brand .brand-word { font-size: 18px !important; }
  .topbar .brand { gap: 4px; }
  .topbar .publish-btn { padding-inline: 7px; }
  .topbar .header-right { gap: 3px; }
}

@media (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
  .workspace { min-height: 0; }
  .map-shell .map-view-root { top: 73px; }
  .map-shell .map-view-menu { max-height: calc(100% - 8px + 28dvh); }
  .map-shell .map-quick-report { top: 123px; }
  .map-shell.list-hidden .map-controls { bottom: 18px; }
}

@media (max-width: 345px) {
  .topbar .publish-btn { font-size: 0; gap: 0; min-width: 36px; justify-content: center; }
}

@media (max-width: 650px) and (max-height: 500px) {
  .topbar .brand .brand-word small { display: none; }
}

@media (max-width: 650px) and (max-height: 500px) and (orientation: landscape) {
  .map-shell #destination-launch { right: calc(var(--pf-right) + 106px); }
  .map-shell .map-view-root { top: 13px; }
  .map-shell .map-quick-report { top: 65px; }
  .map-shell .map-view-menu {
    max-height: calc(100dvh - var(--pf-header-height) - var(--pf-rail-height) - 70px);
  }
}

/* A navy canvas with the accent colors from the ProFolio brand references. */
:root {
  --ink: #f8faff;
  --muted: #aebcda;
  --lime: #ffe15c;
  --cream: #101426;
  --line: #303951;
  --wine: #151a30;
  --raised: #202741;
  --deep: #101426;
  --green: #ffe15c;
  --pf-accent-blue: #73d6ff;
  --pf-accent-pink: #ff7ec8;
}
.topbar {
  background: linear-gradient(105deg, #111526 15%, #191a33 72%, #251a38);
  border-bottom-color: #303951;
}
.brand .brand-word { color: #f8faff; }
.topbar .demo-pill { background: #242b47; color: var(--muted); }
.topbar .publish-btn, body .primary {
  background: #ffe15c;
  color: #17172a;
  border-color: #ffe15c;
  font-weight: 800;
}
.topbar .publish-btn:hover, body .primary:hover { background: #fff0a2; }
.topbar .sign-in-entry, .topbar .settings-entry, .topbar .avatar {
  background: #202741;
  border-color: #414a67;
  color: #eef1ff;
}
.workspace .rail {
  border-color: #303951;
  background: #101426;
}
.rail .rail-btn { color: #aebcda; }
.rail .rail-btn.active {
  color: #ffda63;
  background: #27304c;
}
.rail .rail-btn.active:before { background: #ffda63; }
.workspace .discovery {
  background: #151a30;
  border-color: #343b59;
  scrollbar-color: #596687 #151a30;
}
.discovery .panel-top h1 { letter-spacing: -.055em; }
.discovery .panel-top p, .discovery .sidebar-foot { color: var(--muted); }
.discovery .search,
.discovery .operation-tabs,
.discovery .filter-row button,
.discovery .results-heading > button {
  background: #202741;
  border-color: #414a67;
  color: #e7edff;
}
.discovery .search input::placeholder, .discovery .search > span { color: #aebcda; }
.discovery .search button, .discovery .operation-tabs button.active {
  background: #ffe15c;
  color: #17172a;
}
.discovery .property-card, .discovery .place-card {
  background: #1d2540;
  border: 1px solid #36405e;
  border-radius: 17px;
  box-shadow: 0 9px 24px #090b1b33;
}
.discovery .property-address, .discovery .property-stats,
.discovery .price-row small, .discovery .card-bottom > span { color: #bac6e2; border-color: #414a67; }

.pf-goals {
  background: transparent;
  border-color: #303951;
  padding-inline: 0;
}
.pf-goals > h2 { color: #b9c5e3; }
.pf-goal-launches { gap: 6px; }
.pf-goal-launch {
  border-radius: 14px;
  background: linear-gradient(150deg, var(--goal-surface), #1b223a);
  border-color: color-mix(in srgb, var(--goal-accent) 34%, #26304b);
}
.pf-goal-launch span { font-size: 22px; }
.pf-goal-launch[data-goal="search"] { --goal-accent: #73d6ff; --goal-surface: #14324d; }
.pf-goal-launch[data-goal="reports"] { --goal-accent: #ff7ec8; --goal-surface: #452541; }
.pf-goal-launch[data-goal="food"] { --goal-accent: #ffa986; --goal-surface: #413044; }
.pf-goal-launch[data-goal="realestate"] { --goal-accent: #ffe15c; --goal-surface: #3b3440; }
.pf-goal-launch[data-goal="agents"] { --goal-accent: #b8a7ff; --goal-surface: #302a53; }

#map { background: #182239; }
#map .maplibregl-canvas { pointer-events: none; }
.map-shell:not(.satellite) .leaflet-tile {
  filter: saturate(.72) contrast(.98);
}
body:is([data-map-view="properties"], [data-map-view="venta"], [data-map-view="arriendo"])
  .map-shell.vector-basemap .leaflet-tile-pane { filter: none; }
.map-shell .price-marker {
  border-color: #182133;
  background: #ffe15c;
  color: #17172a;
}
.map-shell .price-marker.selected {
  background: #182133;
  border-color: #ffe15c;
  color: #fff2a8;
}
.map-shell .leaflet-control-attribution {
  background: #11182de8;
  color: #e7edff;
}
.map-shell .leaflet-control-attribution a { color: #8bdbff; }
.map-shell #destination-launch,
.map-shell #map-inline-results,
.map-shell .map-view-trigger,
.map-shell .map-view-menu,
.map-shell .map-controls > button,
.map-shell .zoom-buttons {
  background: #151e35;
  border-color: #465675;
  color: #f4f7ff;
  box-shadow: 0 8px 24px #090c1c55;
}
.map-shell #destination-launch #map-inline-query,
.map-shell #destination-launch #map-inline-query::placeholder {
  color: #edf3ff;
}
.map-shell #destination-launch .inline-search-icon,
.map-shell #destination-launch #map-voice-status,
.map-shell .map-view-chevron { color: #9bdcff; }
.map-shell #destination-launch #map-voice-lang,
.map-shell #destination-launch .inline-submit {
  background: #253451;
  border-color: #465675;
  color: #def2ff;
}
.map-shell #destination-launch #map-inline-mic { color: #fff; }
.map-shell .map-quick-report {
  background: #452542;
  border-color: #a7608d;
  color: #ffdeef;
}
.map-shell .map-quick-report > span { background: #ff9dd4; color: #382036; }
.map-shell .map-view-header small,
.map-shell .map-view-options button small { color: #bbc9e6; }
.map-shell .map-view-options button,
.map-shell .map-view-extra button,
.map-shell .map-view-header button {
  background: #202b45;
  border-color: #3b4968;
  color: #f4f7ff;
}
.map-shell .map-view-options button.selected {
  background: #303952;
  border-color: #ffe15c;
}
.map-shell .map-view-options .view-symbol,
.map-shell .map-view-options .view-check { color: #ffe15c; }
.map-shell .map-view-menu .map-style { color: #f4f7ff; }
.map-shell .detail-panel, .map-shell #route-panel, #modal {
  background: #151a30;
  border-color: #414a67;
  color: #f8faff;
}
body button:focus-visible, body a:focus-visible { outline-color: #73d6ff; }
@media (max-width: 650px) {
  .workspace .discovery:before { background: #778ab4; }
  .pf-goal-launches { gap: 4px; }
}

/* ProFolio's fuchsia accents live on the interface, clear of the map labels. */
:root {
  --pf-glow: #ff62b8;
  --pf-fuchsia: #821652;
  --pf-control-surface: #201b36;
}
.topbar {
  background:
    radial-gradient(ellipse at 16% -35%, #982361b0, transparent 57%),
    linear-gradient(108deg, #1c1531, #17192f 70%, #321b3b);
  border-bottom-color: #644061;
}
.topbar .brand-original-symbol { box-shadow: 0 0 18px #ff62b84a; }
.topbar .brand .brand-word small { color: #ffb0de; }
.workspace .discovery {
  background:
    radial-gradient(ellipse at 12% 0%, #6d235f7a, transparent 40%),
    linear-gradient(153deg, #231932 4%, #181a30 72%);
  border-color: #533759;
}
.workspace .rail {
  background: linear-gradient(155deg, #2b1838, #17182d 68%);
  border-color: #533759;
}
.rail .rail-btn.active { background: #422341; }
.discovery .pf-goals { border-color: #613856; }
.discovery .pf-goal-launch { box-shadow: inset 0 1px 0 #ffffff10; }
.discovery .pf-goal-launch[data-goal="reports"] {
  --goal-surface: #5d2755;
  --goal-accent: #ff8acb;
}
.discovery .property-card, .discovery .place-card {
  background: linear-gradient(155deg, #29213e, #20243d);
}
.pf-goal-dialog .pf-goal-sheet-head, .pf-live-dialog .pf-live-head {
  background: linear-gradient(134deg, #ffe9f5, #f5f0ff 78%);
  border-bottom-color: #ead6ea;
}
.map-shell #destination-launch { border-color: #68516f; }
.map-shell #destination-launch:focus-within {
  border-color: #ff8acb;
  box-shadow: 0 0 0 2px #ff8acb40, 0 8px 24px #090c1c55;
}

/* Keep View and Report aligned as one control on every viewport. */
.map-shell .pf-map-actions {
  position: absolute;
  z-index: 780;
  top: 91px;
  right: 14px;
  display: grid;
  grid-template-columns: repeat(2, 102px);
  gap: 8px;
  pointer-events: none;
}
.pf-map-actions .map-view-root {
  position: relative;
  top: auto;
  right: auto;
  min-width: 0;
  z-index: 2;
}
.map-shell .pf-map-actions .map-view-trigger,
.map-shell .pf-map-actions .map-quick-report {
  position: relative;
  inset: auto;
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 13px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1;
  pointer-events: auto;
}
.map-shell .pf-map-actions .map-view-trigger {
  background: var(--pf-control-surface);
  border-color: #68516f;
}
.map-shell .pf-map-actions .map-quick-report {
  background: linear-gradient(145deg, #a3236c, var(--pf-fuchsia));
  border-color: #d980b5;
  color: #fff4fb;
  box-shadow: 0 8px 21px #360f315d;
}
.pf-map-actions .map-quick-report > span {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: #ffc1e3;
  color: #65204e;
  font-size: 16px;
}
.pf-map-actions .map-view-menu { top: 52px; right: -110px; }
.is-navigating .map-shell .pf-map-actions { display: none; }
@media (min-width: 1200px) {
  .map-shell .pf-map-actions { top: 15px; }
}
@media (min-width: 651px) and (max-width: 850px) {
  .workspace .discovery { width: 31vw; padding-inline: 12px; }
  .map-shell .pf-map-actions .map-view-menu { max-width: calc(69vw - 102px); }
  .map-shell #destination-launch,
  .map-shell #map-inline-results { left: 14px; right: 14px; width: auto; }
}
@media (max-width: 650px) {
  .map-shell .pf-map-actions { top: 91px; right: var(--pf-right); }
  .workspace .discovery:before { background: #bc629d; }
}
@media (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
  .map-shell .pf-map-actions .map-view-menu { max-height: calc(100dvh - 235px); }
}
@media (max-width: 650px) and (max-height: 500px) and (orientation: landscape) {
  .map-shell .pf-map-actions {
    top: 13px;
    grid-template-columns: 98px;
  }
  .map-shell .pf-map-actions .map-view-menu {
    right: 0;
    max-height: calc(100dvh - var(--pf-header-height) - var(--pf-rail-height) - 70px);
  }
}

/* Short entrance motion leaves navigation available as soon as the page loads. */
@keyframes pf-type-arrive {
  from { opacity: 0; translate: 0 -12px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes pf-control-arrive {
  from { opacity: 0; translate: 0 7px; }
  to { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .topbar .brand .brand-word,
  .discovery:not(.collapsed) .panel-top h1 {
    animation: pf-type-arrive .46s cubic-bezier(.22,.72,.34,1) both;
  }
  .map-shell #destination-launch {
    animation: pf-control-arrive .34s .04s ease-out both;
  }
  .map-shell .pf-map-actions {
    animation: pf-control-arrive .34s .10s ease-out both;
  }
  .discovery:not(.collapsed) .pf-goal-launch {
    animation: pf-control-arrive .3s ease-out both;
  }
  .discovery .pf-goal-launch:nth-child(2) { animation-delay: .04s; }
  .discovery .pf-goal-launch:nth-child(3) { animation-delay: .08s; }
  .discovery .pf-goal-launch:nth-child(4) { animation-delay: .12s; }
  .discovery .pf-goal-launch:nth-child(5) { animation-delay: .16s; }
}
