/* ---------- 全景浏览（720云式） ---------- */
.pano-viewer {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: #0b1018;
}
.pano-viewer.open { display: block; }
.pano-canvas { position: absolute; inset: 0; }
.pano-canvas canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.pano-canvas canvas:active { cursor: grabbing; }
.pano-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
  pointer-events: none;
}
.pano-title { font-size: 15px; color: #fff; font-weight: 600; pointer-events: auto; }
.pano-badge {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: #c98a14; color: #fff; margin-right: 6px; vertical-align: 1px;
}
.pano-close {
  font-family: inherit; font-size: 13px; padding: 8px 14px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.45);
  color: #fff; cursor: pointer; pointer-events: auto;
}
.pano-close:hover { background: rgba(0,0,0,.7); }
.pano-hint {
  position: absolute; top: 56px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-size: 12px; color: rgba(255,255,255,.85); background: rgba(0,0,0,.35);
  padding: 5px 14px; border-radius: 14px; pointer-events: none; white-space: nowrap;
}
/* 左侧全景目录：按小区/建筑/楼层列出全部带全景的楼层 + 本层照片缩略图 */
.pano-side {
  position: absolute; top: 0; left: 0; bottom: 0; z-index: 3; width: 258px;
  display: flex; flex-direction: column;
  background: rgba(9,16,26,.94); border-right: 1px solid rgba(255,255,255,.12);
  box-shadow: 2px 0 22px rgba(0,0,0,.5); color: #cbd8e6;
  transition: transform .26s ease, opacity .2s ease;
}
.pano-viewer.side-closed .pano-side { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.pano-side-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 10px; font-size: 13px; font-weight: 600; color: #f0b429;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.pano-side-collapse {
  font-family: inherit; font-size: 16px; line-height: 1; width: 24px; height: 24px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 5px;
  background: rgba(255,255,255,.06); color: #cbd8e6; cursor: pointer;
}
.pano-side-collapse:hover { background: rgba(255,255,255,.16); color: #fff; }
.pano-side-tree { flex: 0 1 auto; max-height: 46%; overflow-y: auto; padding: 6px 6px 8px; }
.pano-side-shots {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 8px 8px 12px; border-top: 1px solid rgba(255,255,255,.1);
}
.pano-side-subtitle { font-size: 10px; color: #6f88a3; letter-spacing: .5px; margin: 2px 2px 8px; }
.pano-side-empty { font-size: 12px; color: #6f88a3; text-align: center; padding: 16px 8px; }
.pano-side-row {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 6px 8px; font-family: inherit; font-size: 12px; text-align: left;
  border: 0; border-radius: 5px; background: transparent; color: #a9bccf; cursor: pointer;
}
button.pano-side-row:hover { background: rgba(255,255,255,.08); color: #fff; }
.pano-side-row .ps-ico { font-size: 13px; flex-shrink: 0; }
.pano-side-row .ps-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pano-side-row .ps-cnt { font-size: 10px; color: #5a718c; flex-shrink: 0; }
.pano-side-row.lvl-district { color: #f0b429; font-weight: 700; cursor: default; }
.pano-side-row.lvl-campus { color: #dce6f0; font-weight: 600; padding-left: 12px; cursor: default; }
.pano-side-row.lvl-building { color: #b8c9da; padding-left: 22px; cursor: default; }
.pano-side-row.lvl-floor { padding-left: 32px; }
.pano-side-row.lvl-floor.active { background: #c98a14; color: #fff; }
.pano-side-row.lvl-floor.active .ps-cnt { color: #fff; }
.pano-shot {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 6px;
  padding: 4px; border: 2px solid transparent; border-radius: 7px;
  background: rgba(255,255,255,.05); color: #b8c9da; cursor: pointer; font-family: inherit; font-size: 11px;
}
.pano-shot:hover { background: rgba(255,255,255,.12); color: #fff; }
.pano-shot.active { border-color: #c98a14; background: rgba(201,138,20,.25); color: #fff; }
.pano-shot img { width: 60px; height: 38px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.pano-shot span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pano-side-open {
  position: absolute; top: 62px; left: 0; z-index: 4;
  font-family: inherit; font-size: 12px; padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.2); border-left: 0;
  border-radius: 0 6px 6px 0; background: rgba(9,16,26,.94); color: #cbd8e6;
  cursor: pointer; display: none;
}
.pano-viewer.side-closed .pano-side-open { display: block; }
.pano-side-open:hover { background: #c98a14; color: #fff; }
/* 目录展开时，标题/箭头/计数/提示右移，避免压在侧栏上 */
.pano-viewer:not(.side-closed) .pano-counter { left: calc(50% + 129px); }
.pano-viewer:not(.side-closed) .pano-title { margin-left: 258px; }
.pano-viewer:not(.side-closed) .pano-prev { left: 274px; }
.pano-viewer:not(.side-closed) .pano-hint { left: calc(50% + 129px); }

/* 前后漫游箭头：沿路线往前走/往后退 */
.pano-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 70px; border: 1px solid rgba(255,255,255,.35);
  border-radius: 24px; background: rgba(0,0,0,.42); color: #fff;
  font-family: inherit; font-size: 40px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s, opacity .15s;
}
.pano-nav:hover { background: rgba(201,138,20,.85); }
.pano-nav:active { transform: translateY(-50%) scale(.94); }
.pano-prev { left: 18px; }
.pano-next { right: 18px; }
.pano-nav.disabled { opacity: .25; pointer-events: none; }
.pano-counter {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 2;
  font-size: 13px; color: #fff; background: rgba(0,0,0,.5);
  padding: 6px 16px; border-radius: 16px; pointer-events: none; white-space: nowrap;
  opacity: 0; transition: opacity .4s;
}
.pano-counter.show { opacity: 1; }
/* 换站淡入过渡 */
.pano-canvas.pano-fade { animation: panoFadeIn .5s ease-out; }
@keyframes panoFadeIn { from { opacity: .25; } to { opacity: 1; } }
.pano-stations {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; gap: 10px; justify-content: center; align-items: flex-end;
  padding: 18px 12px 16px; overflow-x: auto;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
}
.pano-station-btn {
  flex: 0 0 auto; width: 116px; padding: 4px; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; background: rgba(0,0,0,.4); color: #dce6f0;
  font-family: inherit; font-size: 11px;
}
.pano-station-btn img { width: 100%; height: 58px; object-fit: cover; border-radius: 5px; display: block; }
.pano-station-btn span { display: block; padding: 5px 2px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pano-station-btn.active { border-color: #c98a14; background: rgba(201,138,20,.25); color: #fff; }
/* 站点/目录里的视频角标 */
.pano-vid-flag {
  position: absolute; top: 8px; left: 8px; z-index: 2; font-style: normal;
  font-size: 10px; color: #fff; background: rgba(201,138,20,.9);
  padding: 2px 6px; border-radius: 4px; pointer-events: none;
}
.pano-station-btn, .pano-shot { position: relative; }
/* 全景视频播放控制条：仅在视频站点显示，位于底部站点条上方 */
.pano-video-ctrl {
  position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%); z-index: 5;
  display: none; align-items: center; gap: 10px; white-space: nowrap;
  background: rgba(0,0,0,.62); border-radius: 22px; padding: 6px 14px 6px 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.pano-video-ctrl.show { display: flex; }
.pano-play {
  flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: #c98a14; color: #fff; font-size: 12px; line-height: 30px;
  cursor: pointer; padding: 0;
}
.pano-play:hover { background: #e0a323; }
.pano-seek {
  width: 220px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.25);
  cursor: pointer; overflow: hidden;
}
.pano-seek-fill { height: 100%; width: 0; background: #f0b429; }
.pano-time { font-size: 12px; color: #dce6f0; min-width: 86px; text-align: right; font-variant-numeric: tabular-nums; }
.pano-loading {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 4;
  font-size: 14px; color: #fff; background: rgba(0,0,0,.55); padding: 10px 18px;
  border-radius: 8px; display: none;
}

/* ---------- 窄屏适配 ---------- */
@media (max-width: 900px) {
  .topbar .proj { display: none; }
  .breadcrumb { font-size: 11px; }
  .rightpanel { width: 210px; top: 62px; right: 8px; }
  .leftpanel { width: 210px; top: 62px; bottom: 8px; left: 8px; }
  .status { left: 226px; }
  .tree { max-height: none; }
  .hintbar { display: none; }
  /* 全景箭头在窄屏缩小、贴近边缘 */
  .pano-nav { width: 38px; height: 58px; font-size: 32px; }
  .pano-prev { left: 8px; }
  .pano-next { right: 8px; }
  .pano-hint { font-size: 10px; padding: 4px 10px; top: 52px; }
  .pano-station-btn { width: 92px; }
  .pano-station-btn img { height: 46px; }
  /* 全景目录在窄屏收窄，展开时仍可看清楼层与缩略图 */
  .pano-side { width: 212px; }
  .pano-viewer:not(.side-closed) .pano-counter { left: calc(50% + 106px); }
  .pano-viewer:not(.side-closed) .pano-title { margin-left: 212px; font-size: 12px; }
  .pano-viewer:not(.side-closed) .pano-prev { left: 220px; }
  .pano-viewer:not(.side-closed) .pano-hint { left: calc(50% + 106px); }
  .pano-side-open { top: 54px; }
  /* 视频控制条窄屏收窄 */
  .pano-video-ctrl { bottom: 108px; padding: 5px 10px 5px 6px; gap: 7px; }
  .pano-seek { width: 130px; }
  .pano-time { font-size: 10px; min-width: 72px; }
  .pano-play { width: 26px; height: 26px; line-height: 26px; }
}
