/* ZENITH POWER · 实景 VR 漫游
 * 品牌：深蓝 #0B2A5B / #0E3A8C  青绿 #17C6B0
 */
:root {
  --navy-900: #061224;
  --navy-800: #081b36;
  --navy-700: #0b2a5b;
  --blue: #0e3a8c;
  --blue-soft: #2e6be6;
  --teal: #17c6b0;
  --teal-bright: #2be3c6;
  --ink: #eaf3ff;
  --muted: rgba(198, 216, 240, 0.66);
  --faint: rgba(198, 216, 240, 0.4);
  --glass: rgba(7, 21, 42, 0.62);
  --glass-strong: rgba(7, 21, 42, 0.86);
  --stroke: rgba(120, 170, 235, 0.2);
  --stroke-strong: rgba(120, 180, 245, 0.34);
  --radius: 16px;
  --shadow: 0 18px 48px rgba(2, 8, 20, 0.55);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

/* ============ 漫游页 ============ */
.tour-page { overflow: hidden; }

#app { position: fixed; inset: 0; overflow: hidden; }

#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  background: #061224;
}
#stage {
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0.36, 1), opacity 0.5s ease, filter 0.5s ease;
  will-change: transform, opacity;
}
#stage.is-dragging { cursor: grabbing; }

/* 场景切换：画面快速向前推进的过渡 */
#stage.warp-out {
  transform: perspective(1000px) translateZ(380px);
  opacity: 0;
  filter: blur(2px);
}
#stage.warp-in {
  transition: none;
  transform: perspective(1000px) translateZ(-260px);
  opacity: 0;
  filter: blur(2px);
}
#stage.warp-settle {
  transform: none;
  opacity: 1;
  filter: none;
}
body.switching .hotspots { opacity: 0; transition: opacity 0.15s ease; }

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

.hotspot {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.28s ease;
  will-change: transform;
  z-index: 2;
}
.hotspot.show { opacity: 1; }

.hs-pin {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #eafffb;
  background: radial-gradient(circle at 35% 30%, rgba(43, 227, 198, 0.42), rgba(8, 32, 66, 0.88) 70%);
  border: 1px solid rgba(43, 227, 198, 0.55);
  box-shadow: 0 0 0 6px rgba(23, 198, 176, 0.12), 0 10px 26px rgba(3, 12, 28, 0.6);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hs-pin svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hotspot:hover .hs-pin { transform: scale(1.08); box-shadow: 0 0 0 9px rgba(23, 198, 176, 0.18), 0 12px 30px rgba(3, 12, 28, 0.7); }

.hs-label {
  max-width: 180px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border-radius: 999px;
  color: #eafdf9;
  background: rgba(6, 26, 48, 0.72);
  border: 1px solid rgba(120, 200, 235, 0.28);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(2, 10, 24, 0.42);
}
.hotspot-scene .hs-pin { border-color: rgba(43, 227, 198, 0.8); }
.hotspot-gallery .hs-pin { border-color: rgba(120, 170, 245, 0.65); }
.hotspot-video .hs-pin { border-color: rgba(255, 176, 110, 0.8); }
.hotspot-info .hs-pin { border-color: rgba(120, 170, 245, 0.45); }

.hotspot .hs-pin::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(43, 227, 198, 0.5);
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.75; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* 顶栏 */
.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: linear-gradient(180deg, rgba(4, 14, 30, 0.72), rgba(4, 14, 30, 0));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  height: 40px;
  width: auto;
  max-width: 230px;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.35));
}

.top-actions { display: flex; align-items: center; gap: 10px; }
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(9, 30, 58, 0.55);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ghost-btn:hover { border-color: rgba(43, 227, 198, 0.5); background: rgba(12, 44, 80, 0.7); }

.scene-pill {
  position: absolute;
  top: 84px;
  left: 24px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  background: rgba(6, 22, 44, 0.5);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px);
  font-size: 13px;
  max-width: calc(100vw - 48px);
}
.scene-pill .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(23, 198, 176, 0.55);
  animation: dot 2.2s infinite;
  flex: none;
}
@keyframes dot {
  0% { box-shadow: 0 0 0 0 rgba(23, 198, 176, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(23, 198, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(23, 198, 176, 0); }
}
.scene-pill #scene-name { font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.scene-pill em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.scene-pill em::before { content: "·"; margin-right: 8px; color: var(--faint); }

.site-tag {
  flex: none;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #9ff0e3;
  background: rgba(23, 198, 176, 0.12);
  border: 1px solid rgba(43, 227, 198, 0.24);
  white-space: nowrap;
}

.site-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  margin-left: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: #dff6ff;
  background: rgba(46, 107, 230, 0.18);
  border: 1px solid rgba(120, 180, 245, 0.3);
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.site-switch:hover { background: rgba(46, 107, 230, 0.32); border-color: rgba(43, 227, 198, 0.5); }
.site-switch svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scene-loading {
  position: absolute;
  top: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(6, 22, 44, 0.72);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.scene-loading.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(43, 227, 198, 0.25);
  border-top-color: var(--teal);
  animation: spin 0.9s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 工具条 */
.toolbar {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 4px;
  padding: 8px;
  border-radius: 20px;
  background: rgba(6, 20, 40, 0.66);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 76px;
  height: 58px;
  border-radius: 14px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}
.tool-btn:hover { color: var(--ink); background: rgba(46, 107, 230, 0.14); }
.tool-btn.active { color: var(--teal-bright); background: rgba(23, 198, 176, 0.14); }
.tool-icon { width: 21px; height: 21px; }
.tool-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tool-label { font-size: 11px; letter-spacing: 0.06em; white-space: nowrap; }

/* 面板通用 */
.panel, .drawer {
  position: absolute;
  z-index: 25;
  background: var(--glass-strong);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
}
.panel-head.compact { padding-bottom: 6px; }
.panel-head h2 { font-size: 16px; font-weight: 600; letter-spacing: 0.06em; }
.panel-head p { margin-top: 4px; font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.panel-x {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  background: rgba(12, 36, 66, 0.7);
  border: 1px solid var(--stroke);
  flex: none;
}
.panel-x:hover { color: var(--ink); border-color: var(--stroke-strong); }

/* 场景抽屉 */
.drawer {
  top: 78px;
  right: 20px;
  bottom: 104px;
  width: 368px;
  transform: translateX(24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.drawer.open { opacity: 1; pointer-events: auto; transform: translateX(0); }

.drawer-body { flex: 1; overflow-y: auto; padding: 4px 18px 20px; scrollbar-width: thin; }
.drawer-body::-webkit-scrollbar { width: 6px; }
.drawer-body::-webkit-scrollbar-thumb { background: rgba(120, 170, 235, 0.24); border-radius: 3px; }

.drawer-group { margin-top: 12px; }
.drawer-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 4px 10px;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.drawer-group-head em { font-style: normal; font-size: 10px; letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; }

.scene-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scene-card {
  position: relative;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(120, 170, 235, 0.16);
  background: rgba(10, 30, 56, 0.7);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.scene-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.86; transition: opacity 0.2s ease, transform 0.3s ease; }
.scene-card:hover { border-color: rgba(43, 227, 198, 0.4); transform: translateY(-2px); }
.scene-card:hover img { opacity: 1; transform: scale(1.04); }
.scene-card.active { border-color: var(--teal); box-shadow: 0 0 0 1px rgba(23, 198, 176, 0.35), 0 10px 24px rgba(3, 14, 30, 0.5); }
.scene-card.active img { opacity: 1; }
.scene-card-info {
  display: block;
  padding: 9px 10px 10px;
  background: linear-gradient(180deg, rgba(6, 20, 40, 0.9), rgba(6, 20, 40, 0.98));
}
.scene-card-info strong { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; }
.scene-card-info em { display: block; margin-top: 3px; font-style: normal; font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-card-index {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  color: rgba(234, 253, 249, 0.86);
  background: rgba(4, 16, 34, 0.6);
  border: 1px solid rgba(120, 200, 235, 0.2);
  backdrop-filter: blur(4px);
  font-variant-numeric: tabular-nums;
}
.scene-card-media {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}
.scene-card-media span {
  font-size: 9px;
  line-height: 1.4;
  padding: 2px 5px;
  border-radius: 5px;
  color: rgba(220, 244, 255, 0.9);
  background: rgba(4, 16, 34, 0.66);
  border: 1px solid rgba(120, 200, 235, 0.22);
  backdrop-filter: blur(4px);
}

/* 视角面板已移除 */

.wide-btn {
  display: block;
  width: calc(100% - 36px);
  margin: 14px 18px 0;
  height: 42px;
  border-radius: 12px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: rgba(14, 58, 140, 0.5);
  border: 1px solid rgba(120, 170, 235, 0.28);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.wide-btn:hover { background: rgba(20, 78, 180, 0.55); border-color: var(--stroke-strong); }
.wide-btn.teal { background: linear-gradient(120deg, #12a894, #17c6b0); border-color: transparent; color: #04211c; font-weight: 600; }
.wide-btn.teal:hover { filter: brightness(1.06); }

/* 小地图 */
.map-panel {
  left: 20px;
  top: 150px;
  right: auto;
  bottom: auto;
  width: 316px;
  padding-bottom: 6px;
  transform: translateY(-10px);
}
.map-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.map-panel.dim .minimap-body { opacity: 0.5; }
.minimap-body { padding: 4px 12px 0; transition: opacity 0.2s ease; }
.map-svg { width: 100%; height: auto; display: block; }
.map-node { cursor: pointer; outline: none; }
.map-node circle { transition: fill 0.2s ease, r 0.2s ease; }
.map-node .map-label { opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.map-node.active .map-label { opacity: 1; }
.map-node:hover .map-label { opacity: 0.85; }
.map-tip { padding: 0 20px 14px; font-size: 10.5px; color: var(--faint); letter-spacing: 0.06em; }

/* 弹层 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 10, 22, 0.66);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  width: 68vw;
  height: 68vh;
  max-height: 68vh;
  overflow-y: auto;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(10, 32, 62, 0.98), rgba(6, 20, 40, 0.99));
  border: 1px solid var(--stroke-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(12px) scale(0.99);
  transition: transform 0.24s ease;
}
.modal.open .modal-card { transform: none; }
.modal-card.video-mode {
  width: auto;
  height: auto;
  max-width: 82vw;
  max-height: 82vh;
  overflow: hidden;
}
.modal-card.text-mode {
  width: auto;
  max-width: min(560px, 68vw);
  height: auto;
  max-height: 68vh;
}
.modal-card.image-mode {
  width: auto;
  height: auto;
  max-width: 68vw;
  max-height: 84vh;
  overflow: hidden;
}
.modal-card.image-mode .modal-head { padding: 14px 18px 0; }
.modal-card.image-mode .modal-body { padding: 10px 12px 14px; }
.modal-card.image-mode .modal-figure { margin: 0 auto 10px; }
.modal-card.image-mode .modal-img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(68vw - 24px);
  max-height: calc(68vh - 70px);
  margin: 0 auto;
  object-fit: contain;
}
.modal-card.video-mode .modal-head { padding: 14px 18px 0; }
.modal-card.video-mode .modal-body { padding: 10px 12px 12px; }
.modal-card.center-mode .modal-head { display: block; position: relative; text-align: center; }
.modal-card.center-mode .modal-x { position: absolute; top: 24px; right: 26px; }
.modal-card.center-mode .modal-body { text-align: center; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 26px 0; }
.modal-head h2 { font-size: 20px; font-weight: 600; letter-spacing: 0.04em; }
.modal-sub { margin-top: 6px; font-size: 11.5px; color: var(--muted); letter-spacing: 0.12em; }
.modal-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  background: rgba(12, 36, 66, 0.8);
  border: 1px solid var(--stroke);
  flex: none;
}
.modal-x:hover { color: var(--ink); }
.modal-body { padding: 18px 26px 26px; font-size: 14px; line-height: 1.9; color: rgba(219, 233, 250, 0.86); }
.modal-body p + p { margin-top: 12px; }
.modal-img { width: 100%; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--stroke); }
.modal-figure { position: relative; display: block; margin-bottom: 16px; }
.modal-figure .modal-img { margin-bottom: 0; }
.floor-jump {
  position: absolute;
  top: 4.5%;
  left: 10%;
  right: 8%;
  display: flex;
  gap: 8px;
}
.floor-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #eafdf9;
  background: rgba(6, 26, 48, 0.78);
  border: 1px solid rgba(43, 227, 198, 0.5);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(2, 10, 24, 0.45);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.floor-btn:hover { background: rgba(23, 198, 176, 0.24); border-color: var(--teal-bright); }
.modal-video { width: 100%; border-radius: 12px; margin-bottom: 16px; background: #000; }
.modal-card.video-mode .modal-video {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(82vw - 24px);
  max-height: calc(82vh - 90px);
  margin: 0 auto;
  border-radius: 10px;
}
.modal-footer { margin-top: 16px; font-size: 12px; color: var(--faint); letter-spacing: 0.08em; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.gallery-item { padding: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--stroke); background: #071528; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #071528; transition: transform 0.3s ease, opacity 0.2s ease; }
.gallery-item:hover img { transform: scale(1.04); opacity: 0.9; }

/* 混合图集：横版占两列，竖版成对排列，单张竖版居中 */
.gallery-grid.mixed .gallery-item.is-wide { grid-column: 1 / -1; }
.gallery-grid.mixed .gallery-item.is-wide img { aspect-ratio: 16 / 9; }
.gallery-grid.mixed .gallery-item.is-center { grid-column: 1 / -1; justify-self: center; width: calc(50% - 5px); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(2, 8, 18, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 112px;
  transform: translateX(-50%) translateY(10px);
  z-index: 70;
  padding: 10px 20px;
  max-width: 80vw;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink);
  background: rgba(8, 26, 50, 0.9);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 加载页 */
.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(80% 60% at 50% 40%, #0b2a5b 0%, #061224 70%);
  transition: opacity 0.6s ease;
}
.loader.done { opacity: 0; pointer-events: none; }
.loader-inner { width: min(360px, 82vw); text-align: center; }
.loader-logo {
  height: 72px;
  width: auto;
  max-width: 280px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}
.loader-brand { font-size: 13px; letter-spacing: 0.24em; font-weight: 500; }
.loader-brand em { display: block; font-style: normal; font-size: 11px; letter-spacing: 0.22em; color: var(--muted); }
.loader-track { height: 3px; margin: 30px 0 12px; border-radius: 2px; background: rgba(120, 170, 235, 0.16); overflow: hidden; }
.loader-bar { height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, #0e3a8c, #17c6b0); transition: width 0.3s ease; }
.loader-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
#loader-percent { font-variant-numeric: tabular-nums; color: var(--teal-bright); }

.debug-badge {
  position: fixed;
  top: 78px;
  right: 24px;
  z-index: 30;
  padding: 6px 12px;
  border-radius: 8px;
  font: 11px/1.4 ui-monospace, Consolas, monospace;
  color: #a9f5e6;
  background: rgba(4, 16, 32, 0.8);
  border: 1px solid rgba(43, 227, 198, 0.3);
  pointer-events: none;
}

/* ============ 启动页 ============ */
.landing {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  background:
    radial-gradient(90% 60% at 20% 0%, rgba(23, 92, 190, 0.34), transparent 60%),
    radial-gradient(70% 50% at 90% 10%, rgba(23, 198, 176, 0.18), transparent 60%),
    linear-gradient(180deg, #071528 0%, #050e1e 100%);
  color: var(--ink);
}
.landing::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 170, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 235, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}
.landing-wrap {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 32px 56px;
}
.landing-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.landing-nav .brand-mark { height: 44px; }

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0 56px;
}
.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #9ff0e3;
  background: rgba(23, 198, 176, 0.1);
  border: 1px solid rgba(43, 227, 198, 0.24);
}
.hero-copy .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.hero h1 {
  margin-top: 22px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: 0.02em;
  font-weight: 650;
}
.hero h1 span {
  background: linear-gradient(100deg, #eafdf9 10%, #2be3c6 60%, #6fa8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lede {
  margin-top: 20px;
  max-width: 540px;
  font-size: 15px;
  line-height: 1.95;
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #04211c;
  background: linear-gradient(120deg, #2be3c6, #14b8d4 55%, #2e6be6);
  box-shadow: 0 16px 40px rgba(23, 198, 176, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.enter-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 48px rgba(23, 198, 176, 0.38); }
.enter-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ghost-link {
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink);
  border: 1px solid var(--stroke);
  background: rgba(9, 30, 58, 0.4);
  transition: border-color 0.2s ease;
}
.ghost-link:hover { border-color: rgba(43, 227, 198, 0.5); }

.hero-stats { display: flex; gap: 34px; margin-top: 42px; }
.hero-stats div strong { display: block; font-size: 24px; font-weight: 600; letter-spacing: 0.02em; }
.hero-stats div span { display: block; margin-top: 6px; font-size: 11px; letter-spacing: 0.14em; color: var(--faint); }

.qr-card {
  position: relative;
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(13, 38, 72, 0.86), rgba(6, 20, 40, 0.92));
  border: 1px solid var(--stroke-strong);
  box-shadow: var(--shadow);
}
.qr-card h3 { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; }
.qr-card p { margin-top: 8px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.qr-box {
  margin: 20px auto 16px;
  width: 196px;
  height: 196px;
  padding: 12px;
  border-radius: 16px;
  background: #eef6ff;
  display: grid;
  place-items: center;
}
.qr-box canvas, .qr-box img, .qr-box svg { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-url {
  display: block;
  text-align: center;
  font: 12px/1.5 ui-monospace, Consolas, monospace;
  color: #8ef0e1;
  word-break: break-all;
}
.qr-note { margin-top: 12px; text-align: center; font-size: 10.5px; color: var(--faint); letter-spacing: 0.06em; }

.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 12px; }
.feature {
  padding: 22px 22px 24px;
  border-radius: 18px;
  background: rgba(9, 28, 54, 0.5);
  border: 1px solid rgba(120, 170, 235, 0.14);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature:hover { border-color: rgba(43, 227, 198, 0.35); transform: translateY(-3px); }
.feature .f-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--teal-bright);
  background: rgba(23, 198, 176, 0.1);
  border: 1px solid rgba(43, 227, 198, 0.22);
}
.feature .f-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature h4 { margin: 16px 0 8px; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }
.feature p { font-size: 12px; line-height: 1.85; color: var(--muted); }

.landing-foot {
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid rgba(120, 170, 235, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 52px; }
  .qr-card { max-width: 420px; }
}

@media (max-width: 820px) {
  .topbar { padding: 12px 14px; }
  .brand-mark { height: 30px; max-width: 180px; }
  .landing-nav .brand-mark { height: 34px; }
  .ghost-btn { height: 34px; padding: 0 14px; font-size: 12px; }
  .round-btn { width: 34px; height: 34px; }

  .scene-pill { top: 62px; left: 14px; right: 14px; padding: 8px 12px; font-size: 12px; gap: 8px; }
  .scene-pill em { display: none; }
  .site-tag { font-size: 9px; padding: 2px 6px; }
  .site-switch { font-size: 10.5px; padding: 4px 8px; gap: 4px; }
  .site-switch svg { width: 11px; height: 11px; }

  .scene-loading { top: 108px; }

  .toolbar { bottom: max(14px, env(safe-area-inset-bottom)); padding: 6px; gap: 0; border-radius: 16px; width: calc(100% - 24px); justify-content: space-between; }
  .tool-btn { width: 19%; height: 52px; border-radius: 12px; gap: 4px; }
  .tool-icon { width: 19px; height: 19px; }
  .tool-label { font-size: 10px; letter-spacing: 0.02em; }

  .drawer {
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    transform: translateX(100%);
    padding-top: env(safe-area-inset-top);
  }
  .panel-head { padding-top: 22px; }
  .panel-head.compact { padding-top: 16px; }

  .panel.map-panel {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 84px;
    width: auto;
    max-height: 62vh;
    overflow-y: auto;
    transform: translateY(14px);
  }

  .hotspot .hs-label { font-size: 11px; padding: 5px 10px; }
  .hs-pin { width: 34px; height: 34px; }

  .modal { padding: 14px; }
  .modal-card { max-height: 68vh; }
  .modal-card.video-mode .modal-video { max-width: calc(82vw - 16px); max-height: calc(82vh - 80px); }
  .modal-head { padding: 20px 20px 0; }
  .modal-body { padding: 16px 20px 22px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  .debug-badge { top: 108px; right: 14px; left: 14px; text-align: center; }

  .landing-wrap { padding: 26px 20px 42px; }
  .hero { padding: 40px 0 34px; }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .hero .lede { font-size: 13.5px; }
  .hero-stats { gap: 24px; }
  .feature-row { grid-template-columns: 1fr; }
  .qr-card { max-width: 100%; }
}

@media (max-width: 420px) {
  .tool-label { font-size: 9px; }
  .scene-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ 编辑模式 ============ */
.hotspot.editing { cursor: grab; }
.hotspot.editing .hs-pin::after { animation: none; }
.hotspot.editing .hs-label { border-style: dashed; }
.hotspot.selected .hs-pin {
  border-color: #ffcf4d;
  color: #2a1d00;
  background: radial-gradient(circle at 35% 30%, rgba(255, 207, 77, 0.55), rgba(64, 44, 8, 0.92) 70%);
  box-shadow: 0 0 0 8px rgba(255, 207, 77, 0.22), 0 10px 26px rgba(3, 12, 28, 0.65);
}
.hotspot.selected .hs-label {
  color: #241a00;
  background: #ffd45e;
  border-color: #ffe9a8;
  box-shadow: 0 8px 22px rgba(2, 10, 24, 0.45);
}

.editor-panel {
  position: fixed;
  top: 84px;
  right: 20px;
  z-index: 35;
  width: 300px;
  max-height: calc(100vh - 170px);
  display: none;
  flex-direction: column;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(9, 30, 58, 0.97), rgba(5, 16, 33, 0.98));
  border: 1px solid rgba(255, 207, 77, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  color: var(--ink);
}
.editor-panel.open { display: flex; }
.editor-panel header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--stroke); }
.editor-panel header strong { font-size: 13px; letter-spacing: 0.08em; color: #ffd45e; }
.editor-panel header button { font-size: 11.5px; padding: 5px 11px; border-radius: 999px; color: var(--muted); background: rgba(12, 36, 66, 0.8); border: 1px solid var(--stroke); }
.editor-body { padding: 14px 16px; overflow-y: auto; }
.editor-empty { font-size: 12px; line-height: 1.8; color: var(--muted); }
.editor-fields label { display: block; margin-bottom: 12px; font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted); }
.editor-fields [hidden] { display: none !important; }
.editor-fields input[type="text"],
.editor-fields input[type="number"],
.editor-fields select,
.editor-fields textarea,
.editor-fields input[type="file"] {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink);
  background: rgba(6, 22, 44, 0.9);
  border: 1px solid var(--stroke);
  outline: none;
}
.editor-fields input[type="file"] { padding: 6px; font-size: 11.5px; }
.editor-fields textarea { resize: vertical; line-height: 1.6; font-family: inherit; }
.editor-row { display: flex; gap: 10px; }
.editor-row label { flex: 1; min-width: 0; }
.editor-sub { font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; }
.editor-tip { margin-top: 6px; font-size: 11px; color: var(--faint); word-break: break-all; }
.editor-actions { display: flex; gap: 10px; margin-top: 2px; }
.editor-actions button {
  flex: 1;
  padding: 9px 8px;
  border-radius: 10px;
  font-size: 12px;
  color: #eafdf9;
  background: rgba(23, 198, 176, 0.16);
  border: 1px solid rgba(43, 227, 198, 0.45);
}
.editor-actions button:hover { background: rgba(23, 198, 176, 0.3); }
.editor-panel footer { padding: 10px 16px 13px; font-size: 11px; color: var(--faint); letter-spacing: 0.04em; border-top: 1px solid var(--stroke); }

/* 编辑模式右键菜单 */
.edit-menu {
  position: fixed;
  z-index: 60;
  min-width: 150px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(8, 26, 50, 0.97);
  border: 1px solid rgba(255, 207, 77, 0.4);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
}
.edit-menu button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  text-align: left;
  font-size: 12.5px;
  color: var(--ink);
  background: transparent;
  border: 0;
}
.edit-menu button:hover { background: rgba(23, 198, 176, 0.18); }
.edit-menu button[disabled] { color: var(--faint); cursor: not-allowed; }
.edit-menu button[disabled]:hover { background: transparent; }

.hotspot-link .hs-pin { border-color: rgba(190, 150, 255, 0.85); }
.modal-link-btn { display: block; margin-top: 14px; }

/* ============ 编辑模式登录 ============ */
.edit-login {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 10, 22, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.edit-login.open { opacity: 1; pointer-events: auto; }
.edit-login-card {
  width: min(360px, 88vw);
  padding: 26px 26px 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 32, 62, 0.98), rgba(6, 20, 40, 0.99));
  border: 1px solid var(--stroke-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.edit-login-card h2 { font-size: 18px; letter-spacing: 0.04em; }
.edit-login-sub { margin: 8px 0 18px; font-size: 12px; color: var(--muted); }
.edit-field { display: block; margin-bottom: 12px; font-size: 11.5px; color: var(--muted); }
.edit-field input {
  width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink);
  background: rgba(6, 22, 44, 0.9);
  border: 1px solid var(--stroke);
  outline: none;
}
.edit-field input:focus { border-color: rgba(43, 227, 198, 0.6); }
.edit-login-error { min-height: 18px; font-size: 11.5px; color: #ff9c8a; }
.edit-login-actions { display: flex; gap: 10px; margin-top: 10px; }
.edit-btn { flex: 1; padding: 10px; border-radius: 10px; font-size: 13px; }
.edit-btn.ghost { color: var(--muted); background: rgba(12, 36, 66, 0.8); border: 1px solid var(--stroke); }
.edit-btn.primary { color: #04140f; background: linear-gradient(135deg, #2be3c6, #17c6b0); font-weight: 600; }

@media (max-width: 820px) {
  .editor-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 84px;
    width: auto;
    max-height: 52vh;
  }
}
