.graph-page {
  min-height: calc(100vh - 120px);
}
.graph-page .graph-header {
  margin-bottom: 1rem;
}
.graph-page .graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.graph-page .graph-toolbar input,
.graph-page .graph-toolbar button {
  min-height: 2.25rem;
  padding: 0.4rem 0.75rem;
  color: var(--second-text-color);
  font: inherit;
  border: 1px solid var(--border-line-color);
  border-radius: 6px;
  background: var(--third-bg-color);
}
.graph-page .graph-toolbar input {
  flex: 1 1 16rem;
  min-width: 12rem;
  outline: none;
}
.graph-page .graph-toolbar button {
  cursor: pointer;
}
.graph-page .graph-toolbar button:hover, .graph-page .graph-toolbar button.is-active {
  color: #3273dc;
  border-color: #3273dc;
}
.graph-page .graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: var(--second-text-color);
  font-size: 0.85rem;
}
.graph-page .graph-legend-item::before {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.35rem;
  content: "";
  border-radius: 50%;
  background: var(--graph-post-color);
}
.graph-page .graph-legend-item[data-type=tag]::before {
  background: var(--graph-tag-color);
}
.graph-page .graph-legend-item[data-type=external]::before {
  background: var(--graph-external-color);
}
.graph-page .graph-canvas {
  position: relative;
  height: min(70vh, 720px);
  min-height: 420px;
  overflow: hidden;
  cursor: grab;
  border: 1px solid var(--border-line-color);
  border-radius: 6px;
  background: var(--second-bg-color);
  touch-action: none;
}
.graph-page .graph-canvas:active {
  cursor: grabbing;
}
.graph-page .graph-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
}
.graph-page .graph-canvas .graph-edge {
  stroke: var(--border-line-color);
  stroke-width: 1.2;
}
.graph-page .graph-canvas .graph-node {
  cursor: pointer;
}
.graph-page .graph-canvas .graph-node circle {
  stroke: var(--second-bg-color);
  stroke-width: 2;
}
.graph-page .graph-canvas .graph-node text {
  fill: var(--second-text-color);
  font-size: 12px;
  pointer-events: none;
}
.graph-page .graph-canvas .graph-node:hover circle {
  stroke: #3273dc;
}
.graph-page .graph-canvas .graph-node[data-type=post] circle {
  fill: var(--graph-post-color);
}
.graph-page .graph-canvas .graph-node[data-type=tag] circle {
  fill: var(--graph-tag-color);
}
.graph-page .graph-canvas .graph-node[data-type=external] circle {
  fill: var(--graph-external-color);
}