:root {
  --ink: #111719;
  --ink-2: #20292c;
  --panel: #f2f4f1;
  --paper: #e7eae5;
  --muted: #697175;
  --line: rgba(17, 23, 25, 0.16);
  --accent: #b5342d;
  --accent-dark: #85221e;
  --water: #314956;
  --white: #f8faf7;
  --topbar-height: 68px;
  --timeline-height: 86px;
  font-family:
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--ink);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-shell {
  height: 100dvh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: var(--topbar-height) 1fr var(--timeline-height);
  background: var(--paper);
}

.topbar {
  z-index: 30;
  display: grid;
  grid-template-columns: 250px auto minmax(250px, 460px) 252px;
  align-items: center;
  gap: 24px;
  padding: 0 18px;
  color: var(--white);
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--accent);
  border-radius: 2px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  letter-spacing: 0;
}

.brand-copy small {
  color: rgba(248, 250, 247, 0.5);
  font-size: 10px;
}

.view-switcher {
  height: 36px;
  display: flex;
  padding: 3px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

.view-button {
  padding: 0 16px;
  border: 0;
  border-radius: 2px;
  color: rgba(248, 250, 247, 0.58);
  background: transparent;
  cursor: pointer;
}

.view-button.active {
  color: var(--ink);
  background: var(--white);
}

.search-wrap {
  position: relative;
}

.search-wrap label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-wrap input {
  width: 100%;
  height: 38px;
  padding: 0 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
}

.search-wrap input::placeholder {
  color: rgba(248, 250, 247, 0.42);
}

.search-results {
  position: absolute;
  inset: calc(100% + 9px) 0 auto;
  z-index: 80;
  padding: 6px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(14, 20, 22, 0.24);
}

.search-results button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.search-results button:hover {
  background: var(--paper);
}

.search-results button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.search-results .result-type {
  align-self: center;
  padding: 3px 5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 8px;
}

.search-results .search-message {
  display: block;
  padding: 11px 10px;
  color: var(--muted);
  font-size: 10px;
}

.search-results small {
  color: var(--muted);
}

.exhibit-tools {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.dataset-count {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: var(--white);
  background: transparent;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 10px;
}

.tool-button {
  height: 32px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  color: rgba(248, 250, 247, 0.58);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  cursor: pointer;
  font-size: 10px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tool-button:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
}

.admin-link {
  text-decoration: none;
  white-space: nowrap;
}

.tool-button[aria-pressed="true"] {
  color: var(--white);
  background: rgba(181, 52, 45, 0.2);
  border-color: rgba(181, 52, 45, 0.7);
}

.tool-button i {
  width: 5px;
  height: 5px;
  background: rgba(248, 250, 247, 0.34);
  border-radius: 50%;
}

.tool-button[aria-pressed="true"] i {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(181, 52, 45, 0.16);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #86a68b;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(134, 166, 139, 0.12);
}

.dataset-count.is-offline {
  color: rgba(248, 250, 247, 0.58);
}

.dataset-count.is-offline .status-dot {
  background: #a7a19a;
  box-shadow: 0 0 0 4px rgba(167, 161, 154, 0.12);
}

.workspace {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 176px minmax(480px, 1fr) 360px;
  background: var(--ink);
}

.filter-rail {
  z-index: 20;
  min-width: 0;
  padding: 20px 15px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px 18px;
  font-weight: 700;
}

.rail-heading > span {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.rail-heading > span small {
  color: var(--accent);
  font-size: 9px;
  font-weight: 500;
}

.rail-heading > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.map-rail-close {
  width: 28px;
  height: 28px;
  display: none;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}

.clear-button {
  padding: 3px 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 11px;
}

.explore-index {
  display: grid;
  gap: 2px;
  margin: 12px 0 4px;
}

.explore-index button {
  width: 100%;
  min-height: 32px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 3px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  cursor: pointer;
}

.explore-index button:hover,
.explore-index button:focus-visible {
  color: var(--ink);
  background: rgba(17, 23, 25, 0.05);
}

.explore-index button.active {
  color: var(--ink);
  background: rgba(181, 52, 45, 0.07);
  border-left-color: var(--accent);
}

.explore-index button > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
}

.explore-index button.active > span {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
}

.explore-index button b {
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explore-index button small {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

fieldset {
  min-width: 0;
  margin: 0 0 24px;
  padding: 16px 3px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

legend {
  padding: 0;
  color: var(--muted);
  font-size: 11px;
}

.check-row {
  min-height: 37px;
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
}

.map-rail-content fieldset {
  margin-bottom: 12px;
  padding-top: 11px;
}

.map-rail-content .check-row {
  min-height: 30px;
}

.check-row input {
  position: absolute;
  opacity: 0;
}

.check-mark {
  width: 14px;
  height: 14px;
  border: 1px solid #8c9698;
  border-radius: 2px;
}

.check-row input:checked + .check-mark {
  background:
    linear-gradient(135deg, transparent 42%, white 43% 55%, transparent 56%) 0 0 / 8px 8px,
    linear-gradient(45deg, transparent 46%, white 47% 58%, transparent 59%) 4px 1px / 8px 12px,
    var(--accent);
  border-color: var(--accent);
}

.check-row b {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.layer-intensity {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 4px 3px 0;
  padding: 15px 0 4px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.layer-intensity output {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

.layer-intensity input {
  width: 100%;
  grid-column: 1 / -1;
  margin: 0;
  accent-color: var(--accent);
}

.topic-fieldset.is-mode-focus {
  border-top-color: rgba(181, 52, 45, 0.46);
}

.topic-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}

.topic-fieldset legend {
  grid-column: 1 / -1;
}

.topic-fieldset .topic {
  height: 27px;
  padding-inline: 5px;
  font-size: 10px;
}

.topic {
  width: 100%;
  height: 34px;
  display: block;
  padding: 0 9px;
  text-align: left;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.topic:hover {
  background: rgba(17, 23, 25, 0.05);
}

.topic.active {
  color: var(--accent);
  background: rgba(181, 52, 45, 0.07);
  border-left-color: var(--accent);
  font-weight: 700;
}

.legend {
  margin-top: 12px;
  padding: 14px 3px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.legend p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0;
}

.map-rail-content,
.graph-rail-content {
  min-width: 0;
}

.graph-rail-heading > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.graph-rail-close {
  width: 28px;
  height: 28px;
  display: none;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}

.graph-rail-center {
  position: relative;
  min-height: 126px;
  display: grid;
  align-content: end;
  padding: 20px 3px 16px;
  border-bottom: 1px solid var(--line);
}

.graph-rail-sigil {
  position: absolute;
  top: 14px;
  right: 3px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--white);
  border: 1px solid rgba(248, 250, 247, 0.28);
  border-radius: 50%;
  font-family: "Songti SC", "STSong", serif;
  font-size: 23px;
}

.graph-rail-center small,
.graph-rail-status span {
  color: var(--muted);
  font-size: 9px;
}

.graph-rail-center strong {
  max-width: 82px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--white);
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-rail-center p {
  margin: 5px 0 0;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

.graph-family-fieldset {
  margin-bottom: 0;
}

.graph-family-list {
  display: grid;
}

.graph-family-list button {
  width: 100%;
  min-height: 37px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 0 2px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-size: 10px;
}

.graph-family-list button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-family-list button[hidden] {
  display: none;
}

.graph-family-list button:hover,
.graph-family-list button:focus-visible {
  color: var(--white);
  background: rgba(248, 250, 247, 0.04);
}

.graph-family-list button.active {
  color: var(--white);
}

.graph-family-list button:not(.active) {
  opacity: 0.36;
}

.graph-family-list button:disabled {
  cursor: default;
}

.graph-family-list button i {
  width: 17px;
  height: 5px;
  display: block;
  border-top: 1px solid rgba(248, 250, 247, 0.72);
}

.graph-family-list button b {
  color: inherit;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
  font-weight: 500;
}

.graph-family-list [data-graph-family="place"] i {
  border-top-color: #5dc0bb;
  border-top-style: dashed;
}

.graph-family-list [data-graph-family="evidence"] i {
  border-top: 2px solid #71dcd6;
}

.graph-family-list [data-graph-family="time"] i {
  border-top-color: #94a7a4;
  border-top-style: dotted;
}

.graph-family-list [data-graph-family="form"] i,
.graph-family-list [data-graph-family="source"] i,
.graph-family-list [data-graph-family="peer"] i {
  border-top-style: dashed;
}

.graph-rail-status {
  display: grid;
  gap: 4px;
  margin-top: 20px;
  padding: 14px 3px 0;
  border-top: 1px solid var(--line);
}

.graph-rail-status strong {
  overflow: hidden;
  color: var(--white);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-rail-status small {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

.graph-minimap {
  min-width: 0;
  margin-top: 14px;
  padding: 12px 3px 0;
  border-top: 1px solid var(--line);
}

.graph-minimap header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 8px;
}

.graph-minimap header small,
#graph-minimap-status {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 7px;
}

.graph-minimap-control {
  width: 100%;
  height: 96px;
  display: block;
  padding: 0;
  overflow: hidden;
  color: inherit;
  background:
    linear-gradient(rgba(17, 23, 25, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 23, 25, 0.06) 1px, transparent 1px),
    rgba(17, 23, 25, 0.04);
  background-size: 16px 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  cursor: crosshair;
  touch-action: none;
}

.graph-minimap-control.is-dragging {
  cursor: grabbing;
}

@media (min-width: 901px) and (max-width: 1180px) {
  .graph-minimap-control {
    height: 72px;
  }
}

#graph-minimap {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.graph-minimap-edge {
  stroke: rgba(17, 23, 25, 0.34);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.graph-minimap-edge.relation-place,
.graph-minimap-edge.relation-evidence,
.graph-minimap-edge.relation-source {
  stroke: rgba(49, 112, 118, 0.68);
  stroke-dasharray: 2 2;
}

.graph-minimap-edge.relation-time,
.graph-minimap-edge.relation-form {
  stroke-dasharray: 1 3;
}

.graph-minimap-edge.relation-peer {
  stroke-dasharray: 4 2 1 2;
}

.graph-minimap-node {
  fill: rgba(17, 23, 25, 0.72);
  stroke: var(--panel);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.graph-minimap-node.node-place,
.graph-minimap-node.node-source,
.graph-minimap-node.node-category,
.graph-minimap-node.node-collection,
.graph-minimap-node.node-volume {
  fill: var(--water);
}

.graph-minimap-node.is-center {
  fill: var(--water);
  stroke: var(--white);
  stroke-width: 1.5;
}

.graph-minimap-node.is-selected {
  stroke: var(--white);
  stroke-width: 2;
}

.graph-minimap-viewport {
  fill: rgba(181, 52, 45, 0.035);
  stroke: rgba(181, 52, 45, 0.62);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.graph-minimap-corners {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

#graph-minimap-status {
  min-height: 18px;
  display: grid;
  align-items: end;
  text-align: right;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.poet-dot {
  background: var(--accent);
}

.poem-dot {
  background: var(--water);
}

.legend-line {
  width: 16px;
  height: 1px;
  border-top: 1px dashed var(--accent);
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #bfc4c2;
  isolation: isolate;
  cursor: crosshair;
}

.map-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: 54% 48%;
  transform:
    translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0)
    scale(var(--map-scale, 1));
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.map-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 52% 49%;
  filter: saturate(0.72) contrast(1.04) brightness(var(--map-intensity, 0.78));
}

.map-tint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(13, 20, 22, 0.1), transparent 24%, transparent 78%, rgba(13, 20, 22, 0.16)),
    rgba(218, 222, 217, 0.07);
  mix-blend-mode: multiply;
}

.route-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.route-layer [hidden] {
  display: none;
}

.poem-evidence-path {
  fill: none;
  stroke: #2f8e8a;
  stroke-width: 2;
  stroke-dasharray: 5 7;
  vector-effect: non-scaling-stroke;
}

.poem-evidence-origin {
  fill: var(--accent);
  stroke: var(--white);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.poem-evidence-target {
  fill: #2f8e8a;
  stroke: var(--white);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.poetry-field {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.92;
  transition: opacity 400ms ease, filter 400ms ease;
}

.focus-bloom {
  position: absolute;
  z-index: 6;
  left: var(--focus-x, 50%);
  top: var(--focus-y, 50%);
  width: 110px;
  height: 110px;
  border: 1px solid rgba(181, 52, 45, 0.7);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 52, 45, 0.16), transparent 62%);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
  mix-blend-mode: multiply;
}

.focus-bloom.is-active {
  animation: focusBloom 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes focusBloom {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.15);
  }
  55% {
    opacity: 0.42;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(7);
  }
}

.presence-cursor {
  position: absolute;
  z-index: 12;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(181, 52, 45, 0.7);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: opacity 180ms ease, transform 220ms ease;
  mix-blend-mode: multiply;
}

.map-stage.is-sensing .presence-cursor {
  opacity: 0.8;
  transform: translate(-50%, -50%) scale(1);
}

.map-stage.is-gathering .presence-cursor {
  background: rgba(181, 52, 45, 0.12);
  transform: translate(-50%, -50%) scale(1.6);
}

.scene-status {
  position: absolute;
  z-index: 13;
  left: 16px;
  top: 14px;
  min-width: 132px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 9px 10px;
  color: rgba(248, 250, 247, 0.7);
  background: rgba(17, 23, 25, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.map-filter-toggle {
  display: none;
}

.scene-status span {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
}

.scene-status span i {
  width: 5px;
  height: 5px;
  background: #86a68b;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(134, 166, 139, 0.1);
}

.scene-status b {
  color: var(--white);
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
}

.scene-status small {
  align-self: end;
  color: rgba(248, 250, 247, 0.38);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

.route {
  fill: none;
  stroke: rgba(181, 52, 45, 0.22);
  stroke-width: 1.4;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
  opacity: 0.6;
}

.route.active-route {
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 1;
  animation: routeFlow 16s linear infinite;
}

@keyframes routeFlow {
  to {
    stroke-dashoffset: -180;
  }
}

.map-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 18px;
  height: 18px;
  padding: 0;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 9;
}

.marker-core {
  position: absolute;
  inset: 4px;
  z-index: 2;
  background: var(--water);
  border: 2px solid rgba(248, 250, 247, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(17, 23, 25, 0.35);
  transition: transform 160ms ease, background 160ms ease;
}

.map-marker:hover .marker-core,
.map-marker.active .marker-core {
  background: var(--accent);
  transform: scale(1.35);
}

.marker-pulse {
  position: absolute;
  inset: -4px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  animation: markerPulse 2.4s ease-out infinite;
}

@keyframes markerPulse {
  0% {
    opacity: 0.9;
    transform: scale(0.5);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

.marker-label {
  position: absolute;
  left: 16px;
  top: -3px;
  z-index: 4;
  width: max-content;
  max-width: 140px;
  display: grid;
  gap: 2px;
  padding: 5px 7px;
  text-align: left;
  color: var(--white);
  background: rgba(17, 23, 25, 0.82);
  border-left: 2px solid var(--accent);
  border-radius: 2px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.map-marker:hover .marker-label,
.map-marker.active .marker-label {
  opacity: 1;
  transform: translateX(0);
}

.marker-label b {
  font-size: 11px;
}

.marker-label small {
  color: rgba(248, 250, 247, 0.62);
  font-size: 9px;
}

.small-marker .marker-label {
  top: 12px;
}

.map-meta {
  position: absolute;
  z-index: 13;
  left: 17px;
  bottom: 14px;
  display: flex;
  gap: 18px;
  padding: 7px 9px;
  color: rgba(248, 250, 247, 0.7);
  background: rgba(17, 23, 25, 0.7);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
  backdrop-filter: blur(8px);
}

.zoom-control {
  position: absolute;
  z-index: 13;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: 34px 48px 34px;
  color: var(--white);
  background: rgba(17, 23, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.zoom-control button {
  height: 32px;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 16px;
}

.zoom-control button:active {
  transform: scale(0.94);
}

.zoom-control span {
  display: grid;
  place-items: center;
  color: rgba(248, 250, 247, 0.62);
  border-inline: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 9px;
}

.knowledge-panel {
  position: relative;
  z-index: 20;
  min-width: 0;
  padding: 18px 20px 24px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.knowledge-panel.is-changing {
  animation: panelChange 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes panelChange {
  0% {
    filter: blur(0);
    transform: translateX(0);
  }
  38% {
    filter: blur(3px);
    transform: translateX(9px);
  }
  100% {
    filter: blur(0);
    transform: translateX(0);
  }
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.record-index {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
}

.panel-toolbar button,
.dialog-close {
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  font-size: 17px;
}

.knowledge-panel.place-dossier-active > .person-heading,
.knowledge-panel.place-dossier-active > blockquote,
.knowledge-panel.place-dossier-active > .person-stats,
.knowledge-panel.place-dossier-active > .panel-tabs,
.knowledge-panel.place-dossier-active > .tab-content {
  display: none;
}

.place-dossier[hidden] {
  display: none;
}

.place-dossier {
  min-width: 0;
}

.place-dossier-heading {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 14px;
  align-items: end;
  margin: 18px 0 16px;
  padding-right: 38px;
}

.place-dossier-heading > div:first-child {
  min-width: 0;
}

.place-dossier-heading > div:first-child > span {
  color: var(--muted);
  font-size: 9px;
}

.place-dossier-heading h1 {
  margin: 8px 0 4px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 36px;
  line-height: 1;
}

.place-dossier-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.place-dossier-sigil {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--ink-2);
  border: 1px solid var(--line);
  font-family: "Songti SC", "STSong", serif;
  font-size: 27px;
}

#place-dossier-return {
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}

.place-dossier-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

.place-dossier-boundary {
  margin: 0;
  padding: 11px 12px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  background: rgba(17, 23, 25, 0.04);
  font-size: 10px;
  line-height: 1.65;
}

.place-dossier-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 0;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}

.place-dossier-stats div {
  min-width: 0;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.place-dossier-stats div:first-child {
  padding-left: 0;
  border-left: 0;
}

.place-dossier-stats dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 8px;
}

.place-dossier-stats dd {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 17px;
  font-weight: 700;
}

.place-dossier-coordinate {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.place-dossier-coordinate span {
  color: var(--muted);
  font-size: 8px;
}

.place-dossier-coordinate strong {
  grid-column: 1 / -1;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 10px;
}

.place-dossier-coordinate small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 8px;
}

.place-dossier-section {
  padding-top: 15px;
}

.place-dossier-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
}

.place-dossier-section > header small {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

.place-dossier-author-list,
.place-dossier-work-list {
  border-top: 1px solid var(--line);
}

.place-dossier-author-list button {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;
  padding: 5px 2px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.place-dossier-author-list button b {
  font-size: 11px;
}

.place-dossier-author-list button small {
  color: var(--muted);
  font-size: 8px;
}

.place-dossier-author-list button span {
  color: var(--muted);
  text-align: right;
}

.place-dossier-work-list button {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 4px 8px;
  padding: 8px 2px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.place-dossier-work-list button > span:first-child {
  grid-row: 1 / 3;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

.place-dossier-work-list button > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.place-dossier-work-list button b {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-dossier-work-list button small,
.place-dossier-work-list button q {
  color: var(--muted);
  font-size: 8px;
}

.place-dossier-work-list button q {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-dossier-empty {
  margin: 0;
  padding: 13px 2px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 9px;
}

.place-dossier-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 16px;
}

.place-dossier-actions button {
  min-width: 0;
  height: 34px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
}

.place-dossier-actions button:first-child {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
}

.place-dossier-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.place-dossier[data-state="loading"] .place-dossier-body {
  opacity: 0.42;
  pointer-events: none;
}

.person-heading {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 14px;
  align-items: end;
  margin: 20px 0 18px;
}

.dynasty-stamp {
  display: inline-grid;
  min-width: 28px;
  height: 22px;
  place-items: center;
  padding: 0 5px;
  color: var(--white);
  background: var(--accent);
  border-radius: 2px;
  font-size: 11px;
}

.person-heading h1 {
  margin: 8px 0 3px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 38px;
  line-height: 1;
  font-weight: 700;
}

.person-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.portrait {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--white);
  background:
    linear-gradient(150deg, transparent 45%, rgba(255, 255, 255, 0.1) 46% 48%, transparent 49%),
    var(--ink-2);
  border-radius: 2px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 31px;
}

blockquote {
  margin: 0;
  padding: 12px 14px;
  color: #424a4d;
  border-left: 2px solid var(--accent);
  background: #e8ebe6;
  font-family: "Songti SC", "STSong", serif;
  font-size: 14px;
  line-height: 1.7;
}

.person-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0 0;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}

.person-stats div {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.person-stats div:first-child {
  padding-left: 0;
  border-left: 0;
}

.person-stats dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.person-stats dd {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 17px;
  font-weight: 700;
}

.panel-tabs {
  display: flex;
  gap: 20px;
  margin: 16px 0 14px;
  border-bottom: 1px solid var(--line);
}

.panel-tab {
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 11px;
}

.panel-tab.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.featured-poem {
  padding: 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.featured-poem header,
.featured-poem footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.featured-poem header span {
  color: var(--accent);
  font-size: 9px;
}

.featured-poem h2 {
  margin: 3px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
}

.featured-poem header button {
  padding: 5px 8px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  font-size: 9px;
}

.featured-poem header button.saved {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
}

.featured-poem > p {
  margin: 16px 0;
  overflow: hidden;
  display: -webkit-box;
  color: #363e40;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  line-height: 1.9;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.featured-poem footer {
  align-items: center;
  padding-top: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.featured-poem footer button {
  padding: 5px 0;
  color: var(--accent);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.poem-place-evidence {
  margin-top: 11px;
  padding-top: 11px;
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
}

.poem-place-evidence[hidden] {
  display: none;
}

.poem-place-evidence header {
  align-items: center;
}

.poem-place-evidence header span {
  color: #2f8e8a;
  font-size: 9px;
  font-weight: 700;
}

.poem-place-evidence header button {
  min-height: 26px;
  padding: 0 7px;
  color: #2f8e8a;
}

.poem-place-evidence strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
}

.poem-place-evidence q {
  color: #4b5557;
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  line-height: 1.6;
}

.poem-place-evidence small {
  color: var(--muted);
  font-size: 8px;
}

.context-list {
  margin-top: 9px;
}

.context-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 11px 2px;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.sequence {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
}

.context-list button > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.context-list b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
}

.context-list small {
  color: var(--muted);
  font-size: 9px;
}

.context-list i {
  color: var(--muted);
  font-style: normal;
  font-size: 9px;
}

.mini-graph {
  position: relative;
  height: 238px;
  background:
    linear-gradient(rgba(17, 23, 25, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 23, 25, 0.045) 1px, transparent 1px),
    var(--white);
  background-size: 18px 18px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.mini-node {
  position: absolute;
  z-index: 3;
  min-width: 58px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 6px;
  background: var(--panel);
  border: 1px solid #929b9d;
  border-radius: 3px;
  font-size: 11px;
  cursor: pointer;
}

.mini-node small {
  color: var(--muted);
  font-size: 8px;
}

.mini-node.center {
  left: 50%;
  top: 48%;
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
  transform: translate(-50%, -50%);
}

.mini-node.top {
  left: 15%;
  top: 17%;
}

.mini-node.right {
  right: 10%;
  top: 34%;
}

.mini-node.bottom {
  left: 26%;
  bottom: 12%;
}

.mini-line {
  position: absolute;
  z-index: 1;
  height: 1px;
  background: rgba(181, 52, 45, 0.5);
  transform-origin: left center;
}

.line-1 {
  width: 120px;
  left: 28%;
  top: 31%;
  transform: rotate(31deg);
}

.line-2 {
  width: 100px;
  left: 50%;
  top: 49%;
  transform: rotate(-8deg);
}

.line-3 {
  width: 92px;
  left: 34%;
  top: 72%;
  transform: rotate(-49deg);
}

.graph-caption {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.timeline-bar {
  z-index: 30;
  min-width: 0;
  display: grid;
  grid-template-columns: 176px 1fr 360px;
  color: var(--white);
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.timeline-copy {
  display: grid;
  align-content: center;
  padding: 0 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.timeline-copy small {
  margin-bottom: 6px;
  color: rgba(248, 250, 247, 0.46);
  font-size: 9px;
}

.timeline-copy strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
}

.timeline-scroll {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(72px, 1fr));
  overflow-x: auto;
}

.timeline-scroll button {
  position: relative;
  min-width: 72px;
  display: grid;
  align-content: center;
  gap: 5px;
  color: rgba(248, 250, 247, 0.58);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.timeline-scroll button span,
.timeline-scroll button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-scroll button::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: transparent;
}

.timeline-scroll button.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.timeline-scroll button.active::before {
  background: var(--accent);
}

.timeline-scroll small {
  color: rgba(248, 250, 247, 0.34);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

.timeline-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  padding: 0 20px;
  color: rgba(248, 250, 247, 0.5);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 9px;
}

.timeline-stats b {
  display: block;
  margin-bottom: 3px;
  color: var(--white);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 13px;
}

.graph-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: none;
  overflow: hidden;
  background:
    linear-gradient(rgba(248, 250, 247, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 250, 247, 0.05) 1px, transparent 1px),
    rgba(17, 23, 25, 0.84);
  background-size: 32px 32px;
  backdrop-filter: blur(4px);
}

.graph-mode .graph-layer {
  display: block;
  animation: graphReveal 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.graph-mode .map-marker,
.graph-mode .route-layer {
  opacity: 0;
  pointer-events: none;
}

.graph-mode .poetry-field {
  opacity: 0.12;
  filter: contrast(1.1);
}

.graph-mode .scene-status,
.graph-mode .map-meta,
.graph-mode .zoom-control,
.graph-mode .focus-bloom,
.graph-mode .presence-cursor {
  opacity: 0;
  pointer-events: none;
}

.graph-mode .focus-bloom {
  animation: none;
}

@keyframes graphReveal {
  from {
    opacity: 0;
    clip-path: circle(0% at 50% 50%);
  }
  to {
    opacity: 1;
    clip-path: circle(80% at 50% 50%);
  }
}

.graph-title {
  position: absolute;
  z-index: 8;
  left: 24px;
  top: 24px;
  display: grid;
  color: var(--white);
}

.graph-title small {
  color: rgba(248, 250, 247, 0.48);
  font-size: 9px;
}

.graph-title strong {
  margin-top: 5px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 23px;
}

.graph-title span {
  margin-top: 6px;
  color: rgba(248, 250, 247, 0.42);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
}

.graph-toolbar {
  position: absolute;
  z-index: 9;
  top: 24px;
  right: 24px;
  display: grid;
  grid-template-columns: repeat(4, 58px);
  min-height: 32px;
  padding: 2px;
  background: rgba(17, 23, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.graph-layer[data-graph-center="poem"] .graph-toolbar {
  grid-template-columns: repeat(3, 58px);
}

.graph-layer[data-graph-center="place"] .graph-toolbar {
  grid-template-columns: repeat(2, 58px);
}

.graph-toolbar button {
  min-width: 0;
  min-height: 28px;
  padding: 0 8px;
  color: rgba(248, 250, 247, 0.5);
  background: transparent;
  border: 0;
  border-radius: 1px;
  font-size: 10px;
}

.graph-toolbar button:hover,
.graph-toolbar button.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.graph-spectrum-toggle {
  display: none;
}

.graph-camera {
  --graph-scale: 1;
  --graph-pan-x: 0px;
  --graph-pan-y: 0px;
  position: absolute;
  z-index: 1;
  inset: 0;
  cursor: grab;
  touch-action: none;
  transform:
    translate3d(var(--graph-pan-x), var(--graph-pan-y), 0)
    scale(var(--graph-scale));
  transform-origin: 50% 50%;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.graph-camera.is-immediate,
.is-camera-dragging .graph-camera {
  transition: none;
}

.is-camera-dragging .graph-camera {
  cursor: grabbing;
  user-select: none;
}

.graph-navigation {
  position: absolute;
  z-index: 9;
  top: 64px;
  right: 24px;
  min-height: 32px;
  display: grid;
  grid-template-columns: auto 30px 48px 30px 48px 48px;
  align-items: center;
  color: rgba(248, 250, 247, 0.58);
  background: rgba(17, 23, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.graph-navigation-label {
  padding-inline: 10px;
  color: rgba(248, 250, 247, 0.4);
  font-size: 8px;
  white-space: nowrap;
}

.graph-navigation button,
.graph-navigation output {
  min-width: 0;
  height: 30px;
  display: grid;
  place-items: center;
  color: inherit;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  font-size: 9px;
  line-height: 1;
}

.graph-navigation output {
  color: rgba(248, 250, 247, 0.82);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
}

.graph-navigation button {
  cursor: pointer;
}

.graph-navigation button:hover,
.graph-navigation button:focus-visible {
  color: var(--white);
  background: rgba(248, 250, 247, 0.08);
}

.graph-navigation button:disabled {
  opacity: 0.24;
  cursor: default;
}

.graph-navigation button.is-altered {
  color: var(--white);
  background: var(--accent);
}

.graph-edges,
.graph-nodes {
  position: absolute;
  inset: 0;
}

.graph-edges {
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.graph-geo-echo {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.graph-geo-echo[hidden],
.graph-geo-label[hidden] {
  display: none;
}

.graph-geo-path {
  fill: none;
  stroke: rgba(113, 220, 214, 0.48);
  stroke-width: 1.2;
  stroke-dasharray: 2 7;
  vector-effect: non-scaling-stroke;
}

.graph-geo-origin {
  fill: var(--accent);
  stroke: var(--white);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.graph-geo-target > circle:first-child {
  fill: rgba(113, 220, 214, 0.03);
  stroke: rgba(113, 220, 214, 0.74);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
  transform-origin: center;
  animation: graphGeoPulse 2.8s ease-in-out infinite;
}

.graph-geo-target > circle:nth-child(2) {
  fill: var(--ink);
  stroke: var(--water);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.graph-geo-target > path {
  fill: none;
  stroke: rgba(113, 220, 214, 0.46);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.graph-geo-path-label {
  fill: rgba(113, 220, 214, 0.5);
  paint-order: stroke;
  stroke: rgba(3, 9, 11, 0.94);
  stroke-width: 4px;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 7px;
  letter-spacing: 0;
  text-anchor: middle;
}

.graph-geo-label {
  position: absolute;
  z-index: 3;
  left: var(--geo-x);
  top: var(--geo-y);
  width: 156px;
  display: grid;
  gap: 3px;
  padding-left: 18px;
  pointer-events: none;
  transform: translateY(-50%);
}

.graph-geo-label.is-east {
  padding-right: 18px;
  padding-left: 0;
  text-align: right;
  transform: translate(-100%, -50%);
}

.graph-geo-label.is-center-anchor {
  transform: translateY(calc(-50% - 10px));
}

.graph-geo-label.is-center-anchor.is-east {
  transform: translate(-100%, calc(-50% - 10px));
}

.graph-geo-label > span,
.graph-geo-label > small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.42);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 7px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-geo-label > strong {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.82);
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes graphGeoPulse {
  50% {
    opacity: 0.42;
    transform: scale(1.3);
  }
}

.graph-orbit-axis,
.graph-orbit-ring,
.graph-orbit-core {
  fill: none;
  stroke: rgba(248, 250, 247, 0.1);
  vector-effect: non-scaling-stroke;
}

.graph-orbit-axis {
  stroke-dasharray: 1 12;
}

.graph-orbit-ring {
  stroke-dasharray: 2 10;
}

.graph-orbit-ring-inner {
  stroke: rgba(248, 250, 247, 0.14);
}

.graph-orbit-core {
  fill: rgba(248, 250, 247, 0.08);
  stroke: rgba(248, 250, 247, 0.28);
}

.graph-orbit-label {
  fill: rgba(248, 250, 247, 0.28);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
  letter-spacing: 0;
  transition:
    fill 180ms ease,
    opacity 180ms ease;
}

.graph-orbit-label.is-active {
  fill: rgba(248, 250, 247, 0.72);
}

.graph-orbit-label.is-dimmed {
  opacity: 0.22;
}

.graph-edge-path {
  fill: none;
  stroke: rgba(248, 250, 247, 0.26);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  transition:
    opacity 180ms ease,
    stroke 180ms ease,
    stroke-width 180ms ease;
}

.graph-edge-label {
  fill: rgba(248, 250, 247, 0.4);
  font-size: 9px;
  transition:
    opacity 180ms ease,
    fill 180ms ease;
}

.graph-edge-path.is-active {
  stroke: rgba(248, 250, 247, 0.78);
  stroke-width: 1.8;
  stroke-dasharray: 7 8;
  animation: graphEdgeFlow 1.8s linear infinite;
}

.graph-edge-label.is-active {
  opacity: 1;
  fill: rgba(248, 250, 247, 0.82);
}

.graph-edge-path.is-dimmed,
.graph-edge-label.is-dimmed {
  opacity: 0.08;
}

.graph-edge-path.is-contextual {
  opacity: 0.46;
}

.graph-edge-label.is-contextual {
  opacity: 0.34;
}

.graph-edge-path.is-trail {
  opacity: 1;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-dasharray: 4 7;
  animation: graphTrailFlow 1.4s linear infinite;
}

.graph-edge-path.is-trail.is-dimmed {
  opacity: 0.72;
}

.graph-edge-label.is-trail {
  opacity: 0.8;
  fill: rgba(248, 250, 247, 0.88);
}

.graph-edge-path.is-evidence-selected,
.graph-edge-path.is-evidence-selected.is-dimmed {
  opacity: 1;
  stroke: #84f6f1;
  stroke-width: 2.8;
  stroke-dasharray: 7 4;
  filter: url("#edge-glow");
  animation: graphEvidenceFlow 1.8s linear infinite;
}

.graph-edge-label.is-evidence-selected,
.graph-edge-label.is-evidence-selected.is-dimmed {
  opacity: 1;
  fill: #84f6f1;
  font-size: 9px;
}

.graph-node.is-evidence-endpoint,
.graph-node.is-evidence-endpoint.is-dimmed {
  opacity: 1;
  border-color: rgba(132, 246, 241, 0.88);
  box-shadow:
    0 0 0 1px rgba(132, 246, 241, 0.18),
    0 0 22px rgba(85, 199, 197, 0.2);
}

@keyframes graphTrailFlow {
  to {
    stroke-dashoffset: -22;
  }
}

@keyframes graphEvidenceFlow {
  to {
    stroke-dashoffset: -22;
  }
}

.graph-edge-path.relation-authorship {
  stroke: rgba(248, 250, 247, 0.46);
}

.graph-edge-path.relation-place {
  stroke: rgba(93, 192, 187, 0.68);
  stroke-dasharray: 5 7;
}

.graph-edge-path.relation-evidence {
  stroke: rgba(113, 220, 214, 0.84);
  stroke-width: 1.5;
}

.graph-edge-path.relation-time {
  stroke: rgba(148, 167, 164, 0.46);
  stroke-dasharray: 1 8;
}

.graph-edge-path.relation-form {
  stroke: rgba(184, 196, 188, 0.42);
  stroke-dasharray: 3 5;
}

.graph-edge-path.relation-source {
  stroke: rgba(104, 210, 205, 0.58);
  stroke-dasharray: 8 3 1 3;
}

.graph-edge-path.relation-peer {
  stroke: rgba(248, 250, 247, 0.6);
  stroke-dasharray: 2 7 9 7;
}

.graph-edge-label.relation-place,
.graph-edge-label.relation-evidence {
  fill: rgba(113, 220, 214, 0.66);
}

.graph-edge-label.relation-time,
.graph-edge-label.relation-form,
.graph-edge-label.relation-source {
  fill: rgba(184, 196, 188, 0.48);
}

@keyframes graphEdgeFlow {
  to {
    stroke-dashoffset: -30;
  }
}

.graph-nodes {
  z-index: 5;
}

.graph-focus-halo {
  --focus-size: 184px;
  --focus-radius: 92px;
  position: absolute;
  z-index: 4;
  left: clamp(
    calc(var(--focus-radius) + 4px),
    var(--focus-x),
    calc(100% - var(--focus-radius) - 4px)
  );
  top: var(--focus-y);
  width: var(--focus-size);
  height: var(--focus-size);
  border: 1px solid rgba(248, 250, 247, 0.2);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    left 260ms cubic-bezier(0.22, 1, 0.36, 1),
    top 260ms cubic-bezier(0.22, 1, 0.36, 1),
    width 180ms ease,
    height 180ms ease;
}

.graph-focus-halo[hidden] {
  display: none;
}

.graph-focus-halo::before,
.graph-focus-halo::after,
.graph-focus-ring {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.graph-focus-halo::before {
  inset: 8px;
  border: 1px dashed rgba(248, 250, 247, 0.14);
}

.graph-focus-halo::after {
  inset: 18px;
  border: 1px solid rgba(248, 250, 247, 0.1);
}

.graph-focus-ring {
  inset: -5px;
  border: 1px solid transparent;
  border-top-color: rgba(248, 250, 247, 0.54);
  border-right-color: rgba(248, 250, 247, 0.16);
  animation: graphFocusOrbit 12s linear infinite;
}

.graph-focus-halo > i {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 5px;
  background: rgba(248, 250, 247, 0.18);
  transform:
    translate(-50%, -50%)
    rotate(var(--focus-angle))
    translateY(calc(var(--focus-size) / -2));
  transform-origin: center;
  transition:
    height 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.graph-focus-halo > i.is-active {
  height: 12px;
  background: var(--white);
  box-shadow: 0 0 10px rgba(248, 250, 247, 0.65);
}

.graph-focus-halo > i[data-family="place"].is-active,
.graph-focus-halo > i[data-family="evidence"].is-active {
  background: #71dcd6;
  box-shadow: 0 0 12px rgba(113, 220, 214, 0.72);
}

.graph-focus-halo > i[data-family="time"].is-active,
.graph-focus-halo > i[data-family="form"].is-active {
  background: #b8c4bc;
  box-shadow: 0 0 10px rgba(184, 196, 188, 0.52);
}

.graph-focus-halo > i[data-family="source"].is-active {
  background: #68d2cd;
  box-shadow: 0 0 11px rgba(104, 210, 205, 0.68);
}

.graph-focus-halo > i[data-family="peer"].is-active {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(181, 52, 45, 0.68);
}

.graph-focus-degree,
.graph-focus-kind {
  position: absolute;
  left: 50%;
  padding-inline: 4px;
  color: rgba(248, 250, 247, 0.56);
  background: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  line-height: 1;
  transform: translateX(-50%);
}

.graph-focus-degree {
  top: -4px;
  font-size: 8px;
}

.graph-focus-kind {
  bottom: -4px;
  font-size: 7px;
}

@keyframes graphFocusOrbit {
  to {
    transform: rotate(360deg);
  }
}

.graph-node {
  position: absolute;
  left: var(--gx);
  top: var(--gy);
  width: 104px;
  min-height: 58px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--white);
  background: #293437;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 3px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    opacity 180ms ease,
  filter 180ms ease;
}

.graph-node::after {
  content: attr(data-orbit);
  position: absolute;
  left: 5px;
  top: 4px;
  color: rgba(248, 250, 247, 0.3);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 6px;
  line-height: 1;
  pointer-events: none;
}

.graph-mode .graph-node {
  animation: graphNodeEnter 420ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(var(--node-index, 0) * 28ms);
}

@keyframes graphNodeEnter {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.graph-node:hover,
.graph-node:focus-visible,
.graph-node.selected {
  z-index: 7;
  border-color: var(--white);
  box-shadow: 0 0 0 4px rgba(248, 250, 247, 0.08);
  transform: translate(-50%, -50%) scale(1.04);
}

.graph-node.is-related {
  border-color: rgba(248, 250, 247, 0.72);
  box-shadow: 0 0 0 3px rgba(248, 250, 247, 0.06);
}

.graph-node.is-trail {
  opacity: 1;
}

.graph-node.is-trail.is-dimmed {
  opacity: 0.62;
  filter: saturate(0.72);
}

.graph-trail-badge {
  position: absolute;
  z-index: 2;
  right: -7px;
  top: -7px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding-inline: 3px;
  color: var(--white);
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 7px;
  line-height: 1;
  box-shadow: 0 0 0 4px rgba(181, 52, 45, 0.12);
}

.graph-node.is-dimmed {
  opacity: 0.2;
  filter: saturate(0.35);
}

.graph-node.is-contextual {
  opacity: 0.62;
  filter: saturate(0.72);
}

.graph-node b {
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  font-family: "Songti SC", "STSong", serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.graph-node small {
  color: rgba(248, 250, 247, 0.52);
  font-size: 8px;
}

.graph-node-author {
  width: 132px;
  height: 132px;
  min-height: 132px;
  padding: 18px 10px 12px;
  gap: 3px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, rgba(181, 52, 45, 0.28), transparent 29%),
    #202b2d;
  border-color: rgba(248, 250, 247, 0.74);
}

.graph-node-author b {
  position: relative;
  margin-top: 46px;
  font-size: 20px;
  line-height: 1;
}

.graph-node-author small {
  position: relative;
  font-size: 7px;
}

.graph-author-sigil {
  position: absolute;
  top: 15px;
  left: 50%;
  color: rgba(248, 250, 247, 0.16);
  font-family: "Songti SC", "STSong", serif;
  font-size: 58px;
  line-height: 1;
  transform: translateX(-50%);
}

.graph-node-author::after {
  left: 50%;
  top: auto;
  bottom: 9px;
  transform: translateX(-50%);
}

.graph-node-author.is-secondary {
  width: 86px;
  height: 86px;
  min-height: 86px;
  padding: 22px 7px 7px;
}

.graph-node-author.is-secondary b {
  margin-top: 18px;
  font-size: 13px;
}

.graph-node-author.is-secondary small {
  font-size: 7px;
}

.graph-node-author.is-secondary .graph-author-sigil {
  top: 5px;
  font-size: 28px;
}

.graph-node-author.is-secondary::after {
  bottom: 7px;
}

.graph-node-poem.is-center {
  width: 132px;
  height: 132px;
  min-height: 132px;
  padding: 46px 13px 14px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 32%, rgba(93, 192, 187, 0.22), transparent 31%),
    #202b2d;
}

.graph-node-poem.is-center b {
  position: relative;
  font-size: 15px;
  -webkit-line-clamp: 2;
}

.graph-node-poem.is-center small {
  position: relative;
  font-size: 7px;
}

.graph-poem-sigil {
  position: absolute;
  top: 11px;
  left: 50%;
  color: rgba(113, 220, 214, 0.18);
  font-family: "Songti SC", "STSong", serif;
  font-size: 50px;
  line-height: 1;
  transform: translateX(-50%);
}

.graph-node-place.is-center {
  width: 132px;
  height: 132px;
  min-height: 132px;
  padding: 46px 12px 14px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 32%, rgba(93, 192, 187, 0.24), transparent 31%),
    #202b2d;
}

.graph-node-place.is-center::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(113, 220, 214, 0.16);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(113, 220, 214, 0.12) 50%, transparent 50.5%),
    linear-gradient(transparent 49.5%, rgba(113, 220, 214, 0.12) 50%, transparent 50.5%);
  pointer-events: none;
}

.graph-node-place.is-center b {
  position: relative;
  font-size: 18px;
}

.graph-node-place.is-center small {
  position: relative;
  font-size: 7px;
}

.graph-place-sigil {
  position: absolute;
  top: 10px;
  left: 50%;
  color: rgba(113, 220, 214, 0.2);
  font-family: "Songti SC", "STSong", serif;
  font-size: 50px;
  line-height: 1;
  transform: translateX(-50%);
}

.graph-node-peerauthor {
  width: 86px;
  height: 86px;
  min-height: 86px;
  padding: 22px 8px 8px;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, rgba(212, 74, 65, 0.18), transparent 34%),
    #202b2d;
}

.graph-node-peerauthor::before {
  content: attr(data-monogram);
  position: absolute;
  top: 5px;
  color: rgba(248, 250, 247, 0.24);
  font-family: "Songti SC", "STSong", serif;
  font-size: 26px;
  line-height: 1;
}

.graph-node-peerauthor::after {
  left: 50%;
  top: auto;
  bottom: 8px;
  transform: translateX(-50%);
}

.graph-node-peerauthor b {
  position: relative;
  font-size: 13px;
  -webkit-line-clamp: 1;
}

.graph-node-peerauthor small {
  position: relative;
}

.graph-node-place {
  border-color: rgba(93, 192, 187, 0.58);
}

.graph-node-poem {
  border-color: rgba(255, 255, 255, 0.38);
}

.graph-node-genre,
.graph-node-dynasty {
  width: 84px;
  min-height: 48px;
}

.graph-node-source,
.graph-node-category,
.graph-node-collection,
.graph-node-volume {
  width: 112px;
  min-height: 52px;
  border-color: rgba(104, 210, 205, 0.48);
  border-style: dashed;
}

.graph-inspector {
  position: absolute;
  z-index: 8;
  left: 24px;
  bottom: 82px;
  width: min(820px, calc(100% - 48px));
  min-height: 58px;
  padding: 8px 10px 8px 13px;
  display: grid;
  grid-template-columns:
    minmax(112px, 150px)
    minmax(190px, 260px)
    minmax(150px, 1fr)
    auto;
  align-items: center;
  gap: 14px;
  border-left: 2px solid var(--accent);
  background: rgba(17, 23, 25, 0.62);
}

.graph-inspector.edge-lens-open > :not(.graph-evidence-lens) {
  display: none;
}

.graph-evidence-lens {
  min-width: 0;
  min-height: 42px;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns:
    minmax(118px, 150px)
    minmax(112px, 148px)
    minmax(170px, 1fr)
    auto;
  align-items: center;
  gap: 12px;
}

.graph-evidence-lens[hidden] {
  display: none;
}

.graph-evidence-identity,
.graph-evidence-relation,
.graph-evidence-proof {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.graph-evidence-identity > span,
.graph-evidence-relation > span,
.graph-evidence-proof > span {
  color: rgba(248, 250, 247, 0.42);
  font-size: 7px;
}

.graph-evidence-identity > strong,
.graph-evidence-relation > strong {
  overflow: hidden;
  color: var(--white);
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-evidence-identity > small,
.graph-evidence-relation > small,
.graph-evidence-proof > small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.48);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-evidence-identity > small b {
  color: rgba(248, 250, 247, 0.76);
  font-family: "Songti SC", "STSong", serif;
  font-weight: 600;
}

.graph-evidence-relation {
  padding-left: 10px;
  border-left: 1px solid rgba(113, 220, 214, 0.42);
}

.graph-evidence-proof q {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.88);
  font-family: "Songti SC", "STSong", serif;
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-evidence-proof q::before,
.graph-evidence-proof q::after {
  color: rgba(113, 220, 214, 0.56);
}

.graph-evidence-actions {
  display: flex;
  gap: 5px;
}

.graph-evidence-actions button {
  height: 30px;
  padding: 0 8px;
  color: rgba(248, 250, 247, 0.7);
  background: transparent;
  border: 1px solid rgba(248, 250, 247, 0.16);
  border-radius: 2px;
  font-size: 9px;
  white-space: nowrap;
}

#graph-evidence-close {
  width: 30px;
  padding: 0;
  font-size: 14px;
}

#graph-evidence-traverse b {
  margin-left: 4px;
  font-family: ui-monospace, "SFMono-Regular", monospace;
}

.graph-evidence-actions button:hover,
.graph-evidence-actions button:focus-visible {
  color: var(--white);
  border-color: rgba(248, 250, 247, 0.48);
  background: rgba(248, 250, 247, 0.07);
}

.graph-trail {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.graph-trail-heading {
  display: grid;
  gap: 2px;
  color: rgba(248, 250, 247, 0.48);
  font-size: 8px;
  white-space: nowrap;
}

.graph-trail-heading small {
  color: rgba(248, 250, 247, 0.28);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 7px;
}

.graph-trail-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.graph-trail-list::-webkit-scrollbar {
  display: none;
}

.graph-trail-step {
  flex: 0 0 auto;
  min-width: 44px;
  max-width: 78px;
  height: 32px;
  padding: 3px 6px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  color: rgba(248, 250, 247, 0.64);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(248, 250, 247, 0.16);
  border-radius: 0;
  text-align: left;
}

.graph-trail-step small {
  color: rgba(248, 250, 247, 0.3);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 7px;
}

.graph-trail-step b {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-trail-step:hover,
.graph-trail-step:focus-visible,
.graph-trail-step.is-current {
  color: var(--white);
  border-bottom-color: var(--accent);
  background: rgba(248, 250, 247, 0.05);
}

.graph-trail-step.is-current small {
  color: var(--accent);
}

.graph-trail-connector {
  flex: 0 0 18px;
  overflow: hidden;
  color: rgba(248, 250, 247, 0.25);
  font-size: 0;
  text-align: center;
}

.graph-trail-connector::after {
  content: "→";
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
}

.graph-trail-actions {
  display: flex;
  gap: 3px;
}

.graph-trail-actions button {
  width: 25px;
  height: 28px;
  padding: 0;
  color: rgba(248, 250, 247, 0.58);
  background: transparent;
  border: 1px solid rgba(248, 250, 247, 0.13);
  border-radius: 2px;
  font-family: ui-monospace, "SFMono-Regular", monospace;
}

.graph-trail-actions button:hover,
.graph-trail-actions button:focus-visible {
  color: var(--white);
  border-color: rgba(248, 250, 247, 0.46);
}

.graph-trail-actions button:disabled {
  opacity: 0.24;
  pointer-events: none;
}

.graph-inspector[data-kind="PeerAuthor"] {
  border-left-color: rgba(248, 250, 247, 0.72);
}

#graph-inspector-excerpt {
  margin: 2px 0 0;
  overflow: hidden;
  display: -webkit-box;
  color: rgba(248, 250, 247, 0.62);
  font-family: "Songti SC", "STSong", serif;
  font-size: 9px;
  font-style: normal;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#graph-inspector-excerpt::before,
#graph-inspector-excerpt::after {
  content: none;
}

.graph-inspector.has-excerpt #graph-inspector-detail {
  display: none;
}

.graph-reading-aperture {
  position: absolute;
  z-index: 40;
  inset: 18px 18px 82px;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  color: var(--white);
  background: rgba(10, 16, 18, 0.97);
  border-top: 1px solid rgba(248, 250, 247, 0.22);
  border-bottom: 1px solid rgba(248, 250, 247, 0.12);
  animation: graphReadingEnter 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.graph-reading-aperture[hidden] {
  display: none;
}

@keyframes graphReadingEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.graph-reading-aperture > header {
  min-width: 0;
  padding: 0 15px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(248, 250, 247, 0.12);
}

.graph-reading-aperture > header > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 3px 14px;
}

.graph-reading-aperture > header span {
  color: rgba(248, 250, 247, 0.66);
  font-size: 9px;
}

.graph-reading-aperture > header small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.34);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#graph-reading-close {
  width: 30px;
  height: 30px;
  padding: 0;
  color: rgba(248, 250, 247, 0.62);
  background: transparent;
  border: 1px solid rgba(248, 250, 247, 0.18);
  border-radius: 2px;
  font-size: 16px;
}

#graph-reading-close:hover,
#graph-reading-close:focus-visible {
  color: var(--white);
  border-color: rgba(248, 250, 247, 0.52);
}

.graph-reading-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  overflow: hidden;
}

.graph-reading-work {
  min-width: 0;
  min-height: 0;
  padding: 34px 46px 24px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  align-content: start;
  overflow: hidden;
}

.graph-reading-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(248, 250, 247, 0.42);
  font-size: 8px;
}

#graph-reading-rank {
  color: var(--accent);
  font-weight: 700;
}

.graph-reading-work h2 {
  max-width: 14em;
  margin: 12px 0 4px;
  color: var(--white);
  font-family: "Songti SC", "STSong", serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

#graph-reading-author {
  margin: 0;
  color: rgba(248, 250, 247, 0.46);
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
}

.graph-reading-poem {
  min-height: 0;
  margin-top: 24px;
  padding: 0 12px 20px 0;
  overflow-y: auto;
  color: rgba(248, 250, 247, 0.9);
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  line-height: 2.05;
  white-space: pre-line;
  scrollbar-width: thin;
}

.graph-reading-poem:focus-visible {
  outline: 1px solid rgba(248, 250, 247, 0.36);
  outline-offset: 5px;
}

.graph-reading-work > footer {
  min-width: 0;
  padding-top: 13px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  border-top: 1px solid rgba(248, 250, 247, 0.1);
}

.graph-reading-work > footer span {
  grid-row: 1 / 3;
  color: rgba(248, 250, 247, 0.32);
  font-size: 8px;
}

.graph-reading-work > footer strong,
.graph-reading-work > footer small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-reading-work > footer strong {
  color: rgba(248, 250, 247, 0.7);
  font-size: 9px;
}

.graph-reading-work > footer small {
  color: rgba(248, 250, 247, 0.32);
  font-size: 7px;
}

.graph-reading-evidence {
  min-width: 0;
  min-height: 0;
  padding: 30px 18px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-left: 1px solid rgba(248, 250, 247, 0.12);
}

.graph-reading-evidence > span {
  color: rgba(248, 250, 247, 0.34);
  font-size: 8px;
}

.graph-reading-evidence > strong {
  margin-top: 5px;
  color: var(--white);
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
}

.graph-reading-evidence-list {
  margin-top: 18px;
  display: grid;
}

.graph-reading-evidence-item {
  min-width: 0;
  padding: 9px 0 10px;
  display: grid;
  gap: 3px;
  border-top: 1px solid rgba(248, 250, 247, 0.1);
}

.graph-reading-evidence-item > span {
  color: rgba(248, 250, 247, 0.32);
  font-size: 7px;
}

.graph-reading-evidence-item > strong {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.78);
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-reading-evidence-item > small,
.graph-reading-evidence-item > q {
  margin: 0;
  color: rgba(248, 250, 247, 0.42);
  font-size: 8px;
  font-style: normal;
  line-height: 1.5;
}

.graph-reading-evidence dl {
  margin: auto 0 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.graph-reading-evidence dl > div {
  padding: 8px 6px;
  border-top: 1px solid rgba(248, 250, 247, 0.1);
  border-right: 1px solid rgba(248, 250, 247, 0.08);
}

.graph-reading-evidence dt {
  color: rgba(248, 250, 247, 0.3);
  font-size: 7px;
}

.graph-reading-evidence dd {
  margin: 3px 0 0;
  color: var(--white);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 11px;
}

.graph-reading-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.graph-reading-actions button {
  min-height: 32px;
  padding: 0 7px;
  color: rgba(248, 250, 247, 0.68);
  background: transparent;
  border: 1px solid rgba(248, 250, 247, 0.16);
  border-radius: 2px;
  font-size: 8px;
}

.graph-reading-actions button:hover,
.graph-reading-actions button:focus-visible {
  color: var(--white);
  border-color: rgba(248, 250, 247, 0.48);
}

.graph-reading-evidence > small {
  margin-top: 10px;
  color: rgba(248, 250, 247, 0.28);
  font-size: 7px;
  line-height: 1.5;
}

.reading-open .graph-title,
.reading-open .graph-toolbar,
.reading-open .graph-navigation,
.reading-open .graph-camera,
.reading-open .graph-edges,
.reading-open .graph-geo-echo,
.reading-open .graph-geo-label,
.reading-open .graph-nodes,
.reading-open .graph-inspector,
.reading-open .graph-legend {
  opacity: 0.08;
  pointer-events: none;
}

.classic-open .graph-geo-echo,
.classic-open .graph-geo-label,
.place-audit-open .graph-geo-echo,
.place-audit-open .graph-geo-label,
.identity-open .graph-geo-echo,
.identity-open .graph-geo-label {
  opacity: 0;
}

.graph-comparison {
  position: absolute;
  z-index: 11;
  left: 24px;
  right: 24px;
  bottom: 82px;
  height: 190px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
  color: var(--white);
  background: rgba(13, 19, 21, 0.96);
  border-top: 1px solid rgba(248, 250, 247, 0.28);
  border-bottom: 1px solid rgba(248, 250, 247, 0.12);
  box-shadow: 0 22px 60px rgba(4, 8, 9, 0.42);
  animation: graphComparisonEnter 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.graph-comparison[hidden] {
  display: none;
}

@keyframes graphComparisonEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.graph-comparison > header {
  position: relative;
  min-width: 0;
  padding: 18px 16px;
  display: grid;
  align-content: center;
  border-right: 1px solid rgba(248, 250, 247, 0.12);
}

.graph-comparison > header > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.graph-comparison > header span,
.graph-comparison > header small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.48);
  font-size: 8px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.graph-comparison > header strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
}

#graph-comparison-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  color: rgba(248, 250, 247, 0.62);
  background: transparent;
  border: 1px solid rgba(248, 250, 247, 0.14);
  border-radius: 2px;
  font-size: 16px;
}

#graph-comparison-close:hover,
#graph-comparison-close:focus-visible {
  color: var(--white);
  border-color: rgba(248, 250, 247, 0.52);
}

.graph-comparison-works {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.graph-comparison-work {
  min-width: 0;
  min-height: 0;
  padding: 15px 18px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 6px;
  overflow-y: auto;
  color: var(--white);
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(248, 250, 247, 0.1);
  border-radius: 0;
  text-align: left;
}

.graph-comparison-work:last-child {
  border-right: 0;
}

.graph-comparison-work:hover,
.graph-comparison-work:focus-visible {
  background: rgba(248, 250, 247, 0.06);
  box-shadow: inset 0 2px var(--accent);
}

.graph-comparison-work > span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.graph-comparison-work > span small {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 8px;
}

.graph-comparison-work > span b {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-comparison-work > strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-comparison-work > p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(248, 250, 247, 0.68);
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.graph-comparison-work > small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.4);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-open .graph-inspector,
.comparison-open .graph-navigation,
.comparison-open .graph-legend {
  opacity: 0;
  pointer-events: none;
}

.classic-workbench {
  position: absolute;
  z-index: 13;
  inset: 16px 16px 82px;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr);
  overflow: hidden;
  color: var(--white);
  background: rgba(11, 17, 19, 0.98);
  border-top: 1px solid rgba(248, 250, 247, 0.3);
  border-bottom: 1px solid rgba(248, 250, 247, 0.12);
  box-shadow: 0 28px 80px rgba(4, 8, 9, 0.55);
  animation: classicWorkbenchEnter 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.classic-workbench[hidden] {
  display: none;
}

@keyframes classicWorkbenchEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.classic-workbench > header {
  position: relative;
  padding: 13px 52px 12px 18px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid rgba(248, 250, 247, 0.12);
}

.classic-workbench > header > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 12px;
}

.classic-workbench > header span,
.classic-workbench > header small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.46);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-workbench > header strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-workbench > header small {
  grid-column: 1 / -1;
}

#classic-workbench-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  color: rgba(248, 250, 247, 0.65);
  background: transparent;
  border: 1px solid rgba(248, 250, 247, 0.16);
  border-radius: 2px;
  font-size: 16px;
}

#classic-workbench-close:hover,
#classic-workbench-close:focus-visible {
  color: var(--white);
  border-color: rgba(248, 250, 247, 0.52);
}

.classic-workbench-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr) 230px;
}

.classic-queue,
.classic-audit-panel,
.classic-method {
  min-width: 0;
  min-height: 0;
}

.classic-queue {
  padding: 14px 0;
  overflow: hidden;
  border-right: 1px solid rgba(248, 250, 247, 0.1);
}

.classic-queue > span,
.classic-audit-heading > span,
.classic-method > span {
  display: block;
  padding-inline: 14px;
  color: rgba(248, 250, 247, 0.42);
  font-size: 8px;
}

#classic-queue-list {
  height: calc(100% - 20px);
  margin-top: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.classic-queue-item {
  width: 100%;
  min-height: 48px;
  padding: 7px 11px 7px 13px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 7px;
  color: rgba(248, 250, 247, 0.72);
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  text-align: left;
}

.classic-queue-item:hover,
.classic-queue-item:focus-visible,
.classic-queue-item.active {
  color: var(--white);
  background: rgba(248, 250, 247, 0.055);
  border-left-color: var(--accent);
}

.classic-queue-item > span {
  color: var(--accent);
  font-size: 7px;
}

.classic-queue-item > b {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-queue-item > small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: rgba(248, 250, 247, 0.38);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-audit-panel {
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr);
}

.classic-audit-heading {
  padding: 12px 16px;
  display: grid;
  align-content: center;
  border-bottom: 1px solid rgba(248, 250, 247, 0.1);
}

.classic-audit-heading > span {
  padding: 0;
}

.classic-audit-heading > strong {
  margin-block: 2px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 19px;
}

.classic-audit-heading > small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.46);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-audit-list {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.classic-audit-item {
  padding: 13px 16px 15px;
  border-top: 1px solid rgba(248, 250, 247, 0.08);
}

.classic-audit-item:first-child {
  border-top: 0;
}

.classic-audit-item > header {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
}

.classic-audit-item > header > span {
  color: rgba(248, 250, 247, 0.32);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
}

.classic-audit-item > header > strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-audit-item > header > i {
  color: rgba(248, 250, 247, 0.48);
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.classic-audit-item[data-status="ambiguous"] > header > i,
.classic-audit-item[data-status="missing"] > header > i {
  color: var(--accent);
}

.classic-audit-evidence {
  min-width: 0;
  margin: 7px 0 8px 36px;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.classic-audit-evidence small,
.classic-audit-evidence span {
  flex: 0 0 auto;
  color: rgba(248, 250, 247, 0.36);
  font-size: 7px;
}

.classic-audit-evidence span {
  padding: 2px 5px;
  border: 1px solid rgba(248, 250, 247, 0.1);
}

.classic-candidates {
  margin-left: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
}

.classic-candidate {
  min-width: 0;
  height: 108px;
  padding: 7px 8px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 3px;
  color: rgba(248, 250, 247, 0.72);
  background: rgba(248, 250, 247, 0.025);
  border: 0;
  border-left: 1px solid rgba(248, 250, 247, 0.16);
  border-radius: 0;
  text-align: left;
}

.classic-candidate:hover,
.classic-candidate:focus-visible {
  color: var(--white);
  background: rgba(248, 250, 247, 0.07);
  border-left-color: var(--white);
}

.classic-candidate > span {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 7px;
}

.classic-candidate > span b {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-candidate > span strong {
  color: rgba(248, 250, 247, 0.72);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
}

.classic-candidate > small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.36);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classic-candidate > p {
  min-height: 0;
  margin: 2px 0;
  display: -webkit-box;
  overflow: hidden;
  color: rgba(248, 250, 247, 0.56);
  font-family: "Songti SC", "STSong", serif;
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.classic-score-components {
  min-width: 0;
  display: flex;
  gap: 4px;
  overflow: hidden;
}

.classic-score-components i {
  flex: 0 0 auto;
  color: rgba(248, 250, 247, 0.34);
  font-size: 6px;
  font-style: normal;
}

.classic-audit-empty {
  min-height: 42px;
  margin: 0;
  padding: 10px;
  color: rgba(248, 250, 247, 0.34);
  border-left: 1px solid rgba(248, 250, 247, 0.1);
  font-size: 8px;
}

.classic-method {
  padding: 16px 15px;
  overflow-y: auto;
  border-left: 1px solid rgba(248, 250, 247, 0.1);
}

.classic-method > span {
  padding: 0;
}

.classic-method > strong {
  display: block;
  margin-block: 7px 10px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
}

.classic-method-meter {
  height: 2px;
  overflow: hidden;
  background: rgba(248, 250, 247, 0.08);
}

.classic-method-meter span {
  height: 100%;
  display: block;
  background: var(--accent);
}

.classic-method > p {
  margin: 14px 0;
  color: rgba(248, 250, 247, 0.62);
  font-family: "Songti SC", "STSong", serif;
  font-size: 10px;
  line-height: 1.75;
}

.classic-method dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(248, 250, 247, 0.1);
  border-left: 1px solid rgba(248, 250, 247, 0.1);
}

.classic-method dl div {
  padding: 8px;
  border-right: 1px solid rgba(248, 250, 247, 0.1);
  border-bottom: 1px solid rgba(248, 250, 247, 0.1);
}

.classic-method dt {
  color: rgba(248, 250, 247, 0.36);
  font-size: 7px;
}

.classic-method dd {
  margin: 3px 0 0;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 12px;
}

.classic-method > small {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  color: rgba(248, 250, 247, 0.38);
  border-top: 1px solid rgba(248, 250, 247, 0.1);
  font-size: 8px;
  line-height: 1.6;
}

.classic-open .graph-inspector,
.classic-open .graph-navigation,
.classic-open .graph-legend {
  opacity: 0;
  pointer-events: none;
}

.place-audit-workbench {
  position: absolute;
  z-index: 14;
  inset: 16px 16px 82px;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr);
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(43, 135, 132, 0.05), transparent 28%),
    rgba(8, 16, 18, 0.985);
  border-top: 1px solid rgba(93, 192, 187, 0.58);
  border-bottom: 1px solid rgba(248, 250, 247, 0.12);
  box-shadow: 0 28px 80px rgba(4, 8, 9, 0.62);
  animation: placeAuditWorkbenchEnter 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.place-audit-workbench[hidden] {
  display: none;
}

@keyframes placeAuditWorkbenchEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.place-audit-workbench > header {
  position: relative;
  padding: 13px 52px 12px 18px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid rgba(93, 192, 187, 0.18);
}

.place-audit-workbench > header > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 12px;
}

.place-audit-workbench > header span,
.place-audit-workbench > header small {
  overflow: hidden;
  color: rgba(146, 207, 202, 0.54);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-audit-workbench > header strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-audit-workbench > header small {
  grid-column: 1 / -1;
}

#place-audit-workbench-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  color: rgba(248, 250, 247, 0.65);
  background: transparent;
  border: 1px solid rgba(93, 192, 187, 0.3);
  border-radius: 2px;
  font-size: 16px;
}

#place-audit-workbench-close:hover,
#place-audit-workbench-close:focus-visible {
  color: var(--white);
  border-color: rgba(93, 192, 187, 0.8);
}

.place-audit-workbench-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr) 230px;
}

.place-audit-queue,
.place-audit-relation-panel,
.place-audit-method {
  min-width: 0;
  min-height: 0;
}

.place-audit-queue {
  padding: 14px 0;
  overflow: hidden;
  border-right: 1px solid rgba(93, 192, 187, 0.14);
}

.place-audit-queue > span,
.place-audit-heading > span,
.place-audit-method > span {
  display: block;
  padding-inline: 14px;
  color: rgba(146, 207, 202, 0.52);
  font-size: 8px;
}

#place-audit-queue-list {
  height: calc(100% - 20px);
  margin-top: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.place-audit-queue-item {
  width: 100%;
  min-height: 50px;
  padding: 7px 11px 7px 13px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 7px;
  color: rgba(248, 250, 247, 0.72);
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  text-align: left;
}

.place-audit-queue-item:hover,
.place-audit-queue-item:focus-visible,
.place-audit-queue-item.active {
  color: var(--white);
  background: rgba(93, 192, 187, 0.065);
  border-left-color: #5dc0bb;
}

.place-audit-queue-item > span {
  color: #78cec8;
  font-size: 7px;
}

.place-audit-queue-item > b {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-audit-queue-item > small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: rgba(248, 250, 247, 0.38);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-audit-relation-panel {
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr);
}

.place-audit-heading {
  padding: 12px 16px;
  display: grid;
  align-content: center;
  border-bottom: 1px solid rgba(93, 192, 187, 0.13);
}

.place-audit-heading > span {
  padding: 0;
}

.place-audit-heading > strong {
  margin-block: 2px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 19px;
}

.place-audit-heading > small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.46);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-audit-relation-list {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.place-audit-relation {
  position: relative;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(248, 250, 247, 0.08);
}

.place-audit-relation:first-child {
  border-top: 0;
}

.place-audit-relation::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 16px;
  width: 1px;
  background: rgba(93, 192, 187, 0.42);
}

.place-audit-relation[data-status="rejected"]::before {
  background: var(--accent);
}

.place-audit-relation > header {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 9px;
}

.place-audit-relation > header span {
  color: #78cec8;
  font-size: 7px;
}

.place-audit-relation[data-status="rejected"] > header span,
.place-audit-relation[data-status="rejected"] > header i {
  color: var(--accent);
}

.place-audit-relation > header strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-audit-relation > header i {
  color: rgba(248, 250, 247, 0.46);
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.place-audit-titles {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(248, 250, 247, 0.34);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-audit-relation blockquote {
  margin: 11px 0 10px;
  padding-left: 12px;
  color: rgba(248, 250, 247, 0.84);
  border-left: 1px solid rgba(93, 192, 187, 0.32);
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  line-height: 1.7;
}

.place-audit-evidence {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.place-audit-evidence span {
  flex: 0 0 auto;
  padding: 2px 5px;
  color: rgba(248, 250, 247, 0.42);
  border: 1px solid rgba(93, 192, 187, 0.14);
  font-size: 7px;
}

.place-audit-notes {
  margin-top: 9px;
}

.place-audit-notes p {
  margin: 3px 0 0;
  color: rgba(248, 250, 247, 0.5);
  font-family: "Songti SC", "STSong", serif;
  font-size: 9px;
  line-height: 1.65;
}

.place-audit-samples {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}

.place-audit-sample {
  min-width: 0;
  height: 104px;
  padding: 8px 9px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 4px;
  color: rgba(248, 250, 247, 0.74);
  background: rgba(93, 192, 187, 0.025);
  border: 0;
  border-left: 1px solid rgba(93, 192, 187, 0.28);
  border-radius: 0;
  text-align: left;
}

.place-audit-sample:hover,
.place-audit-sample:focus-visible {
  color: var(--white);
  background: rgba(93, 192, 187, 0.09);
  border-left-color: #78cec8;
}

.place-audit-sample > span {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 7px;
}

.place-audit-sample b {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-audit-sample i {
  color: rgba(120, 206, 200, 0.66);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 8px;
  font-style: normal;
}

.place-audit-sample p {
  min-height: 0;
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: rgba(248, 250, 247, 0.55);
  font-family: "Songti SC", "STSong", serif;
  font-size: 9px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.place-audit-sample > small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.34);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-audit-method {
  padding: 16px 15px;
  overflow-y: auto;
  border-left: 1px solid rgba(93, 192, 187, 0.14);
}

.place-audit-method > span {
  padding: 0;
}

.place-audit-method > strong {
  display: block;
  margin-block: 7px 10px;
  color: #9bd7d2;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
}

.place-audit-method > p {
  margin: 0 0 14px;
  color: rgba(248, 250, 247, 0.62);
  font-family: "Songti SC", "STSong", serif;
  font-size: 10px;
  line-height: 1.75;
}

.place-audit-method dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(93, 192, 187, 0.14);
  border-left: 1px solid rgba(93, 192, 187, 0.14);
}

.place-audit-method dl div {
  padding: 8px;
  border-right: 1px solid rgba(93, 192, 187, 0.14);
  border-bottom: 1px solid rgba(93, 192, 187, 0.14);
}

.place-audit-method dt {
  color: rgba(248, 250, 247, 0.36);
  font-size: 7px;
}

.place-audit-method dd {
  margin: 3px 0 0;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 12px;
}

#place-audit-map-focus {
  width: 100%;
  height: 34px;
  margin-top: 16px;
  color: rgba(248, 250, 247, 0.78);
  background: rgba(93, 192, 187, 0.08);
  border: 1px solid rgba(93, 192, 187, 0.34);
  border-radius: 2px;
  font-size: 9px;
}

#place-audit-map-focus:hover,
#place-audit-map-focus:focus-visible {
  color: var(--white);
  background: rgba(93, 192, 187, 0.16);
  border-color: #78cec8;
}

#place-audit-map-focus span {
  margin-right: 5px;
  color: #78cec8;
}

.place-audit-method > small {
  display: block;
  margin-top: 10px;
  color: rgba(248, 250, 247, 0.36);
  font-size: 8px;
  text-align: center;
}

.place-audit-open .graph-inspector,
.place-audit-open .graph-navigation,
.place-audit-open .graph-legend {
  opacity: 0;
  pointer-events: none;
}

.identity-workbench {
  position: absolute;
  z-index: 12;
  inset: 16px 16px 82px;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr);
  overflow: hidden;
  color: var(--white);
  background: rgba(11, 17, 19, 0.98);
  border-top: 1px solid rgba(248, 250, 247, 0.3);
  border-bottom: 1px solid rgba(248, 250, 247, 0.12);
  box-shadow: 0 28px 80px rgba(4, 8, 9, 0.55);
  animation: identityWorkbenchEnter 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.identity-workbench[hidden] {
  display: none;
}

@keyframes identityWorkbenchEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.identity-workbench > header {
  position: relative;
  padding: 13px 90px 12px 18px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid rgba(248, 250, 247, 0.12);
}

.identity-workbench > header > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 12px;
}

.identity-workbench > header span,
.identity-workbench > header small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.46);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-workbench > header strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-workbench > header small {
  grid-column: 1 / -1;
}

#identity-workbench-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  color: rgba(248, 250, 247, 0.65);
  background: transparent;
  border: 1px solid rgba(248, 250, 247, 0.16);
  border-radius: 2px;
  font-size: 16px;
}

#identity-workbench-close:hover,
#identity-workbench-close:focus-visible {
  color: var(--white);
  border-color: rgba(248, 250, 247, 0.52);
}

.classic-workbench > header,
.place-audit-workbench > header {
  padding-right: 90px;
}

.review-export-button {
  position: absolute;
  top: 16px;
  right: 52px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: rgba(248, 250, 247, 0.62);
  background: transparent;
  border: 1px solid rgba(248, 250, 247, 0.16);
  border-radius: 2px;
  text-decoration: none;
}

.review-export-button > span {
  color: inherit !important;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 15px !important;
  line-height: 1;
}

.review-export-button:hover,
.review-export-button:focus-visible {
  color: var(--white);
  border-color: rgba(248, 250, 247, 0.52);
  background: rgba(248, 250, 247, 0.06);
}

.identity-workbench-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr) 220px;
}

.identity-queue,
.identity-cluster-panel,
.identity-evidence {
  min-width: 0;
  min-height: 0;
}

.identity-queue {
  padding: 14px 0;
  overflow: hidden;
  border-right: 1px solid rgba(248, 250, 247, 0.1);
}

.identity-queue > span,
.identity-cluster-heading > span,
.identity-evidence > span {
  display: block;
  padding-inline: 14px;
  color: rgba(248, 250, 247, 0.42);
  font-size: 8px;
}

#identity-queue-list {
  height: calc(100% - 20px);
  margin-top: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.identity-queue-item {
  width: 100%;
  min-height: 48px;
  padding: 7px 12px 7px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 2px 7px;
  color: rgba(248, 250, 247, 0.72);
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  text-align: left;
}

.identity-queue-item:hover,
.identity-queue-item:focus-visible,
.identity-queue-item.active {
  color: var(--white);
  background: rgba(248, 250, 247, 0.055);
  border-left-color: var(--accent);
}

.identity-queue-item > span {
  color: var(--accent);
  font-size: 7px;
}

.identity-queue-item > b {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-queue-item > small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: rgba(248, 250, 247, 0.38);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-cluster-panel {
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr);
}

.identity-cluster-heading {
  padding: 12px 16px;
  display: grid;
  align-content: center;
  border-bottom: 1px solid rgba(248, 250, 247, 0.1);
}

.identity-cluster-heading > span {
  padding: 0;
}

.identity-cluster-heading > strong {
  margin-block: 2px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 19px;
}

.identity-cluster-heading > small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.46);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-cluster-list {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.identity-cluster {
  padding: 13px 16px 14px;
  border-top: 1px solid rgba(248, 250, 247, 0.08);
}

.identity-cluster:first-child {
  border-top: 0;
}

.identity-cluster > header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.identity-cluster > header > span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.identity-cluster > header b {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-cluster > header small {
  color: rgba(248, 250, 247, 0.46);
  font-size: 8px;
}

.identity-cluster > header i {
  color: rgba(248, 250, 247, 0.55);
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.identity-cluster[data-risk="source_dynasty_conflict"] > header i,
.identity-cluster[data-risk="pending_mapping"] > header i {
  color: var(--accent);
}

.identity-cluster > header strong {
  color: rgba(248, 250, 247, 0.75);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 10px;
}

.identity-cluster-meter {
  height: 2px;
  margin-block: 9px;
  overflow: hidden;
  background: rgba(248, 250, 247, 0.08);
}

.identity-cluster-meter span {
  width: var(--cluster-share);
  height: 100%;
  display: block;
  background: rgba(248, 250, 247, 0.42);
}

.identity-cluster[data-risk="source_dynasty_conflict"] .identity-cluster-meter span,
.identity-cluster[data-risk="pending_mapping"] .identity-cluster-meter span {
  background: var(--accent);
}

.identity-cluster-sources {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.identity-cluster-sources span {
  flex: 0 0 auto;
  padding: 2px 5px;
  color: rgba(248, 250, 247, 0.42);
  border: 1px solid rgba(248, 250, 247, 0.1);
  font-size: 7px;
}

.identity-cluster-samples {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.identity-cluster-samples button {
  min-width: 0;
  height: 38px;
  padding: 5px 7px;
  display: grid;
  color: rgba(248, 250, 247, 0.72);
  background: rgba(248, 250, 247, 0.025);
  border: 0;
  border-left: 1px solid rgba(248, 250, 247, 0.16);
  border-radius: 0;
  text-align: left;
}

.identity-cluster-samples button:hover,
.identity-cluster-samples button:focus-visible {
  color: var(--white);
  background: rgba(248, 250, 247, 0.07);
  border-left-color: var(--white);
}

.identity-cluster-samples b,
.identity-cluster-samples small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-cluster-samples b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
}

.identity-cluster-samples small {
  color: rgba(248, 250, 247, 0.36);
  font-size: 7px;
}

.identity-evidence {
  padding: 16px 15px;
  overflow-y: auto;
  border-left: 1px solid rgba(248, 250, 247, 0.1);
}

.identity-evidence > span {
  padding: 0;
}

.identity-evidence > strong {
  display: block;
  margin-block: 7px 15px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
}

.identity-evidence > p {
  margin: 0;
  color: rgba(248, 250, 247, 0.65);
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  line-height: 1.75;
}

.identity-evidence > small {
  display: block;
  margin-top: 16px;
  padding-top: 12px;
  color: rgba(248, 250, 247, 0.4);
  border-top: 1px solid rgba(248, 250, 247, 0.1);
  font-size: 8px;
  line-height: 1.6;
}

.identity-open .graph-inspector,
.identity-open .graph-navigation,
.identity-open .graph-legend {
  opacity: 0;
  pointer-events: none;
}

.graph-inspector-entity {
  min-width: 0;
  display: grid;
}

.graph-inspector-entity > span,
#graph-probe-count {
  color: rgba(248, 250, 247, 0.48);
  font-size: 8px;
}

.graph-inspector-entity > strong {
  min-width: 0;
  margin-block: 2px;
  overflow: hidden;
  color: var(--white);
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-inspector-entity > small {
  min-width: 0;
  overflow: hidden;
  color: rgba(248, 250, 247, 0.52);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-relation-probe {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.graph-relation-list {
  min-width: 0;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.graph-relation-list::-webkit-scrollbar {
  display: none;
}

.graph-relation-link {
  flex: 0 0 auto;
  min-width: 104px;
  max-width: 152px;
  height: 32px;
  padding: 3px 8px 3px 6px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  color: var(--white);
  background: rgba(248, 250, 247, 0.035);
  border: 0;
  border-left: 1px solid rgba(248, 250, 247, 0.18);
  border-radius: 0;
  text-align: left;
}

.graph-relation-link:hover,
.graph-relation-link:focus-visible {
  background: rgba(248, 250, 247, 0.09);
  border-left-color: var(--white);
}

.graph-relation-direction {
  color: var(--accent);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 12px;
}

.graph-relation-link > span:last-child {
  min-width: 0;
  display: grid;
}

.graph-relation-link small {
  overflow: hidden;
  color: rgba(248, 250, 247, 0.42);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-relation-link b {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-relation-empty {
  color: rgba(248, 250, 247, 0.38);
  font-size: 9px;
}

.graph-inspector-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.graph-inspector-actions button {
  height: 30px;
  padding: 0 8px;
  color: rgba(248, 250, 247, 0.72);
  background: transparent;
  border: 1px solid rgba(248, 250, 247, 0.16);
  border-radius: 2px;
  font-size: 9px;
  white-space: nowrap;
}

.graph-inspector-actions button:hover,
.graph-inspector-actions button:focus-visible {
  color: var(--white);
  border-color: rgba(248, 250, 247, 0.5);
  background: rgba(248, 250, 247, 0.08);
}

#graph-inspector-action b {
  margin-left: 3px;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 11px;
}

#graph-compare-action {
  width: 30px;
  padding: 0;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 14px;
}

#graph-identity-action,
#graph-classic-action,
#graph-place-audit-action {
  width: 30px;
  padding: 0;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 14px;
}

#graph-center-reset {
  width: 30px;
  padding: 0;
  font-size: 14px;
}

.graph-legend {
  position: absolute;
  z-index: 8;
  right: 24px;
  bottom: 88px;
  display: flex;
  gap: 12px;
  color: rgba(248, 250, 247, 0.45);
  font-size: 8px;
}

.graph-legend span::before {
  content: "";
  width: 17px;
  height: 1px;
  display: inline-block;
  margin-right: 5px;
  border-top: 1px solid rgba(248, 250, 247, 0.52);
  transform: translateY(-2px);
}

.graph-legend span {
  transition: opacity 180ms ease, color 180ms ease;
}

.graph-legend span.is-active {
  color: var(--white);
}

.graph-legend span.is-dimmed {
  opacity: 0.2;
}

.graph-legend [data-family="place"]::before {
  border-top-color: #5dc0bb;
  border-top-style: dashed;
}

.graph-legend [data-family="evidence"]::before {
  border-top: 2px solid #71dcd6;
}

.graph-legend [data-family="time"]::before {
  border-top-color: #94a7a4;
  border-top-style: dotted;
}

.graph-legend [data-family="form"]::before {
  border-top-color: #b8c4bc;
  border-top-style: dashed;
}

.graph-legend [data-family="source"]::before {
  border-top-color: #68d2cd;
  border-top-style: dashed;
  box-shadow: 0 0 6px rgba(104, 210, 205, 0.32);
}

.graph-legend [data-family="peer"]::before {
  border-top-color: rgba(248, 250, 247, 0.78);
  border-top-style: dashed;
}

dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 38px 46px 44px;
  color: var(--ink);
  background: var(--panel);
  border: 0;
  border-radius: 3px;
  box-shadow: 0 28px 80px rgba(5, 10, 12, 0.4);
}

dialog::backdrop {
  background: rgba(9, 14, 16, 0.72);
  backdrop-filter: blur(5px);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.dialog-kicker {
  color: var(--accent);
  font-size: 10px;
}

dialog h2 {
  margin: 8px 0 4px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 32px;
}

.dialog-author {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 11px;
}

.dialog-poem {
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
  line-height: 2.1;
  white-space: pre-line;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 190px auto 1fr;
  }

  .exhibit-tools {
    display: none;
  }

  .workspace,
  .timeline-bar {
    grid-template-columns: 152px minmax(420px, 1fr) 320px;
  }

  .filter-rail {
    padding-inline: 12px;
  }
}

@media (max-width: 900px) {
  :root {
    --topbar-height: 60px;
    --timeline-height: 74px;
  }

  .topbar {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding-inline: 12px;
  }

  .brand-copy small,
  .view-switcher {
    display: none;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .filter-rail {
    display: none;
  }

  .knowledge-panel {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: 52%;
    padding: 14px 16px 18px;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 18px 60px rgba(10, 16, 18, 0.35);
  }

  .knowledge-panel.collapsed {
    transform: translateY(calc(100% + 20px));
  }

  .person-heading {
    margin: 8px 0 12px;
  }

  .person-heading h1 {
    font-size: 30px;
  }

  .portrait {
    width: 58px;
    justify-self: end;
  }

  blockquote,
  .context-list {
    display: none;
  }

  .timeline-bar {
    grid-template-columns: 1fr;
  }

  .timeline-copy,
  .timeline-stats {
    display: none;
  }

  .timeline-scroll {
    grid-template-columns: repeat(8, minmax(70px, 1fr));
  }

  .map-meta {
    display: none;
  }

  .scene-status {
    left: 10px;
    top: 10px;
    min-width: 112px;
    padding: 7px 8px;
  }

  .presence-cursor {
    display: none;
  }

  .graph-comparison {
    left: 16px;
    right: 16px;
  }
}

@media (max-width: 560px) {
  .brand-copy strong {
    font-size: 16px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .search-wrap input {
    height: 36px;
    font-size: 12px;
  }

  .map-image {
    width: 135%;
    max-width: none;
    object-position: 55% 50%;
    transform: translateX(-13%);
  }

  .map-marker {
    margin-left: -7%;
  }

  .small-marker {
    display: none;
  }

  .knowledge-panel {
    max-height: 52%;
  }

  .place-dossier-heading {
    grid-template-columns: minmax(0, 1fr) 58px;
    margin-block: 8px 12px;
  }

  .place-dossier-heading h1 {
    font-size: 30px;
  }

  .place-dossier-actions {
    position: sticky;
    bottom: -18px;
    padding-block: 12px 18px;
    background: var(--panel);
  }

  .person-stats {
    padding-block: 10px;
  }

  .panel-tabs {
    margin-top: 10px;
  }

  .featured-poem > p {
    font-size: 12px;
    line-height: 1.7;
  }

  .graph-comparison {
    left: 8px;
    right: 8px;
    bottom: 72px;
    height: min(286px, calc(100% - 132px));
    grid-template-columns: 1fr;
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .graph-comparison > header {
    padding: 9px 46px 9px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(248, 250, 247, 0.12);
  }

  .graph-comparison > header > div {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 2px 8px;
  }

  .graph-comparison > header strong {
    font-size: 15px;
  }

  .graph-comparison > header small {
    grid-column: 1 / -1;
  }

  .graph-comparison-work {
    padding: 11px 10px;
    gap: 4px;
  }

  .graph-comparison-work > strong {
    font-size: 17px;
  }

  .graph-comparison-work > p {
    font-size: 11px;
    line-height: 1.55;
    -webkit-line-clamp: 5;
  }

  .classic-workbench {
    inset: 8px 8px 72px;
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .classic-workbench > header {
    padding: 9px 84px 8px 12px;
  }

  .classic-workbench > header > div {
    gap: 1px 8px;
  }

  .classic-workbench > header strong {
    font-size: 16px;
  }

  #classic-workbench-close {
    top: 14px;
    right: 12px;
  }

  .classic-workbench-layout {
    display: block;
    overflow-y: auto;
  }

  .classic-queue {
    height: 78px;
    padding: 8px 0 7px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(248, 250, 247, 0.1);
  }

  .classic-queue > span {
    padding-inline: 10px;
  }

  #classic-queue-list {
    height: 48px;
    margin-top: 4px;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .classic-queue-item {
    flex: 0 0 116px;
    min-height: 44px;
    padding: 5px 8px;
    border-top: 2px solid transparent;
    border-left: 0;
  }

  .classic-queue-item:hover,
  .classic-queue-item:focus-visible,
  .classic-queue-item.active {
    border-top-color: var(--accent);
    border-left-color: transparent;
  }

  .classic-audit-panel {
    display: block;
  }

  .classic-audit-heading {
    min-height: 62px;
    padding: 10px 12px;
  }

  .classic-audit-list {
    overflow: visible;
  }

  .classic-audit-item {
    padding: 11px 12px 13px;
  }

  .classic-audit-item > header {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .classic-audit-item > header > i {
    grid-column: 2;
  }

  .classic-audit-evidence,
  .classic-candidates {
    margin-left: 32px;
  }

  .classic-candidates {
    grid-template-columns: 1fr;
  }

  .classic-candidate {
    height: 104px;
  }

  .classic-method {
    padding: 14px 12px 20px;
    border-top: 1px solid rgba(248, 250, 247, 0.1);
    border-left: 0;
  }

  .place-audit-workbench {
    inset: 8px 8px 72px;
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .place-audit-workbench > header {
    padding: 9px 84px 8px 12px;
  }

  .place-audit-workbench > header > div {
    gap: 1px 8px;
  }

  .place-audit-workbench > header strong {
    font-size: 16px;
  }

  #place-audit-workbench-close {
    top: 14px;
    right: 12px;
  }

  .place-audit-workbench-layout {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .place-audit-queue {
    height: 78px;
    padding: 8px 0 7px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(93, 192, 187, 0.14);
  }

  .place-audit-queue > span {
    padding-inline: 10px;
  }

  #place-audit-queue-list {
    height: 48px;
    margin-top: 4px;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .place-audit-queue-item {
    flex: 0 0 116px;
    min-height: 44px;
    padding: 5px 8px;
    border-top: 2px solid transparent;
    border-left: 0;
  }

  .place-audit-queue-item:hover,
  .place-audit-queue-item:focus-visible,
  .place-audit-queue-item.active {
    border-top-color: #5dc0bb;
    border-left-color: transparent;
  }

  .place-audit-relation-panel {
    display: block;
  }

  .place-audit-heading {
    min-height: 62px;
    padding: 10px 12px;
  }

  .place-audit-relation-list {
    overflow: visible;
  }

  .place-audit-relation {
    padding: 12px 12px 14px;
  }

  .place-audit-relation > header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .place-audit-relation > header i {
    grid-column: 2;
  }

  .place-audit-relation blockquote {
    display: block;
    margin-top: 9px;
    font-size: 12px;
  }

  .place-audit-samples {
    grid-template-columns: 1fr;
  }

  .place-audit-sample {
    height: 100px;
  }

  .place-audit-method {
    padding: 14px 12px 20px;
    border-top: 1px solid rgba(93, 192, 187, 0.14);
    border-left: 0;
  }

  .identity-workbench {
    inset: 8px 8px 72px;
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .identity-workbench > header {
    padding: 9px 84px 8px 12px;
  }

  .identity-workbench > header > div {
    gap: 1px 8px;
  }

  .identity-workbench > header strong {
    font-size: 16px;
  }

  #identity-workbench-close {
    top: 14px;
    right: 12px;
  }

  .review-export-button {
    top: 14px;
    right: 48px;
  }

  .identity-workbench-layout {
    display: block;
    overflow-y: auto;
  }

  .identity-queue {
    height: 78px;
    padding: 8px 0 7px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(248, 250, 247, 0.1);
  }

  .identity-queue > span {
    padding-inline: 10px;
  }

  #identity-queue-list {
    height: 48px;
    margin-top: 4px;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .identity-queue-item {
    flex: 0 0 116px;
    min-height: 44px;
    padding: 5px 8px;
    border-left: 0;
    border-top: 2px solid transparent;
  }

  .identity-queue-item:hover,
  .identity-queue-item:focus-visible,
  .identity-queue-item.active {
    border-top-color: var(--accent);
    border-left-color: transparent;
  }

  .identity-cluster-panel {
    display: block;
  }

  .identity-cluster-heading {
    min-height: 62px;
    padding: 10px 12px;
  }

  .identity-cluster-list {
    overflow: visible;
  }

  .identity-cluster {
    padding: 11px 12px 12px;
  }

  .identity-cluster > header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .identity-cluster > header i {
    grid-column: 1;
    grid-row: 2;
  }

  .identity-cluster > header strong {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .identity-cluster-samples {
    grid-template-columns: 1fr;
  }

  .identity-evidence {
    padding: 14px 12px 20px;
    border-top: 1px solid rgba(248, 250, 247, 0.1);
    border-left: 0;
  }

  .zoom-control {
    right: 10px;
    bottom: 10px;
  }

  dialog {
    padding: 34px 24px 30px;
  }
}

@media (max-width: 900px) {
  .workspace:not(.graph-active) .filter-rail {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(236px, calc(100% - 48px));
    display: block;
    padding-bottom: 18px;
    visibility: hidden;
    box-shadow: 24px 0 64px rgba(0, 0, 0, 0.46);
    pointer-events: none;
    transform: translateX(-104%);
    transition:
      transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 240ms step-end;
  }

  .workspace.map-filter-open:not(.graph-active) .filter-rail {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition:
      transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0ms step-start;
  }

  .map-rail-close {
    display: grid;
    place-items: center;
  }

  .map-filter-toggle {
    position: absolute;
    z-index: 10;
    top: 52px;
    left: 10px;
    min-width: 44px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0 8px;
    color: rgba(248, 250, 247, 0.72);
    background: rgba(17, 23, 25, 0.88);
    border: 1px solid rgba(248, 250, 247, 0.16);
    cursor: pointer;
    font-size: 10px;
  }

  .workspace.graph-active .map-filter-toggle {
    display: none;
  }

  .graph-navigation {
    top: 56px;
    right: 16px;
  }

  .workspace.graph-active .filter-rail {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 70;
    width: min(236px, calc(100% - 48px));
    display: block;
    padding-bottom: 24px;
    visibility: hidden;
    box-shadow: 24px 0 64px rgba(0, 0, 0, 0.46);
    pointer-events: none;
    transform: translateX(-104%);
    transition:
      transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 240ms step-end;
  }

  .workspace.graph-active.graph-spectrum-open .filter-rail {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition:
      transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0ms step-start;
  }

  .graph-rail-close {
    display: grid;
    place-items: center;
  }

  .graph-rail-center strong {
    max-width: 158px;
  }

  .graph-spectrum-toggle {
    position: absolute;
    z-index: 10;
    top: 64px;
    left: 16px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    color: rgba(248, 250, 247, 0.64);
    background: rgba(17, 23, 25, 0.88);
    border: 1px solid rgba(248, 250, 247, 0.16);
    cursor: pointer;
    font-family: ui-monospace, "SFMono-Regular", monospace;
    font-size: 16px;
  }

  .graph-spectrum-toggle:hover,
  .graph-spectrum-toggle:focus-visible,
  .graph-spectrum-toggle[aria-expanded="true"] {
    color: var(--white);
    border-color: rgba(113, 220, 214, 0.62);
  }
}

@media (max-width: 560px) {
  .graph-navigation {
    top: 106px;
    right: 12px;
    grid-template-columns: 28px 44px 28px 44px 44px;
  }

  .graph-navigation-label {
    display: none;
  }

  .graph-spectrum-toggle {
    top: 106px;
    left: 12px;
  }

  .graph-inspector.edge-lens-open {
    min-height: 92px;
    grid-template-rows: auto;
    padding: 6px 7px 6px 9px;
  }

  .graph-evidence-lens {
    min-height: 78px;
    grid-template-columns: minmax(78px, 96px) minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 5px 7px;
  }

  .graph-evidence-identity {
    grid-column: 1;
    grid-row: 1;
  }

  .graph-evidence-relation {
    grid-column: 2;
    grid-row: 1;
  }

  .graph-evidence-proof {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    padding-top: 4px;
    border-top: 1px solid rgba(248, 250, 247, 0.1);
  }

  .graph-evidence-proof q,
  .graph-evidence-proof > small {
    font-size: 8px;
  }

  .graph-evidence-lens.has-quote .graph-evidence-proof > small {
    display: none;
  }

  .graph-evidence-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .graph-evidence-actions button {
    width: 29px;
    padding: 0;
  }

  #graph-evidence-traverse span {
    display: none;
  }

  #graph-evidence-traverse b {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .graph-camera {
    transition: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .poetry-field,
  .presence-cursor,
  .focus-bloom {
    display: none;
  }

  .workspace.graph-active .filter-rail {
    transition: none;
  }

  .graph-edge-path.is-evidence-selected {
    animation: none;
  }
}
