/* ── Globe window ── */
#globeWin {
  display: none; position: fixed;
  top: 40px; left: 50%; transform: translateX(-50%);
  width: min(680px, 96vw);
  background: #c0c0c0;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #808080; border-bottom: 2px solid #808080;
  box-shadow: 2px 2px 4px rgba(0,0,0,.5);
  z-index: 700;
}
#globeCanvas { display: block; width: 100%; background: #0a1628; cursor: grab; }
#globeCanvas:active { cursor: grabbing; }

/* Camera mode button active state */
.globe-toolbar .btn95.active {
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #b0b0b0;
}

/* Camera preview popup */
.globe-cam-preview {
  display: none;
  position: absolute;
  background: rgba(10, 22, 40, 0.96);
  border: 1px solid #4a7abf;
  border-radius: 3px;
  padding: 5px 6px;
  pointer-events: none;
  z-index: 20;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  min-width: 162px;
}
.globe-cam-preview.visible { display: block; }
.cam-preview-title {
  color: #d8e7ff;
  font-size: 10px;
  padding: 0 0 4px;
}
.globe-cam-preview img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  background: #0a1628;
  display: block;
  border: 1px solid #2a3a5a;
}
.cam-preview-hint {
  color: #8fb3ff;
  font-size: 9px;
  padding-top: 3px;
  text-align: center;
}

/* ── Topology window ── */
#topoWin {
  display: none; position: fixed;
  top: 40px; left: 50%; transform: translateX(-50%);
  width: min(1060px, 96vw);
  background: #c0c0c0;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #808080; border-bottom: 2px solid #808080;
  box-shadow: 2px 2px 4px rgba(0,0,0,.5);
  z-index: 700;
  overflow: hidden;
}
#topoCanvas { display: block; width: 100%; background: #faf7ef; cursor: default; }

.globe-statusbar {
  border-top: 1px solid #808080; padding: 3px 8px;
  font-size: 10px; color: #000;
  display: flex; align-items: center; gap: 8px;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
}
.globe-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 5px 8px 4px;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
}
.globe-toolbar .btn95 { padding: 2px 10px; font-size: 10px; }
.globe-toolbar .toolbar-label { font-size: 10px; color: #000; white-space: nowrap; }
.globe-toolbar .toolbar-input,
.globe-toolbar .toolbar-select {
  height: 20px;
  font-family: inherit;
  font-size: 10px;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  background: #fff;
  padding: 1px 4px;
}
.globe-toolbar .toolbar-input  { width: 88px; }
.globe-toolbar .toolbar-select { width: 120px; }
.globe-panel {
  border-top: 1px solid #808080; border-left: 1px solid #808080;
  border-right: 1px solid #fff; border-bottom: 1px solid #fff;
  padding: 1px 8px; flex: 1;
}

/* ── Scan country confirm dialog ── */
#dlgScanCountry {
  display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: #c0c0c0; z-index: 900;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #808080; border-bottom: 2px solid #808080;
  box-shadow: 1px 1px 0 #000; min-width: 280px;
  font-family: 'MS Sans Serif', Tahoma, sans-serif; font-size: 11px;
}

/* ── Trace route import dialog ── */
#dlgTraceOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 950;
}
#dlgTraceOverlay.open { display: block; }
#dlgTrace {
  position: fixed;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(640px, 96vw);
  background: #c0c0c0;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-right: 2px solid #808080; border-bottom: 2px solid #808080;
  box-shadow: 1px 1px 0 #000;
  z-index: 951;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 11px;
}
#traceInput {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  background: #fff;
  padding: 8px;
}
