/* ============================================================
   MANAZEL — Visual system
   ADREC palette · Helvetica Neue · dark "boardroom" + light "paper"
   ============================================================ */

/* ---------- DARK (default · evening / boardroom) ---------- */
:root{
  --olive:#ABA360; --olive-hi:#C9BE82; --oxblood:#9A565B; --espresso:#3F2021;
  --bg:#14100F; --bg2:#1A1513; --bgrad:#241C18;
  --surface:#211A17; --surface2:#2A211D; --surface3:#332823;
  --line:rgba(241,236,226,.085); --line2:rgba(241,236,226,.14);
  --gold:#ABA360; --gold-hi:#C9BE82;
  --text:#F2ECE1; --text2:#D8CFBF; --muted:#9D938A;
  --topfade1:rgba(20,16,15,.92); --topfade2:rgba(20,16,15,0);
  --scrim1:rgba(12,9,8,.05); --scrim2:rgba(12,9,8,.88);
  --shadow:0 40px 110px rgba(0,0,0,.62);
  --card-shadow:0 18px 40px rgba(0,0,0,.4);
  --maptiles:"esri-dark";
  --ph-frame:#0a0807;
}
/* ---------- LIGHT (daylight / paper) ---------- */
[data-theme="light"]{
  --olive:#7A7440; --olive-hi:#5C572B; --oxblood:#742E34; --espresso:#3F2021;
  --bg:#F1EBDD; --bg2:#F7F1E6; --bgrad:#FBF7EE;
  --surface:#FFFFFF; --surface2:#FBF6EC; --surface3:#F3ECDD;
  --line:rgba(63,32,33,.13); --line2:rgba(63,32,33,.24);
  --gold:#7A7440; --gold-hi:#5C572B;
  --text:#241A18; --text2:#41342B; --muted:#665A4D;
  --topfade1:rgba(247,241,230,.94); --topfade2:rgba(247,241,230,0);
  --scrim1:rgba(28,20,16,.02); --scrim2:rgba(28,20,16,.74);
  --shadow:0 40px 110px rgba(120,100,70,.26);
  --card-shadow:0 16px 36px rgba(120,100,70,.16);
  --maptiles:"esri-light";
  --ph-frame:#E4DBC9;
}

*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html,body{margin:0; height:100%}
body{
  font-family:"Helvetica Neue","HelveticaNeue",Helvetica,Arial,system-ui,sans-serif;
  background:var(--ph-frame); color:var(--text);
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  display:flex; align-items:center; justify-content:center; min-height:100dvh;
  transition:background .5s ease;
}
img{display:block}

/* ============ STAGE / RESPONSIVE SHELL ============ */
.stage{ width:100%; min-height:100dvh; display:flex; align-items:center; justify-content:center; }
.app{
  position:relative; width:100%; max-width:440px; height:100dvh; max-height:940px;
  background:
    radial-gradient(130% 70% at 50% -8%, var(--bgrad) 0%, var(--bg) 52%),
    var(--bg);
  color:var(--text);
  overflow:hidden; display:flex; flex-direction:column; box-shadow:var(--shadow);
  transition:background .5s ease;
}
@media(min-width:480px){ .app{ border-radius:46px; border:1px solid rgba(255,255,255,.06); } }

/* desktop / tablet (incl. iPad portrait ≥760px): widen into a dashboard canvas */
@media(min-width:760px){
  .app{
    max-width:1180px; max-height:860px; height:88dvh; border-radius:28px;
    border:1px solid var(--line2);
  }
  body{ padding:24px; }
}

/* ============ BRAND DEVICE — ADREC lines ============ */
.adrec-lines{ position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image:repeating-linear-gradient(180deg, var(--line) 0 1px, transparent 1px 64px);
  -webkit-mask-image:linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
          mask-image:linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }

/* ============ SPLASH ============ */
#splash{ position:absolute; inset:0; z-index:60; display:flex; flex-direction:column;
  align-items:center; justify-content:center; overflow:hidden;
  background:radial-gradient(140% 90% at 50% 28%, #241C18 0%, #0C0908 72%);
  transition:opacity .8s ease, visibility .8s; }
#splash.hide{ opacity:0; visibility:hidden; }
#splash .poster{ position:absolute; inset:-6% ; background-size:cover; background-position:center;
  opacity:0; filter:saturate(.7) brightness(.5); animation:posterIn 4s cubic-bezier(.2,.6,.1,1) both; }
@keyframes posterIn{ 0%{opacity:0; transform:scale(1.18)} 30%{opacity:.42} 100%{opacity:.30; transform:scale(1.04)} }
#splash .vig{ position:absolute; inset:0; background:radial-gradient(120% 80% at 50% 38%, transparent 30%, rgba(8,6,5,.86) 100%); }
.splash-inner{ position:relative; text-align:center; z-index:2; }
.splash-ar{ font-size:46px; font-weight:300; letter-spacing:0; color:#F4EFE6; opacity:0; animation:rise 1.1s .2s cubic-bezier(.2,.7,.15,1) both; }
.splash-name{ font-size:21px; font-weight:300; letter-spacing:.34em; margin:14px 0 0; color:var(--olive-hi);
  opacity:0; animation:fade 1s .6s both; }
.splash-rule{ width:0; height:1px; margin:20px auto 16px;
  background:linear-gradient(90deg,transparent,var(--olive-hi),transparent); animation:grow 1.2s 1.05s forwards; }
.splash-sub{ font-size:11.5px; letter-spacing:.34em; color:#B7AC9A; text-transform:uppercase;
  opacity:0; animation:fade 1s 1.35s both; }
.splash-foot{ position:absolute; bottom:42px; left:0; right:0; text-align:center; z-index:2;
  font-size:9.5px; letter-spacing:.28em; color:#8C8070; text-transform:uppercase; opacity:0; animation:fade 1.1s 1.8s both; }
@keyframes rise{ from{transform:translateY(16px); opacity:0} to{transform:translateY(0); opacity:1} }
@keyframes fade{ to{opacity:1} }
@keyframes grow{ to{width:132px} }

/* ============ APP SHELL ============ */
#shell{ flex:1; display:flex; flex-direction:column; min-height:0; opacity:0; transform:translateY(6px);
  transition:opacity .7s .1s ease, transform .7s .1s ease; }
#shell.show{ opacity:1; transform:none; }

header.top{ display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:calc(16px + env(safe-area-inset-top)) 22px 15px; position:relative; z-index:8;
  border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,var(--topfade1),var(--topfade2)); backdrop-filter:blur(10px); }
.brand{ display:flex; align-items:center; gap:11px; }
.brand .glyph{ width:34px; height:34px; flex:0 0 auto; border:1px solid var(--line2); border-radius:9px;
  display:grid; place-items:center; color:var(--olive-hi); position:relative; overflow:hidden; }
.brand .glyph::before{ content:""; position:absolute; inset:0;
  background:repeating-linear-gradient(180deg, currentColor 0 1.5px, transparent 1.5px 6px); opacity:.5; }
.brand .glyph span{ position:relative; font-size:15px; font-weight:300; letter-spacing:1px; }
.brand .wm{ display:flex; flex-direction:column; line-height:1; }
.brand .wm b{ font-weight:400; letter-spacing:.26em; font-size:17px; }
.brand .wm small{ font-size:8.5px; letter-spacing:.2em; color:var(--muted); margin-top:6px; text-transform:uppercase; }
.htools{ display:flex; align-items:center; gap:9px; }
.pill{ font-size:10.5px; letter-spacing:.04em; color:var(--text2); border:1px solid var(--line2); border-radius:999px; padding:7px 12px; display:flex; align-items:center; gap:6px; }
.pill .dot{ width:6px; height:6px; border-radius:50%; background:var(--olive); box-shadow:0 0 0 0 var(--olive); animation:live 2.4s infinite; }
@keyframes live{ 0%{box-shadow:0 0 0 0 rgba(171,163,96,.55)} 70%{box-shadow:0 0 0 7px rgba(171,163,96,0)} 100%{box-shadow:0 0 0 0 rgba(171,163,96,0)} }
.iconbtn{ width:38px; height:38px; border-radius:50%; border:1px solid var(--line2); background:var(--surface); color:var(--text);
  display:grid; place-items:center; cursor:pointer; transition:transform .25s, background .25s; }
.iconbtn:hover{ background:var(--surface2); }
.iconbtn:active{ transform:scale(.9); }
.iconbtn svg{ width:17px; height:17px; }

.scrollwrap{ flex:1; min-height:0; position:relative; }
.scroll{ position:absolute; inset:0; overflow-y:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.scroll::-webkit-scrollbar{ display:none }

/* ============ HERO ============ */
.hero{ padding:26px 22px 8px; }
.hero .eyebrow{ font-size:10.5px; letter-spacing:.28em; text-transform:uppercase; color:var(--olive-hi); margin-bottom:12px; }
.hero h1{ font-weight:200; font-size:30px; line-height:1.12; margin:0 0 8px; letter-spacing:-.01em; }
.hero h1 b{ font-weight:500; color:var(--text); }
.hero p{ margin:0; color:var(--muted); font-size:13.5px; line-height:1.5; max-width:44ch; }

/* ============ STATS ============ */
.stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:11px; padding:20px 22px 6px; }
.stat{ position:relative; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:15px 12px; overflow:hidden; }
.stat::after{ content:""; position:absolute; left:0; top:0; bottom:0; width:2px; background:var(--olive); opacity:.0; transition:opacity .5s; }
.stat.lit::after{ opacity:.7; }
.stat b{ display:block; font-size:24px; font-weight:300; letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
.stat b .cur{ font-size:13px; color:var(--muted); margin-right:3px; }
.stat span{ font-size:9.5px; color:var(--muted); letter-spacing:.12em; text-transform:uppercase; margin-top:5px; display:block; }

/* ============ SECTION HEAD ============ */
.section-h{ display:flex; align-items:baseline; justify-content:space-between; padding:24px 22px 12px; }
.section-h h2{ font-size:11.5px; letter-spacing:.2em; text-transform:uppercase; color:var(--text2); font-weight:500; margin:0; }
.section-h .link{ font-size:12px; color:var(--olive-hi); cursor:pointer; display:flex; align-items:center; gap:4px; }
.section-h .link:hover{ text-decoration:underline; }

/* ============ COMMUNITY CARDS ============ */
.comm-grid{ display:flex; flex-direction:column; gap:14px; padding:0 22px 26px; }
.comm{ position:relative; border-radius:20px; overflow:hidden; border:1px solid var(--line); min-height:172px;
  display:flex; align-items:flex-end; cursor:pointer; isolation:isolate; box-shadow:var(--card-shadow);
  opacity:0; transform:translateY(16px); }
.comm.in{ animation:cardIn .7s cubic-bezier(.2,.7,.15,1) forwards; }
@keyframes cardIn{ to{ opacity:1; transform:none } }
.comm .sat{ position:absolute; inset:0; background-size:cover; background-position:center; transform:scale(1.06);
  transition:transform 6s ease; }
.comm:hover .sat{ transform:scale(1.14); }
.comm .scrim{ position:absolute; inset:0; background:linear-gradient(180deg, var(--scrim1) 0%, var(--scrim2) 92%); }
.comm .tone{ position:absolute; inset:0; mix-blend-mode:soft-light; opacity:.5;
  background:linear-gradient(160deg, var(--ca) 0%, transparent 60%); }
.comm .edge{ position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--ca); }
.comm .info{ position:relative; z-index:2; padding:17px 18px; width:100%; color:#F6F1E7; }
.comm .isl{ font-size:9.5px; letter-spacing:.22em; text-transform:uppercase; color:rgba(255,255,255,.78); display:flex; align-items:center; gap:7px; }
.comm .isl::before{ content:""; width:13px; height:1px; background:var(--ca); }
.comm h3{ margin:7px 0 0; font-size:22px; font-weight:400; letter-spacing:-.005em; }
.comm .row{ display:flex; align-items:center; justify-content:space-between; margin-top:11px; }
.comm .from{ font-size:12.5px; color:rgba(246,241,231,.92); }
.comm .from b{ font-weight:500; }
.comm .count{ font-size:11px; padding:6px 12px; border-radius:999px; font-weight:500; letter-spacing:.02em;
  color:#fff; background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.28); backdrop-filter:blur(4px);
  display:flex; align-items:center; gap:6px; }
.comm .count i{ width:6px; height:6px; border-radius:50%; background:var(--ca); font-style:normal; }

/* ============ LIST VIEW ============ */
.subhead{ padding:16px 22px 8px; display:flex; align-items:center; gap:13px; }
.back{ flex:0 0 auto; width:40px; height:40px; border-radius:50%; border:1px solid var(--line2); background:var(--surface);
  color:var(--text); display:grid; place-items:center; cursor:pointer; transition:transform .22s, background .22s; }
.back:hover{ background:var(--surface2); } .back:active{ transform:scale(.9); }
.back svg{ width:17px; height:17px; }
.subhead .t{ display:flex; flex-direction:column; min-width:0; }
.subhead .t b{ font-size:19px; font-weight:400; letter-spacing:-.005em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.subhead .t span{ font-size:11px; color:var(--muted); margin-top:3px; letter-spacing:.02em; }

.filters{ display:flex; gap:8px; overflow-x:auto; padding:12px 22px 14px; scrollbar-width:none; }
.filters::-webkit-scrollbar{ display:none }
.chip{ flex:0 0 auto; font-size:12px; padding:9px 15px; border-radius:999px; border:1px solid var(--line2);
  background:var(--surface); color:var(--muted); cursor:pointer; white-space:nowrap; letter-spacing:.01em;
  transition:background .25s, color .25s, border-color .25s, transform .15s; }
.chip:active{ transform:scale(.95); }
.chip.on{ background:var(--olive); border-color:var(--olive); color:#1a160a; font-weight:500; }
[data-theme="light"] .chip.on{ color:#fff; }

.cards{ display:flex; flex-direction:column; gap:13px; padding:4px 22px 34px; }
.vcard{ position:relative; background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:0;
  overflow:hidden; cursor:pointer; box-shadow:var(--card-shadow);
  opacity:0; transform:translateY(12px); transition:border-color .3s, transform .2s; }
.vcard.in{ animation:cardIn .55s cubic-bezier(.2,.7,.15,1) forwards; }
.vcard:hover{ border-color:var(--line2); }
.vcard:active{ transform:scale(.99); }
.vcard .vbody{ padding:16px 17px; }
.vcard .vtop{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.vcard .price{ font-size:21px; font-weight:400; letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
.vcard .price .cur{ font-size:12px; color:var(--muted); margin-right:4px; font-weight:400; }
.vcard .poa{ font-size:13px; color:var(--olive-hi); border:1px dashed var(--line2); padding:5px 11px; border-radius:9px; }
.vcard .badge{ flex:0 0 auto; font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--text2);
  background:var(--surface3); padding:6px 10px; border-radius:8px; border:1px solid var(--line); }
.vmeta{ display:flex; gap:18px; margin-top:14px; color:var(--text2); font-size:13px; }
.vmeta div{ display:flex; align-items:center; gap:7px; }
.vmeta svg{ width:15px; height:15px; opacity:.7; }
.vfoot{ margin-top:14px; padding-top:13px; border-top:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; }
.vfoot .ag{ font-size:11.5px; color:var(--muted); display:flex; align-items:center; gap:7px; }
.vfoot .ag .portal{ font-size:9px; letter-spacing:.06em; text-transform:uppercase; color:var(--olive-hi); border:1px solid var(--line2); border-radius:6px; padding:3px 6px; }
.vfoot .go{ font-size:12px; color:var(--olive-hi); display:flex; align-items:center; gap:4px; }

/* ============ MAP TAB ============ */
#mapView{ position:absolute; inset:0; }
#map{ position:absolute; inset:0; background:var(--bg); }
.map-top{ position:absolute; top:14px; left:16px; right:16px; z-index:600; display:flex; gap:10px; align-items:center; pointer-events:none; }
.map-title{ flex:1; background:var(--topfade1); backdrop-filter:blur(10px); border:1px solid var(--line2); border-radius:13px;
  padding:11px 14px; box-shadow:0 8px 24px rgba(0,0,0,.25); pointer-events:auto; }
.map-title b{ display:block; font-size:13px; font-weight:500; }
.map-title span{ font-size:10.5px; color:var(--muted); letter-spacing:.02em; }
.layer-toggle{ display:flex; background:var(--topfade1); backdrop-filter:blur(10px); border:1px solid var(--line2);
  border-radius:11px; overflow:hidden; pointer-events:auto; box-shadow:0 8px 24px rgba(0,0,0,.25); }
.layer-toggle button{ border:0; background:transparent; color:var(--muted); font:inherit; font-size:11px; padding:9px 12px; cursor:pointer; transition:background .2s,color .2s; }
.layer-toggle button.on{ background:var(--olive); color:#1a160a; font-weight:500; }
[data-theme="light"] .layer-toggle button.on{ color:#fff; }
.legend{ position:absolute; left:16px; bottom:16px; z-index:600; background:var(--topfade1); backdrop-filter:blur(10px);
  border:1px solid var(--line2); border-radius:13px; padding:12px 14px; box-shadow:0 8px 24px rgba(0,0,0,.28); }
.legend .lt{ font-size:9px; letter-spacing:.18em; text-transform:uppercase; color:var(--muted); margin-bottom:9px; }
.legend .lg{ display:flex; align-items:center; gap:9px; margin:6px 0; font-size:11.5px; color:var(--text); }
.legend .dot{ width:10px; height:10px; border-radius:50%; box-shadow:0 0 0 3px rgba(255,255,255,.12); }

/* leaflet popup theming */
.leaflet-popup-content-wrapper{ background:var(--surface); color:var(--text); border-radius:15px; border:1px solid var(--line2); box-shadow:0 18px 40px rgba(0,0,0,.4); }
.leaflet-popup-tip{ background:var(--surface); border:1px solid var(--line2); }
.leaflet-popup-content{ margin:14px 16px; font-family:inherit; }
.pp .ppc{ font-size:9.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--olive-hi); display:flex; align-items:center; gap:6px; }
.pp .ppc::before{ content:""; width:10px; height:1px; background:currentColor; }
.pp .ppp{ font-size:19px; font-weight:400; margin:5px 0 2px; font-variant-numeric:tabular-nums; }
.pp .ppm{ font-size:11.5px; color:var(--muted); margin-bottom:10px; }
.pp a{ display:block; text-align:center; text-decoration:none; font-weight:500; font-size:12px; padding:10px; border-radius:10px; margin-top:7px; transition:transform .15s; }
.pp a:active{ transform:scale(.97); }
.pp .pa{ background:var(--olive); color:#1a160a; } [data-theme="light"] .pp .pa{ color:#fff; }
.pp .pb{ background:var(--surface2); border:1px solid var(--line2); color:var(--text); }
.marker-pin{ position:relative; }
.marker-pin .core{ width:15px; height:15px; border-radius:50%; border:2px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,.5); }
.marker-pin .ring{ position:absolute; inset:-6px; border-radius:50%; border:2px solid currentColor; opacity:.0; }
.marker-pin.pulse .ring{ animation:pulsering 1.8s ease-out infinite; }
@keyframes pulsering{ 0%{transform:scale(.6); opacity:.6} 100%{transform:scale(1.7); opacity:0} }
.marker-drop{ animation:drop .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes drop{ from{ transform:translateY(-14px); opacity:0 } to{ transform:none; opacity:1 } }

/* ============ DETAIL ============ */
#detail{ position:absolute; inset:0; z-index:1500; background:var(--bg); display:flex; flex-direction:column;
  transform:translateX(100%); transition:transform .42s cubic-bezier(.3,.8,.2,1); will-change:transform; }
#detail.open{ transform:none; }
.dhero{ position:relative; height:268px; flex:0 0 auto; display:flex; align-items:flex-end; overflow:hidden; }
.dhero .sat{ position:absolute; inset:0; background-size:cover; background-position:center; transform:scale(1.12); }
#detail.open .dhero .sat{ animation:heroZoom 7s ease forwards; }
@keyframes heroZoom{ to{ transform:scale(1.0) } }
.dhero .scrim{ position:absolute; inset:0; background:linear-gradient(180deg, rgba(10,8,7,.18) 0%, rgba(10,8,7,.5) 55%, var(--bg) 100%); }
.dhero .tone{ position:absolute; inset:0; mix-blend-mode:soft-light; opacity:.45; background:linear-gradient(150deg, var(--ca), transparent 55%); }
.dhero .dback{ position:absolute; top:calc(16px + env(safe-area-inset-top)); left:18px; z-index:4;
  background:rgba(20,16,15,.5); border-color:rgba(255,255,255,.2); color:#fff; backdrop-filter:blur(6px); }
.dhero .share{ position:absolute; top:calc(16px + env(safe-area-inset-top)); right:18px; z-index:4;
  background:rgba(20,16,15,.5); border-color:rgba(255,255,255,.2); color:#fff; backdrop-filter:blur(6px); }
.dhero .dtop{ position:relative; z-index:3; padding:20px; width:100%; color:#F6F1E7; }
.dhero .dcomm{ font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--olive-hi); display:flex; align-items:center; gap:8px; }
.dhero .dcomm::before{ content:""; width:16px; height:1px; background:currentColor; }
.dhero .dprice{ font-size:33px; font-weight:300; margin:8px 0 0; letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
.dhero .dprice .cur{ font-size:16px; color:rgba(246,241,231,.7); margin-right:5px; }
.dscroll{ flex:1; overflow-y:auto; padding:20px 22px 30px; scrollbar-width:none; }
.dscroll::-webkit-scrollbar{ display:none }
.dsect-anim > *{ opacity:0; transform:translateY(10px); }
#detail.open .dsect-anim > *{ animation:upIn .5s cubic-bezier(.2,.7,.15,1) forwards; }
#detail.open .dsect-anim > *:nth-child(1){ animation-delay:.16s } 
#detail.open .dsect-anim > *:nth-child(2){ animation-delay:.24s }
#detail.open .dsect-anim > *:nth-child(3){ animation-delay:.32s }
#detail.open .dsect-anim > *:nth-child(4){ animation-delay:.40s }
#detail.open .dsect-anim > *:nth-child(5){ animation-delay:.48s }
@keyframes upIn{ to{ opacity:1; transform:none } }

.specgrid{ display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.spec{ background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:15px; }
.spec .sl{ font-size:9.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); display:flex; align-items:center; gap:6px; }
.spec .sl svg{ width:13px; height:13px; opacity:.7; }
.spec b{ display:block; font-size:20px; font-weight:300; margin-top:8px; font-variant-numeric:tabular-nums; }
.spec b small{ font-size:11px; color:var(--muted); font-weight:400; }
.dblock{ margin-top:13px; background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:17px; }
.dblock h4{ margin:0 0 9px; font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--text2); display:flex; align-items:center; gap:8px; }
.dblock h4::after{ content:""; flex:1; height:1px; background:var(--line); }
.dblock p{ margin:0; font-size:14px; line-height:1.6; color:var(--text2); }

.dmap-wrap{ margin-top:13px; border-radius:14px; overflow:hidden; border:1px solid var(--line); position:relative; height:168px; }
#dmap{ position:absolute; inset:0; }
.dmap-tag{ position:absolute; left:12px; bottom:12px; z-index:500; font-size:10px; letter-spacing:.08em; text-transform:uppercase;
  color:#fff; background:rgba(20,16,15,.55); border:1px solid rgba(255,255,255,.2); border-radius:8px; padding:5px 9px; backdrop-filter:blur(6px); }

/* upload slot for future villa imagery */
.upload-row{ margin-top:13px; }
.upload-row .ul-label{ font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin-bottom:9px; display:flex; align-items:center; gap:8px; }
.upload-row .slots{ display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.upload-row image-slot{ display:block; width:100%; aspect-ratio:1/1; border-radius:12px; overflow:hidden;
  border:1px dashed var(--line2); background:var(--surface2); }

.actions{ display:flex; flex-direction:column; gap:10px; margin-top:16px; }
.btn{ display:flex; align-items:center; justify-content:center; gap:10px; padding:16px; border-radius:14px;
  font-size:14.5px; font-weight:500; text-decoration:none; cursor:pointer; border:1px solid transparent; transition:transform .2s, background .25s; }
.btn:active{ transform:scale(.98); }
.btn svg{ width:17px; height:17px; }
.btn-primary{ background:var(--olive); color:#1a160a; } [data-theme="light"] .btn-primary{ color:#fff; }
.btn-primary:hover{ background:var(--olive-hi); }
.btn-ghost{ background:var(--surface); border-color:var(--line2); color:var(--text); }
.btn-ghost:hover{ background:var(--surface2); }
.btn-disabled{ background:var(--surface); border:1px dashed var(--line2); color:var(--muted); cursor:default; }
.disclaimer{ font-size:11px; color:var(--muted); text-align:center; margin-top:18px; line-height:1.55; max-width:40ch; margin-left:auto; margin-right:auto; }

/* ============ TAB BAR ============ */
.tabbar{ position:relative; display:flex; border-top:1px solid var(--line);
  background:linear-gradient(0deg,var(--topfade1),var(--topfade2)); backdrop-filter:blur(12px);
  padding-bottom:env(safe-area-inset-bottom); }
.tab{ flex:1; text-align:center; padding:12px 0 14px; color:var(--muted); font-size:10px; letter-spacing:.04em; cursor:pointer; transition:color .25s; position:relative; z-index:2; }
.tab.on{ color:var(--olive-hi); }
.tab svg{ width:21px; height:21px; display:block; margin:0 auto 5px; }
.tab-ind{ position:absolute; top:0; height:2px; background:var(--olive); border-radius:0 0 3px 3px; transition:left .35s cubic-bezier(.3,.8,.2,1), width .35s cubic-bezier(.3,.8,.2,1); z-index:3; }

/* ============ DESKTOP / TABLET LAYOUT ============ */
@media(min-width:760px){
  .scrollwrap.desk-2col .scroll{ }
  .hero{ padding:34px 40px 8px; }
  .hero h1{ font-size:40px; max-width:18ch; }
  .hero p{ font-size:15px; }
  .stats{ grid-template-columns:repeat(3,1fr); gap:16px; padding:24px 40px 8px; max-width:720px; }
  .section-h{ padding:30px 40px 14px; }
  .comm-grid{ display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:0 40px 36px; }
  .comm{ min-height:215px; }
  .cards{ display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:6px 40px 40px; }
  .filters{ padding:14px 40px 16px; }
  .subhead{ padding:20px 40px 10px; }
  .dscroll{ padding:24px 14% 36px; }
  .specgrid{ grid-template-columns:repeat(4,1fr); }
  .dhero{ height:320px; }
  /* detail as right-side drawer on desktop */
  #detail{ left:auto; width:min(560px,55%); border-left:1px solid var(--line2); box-shadow:-30px 0 90px rgba(0,0,0,.5); }
  .tab{ font-size:11px; }
}

/* reduced motion */
@media(prefers-reduced-motion:reduce){
  *{ animation-duration:.001s !important; transition-duration:.08s !important; }
  .comm,.vcard{ opacity:1 !important; transform:none !important; }
  .dsect-anim > *{ opacity:1 !important; transform:none !important; }
}
.hidden{ display:none !important; }
