:root {
  --font-scale: 1;
  --font-ui: Arial, sans-serif;
  --fs-caption: 0.75rem;
  --fs-small: 0.9rem;
  --fs-body: 1rem;
  --fs-lead: 1.08rem;
  --fs-title: 1.3rem;
  --bg: #eef3fa;
  --surface: #ffffff;
  --surface-alt: #f6f9fe;
  --ink: #16283d;
  --ink-soft: #627a95;
  --line: #cfdbeb;
  --accent: #2e7be6;
  --accent-strong: #1655b6;
  --night: #dde7f3;
  --available: #2eb37e;
  --reserved: #d49915;
  --sold: #dc5757;
  --shadow: 0 14px 28px rgba(26, 56, 96, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: calc(var(--fs-body) * var(--font-scale));
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  background: radial-gradient(circle at 12% 16%, #f8fbff 0, #edf3fb 48%, #e6eef8 100%);
  min-height: 100vh;
  overflow: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.topbar {
  width: calc(100% - 1.6rem);
  max-width: none;
  margin: 0.8rem auto;
  padding: 0.9rem 1rem;
  border: 1px solid #cfdbeb;
  border-radius: 16px;
  background: linear-gradient(120deg, #ffffff 0%, #f4f8ff 100%);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 700;
  color: #f7fbff;
  background: linear-gradient(160deg, #2a79e6, #245db3);
}

.brand-name {
  margin: 0;
  font-size: calc(var(--fs-lead) * var(--font-scale));
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-sub {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: calc(var(--fs-small) * var(--font-scale));
  font-weight: 600;
  letter-spacing: -0.005em;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #bdd0e6;
  background: #f2f7ff;
  color: #1b4568;
  font-size: calc(var(--fs-small) * var(--font-scale));
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand-rail {
  border: 1px solid #a6b2c3;
  border-left: 0;
  border-radius: 0 20px 20px 0;
  background: #e5ebf3;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  min-height: 0;
  overflow: hidden;
  margin-left: -1px;
}

.brand-rail-tag {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28rem;
  padding: 0.34rem 0.06rem 0.46rem;
  overflow: hidden;
}

.brand-rail-mark {
  order: 2;
  width: 1.44rem;
  height: 1.44rem;
  border-radius: 8px;
  font-size: calc(0.56rem * var(--font-scale));
}

.brand-rail-name {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  line-height: 1;
  white-space: nowrap;
}

.brand-rail-name {
  order: 1;
  color: #2f4d70;
  font-size: calc(0.96rem * var(--font-scale));
  font-weight: 800;
  letter-spacing: 0.008em;
  text-transform: none;
  text-shadow: none;
}

.brand-rail-link {
  text-decoration: none;
}

.brand-rail-link:hover {
  color: #244363;
}

.app-shell {
  width: calc(100% - 1.6rem);
  max-width: none;
  margin: 0.8rem auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 430px;
  gap: 0;
  height: calc(100vh - 1.6rem);
  height: calc(100dvh - 1.6rem);
  align-items: stretch;
}

.viewer-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 1rem;
  min-height: 0;
  height: 100%;
}

.viewer-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px 0 0 20px;
  border: 1px solid #cfdbeb;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-height: 0;
  height: 100%;
}

.viewer-card::before,
.viewer-card::after {
  content: none;
}

.viewer-info-stack {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 4;
  display: grid;
  gap: 0.36rem;
  width: fit-content;
  max-width: min(88%, 760px);
}

.viewer-stage {
  position: absolute;
  inset: 0;
  min-height: 0;
  height: auto;
  border-radius: 20px 0 0 20px;
  overflow: hidden;
  border: 0;
  transition: background 0.24s ease;
  z-index: 1;
}

.viewer-frame-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.viewer-frame-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 0.45rem;
  background: rgba(17, 36, 59, 0.18);
  pointer-events: none;
}

.viewer-loading[hidden] {
  display: none !important;
}

.loader-text {
  margin: 0;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.48);
  font-size: calc(0.78rem * var(--font-scale));
  font-weight: 700;
  letter-spacing: 0.01em;
}

.loader-spinner {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  animation: loaderSpin 0.84s linear infinite;
}

.loader-spinner-sm {
  width: 1.6rem;
  height: 1.6rem;
  border-width: 2px;
}

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

.viewer-stage.day-mode {
  background: linear-gradient(160deg, #edf4ff 0%, #e3ecf9 45%, #d9e4f3 100%);
}

.viewer-stage.night-mode {
  background: linear-gradient(160deg, #dde6f3 0%, #d1dceb 50%, #c6d2e2 100%);
}

.viewer-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 23%, rgba(255, 255, 255, 0.85) 0 70px, transparent 72px),
    linear-gradient(0deg, rgba(77, 130, 184, 0.14), rgba(77, 130, 184, 0)),
    repeating-linear-gradient(
      100deg,
      rgba(118, 146, 182, 0.12),
      rgba(118, 146, 182, 0.12) 2px,
      transparent 2px,
      transparent 60px
    );
}

.viewer-stage.has-media-frame::before {
  opacity: 0.14;
}

.viewer-stage.night-mode::before {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 237, 165, 0.2) 0 45px, transparent 48px),
    linear-gradient(0deg, rgba(70, 93, 122, 0.18), rgba(70, 93, 122, 0)),
    repeating-linear-gradient(
      100deg,
      rgba(122, 146, 176, 0.12),
      rgba(122, 146, 176, 0.12) 2px,
      transparent 2px,
      transparent 60px
    );
}

.viewer-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.viewer-stage.has-media-frame::after {
  opacity: 0.34;
}

.viewer-stage.season-spring::after {
  background: linear-gradient(180deg, rgba(170, 233, 191, 0.12), rgba(170, 233, 191, 0));
}

.viewer-stage.season-summer::after {
  background: linear-gradient(180deg, rgba(255, 206, 95, 0.12), rgba(255, 206, 95, 0));
}

.viewer-stage.season-winter::after {
  background: linear-gradient(180deg, rgba(170, 213, 255, 0.14), rgba(170, 213, 255, 0));
}

.viewer-overlay {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 0.16rem;
  padding: 0.38rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(178, 198, 224, 0.8);
  color: #18304a;
  background: rgba(255, 255, 255, 0.85);
  width: fit-content;
  max-width: 100%;
}

.viewer-overlay[hidden] {
  display: none !important;
}

.viewer-stage.night-mode .viewer-overlay {
  color: #18304a;
  background: rgba(248, 251, 255, 0.9);
}

.viewer-mode-meta {
  margin: 0;
  font-size: calc(var(--fs-small) * var(--font-scale) * 0.9);
  font-weight: 700;
  color: #2f5f9a;
}

.viewer-title {
  margin: 0;
  font-size: calc(var(--fs-body) * var(--font-scale) * 0.88);
  font-weight: 700;
  letter-spacing: -0.008em;
  line-height: 1.15;
}

#selectedMeta {
  margin: 0;
  font-size: calc(0.74rem * var(--font-scale));
  font-weight: 600;
  letter-spacing: -0.004em;
  color: #355676;
  line-height: 1.2;
}

.viewer-control-panel {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 6;
  display: grid;
  gap: 0.46rem;
  padding: 0.42rem;
  border-radius: 12px;
  border: 1px solid rgba(178, 198, 224, 0.7);
  background: rgba(255, 255, 255, 0.57);
  backdrop-filter: blur(14px) saturate(110%);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
}

.viewer-powered-link {
  position: absolute;
  left: 1rem;
  bottom: 0.9rem;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  text-decoration: none;
  font-size: calc(0.99rem * var(--font-scale));
  font-weight: 700;
  letter-spacing: -0.002em;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(8, 20, 35, 0.72);
}

.viewer-powered-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.viewer-corner-controls {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.42rem;
  width: 100%;
}

.icon-control-group {
  display: inline-flex;
  gap: 0.36rem;
  padding: 0.28rem;
  border-radius: 10px;
  border: 1px solid rgba(178, 198, 224, 0.85);
  background: rgba(255, 255, 255, 0.9);
}

.viewer-control-panel .icon-control-group {
  border: 0;
  background: transparent;
  padding: 0;
}

.icon-control-group.with-label {
  display: grid;
  gap: 0.24rem;
  padding: 0.34rem 0.34rem 0.3rem;
}

.viewer-control-panel .icon-control-group.with-label {
  gap: 0.2rem;
  padding: 0;
}

.icon-control-buttons {
  display: inline-flex;
  gap: 0.36rem;
}

.icon-control-label {
  margin: 0;
  text-align: center;
  color: #365e8f;
  font-size: calc(0.68rem * var(--font-scale));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.icon-control-group.is-disabled {
  opacity: 0.48;
}

.icon-toggle-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid #b9cde6;
  background: #f4f8ff;
  color: #294969;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.icon-toggle-btn.is-active {
  border-color: #1d5dbd;
  background: #2f77de;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(33, 96, 186, 0.28);
}

.icon-toggle-btn:disabled {
  cursor: not-allowed;
}

.icon-toggle-btn.is-locked {
  opacity: 0.48;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid #fff;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
  pointer-events: auto;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    width 0.14s ease,
    height 0.14s ease;
}

.hotspot.kind-vr {
  border-radius: 6px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.hotspot.kind-vr::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  transform: rotate(-45deg);
}

.hotspot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 1px dashed currentColor;
  opacity: 0.5;
}

.hotspot.kind-vr::after {
  inset: -8px;
  border-style: solid;
  opacity: 0.35;
}

.hotspot.status-available {
  color: var(--available);
  background: var(--available);
}

.hotspot.status-reserved {
  color: var(--reserved);
  background: var(--reserved);
}

.hotspot.status-sold {
  color: var(--sold);
  background: var(--sold);
}

.hotspot.status-location {
  color: #8f98a5;
  background: #8f98a5;
}

.hotspot.status-building {
  color: #3d86ff;
  background: #3d86ff;
}

.hotspot.is-active {
  width: 1.15rem;
  height: 1.15rem;
}

.hotspot.status-location.is-active {
  width: 1.24rem;
  height: 1.24rem;
  color: #2f77de;
  background: #2f77de;
  box-shadow: 0 0 0 4px rgba(47, 119, 222, 0.28);
}

.hotspot.kind-vr.is-active {
  width: 1.2rem;
  height: 1.2rem;
}

.hotspot.is-interactive-selected {
  z-index: 8;
  width: 1.34rem;
  height: 1.34rem;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.78),
    0 0 0 8px rgba(255, 255, 255, 0.22);
}

.hotspot.is-interactive-selected::after {
  inset: -12px;
  border: 2px solid currentColor;
  border-style: solid;
  opacity: 0.92;
  animation: hotspotPulse 1.35s ease-in-out infinite;
}

.location-hotspot-link {
  position: absolute;
  --hotspot-label-lift: 30px;
  --hotspot-stem-length: 24px;
  transform: translate(-50%, calc(-100% - var(--hotspot-label-lift)));
  transform-origin: 50% 100%;
  border: 1px solid rgba(159, 173, 193, 0.55);
  background: rgba(255, 255, 255, 0.9);
  color: #29415f;
  border-radius: 11px;
  padding: 0.38rem 0.5rem 0.42rem;
  display: grid;
  gap: 0.08rem;
  justify-items: center;
  text-align: center;
  font-family: inherit;
  font-size: calc(0.72rem * var(--font-scale));
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  cursor: pointer;
  pointer-events: auto;
  min-width: 128px;
  max-width: min(52vw, 210px);
  white-space: normal;
  box-shadow: 0 8px 18px rgba(34, 59, 92, 0.14);
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    filter 0.14s ease;
}

.location-hotspot-link::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 1px;
  height: var(--hotspot-stem-length);
  border-radius: 999px;
  background: #ffffff;
  opacity: 0.92;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.location-hotspot-title {
  display: block;
  font-size: calc(0.73rem * var(--font-scale));
  font-weight: 800;
  line-height: 1.2;
}

.location-hotspot-distance {
  display: block;
  font-size: calc(0.66rem * var(--font-scale));
  font-weight: 700;
  line-height: 1.15;
  opacity: 0.9;
}

.location-hotspot-meta {
  display: block;
  font-size: calc(0.62rem * var(--font-scale));
  font-weight: 700;
  line-height: 1.15;
  opacity: 0.92;
}

.location-hotspot-link.status-location {
  border-color: rgba(173, 183, 198, 0.6);
  background: rgba(255, 255, 255, 0.94);
  color: #3f5167;
}

.location-hotspot-link.status-location.is-active {
  border-color: #1d5dbd;
  background: #2f77de;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(47, 119, 222, 0.28);
}

.location-hotspot-link.status-building {
  border-color: rgba(111, 162, 241, 0.66);
  background: rgba(232, 241, 255, 0.94);
  color: #1e4f91;
}

.location-hotspot-link.status-available {
  border-color: rgba(90, 178, 114, 0.7);
  background: rgba(233, 249, 237, 0.95);
  color: #1f6732;
}

.location-hotspot-link.status-reserved {
  border-color: rgba(226, 168, 71, 0.72);
  background: rgba(255, 245, 225, 0.95);
  color: #8a5a12;
}

.location-hotspot-link.status-sold {
  border-color: rgba(215, 104, 104, 0.72);
  background: rgba(255, 234, 234, 0.95);
  color: #8c2a2a;
}

.location-hotspot-link.is-interactive-label.status-building,
.location-hotspot-link.is-interactive-label.status-available,
.location-hotspot-link.is-interactive-label.status-reserved,
.location-hotspot-link.is-interactive-label.status-sold {
  border-color: rgba(159, 173, 193, 0.62);
  background: rgba(255, 255, 255, 0.93);
  color: #35506d;
}

.location-hotspot-link.is-interactive-label.status-building.is-active,
.location-hotspot-link.is-interactive-label.status-building.is-interactive-selected {
  border-color: #2f77de;
  background: #3d86ff;
  color: #ffffff;
}

.location-hotspot-link.is-interactive-label.status-available.is-active,
.location-hotspot-link.is-interactive-label.status-available.is-interactive-selected {
  border-color: #3f9e5b;
  background: #4bb468;
  color: #ffffff;
}

.location-hotspot-link.is-interactive-label.status-reserved.is-active,
.location-hotspot-link.is-interactive-label.status-reserved.is-interactive-selected {
  border-color: #d69825;
  background: #f0ad34;
  color: #ffffff;
}

.location-hotspot-link.is-interactive-label.status-sold.is-active,
.location-hotspot-link.is-interactive-label.status-sold.is-interactive-selected {
  border-color: #ca4343;
  background: #e05555;
  color: #ffffff;
}

.location-hotspot-link.is-interactive-label.is-active {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.56),
    0 10px 20px rgba(24, 35, 52, 0.34);
}

.location-hotspot-link.is-active::after {
  height: 18px;
}

.location-hotspot-link.is-interactive-label.is-interactive-selected {
  z-index: 8;
  transform: translate(-50%, calc(-100% - var(--hotspot-label-lift))) scale(1.06);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.62),
    0 14px 26px rgba(13, 22, 36, 0.42);
  filter: saturate(1.08);
}

.location-hotspot-link.is-interactive-label.is-interactive-selected::after {
  height: 16px;
}

.location-hotspot-link.is-active {
  box-shadow:
    0 0 0 2px rgba(230, 241, 255, 0.26),
    0 10px 20px rgba(34, 67, 112, 0.24);
}

@keyframes hotspotPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.94;
  }
  60% {
    transform: scale(1.05);
    opacity: 0.52;
  }
  100% {
    transform: scale(1.14);
    opacity: 0.08;
  }
}


.viewer-view-group {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.36rem;
  padding: 0.42rem;
  border-top: 0;
  min-width: 138px;
}

.viewer-control-panel .viewer-view-group {
  position: relative;
  border: 0;
  border-radius: 12px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  overflow: hidden;
}

.viewer-control-panel .viewer-view-group::before {
  content: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.viewer-control-panel .viewer-view-group > * {
  position: relative;
  z-index: 1;
}

.view-mode-btn {
  min-height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(185, 205, 230, 0.72);
  background: rgba(244, 248, 255, 0.38);
  box-shadow: none;
  color: #244465;
  font-family: inherit;
  font-size: calc(0.8rem * var(--font-scale));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.004em;
  padding: 0.38rem 0.56rem;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(8px) saturate(112%);
  -webkit-backdrop-filter: blur(8px) saturate(112%);
}

.view-mode-btn:hover {
  background: rgba(244, 248, 255, 0.46);
  border-color: rgba(185, 205, 230, 0.82);
}

.view-mode-btn-line {
  display: block;
}

.view-mode-btn.is-active {
  border-color: #1d5dbd;
  background: #2f77de;
  color: #ffffff;
  box-shadow: none;
}

.list-card {
  border-radius: 20px;
  border: 1px solid #cfdbeb;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.list-column {
  min-height: 0;
  margin-left: 1rem;
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.list-investment {
  margin: 0 0 0.56rem;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #1d5dbd;
  background: #2f77de;
  color: #ffffff;
  font-size: calc(0.94rem * var(--font-scale));
  font-weight: 900;
  letter-spacing: -0.004em;
  line-height: 1.2;
  box-shadow: none;
}

.list-head h2 {
  margin: 0;
  font-size: calc(var(--fs-title) * var(--font-scale));
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

#resultCount {
  margin: 0;
  color: var(--ink-soft);
  font-size: calc(var(--fs-small) * var(--font-scale));
  font-weight: 600;
  letter-spacing: -0.004em;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.filters[hidden] {
  display: none !important;
  margin: 0 !important;
}

.filters.is-collapsed {
  display: none !important;
  margin: 0 !important;
}

.filter-field {
  display: grid;
  gap: 0.22rem;
}

.filter-field label {
  margin: 0;
  color: #4b6788;
  font-size: calc(0.66rem * var(--font-scale));
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.filters select {
  min-height: 2.05rem;
  padding: 0.34rem 0.58rem;
  font-size: calc(0.8rem * var(--font-scale));
}

.building-picker {
  margin: -0.15rem 0 0.72rem;
  border: 1px solid #1d5dbd;
  border-radius: 14px;
  background: #2f77de;
  padding: 0.5rem;
  display: grid;
  gap: 0.38rem;
  box-shadow: none;
}

.building-picker[hidden],
.building-picker.is-collapsed {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.building-picker-label {
  margin: 0;
  display: grid;
  width: auto;
  max-width: 100%;
  gap: 0.04rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  letter-spacing: -0.002em;
}

.building-picker-key {
  font-size: calc(0.66rem * var(--font-scale));
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.15;
}

.building-picker-value {
  font-size: calc(0.94rem * var(--font-scale));
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.building-picker-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.building-picker-floor-row {
  display: grid;
  gap: 0.2rem;
}

.building-picker-floor-title {
  font-size: calc(0.64rem * var(--font-scale));
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.9);
}

.building-picker-floor-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.building-chip {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-radius: 10px;
  min-height: 1.8rem;
  padding: 0.2rem 0.58rem;
  font-family: inherit;
  font-size: calc(0.76rem * var(--font-scale));
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.building-chip:hover {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.24);
}

.building-chip.is-active {
  border-color: #ffffff;
  background: #ffffff;
  color: #1d5dbd;
}

.building-chip-back {
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.building-floor-chip {
  min-height: 1.68rem;
  padding: 0.16rem 0.54rem;
  font-size: calc(0.72rem * var(--font-scale));
}

select,
input,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.68rem 0.74rem;
  font: inherit;
  font-size: calc(var(--fs-small) * var(--font-scale));
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.003em;
  color: inherit;
  background: #ffffff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.listings {
  display: grid;
  grid-auto-rows: max-content;
  gap: 0.5rem;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding-right: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-content: start;
}

.listings::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.listing-card {
  --listing-accent: #8fa0b5;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid #d6dfeb;
  border-radius: 14px;
  background: #fcfdff;
  padding: 0.52rem 0.56rem 0.5rem 2.16rem;
  position: relative;
  min-height: 96px;
  color: var(--ink);
  overflow: hidden;
  box-shadow: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.listing-card:hover {
  border-color: #b8c5d6;
  background: #f6f9fd;
}

.listing-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.54rem;
  background: var(--listing-accent);
  opacity: 0.96;
}

.listing-card::after {
  content: attr(data-status-label);
  position: absolute;
  left: 0.17rem;
  top: 0.24rem;
  bottom: 0.24rem;
  width: 1.18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #ffffff;
  font-size: calc(0.61rem * var(--font-scale));
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 1;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.listing-card.is-active {
  border-color: #a6b2c3;
  background: #e5ebf3;
  color: #233a57;
  box-shadow: none;
}

.listing-card.is-active:hover {
  border-color: #93a1b5;
  background: #dfe6f0;
}

.listing-card.is-active::before {
  width: 1.54rem;
  opacity: 1;
}

.listing-card.is-active .badge {
  box-shadow: none;
}

.listing-card.is-active .listing-price-base {
  color: #6a7d95;
}

.listing-card.is-active .listing-discount {
  color: #35597d;
}

.listing-card.is-active .listing-price-final {
  color: #b32626;
}

.listing-card.status-available {
  --listing-accent: #4bb468;
}

.listing-card.status-reserved {
  --listing-accent: #f0ad34;
}

.listing-card.status-sold {
  --listing-accent: #e05555;
}

.listing-card.status-location {
  --listing-accent: #8f98a5;
}

.listing-card.status-building {
  --listing-accent: #3d86ff;
}

.listing-select {
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  padding-right: 3.25rem;
  padding-bottom: 0.58rem;
  background: transparent;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.listing-status {
  display: none;
}

.listing-mail-btn {
  position: absolute;
  right: 0.42rem;
  bottom: 0.34rem;
  width: 1.72rem;
  height: 1.72rem;
  border: 1px solid rgba(147, 168, 195, 0.46);
  border-radius: 10px;
  padding: 0;
  background: rgba(244, 248, 255, 0.9);
  color: #2f4d70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.listing-mail-btn svg {
  width: 0.94rem;
  height: 0.94rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.listing-mail-btn svg circle {
  fill: currentColor;
  stroke: none;
}

.listing-mail-btn:hover {
  border-color: rgba(120, 148, 183, 0.68);
  background: #f0f6ff;
}

.listing-card.is-active .listing-mail-btn {
  border-color: rgba(127, 145, 168, 0.56);
  background: rgba(255, 255, 255, 0.72);
  color: #244363;
}

.listing-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.44rem;
}

.listing-title {
  margin: 0;
  font-family: "Neue Helvetica BQ", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: calc(1.08rem * var(--font-scale));
  font-weight: 700;
  letter-spacing: -0.013em;
  line-height: 1.2;
}

.badge {
  display: none;
}

.badge.status-available {
  background: #4bb468;
  border: 1px solid #3f9e5b;
  color: #ffffff;
}

.badge.status-reserved {
  background: #f0ad34;
  border: 1px solid #d69825;
  color: #ffffff;
}

.badge.status-sold {
  background: #e05555;
  border: 1px solid #ca4343;
  color: #ffffff;
}

.badge.status-location {
  background: #8f98a5;
  border: 1px solid #7f8792;
  color: #ffffff;
}

.badge.status-building {
  background: #3d86ff;
  border: 1px solid #2f77de;
  color: #ffffff;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem 0.34rem;
  margin: 0.23rem 0 0;
  color: inherit;
  font-size: calc(0.68rem * var(--font-scale));
  font-weight: 600;
  letter-spacing: -0.004em;
}

.listing-meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.34rem;
  border-radius: 999px;
  border: 1px solid #d4e0ef;
  background: #edf3fb;
  color: #355778;
  font-size: inherit;
  font-weight: 700;
  line-height: 1.2;
}

.listing-card.is-active .listing-meta span {
  border-color: rgba(128, 146, 170, 0.42);
  background: rgba(255, 255, 255, 0.62);
  color: #2d4a6e;
}

.listing-price {
  margin: 0.4rem 0 0;
  font-family: "Neue Helvetica BQ", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: calc(0.9rem * var(--font-scale));
  font-weight: 700;
  letter-spacing: -0.009em;
  color: #233a58;
}

.listing-pricing {
  margin-top: 0.26rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.02rem;
}

.listing-pricing-row {
  margin: 0;
  display: grid;
  grid-template-columns: 7.8rem minmax(0, 1fr);
  gap: 0.34rem;
  align-items: baseline;
}

.listing-pricing-label {
  color: #5f7390;
  font-size: calc(0.6rem * var(--font-scale));
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.listing-pricing-value {
  justify-self: end;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 0;
}

.listing-price-base {
  color: #70839a;
  opacity: 0.95;
  text-decoration: line-through;
  font-size: calc(0.72rem * var(--font-scale));
  font-weight: 700;
}

.listing-discount {
  font-size: calc(0.69rem * var(--font-scale));
  font-weight: 700;
  color: #37597d;
}

.listing-price-final {
  color: #c12b2b;
  font-family: "Neue Helvetica BQ", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: calc(0.9rem * var(--font-scale));
  font-weight: 800;
}

.listing-price-regular {
  color: #233a58;
}

.listing-pricing-single .listing-pricing-row {
  grid-template-columns: 4.2rem minmax(0, 1fr);
}

.listing-card.is-active .listing-pricing-label {
  color: #4a6280;
}

.lead-form {
  display: grid;
  gap: 0.65rem;
}

.lead-form input,
.lead-form textarea {
  border: 1px solid #c8d8ec;
  background: #f8fbff;
  color: #233a57;
}

.lead-form input::placeholder,
.lead-form textarea::placeholder {
  color: #6b7f98;
}

.lead-form input:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: #2f77de;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(47, 119, 222, 0.18);
}

.lead-form .btn {
  margin-top: 0.2rem;
}

.btn {
  border: none;
  border-radius: 11px;
  padding: 0.62rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: calc(var(--fs-body) * var(--font-scale));
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.btn-accent {
  background: linear-gradient(140deg, #2f77de, #245fb5);
  color: #fff;
  box-shadow: 0 8px 18px rgba(36, 95, 181, 0.26);
}

.btn-accent:hover {
  background: linear-gradient(140deg, #2a6cc9, #1f539f);
}

.btn:disabled {
  background: #b8c2cf;
  cursor: not-allowed;
}

.status {
  margin: 0.75rem 0 0;
  font-size: calc(var(--fs-small) * var(--font-scale));
  color: #355f8f;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 38, 56, 0.26);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #c9d8ec;
  padding: 1rem;
  box-shadow: 0 18px 46px rgba(15, 36, 64, 0.28);
}

.modal-card h2 {
  margin: 0 2rem 0.3rem 0;
  font-size: calc(1.15rem * var(--font-scale));
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

#visualizationsModalTitle.gallery-investment-label {
  margin: 0 2.1rem 0.46rem 0;
  display: inline-flex;
  width: fit-content;
  max-width: calc(100% - 2.2rem);
  font-size: calc(0.94rem * var(--font-scale));
  font-weight: 900;
  line-height: 1.2;
}

.modal-subtitle {
  margin: 0 0 0.8rem;
  font-size: calc(var(--fs-small) * var(--font-scale));
  font-weight: 600;
  letter-spacing: -0.004em;
  color: #587495;
}

.external-mode-actions {
  display: flex;
  gap: 0.56rem;
  justify-content: flex-end;
}

.gallery-modal-card {
  width: min(1180px, 93vw);
  max-height: min(82vh, 82dvh);
  height: min(82vh, 82dvh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 0.5rem;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #bfd2ea;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(246, 251, 255, 0.96) 100%);
  box-shadow: 0 24px 56px rgba(16, 39, 70, 0.28);
  padding: 0.9rem;
}

#visualizationsModal {
  padding: clamp(0.55rem, 1.35vw, 1rem);
  place-items: center;
}

#visualizationsModal .gallery-modal-card {
  margin: 0 auto;
}

#visualizationsModal .modal-subtitle {
  margin: 0 0 0.15rem;
  color: #567291;
}

.gallery-stage {
  position: relative;
  min-height: 0;
  border-radius: 16px;
  border: 1px solid #c8d8ec;
  background: linear-gradient(160deg, #eef4fd 0%, #e3edf9 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
  padding: 0.5rem;
}

.gallery-media-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 12px;
  border: 1px solid #d2dff0;
  background: #f4f8ff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.3rem, 0.8vw, 0.65rem);
}

.gallery-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 0.34rem;
  background: rgba(244, 248, 255, 0.78);
  pointer-events: none;
}

.gallery-loading .loader-text {
  color: #36597e;
  text-shadow: none;
}

.gallery-loading[hidden] {
  display: none !important;
}

.gallery-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(66vh, calc(82dvh - 250px));
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

.gallery-empty {
  margin: 0;
  padding: 0.9rem 1rem;
  max-width: min(92%, 640px);
  color: #4d6788;
  font-size: calc(var(--fs-small) * var(--font-scale));
  font-weight: 600;
  text-align: center;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  border: 1px solid rgba(156, 181, 212, 0.9);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  color: #2f5f95;
  font-size: calc(1rem * var(--font-scale));
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(36, 74, 119, 0.22);
  cursor: pointer;
}

#galleryPrevBtn {
  left: 1rem;
}

#galleryNextBtn {
  right: 1rem;
}

.gallery-nav-btn:hover {
  border-color: #8eb0d9;
  background: rgba(255, 255, 255, 0.94);
  color: #214f86;
}

.gallery-nav-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.gallery-footer {
  margin-top: 0.18rem;
  display: flex;
  justify-content: center;
}

.gallery-counter {
  margin: 0;
  min-width: 4.4rem;
  text-align: center;
  padding: 0.18rem 0.56rem;
  border-radius: 999px;
  border: 1px solid #c7d8ee;
  background: #ebf3ff;
  color: #3f6288;
  font-size: calc(0.76rem * var(--font-scale));
  font-weight: 800;
}

.btn.is-disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid #b9cde6;
  background: #f4f8ff;
  color: #46698d;
  font-size: calc(1.15rem * var(--font-scale));
  cursor: pointer;
}

.brand-name,
.brand-sub,
.viewer-title,
#selectedMeta,
.control-label,
.toggle-btn,
.view-mode-btn,
.list-head h2,
#resultCount,
select,
input,
textarea,
.listing-title,
.badge,
.listing-meta,
.listing-price,
.btn,
.status,
.modal-card h2,
.modal-subtitle {
  letter-spacing: 0;
}

.empty {
  margin: 0;
  padding: 1rem 0.8rem;
  border: 1px dashed #bfd0e6;
  border-radius: 12px;
  color: var(--ink-soft);
  background: #f5f9ff;
}

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

  .app-shell {
    grid-template-columns: 1fr;
    gap: 1rem;
    height: auto;
    min-height: auto;
  }

  .viewer-card {
    border-radius: 20px;
  }

  .viewer-stage {
    border-radius: 20px;
  }

  .list-column {
    margin-left: 0;
  }

  .viewer-card {
    height: clamp(540px, 74vh, 860px);
  }

  .list-card {
    height: auto;
  }

  .listings {
    max-height: 52vh;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-link {
    width: 100%;
  }

  .viewer-card {
    height: clamp(500px, 78vh, 720px);
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .viewer-view-group {
    min-width: 132px;
  }

  .viewer-control-panel {
    right: 0.8rem;
    bottom: 0.8rem;
  }

  .gallery-stage {
    padding: 0.35rem;
  }

  .gallery-modal-card {
    width: 95vw;
    max-height: min(80vh, 80dvh);
    height: min(80vh, 80dvh);
    padding: 0.65rem;
  }

  .gallery-nav-btn {
    width: 2.35rem;
    height: 2.35rem;
  }

  #galleryPrevBtn {
    left: 0.55rem;
  }

  #galleryNextBtn {
    right: 0.55rem;
  }

}
