/* Live listings: cards, search + map, listing page. Same navy/red system as site.css. */

/* ---------- result cards ---------- */
.lgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
@media (max-width:980px){.lgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.lgrid{grid-template-columns:1fr}}
.card.lc{position:relative;display:flex;flex-direction:column;background:var(--white);color:inherit;min-width:0}
.card.lc .ph{position:relative;display:block;aspect-ratio:4/3;overflow:hidden;border-radius:4px;background:var(--mist)}
.card.lc .ph img{width:100%;height:100%;object-fit:cover;transition:transform 1.2s var(--ease)}
.card.lc:hover .ph img{transform:scale(1.045)}
.card.lc .nophoto{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-weight:600}
.card.lc .tag{position:absolute;top:12px;left:12px;background:var(--ink);color:var(--white);font-size:12px;font-weight:600;padding:4px 8px;border-radius:3px;letter-spacing:.04em}
.card.lc .tag+.tag{left:auto;right:56px}
.card.lc .tag.op{background:var(--red)}
.card.lc .meta{padding:14px 2px 0;display:flex;flex-direction:column;gap:3px}
.card.lc .price{font-family:var(--display);font-weight:700;font-size:30px;line-height:1;font-variant-numeric:tabular-nums;color:var(--ink);text-decoration:none}
.card.lc .price:hover{color:var(--red)}
.card.lc .addr{font-weight:600}
.card.lc .addr small{font-weight:400;color:var(--muted)}
.card.lc .specs,.card.lc .brk{color:var(--muted);font-size:15px}
.card.lc .fine{margin-top:8px;padding-top:10px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.rca{display:inline-flex;flex:none}
.rca img{height:auto}
.save{position:absolute;top:8px;right:8px;z-index:2;width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.94);display:grid;place-items:center;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.save svg{width:22px;height:22px;fill:none;stroke:var(--ink);stroke-width:2}
.save[aria-pressed="true"] svg{fill:var(--red);stroke:var(--red)}
.empty{grid-column:1/-1;margin:0;padding:28px;border:1px dashed var(--line);border-radius:6px;color:var(--muted);text-align:center}
.card.lc.sk .ph{background:linear-gradient(90deg,var(--mist),#e6e9f2,var(--mist));background-size:200% 100%;animation:sk 1.2s infinite}
.card.lc.sk i{display:block;height:14px;margin-top:8px;border-radius:3px;background:var(--mist)}
.card.lc.sk i:first-child{height:26px;width:50%}
@keyframes sk{to{background-position:-200% 0}}

/* ---------- terms notice + toast ---------- */
.terms-bar{position:fixed;left:12px;right:12px;bottom:calc(100px + env(safe-area-inset-bottom,0px));z-index:60;max-width:880px;margin:0 auto;background:var(--ink);color:#E4E8FA;border-radius:8px;padding:16px 18px;display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;box-shadow:0 20px 50px rgba(10,14,40,.45);font-size:15px}
.terms-bar p{margin:0;flex:1 1 380px}
.terms-bar a{color:var(--white)}
.terms-bar div{display:flex;gap:8px}
.terms-bar .btn.ghost{color:var(--white)!important;border-color:#4A5175}
.terms-bar .btn.ghost:hover{background:#262B4F}
#smToast{position:fixed;left:50%;bottom:24px;z-index:70;transform:translate(-50%,140%);max-width:calc(100vw - 32px);background:var(--navy);color:var(--white);padding:14px 20px;border-radius:6px;font-weight:600;box-shadow:0 14px 34px rgba(10,14,40,.35);transition:transform .35s var(--ease)}
#smToast.on{transform:translate(-50%,0)}
#smToast a{color:var(--white)}
.crea-note{margin:0;font-size:13px;color:var(--muted);max-width:90ch}
.rca-row{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-top:24px}

/* ---------- search page ---------- */
.ls .filters{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
@media (min-width:1100px){.ls .filters{grid-template-columns:1.3fr repeat(7,minmax(0,1fr))}}
@media (max-width:600px){.ls .filters{grid-template-columns:1fr 1fr}.ls .filters:not(.all) .xf{display:none}}
.ls .xfb{display:none;grid-column:1/-1;min-height:44px}
@media (max-width:600px){.ls .xfb{display:inline-flex}}
.ls-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin-bottom:18px}
.ls-bar p{margin:0;color:var(--muted)}
.ls-bar b{color:var(--ink)}
.viewt{display:flex;gap:6px}
.viewt button{min-height:44px;padding:0 16px;border:1px solid var(--line);border-radius:4px;background:var(--white);font-weight:600;cursor:pointer;color:var(--ink)}
.viewt button[aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:var(--white)}
.ls-wrap{display:grid;grid-template-columns:1fr;gap:24px}
.ls-wrap .lgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:600px){.ls-wrap .lgrid{grid-template-columns:1fr}}
.ls-mapcol{position:relative;display:none}
.ls-wrap[data-view="map"] .ls-mapcol{display:block}
.ls-wrap[data-view="map"] .ls-listcol{display:none}
#lsMap{height:calc(100vh - 170px);min-height:420px;border-radius:6px;border:1px solid var(--line);background:var(--mist)}
@media (min-width:1100px){
  .viewt{display:none}
  .ls-wrap,.ls-wrap[data-view]{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
  .ls-wrap .ls-mapcol,.ls-wrap .ls-listcol{display:block}
  .ls-mapcol>div{position:sticky;top:96px}
}
#lsArea{position:absolute;top:12px;left:50%;transform:translateX(-50%);z-index:500;box-shadow:0 6px 18px rgba(0,0,0,.25)}
#lsMore{margin:28px auto 0;display:flex}
.pin{background:none;border:0}
.pin span{display:inline-block;transform:translate(-50%,-100%);white-space:nowrap;background:var(--navy);color:var(--white);font:700 13px/1 var(--body);padding:6px 8px;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.3);position:relative}
.pin span::after{content:"";position:absolute;left:50%;bottom:-5px;margin-left:-5px;border:5px solid transparent;border-bottom:0;border-top-color:var(--navy)}
.pin.mine span{background:var(--red)}.pin.mine span::after{border-top-color:var(--red)}
.pin.solo span{font-size:15px;padding:8px 10px;background:var(--red)}.pin.solo span::after{border-top-color:var(--red)}
.popc .card.lc .ph{aspect-ratio:16/10}
.popc .card.lc .price{font-size:24px}
.leaflet-popup-content{margin:12px}

/* ---------- listing page (same look as the sample listing.html) ---------- */
.ld{--stage:#0E1128}
.ld h1{font-size:clamp(44px,6vw,80px);font-weight:800;line-height:.9}
.ld .stage{position:relative;background:var(--stage);height:clamp(340px,62vh,760px);overflow:hidden;outline:none;touch-action:pan-y}
/* photo panel sizes: photo + film strip always fit on the first screen */
@media (max-width:1099px){.ld .stage{height:auto;aspect-ratio:3/2;max-height:calc(100vh - 75px - 116px);min-height:240px}}
@media (min-width:1100px){.ld .stage{height:max(420px,calc(100vh - 75px - 116px))}}
.ld .slide{position:absolute;inset:0;opacity:0;transition:opacity .7s var(--ease)}
/* whole photo, as big as fits, never enlarged past its real pixel size, centred on the dark panel */
.ld .slide img{position:absolute;inset:0;margin:auto;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
.ld .slide.on{opacity:1}

.ld .arrow{position:absolute;top:50%;z-index:3;width:56px;height:56px;margin-top:-28px;border-radius:50%;border:0;background:rgba(255,255,255,.92);color:var(--ink);cursor:pointer;display:grid;place-items:center;box-shadow:0 6px 20px rgba(0,0,0,.25);transition:transform .2s,background .2s}
.ld .arrow:hover{background:var(--white);transform:scale(1.06)}
.ld .arrow svg{width:22px;height:22px}
.ld .prev{left:var(--gut)}.ld .next{right:var(--gut)}
.ld .hud{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;justify-content:space-between;align-items:flex-end;gap:12px;padding:18px var(--gut)}
.ld .hud .left{display:flex;gap:8px;flex-wrap:wrap}
.ld .pill{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:4px;border:0;background:rgba(255,255,255,.95);color:var(--ink);font-weight:600;cursor:pointer;text-decoration:none}
.ld .pill svg{width:20px;height:20px}
/* photo buttons are small round icons so they don't cover the photo */
.ld .hud .pill{width:44px;height:44px;min-height:0;padding:0;justify-content:center;border-radius:50%;background:rgba(255,255,255,.88);box-shadow:0 3px 10px rgba(0,0,0,.25)}
.ld .hud{padding:12px var(--gut)}
@media (max-width:640px){.ld .hud .pill{width:38px;height:38px}.ld .hud{padding:10px 12px}.ld .count{font-size:18px}.ld .arrow{width:38px;height:38px;margin-top:-19px;background:rgba(255,255,255,.8)}.ld .arrow svg{width:18px;height:18px}.ld .credit .chip{font-size:11px;padding:4px 7px}}
.ld .count{color:var(--white);font-family:var(--display);font-weight:600;font-size:22px;font-variant-numeric:tabular-nums;white-space:nowrap}
.ld .credit{position:absolute;top:16px;left:var(--gut);z-index:3;display:flex;gap:8px}
.ld .chip{font-size:12px;font-weight:600;padding:5px 9px;border-radius:3px;background:var(--ink);color:var(--white);letter-spacing:.04em}
.ld .chip.red{background:var(--red)}
.ld .caption{position:absolute;top:18px;right:var(--gut);z-index:3;font-size:13px;color:rgba(255,255,255,.9);text-shadow:0 1px 4px rgba(0,0,0,.5)}
@media (max-width:640px){.ld .arrow{width:44px;height:44px;margin-top:-22px}.ld .caption{display:none}}
.ld .rail{background:var(--stage);padding:10px 0 12px}
.ld .rail ol{list-style:none;margin:0;padding:0 var(--gut);display:flex;gap:8px;overflow-x:auto;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:#3A4060 transparent}
.ld .rail li{flex:none}
.ld .rail button{display:block;padding:0;border:2px solid transparent;border-radius:4px;overflow:hidden;cursor:pointer;background:none;opacity:.55;transition:opacity .25s,border-color .25s}
.ld .rail button:hover{opacity:.9}
.ld .rail button[aria-current="true"]{opacity:1;border-color:var(--coral)}
.ld .rail img{width:132px;height:88px;object-fit:cover}
@media (max-width:640px){.ld .rail img{width:96px;height:64px}}
.ld .title{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:end;padding-block:36px 28px;border-bottom:1px solid var(--line)}
.ld .title .tags{display:flex;gap:8px;margin-bottom:12px}
.ld .title .sub,.ld .title .brk{margin:10px 0 0;font-size:19px;color:var(--muted)}
.ld .title .brk b{color:var(--ink);font-weight:600}
.ld .price{text-align:right}
.ld .price b{display:block;font-family:var(--display);font-weight:700;font-size:clamp(44px,5.4vw,72px);line-height:.9;font-variant-numeric:tabular-nums}
.ld .price>span{display:block;margin-top:8px;color:var(--muted);font-size:15px;font-variant-numeric:tabular-nums}
.ld .acts{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:14px}
.ld .save.big{position:static;width:auto;height:44px;padding:0 16px;border-radius:4px;gap:8px;display:inline-flex;align-items:center;font-weight:600;border:1px solid var(--line);box-shadow:none;color:var(--ink)}
@media (max-width:760px){.ld .title{grid-template-columns:1fr}.ld .price{text-align:left}.ld .acts{justify-content:flex-start}}
.ld .facts{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border-bottom:1px solid var(--line)}
.ld .facts div{padding:22px 16px;border-left:1px solid var(--line);display:flex;flex-direction:column;gap:2px;min-width:0}
.ld .facts div:first-child{border-left:0;padding-left:0}
.ld .facts b{font-family:var(--display);font-weight:700;font-size:36px;line-height:1;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.ld .facts span{font-size:14px;color:var(--muted)}
@media (max-width:900px){.ld .facts{grid-template-columns:repeat(3,minmax(0,1fr))}.ld .facts div:nth-child(4){border-left:0;padding-left:0}.ld .facts div:nth-child(n+4){border-top:1px solid var(--line)}}
.ld .body{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:56px;padding-block:48px 80px}
@media (max-width:1000px){.ld .body{grid-template-columns:1fr}}
.ld .main{display:flex;flex-direction:column;gap:56px;min-width:0}
.ld .main section{display:flex;flex-direction:column;gap:18px}
.ld h2{font-size:clamp(30px,3.4vw,40px)}
.ld .desc p{margin:0;max-width:66ch;font-size:18px;white-space:pre-line}
.ld .tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);overflow-x:auto}
.ld .tabs button{flex:none;min-height:46px;padding:0 16px;border:0;background:none;font-weight:600;color:var(--muted);cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-1px}
.ld .tabs button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--red)}
.ld dl.kv{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:40px}
.ld dl.kv div{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line);min-width:0}
.ld dl.kv dt{color:var(--muted)}
.ld dl.kv dd{margin:0;font-weight:600;text-align:right;font-variant-numeric:tabular-nums}
@media (max-width:640px){.ld dl.kv{grid-template-columns:1fr}}
.ld .tbl{overflow-x:auto}
.ld table{width:100%;min-width:480px;border-collapse:collapse;font-variant-numeric:tabular-nums}
.ld th{text-align:left;font-size:13px;font-weight:600;color:var(--muted);padding:10px 12px 10px 0;border-bottom:2px solid var(--ink)}
.ld td{padding:12px 12px 12px 0;border-bottom:1px solid var(--line)}
.ld td:first-child{font-weight:600}
.ld .loc{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:24px;align-items:stretch}
@media (max-width:700px){.ld .loc{grid-template-columns:1fr}}
.ld .map{min-height:280px;border-radius:6px;overflow:hidden;background:var(--mist);z-index:0}
.ld .loc ul{list-style:none;margin:0;padding:0}
.ld .loc li{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid var(--line)}
.ld .loc li span:last-child{color:var(--muted);text-align:right}
.ld .calc{border:1px solid var(--line);border-radius:6px;padding:24px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:end}
.ld .calc label{display:block;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:4px}
.ld .calc input,.ld .calc select{width:100%;height:46px;border:1px solid var(--line);border-radius:4px;padding:0 10px;background:var(--white);color:var(--ink);font:inherit;font-variant-numeric:tabular-nums}
.ld .calc .out{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;padding-top:14px;border-top:1px solid var(--line)}
.ld .calc .out b{font-family:var(--display);font-size:48px;line-height:1;font-variant-numeric:tabular-nums}
.ld .calc .out small{color:var(--muted);flex-basis:100%}
@media (max-width:700px){.ld .calc{grid-template-columns:1fr 1fr}}
.ld .aside{position:relative}
.ld .agent{position:sticky;top:96px;border:1px solid var(--line);border-radius:6px;overflow:hidden;box-shadow:0 20px 40px -24px rgba(20,24,51,.35);background:var(--white)}
.ld .agent .who{display:flex;align-items:flex-end;gap:14px;background:var(--navy);color:var(--white);padding:18px 20px 0}
.ld .agent .who img{width:96px;height:auto;flex:none}
.ld .agent .who div{padding-bottom:16px}
.ld .agent .who strong{display:block;font-family:var(--display);font-size:26px;text-transform:uppercase;line-height:1}
.ld .agent .who span{font-size:14px;color:var(--pale)}
.ld .atabs{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--line)}
.ld .atabs button{min-height:52px;padding:6px 10px;border:0;background:var(--mist);font-weight:600;color:var(--muted);cursor:pointer;border-bottom:3px solid transparent;line-height:1.2}
.ld .atabs button[aria-selected="true"]{background:var(--white);color:var(--ink);border-bottom-color:var(--red)}
.ld .agent form{padding:20px;display:flex;flex-direction:column;gap:12px}
.ld .agent label,.ld .agent .lbl{display:block;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:4px}
.ld .agent input,.ld .agent select,.ld .agent textarea{width:100%;min-height:46px;border:1px solid var(--line);border-radius:4px;padding:0 12px;background:var(--white);color:var(--ink);font:inherit}
.ld .agent textarea{padding:10px 12px;resize:vertical}
.ld .agent .two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ld .days{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.ld .days button{min-height:62px;border:1px solid var(--line);border-radius:4px;background:var(--white);cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1;color:var(--ink)}
.ld .days button small{font-size:12px;color:var(--muted)}
.ld .days button b{font-family:var(--display);font-size:24px}
.ld .days button[aria-pressed="true"]{border-color:var(--navy);background:var(--navy);color:var(--white)}
.ld .days button[aria-pressed="true"] small{color:var(--pale)}
.ld .agent .ok{margin:0;font-size:14px;color:var(--navy);font-weight:600}
.ld .agent .ok.err{color:var(--red)}
.ld .agent .fine{margin:0;font-size:13px;color:var(--muted)}
.ld .agent .alt{margin:0;padding:0 20px 20px;font-size:14px;color:var(--muted)}
.ld .similar{background:var(--mist)}
.ld .similar .wrap{padding-block:64px 80px;display:flex;flex-direction:column;gap:28px}
.ld .similar .grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
@media (max-width:900px){.ld .similar .grid3{grid-template-columns:1fr}}
.ld dialog{width:min(1200px,100vw - 32px);max-height:calc(100vh - 32px);padding:0;border:0;border-radius:6px;background:var(--white);color:var(--ink)}
.ld dialog::backdrop{background:rgba(14,17,40,.85)}
.ld .dlg-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 20px;background:var(--white);border-bottom:1px solid var(--line)}
.ld .dlg-head h2{font-size:26px}
.ld .all{padding:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ld .all button{padding:0;border:0;background:none;cursor:pointer;border-radius:4px;overflow:hidden}
.ld .all button:first-child{grid-column:1/-1}
.ld .all img{width:100%;aspect-ratio:3/2;object-fit:cover}
@media (max-width:600px){.ld .all{grid-template-columns:1fr}}
.ld-loading{padding-block:120px;text-align:center;color:var(--muted)}
@media (prefers-reduced-motion:reduce){.ld .slide,.ld .slide img,.card.lc .ph img{transition:none!important}}

/* ---------- search box + layout (Oct 2) ---------- */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.sbox{display:flex;align-items:center;gap:10px;border:2px solid var(--navy);border-radius:8px;padding:6px 6px 6px 16px;background:var(--white);margin-bottom:12px;box-shadow:0 10px 30px -18px rgba(20,24,51,.4)}
.sbox svg{width:22px;height:22px;color:var(--muted);flex:none}
.sbox input{flex:1;min-width:0;height:48px;border:0;background:none;font-size:19px;color:var(--ink);outline:none}
.sbox input::-webkit-search-cancel-button{cursor:pointer}
.sbox .btn{min-height:48px;flex:none}
.ls .filters{margin-bottom:18px}
.lsband .wrap{max-width:2200px}
.hidemap{display:none;min-height:44px;margin-left:auto}
@media (min-width:1100px){.hidemap{display:inline-flex}}
@media (min-width:1600px){
  .ls-wrap,.ls-wrap[data-view]{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
  .ls-wrap .lgrid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:1100px){
  .ls-wrap.nomap,.ls-wrap.nomap[data-view]{grid-template-columns:1fr}
  .ls-wrap.nomap .ls-mapcol{display:none}
  .ls-wrap.nomap .lgrid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
}
