:root {
  --bg: #080b0a;
  --glass: rgba(11, 15, 14, 0.80);
  --glass-strong: rgba(11, 15, 14, 0.92);
  --glass-border: rgba(244, 239, 230, 0.14);
  --ink: #f4efe6;
  --ink-dim: rgba(244, 239, 230, 0.68);
  --amber: #e29d56;
  --amber-ink: #120d07;
  --mono: "Martian Mono", ui-monospace, monospace;
  --sans: "Figtree", system-ui, -apple-system, sans-serif;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.t3d-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #080b0a;
}

.t3d-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.t3d-stage.mode-pin .maplibregl-canvas,
.t3d-stage.mode-measure .maplibregl-canvas {
  cursor: crosshair !important;
}

.t3d-stage canvas { outline: none; }

/* Architectural Gallery Edge Vignette */
.t3d-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse 84% 78% at 50% 50%, rgba(8, 11, 10, 0) 58%, rgba(8, 11, 10, 0.42) 100%);
}

/* Quick Action Pill Bar (flows cleanly below brand + weather pills inside studio-brand-group) */
.quick-action-bar {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.quick-pill {
  pointer-events: auto;
  appearance: none;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink);
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}
.quick-pill:hover {
  border-color: var(--amber);
  background: var(--glass-strong);
}
.quick-pill[aria-pressed="true"] {
  background: var(--amber);
  color: var(--amber-ink);
  border-color: var(--amber);
}

/* Floating Epistemic Site Brief Card */
.site-brief-card {
  position: absolute;
  top: 96px;
  right: 14px;
  width: 316px;
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 16px;
  background: var(--glass-strong);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.52);
  z-index: 13;
}
.site-brief-card[hidden] { display: none; }
.sb-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}
.sb-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 2px;
}
.sb-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.08rem;
  color: #ffffff;
}
.sb-close {
  appearance: none;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.sb-section {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.sb-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.sb-badge.measured { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.28); }
.sb-badge.modelled { background: rgba(226, 157, 86, 0.16); color: #fcd34d; border: 1px solid rgba(226, 157, 86, 0.30); }
.sb-badge.historical { background: rgba(148, 163, 184, 0.14); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.26); }
.sb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.sb-grid small {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-dim);
}
.sb-grid strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #ffffff;
}

.t3d-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 11, 10, 0.90);
  color: var(--ink);
  z-index: 30;
  transition: opacity 0.3s ease;
}
.t3d-loading[hidden] { display: none; }

.t3d-loading-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(20, 26, 24, 0.92);
  border: 1px solid var(--glass-border);
  font-size: 0.9rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
  animation: pulse 1.3s infinite ease-in-out;
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* Floating Top Bar */
.studio-topbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  pointer-events: none;
  z-index: 20;
}

.studio-brand-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  pointer-events: none;
}

.studio-top-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  pointer-events: none;
}

.top-btn-row,
.top-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  pointer-events: none;
}

.glass-pill,
.wx-pill,
.t3d-readout,
.t3d-mode-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  font-size: 0.82rem;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.back-pill {
  font-weight: 600;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.back-pill:hover {
  border-color: var(--amber);
  background: var(--glass-strong);
}

.title-pill strong {
  font-family: var(--display);
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}
.title-pill .sep,
.title-pill > span:last-child {
  color: var(--ink-dim);
  font-size: 0.78rem;
}
.title-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
}

.wx-pill[hidden],
.t3d-mode-pill[hidden],
.t3d-heat-legend[hidden],
.t3d-toast[hidden] {
  display: none !important;
}

.wx-pill {
  cursor: pointer;
  font-weight: 500;
}
.wx-pill:hover { border-color: var(--amber); }

.risk-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.risk-low { background: #34d399; }
.risk-moderate { background: #fbbf24; }
.risk-high { background: #fb923c; }
.risk-extreme { background: #f87171; }

.t3d-readout {
  font-family: var(--mono);
  font-size: 0.69rem;
  font-variant-numeric: tabular-nums;
  color: rgba(244, 239, 230, 0.88);
  min-height: 30px;
  padding: 4px 12px;
  white-space: nowrap;
  max-width: min(52vw, 480px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.t3d-mode-pill {
  background: rgba(226, 157, 86, 0.94);
  color: var(--amber-ink);
  border-color: transparent;
  font-weight: 700;
}

.toggle-pill {
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.toggle-pill:hover {
  border-color: var(--amber);
  background: var(--glass-strong);
}

/* Bottom-Center Camera Dock */
.camera-dock {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  z-index: 11;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
}

.camera-dock button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.camera-dock button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}
.camera-dock button.primary {
  background: var(--amber);
  color: var(--amber-ink);
}

/* Bottom-Left Legend (sits cleanly above zoom controls & away from camera dock) */
.t3d-legend {
  position: absolute;
  left: 56px;
  bottom: 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  font-size: 0.72rem;
  color: var(--ink-dim);
  pointer-events: none;
  z-index: 10;
}
.t3d-legend[hidden] { display: none !important; }
.t3d-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 11px; height: 3px; border-radius: 2px; display: inline-block; }
.swatch.gold { background: #ffd400; }
.swatch.cyan { background: #38bdf8; }
.swatch.orange { background: #fb923c; }

.t3d-heat-legend {
  position: absolute;
  left: 56px;
  bottom: 112px;
  width: min(320px, calc(100vw - 74px));
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  font-size: 0.74rem;
  color: var(--ink);
  z-index: 10;
  pointer-events: auto;
}
.heat-sun-scrub {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
.heat-sun-scrub[hidden] { display: none; }
.heat-sun-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin-bottom: 4px;
}
.heat-sun-row strong {
  font-family: var(--mono);
  color: var(--amber);
  font-size: 0.72rem;
}
.heat-bar {
  display: block;
  height: 7px;
  border-radius: 4px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #312e81 0%, #2563eb 25%, #14b8a6 50%, #f59e0b 75%, #fde047 100%);
}
.heat-bar.frost {
  background: linear-gradient(90deg, #16a34a 0%, #eab308 45%, #38bdf8 75%, #4f46e5 100%);
}

/* Collapsible Right Dark-Glass Studio Drawer */
.t3d-panel {
  position: absolute;
  top: 96px;
  right: 14px;
  bottom: 76px;
  width: 344px;
  max-width: calc(100vw - 28px);
  border-radius: 18px;
  background: var(--glass-strong);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 12;
  transition: transform 0.24s ease, opacity 0.2s ease;
}

.t3d-panel.collapsed {
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
}

.panel-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}

.panel-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  padding: 8px 6px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.panel-tab[aria-selected="true"] {
  background: rgba(226, 157, 86, 0.18);
  color: var(--amber);
}

.panel-body {
  padding: 14px 16px 18px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 239, 230, 0.22) transparent;
}
.panel-body::-webkit-scrollbar { width: 5px; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(244, 239, 230, 0.22); border-radius: 999px; }
.panel-body[hidden] { display: none; }

.ctrl-group {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ctrl-group:last-child { border-bottom: 0; margin-bottom: 0; }

.ctrl-group h3 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.help {
  margin: 7px 0 0;
  font-size: 0.77rem;
  line-height: 1.48;
  color: var(--ink-dim);
}

.seg-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 5px;
}
.seg-group.two-col {
  grid-template-columns: 1fr 1fr;
}

.seg-group button,
.mp-form-actions button,
.mp-form button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 9px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.seg-group button:hover,
.mp-form-actions button:hover {
  border-color: rgba(226, 157, 86, 0.6);
}

.seg-group button[aria-pressed="true"],
.mp-form button.primary {
  background: var(--amber);
  color: var(--amber-ink);
  border-color: var(--amber);
}

.slider-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin: 10px 0 4px;
}
.slider-row strong {
  font-family: var(--mono);
  color: var(--amber);
  font-size: 0.76rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--amber);
  cursor: pointer;
}

.layer-checks {
  display: grid;
  gap: 7px;
  font-size: 0.82rem;
}
.layer-checks label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.layer-checks input {
  accent-color: var(--amber);
  width: 15px;
  height: 15px;
}

/* Measure & Pins */
.mp-form {
  display: grid;
  gap: 8px;
}
.mp-form input,
.mp-form select,
.mp-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8rem;
}
.mp-form-actions {
  display: flex;
  gap: 8px;
}
.mp-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.75rem;
}
.mp-metrics > div {
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}
.mp-metrics strong {
  display: block;
  font-family: var(--mono);
  color: var(--amber);
  font-size: 0.78rem;
}
.mp-profile-svg {
  width: 100%;
  height: 68px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.mp-list { display: grid; gap: 8px; }
.mp-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.79rem;
}
.mp-item strong { display: block; color: var(--ink); }
.mp-item small { color: var(--ink-dim); display: block; margin-top: 2px; }
.mp-item-actions { display: flex; gap: 4px; }
.mp-item-actions button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--ink-dim);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 0.72rem;
  cursor: pointer;
}
.mp-item-actions button:hover { color: var(--ink); border-color: var(--amber); }

/* Weather & Tour List */
.wx-card {
  font-size: 0.8rem;
  line-height: 1.5;
}
.wx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.wx-cell {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
}
.wx-cell span { display: block; color: var(--ink-dim); font-size: 0.7rem; margin-bottom: 2px; }
.wx-cell strong { font-family: var(--mono); font-size: 0.8rem; color: var(--ink); }

.tour-list { display: grid; gap: 8px; margin-top: 8px; }
.tour-stop-btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.tour-stop-btn:hover,
.tour-stop-btn[aria-current="true"] {
  border-color: var(--amber);
  background: rgba(226, 157, 86, 0.12);
}
.tour-stop-btn > div { min-width: 0; }
.tour-stop-btn > div span { display: block; font-weight: 600; color: var(--ink); line-height: 1.25; }
.tour-stop-btn > div small { display: block; font-size: 0.71rem; color: var(--ink-dim); margin-top: 2px; }
.tour-stop-thumb {
  width: 44px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.tour-stop-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber-ink);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  flex: none;
}

/* Labeled Architectural Landmark Markers */
.tour-pin-marker {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px 0 4px;
  border-radius: 999px;
  background: rgba(11, 15, 14, 0.88);
  backdrop-filter: blur(10px);
  color: var(--ink);
  border: 1px solid rgba(226, 157, 86, 0.65);
  font-family: var(--sans);
  font-size: 0.70rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.48);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.tour-pin-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--amber-ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.tour-pin-marker:hover,
.tour-pin-marker.active {
  transform: scale(1.08);
  background: var(--amber);
  color: var(--amber-ink);
  border-color: var(--amber);
}
.tour-pin-marker:hover .tour-pin-num,
.tour-pin-marker.active .tour-pin-num {
  background: #0b0f0e;
  color: #ffffff;
}
.enquire-pill {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
  font-weight: 700;
  white-space: nowrap;
}
.enquire-pill:hover {
  background: #ebb072;
}

.mp-pin-marker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 6px;
  border-radius: 999px;
  background: rgba(11, 15, 14, 0.88);
  color: #f4efe6;
  border: 1.5px solid #38bdf8;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.mp-pin-marker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.tour-drawer {
  position: absolute;
  left: 14px;
  bottom: 64px;
  width: min(376px, calc(100vw - 28px));
  padding: 0;
  border-radius: 18px;
  background: var(--glass-strong);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.62);
  overflow: hidden;
  z-index: 15;
}
.tour-drawer[hidden] { display: none !important; }
.tour-media-wrap {
  position: relative;
  background: #0d1210;
}
.tour-stop-img {
  width: 100%;
  height: 192px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  border-bottom: 1px solid var(--glass-border);
}
.tour-stop-img[hidden] { display: none; }
.tour-zoom-btn {
  appearance: none;
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(8, 11, 10, 0.80);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(244, 239, 230, 0.22);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
}
.tour-zoom-btn:hover {
  background: var(--amber);
  color: var(--amber-ink);
  border-color: var(--amber);
}
.tour-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 8px 14px 0;
}
.tour-thumbs[hidden] { display: none; }
.tour-thumb-btn {
  appearance: none;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 7px;
  overflow: hidden;
  background: #101614;
  height: 44px;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.14s ease, border-color 0.14s ease;
}
.tour-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tour-thumb-btn:hover,
.tour-thumb-btn.active {
  opacity: 1;
  border-color: var(--amber);
}
.tour-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.tour-title-row h3 {
  margin: 0;
}
.tour-plan-btn {
  appearance: none;
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(226, 157, 86, 0.16);
  border: 1px solid rgba(226, 157, 86, 0.45);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.tour-plan-btn:hover {
  background: var(--amber);
  color: var(--amber-ink);
}
.tour-plan-btn[hidden] { display: none; }

.studio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(6, 9, 8, 0.94);
  backdrop-filter: blur(18px);
  display: grid;
  place-items: center;
  padding: 28px 64px;
}
.studio-lightbox[hidden] { display: none !important; }
.slb-figure {
  margin: 0;
  max-width: 1180px;
  max-height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.slb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 132px);
  border-radius: 12px;
  border: 1px solid rgba(244, 239, 230, 0.16);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
  background: #0d1210;
  object-fit: contain;
}
.slb-figure figcaption {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: rgba(244, 239, 230, 0.88);
  text-align: center;
}
.slb-close,
.slb-nav {
  appearance: none;
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 230, 0.22);
  background: rgba(15, 20, 18, 0.86);
  color: #ffffff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.slb-close {
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
}
.slb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
}
.slb-prev { left: 18px; }
.slb-next { right: 18px; }
.slb-close:hover,
.slb-nav:hover {
  background: var(--amber);
  color: var(--amber-ink);
  border-color: var(--amber);
}
.tour-close {
  appearance: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(8, 11, 10, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.15rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
.tour-close:hover {
  background: var(--amber);
  color: var(--amber-ink);
  border-color: var(--amber);
}
.tour-drawer-body {
  padding: 16px 18px 18px;
}
.tour-drawer-body h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.25;
  color: #ffffff;
}
.tour-drawer-body p {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-dim);
}
.tour-drawer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--amber);
}
.tour-drawer-nav button {
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tour-drawer-nav button:hover {
  border-color: var(--amber);
  background: rgba(226, 157, 86, 0.16);
}

.t3d-toast {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--amber-ink);
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 20;
}
.t3d-toast[hidden] { display: none; }

/* Keep MapLibre zoom controls tucked cleanly on bottom-left above legend */
.maplibregl-ctrl-top-right {
  top: auto !important;
  bottom: 62px !important;
  left: 14px !important;
  right: auto !important;
}
.maplibregl-ctrl-group {
  background: var(--glass) !important;
  border: 1px solid var(--glass-border) !important;
  backdrop-filter: blur(14px);
}
.maplibregl-ctrl-group button {
  filter: invert(1) hue-rotate(180deg);
}

body.clean-shot .studio-topbar,
body.clean-shot .camera-dock,
body.clean-shot .t3d-legend,
body.clean-shot .t3d-panel,
body.clean-shot .maplibregl-ctrl-top-right,
.pc-note {
  margin: 10px 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted);
}
.pc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.pc-btn {
  appearance: none;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid rgba(244, 239, 230, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.pc-btn.primary {
  background: var(--amber);
  color: var(--amber-ink);
  border-color: var(--amber);
}
.amenity-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  max-height: 300px;
  overflow-y: auto;
}
.amenity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(244, 239, 230, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.amenity-item:hover {
  border-color: rgba(226, 157, 86, 0.55);
  background: rgba(226, 157, 86, 0.12);
}
.amenity-item strong {
  display: block;
  font-size: 0.77rem;
  font-weight: 600;
}
.amenity-item small {
  display: block;
  font-size: 0.67rem;
  color: var(--muted);
}
.amenity-time {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(226, 157, 86, 0.18);
  border: 1px solid rgba(226, 157, 86, 0.45);
  color: #f6c38d;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  white-space: nowrap;
}

.lot-rail {
  position: absolute;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  z-index: 14;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100vw - 28px);
  overflow-x: auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  scrollbar-width: none;
}
.lot-rail::-webkit-scrollbar { display: none; }
.lot-rail[hidden] { display: none !important; }
.lot-rail-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px;
  white-space: nowrap;
}
.lot-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 230, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.lot-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.lot-chip.subject i { background: #f5b942; }
.lot-chip.park i { background: #34d399; }
.lot-chip.neighbour i { background: #94a3b8; }
.lot-chip.active {
  background: var(--amber);
  color: var(--amber-ink);
  border-color: var(--amber);
}
.lot-chip.active i { background: #0b0f0e; }

.amenity-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 5px;
  border-radius: 999px;
  background: rgba(11, 15, 14, 0.90);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 157, 86, 0.62);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.70rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.amenity-marker b {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--amber-ink);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
}

body.clean-shot .tour-pin-marker,
body.clean-shot .mp-pin-marker,
body.clean-shot .amenity-marker {
  display: none !important;
}

/* Dark-glass MapLibre attribution instead of bright white pill */
.maplibregl-ctrl-attrib {
  background: rgba(11, 15, 14, 0.76) !important;
  color: rgba(244, 239, 230, 0.72) !important;
  backdrop-filter: blur(10px);
  border-radius: 999px !important;
  border: 1px solid rgba(244, 239, 230, 0.14) !important;
  font-size: 10px !important;
  padding: 2px 10px !important;
}
.maplibregl-ctrl-attrib.maplibregl-compact {
  padding-right: 26px !important;
  min-height: 22px !important;
}
.maplibregl-ctrl-attrib-button {
  filter: invert(1) opacity(0.75);
}
.maplibregl-ctrl-attrib a {
  color: rgba(244, 239, 230, 0.88) !important;
}

@media (max-width: 860px) {
  .studio-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .studio-brand-group,
  .studio-top-actions {
    width: 100%;
    gap: 6px;
  }
  .studio-top-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
  .top-btn-row {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }
  .top-meta-row {
    display: none;
  }
  .quick-action-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .quick-action-bar::-webkit-scrollbar { display: none; }
  .quick-pill {
    white-space: nowrap;
    font-size: 0.72rem;
    min-height: 29px;
    padding: 4px 10px;
  }
  .site-brief-card {
    top: 132px;
    right: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 210px);
  }
  .t3d-heat-legend {
    left: 56px;
    bottom: 70px;
    width: calc(100vw - 72px);
  }
  .title-pill > span:last-child,
  .title-pill .sep,
  .t3d-readout,
  .t3d-legend,
  .wx-pill {
    display: none !important;
  }
  .studio-topbar { top: 10px; left: 10px; right: 10px; }
  .wx-pill {
    white-space: nowrap;
    font-size: 0.72rem;
    min-height: 30px;
    padding: 4px 10px;
    gap: 5px;
  }
  .t3d-panel {
    top: 58px;
    right: 10px;
    bottom: 72px;
    width: calc(100vw - 20px);
  }
  .camera-dock {
    bottom: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .camera-dock::-webkit-scrollbar {
    display: none;
  }
  .maplibregl-ctrl-bottom-right {
    bottom: 62px !important;
  }
  .maplibregl-ctrl-bottom-left {
    bottom: 108px !important;
  }
  .lot-rail {
    bottom: 62px;
  }
}

@media (max-width: 480px) {
  .studio-topbar { gap: 6px; }
  .studio-brand-group,
  .studio-top-actions { gap: 6px; }
  .glass-pill {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .title-pill { max-width: 122px; overflow: hidden; }
  .title-pill strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
  }
}
