/* 管网开挖与多段线测量弹窗(外观同空间智检 #analysisCtl) */
#digCtl, #measureCtl { position: absolute; top: 72px; left: calc(var(--sb) + 14px); z-index: 22; width: min(430px, calc(100vw - 24px));
  background: rgba(255,255,255,.98); border: 1px solid rgba(15,118,110,.14); border-radius: 10px;
  box-shadow: 0 12px 34px rgba(15,23,42,.22); padding: 0 14px 10px; will-change: left, top; }
#measureCtl { width: min(390px, calc(100vw - 24px)); border-color: rgba(37,99,235,.18); }
#digCtl.hidden, #measureCtl.hidden { display: none; }
#digCtl.dragging, #measureCtl.dragging { user-select: none; box-shadow: 0 18px 48px rgba(15,23,42,.34); }
#digCtl .tool-pop-head, #measureCtl .tool-pop-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -14px 10px;
  padding: 11px 14px 10px; border-radius: 10px 10px 0 0; cursor: grab; touch-action: none;
  background: linear-gradient(90deg, rgba(240,253,250,.98), rgba(248,250,252,.98));
  border-bottom: 1px solid rgba(15,118,110,.1); }
#measureCtl .tool-pop-head { background: linear-gradient(90deg, rgba(239,246,255,.98), rgba(248,250,252,.98));
  border-bottom-color: rgba(37,99,235,.12); }
#digCtl.dragging .tool-pop-head, #measureCtl.dragging .tool-pop-head { cursor: grabbing; }
#digCtl .tool-pop-head em, #measureCtl .tool-pop-head em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 400; color: #94a3b8; }
#digCtl .ana-close, #measureCtl .ana-close { width: 24px; height: 24px; margin-left: 8px; border: none; border-radius: 6px;
  background: transparent; color: #64748b; font-size: 20px; line-height: 22px; cursor: pointer; }
#digCtl .ana-close:hover, #measureCtl .ana-close:hover { background: rgba(15,118,110,.1); color: #0f172a; }
#digCtl .dw-btns { margin: 8px 0; }
#digCtl .dw-b, #measureCtl .dw-b { padding: 8px 0; }
#digCtl .ana-primary { flex: none; width: 100%; border: none; background: #0f766e; color: #fff; font-weight: 700; }
#digCtl .ana-primary:hover:not(:disabled) { background: #0d665f; }
#digCtl .ana-primary.active { background: #b45309; }   /* 取点中:琥珀色提示 */
.dig-body { max-height: calc(100vh - 126px); overflow-y: auto; padding-right: 2px; scrollbar-gutter: stable; }
.measure-body { max-height: calc(100vh - 126px); overflow-y: auto; padding-right: 2px; scrollbar-gutter: stable; }
#measureCtl .dig-measure { margin: 9px 0 0; }
.dig-section { margin: 9px 0; padding: 9px; border: 1px solid #dbe7df; border-radius: 8px;
  background: linear-gradient(180deg, #f8fbf9, #f3f7f5); }
.dig-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.dig-section-head b { color: #33473f; font-size: 12px; }
.dig-section-head > span { color: #64748b; font-size: 10px; }
.dig-depth-control { display: grid; grid-template-columns: 62px minmax(105px, 1fr) 76px; align-items: center; gap: 8px; }
.dig-depth-control > label:first-child { color: #475569; font-size: 11px; }
.dig-depth-control input[type="range"] { width: 100%; accent-color: #0f766e; cursor: pointer; }
.dig-number { height: 28px; display: flex; align-items: center; overflow: hidden; border: 1px solid #cbd5e1;
  border-radius: 6px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.dig-number:focus-within { border-color: #0f766e; box-shadow: 0 0 0 2px rgba(15,118,110,.12); }
.dig-number input { width: 51px; min-width: 0; border: 0; outline: 0; padding: 4px 3px 4px 7px;
  color: #0f172a; background: transparent; font: 600 11px/1.2 "Microsoft YaHei", sans-serif; text-align: right; }
.dig-number span { padding-right: 7px; color: #64748b; font-size: 10px; }
.dig-geology { padding-bottom: 8px; }
.dig-geology-head > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dig-geology-head b, .dig-geology-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dig-geology-head small { color: #0f766e; font-size: 10px; font-weight: 600; }
.dig-text-btn { flex: none; border: 0; border-radius: 5px; padding: 4px 6px; background: transparent;
  color: #0f766e; font-size: 10px; cursor: pointer; transition: background .18s; }
.dig-text-btn:hover { background: rgba(15,118,110,.09); }
.dig-layer-columns { display: grid; grid-template-columns: minmax(130px, 1fr) 104px; gap: 8px;
  margin: 0 31px 4px 20px; color: #849087; font-size: 9px; }
.dig-layer-columns span:last-child { text-align: right; }
.dig-layer-editor { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; padding-right: 2px; }
.dig-layer-edit { display: grid; grid-template-columns: 12px minmax(130px, 1fr) 104px 24px; align-items: center;
  gap: 6px; min-height: 44px; padding: 5px 6px; border: 1px solid #e2e8e5; border-radius: 7px;
  background: rgba(255,255,255,.88); transition: border-color .18s, background .18s; }
.dig-layer-edit.active { border-color: rgba(15,118,110,.42); background: #ecf8f4; }
.dig-material-swatch { align-self: stretch; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(15,23,42,.13); }
.dig-layer-material { min-width: 0; display: grid; gap: 2px; }
.dig-layer-material select { width: 100%; min-width: 0; height: 26px; padding: 2px 22px 2px 6px;
  border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; color: #1e293b; font-size: 11px; cursor: pointer; }
.dig-layer-material small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7a8981; font-size: 9px; }
.dig-boundary { height: 27px; display: grid; grid-template-columns: auto minmax(40px, 1fr) auto; align-items: center;
  gap: 3px; border: 1px solid #cbd5e1; border-radius: 5px; padding: 0 5px; background: #fff; color: #64748b; font-size: 9px; }
.dig-boundary input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 2px 0; background: transparent;
  color: #0f172a; font: 600 11px/1.2 "Microsoft YaHei", sans-serif; text-align: right; }
.dig-layer-infinite { display: flex; justify-content: flex-end; align-items: center; color: #64748b; font-size: 10px; }
.dig-remove-layer { width: 24px; height: 26px; border: 0; border-radius: 5px; background: transparent;
  color: #94a3b8; font-size: 16px; line-height: 1; cursor: pointer; transition: color .18s, background .18s; }
.dig-remove-layer:hover:not(:disabled) { color: #b91c1c; background: #fef2f2; }
.dig-remove-layer:disabled { cursor: not-allowed; opacity: .3; }
.dig-add-layer { width: 100%; margin-top: 6px; padding: 6px; border: 1px dashed #9bbeb2; border-radius: 6px;
  background: rgba(255,255,255,.65); color: #0f766e; font-size: 10px; font-weight: 600; cursor: pointer;
  transition: border-color .18s, background .18s; }
.dig-add-layer:hover { border-color: #0f766e; background: #ecf8f4; }
.dig-field-error { margin-top: 6px; padding: 5px 6px; border-radius: 5px; background: #fef2f2; color: #b91c1c; font-size: 10px; }
.dig-field-error.hidden { display: none; }
.dig-quantity .dig-section-head strong { color: #0f766e; font-size: 15px; }
.dig-quantity-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 7px; }
.dig-quantity-kpis span { display: flex; justify-content: space-between; align-items: center; padding: 6px 7px;
  border: 1px solid #e2e8f0; border-radius: 6px; background: rgba(255,255,255,.8); color: #64748b; font-size: 9px; }
.dig-quantity-kpis b { color: #334155; font-size: 11px; }
.dig-quantity-list { display: grid; gap: 6px; }
.dig-quantity-empty { padding: 12px 6px; border: 1px dashed #cbd5e1; border-radius: 6px;
  color: #849087; font-size: 10px; text-align: center; }
.dig-quantity-row { display: grid; grid-template-columns: minmax(100px, 1fr) 76px 45px; align-items: center; gap: 7px; }
.dig-quantity-name { min-width: 0; display: flex; align-items: center; gap: 5px; color: #334155; font-size: 10px; }
.dig-quantity-name i { flex: none; width: 8px; height: 18px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(15,23,42,.12); }
.dig-quantity-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dig-quantity-value { color: #0f172a; font-size: 10px; font-weight: 700; text-align: right; }
.dig-quantity-ratio { color: #64748b; font-size: 9px; text-align: right; }
.dig-quantity-bar { grid-column: 1 / -1; height: 3px; overflow: hidden; margin-top: -4px; border-radius: 3px; background: #e6ece9; }
.dig-quantity-bar i { display: block; height: 100%; border-radius: inherit; }
.dig-method-note { display: block; margin-top: 7px; color: #849087; font-size: 9px; line-height: 1.45; }
.measure-mode { min-width: 0; margin: 9px 0 0; padding: 0; border: 0; }
.measure-mode legend { margin-bottom: 5px; color: #475569; font-size: 11px; font-weight: 700; }
.measure-mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.measure-mode-options label { position: relative; min-width: 0; cursor: pointer; }
.measure-mode-options input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.measure-mode-options span { min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 5px 10px; border: 1px solid #cbd5e1; border-radius: 7px; background: rgba(255,255,255,.9);
  color: #475569; transition: border-color .18s, background .18s, box-shadow .18s; }
.measure-mode-options b { font-size: 12px; }
.measure-mode-options small { color: #64748b; font-size: 10px; }
.measure-mode-options label:hover span { border-color: #93b4dd; background: #f8fbff; }
.measure-mode-options input:checked + span { border-color: #2563eb; background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb; color: #1d4ed8; }
.measure-mode-options input:checked + span b::after { content: " · 已选"; font-size: 9px; font-weight: 600; }
.measure-mode-options input:focus-visible + span { outline: 2px solid rgba(37,99,235,.65); outline-offset: 2px; }
.dig-measure { border-color: #cfddea; background: linear-gradient(180deg, #f8fbff, #f3f7fb); }
.dig-measure-head > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dig-measure-head small { color: #64748b; font-size: 9px; font-weight: 500; }
.dig-measure-head strong { flex: none; color: #1d4ed8; font-size: 15px; font-variant-numeric: tabular-nums; }
.dig-measure-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; }
#digCtl .dig-measure-actions .dw-b, #measureCtl .dig-measure-actions .dw-b { min-width: 0; margin: 0; padding: 7px 5px; }
#digCtl .dig-measure-primary, #measureCtl .dig-measure-primary { border-color: #2563eb; background: #2563eb; color: #fff; font-weight: 700; }
#digCtl .dig-measure-primary:hover:not(:disabled), #measureCtl .dig-measure-primary:hover:not(:disabled) { border-color: #1d4ed8; background: #1d4ed8; }
#digCtl .dig-measure-primary.active, #measureCtl .dig-measure-primary.active { border-color: #b45309; background: #b45309; }
.dig-measure-finish { display: flex; align-items: center; justify-content: center; gap: 6px; }
.dig-measure-finish kbd { min-width: 35px; padding: 2px 5px; border: 1px solid #b9c6d5; border-bottom-width: 2px;
  border-radius: 4px; background: #fff; color: #475569; font: 600 9px/1.2 "Microsoft YaHei", sans-serif; }
.dig-measure-finish:disabled kbd { background: rgba(255,255,255,.65); }
.dig-measure-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.dig-measure-tools button { min-width: 0; min-height: 30px; padding: 4px 5px; border: 1px solid #cbd5e1;
  border-radius: 6px; background: rgba(255,255,255,.9); color: #475569; font-size: 10px; cursor: pointer;
  transition: border-color .18s, background .18s, color .18s; }
.dig-measure-tools button:hover:not(:disabled) { border-color: #93b4dd; background: #eff6ff; color: #1d4ed8; }
.dig-measure-tools button:disabled, .dig-measure-actions button:disabled { cursor: not-allowed; opacity: .48; }
.dig-measure-current { margin-top: 7px; padding: 6px 7px; border-radius: 6px; background: rgba(219,234,254,.58);
  color: #334155; font-size: 10px; font-variant-numeric: tabular-nums; }
.dig-measure-list { display: grid; gap: 5px; max-height: 132px; overflow-y: auto; margin-top: 6px; padding-right: 2px; }
.dig-measure-empty { padding: 9px 6px; border: 1px dashed #cbd5e1; border-radius: 6px;
  color: #849087; font-size: 10px; text-align: center; }
.dig-measure-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto 25px; align-items: center; gap: 7px;
  min-height: 32px; padding: 4px 5px 4px 7px; border: 1px solid #dbe4ee; border-radius: 6px;
  background: rgba(255,255,255,.9); }
.dig-measure-row > i { width: 8px; height: 20px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(15,23,42,.15); }
.dig-measure-row > span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dig-measure-row b { overflow: hidden; color: #334155; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.dig-measure-row small { color: #849087; font-size: 9px; }
.dig-measure-row > strong { color: #0f172a; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dig-measure-delete { width: 25px; height: 25px; border: 0; border-radius: 5px; background: transparent;
  color: #94a3b8; font-size: 16px; line-height: 1; cursor: pointer; transition: color .18s, background .18s; }
.dig-measure-delete:hover { color: #b91c1c; background: #fef2f2; }
.dig-measure-status { min-height: 27px; margin-top: 6px; padding: 6px 7px; border-left: 3px solid #93c5fd;
  border-radius: 0 5px 5px 0; background: #eff6ff; color: #475569; font-size: 9px; line-height: 1.5; }
.dig-version { margin-top: 5px; color: #0f766e; font-weight: 600; }
#digCtl select:focus-visible, #digCtl button:focus-visible, #digCtl input:focus-visible { outline: 2px solid rgba(15,118,110,.6); outline-offset: 1px; }
#measureCtl button:focus-visible { outline: 2px solid rgba(37,99,235,.65); outline-offset: 1px; }
@media (max-width: 520px) {
  #digCtl, #measureCtl { left: 12px; width: calc(100vw - 24px); }
  .dig-layer-edit { grid-template-columns: 10px minmax(110px, 1fr) 96px 22px; }
  .dig-measure-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dig-measure-tools button { min-height: 44px; }
  .dig-measure-tools button:last-child { grid-column: 1 / -1; }
  #digCtl .dig-measure-actions .dw-b, #measureCtl .dig-measure-actions .dw-b { min-height: 44px; }
  .dig-measure-row { grid-template-columns: 9px minmax(0, 1fr) auto 44px; }
  .dig-measure-delete { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  #digCtl *, #digCtl *::before, #digCtl *::after,
  #measureCtl *, #measureCtl *::before, #measureCtl *::after { transition: none !important; }
}

/* ============================================================
   周边公共配套查询(按钮 + 底部抽屉 + 扫描动画)
   ============================================================ */
