#dep-graph-container {
  position: relative;
  width: 100%;
  margin: 1.5rem 0 2rem;
  padding: 0.5rem 0.5rem 2.25rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 0.75rem;
}

#dep-graph {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 500;
}

#dep-graph circle {
  cursor: grab;
}

#dep-legend {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--bs-secondary-color, #6c757d);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  pointer-events: none;
}

.dep-legend-row {
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.5s;
}

.dep-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

#dep-label {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--bs-secondary-color, #6c757d);
  white-space: nowrap;
}

#dep-replay {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
}

#dep-tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  background: #222;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: #eee;
  max-width: 280px;
  line-height: 1.5;
  z-index: 10;
}

#dep-tooltip .dep-muted {
  color: #aaa;
}

#dep-tooltip a {
  color: #5b9bd5;
  font-size: 0.85em;
}

@media (max-width: 576px) {
  #dep-label {
    white-space: normal;
    width: 70%;
    left: 0.75rem;
    transform: none;
  }
}
