:root {
  --bg: #0b1f19;
  --ink: #0f2a22;
  --glass: rgba(13, 34, 27, 0.72);
  --glass-strong: rgba(11, 29, 23, 0.94);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --text: #f7f4ea;
  --muted: rgba(247, 244, 234, 0.66);
  --gold: #e3c47e;
  --cream: #f8f6ef;
  --av: #f2c94c;
  --rs: #ff9f43;
  --sd: #ff5d5d;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 18px;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --gap: 10px;
  --top-h: 52px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.st-available { --c: var(--av); }
.st-reserved { --c: var(--rs); }
.st-sold { --c: var(--sd); }

#app { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; }
#pano { position: absolute; inset: 0; touch-action: none; }
#shapes, #markers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#markers { overflow: hidden; }

/* glass surfaces */
.glass, .topbar .brand, .icon-btn, .trail, .menu, .lots-panel, .dock-all, .chip, .legend-item, .scene-bar, .sheet, .tip, .hint, .owner-bar {
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid var(--line);
}

/* ---------------------------------------------------------------- lot outlines */
.lot-shape {
  fill: color-mix(in srgb, var(--c) 16%, transparent);
  stroke: color-mix(in srgb, var(--c) 55%, white);
  stroke-width: 1.8;
  stroke-linejoin: round;
  paint-order: stroke;
  transition: fill 0.25s, stroke-width 0.2s, opacity 0.3s;
  filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.75));
}
.lot-shape.st-sold { fill: url(#hatch); }
.lot-shape.is-hover { fill: color-mix(in srgb, var(--c) 32%, transparent); stroke-width: 2.6; }
.lot-shape.st-sold.is-hover { fill: url(#hatch); stroke-width: 2.6; }
.lot-shape.is-selected { stroke: #fff; stroke-width: 3.2; fill: color-mix(in srgb, var(--c) 30%, transparent); filter: drop-shadow(0 0 7px color-mix(in srgb, var(--c) 85%, transparent)); animation: glow 2.4s ease-in-out infinite; }
.lot-shape.is-dim { opacity: 0.22; }
@keyframes glow { 50% { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--c) 95%, transparent)); } }
#leader-layer line { stroke: rgba(255, 255, 255, 0.75); stroke-width: 1.2; stroke-dasharray: 3 3; }
#leader-layer circle { fill: #fff; stroke: rgba(0, 0, 0, 0.45); stroke-width: 2; }

/* ---------------------------------------------------------------- markers */
.mk { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: auto; will-change: transform; }
.mk > * { position: absolute; left: 0; top: 0; white-space: nowrap; }

.mk-lot .mk-num {
  transform: translate(-50%, -50%);
  display: grid; place-items: center;
  min-width: 30px; height: 30px; padding: 0 6px;
  border-radius: 999px;
  background: var(--c); color: #1d1a10;
  border: 2px solid rgba(255, 255, 255, 0.95);
  font-weight: 700; font-size: 14px; letter-spacing: -0.02em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.mk-lot.st-sold .mk-num { color: #fff; }
.mk-lot .mk-st {
  transform: translate(-50%, 17px);
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 2px 6px; border-radius: 6px; background: var(--c); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.mk-lot.st-reserved .mk-st { color: #2a1700; }
.mk-lot .mk-area { transform: translate(-50%, 26px); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(10, 26, 21, 0.85); border: 1px solid var(--line); }
.mk-lot.st-sold .mk-area, .mk-lot.st-reserved .mk-area { transform: translate(-50%, 44px); }
.mk-lot:hover .mk-num, .mk-lot.is-hover .mk-num { transform: translate(-50%, -50%) scale(1.15); }
.mk-lot.is-selected .mk-num { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 45%, transparent), 0 4px 16px rgba(0, 0, 0, 0.5); }
.mk-lot.is-dim { opacity: 0.35; }
.mk-lot-big .mk-num { min-width: 46px; height: 46px; font-size: 20px; border-width: 3px; }
.mk-lot-big .mk-st { transform: translate(-50%, 27px); font-size: 11px; }

.mk-go .mk-ring {
  transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(10, 26, 21, 0.55); border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.2s, background 0.2s;
}
.mk-go .mk-ring::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.55); animation: ping 2.2s ease-out infinite; }
@keyframes ping { from { transform: scale(0.8); opacity: 0.9; } to { transform: scale(1.35); opacity: 0; } }
.mk-go svg { width: 22px; height: 22px; }
.mk-go .mk-label { transform: translate(-50%, 32px); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(10, 26, 21, 0.82); border: 1px solid var(--line); opacity: 0; transition: opacity 0.2s; }
.mk-go:hover .mk-ring, .mk-go:focus-visible .mk-ring { transform: translate(-50%, -50%) scale(1.1); background: rgba(227, 196, 126, 0.85); color: #10251d; }
.mk-go:hover .mk-label, .mk-go:focus-visible .mk-label, .mk-fly .mk-label { opacity: 1; }
@media (hover: none) { .mk-go .mk-label { opacity: 1; } }
.mk-fly .mk-ring { width: 44px; height: 44px; }

.mk.mk-tag > * { position: static; }
.mk.mk-tag { display: inline-flex; align-items: center; gap: 7px; width: max-content; height: auto; margin: 0; padding: 7px 12px 7px 10px; border-radius: 999px; background: rgba(10, 26, 21, 0.82); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; translate: -50% -50%; box-shadow: var(--shadow); }
.mk-tag .dot, .chip .dot, .legend-item .dot, .sb-btn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); flex: none; }
.mk-tag .mk-tag-st { font-size: 11px; color: var(--c); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

.mk-place { cursor: pointer; }
.mk-place .mk-place-name {
  transform: translate(-50%, -100%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 10px;
  background: rgba(248, 246, 239, 0.94); color: #173c30;
  font: 600 13px/1.2 var(--sans);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.mk-place .mk-place-name::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.mk-place em { font-style: normal; font-weight: 700; color: #fff; background: #2f6b52; padding: 2px 7px; border-radius: 999px; font-size: 11.5px; }
.mk-place.has-desc .mk-place-name { padding-right: 10px; }
.mk-place .mk-place-desc {
  transform: translate(-50%, 10px);
  width: 240px; white-space: normal; padding: 10px 12px; border-radius: 12px;
  background: rgba(248, 246, 239, 0.97); color: #213d32; font-size: 13px; line-height: 1.45;
  box-shadow: var(--shadow); display: none;
}
.mk-place.is-open { z-index: 5; }
.mk-place.is-open .mk-place-desc { display: block; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: absolute; z-index: 20;
  top: calc(var(--st) + var(--gap)); left: calc(var(--sl) + var(--gap)); right: calc(var(--sr) + var(--gap));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; text-align: left; line-height: 1.05; }
.brand-text b { font: 600 20px/1 var(--serif); letter-spacing: 0.02em; }
.brand-text small { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }
.top-actions { display: flex; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: background 0.2s, transform 0.15s; }
.icon-btn:hover { background: rgba(30, 64, 52, 0.85); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.ghost { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.icon-btn.ghost:hover { background: rgba(255, 255, 255, 0.08); }
.icon-btn.sm { width: 36px; height: 36px; }
.lang-btn span { font-weight: 700; font-size: 13px; letter-spacing: 0.04em; }

.trail { display: none; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 999px; font-size: 13px; position: absolute; left: 50%; transform: translateX(-50%); max-width: 46vw; overflow: hidden; }
.trail button, .trail span { padding: 6px 10px; border-radius: 999px; white-space: nowrap; color: var(--muted); }
.trail button:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.trail .is-here { color: var(--text); font-weight: 600; }
.trail i { font-style: normal; opacity: 0.35; }

.owner-bar { position: absolute; z-index: 19; top: calc(var(--st) + var(--gap) + 54px); left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 6px 8px 6px 14px; border-radius: 999px; font-size: 12.5px; background: rgba(227, 196, 126, 0.95); color: #1d2a20; border-color: transparent; white-space: nowrap; box-shadow: var(--shadow); }
.owner-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: #1f7a45; box-shadow: 0 0 0 3px rgba(31, 122, 69, 0.25); }
.owner-bar .owner-live { opacity: 0.75; }
.link-btn { padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.12); font-weight: 600; }

.menu { position: absolute; z-index: 40; top: calc(var(--st) + var(--gap) + 52px); right: calc(var(--sr) + var(--gap)); width: 250px; padding: 8px; border-radius: var(--r); background: var(--glass-strong); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.menu button { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-align: left; font-size: 15px; }
.menu button:hover { background: rgba(255, 255, 255, 0.07); }
.menu svg { color: var(--gold); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; width: auto; }
.menu .menu-owner { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- lots panel */
.lots-panel {
  position: absolute; z-index: 30;
  inset: auto 0 0 0; top: 12vh;
  padding: 18px 16px calc(var(--sb) + 16px);
  border-radius: 24px 24px 0 0; background: var(--glass-strong);
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(105%); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: var(--shadow);
}
#app.panel-open .lots-panel { transform: none; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.panel-head h2 { margin: 0; font: 600 28px/1 var(--serif); }
.summary { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.avail-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; gap: 2px; }
.avail-bar span { background: var(--c); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.filters button span { opacity: 0.7; margin-left: 2px; }
.filters button[aria-selected='true'] { background: var(--cream); color: var(--ink); border-color: var(--cream); font-weight: 600; }
.lot-list { list-style: none; margin: 0 -6px; padding: 0 6px; overflow: auto; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.lot-list li { margin-bottom: 4px; }
.lot-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; text-align: left; transition: background 0.15s; }
.lot-row:hover, .lot-row.is-hover { background: rgba(255, 255, 255, 0.07); }
.lot-row.is-selected { background: rgba(227, 196, 126, 0.16); box-shadow: inset 0 0 0 1px rgba(227, 196, 126, 0.5); }
.lot-row .num { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font: 700 16px var(--sans); background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); flex: none; }
.lot-row .meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.lot-row .meta b { font-weight: 600; font-size: 14.5px; }
.lot-row .meta small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-row.st-sold .meta { opacity: 0.6; }
.pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 38%, transparent); white-space: nowrap; }
.row-owner { display: flex; gap: 4px; padding: 2px 10px 8px 58px; }
.fine { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- dock (phones) */
.dock { position: absolute; z-index: 15; left: calc(var(--sl) + var(--gap)); right: calc(var(--sr) + var(--gap)); bottom: calc(var(--sb) + var(--gap)); display: flex; gap: 8px; align-items: stretch; transition: opacity 0.3s, transform 0.3s; }
.dock-all { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 16px; font-weight: 600; font-size: 14px; flex: none; background: rgba(227, 196, 126, 0.95); color: #142d24; border-color: transparent; }
.dock-chips { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; flex: 1; padding: 2px; mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.dock-chips::-webkit-scrollbar { display: none; }
.chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: 16px; min-width: 76px; scroll-snap-align: center; flex: none; text-align: left; }
.chip b { font: 700 17px/1 var(--sans); display: flex; align-items: center; gap: 7px; }
.chip { position: relative; }
.chip .dot { position: absolute; top: 10px; right: 10px; }
.chip small { font-size: 11px; color: var(--muted); }
.chip.st-sold small, .chip.st-reserved small { color: var(--c); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; }
.chip.is-selected { background: rgba(248, 246, 239, 0.95); color: var(--ink); border-color: transparent; }
.chip.is-selected small { color: #4b5d54; }
.chip.is-dim { opacity: 0.4; }

.legend { position: absolute; z-index: 14; left: calc(var(--sl) + var(--gap)); bottom: calc(var(--sb) + var(--gap) + 66px); display: flex; gap: 6px; transition: opacity 0.3s; }
.legend-item { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font-size: 12px; }
.legend-item b { font-weight: 700; }
.legend-item.is-on { background: rgba(248, 246, 239, 0.95); color: var(--ink); }

/* ---------------------------------------------------------------- scene bar */
.scene-bar { position: absolute; z-index: 16; top: calc(var(--st) + var(--gap) + 56px); left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; border-radius: 999px; box-shadow: var(--shadow); max-width: calc(100vw - 20px); }
.sb-btn { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.sb-btn:hover { background: rgba(255, 255, 255, 0.08); }
.sb-btn svg { width: 18px; height: 18px; }
.sb-primary { background: var(--cream); color: var(--ink); }
.sb-primary:hover { background: #fff; }
.sb-step { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; padding: 0 2px; }
.sb-arrow { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.sb-arrow:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------------------------------------------------------------- lot sheet */
.sheet {
  position: absolute; z-index: 25; left: 0; right: 0; bottom: 0;
  max-height: 60vh; display: flex; flex-direction: column;
  border-radius: 24px 24px 0 0; background: var(--glass-strong); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
  padding-bottom: var(--sb);
  animation: sheet-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.sheet-grip { display: grid; place-items: center; height: 18px; cursor: grab; touch-action: none; }
.sheet-grip span { width: 42px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, 0.28); }
.sheet-body { display: flex; flex-direction: column; min-height: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 10px 18px; }
.sheet-title { display: flex; align-items: baseline; gap: 10px; text-align: left; min-width: 0; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.big-num { font: 700 40px/0.9 var(--serif); }
.sheet-title .pill { align-self: center; }
.peek-area { color: var(--muted); font-size: 13.5px; align-self: center; }
.sheet-tools { display: flex; gap: 2px; flex: none; }
.sheet-scroll { overflow: auto; padding: 0 18px 18px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.sheet[data-state='peek'] .sheet-scroll { display: none; }
.quick { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.sheet[data-state='open'] .quick { display: none; }
.quick-facts { margin: 0; display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: var(--muted); }
.quick-facts b { color: var(--text); font-size: 16px; }
.quick-actions { display: flex; gap: 8px; }
.qa { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 8px; border-radius: 13px; font-size: 13.5px; font-weight: 600; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); white-space: nowrap; }
.qa svg { width: 17px; height: 17px; color: var(--gold); }
.qa-main { background: var(--cream); color: var(--ink); border-color: transparent; flex: 0.8; }
.status-note { margin: 0; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.fact svg { color: var(--gold); margin-top: 1px; }
.fact b { display: block; font-size: 16px; font-weight: 700; }
.fact small { color: var(--muted); font-size: 12px; }
.lot-note { margin: 0; padding: 10px 12px; border-left: 3px solid var(--gold); background: rgba(227, 196, 126, 0.08); border-radius: 0 10px 10px 0; font-size: 14px; }
.points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.points li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.35; }
.points svg { color: #8fcf9a; width: 18px; height: 18px; margin-top: 1px; }
.desc { margin: 0; font-size: 14.5px; line-height: 1.55; color: rgba(247, 244, 234, 0.88); }
.explore { display: flex; flex-direction: column; gap: 12px; }
.explore-card { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); text-align: left; transition: background 0.2s, border-color 0.2s; }
.explore-card:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-strong); }
.explore-card img { width: 86px; height: 58px; object-fit: cover; border-radius: 11px; background: #183128; }
.explore-card b { display: block; font-size: 15px; }
.explore-card small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; margin-top: 3px; }
.explore-card small svg { width: 15px; height: 15px; }
.explore-card.is-here, .gthumb.is-here { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.ground-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; font-size: 14px; }
.ground-title svg { color: var(--gold); }
.ground-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.gthumb { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--line); background: #183128; }
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.gthumb:hover img { transform: scale(1.06); }
.gthumb span { position: absolute; left: 6px; bottom: 6px; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; font-size: 12px; font-weight: 700; background: rgba(10, 26, 21, 0.82); }
.cta { display: flex; flex-direction: column; gap: 8px; }
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 16px; border-radius: 14px; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform 0.15s, background 0.2s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(180deg, #f0d48e, #d9b764); color: #13281f; box-shadow: 0 6px 22px rgba(217, 183, 100, 0.25); }
.btn-primary:hover { background: linear-gradient(180deg, #f6dd9d, #e0bf6e); }
.btn-ghost { background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-dark { background: var(--cream); color: var(--ink); }

/* owner tools */
.owner-tools { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(227, 196, 126, 0.1); border: 1px dashed rgba(227, 196, 126, 0.55); }
.owner-title { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; color: var(--gold); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }
.owner-title svg { width: 16px; height: 16px; }
.seg-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg { padding: 9px 6px; border-radius: 11px; font-size: 13px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); color: var(--c); }
.seg.is-on { background: var(--c); color: #1a1a14; border-color: transparent; }
.st-sold.seg.is-on { color: #fff; }
.row-owner .seg { padding: 5px 8px; font-size: 11.5px; border-radius: 9px; }
.owner-tools label, .owner-login label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.owner-tools input, .owner-login input { font: inherit; font-size: 15px; color: var(--text); padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.25); user-select: text; -webkit-user-select: text; }
.owner-tools input:focus, .owner-login input:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
.owner-only { color: var(--gold); }

/* ---------------------------------------------------------------- tooltip, hint, toast, loader */
.tip { position: absolute; z-index: 30; left: 0; top: 0; pointer-events: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; max-width: 240px; padding: 10px 12px; border-radius: 14px; background: var(--glass-strong); box-shadow: var(--shadow); font-size: 13px; }
.tip b { font: 700 18px/1 var(--serif); }
.tip small { width: 100%; color: var(--muted); font-size: 11.5px; }
.hint { position: absolute; z-index: 18; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); text-align: center; max-width: calc(100vw - 40px); transition: opacity 0.4s; pointer-events: none; animation: hint-in 0.5s ease; }
.hint.is-out { opacity: 0; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, -40%); } }
.toast { position: absolute; z-index: 60; left: 50%; bottom: calc(var(--sb) + 90px); transform: translate(-50%, 20px); padding: 11px 18px; border-radius: 999px; background: var(--cream); color: var(--ink); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; max-width: calc(100vw - 30px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-bad { background: #ffd9d9; color: #5a0d0d; }

.loader { position: absolute; z-index: 100; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: radial-gradient(120% 90% at 50% 40%, #1b4536 0%, #0b1f19 70%); transition: opacity 0.8s ease, visibility 0.8s; }
#app:not(.is-loading) .loader { opacity: 0; visibility: hidden; }
.loader img { width: 96px; height: 96px; border-radius: 50%; animation: breathe 2.6s ease-in-out infinite; box-shadow: 0 0 60px rgba(227, 196, 126, 0.25); }
@keyframes breathe { 50% { transform: scale(1.05); box-shadow: 0 0 90px rgba(227, 196, 126, 0.4); } }
.loader-name { margin: 14px 0 0; font: 600 34px/1 var(--serif); letter-spacing: 0.04em; }
.loader-sub { margin: 0; color: var(--gold); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.loader-bar { width: 140px; height: 3px; border-radius: 9px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin-top: 18px; }
.loader-bar span { display: block; width: 40%; height: 100%; background: var(--gold); border-radius: 9px; animation: bar 1.4s ease-in-out infinite; }
@keyframes bar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------------------------------------------------------------- modal */
.modal { padding: 0; border: 0; background: transparent; color: var(--text); max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; }
.modal::backdrop { background: rgba(4, 12, 9, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal[open] { display: flex; align-items: flex-end; justify-content: center; }
.modal-card { width: 100%; max-height: 88vh; display: flex; flex-direction: column; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 24px 24px 0 0; padding-bottom: var(--sb); box-shadow: var(--shadow); animation: sheet-in 0.3s ease; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 8px 20px; }
.modal-head h2 { margin: 0; font: 600 28px/1 var(--serif); }
.modal-body { overflow: auto; padding: 4px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal .lead { margin: 0; font-size: 15px; line-height: 1.55; color: rgba(247, 244, 234, 0.9); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.photo-grid button { aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: #183128; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.photo-grid button:hover img { transform: scale(1.05); }
.modal video { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; }
.map { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #183128; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.story { display: flex; flex-direction: column; gap: 12px; font-size: 15.5px; line-height: 1.65; color: rgba(247, 244, 234, 0.9); }
.story img { border-radius: 50%; align-self: center; }
.story p { margin: 0; }
.story p:first-of-type::first-letter { font: 600 3.1em/0.8 var(--serif); float: left; margin: 0.06em 0.08em 0 0; color: var(--gold); }
.contact-list { display: flex; flex-direction: column; gap: 8px; }
.view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.view-grid button { display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: 13.5px; font-weight: 600; }
.view-grid img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: #183128; }
.owner-login { display: flex; flex-direction: column; gap: 12px; }
.form-error { margin: 0; min-height: 1em; color: #ff9b9b; font-size: 13.5px; }

.lightbox { position: fixed; z-index: 200; inset: 0; background: rgba(0, 0, 0, 0.94); display: grid; place-items: center; }
.lightbox img { max-width: 100vw; max-height: 100vh; object-fit: contain; }
.lightbox .icon-btn { position: absolute; }
.lb-prev { left: calc(var(--sl) + 12px); top: 50%; transform: translateY(-50%); }
.lb-next { right: calc(var(--sr) + 12px); top: 50%; transform: translateY(-50%); }
.lb-close { right: calc(var(--sr) + 12px); top: calc(var(--st) + 12px); }
.lb-count { position: absolute; bottom: calc(var(--sb) + 14px); left: 0; right: 0; text-align: center; margin: 0; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- state-driven visibility */
#app:not([data-kind='overview']) .dock,
#app:not([data-kind='overview']) .legend { opacity: 0; pointer-events: none; transform: translateY(16px); }
#app[data-sheet='open'] .dock, #app[data-sheet='open'] .legend,
#app[data-sheet='peek'] .dock, #app[data-sheet='peek'] .legend { opacity: 0; pointer-events: none; }
#app.is-owner .scene-bar { top: calc(var(--st) + var(--gap) + 100px); }

/* ---------------------------------------------------------------- small phones */
@media (max-width: 380px) {
  .brand-text small { display: none; }
  .brand { padding-right: 12px; }
  .brand-text b { font-size: 18px; }
  .top-actions { gap: 6px; }
  .icon-btn { width: 40px; height: 40px; }
  .sb-btn { padding: 9px 11px; font-size: 13px; }
}
@media (max-width: 520px) {
  #btn-share { display: none; }
  .owner-bar .owner-live { display: none; }
}

/* ---------------------------------------------------------------- phone landscape */
@media (orientation: landscape) and (max-height: 540px) {
  :root { --gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .brand-text small { display: none; }
  .icon-btn { width: 38px; height: 38px; }
  .sheet { left: auto; top: calc(var(--st) + 56px); bottom: calc(var(--sb) + 8px); right: calc(var(--sr) + 8px); width: min(380px, 48vw); max-height: none; border-radius: 20px; padding-bottom: 0; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 12px; }
  .sheet[data-state='peek'] { top: auto; }
  .lots-panel { top: calc(var(--st) + 56px); bottom: calc(var(--sb) + 8px); left: calc(var(--sl) + 8px); right: auto; width: min(360px, 50vw); border-radius: 20px; padding-bottom: 14px; transform: translateX(-110%); }
  .legend { bottom: calc(var(--sb) + var(--gap) + 58px); }
  .chip { padding: 6px 10px; }
  .chip b { font-size: 15px; }
  .scene-bar { top: auto; bottom: calc(var(--sb) + 8px); left: calc(var(--sl) + 8px); transform: none; }
  #app[data-sheet='open'] .scene-bar, #app[data-sheet='peek'] .scene-bar { max-width: calc(100vw - min(380px, 48vw) - 30px); overflow-x: auto; }
  .toast { bottom: calc(var(--sb) + 64px); }
  .modal-card { max-height: 94vh; }
  .owner-bar { top: auto; bottom: calc(var(--sb) + 64px); }
}

/* ---------------------------------------------------------------- tablets & desktop */
@media (min-width: 700px) and (min-height: 541px) {
  .trail { display: flex; }
  .modal[open] { align-items: center; }
  .modal-card { width: min(780px, calc(100vw - 48px)); border-radius: 24px; max-height: 84vh; padding-bottom: 0; }
  .sheet { left: 50%; right: auto; width: min(560px, calc(100vw - 32px)); transform: translateX(-50%); bottom: 12px; border-radius: 24px; }
  @keyframes sheet-in { from { opacity: 0; translate: 0 30px; } }
  .lots-panel { left: 50%; right: auto; width: min(560px, calc(100vw - 32px)); transform: translate(-50%, 105%); }
  #app.panel-open .lots-panel { transform: translate(-50%, 0); }
  .scene-bar { top: auto; bottom: calc(var(--sb) + 16px); }
  #app[data-sheet='open'] .scene-bar, #app[data-sheet='peek'] .scene-bar { bottom: auto; top: calc(var(--st) + 70px); }
}

@media (min-width: 900px) and (min-height: 541px) {
  :root { --gap: 16px; }
  .brand img { width: 44px; height: 44px; }
  .lots-panel {
    top: calc(var(--st) + 84px); bottom: 16px; left: calc(var(--sl) + 16px); right: auto;
    width: 300px; border-radius: 22px; padding: 18px 14px 14px; transform: none !important;
    background: var(--glass);
  }
  .panel-close { display: none; }
  .dock { display: none; }
  .legend { left: 50%; transform: translateX(-50%); bottom: 18px; }
  #app[data-kind='overview'][data-sheet='open'] .legend, #app[data-kind='overview'][data-sheet='peek'] .legend { opacity: 1; pointer-events: auto; }
  .sheet { left: auto; right: calc(var(--sr) + 16px); top: calc(var(--st) + 84px); bottom: auto; max-height: calc(100% - var(--st) - 100px); width: 380px; transform: none; border-radius: 22px; }
  .sheet[data-state='peek'] { top: auto; bottom: 16px; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 14px; }
  #app .scene-bar, #app[data-sheet] .scene-bar { top: auto; bottom: 18px; left: 50%; }
  #app[data-sheet='open'] .scene-bar { left: calc((100% - 412px) / 2); }
  #app:not([data-kind='overview']) .lots-panel { opacity: 0; pointer-events: none; transform: translateX(-20px) !important; transition: opacity 0.3s, transform 0.3s; }
  #app:not([data-kind='overview']).panel-open .lots-panel { opacity: 1; pointer-events: auto; transform: none !important; }
  .toast { bottom: 80px; }
  .hint { top: auto; bottom: 90px; transform: translateX(-50%); }
  @keyframes hint-in { from { opacity: 0; } }
}
@media (min-width: 1300px) {
  .lots-panel { width: 330px; }
  .sheet { width: 400px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- live 360 thumbnails */
.pv { position: relative; overflow: hidden; }
.pv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.35s; pointer-events: none; }
.pv-ready .pv-canvas { opacity: 1; }
.pv-badge { position: absolute; top: 5px; right: 5px; z-index: 2; padding: 2px 6px; border-radius: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; background: rgba(10, 26, 21, 0.78); color: #fff; pointer-events: none; }
.gthumb.pv { touch-action: pan-y; cursor: grab; }
.gthumb span:not(.pv-badge) { z-index: 2; }
.ex-thumb { flex: none; width: 96px; height: 64px; border-radius: 11px; background: #183128; touch-action: pan-y; }
.ex-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.explore-card .ex-thumb img { border-radius: 0; }
.vg-thumb { display: block; aspect-ratio: 16 / 10; border-radius: 12px; background: #183128; touch-action: pan-y; }
.vg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.view-grid img { aspect-ratio: auto; border-radius: 0; }

/* ---------------------------------------------------------------- credit + share */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.credit {
  position: absolute; z-index: 13; right: calc(var(--sr) + var(--gap)); bottom: calc(var(--sb) + var(--gap) + 106px);
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px;
  background: rgba(10, 26, 21, 0.62); border: 1px solid var(--line); color: rgba(247, 244, 234, 0.8);
  font-size: 11.5px; text-decoration: none; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: color 0.2s, background 0.2s, opacity 0.3s;
}
.credit b { color: var(--gold); font-weight: 700; letter-spacing: 0.02em; }
.credit:hover { color: #fff; background: rgba(10, 26, 21, 0.85); }
#app:not([data-kind='overview']) .credit { bottom: calc(var(--sb) + var(--gap)); }
#app[data-sheet='open'] .credit, #app[data-sheet='peek'] .credit { opacity: 0; pointer-events: none; }
.loader-credit { position: absolute; bottom: calc(var(--sb) + 22px); margin: 0; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.loader-credit b { color: var(--gold); }
.menu .menu-credit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--muted); text-decoration: none; }
.menu .menu-credit:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.menu .menu-credit b { color: var(--gold); }
.panel-credit a, .sheet-credit a { color: var(--gold); font-weight: 600; text-decoration: none; }
.panel-credit a:hover, .sheet-credit a:hover { text-decoration: underline; }
.share-box { display: flex; flex-direction: column; gap: 12px; }
.share-url input { width: 100%; font: inherit; font-size: 14px; color: var(--text); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.25); user-select: all; -webkit-user-select: all; }
.share-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.share-grid .btn-primary { grid-column: 1 / -1; }
@media (min-width: 900px) and (min-height: 541px) {
  .credit { bottom: 18px !important; right: calc(var(--sr) + 18px); }
  #app[data-sheet='open'] .credit, #app[data-sheet='peek'] .credit { opacity: 1; pointer-events: auto; right: calc(var(--sr) + 412px); }
}
@media (orientation: landscape) and (max-height: 540px) {
  .credit { bottom: calc(var(--sb) + 8px) !important; }
  #app[data-kind='overview'] .credit { display: none; }
}

/* ---------------------------------------------------------------- drone view: see the land */
#app[data-kind='aerial'] .lot-shape,
#app[data-kind='aerial'] .lot-shape.is-selected,
#app[data-kind='aerial'] .lot-shape.is-hover {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 1.6;
  stroke-dasharray: 10 7;
  animation: none;
  filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.9));
}
#app[data-kind='aerial'] .mk-lot-big { opacity: 0.88; }
