:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #0a0910;
  color: #f7f4ec;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: #7dd3fc; }

.ps-top {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0) + 12px) 16px 12px;
  background: rgba(10, 9, 16, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand { font-weight: 800; font-size: 1.05rem; text-decoration: none; color: #f7f4ec; letter-spacing: -.01em; }
.brand span { color: #f87171; }
.back { margin-left: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 6px 11px; font: 12px ui-monospace, monospace; text-decoration: none; }

.wrap { max-width: 860px; margin: 0 auto; padding: 10px 18px calc(env(safe-area-inset-bottom, 0) + 64px); }
.lede { color: rgba(247, 244, 236, .58); font-family: ui-monospace, monospace; font-size: 12px; margin: 4px 0 14px; }
.empty { color: rgba(247, 244, 236, .42); font: 13px ui-monospace, monospace; padding: 18px 2px; }
.contextbar { border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.035); border-radius: 12px; padding: 9px 0 10px; margin: 0 0 8px; overflow: clip; }
.contextbar .lede { margin: 0; color: rgba(247,244,236,.76); }
.contextbar > .lede { padding: 0 11px; }
.context-actions { display: flex; gap: 7px; overflow-x: auto; padding: 0 11px; scrollbar-width: none; }
.context-actions::-webkit-scrollbar { display: none; }
.context-actions .search-run { flex: 0 0 auto; padding: 7px 10px; }
.compact-box { border: 1px solid rgba(125, 211, 252, .20); background: rgba(255,255,255,.03); border-radius: 12px; margin: 0 0 8px; overflow: clip; }
.compact-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; font-weight: 900; color: #7dd3fc; }
.compact-box > summary::-webkit-details-marker { display: none; }
.compact-box > summary::after { content: '▾'; color: rgba(247,244,236,.55); transition: transform .15s; }
.compact-box[open] > summary::after { transform: rotate(180deg); }
.compact-box small { color: rgba(247,244,236,.46); font: 700 11px ui-monospace, monospace; margin-left: auto; }

/* Tabs */
.tabs { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 4px 18px 10px; margin: 0 -18px 8px; position: sticky; top: calc(env(safe-area-inset-top, 0) + 49px); z-index: 5; background: linear-gradient(180deg,#0a0910 70%, rgba(10,9,16,.72)); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; scroll-snap-align: start; appearance: none; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: rgba(247, 244, 236, .7); border-radius: 999px; padding: 7px 11px; font: 700 12px ui-sans-serif, system-ui; cursor: pointer; white-space: nowrap; transition: color .15s, border-color .15s, background .15s; }
.tab:hover { color: #f7f4ec; border-color: rgba(255, 255, 255, .24); }
.tab.active { color: #08090c; background: #f7f4ec; border-color: #f7f4ec; }
.tab .cnt { display: inline-block; min-width: 18px; text-align: center; font: 600 11px ui-monospace, monospace; opacity: .7; }
.pane[hidden] { display: none; }

/* Card */
article.card { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 13px; align-items: start; border: 1px solid rgba(255, 255, 255, .08); background: #14131c; border-radius: 8px; padding: 12px; margin: 10px 0; transition: opacity .25s, transform .25s, border-color .25s; }
article.card.fb-star { border-color: rgba(250, 204, 21, .7); box-shadow: 0 0 0 1px rgba(250, 204, 21, .25); }
article.card.fb-like { border-color: rgba(110, 231, 183, .5); }
article.card.is-new { border-color: rgba(125, 211, 252, .45); }
article.card.removing { opacity: 0; transform: scale(.92); pointer-events: none; }
article.card.shared-focus { border-color: rgba(251, 191, 36, .86); box-shadow: 0 0 0 6px rgba(251,191,36,.14), 0 24px 70px rgba(0,0,0,.38); }

.thumb { display: block; overflow: hidden; border-radius: 7px; background: #0d1117; border: 1px solid rgba(255, 255, 255, .09); aspect-ratio: 4/3; }
.thumb[hidden] { display: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.body { min-width: 0; }
h3 { margin: 0 0 6px; font-size: 17px; }
.new, .state, .platform { display: inline-block; margin-right: 7px; border: 1px solid rgba(125, 211, 252, .55); color: #7dd3fc; border-radius: 999px; padding: 1px 7px; font: 10px ui-monospace, monospace; vertical-align: middle; }
.platform { border-color: rgba(255, 255, 255, .18); color: rgba(247, 244, 236, .72); }
.state.liked { border-color: rgba(110, 231, 183, .65); color: #6ee7b7; }
.state.fav { border-color: rgba(250, 204, 21, .7); color: #facc15; }
.meta { color: rgba(247, 244, 236, .58); font-family: ui-monospace, monospace; font-size: 12px; }
.meta-bit { white-space: nowrap; }
.meta-price { color: #facc15; font-weight: 900; }
.meta-area { color: #6ee7b7; font-weight: 900; }
.desc { font-size: 13px; }
.contact-box { margin-top: 10px; border: 1px solid rgba(110, 231, 183, .25); background: rgba(110, 231, 183, .045); border-radius: 9px; padding: 8px 10px; }
.contact-box[hidden] { display: none; }
.contact-box summary { cursor: pointer; color: #6ee7b7; font-weight: 800; font-size: 13px; }
.contact-message { width: 100%; margin-top: 8px; min-height: 150px; resize: vertical; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.22); color: #f7f4ec; padding: 9px; font: 12px/1.45 ui-monospace, monospace; }
.contact-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.contact-actions button { appearance: none; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #f7f4ec; border-radius: 999px; padding: 7px 10px; font: 700 12px ui-sans-serif, system-ui; cursor: pointer; }
.contact-actions button:hover { border-color: rgba(110, 231, 183, .65); }
.contact-actions button:disabled { opacity: .45; cursor: not-allowed; }
.contact-note { margin: 6px 0 0; color: rgba(247,244,236,.58); font: 11px ui-monospace, monospace; }
.warn { color: #facc15; font-size: 13px; }

.actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.fb { appearance: none; background: rgba(255, 255, 255, .04); color: #f7f4ec; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; width: 42px; height: 42px; font-size: 20px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s, background .15s, border-color .15s; }
.share-object { appearance: none; background: rgba(125, 211, 252, .07); color: #bae6fd; border: 1px solid rgba(125, 211, 252, .22); border-radius: 999px; width: 42px; height: 42px; font-size: 19px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s, background .15s, border-color .15s; }
.share-object:hover, .share-object.copied { transform: scale(1.08); border-color: rgba(125, 211, 252, .62); background: rgba(125, 211, 252, .14); }
.share-object.copied { color: #bbf7d0; border-color: rgba(110, 231, 183, .74); }
.fb:hover { transform: scale(1.08); background: rgba(255, 255, 255, .08); }
.fb:active { transform: scale(.96); }
.fb.active { background: rgba(255, 255, 255, .16); border-color: #7dd3fc; box-shadow: 0 0 0 2px rgba(125, 211, 252, .18); }
.fb-up.active, .fb-up:hover { border-color: #6ee7b7; }
.fb-down.active, .fb-down:hover { border-color: #f87171; }
.fb-star.active, .fb-star:hover { border-color: #facc15; }
.fb-mark { font: 12px ui-monospace, monospace; color: rgba(247, 244, 236, .55); margin-left: 6px; }

/* Learnings */
.learnings { background: rgba(125, 211, 252, .045); }
.learnings[hidden] { display: none; }
.learnings-body { padding: 0 12px 12px; }
.tag { display: inline-block; border: 1px solid rgba(255, 255, 255, .14); padding: 2px 8px; border-radius: 999px; font-size: 12px; margin: 2px 4px 2px 0; font-family: ui-monospace, monospace; }
.tag.good { border-color: rgba(110, 231, 183, .5); color: #6ee7b7; }
.tag.bad { border-color: rgba(248, 113, 113, .5); color: #f87171; }
.tag.fav { border-color: rgba(250, 204, 21, .55); color: #facc15; }

/* Search profiles */
.searchbox { border-color: rgba(125, 211, 252, .24); }
.searchhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 12px 8px; }
.searchhead .lede { margin: 0; }
.saved-searches { display: flex; gap: 7px; overflow-x: auto; padding: 8px 11px 9px; margin: 0; scrollbar-width: none; }
.saved-searches::-webkit-scrollbar { display: none; }
.saved-search { flex: 0 0 auto; max-width: min(78vw, 360px); overflow: hidden; text-overflow: ellipsis; appearance: none; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.055); color: rgba(247,244,236,.78); border-radius: 999px; padding: 7px 10px; font: 800 12px ui-sans-serif, system-ui; cursor: pointer; white-space: nowrap; }
.saved-search.active { background: #f7f4ec; color: #08090c; border-color: #f7f4ec; }
.search-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0 12px; }
.search-form label { display: grid; gap: 4px; color: rgba(247,244,236,.66); font: 700 11px ui-monospace, monospace; }
.search-form input, .search-form select { width: 100%; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.23); color: #f7f4ec; border-radius: 8px; padding: 9px 10px; font: 13px ui-sans-serif, system-ui; }
.search-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.search-run, .search-actions button, .source-preview a { appearance: none; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #f7f4ec; border-radius: 999px; padding: 8px 11px; font: 800 12px ui-sans-serif, system-ui; cursor: pointer; text-decoration: none; }
.source-preview { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 12px 12px; }
.source-preview .hint { color: rgba(247,244,236,.55); font: 12px ui-monospace, monospace; width: 100%; }
.weather-widget { width: calc(100% - 22px); text-align: left; margin: 9px 11px 0; border: 1px solid rgba(251, 191, 36, .24); background: linear-gradient(135deg, rgba(251,191,36,.13), rgba(255,255,255,.04)); border-radius: 12px; padding: 9px 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); cursor: pointer; }
.weather-widget:hover { border-color: rgba(251, 191, 36, .52); background: linear-gradient(135deg, rgba(251,191,36,.18), rgba(255,255,255,.055)); }
.weather-main { display: flex; align-items: center; gap: 8px; color: #f7f4ec; }
.weather-main strong { color: #fbbf24; font-size: 13px; }
.weather-icon { font-size: 20px; line-height: 1; }
#weather-temp { margin-left: auto; font: 900 24px/1 ui-sans-serif, system-ui; color: #fff7ed; }
.weather-details { margin-top: 4px; color: rgba(247,244,236,.68); font: 11px/1.45 ui-monospace, monospace; }
.weather-dialog[hidden] { display: none; }
.weather-dialog { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(3, 7, 18, .68); backdrop-filter: blur(12px); }
.weather-dialog-card { position: relative; width: min(620px, 100%); max-height: min(760px, 88svh); overflow: auto; border: 1px solid rgba(251,191,36,.30); border-radius: 22px; background: linear-gradient(180deg, rgba(14, 116, 144, .92), rgba(2, 6, 23, .96)); box-shadow: 0 28px 90px rgba(0,0,0,.50), inset 0 1px 0 rgba(255,255,255,.12); color: #f8fafc; }
.weather-dialog-card h2 { margin: 0; padding: 18px 20px 6px; color: #fff7ed; font-size: 20px; }
.weather-dialog-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.20); border-radius: 999px; background: rgba(255,255,255,.10); color: #fff; font-size: 24px; cursor: pointer; }
.weather-dialog-body { padding: 0 18px 18px; }
.weather-now-big { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; padding: 10px 2px 16px; }
.weather-now-big .icon { font-size: 44px; }
.weather-now-big .temp { font-size: 54px; line-height: .95; font-weight: 900; }
.weather-now-big .meta { grid-column: 2; color: rgba(248,250,252,.76); font: 12px/1.45 ui-monospace, monospace; }
.weather-hourly { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 8px 0 14px; }
.weather-hour { border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 8px 6px; background: rgba(255,255,255,.08); text-align: center; }
.weather-hour .time { color: rgba(248,250,252,.70); font: 10px ui-monospace, monospace; }
.weather-hour .symbol { display: block; margin: 5px 0; font-size: 21px; }
.weather-hour strong { display: block; color: #fff7ed; }
.weather-days { display: grid; gap: 7px; }
.weather-day { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; border-top: 1px solid rgba(255,255,255,.12); padding: 9px 0; color: rgba(248,250,252,.86); }
.weather-day strong { color: #fff7ed; }
.weather-day small { color: rgba(248,250,252,.68); font-family: ui-monospace, monospace; }

/* Map overview */
.mapbox { border: 1px solid rgba(125, 211, 252, .24); background: linear-gradient(180deg, rgba(125,211,252,.08), rgba(255,255,255,.025)); border-radius: 12px; padding: 12px; margin: 0; }
.mapbox[hidden] { display: none; }
.maphead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.maphead h2 { margin: 0 0 4px; color: #7dd3fc; }
.map-toggle, .map-fullscreen { appearance: none; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #f7f4ec; border-radius: 999px; padding: 7px 11px; font: 800 12px ui-sans-serif, system-ui; cursor: pointer; white-space: nowrap; }
.map-toggle:hover, .map-fullscreen:hover { border-color: rgba(125, 211, 252, .7); }
.mapbox.collapsed .mapfilters, .mapbox.collapsed .property-map { display: none; }
.mapbox.map-full { position: fixed; inset: max(env(safe-area-inset-top, 0px), 8px) 8px max(env(safe-area-inset-bottom, 0px), 8px); z-index: 40; display: flex; flex-direction: column; background: #0a0910; padding: 10px; }
.mapbox.map-full .property-map { flex: 1; height: auto; max-height: none; min-height: 0; }
.mapbox.map-full .mapfilters { max-height: 76px; overflow: auto; }
.mapbox.map-full::before { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: -1; }
.mapfilters { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 10px; }
.mapfilters label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.18); border-radius: 999px; padding: 6px 9px; font: 700 12px ui-monospace, monospace; color: rgba(247,244,236,.82); cursor: pointer; }
.mapfilters input { accent-color: #7dd3fc; }
.property-map { width: 100%; height: 430px; max-height: calc(100svh - 260px); min-height: 300px; border-radius: 10px; overflow: hidden; background: #0d1117; border: 1px solid rgba(255,255,255,.10); position: relative; isolation: isolate; }
.leaflet-container { width: 100%; height: 100%; overflow: hidden; background: #10151f; color: #111827; touch-action: pan-x pan-y; }
.leaflet-pane, .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-tile-container, .leaflet-pane > svg, .leaflet-pane > canvas, .leaflet-zoom-box, .leaflet-image-layer, .leaflet-layer { position: absolute; left: 0; top: 0; }
.leaflet-tile { max-width: none !important; max-height: none !important; box-sizing: content-box; user-select: none; pointer-events: none; }
.leaflet-marker-icon { display: block; pointer-events: auto !important; cursor: pointer; z-index: 650 !important; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; float: left; clear: both; }
.leaflet-control-zoom { margin: 10px; border: 1px solid rgba(0,0,0,.18); border-radius: 4px; overflow: hidden; }
.leaflet-control-zoom a { display: block; width: 28px; height: 28px; line-height: 28px; text-align: center; background: #fff; color: #111827; text-decoration: none; font-weight: 900; border-bottom: 1px solid #ddd; }
.leaflet-control-zoom a:last-child { border-bottom: 0; }
.leaflet-control-attribution { margin: 0; padding: 2px 5px; background: rgba(255,255,255,.8); font-size: 10px; }
.leaflet-popup { position: absolute; text-align: center; margin-bottom: 20px; }
.leaflet-popup-content-wrapper { background: #fff; border-radius: 8px; box-shadow: 0 3px 14px rgba(0,0,0,.28); padding: 1px; text-align: left; }
.leaflet-popup-content { min-width: 170px; max-width: min(240px, 74vw); margin: 9px; font: 12px/1.3 ui-sans-serif, system-ui; }
.leaflet-popup-close-button { position: absolute; right: 6px; top: 4px; color: #111827; text-decoration: none; font-weight: 900; }
.map-popup-title { font-weight: 900; margin-bottom: 4px; color: #111827; }
.map-popup-meta { color: #475569; font: 12px ui-monospace, monospace; margin-bottom: 7px; }
.map-popup-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.map-popup-actions a, .map-popup-actions button { border: 1px solid #cbd5e1; background: #f8fafc; color: #0f172a; border-radius: 999px; padding: 4px 8px; font: 700 11px ui-sans-serif, system-ui; text-decoration: none; cursor: pointer; }
.pin-dot { width: 18px; height: 18px; border-radius: 999px; border: 2px solid #0a0910; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 8px 20px rgba(0,0,0,.38); }
.pin-new { background: #38bdf8; }
.pin-like { background: #34d399; }
.pin-star { background: #facc15; }
.pin-reject { background: #f87171; }
.pin-nogo { background: #a855f7; }
.pin-unknown { background: #94a3b8; }

h2 { font-size: 15px; }
#pane-sources ul { columns: 2; padding-left: 18px; }
#pane-sources li { font-size: 13px; }
.mobile-action-label { display: none; }

@media (max-width: 900px) {
  .saved-searches { flex-direction: column; align-items: stretch; overflow: visible; padding-right: 11px; scroll-padding-inline: 11px; }
  .saved-search { width: 100%; max-width: none; text-align: left; }
  .saved-search.active { max-width: none; }
}

@media (max-width: 640px) {
  .wrap { padding-left: 14px; padding-right: 14px; overflow-x: clip; }
  .contextbar { overflow: visible; padding-top: 8px; }
  .contextbar > .lede { font-size: 11px; line-height: 1.45; }
  .saved-search { padding: 7px 9px; font-size: 11px; }
  .context-actions { flex-wrap: wrap; overflow: visible; gap: 6px; padding-right: 11px; }
  .context-actions .search-run { margin-top: 0; padding: 7px 9px; font-size: 11px; }
  .desktop-action-label { display: none; }
  .mobile-action-label { display: inline; }
  .compact-box > summary { padding: 9px 10px; font-size: 15px; }
  .compact-box small { font-size: 10px; }
  .tabs { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 96px; }
  .tab { padding: 7px 10px; font-size: 12px; }
  article.card { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 10px; margin: 8px 0; }
  .thumb { aspect-ratio: 1/1; }
  h3 { font-size: 15px; line-height: 1.35; }
  .meta { font-size: 11px; line-height: 1.45; }
  .desc { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
  .contact-box { margin-top: 8px; padding: 7px 9px; }
  .contact-box summary { font-size: 12px; }
  .actions { gap: 7px; margin-top: 8px; }
  .fb { width: 38px; height: 38px; font-size: 19px; }
  #pane-sources ul { columns: 1; }
  .maphead { display: block; }
  .map-toggle, .map-fullscreen { margin-top: 4px; }
  .property-map { min-height: 280px; height: 360px; max-height: calc(100svh - 270px); }
  .searchhead { display: block; }
  .search-run { margin-top: 8px; }
  .search-form { grid-template-columns: 1fr; }
}
