.atlas {
  position: absolute;
  inset: 0;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background: #191721;
}

.atlas:focus-visible {
  outline: 1px solid #b7a0fb;
  outline-offset: -2px;
}

.atlas--dragging {
  cursor: grabbing;
}

.atlas-3d__canvas,
.atlas-3d__labels { position: absolute; inset: 0; width: 100%; height: 100%; }
.atlas-3d__labels { pointer-events: none; }
.atlas-3d__marker {
  position: absolute;
  width: var(--atlas-3d-hit-size);
  height: var(--atlas-3d-hit-size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #f3eaf1;
  background: transparent;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.atlas-3d__marker:is(:hover, :focus-visible) {
  outline: 1px solid rgb(var(--atlas-3d-tone) / .7);
  outline-offset: 3px;
}
.atlas-3d__label {
  position: absolute;
  top: calc(50% + var(--atlas-3d-radius) + 7px);
  left: 50%;
  width: max-content;
  max-width: min(180px, 28vw);
  padding: 2px 5px;
  border-radius: 4px;
  transform: translateX(-50%);
  text-align: center;
  text-shadow: 0 1px 5px #111019, 0 1px 10px #111019;
  font-size: 12px;
  line-height: 1.45;
}
.atlas-3d__marker--circle .atlas-3d__label { font-size: 14px; font-weight: 650; }
.atlas-3d__marker--entry .atlas-3d__label { top: calc(50% + 5px); left: calc(50% + 7px); transform: none; text-align: left; }
.atlas-3d__count { display: block; color: rgb(var(--atlas-3d-tone)); font-size: 10px; font-weight: 550; }
.atlas-3d__marker--quiet:not(:hover, :focus-visible) .atlas-3d__label { visibility: hidden; }
.atlas-3d__marker:is(:hover, :focus-visible) .atlas-3d__label { background: #1d1928e8; }

.atlas__network,
.atlas__canvas,
.atlas__nodes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.atlas__nodes {
  z-index: 1;
}

.atlas .atlas-node {
  position: absolute;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  outline: none;
  place-items: center;
  appearance: none;
  color: #f3eaf1;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  font: inherit;
}

.atlas .atlas-node[hidden] {
  display: none;
}

.atlas .atlas-node--circle {
  width: var(--atlas-node-size, 64px);
  height: var(--atlas-node-size, 64px);
}

.atlas .atlas-node--movable { cursor: grab; }
.atlas--moving-circle, .atlas .atlas-node--moving { cursor: grabbing; }
.atlas .atlas-node--moving { z-index: 3; }

.atlas-node::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid rgb(var(--atlas-node-color) / 52%);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.84);
  transition: opacity 160ms ease, transform 180ms ease;
}

.atlas-node--circle::before { content: none; }

.atlas-node:hover,
.atlas-node:focus-visible {
  z-index: 2;
}

.atlas-node:hover::before,
.atlas-node:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.atlas-node:focus-visible::before {
  outline: 1px solid rgb(var(--atlas-node-color) / 80%);
  outline-offset: 2px;
}

.atlas-node--arrived::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgb(var(--atlas-node-color) / 68%);
  border-radius: 50%;
  opacity: 0;
  animation: atlas-arrival 900ms ease-out;
  pointer-events: none;
}

@keyframes atlas-arrival {
  from { opacity: 0.9; transform: scale(0.2); }
  to { opacity: 0; transform: scale(1.75); }
}

.atlas--dragging .atlas-node,
.atlas .atlas-node--leaving,
.atlas .atlas-node--leaving * {
  pointer-events: none !important;
}

.atlas-node__label {
  position: absolute;
  display: grid;
  justify-items: start;
  gap: 3px;
  max-width: 170px;
  width: max-content;
  line-height: 1.25;
  text-align: left;
  color: inherit;
  pointer-events: none;
  opacity: var(--atlas-label-opacity, 1);
  text-shadow: 0 1px 4px #191721, 0 2px 6px #191721;
}

.atlas-node--circle .atlas-node__label {
  top: calc(50% + var(--atlas-label-distance));
  left: 50%;
  justify-items: center;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: auto;
}

.atlas-node--entry .atlas-node__label {
  top: 50%;
  left: calc(50% + var(--atlas-label-distance));
  transform: translateY(-50%);
  pointer-events: auto;
}

.atlas-node--entry.atlas-node--unlabeled:not(:hover, :focus-visible) .atlas-node__label {
  pointer-events: none;
}

.atlas-node:hover .atlas-node__label,
.atlas-node:focus-visible .atlas-node__label {
  opacity: 1;
  pointer-events: auto;
}

.atlas-node__title {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.atlas-node--entry .atlas-node__title {
  max-width: 158px;
  font-size: 12px;
  font-weight: 520;
  letter-spacing: -0.01em;
}

.atlas-node__count {
  color: rgb(var(--atlas-node-color) / 83%);
  font-size: 10px;
  font-weight: 510;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
}

.atlas-node__caption {
  display: block;
  opacity: var(--atlas-caption-opacity, 1);
  overflow: hidden;
  max-width: 170px;
  margin-top: 2px;
  color: #c0afc3;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 440;
}

.atlas-node__pinned {
  display: none;
  width: min(250px, 42vw);
  max-height: 158px;
  overflow: auto;
  padding: 7px 11px;
  border: 1px solid rgb(var(--atlas-node-color) / 30%);
  border-radius: 7px;
  background: #272332;
  color: #e1d4f6;
  text-align: left;
  text-shadow: none;
  font-size: 11px;
  line-height: 1.55;
  cursor: default;
}

.atlas-node__pinned > span {
  display: block;
  padding: 3px 0;
}

.atlas-node__pinned > span + span {
  border-top: 1px solid rgb(var(--atlas-node-color) / 14%);
}

.atlas-node:is(:hover, :focus-visible) .atlas-node__caption:has(+ .atlas-node__pinned) {
  display: none;
}

.atlas-node:is(:hover, :focus-visible) .atlas-node__pinned {
  display: block;
}

.atlas-node:hover .atlas-node__title,
.atlas-node:focus-visible .atlas-node__title {
  color: white;
}

.atlas-node:is(:hover, :focus-visible) .atlas-node__caption {
  opacity: 1;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .atlas-node__label,
  .atlas-node__caption {
    max-width: 104px;
  }

  .atlas-node__title {
    font-size: 12px;
  }

  .atlas-node--entry .atlas-node__title {
    max-width: 102px;
    font-size: 10px;
  }

  .atlas-node__count {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-node::before,
  .atlas-node--entry .atlas-node__label {
    transition: none;
  }

  .atlas-node--arrived::after {
    animation: none;
  }
}
