/* ==========================================================================
   香港热盘实景航拍雷达 · 直播看房地图 — Broadcast Studio Stylesheet
   ========================================================================== */

:root {
  --bg-ocean: #0B1E38;
  --bg-chrome: #081221;
  --bg-panel: #0C182B;
  --bg-card: #12233C;
  --bg-card-hover: #192E4F;
  --bg-input: #081322;

  --border-subtle: rgba(126, 174, 232, 0.16);
  --border-strong: rgba(126, 174, 232, 0.34);
  --border-focus: rgba(56, 189, 248, 0.72);

  --text-primary: #F1F6FC;
  --text-secondary: #9CB7D6;
  --text-muted: #6C8BB0;

  --status-sale: #FF6B2B;
  --status-upcoming: #F59E0B;
  --status-building: #06B6D4;

  --am-school: #3B82F6;
  --am-mtr: #E2231A;
  --am-mall: #F59E0B;
  --am-park: #10B981;
  --am-hospital: #EF4444;

  --accent-cyan: #38BDF8;
  --accent-gold: #FFD166;
  --accent-danger: #F87171;

  --topbar-h: 50px;
  --drawer-w: 356px;

  --font-sans: "PingFang SC", -apple-system, BlinkMacSystemFont, "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  --shadow-float: 0 10px 28px rgba(2, 8, 20, 0.56), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  --shadow-modal: 0 24px 64px rgba(2, 8, 20, 0.82), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-ocean);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

button,
input,
select {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.min-w-0 {
  min-width: 0;
}

/* ==========================================================================
   Broadcast Top Toolbar (Zero-Overlap Flex-Wrap Architecture)
   ========================================================================== */

.topbar {
  flex: 0 0 auto;
  min-height: var(--topbar-h);
  width: 100%;
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 7px;
  row-gap: 6px;
  background: rgba(8, 18, 33, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 600;
  user-select: none;
}

body.is-zen .topbar {
  display: none;
}

.topbar-left,
.topbar-center,
.topbar-right {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  white-space: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.brand-mark {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 107, 43, 0.24), rgba(56, 189, 248, 0.18));
  border: 1px solid rgba(255, 209, 102, 0.36);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.mode-pills,
.region-pills {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(5, 12, 24, 0.78);
  border: 1px solid var(--border-subtle);
}

.pill-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 7px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}

.pill-btn:hover {
  color: var(--text-primary);
  background: rgba(126, 174, 232, 0.14);
}

.pill-btn.is-active {
  background: rgba(255, 107, 43, 0.24);
  color: #FFEDD5;
  font-weight: 600;
}

.mode-pills .pill-btn.is-active {
  background: rgba(56, 189, 248, 0.22);
  color: #E0F2FE;
}

/* 学/铁/商/公/医 Quick Amenity Pills */
.amenity-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.amenity-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(12, 24, 43, 0.72);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  transition: all 0.14s ease;
}

.amenity-pill:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.amenity-pill.is-on {
  background: rgba(25, 46, 79, 0.94);
  border-color: rgba(126, 174, 232, 0.38);
  color: #FFFFFF;
}

.amenity-pill:not(.is-on) .am-dot {
  opacity: 0.3;
}

.am-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.am-school { background: var(--am-school); box-shadow: 0 0 6px rgba(59, 130, 246, 0.7); }
.am-mtr { background: var(--am-mtr); box-shadow: 0 0 6px rgba(226, 35, 26, 0.7); }
.am-mall { background: var(--am-mall); box-shadow: 0 0 6px rgba(245, 158, 11, 0.7); }
.am-park { background: var(--am-park); box-shadow: 0 0 6px rgba(16, 185, 129, 0.7); }
.am-hospital { background: var(--am-hospital); box-shadow: 0 0 6px rgba(239, 68, 68, 0.7); }

/* Right Actions */
.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
}

.icon-btn:hover {
  background: rgba(126, 174, 232, 0.16);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.action-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(18, 35, 60, 0.88);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.action-btn.is-active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.58);
  color: #E0F2FE;
}

.action-btn.is-draw-active {
  background: rgba(255, 46, 76, 0.24);
  border-color: rgba(255, 46, 76, 0.82);
  color: #FFE4E6;
  box-shadow: 0 0 12px rgba(255, 46, 76, 0.3);
}

.action-vr {
  background: linear-gradient(135deg, #FF6B2B, #EA580C);
  border-color: rgba(255, 209, 102, 0.5);
  color: #FFFFFF;
}

.action-vr:hover {
  background: linear-gradient(135deg, #FF8147, #F97316);
  border-color: rgba(255, 237, 213, 0.72);
}

/* ==========================================================================
   Main Workspace & Map Stage
   ========================================================================== */

.radar-workspace {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
}

.map-stage {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: var(--bg-ocean);
}

.radar-map {
  width: 100%;
  height: 100%;
  background: var(--bg-ocean);
  z-index: 1;
}

.leaflet-container {
  background: inherit;
  font-family: var(--font-sans);
}

.leaflet-control-attribution {
  background: rgba(8, 18, 33, 0.62) !important;
  color: rgba(156, 183, 214, 0.72) !important;
  font-size: 10px !important;
  padding: 1px 6px !important;
}

.leaflet-control-attribution a {
  color: rgba(186, 230, 253, 0.78) !important;
}

/* Full-Viewport Transparent Drawing Canvas */
.draw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 460;
  pointer-events: none;
  touch-action: none;
}

.draw-canvas.is-drawing-active {
  pointer-events: auto;
  cursor: crosshair;
}

/* 9:16 Vertical Portrait Livestream Safe Frame */
.vertical-safe-frame {
  position: absolute;
  inset: 0;
  z-index: 455;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.safe-frame-box {
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  border: 2px dashed rgba(255, 209, 102, 0.72);
  border-radius: 16px;
  box-shadow: 0 0 0 9999px rgba(3, 9, 20, 0.36);
  position: relative;
}

.safe-frame-label {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(8, 18, 33, 0.84);
  border: 1px solid rgba(255, 209, 102, 0.45);
  color: #FEF3C7;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* Viewport-Fixed Top-Left Price-Unit HUD Badge */
.fixed-unit-badge {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 500;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 10px;
  background: rgba(8, 20, 38, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 24px rgba(2, 8, 20, 0.5), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  color: #F8FAFC;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  max-width: calc(100% - 140px);
}

.fixed-unit-badge.is-light-bg {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.18);
  color: #0F172A;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}

.unit-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.72);
  flex-shrink: 0;
}

.fixed-unit-badge.is-light-bg .unit-badge-dot {
  background: #D97706;
}

.unit-badge-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footprint Trace Banner */
.mode-banner {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 520;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 14px;
  border-radius: 999px;
  background: rgba(10, 22, 40, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 107, 43, 0.65);
  box-shadow: var(--shadow-float);
  font-size: 12px;
  color: #FFEDD5;
  white-space: nowrap;
}

.mode-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF6B2B;
  box-shadow: 0 0 8px #FF6B2B;
}

.mode-banner-btn {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.mode-banner-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mode-banner-primary {
  background: linear-gradient(135deg, #10B981, #059669);
  border-color: rgba(167, 243, 208, 0.5);
}

/* Floating Restore / Zen FAB */
.stage-fab {
  position: absolute;
  z-index: 510;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(8, 20, 38, 0.88);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-float);
}

.stage-fab:hover {
  background: rgba(20, 38, 66, 0.96);
  border-color: rgba(56, 189, 248, 0.58);
}

.stage-fab-right {
  top: 14px;
  right: 14px;
}

/* Bottom-Left Stage & Zoom Controls */
.stage-bottom-left {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: rgba(8, 20, 38, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-float);
}

.zoom-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.zoom-btn:hover {
  background: rgba(126, 174, 232, 0.16);
}

.stage-zoom-badge {
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #BAE6FD;
  white-space: nowrap;
}

.zoom-sep {
  width: 1px;
  height: 16px;
  background: var(--border-subtle);
  margin: 0 2px;
}

.status-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 11px;
  border-radius: 10px;
  background: rgba(8, 20, 38, 0.86);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-float);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.leg-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}

.leg-on-sale { background: var(--status-sale); }
.leg-upcoming { background: var(--status-upcoming); }
.leg-building { background: var(--status-building); }

/* Floating Broadcast Drawing Toolbar (Elevated cleanly above bottom-left zoom & legend bars) */
.draw-toolbar {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 530;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 8px;
  border-radius: 13px;
  background: rgba(8, 18, 33, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 46, 76, 0.45);
  box-shadow: var(--shadow-modal);
  max-width: calc(100% - 28px);
  overflow-x: auto;
}

.draw-tool-btn,
.draw-size-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.draw-tool-btn:hover,
.draw-size-btn:hover {
  color: #FFFFFF;
  background: rgba(126, 174, 232, 0.16);
}

.draw-tool-btn.is-active,
.draw-size-btn.is-active {
  background: rgba(255, 46, 76, 0.24);
  border-color: rgba(255, 46, 76, 0.72);
  color: #FFFFFF;
}

.draw-tool-danger {
  color: #FCA5A5;
}

.draw-tool-danger:hover {
  background: rgba(248, 113, 113, 0.24);
  color: #FEE2E2;
}

.draw-sep {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
  margin: 0 2px;
  flex-shrink: 0;
}

.draw-colors,
.draw-sizes {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.draw-color-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  padding: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.draw-color-btn.is-active {
  transform: scale(1.22);
  border-color: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.7);
}

/* ==========================================================================
   Leaflet Map Markers: Stage ① Districts, Stage ② Dual-Tone Capsules, POIs
   ========================================================================== */

/* Stage ① Macro 18-District Uniform Labels */
.district-macro-wrap {
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.district-macro-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow:
    -1.5px -1.5px 0 #071424,
     1.5px -1.5px 0 #071424,
    -1.5px  1.5px 0 #071424,
     1.5px  1.5px 0 #071424,
     0 2px 6px rgba(0, 0, 0, 0.75);
  line-height: 1.15;
}

.district-macro-price {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(7, 20, 36, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #FFF4C2;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Stage ① Hot Cluster Radar Dot */
.estate-macro-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 107, 43, 0.32), 0 2px 6px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.estate-macro-dot.st-on_sale { background: var(--status-sale); }
.estate-macro-dot.st-upcoming { background: var(--status-upcoming); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.32); }
.estate-macro-dot.st-under_construction { background: var(--status-building); box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.32); }

/* Stage ② Livestream Dual-Tone Estate Capsule (Exact Broadcast Look!) */
.estate-capsule-anchor {
  position: relative;
  transform: translate(-50%, -100%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  white-space: nowrap;
}

.estate-capsule-tools {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 4px);
  padding-bottom: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.estate-capsule-anchor:hover .estate-capsule-tools,
.estate-capsule-anchor.is-selected .estate-capsule-tools {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.cap-mini-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(8, 20, 38, 0.9);
  color: #FFFFFF;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
  transition: transform 0.14s ease, background 0.14s ease;
}

.cap-mini-btn:hover {
  transform: scale(1.16);
}

.cap-mini-vr {
  width: auto;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  gap: 2px;
  background: linear-gradient(135deg, #FF6B2B, #EA580C);
}

.cap-mini-vr.has-real-vr {
  background: linear-gradient(135deg, #FF5520, #D946EF);
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.72), 0 3px 10px rgba(255, 107, 43, 0.65);
}

.cap-vr-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px 0 3px;
  background: #FFF7ED;
  color: #EA580C;
  font-size: 10px;
  border-left: 1px solid rgba(234, 88, 12, 0.22);
}

.cap-mini-ring {
  background: linear-gradient(135deg, #0EA5E9, #0284C7);
}

.estate-capsule-pill {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  border: 1.8px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.58);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.estate-capsule-anchor:hover .estate-capsule-pill,
.estate-capsule-anchor.is-selected .estate-capsule-pill {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.65), 0 8px 22px rgba(0, 0, 0, 0.68);
}

.cap-name {
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.st-on_sale .cap-name { background: linear-gradient(135deg, #FF6B2B, #E04F16); }
.st-upcoming .cap-name { background: linear-gradient(135deg, #F59E0B, #D97706); }
.st-under_construction .cap-name { background: linear-gradient(135deg, #06B6D4, #0284C7); }

.cap-price {
  padding: 3px 8px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 11.5px;
  font-weight: 800;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.cap-stem {
  width: 2px;
  height: 7px;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

/* 学/商/公/医 POI Markers */
.poi-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 4px;
  border-radius: 999px;
  background: rgba(8, 20, 38, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.poi-tag {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #FFFFFF;
  flex-shrink: 0;
}

.poi-school .poi-tag { background: var(--am-school); }
.poi-mall .poi-tag { background: var(--am-mall); }
.poi-park .poi-tag { background: var(--am-park); }
.poi-hospital .poi-tag { background: var(--am-hospital); }

/* MTR Station Label Pills */
.mtr-st-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(8, 20, 38, 0.88);
  border: 1.2px solid rgba(255, 255, 255, 0.55);
  color: #F1F6FC;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -145%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.mtr-st-swatch {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* Life-Circle 500m / 1km Ring Label */
.ring-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(8, 20, 38, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.72);
  color: #BAE6FD;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */

.stage-loading {
  position: absolute;
  inset: 0;
  z-index: 560;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 21, 40, 0.86);
  backdrop-filter: blur(6px);
}

.stage-loading-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-radius: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-modal);
  font-size: 13px;
  max-width: 440px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Collapsible Right Studio Drawer
   ========================================================================== */

.radar-drawer {
  width: var(--drawer-w);
  flex: 0 0 var(--drawer-w);
  height: 100%;
  background: var(--bg-panel);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease, flex-basis 0.2s ease, border-color 0.2s ease;
  z-index: 540;
}

.radar-drawer.is-collapsed,
body.is-zen .radar-drawer {
  width: 0;
  flex-basis: 0;
  border-left-color: transparent;
}

.drawer-header {
  padding: 10px 12px 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  min-width: var(--drawer-w);
}

.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.drawer-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.drawer-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.save-badge {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.12);
  color: #86EFAC;
  border: 1px solid rgba(74, 222, 128, 0.26);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.save-badge.is-syncing {
  background: rgba(251, 191, 36, 0.14);
  color: #FDE68A;
  border-color: rgba(251, 191, 36, 0.35);
}

.save-badge.is-cloud {
  background: rgba(56, 189, 248, 0.14);
  color: #BAE6FD;
  border-color: rgba(56, 189, 248, 0.36);
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px 10px;
  background: rgba(6, 14, 27, 0.45);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  min-width: var(--drawer-w);
}

.drawer-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 6px;
  border-radius: 7px;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.drawer-tab:hover {
  color: var(--text-primary);
  background: rgba(126, 174, 232, 0.1);
}

.drawer-tab.is-active {
  background: var(--bg-card);
  color: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(126, 174, 232, 0.22);
}

.tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  min-width: var(--drawer-w);
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.tab-panel::-webkit-scrollbar,
.nearby-list::-webkit-scrollbar {
  width: 6px;
}

.tab-panel::-webkit-scrollbar-thumb,
.nearby-list::-webkit-scrollbar-thumb {
  background: rgba(126, 174, 232, 0.24);
  border-radius: 99px;
}

.panel-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.estate-top-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px;
}

/* Form Controls & Buttons */
.btn-secondary,
.btn-accent,
.btn-danger,
.btn-vr-cta {
  height: 33px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.btn-full {
  width: 100%;
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
}

.btn-accent {
  background: linear-gradient(135deg, #0EA5E9, #0284C7);
  border: 1px solid rgba(125, 211, 252, 0.48);
  color: #FFFFFF;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #38BDF8, #0EA5E9);
}

.btn-vr-cta {
  background: linear-gradient(135deg, #FF6B2B, #EA580C);
  border: 1px solid rgba(255, 209, 102, 0.55);
  color: #FFFFFF;
}

.btn-vr-cta:hover {
  background: linear-gradient(135deg, #FF8147, #F97316);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #FCA5A5;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.24);
  color: #FEE2E2;
}

.mini-btn {
  border: 1px solid var(--border-subtle);
  background: rgba(8, 19, 34, 0.72);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 7px;
  white-space: nowrap;
}

.mini-btn:hover {
  border-color: var(--border-strong);
  color: #FFFFFF;
  background: var(--bg-card-hover);
}

.mini-cloud-btn {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.46);
  color: #E0F2FE;
}

.mini-danger {
  color: #FCA5A5;
  border-color: rgba(248, 113, 113, 0.32);
}

.mini-danger:hover {
  background: rgba(248, 113, 113, 0.24);
  color: #FEE2E2;
}

.mini-btn-group {
  display: inline-flex;
  gap: 4px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 30px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.search-input:focus {
  border-color: var(--border-focus);
}

.chip-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.chip-btn {
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 3px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.chip-btn.is-active {
  background: rgba(255, 107, 43, 0.2);
  border-color: rgba(255, 107, 43, 0.65);
  color: #FFEDD5;
}

.chip-count {
  opacity: 0.8;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

/* Editor Cards & Estate Rows */
.editor-card {
  padding: 11px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(22, 41, 69, 0.94), rgba(14, 28, 49, 0.94));
  border: 1px solid rgba(255, 107, 43, 0.42);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.editor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.editor-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.card-heading {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.estate-quick-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.estate-quick-bar .btn-vr-cta {
  flex: 1 1 auto;
  height: 30px;
  font-size: 11.5px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
  white-space: nowrap;
}

.status-pill.st-on_sale { background: var(--status-sale); }
.status-pill.st-upcoming { background: var(--status-upcoming); color: #0F172A; }
.status-pill.st-under_construction { background: var(--status-building); color: #082F49; }

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.field-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.text-input,
.select-input {
  width: 100%;
  height: 31px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
}

.text-input:focus,
.select-input:focus {
  border-color: var(--border-focus);
}

.mono-input {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.estate-row {
  width: 100%;
  border: 1px solid var(--border-subtle);
  background: rgba(18, 35, 60, 0.65);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  transition: all 0.12s ease;
}

.estate-row:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.estate-row.is-selected {
  background: rgba(255, 107, 43, 0.14);
  border-color: rgba(255, 107, 43, 0.65);
}

.estate-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.estate-row-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.estate-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.estate-row-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.estate-row-price {
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-gold);
  background: rgba(7, 20, 36, 0.78);
  padding: 2px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}

.estate-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.vr-tag-chip {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 107, 43, 0.22);
  border: 1px solid rgba(255, 107, 43, 0.56);
  color: #FDBA74;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.vr-tag-3d {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.36);
  color: #BAE6FD;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* Switches & Settings Sections */
.settings-section {
  padding: 11px;
  border-radius: 13px;
  background: rgba(18, 35, 60, 0.55);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section-head h3 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
}

.section-desc {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  min-width: 0;
}

.muted-cnt {
  color: var(--text-muted);
  font-size: 11px;
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 33px;
  height: 18px;
  border-radius: 999px;
  background: rgba(108, 139, 176, 0.34);
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.15s ease;
}

.toggle-input:checked + .toggle-track {
  background: var(--accent-cyan);
}

.toggle-input:checked + .toggle-track::after {
  transform: translateX(15px);
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.mono-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(7, 20, 36, 0.8);
  border: 1px solid var(--border-subtle);
  color: #BAE6FD;
}

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

.ocean-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.ocean-preset {
  border: 1px solid var(--border-subtle);
  background: rgba(8, 19, 34, 0.72);
  border-radius: 8px;
  padding: 5px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.ocean-preset span {
  width: 100%;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.ocean-preset.is-active {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.16);
  color: #FFFFFF;
}

.mtr-line-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(18, 35, 60, 0.65);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.mtr-line-row.is-disabled {
  opacity: 0.45;
}

.mtr-line-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}

.mtr-bar {
  width: 20px;
  height: 7px;
  border-radius: 99px;
}

.shortcut-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.shortcut-list kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(8, 19, 34, 0.9);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #BAE6FD;
}

.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.empty-hint {
  padding: 12px;
  border-radius: 10px;
  background: rgba(18, 35, 60, 0.45);
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

/* ==========================================================================
   Stage ③: Aerial / VR Panorama Theater Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 9, 20, 0.76);
  backdrop-filter: blur(8px);
  padding: 16px;
}

.vr-theater {
  width: min(1320px, 95vw);
  height: min(860px, 91vh);
  border-radius: 18px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vr-header {
  padding: 10px 15px;
  background: linear-gradient(90deg, rgba(16, 33, 58, 0.96), rgba(10, 22, 40, 0.96));
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.vr-head-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vr-title-line {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.vr-title-line h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: #FFFFFF;
}

.vr-price-chip {
  padding: 2px 9px;
  border-radius: 999px;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.vr-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-secondary);
}

.vr-meta-tag {
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(8, 19, 34, 0.72);
  border: 1px solid var(--border-subtle);
}

.vr-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.vr-close-btn {
  width: 31px;
  height: 31px;
  font-size: 15px;
  border: 1px solid var(--border-subtle);
}

.vr-tabs-bar {
  padding: 7px 15px;
  background: rgba(6, 14, 27, 0.72);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.vr-tabs {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.vr-tab {
  border: 1px solid var(--border-subtle);
  background: rgba(15, 31, 56, 0.55);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5.5px 11px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.vr-tab:hover {
  color: #FFFFFF;
  border-color: var(--border-strong);
}

.vr-tab.is-active {
  background: linear-gradient(135deg, rgba(255, 107, 43, 0.26), rgba(14, 165, 233, 0.2));
  border-color: rgba(255, 107, 43, 0.72);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(255, 107, 43, 0.22);
}

.vr-tab-badge {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.22);
  border: 1px solid rgba(74, 222, 128, 0.55);
  color: #BBF7D0;
  font-size: 10px;
  font-weight: 700;
}

.vr-bind-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 250px;
  max-width: 400px;
}

.vr-bind-form .text-input {
  height: 29px;
  font-size: 11.5px;
}

.vr-body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  display: flex;
  overflow: hidden;
}

.vr-main-stage {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
}

.vr-pane {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.vr-pane[hidden] {
  display: none !important;
}

/* Tab 1: CesiumJS 3D Photogrammetry Multi-Angle Viewport */
.cesium-stage-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 320px;
  background: #071528;
  overflow: hidden;
}

.vr-cesium-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vr-cesium-container .cesium-viewer-bottom,
.vr-cesium-container .cesium-credit-lightbox-overlay {
  display: none !important;
}

.vr-3d-loading,
.vr-3d-error {
  position: absolute;
  inset: 0;
  z-index: 460;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  background: rgba(7, 21, 40, 0.84);
  backdrop-filter: blur(6px);
}

.vr-3d-loading[hidden],
.vr-3d-error[hidden] {
  display: none !important;
}

.vr-3d-loading-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(11, 27, 50, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow: var(--shadow-float);
  font-size: 13px;
  color: #E0F2FE;
}

.vr-3d-error h3 {
  margin: 0;
  font-size: 17px;
}

.vr-3d-error p {
  margin: 0;
  max-width: 440px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Live Rotating Compass Rose (Top-Left) */
.vr-compass-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 440;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 5px 6px 4px;
  border-radius: 14px;
  border: 1px solid rgba(126, 174, 232, 0.36);
  background: rgba(7, 18, 34, 0.72);
  backdrop-filter: blur(8px);
  color: #E2E8F0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
  transition: border-color 0.15s ease, transform 0.14s ease;
}

.vr-compass-btn:hover {
  border-color: rgba(255, 209, 102, 0.72);
  transform: scale(1.04);
}

.vr-compass-dial {
  display: block;
  will-change: transform;
  transform-origin: 50% 50%;
}

.vr-compass-deg {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #BAE6FD;
  line-height: 1;
}

/* Top-Right 3D Quality & Overlay Toggle Bar */
.vr-3d-top-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 440;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100% - 100px);
}

.hud-chip-btn {
  height: 29px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(126, 174, 232, 0.38);
  background: rgba(7, 18, 34, 0.8);
  backdrop-filter: blur(8px);
  color: #CBD5E1;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
  transition: all 0.14s ease;
}

.hud-chip-btn:hover {
  border-color: rgba(125, 211, 252, 0.72);
  color: #FFFFFF;
}

.hud-chip-btn.is-active {
  background: rgba(14, 165, 233, 0.28);
  border-color: rgba(56, 189, 248, 0.78);
  color: #FFFFFF;
}

.hud-chip-btn.is-ultra {
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.65);
  color: #FEF08A;
}

.hud-chip-btn.hud-chip-vr {
  background: linear-gradient(135deg, #FF6B2B, #EA580C);
  border-color: rgba(255, 209, 102, 0.68);
  color: #FFFFFF;
}

/* Bottom-Center Multi-Angle Drone Camera Preset Dock */
.vr-3d-bottom-dock {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 440;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 24px);
  pointer-events: none;
}

.vr-3d-note {
  pointer-events: auto;
  max-width: min(680px, 90vw);
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(7, 18, 34, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #E0F2FE;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vr-3d-camera-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 5px 7px;
  border-radius: 13px;
  background: rgba(7, 18, 34, 0.86);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(126, 174, 232, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.52);
}

.cam-preset-btn {
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.13s ease;
}

.cam-preset-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.52);
  color: #FFFFFF;
}

.cam-preset-btn.is-active {
  background: linear-gradient(135deg, #0EA5E9, #0284C7);
  border-color: rgba(186, 230, 253, 0.72);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.42);
}

.cam-orbit-btn {
  background: rgba(255, 107, 43, 0.22);
  border-color: rgba(255, 107, 43, 0.56);
  color: #FFEDD5;
}

.cam-orbit-btn.is-active {
  background: linear-gradient(135deg, #FF6B2B, #EA580C);
  border-color: rgba(255, 209, 102, 0.8);
  color: #FFFFFF;
}

.cam-bar-sep {
  width: 1px;
  height: 18px;
  background: rgba(126, 174, 232, 0.28);
  margin: 0 2px;
}

.vr-3d-hint {
  pointer-events: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(5, 14, 27, 0.72);
  color: rgba(203, 213, 225, 0.88);
  font-size: 10.5px;
  white-space: nowrap;
}

/* Tab 3: Live 360° VR Iframe / Smart Launcher Card */
.vr-iframe-wrap {
  flex: 1 1 auto;
  min-height: 0;
  background: #040B16;
}

.vr-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.vr-fallback-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  gap: 11px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 107, 43, 0.14), rgba(7, 21, 40, 0.96));
}

.vr-fallback-icon {
  font-size: 42px;
}

.vr-source-badge {
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(255, 107, 43, 0.2);
  border: 1px solid rgba(255, 107, 43, 0.56);
  color: #FDBA74;
  font-size: 11.5px;
  font-weight: 700;
}

.vr-fallback-card h3 {
  margin: 0;
  font-size: 18px;
}

.vr-fallback-card p {
  margin: 0;
  max-width: 540px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.vr-fallback-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

/* Tab 2: Ultra-HD Z20 Orthophoto Sandbox */
.aerial-map-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 320px;
  background: #071528;
}

.vr-aerial-map {
  width: 100%;
  height: 100%;
}

.aerial-map-controls {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 450;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.aerial-zoom-pill {
  display: inline-flex;
  align-items: center;
  height: 29px;
  border-radius: 9px;
  background: rgba(8, 20, 38, 0.9);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.aerial-zoom-btn {
  width: 28px;
  height: 100%;
  border: none;
  background: transparent;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.aerial-zoom-btn:hover {
  background: rgba(56, 189, 248, 0.24);
}

.aerial-zoom-label {
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #BAE6FD;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.aerial-note-pill {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 450;
  padding: 6px 11px;
  border-radius: 9px;
  background: rgba(8, 20, 38, 0.88);
  border: 1px solid var(--border-strong);
  font-size: 11.5px;
  color: #E0F2FE;
}

/* Collapsible Right Info & Walking Distance Drawer */
.vr-info-drawer {
  width: 296px;
  flex: 0 0 296px;
  border-left: 1px solid var(--border-subtle);
  background: rgba(9, 20, 36, 0.94);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  transition: width 0.2s ease, flex-basis 0.2s ease, padding 0.2s ease, opacity 0.16s ease;
}

.vr-info-drawer.is-collapsed {
  width: 0;
  flex-basis: 0;
  padding-left: 0;
  padding-right: 0;
  border-left: none;
  opacity: 0;
  pointer-events: none;
}

.vr-info-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
}

.vr-info-drawer-head .icon-btn {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.aerial-box-title {
  font-size: 12px;
  font-weight: 700;
  color: #BAE6FD;
  margin-bottom: 5px;
}

.aerial-highlights {
  margin: 0;
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.55;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.aerial-nearby-box {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.nearby-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nearby-row {
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(18, 35, 60, 0.7);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}

.nearby-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.nearby-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.nearby-dist {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-gold);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Standard Modals & Toasts */
.modal-card {
  width: 100%;
  max-width: 430px;
  padding: 18px;
  border-radius: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.modal-card-sm {
  max-width: 350px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.modal-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}

.toast {
  padding: 9px 15px;
  border-radius: 10px;
  background: rgba(8, 20, 38, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.48);
  box-shadow: var(--shadow-float);
  color: #F1F6FC;
  font-size: 12px;
  font-weight: 500;
}

.toast.toast-success { border-color: rgba(74, 222, 128, 0.6); color: #DCFCE7; }
.toast.toast-error { border-color: rgba(248, 113, 113, 0.68); color: #FECACA; }

/* ==========================================================================
   Responsive Breakpoints (Collision-Free at 1440px, 1245px, 1024px, 820px)
   ========================================================================== */

@media (max-width: 1480px) {
  .pill-btn {
    font-size: 11px;
    padding: 4px 5.5px;
  }
  .amenity-pill {
    font-size: 11px;
    padding: 3.5px 6.5px;
  }
  .action-btn {
    font-size: 11px;
    padding: 0 7px;
    height: 27px;
  }
}

@media (max-width: 1210px) {
  .brand-title {
    display: none;
  }
}

@media (max-width: 1180px) {
  .topbar-center {
    order: 3;
    flex: 1 0 100%;
    justify-content: center;
    padding-top: 5px;
    border-top: 1px solid rgba(126, 174, 232, 0.12);
  }
  :root {
    --drawer-w: 326px;
  }
}

@media (max-width: 900px) {
  .vr-info-drawer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 470;
    box-shadow: -10px 0 28px rgba(2, 8, 20, 0.72);
  }
  .vr-3d-hint {
    display: none;
  }
  .radar-drawer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    box-shadow: -12px 0 36px rgba(2, 8, 20, 0.72);
  }
}
