html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
}

.app {
  display: flex;
  width: 100%;
  height: 100%;
  background: #e8ecf1;
  --left: 66.66%;
}

/* 左侧地图区域(可拖拽调宽) */
#mapPane {
  position: relative;
  flex: 0 0 var(--left);
  height: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-right: 1px solid #c9d0d8;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
}

/* 中间拖拽分隔条 */
#divider {
  flex: 0 0 10px;
  width: 10px;
  cursor: col-resize;
  background: #f2f4f7;
  border-left: 1px solid #c9d0d8;
  border-right: 1px solid #c9d0d8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  touch-action: none;
  user-select: none;
}
#divider::after {
  content: "";
  width: 3px;
  height: 48px;
  border-radius: 2px;
  background: #b7c1cc;
}

/* 右侧查看区域 */
#rightPane {
  position: relative;
  flex: 1 1 auto;
  height: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-left: 1px solid #c9d0d8;
  background: #fff;
}

#map {
  position: absolute;
  inset: 0;
}

/* 左上角切换 tab(右移避开地图 zoom 控件) */
.type-tab {
  position: absolute;
  top: 10px;
  left: 64px;
  z-index: 1000;
  display: flex;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.type-tab button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  color: #555;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.type-tab button.active {
  background: #3d5a80;
  color: #fff;
  font-weight: 600;
}

/* 全景查看器占满右侧 */
#viewer {
  width: 100%;
  height: 100%;
}

/* 普通影像 + 属性表面板 */
#imgPanel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: #fff;
}
#imgPanel[hidden] {
  display: none;
}
#imgHint {
  padding: 24px 16px;
  font-size: 13px;
  color: #888;
  text-align: center;
}
#imgContent {
  padding: 12px;
}
#imgContent[hidden] {
  display: none;
}
#imgPanelTitle {
  font-size: 14px;
  font-weight: 600;
  color: #3d5a80;
  margin-bottom: 8px;
  word-break: break-all;
}
#imgView {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 8px;
  background: #f2f4f7;
  border: 1px solid #e5e9ee;
  margin-bottom: 10px;
  display: block;
}
#attrList {
  margin: 0;
  border: 1px solid #e5e9ee;
  border-radius: 8px;
  overflow: hidden;
}
#attrList .row {
  display: flex;
  font-size: 12px;
  line-height: 1.6;
}
#attrList .row:nth-child(even) {
  background: #fafbfc;
}
#attrList dt {
  flex: 0 0 110px;
  padding: 3px 8px;
  color: #777;
  background: #f4f6f8;
  border-right: 1px solid #e5e9ee;
  text-align: right;
}
#attrList dd {
  flex: 1;
  margin: 0;
  padding: 3px 8px;
  color: #333;
  word-break: break-all;
}

/* 地图点位 marker: 圆形序号 */
.num-marker {
  background: #1a73e8;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

/* 选中的普通影像点位高亮 */
.leaflet-marker-icon.selected .num-marker {
  background: #f6a609;
  border-color: #b96e00;
  width: 28px;
  height: 28px;
  font-size: 12px;
  box-shadow: 0 0 0 3px rgba(246, 166, 9, 0.35);
}

/* 普通影像点位方向箭头(三角形, 指向下一个点位) */
.dir-arrow-marker {
  width: 28px;
  height: 28px;
  cursor: pointer;
}
.dir-arrow-tri {
  position: absolute;
  inset: 0;
  display: block;
  transform: rotate(var(--dir, 0deg));
  transform-origin: center;
}
.dir-arrow-tri svg {
  width: 100%;
  height: 100%;
}
.dir-arrow-tri svg path {
  fill: #1a73e8;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.dir-arrow-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5px;
  font-size: 9px;
  font-weight: bold;
  color: #fff;
  pointer-events: none;
}

/* 选中的普通影像方向箭头高亮 */
.leaflet-marker-icon.selected .dir-arrow-tri {
  transform: rotate(var(--dir, 0deg)) scale(1.3);
}
.leaflet-marker-icon.selected .dir-arrow-tri svg path {
  fill: #f6a609;
  stroke: #b96e00;
}

/* 普通影像前后切换导航 */
.img-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}
.img-nav button {
  flex: 0 0 auto;
  border: 1px solid #d5dbe2;
  background: #fff;
  color: #3d5a80;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
}
.img-nav button:hover {
  background: #eef2f7;
}
#imgCount {
  font-size: 13px;
  color: #666;
}

/* 全景标题 */
.psv-navbar .psv-caption {
  font-size: 15px;
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
    --left: 55%;
  }
  #divider {
    display: none;
  }
  #mapPane {
    height: auto;
  }
  #rightPane {
    height: auto;
  }
}
