:root {
  color-scheme: dark;
  --text: #f6efe3;
  --muted: #d7cdbb;
  --line: rgba(246, 239, 227, 0.22);
  --gold: #c5a56d;
  --gold-strong: #e0c083;
  --panel: rgba(13, 12, 10, 0.62);
  --panel-strong: rgba(10, 9, 8, 0.86);
  --bg: #0f0e0d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
a {
  font: inherit;
}

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

.viewer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 242px;
  width: 100vw;
  height: 100vh;
}

.stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #141210;
  cursor: grab;
}

.stage:active {
  cursor: grabbing;
}

.scene-media {
  position: absolute;
  inset: -4%;
  background-image: var(--scene-image);
  background-position: 50% 50%;
  background-size: cover;
  transform: scale(1.08) translate3d(var(--pan-x, 0), var(--pan-y, 0), 0);
  transition:
    background-image 360ms ease,
    transform 120ms ease-out,
    filter 360ms ease;
  filter: saturate(0.92) contrast(1.04);
  will-change: transform;
}

.scene-media.concept {
  filter: saturate(0.9) contrast(1.02);
}

.shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.06) 34%, rgba(0, 0, 0, 0.82)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.44), transparent 52%, rgba(0, 0, 0, 0.48));
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 52px 0;
}

.eyebrow,
h1,
h2,
h3,
p {
  margin: 0;
}

.eyebrow,
.section-kicker {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.eyebrow {
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(30px, 3vw, 48px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0;
}

.badge {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid rgba(197, 165, 109, 0.5);
  background: rgba(0, 0, 0, 0.46);
  color: var(--text);
  font-size: 14px;
}

.scene-copy {
  position: absolute;
  z-index: 3;
  left: 52px;
  bottom: 168px;
  width: min(780px, calc(100vw - 440px));
}

.scene-type {
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 16px;
}

.scene-copy h2 {
  max-width: 780px;
  font-size: clamp(40px, 5.2vw, 74px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.scene-copy p:last-child {
  margin-top: 16px;
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 22px);
  line-height: 1.65;
}

.property-card {
  position: absolute;
  z-index: 5;
  left: 52px;
  top: 142px;
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  width: min(680px, calc(100vw - 620px));
  border: 1px solid var(--line);
  background: rgba(9, 8, 7, 0.48);
  backdrop-filter: blur(14px);
}

.property-card div {
  padding: 12px 14px;
  border-right: 1px solid rgba(246, 239, 227, 0.12);
}

.property-card div:last-child {
  border-right: 0;
}

.property-card span,
.property-card strong {
  display: block;
}

.property-card span {
  color: var(--gold);
  font-size: 12px;
}

.property-card strong {
  margin-top: 5px;
  color: var(--text);
  font-size: 15px;
}

.insight-panel {
  position: absolute;
  z-index: 5;
  right: 32px;
  top: 104px;
  width: 272px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: rgba(10, 9, 8, 0.62);
  backdrop-filter: blur(16px);
}

.insight-panel p {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 13px;
}

.insight-panel ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.insight-panel li {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.insight-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--gold);
}

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(246, 239, 227, 0.8);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  pointer-events: auto;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.hotspot::before,
.hotspot::after {
  content: "";
  position: absolute;
}

.hotspot::before {
  inset: 12px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.hotspot::after {
  inset: -8px;
  border: 1px solid rgba(197, 165, 109, 0.35);
  border-radius: 999px;
  animation: pulse 2s ease-out infinite;
}

.hotspot:hover {
  transform: scale(1.08);
  background: rgba(197, 165, 109, 0.42);
}

@keyframes pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.85);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.gallery-control {
  position: absolute;
  z-index: 5;
  left: 52px;
  bottom: 92px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.gallery-arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 239, 227, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.gallery-arrow svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-meta {
  min-width: 220px;
}

.gallery-meta span,
.gallery-meta strong {
  display: block;
}

.gallery-meta span {
  color: var(--gold);
  font-size: 12px;
}

.gallery-meta strong {
  margin-top: 2px;
  font-size: 15px;
}

.space-map {
  position: absolute;
  z-index: 5;
  right: 32px;
  bottom: 104px;
  width: 272px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
}

.map-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.map-title span {
  color: var(--gold);
}

.floor {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 9px;
  padding: 13px 14px 13px 18px;
  border: 1px solid rgba(246, 239, 227, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  color: var(--text);
  text-align: left;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.16);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    translate 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.floor::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 11px;
  bottom: 11px;
  width: 2px;
  background: rgba(197, 165, 109, 0.62);
}

.floor:hover,
.floor.active {
  border-color: rgba(197, 165, 109, 0.72);
  background: rgba(197, 165, 109, 0.22);
  translate: 0 -4px;
}

.floor span,
.floor small {
  display: block;
}

.floor span {
  font-size: 15px;
  font-weight: 700;
}

.floor small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.image-strip {
  position: absolute;
  z-index: 5;
  left: 52px;
  right: 336px;
  bottom: 28px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.strip-thumb {
  position: relative;
  flex: 0 0 138px;
  height: 76px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #181512;
  color: var(--text);
  cursor: pointer;
}

.strip-thumb.active {
  border-color: var(--gold);
}

.strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82);
}

.strip-thumb span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.88);
}

.notice {
  position: absolute;
  z-index: 4;
  left: 52px;
  bottom: 6px;
  color: rgba(246, 239, 227, 0.72);
  font-size: 12px;
}

.thumb-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: #12100e;
  overflow-y: auto;
}

.rail-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rail-head span,
.rail-head strong {
  display: block;
}

.rail-head span {
  color: var(--gold);
  font-size: 12px;
}

.rail-head strong {
  margin-top: 4px;
  font-size: 20px;
}

.scene-group {
  display: grid;
  gap: 9px;
}

.scene-group h3 {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.thumb {
  position: relative;
  display: block;
  height: 92px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #181512;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.thumb.active {
  border-color: var(--gold);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.76);
  transition: transform 220ms ease;
}

.thumb:hover img {
  transform: scale(1.05);
}

.thumb span {
  position: absolute;
  left: 10px;
  right: 44px;
  bottom: 9px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.thumb small {
  position: absolute;
  right: 8px;
  bottom: 9px;
  color: var(--gold);
  font-size: 12px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.mobile-section-tabs,
.mobile-story {
  display: none;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
    background: #0f0e0d;
  }

  .viewer-shell {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100svh;
  }

  .stage {
    height: 100svh;
    min-height: 680px;
    cursor: default;
  }

  .scene-media {
    inset: -3%;
    transform: scale(1.06) translate3d(var(--pan-x, 0), var(--pan-y, 0), 0);
  }

  .shade {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.04) 32%, rgba(0, 0, 0, 0.86)),
      linear-gradient(0deg, rgba(0, 0, 0, 0.38), transparent 58%);
  }

  .topbar {
    display: block;
    padding: max(22px, env(safe-area-inset-top)) 20px 0;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 11px;
  }

  h1 {
    max-width: 292px;
    font-size: 25px;
    line-height: 1.12;
  }

  .badge {
    position: absolute;
    top: max(24px, env(safe-area-inset-top));
    right: 20px;
    max-width: 118px;
    padding: 8px 10px;
    font-size: 12px;
    text-align: center;
  }

  .property-card,
  .insight-panel,
  .space-map,
  .image-strip {
    display: none;
  }

  .scene-copy {
    left: 20px;
    right: 20px;
    bottom: 148px;
    width: auto;
  }

  .scene-type {
    margin-bottom: 10px;
    font-size: 14px;
  }

  .scene-copy h2 {
    max-width: 330px;
    font-size: 39px;
    line-height: 1.08;
  }

  .scene-copy p:last-child {
    margin-top: 12px;
    max-width: 330px;
    color: rgba(246, 239, 227, 0.86);
    font-size: 15px;
    line-height: 1.55;
  }

  .hotspot {
    width: 54px;
    height: 54px;
    background: rgba(10, 9, 8, 0.46);
  }

  .hotspot::before {
    inset: 15px;
  }

  .gallery-control {
    left: 20px;
    right: 20px;
    bottom: 66px;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-color: rgba(246, 239, 227, 0.24);
    background: rgba(10, 9, 8, 0.58);
  }

  .gallery-arrow {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }

  .gallery-meta {
    min-width: 0;
    flex: 1;
    text-align: center;
  }

  .gallery-meta strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .notice {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 30;
    padding: 7px 10px;
    background: rgba(10, 9, 8, 0.76);
    color: rgba(246, 239, 227, 0.82);
    font-size: 11px;
    line-height: 1.45;
    text-align: center;
    backdrop-filter: blur(12px);
  }

  .thumb-rail {
    display: block;
    padding: 18px 16px 6px;
    border-left: 0;
    background: #0f0e0d;
    overflow: visible;
  }

  .rail-head {
    display: none;
  }

  .scene-groups {
    display: none;
  }

  .mobile-section-tabs {
    position: sticky;
    top: 0;
    z-index: 18;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -16px;
    padding: 12px 16px;
    background: rgba(15, 14, 13, 0.94);
    backdrop-filter: blur(14px);
  }

  .mobile-section-tabs a {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid rgba(246, 239, 227, 0.18);
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
  }

  .mobile-story {
    display: block;
    padding: 0 16px 76px;
    background:
      linear-gradient(180deg, #0f0e0d 0%, #15120f 46%, #0f0e0d 100%);
  }

  .story-section {
    padding: 30px 0 8px;
  }

  .story-section h2 {
    margin-top: 8px;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: 0;
  }

  .section-lead,
  .story-section > p:not(.section-kicker) {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
  }

  .mobile-tour-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
  }

  .tour-card {
    position: relative;
    min-height: 142px;
    overflow: hidden;
    border: 1px solid rgba(246, 239, 227, 0.14);
    background: #17130f;
    color: var(--text);
    text-align: left;
  }

  .tour-card.active {
    border-color: var(--gold);
  }

  .tour-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.68);
  }

  .tour-card span,
  .tour-card strong {
    position: relative;
    z-index: 1;
    display: block;
    padding-left: 11px;
    padding-right: 11px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
  }

  .tour-card span {
    padding-top: 82px;
    color: var(--gold-strong);
    font-size: 11px;
  }

  .tour-card strong {
    margin-top: 4px;
    padding-bottom: 12px;
    font-size: 14px;
    line-height: 1.3;
  }

  .render-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin: 18px -16px 0;
    padding: 0 16px 6px;
    scroll-snap-type: x mandatory;
  }

  .render-card {
    flex: 0 0 min(82vw, 330px);
    overflow: hidden;
    border: 1px solid rgba(246, 239, 227, 0.16);
    background: #17130f;
    scroll-snap-align: start;
  }

  .render-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #100e0b;
  }

  .render-card div {
    padding: 13px 14px 16px;
  }

  .render-card span {
    display: block;
    color: var(--gold);
    font-size: 11px;
  }

  .render-card strong {
    display: block;
    margin-top: 7px;
    font-size: 18px;
  }

  .render-card p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
  }

  .value-grid,
  .buyer-grid,
  .amenity-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
  }

  .value-card,
  .buyer-card,
  .amenity-card {
    padding: 16px;
    border: 1px solid rgba(246, 239, 227, 0.14);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
      rgba(12, 10, 8, 0.72);
  }

  .value-card strong,
  .buyer-card strong,
  .amenity-card strong {
    display: block;
    color: var(--text);
    font-size: 17px;
  }

  .value-card p,
  .buyer-card p,
  .amenity-card p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
  }

  .compliance-section {
    padding-bottom: 28px;
  }
}

@media (max-width: 560px) {
  .stage {
    min-height: 700px;
  }

  .topbar {
    gap: 12px;
  }

  .scene-copy {
    bottom: 150px;
  }

  .scene-copy h2 {
    font-size: 34px;
  }

  .scene-copy p:last-child {
    max-width: 315px;
  }

  .hotspot:nth-child(2) {
    top: 60% !important;
  }
}

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