/* Mauka - Dee Gee Architects. Light first, dark follows the device. */
/* Inter (variable), served from this site: no font CDN. latin-ext carries the rupee sign. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(vendor/inter-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(vendor/inter-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #ffffff; --bg2: #f6f5f2; --bg3: #eceae5; --line: #e6e3dd;
  --ink: #191817; --ink2: #55524d; --ink3: #8c8880;
  --accent: #d9482b; --accent-ink: #ffffff; --accent-soft: #fbe9e4;
  --solid: #191817; --solid-ink: #ffffff;
  --house: #2563eb; --plot: #15803d; --flat: #7c3aed; --commercial: #c2410c; --industrial: #0e7490; --other: #64748b;
  --good: #15803d; --good-soft: #e7f4ea; --warn: #a16207; --warn-soft: #fdf3d7; --bad: #b42318; --bad-soft: #fde8e6;
  --shadow: 0 1px 2px rgba(25, 24, 23, .08), 0 8px 28px rgba(25, 24, 23, .14);
  --shadow-s: 0 1px 2px rgba(25, 24, 23, .10), 0 2px 8px rgba(25, 24, 23, .10);
  --panel-w: 420px; --r: 14px;
  --sab: env(safe-area-inset-bottom, 0px); --sat: env(safe-area-inset-top, 0px);
  --peek: calc(62px + var(--sab));
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171716; --bg2: #1f1f1d; --bg3: #2a2927; --line: #32312e;
    --ink: #f2f0ec; --ink2: #b9b5ad; --ink3: #85817a;
    --accent: #f0613f; --accent-ink: #ffffff; --accent-soft: #3a211b;
    --solid: #f2f0ec; --solid-ink: #171716;
    --house: #6b9dff; --plot: #4ade80; --flat: #b794ff; --commercial: #fb923c; --industrial: #38bdf8; --other: #94a3b8;
    --good: #4ade80; --good-soft: #17301f; --warn: #fbbf24; --warn-soft: #33290f; --bad: #f97066; --bad-soft: #3a1c19;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 28px rgba(0, 0, 0, .5);
    --shadow-s: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .4);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg2); color: var(--ink); font-size: 15px; line-height: 1.4;
  -webkit-text-size-adjust: 100%; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.sp { flex: 1; }

#app { position: fixed; inset: 0; }
#map { position: absolute; inset: 0 0 0 var(--panel-w); background: var(--bg3); }

/* ---------- brand ---------- */
.mark { width: 28px; height: 28px; border-radius: 9px; background: var(--solid); position: relative; flex: none; display: inline-block; }
.mark::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--solid-ink) 45%, transparent); }
.mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--accent); }
.mark.big { width: 48px; height: 48px; border-radius: 14px; display: block; margin-bottom: 16px; }
.mark.big::before { inset: 10px; border-width: 2px; }
.mark.big::after { width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.bname { font-weight: 700; letter-spacing: -.02em; }

/* ---------- side column (laptop) ---------- */
#side { position: absolute; left: 0; top: 0; bottom: 0; width: var(--panel-w); background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 5; }
#top { padding: 14px 16px 10px; flex: none; }
.brand { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.brand .bname { font-size: 19px; }
.brand em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink3); padding: 2px 8px; border-radius: 999px; background: var(--bg2); }
.icbtn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink2); fill: currentColor; flex: none; }
.icbtn:hover { background: var(--bg2); }
#menu-m { display: none; }
.searchrow { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid transparent; border-radius: 12px; padding: 0 6px 0 12px; height: 46px; transition: border-color .15s, background .15s; }
.searchrow:focus-within { border-color: var(--ink); background: var(--bg); }
.s-ic { color: var(--ink3); flex: none; }
#q { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%; font-size: 16px; }
#q::placeholder { color: var(--ink3); }
#q::-webkit-search-cancel-button { cursor: pointer; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); font-size: 13px; font-weight: 500; color: var(--ink2); white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink3)); }
.chip b { font-weight: 500; color: var(--ink3); }
.chip:hover { border-color: var(--ink3); }
.chip.on { background: var(--solid); color: var(--solid-ink); border-color: var(--solid); }
.chip.on b { color: inherit; opacity: .65; }

#panel { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
#handle { display: none; }
.metarow { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 6px; font-size: 12.5px; color: var(--ink3); flex: none; }
#count { font-weight: 600; color: var(--ink2); }
#sort { border: 0; background: transparent; color: var(--ink2); font-size: 12.5px; padding: 2px 0; max-width: 58%; text-align: right; outline: 0; cursor: pointer; }
.has-detail .metarow { display: none; }
#body { flex: 1; min-height: 0; position: relative; }
#list, #detail { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#list { padding: 0 10px calc(20px + var(--sab)); }
.sect { padding: 14px 6px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }

/* ---------- list cards ---------- */
.card { display: flex; gap: 12px; width: 100%; text-align: left; padding: 8px; border-radius: var(--r); align-items: stretch; position: relative; transition: background .12s; }
.card + .card { margin-top: 2px; }
.card:hover, .card.hot { background: var(--bg2); }
.card.sel { background: var(--bg2); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cimg { flex: none; width: 104px; height: 92px; border-radius: 10px; background: var(--bg3); position: relative; overflow: hidden; display: grid; place-items: center; }
.cimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cimg.none { width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--c) 12%, var(--bg2)); align-self: center; }
.cimg.none .ph { background: none; }
.cimg .ph { width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, transparent); display: grid; place-items: center; }
.cimg .ph::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.rank { position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--solid); color: var(--solid-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 1px 0; }
.ct { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch { color: var(--ink2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.ch i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.ch span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cp { color: var(--ink3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn { margin-top: auto; padding-top: 5px; display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; }
.cn b { font-size: 15.5px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.cn small { font-size: 12px; color: var(--ink3); margin-left: -5px; }
.cn .v { margin-left: auto; font-weight: 500; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 2px 7px; border-radius: 6px; background: var(--bg3); color: var(--ink2); vertical-align: 1px; white-space: nowrap; }
.tag.active { background: var(--accent); color: var(--accent-ink); }
.tag.wh { background: var(--bad-soft); color: var(--bad); }
.tag.dist { background: var(--solid); color: var(--solid-ink); font-size: 11.5px; letter-spacing: 0; }
.why { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.why span { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 999px; background: var(--bg3); color: var(--ink2); }
.why span.hit { background: var(--good-soft); color: var(--good); }
.empty { padding: 44px 20px; text-align: center; color: var(--ink3); font-size: 14px; }
.skel { height: 108px; border-radius: var(--r); margin: 2px 0; background: linear-gradient(90deg, var(--bg2), var(--bg3), var(--bg2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- detail ---------- */
#detail { background: var(--bg); padding-bottom: calc(86px + var(--sab)); }
.dtop { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.back { height: 36px; padding: 0 12px 0 6px; border-radius: 999px; display: inline-flex; align-items: center; gap: 2px; color: var(--ink); font-size: 13.5px; font-weight: 600; background: var(--bg2); }
.back:hover { background: var(--bg3); }
.gallery { position: relative; margin: 4px 14px 0; }
.photos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r); gap: 6px; }
.photos::-webkit-scrollbar { display: none; }
.photos figure { flex: none; margin: 0; width: 100%; aspect-ratio: 16/10; overflow: hidden; background: var(--bg3); scroll-snap-align: center; position: relative; cursor: zoom-in; border-radius: var(--r); }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photos figcaption { position: absolute; left: 10px; bottom: 10px; font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .58); color: #fff; text-transform: capitalize; backdrop-filter: blur(4px); }
.gcount { position: absolute; right: 10px; bottom: 10px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .58); color: #fff; pointer-events: none; }
.dhead { padding: 16px 16px 2px; }
.dhead h2 { margin: 0 0 3px; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.dhead .hl { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.dhead .hl i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.dhead .pl { color: var(--ink2); font-size: 13.5px; margin-top: 3px; }
.dhead .ad { color: var(--ink3); font-size: 12.5px; margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 16px 0; }
.stat { background: var(--bg2); border-radius: 12px; padding: 10px 11px; min-width: 0; }
.stat span { display: block; font-size: 11px; font-weight: 600; color: var(--ink3); letter-spacing: .02em; }
.stat b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.stat small { display: block; font-size: 11.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.bad b { color: var(--bad); font-size: 15px; }
.banner { margin: 12px 16px 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: var(--bad-soft); color: var(--bad); }
.banner.amber { background: var(--warn-soft); color: var(--warn); }
.banner.match { background: var(--good-soft); color: var(--good); }
.facts { margin: 14px 16px 0; border-top: 1px solid var(--line); }
.fact { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: baseline; }
.fact span { flex: none; width: 104px; color: var(--ink3); font-size: 12.5px; }
.fact div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.fact b { font-weight: 600; }
.fact small { display: block; font-size: 12px; color: var(--ink2); }
.blk { padding: 18px 16px 0; }
.blk h3 { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }
.blk ul { margin: 0; padding-left: 18px; }
.blk li { margin-bottom: 6px; font-size: 13.5px; }
.quote { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.quote:last-child { border-bottom: 0; }
.quote b { white-space: nowrap; font-weight: 600; }
.rem { font-size: 12.5px; color: var(--ink2); margin: 0 0 8px; }
.rem b { color: var(--ink); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
details.blk summary { cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); margin-bottom: 8px; }
.pathline { font-size: 11.5px; color: var(--ink3); padding: 16px 16px 0; overflow-wrap: anywhere; }
.actbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; gap: 8px; padding: 10px 14px calc(10px + var(--sab)); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.act { height: 46px; padding: 0 16px; border-radius: 12px; background: var(--bg2); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.act:hover { background: var(--bg3); }
.act.pri { background: var(--solid); color: var(--solid-ink); flex: 1; }
.act.pri:hover { opacity: .9; }
.act.sq { width: 46px; padding: 0; flex: none; }

/* ---------- map furniture ---------- */
#mapbtns { position: absolute; right: 12px; top: calc(12px + var(--sat)); display: flex; flex-direction: column; gap: 8px; z-index: 4; }
.mapbtn { width: 42px; height: 42px; border-radius: 12px; background: var(--bg); color: var(--ink); box-shadow: var(--shadow-s); display: grid; place-items: center; }
.mapbtn:hover { background: var(--bg2); }
#focusbar { position: absolute; left: calc(var(--panel-w) + 14px); top: 14px; z-index: 4; display: flex; align-items: center; gap: 10px; background: var(--bg); box-shadow: var(--shadow);
  border-radius: 999px; padding: 6px 6px 6px 12px; max-width: min(440px, calc(100vw - var(--panel-w) - 90px)); }
.fb-ring { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--accent); position: relative; flex: none; }
.fb-ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--accent); }
.fb-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.fb-k { font-size: 10.5px; color: var(--ink3); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
#fb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; font-weight: 600; }
#fb-clear { height: 32px; padding: 0 14px; border-radius: 999px; background: var(--bg2); font-size: 13px; font-weight: 600; flex: none; }
#fb-clear:hover { background: var(--bg3); }
#menupop { position: absolute; left: calc(var(--panel-w) - 236px); top: 54px; z-index: 30; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; width: 224px; }
#menupop button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; font-size: 14px; }
#menupop button:hover { background: var(--bg2); }
#who, #built { padding: 6px 12px; font-size: 12px; color: var(--ink3); overflow-wrap: anywhere; }
#toast { position: absolute; left: calc(50% + var(--panel-w) / 2); bottom: calc(28px + var(--sab)); transform: translateX(-50%); z-index: 50; background: var(--solid); color: var(--solid-ink); padding: 10px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow); max-width: 86vw; text-align: center; }
#peekcard { display: none; }

/* rate pills: the map's main marker. Dots stay underneath wherever a pill would collide. */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 8px; border-radius: 999px; background: #fff; color: #191817; font-size: 12.5px; font-weight: 700;
  letter-spacing: -.01em; box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .16); border: 1px solid rgba(0, 0, 0, .08); cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: transform .12s, background .12s, color .12s; will-change: transform; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.pill em { font-style: normal; font-weight: 700; min-width: 16px; height: 16px; padding: 0 4px; margin-left: -3px; border-radius: 8px; background: #191817; color: #fff; font-size: 10.5px; display: grid; place-items: center; }
.pill.wh { color: #6b6862; border-style: dashed; border-color: rgba(0, 0, 0, .35); }
.pill.dim { opacity: .62; }
.pill:hover, .pill.hot { transform: scale(1.08); z-index: 3; }
.pill.sel { background: #191817; color: #fff; transform: scale(1.1); z-index: 4; border-color: #191817; }
.pill.sel em { background: #fff; color: #191817; }
.pill.active { background: var(--accent); color: #fff; border-color: transparent; padding: 0 11px; height: 30px; z-index: 5; }
.pill.active::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: beat 1.8s ease-out infinite; }
.pill.active.sel { box-shadow: 0 0 0 3px #fff, 0 2px 10px rgba(0, 0, 0, .35); background: var(--accent); }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 100% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .pill.active::before, .skel { animation: none; } }
.mk-ring { font-size: 10.5px; font-weight: 700; color: #fff; background: var(--accent); padding: 1px 7px; border-radius: 999px; pointer-events: none; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.mk-point { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .5); }

.mapboxgl-popup, .maplibregl-popup { z-index: 6; }
.mapboxgl-popup-content, .maplibregl-popup-content { padding: 0 !important; border-radius: 16px !important; overflow: hidden; box-shadow: var(--shadow) !important; background: var(--bg) !important; color: var(--ink); font: inherit; }
.mapboxgl-popup-tip, .maplibregl-popup-tip { display: none; }
.pop { width: 280px; }
.pop .pimg { height: 150px; background: var(--bg3); }
.pop .pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pop .pb { padding: 11px 13px 12px; }
.pop .pt { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.pop .ph { font-size: 13px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.pop .ph i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.pop .pp { font-size: 12.5px; color: var(--ink3); }
.pop .pr { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); }
.pop .pr b { font-weight: 700; font-size: 15.5px; color: var(--ink); }
.pop .pr a { font-weight: 600; text-decoration: none; }
.pop .po { font-size: 12px; color: var(--ink2); margin-top: 7px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- sign-in ---------- */
#login { position: fixed; inset: 0; z-index: 100; background: var(--bg2); display: grid; place-items: center; padding: 20px; }
#loginform { width: 100%; max-width: 360px; background: var(--bg); border-radius: 20px; padding: 30px 26px 22px; box-shadow: var(--shadow); }
#loginform h1 { margin: 0; font-size: 26px; }
#loginform .sub { margin: 3px 0 22px; color: var(--ink3); font-size: 13.5px; }
#loginform label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink2); margin-bottom: 14px; }
#loginform input { display: block; width: 100%; height: 48px; margin-top: 5px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); padding: 0 13px; font-size: 16px; outline: 0; font-weight: 400; }
#loginform input:focus { border-color: var(--ink); }
#signin { width: 100%; height: 50px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; margin-top: 4px; }
#signin:disabled { opacity: .6; }
#loginerr { min-height: 18px; margin: 12px 0 0; font-size: 13px; color: var(--bad); }

#lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .94); display: grid; place-items: center; }
#lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
#lightbox button { position: absolute; right: 14px; top: calc(12px + var(--sat)); width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-size: 26px; line-height: 1; }

/* ---------- phone: full-screen map, search + filters pinned on top, list in a bottom sheet ---------- */
@media (max-width: 859px) {
  :root { --panel-w: 0px; }
  #map { inset: 0; }
  #side { display: contents; }
  #top { position: absolute; left: 10px; right: 10px; top: calc(8px + var(--sat)); z-index: 6; padding: 0; pointer-events: none; }
  #top > * { pointer-events: auto; }
  .brand { display: none; }
  #menu-m { display: grid; }
  .searchrow { height: 50px; border-radius: 25px; background: var(--bg); box-shadow: var(--shadow-s); padding: 0 7px 0 16px; border: 0; }
  .searchrow:focus-within { box-shadow: var(--shadow); }
  .chips { padding: 8px 2px 6px; margin: 0 -2px; }
  .chip { background: var(--bg); border-color: transparent; box-shadow: var(--shadow-s); height: 34px; }
  .has-focus #chips, .sheet-full #chips { display: none; }

  #panel { position: absolute; left: 0; right: 0; bottom: 0; height: calc(100dvh - 70px - var(--sat)); z-index: 7; background: var(--bg); border-top: 0; border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(25, 24, 23, .16); transform: translateY(calc(100% - var(--peek))); transition: transform .28s cubic-bezier(.2, .8, .2, 1); will-change: transform; touch-action: none; }
  #panel.dragging { transition: none; }
  .sheet-half #panel { transform: translateY(calc(100% - 52dvh)); }
  .sheet-full #panel { transform: translateY(0); }
  #handle { display: grid; place-items: center; height: 20px; flex: none; touch-action: none; cursor: grab; }
  #handle i { width: 38px; height: 4px; border-radius: 2px; background: var(--bg3); margin-top: 4px; }
  .metarow { padding: 4px 18px 10px; touch-action: none; }
  .sheet-peek .metarow { justify-content: center; }
  .sheet-peek #sort { display: none; }
  .sheet-peek #count { font-size: 14px; color: var(--ink); }
  .has-detail.sheet-peek .metarow { display: flex; }
  #body { touch-action: pan-y; }
  .sheet-half #list { padding-bottom: calc(48dvh + 24px); }
  .sheet-half #detail { padding-bottom: calc(48dvh + 86px); }
  .sheet-half .actbar { bottom: calc(100dvh - 70px - var(--sat) - 52dvh); }
  .cimg { width: 112px; height: 96px; }

  #mapbtns { top: calc(112px + var(--sat)); right: 10px; }
  .has-focus #mapbtns { top: calc(124px + var(--sat)); }
  #focusbar { left: 10px; right: 10px; top: calc(66px + var(--sat)); max-width: none; }
  #menupop { left: auto; right: 10px; top: calc(64px + var(--sat)); }
  #toast { left: 50%; bottom: calc(var(--peek) + 16px); }

  #peekcard { display: flex; position: absolute; left: 10px; right: 10px; bottom: calc(var(--peek) + 10px); z-index: 6; background: var(--bg); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; align-items: stretch; animation: rise .2s ease-out; }
  #peekcard .pk-img { flex: none; width: 116px; min-height: 116px; background: var(--bg3) center/cover no-repeat; display: grid; place-items: center; }
  #peekcard .pk-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
  #peekcard .pk-b { flex: 1; min-width: 0; padding: 11px 38px 11px 13px; display: flex; flex-direction: column; }
  #peekcard .pk-x { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--bg2); font-size: 18px; line-height: 1; color: var(--ink2); }
  @keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
  .sheet-half #peekcard, .sheet-full #peekcard { display: none; }

  .mapboxgl-ctrl-bottom-left, .mapboxgl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { bottom: calc(var(--peek) + 4px) !important; }
  .has-peek .mapboxgl-ctrl-bottom-left, .has-peek .mapboxgl-ctrl-bottom-right, .has-peek .maplibregl-ctrl-bottom-left, .has-peek .maplibregl-ctrl-bottom-right { bottom: calc(var(--peek) + 134px) !important; }
}
