/* estate-real.css — THE ESTATE, photoreal (client 2026-08-01).
   The PSD's OnlyMasterplan layer floats on the brand green; our designed
   medallions replace the baked markers; the camera, card, legend and pins
   are all IvyOra/Acumin + ivory/bronze — the same jewellery as home.
   Scoped to #masterplanView.est-mode so it wins over theme-green's
   surface pass without breaking the LAST-sheet rule. */

#masterplanView.est-mode{
  background:var(--e-ground);
}
/* the same leaf-shadow world as home, a register quieter */
#masterplanView.est-mode::before{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:url("assets/brand/eden-leafshadow-plate-light.webp") center/cover no-repeat;
  opacity:.55;
}
#masterplanView.est-mode::after{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(120% 120% at 50% 44%, transparent 55%, rgba(63,89,58,.12) 100%);
}
#masterplanView.est-mode .masterplan-copy,
#masterplanView.est-mode .masterplan-filter-dock,
#masterplanView.est-mode .model-frame{z-index:1}

/* ── the frame is the full canvas — the plate breathes inside it ────── */
#masterplanView.est-mode .model-frame.est-frame{
  position:absolute;inset:0;left:0;top:0;
  background:transparent;border:0;box-shadow:none;
}
#masterplanView.est-mode .model-host.est-host{
  position:absolute;inset:0;overflow:hidden;
  touch-action:none;cursor:grab;
}
#masterplanView.est-mode .model-host.est-host:active{cursor:grabbing}
.est-stage{
  position:absolute;left:0;top:0;transform-origin:0 0;
  will-change:transform;--inv:1;
}
.est-plate{
  display:block;width:100%;height:100%;
  filter:drop-shadow(0 60px 120px rgba(63,89,58,.18)) drop-shadow(0 18px 44px rgba(63,89,58,.16));
  pointer-events:none;user-select:none;-webkit-user-drag:none;
}
/* layers are hit-transparent — only their pins catch taps (a full-stage
   layer div would swallow every click meant for the layer beneath it) */
.est-layer{position:absolute;inset:0;pointer-events:none}
.est-layer>button{pointer-events:auto}

/* ── amenity medallions — ivory jewellery at the PSD's marker points ── */
.est-am{
  position:absolute;width:46px;height:46px;margin:-23px 0 0 -23px;
  transform:scale(var(--inv,1));transform-origin:50% 50%;
  border-radius:50%;border:0;background:transparent;padding:0;
  pointer-events:auto;cursor:pointer;
}
.est-am i{
  position:absolute;inset:5px;border-radius:50%;
  background:
    radial-gradient(ellipse 70% 45% at 50% 18%, rgba(255,255,255,.6), rgba(255,255,255,0) 62%),
    linear-gradient(180deg,var(--eden-beige-3) 0%,var(--eden-beige-2) 58%,var(--eden-beige-1) 100%);
  border:1px solid var(--eden-olive);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.6),
    0 2px 5px rgba(63,89,58,.15),
    0 8px 18px rgba(63,89,58,.11);
  transition:transform .25s var(--ease), box-shadow .25s var(--ease);
}
.est-am b{
  position:absolute;inset:0;display:grid;place-items:center;
  font:400 17px var(--serif);color:var(--e-ink-strong);
  transition:color .25s;
}
.est-am::after{ /* seat shadow kissing the ground */
  content:"";position:absolute;left:50%;bottom:-4px;width:18px;height:5px;
  transform:translateX(-50%);border-radius:50%;
  background:rgba(63,89,58,.13);filter:blur(2px);
}
.est-am:hover i{transform:scale(1.1)}
.est-am.is-active i{
  background:
    radial-gradient(ellipse 70% 45% at 50% 18%, rgba(255,242,235,.5), rgba(255,242,235,0) 62%),
    linear-gradient(180deg,var(--eden-green) 0%,var(--eden-green-deep) 100%);
  border-color:var(--eden-green-deep);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.4),
    0 0 0 5px rgba(171,190,162,.60),
    0 0 26px rgba(63,89,58,.18),
    0 8px 18px rgba(63,89,58,.13);
}
.est-am.is-active b{color:var(--e-ground)}

/* ── plot pins — quiet ivory tags that wake as you dive ─────────────── */
.est-plot{
  position:absolute;min-width:24px;height:20px;padding:0 5px;margin:-10px 0 0 -12px;
  transform:scale(var(--inv,1));transform-origin:50% 50%;
  display:grid;place-items:center;border-radius:5px;
  font:500 9.5px var(--sans);letter-spacing:.08em;color:var(--e-ink);
  background:var(--e-glass-strong);
  border:1px solid var(--e-glass-line);
  box-shadow:0 2px 6px rgba(63,89,58,.11);
  opacity:.5;cursor:pointer;padding-top:1px;
  transition:opacity .35s, box-shadow .25s, background .25s;
}
.est-stage.is-deep .est-plot{opacity:.96}
.est-plot:hover{opacity:1}
.est-plot.is-muted{opacity:.14!important;pointer-events:auto}
.est-plot.is-selected{
  opacity:1;background:var(--eden-violet);border-color:rgba(44,63,40,.75);color:var(--e-ground);
  box-shadow:0 0 0 4px rgba(72,65,108,.28), 0 0 18px rgba(72,65,108,.35), 0 2px 6px rgba(63,89,58,.13);
}

/* ── editorial + dock inherit the dark ground ───────────────────────── */
#masterplanView.est-mode .masterplan-copy{color:var(--e-ink)}
#masterplanView.est-mode .masterplan-copy h2{color:var(--e-ink-strong)}
#masterplanView.est-mode .masterplan-copy h2 em{color:var(--eden-olive)}
#masterplanView.est-mode .masterplan-copy>p:last-of-type{color:var(--e-ink)}
#masterplanView.est-mode .masterplan-copy .kicker{color:var(--eden-olive)}
#masterplanView.est-mode .masterplan-filter button{
  border-color:var(--e-line);color:var(--e-ink);background:transparent;
}
#masterplanView.est-mode .masterplan-filter button.is-active{
  background:var(--eden-green);border-color:var(--eden-green-deep);color:var(--e-ground);
}
#masterplanView.est-mode .model-legend span{color:var(--e-ink-soft)}

/* ── the amenity card — bottom-left, a held object ──────────────────── */
.est-card{
  position:absolute;left:2.2%;bottom:9%;z-index:6;
  display:flex;align-items:center;gap:18px;
  padding:18px 20px;min-width:320px;max-width:420px;
  background:var(--e-glass-strong);
  border:1px solid var(--e-glass-line);
  backdrop-filter:blur(18px) saturate(115%);-webkit-backdrop-filter:blur(18px) saturate(115%);
  box-shadow:0 24px 60px rgba(63,89,58,.18);
  opacity:0;transform:translateY(16px);pointer-events:none;
  transition:opacity .45s var(--ease), transform .45s var(--ease);
}
.est-card.is-open{opacity:1;transform:none;pointer-events:auto}
.est-card-medallion{
  flex:0 0 auto;width:54px;height:54px;border-radius:50%;
  display:grid;place-items:center;
  font:400 22px var(--serif);color:var(--e-ink-strong);
  background:linear-gradient(180deg,var(--eden-beige-3) 0%,var(--eden-beige-2) 58%,var(--eden-beige-1) 100%);
  border:1px solid var(--eden-olive);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.6), 0 6px 14px rgba(63,89,58,.16);
}
.est-card-body .kicker{font-size:8px;letter-spacing:.3em;color:var(--eden-olive);margin:0 0 6px}
.est-card-body .kicker i{font-style:normal;color:var(--e-ink)}
.est-card-body h3{margin:0;font:400 clamp(18px,1.6vw,24px)/1.25 var(--serif);color:var(--e-ink-strong)}
.est-card-nav{display:flex;gap:8px;margin-left:auto}
.est-card-nav button{
  width:40px;height:40px;border-radius:50%;
  border:1px solid var(--e-line-strong);color:var(--e-ink);
  font-size:20px;line-height:1;background:transparent;display:grid;place-items:center;
}
.est-card-nav button:active{background:var(--e-surface-2)}
.est-card-close{
  position:absolute;right:8px;top:6px;font-size:18px;color:var(--e-ink-soft);
  background:none;border:0;padding:4px 8px;
}

/* ── the legend rail — a quiet scroller along the bottom ────────────── */
.est-legend{
  position:absolute;left:50%;bottom:2.6%;transform:translateX(-50%);z-index:5;
  display:flex;gap:8px;max-width:62%;overflow-x:auto;padding:4px 6px;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
}
.est-legend::-webkit-scrollbar{display:none}
.est-lg{
  flex:0 0 auto;display:flex;align-items:center;gap:8px;
  height:34px;padding:0 12px 0 5px;border-radius:17px;
  background:var(--e-glass-strong);border:1px solid var(--e-glass-line);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  color:var(--e-ink);font:400 9px var(--sans);letter-spacing:.14em;text-transform:uppercase;
  white-space:nowrap;transition:background .25s,border-color .25s,color .25s;
}
.est-lg b{
  width:24px;height:24px;border-radius:50%;display:grid;place-items:center;
  font:400 11.5px var(--serif);color:var(--e-ink-strong);
  background:linear-gradient(180deg,var(--eden-beige-3),var(--eden-beige-1));
  border:1px solid var(--eden-olive);
}
.est-lg.is-active{background:var(--eden-green);border-color:var(--eden-green-deep);color:var(--e-ground)}
.est-lg:active{transform:scale(.96)}

/* ── instruments + caption on the dark ground ───────────────────────── */
#masterplanView.est-mode .model-tools{z-index:6}
#masterplanView.est-mode .gesture-caption{color:var(--e-ink-soft);z-index:5}
/* loader rests once the plate is up */
#masterplanView.est-mode .est-live~* .model-loader,
#masterplanView.est-mode .model-frame.est-live .model-loader{display:none}

/* ── entrance — the plate rises, medallions bloom in a stagger ──────── */
#masterplanView.est-mode.is-active .est-plate{animation:estPlateIn 1.1s var(--ease) both}
@keyframes estPlateIn{0%{opacity:0}100%{opacity:1}}
#masterplanView.est-mode.is-active .est-am{animation:estAmIn .7s var(--ease) both}
@keyframes estAmIn{0%{opacity:0}100%{opacity:1}}
#masterplanView.est-mode.is-active .est-am:nth-child(3n){animation-delay:.5s}
#masterplanView.est-mode.is-active .est-am:nth-child(3n+1){animation-delay:.66s}
#masterplanView.est-mode.is-active .est-am:nth-child(3n+2){animation-delay:.82s}
#masterplanView.est-mode.is-active .masterplan-copy{animation:homeRise .8s .2s var(--ease) both}
#masterplanView.est-mode.is-active .est-legend{animation:homeRise .8s .55s var(--ease) both}

@media (prefers-reduced-motion:reduce){
  #masterplanView.est-mode.is-active .est-plate,
  #masterplanView.est-mode.is-active .est-am,
  #masterplanView.est-mode.is-active .masterplan-copy,
  #masterplanView.est-mode.is-active .est-legend{animation:none!important}
}

/* ── short landscape (Tab S7) ───────────────────────────────────────── */
@media (max-height:850px) and (orientation:landscape){
  .est-card{bottom:11%;min-width:290px;padding:14px 16px}
  .est-legend{max-width:56%}
}

/* ── portrait ───────────────────────────────────────────────────────── */
@media (orientation:portrait){
  #masterplanView.est-mode{background:var(--e-ground)}
  #masterplanView.est-mode .model-frame.est-frame{left:0;top:145px;right:0;bottom:0}
  .est-legend{max-width:92%;bottom:1.8%}
  .est-card{left:3%;right:3%;max-width:none;bottom:8%}
  #masterplanView.est-mode .masterplan-copy{color:var(--e-ink)}
  #masterplanView.est-mode .masterplan-copy h2{color:var(--e-ink-strong);font-size:30px}
  #masterplanView.est-mode .masterplan-filter button{border:1px solid var(--e-line);color:var(--e-ink)}
}

/* ═══════════ design pass 2 (self-review of first render) ═══════════ */

/* the old 3D dock dressed the filters as giant ivory circles — in the
   photoreal estate they become quiet dark chips under the editorial */
#masterplanView.est-mode .masterplan-filter{
  display:flex;flex-direction:column;gap:8px;border:0;background:transparent;width:auto;
}
#masterplanView.est-mode .masterplan-filter button{
  width:auto;height:40px;min-height:40px;padding:0 14px;border-radius:20px;
  display:flex;align-items:center;gap:9px;justify-content:flex-start;
  background:var(--e-glass-strong);border:1px solid var(--e-glass-line);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  color:var(--e-ink);font:400 9px var(--sans);letter-spacing:.16em;
  box-shadow:none;
}
#masterplanView.est-mode .masterplan-filter button img{width:18px;height:18px;object-fit:contain;filter:none}
#masterplanView.est-mode .masterplan-filter button i.masterplan-filter-grid{transform:scale(.8)}
#masterplanView.est-mode .masterplan-filter button.is-active{
  background:var(--eden-green);border-color:var(--eden-green-deep);color:var(--e-ground);
}
/* the 3D-era legend + gesture caption retire — the editorial says it all */
#masterplanView.est-mode .model-legend{display:none}
#masterplanView.est-mode .gesture-caption{display:none}

/* instruments join the dark-glass family */
#masterplanView.est-mode .model-tools{background:transparent;border:0;box-shadow:none}
#masterplanView.est-mode .model-tools button{
  background:var(--e-glass-strong);border:1px solid var(--e-glass-line);color:var(--e-ink);
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
}
#masterplanView.est-mode .model-tools button:active{background:var(--e-surface-2)}

/* plot pins ride slightly smaller than medallions so the villas stay calm */
.est-plot{transform:scale(calc(var(--inv,1)*.8));opacity:.42}

/* the amenity card pins INSIDE the frame properly and above the legend */
.est-card{left:24px;bottom:76px;z-index:7}

/* the camera host is full-bleed for roaming — CHROME must stack above it
   or its taps land on the plan (filters were untappable) */
#masterplanView.est-mode .masterplan-filter-dock{z-index:4}

/* the plot drawer was floated per-frame by the 3D module — in the photoreal
   estate it docks bottom-right like a held folio (the camera already flies
   the selected mansion into view beside it) */
#masterplanView.est-mode .plot-drawer{
  left:auto!important;top:auto!important;right:26px!important;bottom:96px!important;
  transform:translateY(18px) scale(.97)!important;transform-origin:100% 100%!important;
}
#masterplanView.est-mode .plot-drawer.is-open{transform:none!important}

/* ═══════════ FLOATING CALLOUT above the tapped pointer (client 2026-08-01:
   "when I click, right above the pointer … a floating panel with its images
   and the details") — positioned per camera frame by estate-real.js;
   translate lifts it above the medallion, the tail points back down. ═══ */
.est-panel{
  position:absolute;left:-9999px;top:-9999px;z-index:7;
  width:min(320px,80vw);
  transform:translate(-50%, calc(-100% - 42px));
  background:var(--e-glass-strong);
  border:1px solid var(--e-glass-line);
  backdrop-filter:blur(18px) saturate(115%);-webkit-backdrop-filter:blur(18px) saturate(115%);
  box-shadow:0 28px 70px rgba(63,89,58,.19);
  opacity:0;pointer-events:none;
  transition:opacity .4s var(--ease);
}
.est-panel.is-open{opacity:1;pointer-events:auto}
.est-panel-media{margin:0;height:150px;overflow:hidden;border-bottom:1px solid var(--e-line)}
.est-panel-media img{width:100%;height:100%;object-fit:cover}
.est-panel-body{display:flex;align-items:center;gap:13px;padding:13px 15px 4px}
.est-panel-medallion{
  flex:0 0 auto;width:42px;height:42px;border-radius:50%;
  display:grid;place-items:center;
  font:400 17px var(--serif);color:var(--e-ink-strong);
  background:linear-gradient(180deg,var(--eden-beige-3) 0%,var(--eden-beige-2) 58%,var(--eden-beige-1) 100%);
  border:1px solid var(--eden-olive);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.6), 0 5px 12px rgba(63,89,58,.16);
}
.est-panel-body .kicker{font-size:7.5px;letter-spacing:.28em;color:var(--eden-olive);margin:0 0 5px}
.est-panel-body .kicker i{font-style:normal;color:var(--e-ink)}
.est-panel-body h3{margin:0;font:400 17px/1.25 var(--serif);color:var(--e-ink-strong)}
.est-panel-nav{display:flex;gap:6px;margin-left:auto}
.est-panel-nav button{
  width:36px;height:36px;border-radius:50%;
  border:1px solid var(--e-line-strong);color:var(--e-ink);
  font-size:17px;line-height:1;background:transparent;display:grid;place-items:center;
}
.est-panel-nav button:active{background:var(--e-surface-2)}
.est-panel-note{
  margin:0;padding:9px 15px 14px;
  font:400 11px/1.65 var(--sans);letter-spacing:.02em;color:var(--e-ink);
}
.est-panel-close{
  position:absolute;right:6px;top:4px;z-index:2;font-size:17px;color:var(--e-ink);
  background:var(--e-glass-strong);border:0;border-radius:50%;
  width:28px;height:28px;display:grid;place-items:center;padding:0;
}
.est-panel-tail{
  position:absolute;left:50%;bottom:-9px;width:16px;height:16px;
  transform:translateX(-50%) rotate(45deg);
  background:var(--e-glass-strong);
  border-right:1px solid var(--e-glass-line);
  border-bottom:1px solid var(--e-glass-line);
}
@media (orientation:portrait){.est-panel{width:min(300px,86vw)}}
/* the imageless panel is one row — keep the ‹ › clear of the corner × */
.est-panel-body{padding-right:38px}

/* ═══════════ LEFT LEGEND INDEX (client 2026-08-01: "in the left side give
   all the legends details; if i click, the map zooms there") — every
   amenity as a hairline row under the editorial; the active row glows.
   Tap-out on the open plan resets the camera (wired in estate-real.js). ═ */
.est-index{
  position:absolute;left:2.6%;top:31%;bottom:4.5%;z-index:4;
  width:min(252px,19vw);
  overflow-y:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  padding:6px 10px;
  background:linear-gradient(180deg, var(--e-glass-strong), var(--e-glass));
  border:1px solid var(--e-glass-line);
  backdrop-filter:blur(14px) saturate(112%);-webkit-backdrop-filter:blur(14px) saturate(112%);
  box-shadow:0 18px 44px rgba(63,89,58,.13);
  -webkit-mask-image:linear-gradient(180deg,#000 88%,transparent);
          mask-image:linear-gradient(180deg,#000 88%,transparent);
}
.est-index::-webkit-scrollbar{display:none}
.est-ix{
  display:flex;align-items:center;gap:11px;width:100%;
  min-height:38px;padding:4px 6px;text-align:left;
  border:0;border-bottom:1px solid var(--e-line);
  color:var(--e-ink);font:400 9.5px var(--sans);letter-spacing:.13em;text-transform:uppercase;
  transition:background .25s,color .25s;
}
.est-ix:last-child{border-bottom:0}
.est-ix b{
  flex:0 0 auto;width:23px;height:23px;border-radius:50%;
  display:grid;place-items:center;
  font:400 11px var(--serif);color:var(--e-ink-strong);
  background:linear-gradient(180deg,var(--eden-beige-3),var(--eden-beige-1));
  border:1px solid var(--eden-olive);
}
.est-ix span{line-height:1.45}
.est-ix:active{background:var(--e-surface-2)}
.est-ix.is-active{color:var(--e-ink-strong)}
.est-ix.is-active b{
  background:linear-gradient(180deg,var(--eden-green),var(--eden-green-deep));color:var(--e-ground);
  border-color:var(--eden-green-deep);box-shadow:0 0 12px rgba(63,89,58,.16);
}
/* entrance with the editorial */
#masterplanView.est-mode.is-active .est-index{animation:homeRise .8s .4s var(--ease) both}
@media (prefers-reduced-motion:reduce){#masterplanView.est-mode.is-active .est-index{animation:none!important}}
/* short landscape: the column starts higher, rows tighten */
@media (max-height:850px) and (orientation:landscape){
  .est-index{top:36%;width:222px}
  .est-ix{min-height:34px;font-size:8.5px}
}
/* portrait: the plan owns the screen — the pointers are the index */
@media (orientation:portrait){.est-index{display:none}}
