/* ==========================================================================
   土杂城 · VR 虚拟展馆（样板间 v1）
   设计令牌沿用主站 tailwind.config.ts，保证与主站观感一致
   ========================================================================== */
:root {
  --brand-900: #062A22; --brand-800: #08372C; --brand-700: #0B4A3C;
  --brand-600: #0E5C4A; --brand-500: #357C60; --brand-400: #5C9B80;
  --brand-300: #8DBCA6; --brand-200: #B9D7C8; --brand-100: #DCEBE3; --brand-50: #F1F7F4;
  --price-700: #A82118; --price-600: #C92B20; --price-500: #E23A2E;
  --price-400: #EC5B4F; --price-100: #FBE0DD; --price-50: #FDF2F1;
  --gold-600: #A97B2C; --gold-500: #C8963E; --gold-400: #D9AC5C;
  --ink-900: #141A1F; --ink-700: #33404B; --ink-500: #5A6672;
  --ink-400: #7B8794; --ink-300: #A3ADB8;
  --line: #E4E8E4; --line-soft: #EFF2EF; --line-strong: #D3D9D3;
  --canvas: #FFFFFF; --canvas-soft: #F7F8F6; --canvas-mute: #EEF1EE;
  --shadow-card: 0 1px 2px rgba(20,26,31,.04), 0 4px 16px -6px rgba(20,26,31,.08);
  --shadow-hover: 0 2px 6px rgba(20,26,31,.06), 0 16px 32px -12px rgba(20,26,31,.16);
  --shadow-pop: 0 12px 32px -8px rgba(20,26,31,.18);
  --radius: 10px; --radius-lg: 14px;
  --topbar-h: 58px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px; line-height: 24px; color: var(--ink-900);
  background: var(--canvas-soft); -webkit-font-smoothing: antialiased; overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.spacer { flex: 1 1 auto; }
.muted { color: var(--ink-400); }
.small { font-size: 12px; line-height: 18px; }
.tiny { font-size: 11px; line-height: 17px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- 全景舞台 */
#stage { position: fixed; inset: 0; background: #101614; }
#pano { position: absolute; inset: 0; }

.pnlm-controls-container, .pnlm-about-msg, .pnlm-compass,
.pnlm-zoom-controls, .pnlm-title-box, .pnlm-panorama-info { display: none !important; }
.pnlm-container { background: #101614; }
.pnlm-load-box { background: rgba(6,42,34,.8) !important; border-radius: var(--radius); }
.pnlm-load-box p { display: none; }
.pnlm-lbar { border: 0 !important; width: 160px !important; }
.pnlm-lbar-fill { background: var(--gold-400) !important; }

/* 首屏轻提示 */
.qhint {
  position: fixed; left: 50%; top: calc(var(--topbar-h) + 14px); transform: translateX(-50%);
  z-index: 40; display: flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 99px; font-size: 12px; line-height: 18px;
  background: rgba(6,42,34,.82); color: #DCEBE3; backdrop-filter: blur(6px);
  transition: opacity .6s; pointer-events: none;
}
.qhint.ok { opacity: 0; }
.qhint .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--gold-400); }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); z-index: 60;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: rgba(255,255,255,.93); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; flex: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(150deg, var(--brand-500), var(--brand-800));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.brand-sub { font-size: 11px; line-height: 14px; color: var(--ink-400); white-space: nowrap; }

.searchwrap { position: relative; flex: 1 1 auto; max-width: 360px; }
.searchwrap input {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 8px; font-size: 13px;
  border: 1px solid var(--line-strong); background: var(--canvas-soft); color: var(--ink-900);
  outline: none;
}
.searchwrap input:focus { border-color: var(--brand-400); background: #fff; box-shadow: 0 0 0 3px var(--brand-100); }
#directList {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); overflow: hidden; display: none;
}
#directList button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 11px;
  border: 0; background: #fff; text-align: left; border-bottom: 1px solid var(--line-soft);
}
#directList button:last-child { border-bottom: 0; }
#directList button:hover { background: var(--canvas-soft); }
#directList .nm { font-size: 14px; font-weight: 600; }
#directList .mc { font-size: 11px; color: var(--ink-400); }

.tbtn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
  color: var(--ink-700); font-size: 13px; white-space: nowrap; flex: none;
}
.tbtn:hover { border-color: var(--brand-300); color: var(--brand-600); }
.tbtn.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.demo-flag {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
  border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .3px;
  background: var(--price-50); color: var(--price-600); border: 1px dashed var(--price-400);
  white-space: nowrap; flex: none;
}

/* ---------------------------------------------------------------- 面板 */
.panel {
  position: fixed; z-index: 55; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; overflow: hidden;
}
.panel-hd { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); flex: none; }
.panel-hd h2 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-hd .sub { font-size: 12px; color: var(--ink-400); }
.panel-bd { overflow: auto; }
.panel-bd::-webkit-scrollbar { width: 6px; }
.panel-bd::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
.sec-bar { width: 4px; height: 15px; border-radius: 99px; background: var(--brand-600); flex: none; }

#guide { right: 14px; top: calc(var(--topbar-h) + 14px); bottom: 14px; width: 344px; }
#guide .panel-bd { padding: 10px; display: grid; gap: 9px; align-content: start; }
.booth-card {
  display: flex; gap: 10px; padding: 9px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff; text-align: left;
  transition: box-shadow .16s, border-color .16s, transform .16s;
}
.booth-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.booth-card img { width: 74px; height: 74px; border-radius: 7px; object-fit: cover; flex: none; background: var(--canvas-mute); }
.booth-card .info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.booth-card .nm { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booth-card .mc { font-size: 11px; line-height: 16px; color: var(--ink-400); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.booth-card .ft { display: flex; align-items: center; gap: 6px; }
/* 真实商户名（有才显示）：金底，和展区蓝标区分开，一眼看出哪家已填真名 */
.booth-card .mr {
  align-self: flex-start; border-radius: 4px; padding: 1px 6px;
  font-size: 11px; line-height: 17px; font-weight: 700;
  background: var(--gold-400); color: var(--brand-900);
}

.chip-stand {
  display: inline-flex; align-items: center; border-radius: 4px; padding: 2px 6px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px; font-weight: 700; letter-spacing: .6px;
  background: var(--gold-400); color: var(--brand-900); flex: none;
}
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 4px; padding: 2px 6px; font-size: 12px; line-height: 18px; font-weight: 500; }
.chip-district { border: 1px solid var(--brand-200); background: var(--brand-50); color: var(--brand-700); }

/* -------------------------------------------------------- 机位切换 */
#zones {
  position: fixed; left: 14px; bottom: 14px; z-index: 55;
  display: flex; gap: 7px; padding: 8px; border-radius: 99px; max-width: calc(100vw - 28px);
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.zbtn { border: 0; background: transparent; color: var(--ink-500); border-radius: 99px; padding: 7px 13px; font-size: 13px; white-space: nowrap; }
.zbtn:hover { background: var(--canvas-mute); color: var(--brand-600); }
.zbtn.on { background: var(--brand-600); color: #fff; font-weight: 600; }

/* -------------------------------------------------------- 底部货架 */
#shelf {
  position: fixed; left: 14px; right: 14px; bottom: 64px; z-index: 52;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
}
#shelf .hd { display: flex; align-items: center; gap: 8px; padding: 9px 12px 6px; }
#shelf .hd h2 { margin: 0; font-size: 14px; font-weight: 700; }
#shelf .bd { display: flex; gap: 9px; overflow-x: auto; padding: 0 12px 11px; }
#shelf .bd::-webkit-scrollbar { height: 6px; }
#shelf .bd::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
.gcard { flex: none; width: 120px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; text-align: left; padding: 0; display: flex; flex-direction: column; }
.gcard:hover { border-color: var(--brand-300); box-shadow: var(--shadow-hover); }
.gcard img { width: 100%; height: 88px; object-fit: cover; display: block; background: var(--canvas-mute); }
.gcard .t { padding: 5px 7px; font-size: 12px; line-height: 16px; height: 46px; overflow: hidden; }
.gcard .p { padding: 0 7px 7px; margin-top: auto; }

/* ---------------------------------------------------------- 商品抽屉 */
#drawer {
  position: fixed; top: var(--topbar-h); right: 0; bottom: 0; width: 396px; z-index: 70;
  background: #fff; border-left: 1px solid var(--line); box-shadow: var(--shadow-pop);
  transform: translateX(102%); transition: transform .24s ease; display: flex; flex-direction: column;
}
#drawer.open { transform: none; }
#drawer .hd { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); flex: none; }
#drawer .bd { flex: 1; overflow: auto; padding: 14px; }
#drawer .ft { padding: 12px 14px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; flex: none; }
#drawer .hd strong { font-size: 14px; }
.ptitle { margin: 12px 0 3px; font-size: 17px; line-height: 25px; }
.pricebox { margin: 12px 0 10px; }
.pricerow { display: flex; align-items: baseline; gap: 6px; }

.spin-stage { position: relative; border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, #F4F7F5, #E7EDE9); border: 1px solid var(--line); }
.spin-stage img, .spin-stage model-viewer { width: 100%; height: 292px; object-fit: contain; display: block; --poster-color: transparent; }
.spin-badge {
  position: absolute; left: 9px; top: 9px; z-index: 3; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 99px; background: rgba(6,42,34,.8); color: #DCEBE3;
  font-size: 11px; backdrop-filter: blur(4px);
}
.spin-tip {
  position: absolute; inset: auto 0 0 0; z-index: 3; padding: 14px 10px 8px;
  background: linear-gradient(0deg, rgba(6,42,34,.76), transparent);
  color: #fff; font-size: 12px; text-align: center;
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; font-weight: 500; }
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-accent { background: var(--price-600); color: #fff; }
.btn-accent:hover { background: var(--price-700); }
.btn-block { width: 100%; }

/* ------------------------------------------------------------ 登录墙 */
.price { color: var(--price-600); font-weight: 600; font-variant-numeric: tabular-nums; }
.price-lg { font-size: 24px; line-height: 34px; }
.gate {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 8px;
  background: var(--gold-400); color: var(--brand-900); font-size: 13px; font-weight: 600;
}
.gate-soft { background: var(--canvas-soft); color: var(--ink-400); border: 1px dashed var(--line-strong); font-weight: 400; font-size: 12px; }

/* ------------------------------------------------------------ 遮罩 */
.mask { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; background: rgba(6,20,16,.78); backdrop-filter: blur(3px); }
.mask.open { display: grid; }
.modal { width: min(94vw, 880px); max-height: 90vh; background: #fff; border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); }
.modal .hd { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); flex: none; }
.modal .bd { overflow: auto; }
.xbtn { border: 0; background: transparent; color: var(--ink-400); font-size: 22px; line-height: 1; padding: 0 4px; }
.xbtn:hover { color: var(--ink-900); }
.videobox { aspect-ratio: 16/9; background: #101614; display: grid; place-items: center; color: #DCEBE3; gap: 10px; text-align: center; padding: 20px; }
.videobox .muted { color: #8DBCA6; font-size: 12px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--canvas-mute); }

.quote { width: 100%; border-collapse: collapse; font-size: 14px; }
.quote th, .quote td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.quote th { background: var(--canvas-soft); font-size: 12px; color: var(--ink-500); font-weight: 600; }
.quote .r { text-align: right; }
.quote .c { text-align: center; }

.hostcard { padding: 6px 14px 16px; }
.hostcard .row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.hostcard .k { width: 96px; color: var(--ink-400); flex: none; }
.hostcard .v { flex: 1; }

/* ------------------------------------------------- 热点（关键覆写） */
/* pannellum 用 offsetWidth/offsetHeight 把热点居中，所以盒子必须「按内容自适应」 */
.pnlm-hotspot-base.tzc-hs,
.pnlm-hotspot-base.tzc-hs:hover {
  width: max-content !important;
  height: auto !important;
  border-radius: 0 !important;
  background: none !important;
  background-image: none !important;
}
.hs { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; user-select: none; filter: drop-shadow(0 3px 8px rgba(0,0,0,.45)); }
.hs .orb { width: 38px; height: 38px; border-radius: 99px; display: grid; place-items: center; border: 2px solid #fff; transition: transform .16s; }
.hs:hover .orb { transform: scale(1.14); }
.hs .tag {
  max-width: 200px; padding: 3px 11px; border-radius: 99px; font-size: 15px; line-height: 21px;
  background: rgba(255,255,255,.94); color: var(--ink-900); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; font-weight: 600;
}
.hs.t-goods .orb { background: var(--brand-600); }
.hs.t-photo .orb { background: var(--brand-400); }
.hs.t-quote .orb { background: var(--brand-800); }
.hs.t-video .orb { background: var(--price-600); }
.hs.t-host .orb { background: var(--gold-500); }
.hs.t-booth .orb { background: var(--brand-700); }
.hs svg { width: 19px; height: 19px; color: #fff; }
.hs.enter .orb { animation: pulse 1.9s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.75); }
  70% { box-shadow: 0 0 0 13px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ---------------------------------------------------------- 移动端 */
@media (max-width: 900px) {
  :root { --topbar-h: 52px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 14px; }
  .hide-sm { display: none !important; }
  .searchwrap { max-width: none; }
  /* 手机版隐藏展位导览（主人 2026-09-23 指令：导览挡大半屏）；
     逛展位走全景金色热点圆钮 + 顶部搜索直达（展位号/类目名/商户名）。桌面端保留。 */
  #guide { display: none; }
  #drawer { top: 0; width: 100%; }
  #zones { left: 8px; right: 8px; bottom: 8px; overflow-x: auto; border-radius: var(--radius); }
  .zbtn { padding: 6px 10px; font-size: 12px; }
  /* 机位条实测高 54px：底距 8 + 54 = 占到 62px，原来按 50px 估会重叠 4px；
     货架留 10px 间隙 → 72px。探针 V25 守这条。 */
  #shelf { left: 8px; right: 8px; bottom: 72px; }
  #shelf .hd { padding: 7px 10px 4px; }
  .gcard { width: 104px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ------------------------------------------------ 展位分级 / 访客数 / 外围页（第35批） */
.chip-tier { border: 1px solid var(--line-strong); background: var(--canvas-mute); color: var(--ink-500); }
.chip-tier.premier { border-color: #D9AC5C; background: rgba(217,172,92,.16); color: #8a6a2a; }
.booth-card .vs { font-size: 11px; line-height: 16px; color: var(--ink-400); }
.brand-name .chip-tier { margin-left: 6px; }

/* 外围页进场按钮 */
.enter-wrap { position: fixed; left: 0; right: 0; bottom: 12vh; z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.enter-sub { font-size: 13px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
.enter-big { pointer-events: auto; height: 52px; padding: 0 34px; border: 0; border-radius: 99px;
  background: var(--brand-600); color: #fff; font-size: 16px; font-weight: 600;
  box-shadow: 0 10px 26px rgba(14,92,74,.45); cursor: pointer; }
.enter-big:hover { filter: brightness(1.06); }
@media (max-width: 900px) { .enter-big { height: 46px; padding: 0 26px; font-size: 15px; } }
