:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ink: #f6f7f3;
  --muted: rgba(246, 247, 243, 0.62);
  --glass: rgba(13, 17, 20, 0.62);
  --glass-strong: rgba(12, 15, 18, 0.86);
  --line: rgba(255, 255, 255, 0.14);
  --green: #17d8a1;
  --green-soft: rgba(23, 216, 161, 0.18);
  --heading: 0deg;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #101315;
  color: var(--ink);
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

button,
canvas {
  -webkit-tap-highlight-color: transparent;
}

.app,
.view {
  position: fixed;
  inset: 0;
}

.view {
  visibility: hidden;
  opacity: 0;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.app[data-mode="tour"] .tour-view,
.app[data-mode="floorplan"] .floorplan-view,
.app[data-mode="model"] .model-view {
  visibility: visible;
  opacity: 1;
}

.tour-view {
  background: #111;
}

#panoCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#panoCanvas.dragging {
  cursor: grabbing;
}

.shade {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.shade-top {
  top: 0;
  height: 24%;
  background: linear-gradient(rgba(2, 5, 7, 0.66), transparent);
}

.shade-bottom {
  bottom: 0;
  height: 38%;
  background: linear-gradient(transparent, rgba(2, 5, 7, 0.72));
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  gap: 18px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(35, 88, 75, 0.45), transparent 28%),
    #121719;
  transition: opacity 400ms ease, visibility 400ms ease;
}

.loading.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-content: center;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.025);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.08em;
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    transform: scale(0.94);
    opacity: 0.6;
  }
}

.drag-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
  transition: opacity 500ms;
}

.drag-hint.hidden {
  opacity: 0;
}

.topbar {
  position: fixed;
  z-index: 15;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 30px;
  pointer-events: none;
}

.property-heading {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.property-kicker,
.eyebrow {
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.property-heading h1 {
  margin: 7px 0 5px;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 620;
  letter-spacing: 0.02em;
}

.property-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.round-button,
.viewer-tools button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(18px);
  cursor: pointer;
  font-weight: 650;
  transition: background 180ms, transform 180ms;
}

.round-button:hover,
.viewer-tools button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.scene-rail {
  position: fixed;
  z-index: 17;
  left: 26px;
  top: 50%;
  width: 196px;
  max-height: min(60vh, 520px);
  transform: translateY(-42%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(24px);
  overflow: hidden;
  transition: width 260ms ease, background 260ms ease;
}

.rail-current {
  width: 100%;
  min-height: 68px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.rail-current small {
  display: block;
  margin-bottom: 3px;
  color: var(--green);
  font-size: 10px;
}

.rail-current strong {
  font-size: 15px;
}

.rail-count {
  color: var(--muted);
  font-size: 10px;
}

.scene-list {
  max-height: 0;
  overflow: auto;
  border-top: 1px solid transparent;
  visibility: hidden;
  transition: max-height 300ms ease, visibility 300ms ease;
}

.scene-rail.open {
  width: 250px;
  background: var(--glass-strong);
}

.scene-rail.open .scene-list {
  max-height: calc(min(60vh, 520px) - 68px);
  border-top-color: var(--line);
  visibility: visible;
}

.scene-group {
  padding: 12px;
}

.scene-group + .scene-group {
  border-top: 1px solid var(--line);
}

.scene-group h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.scene-item {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  padding: 8px 9px;
  border-radius: 10px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.scene-item span {
  color: rgba(255, 255, 255, 0.36);
  font-size: 10px;
}

.scene-item strong {
  font-size: 12px;
  font-weight: 520;
}

.scene-item:hover,
.scene-item.active {
  background: var(--green-soft);
}

.scene-item.active span,
.scene-item.active strong {
  color: var(--green);
}

.mini-plan {
  position: fixed;
  z-index: 12;
  left: 26px;
  bottom: 26px;
  width: 204px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(22px);
}

.mini-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px 8px;
  font-size: 11px;
}

.mini-plan-head span {
  color: var(--muted);
}

.mini-plan-body {
  position: relative;
  height: 112px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.93);
}

.mini-plan img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mini-plan-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border: 3px solid white;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(23, 216, 161, 0.28);
}

.jump-bar {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 102px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  max-width: min(70vw, 720px);
  scrollbar-width: none;
}

.jump-bar::-webkit-scrollbar {
  display: none;
}

.jump-button {
  min-width: 92px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  cursor: pointer;
  text-align: left;
}

.jump-button span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.jump-button strong {
  font-size: 11px;
  font-weight: 560;
}

.mode-dock {
  position: fixed;
  z-index: 16;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass-strong);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(24px);
}

.mode-button {
  min-width: 94px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.mode-button.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.mode-icon {
  color: var(--green);
  font-size: 17px;
}

.viewer-tools {
  position: fixed;
  z-index: 14;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
}

.viewer-tools button.active {
  color: #071b14;
  background: var(--green);
}

.compass {
  position: fixed;
  z-index: 11;
  right: 32px;
  top: 94px;
  width: 42px;
  height: 42px;
  display: grid;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(18px);
  transform: rotate(var(--heading));
  transition: transform 80ms linear;
}

.compass span {
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
}

.compass i {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 6px solid var(--green);
}

.disclaimer-button {
  position: fixed;
  z-index: 12;
  right: 30px;
  bottom: 28px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--glass);
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  backdrop-filter: blur(18px);
}

.brand {
  position: fixed;
  z-index: 11;
  right: 30px;
  bottom: 68px;
  display: grid;
  text-align: right;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.brand span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.floorplan-view,
.model-view {
  background:
    radial-gradient(circle at 68% 22%, rgba(33, 79, 67, 0.36), transparent 29%),
    linear-gradient(145deg, #111719, #0c1012 62%, #171b1c);
}

.section-heading {
  position: absolute;
  z-index: 2;
  left: 7vw;
  top: 22vh;
}

.section-heading h2 {
  margin: 9px 0 6px;
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 520;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.plan-stage {
  position: absolute;
  left: 33%;
  right: 7%;
  top: 12%;
  bottom: 14%;
  display: grid;
  place-items: center;
}

.plan-frame {
  position: relative;
  width: min(62vw, 880px);
  height: min(70vh, 720px);
  padding: 4%;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.36);
}

.plan-frame > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.plan-dots {
  position: absolute;
  inset: 4%;
}

.plan-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 3px solid white;
  border-radius: 50%;
  background: #1f2726;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.plan-dot.active {
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(23, 216, 161, 0.24);
}

.plan-dot span {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(13, 17, 20, 0.75);
  color: white;
  font-size: 8px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 150ms;
}

.plan-dot:hover span,
.plan-dot.active span {
  opacity: 1;
}

.floor-tabs {
  position: fixed;
  z-index: 16;
  left: 7vw;
  bottom: 25vh;
  display: grid;
  gap: 10px;
}

.floor-tabs button {
  min-width: 86px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
}

.floor-tabs button.active {
  border-color: rgba(23, 216, 161, 0.55);
  background: var(--green-soft);
  color: var(--green);
}

.app[data-mode="tour"] .floor-tabs {
  display: none;
}

.app:not([data-mode="tour"]) .scene-rail,
.app:not([data-mode="tour"]) .mini-plan,
.app:not([data-mode="tour"]) .jump-bar,
.app:not([data-mode="tour"]) .viewer-tools,
.app:not([data-mode="tour"]) .compass {
  display: none;
}

.model-heading {
  top: 22vh;
}

.model-stage {
  position: absolute;
  inset: 8% 5% 10% 28%;
  display: grid;
  place-items: center;
  perspective: 1300px;
  cursor: grab;
}

.model-stage:active {
  cursor: grabbing;
}

.model-world {
  position: relative;
  width: min(56vw, 760px);
  height: min(62vh, 620px);
  transform-style: preserve-3d;
  transform: rotateX(var(--model-pitch)) rotateZ(var(--model-yaw));
  transition: transform 80ms linear;
}

.model-level {
  --level: 0;
  position: absolute;
  inset: 8%;
  transform: translateZ(calc(var(--level) * -130px));
  transform-style: preserve-3d;
  border: 1px solid rgba(23, 216, 161, 0.5);
  border-radius: 22px;
  background: rgba(230, 239, 235, 0.92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
}

.model-level > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.82;
}

.model-level > strong {
  position: absolute;
  left: 16px;
  top: 14px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #16201e;
  color: white;
  font-size: 11px;
}

.model-level svg,
.model-points {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.model-level line {
  stroke: rgba(12, 97, 75, 0.34);
  stroke-width: 1.3;
}

.model-point {
  position: absolute;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 2px solid white;
  border-radius: 50%;
  background: #20302c;
  color: white;
  font-size: 8px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
}

.model-point.active {
  background: var(--green);
  color: #07261d;
}

.model-note {
  position: absolute;
  left: 7vw;
  bottom: 18vh;
  max-width: 260px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.dialog {
  width: min(500px, calc(100vw - 36px));
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(14, 18, 20, 0.96);
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(28px);
}

.dialog::backdrop {
  background: rgba(4, 7, 8, 0.64);
  backdrop-filter: blur(8px);
}

.dialog h2 {
  margin: 10px 0 22px;
  font-size: 26px;
}

.dialog p {
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

.dialog-close {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.property-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.property-facts div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.property-facts small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
}

.property-facts strong {
  font-size: 13px;
  font-weight: 560;
}

.dialog-muted {
  color: var(--muted) !important;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  top: 24px;
  transform: translate(-50%, -16px);
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-strong);
  font-size: 11px;
  opacity: 0;
  transition: opacity 180ms, transform 180ms;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 760px) {
  .topbar {
    padding: 18px;
  }

  .top-actions {
    display: none;
  }

  .scene-rail {
    left: 14px;
    top: auto;
    bottom: 196px;
    transform: none;
    width: 154px;
  }

  .scene-rail.open {
    width: min(280px, calc(100vw - 28px));
  }

  .mini-plan {
    display: none;
  }

  .jump-bar {
    left: 14px;
    right: 14px;
    bottom: 92px;
    transform: none;
    max-width: none;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .jump-button {
    flex: 0 0 auto;
  }

  .mode-dock {
    bottom: 14px;
    width: calc(100vw - 28px);
  }

  .mode-button {
    min-width: 0;
    flex: 1;
    padding: 9px 7px;
  }

  .viewer-tools {
    right: 14px;
  }

  .compass,
  .brand,
  .disclaimer-button {
    display: none;
  }

  .section-heading {
    left: 20px;
    top: 92px;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .plan-stage {
    left: 18px;
    right: 18px;
    top: 190px;
    bottom: 154px;
  }

  .plan-frame {
    width: 100%;
    height: 100%;
    border-radius: 20px;
  }

  .floor-tabs {
    left: 18px;
    bottom: 92px;
    display: flex;
  }

  .model-stage {
    inset: 190px 10px 160px;
  }

  .model-world {
    width: 92vw;
    height: 52vh;
  }

  .model-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
