.relations-entry-visual {
  background: #06101e;
}

.relations-entry-visual .relations-nebula-backdrop {
  opacity: .88;
  transform: scale(1.06) translate3d(-1%, 0, 0);
  animation: relations-nebula-drift 22s ease-in-out infinite alternate;
}

.relations-entry-visual::after {
  background: linear-gradient(180deg, #061221d6 0%, #0715221c 24%, #07152124 55%, #061221f5 91%);
}

.relations-nebula-particles {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.relations-preview-top,
.relations-preview-bottom {
  z-index: 3;
}

.relations-nebula-names {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.relations-star {
  position: absolute;
  top: var(--y);
  left: var(--x);
  display: grid;
  grid-template-columns: 1.2rem auto;
  column-gap: .5rem;
  align-items: center;
  min-width: 6.2rem;
  max-width: 8.8rem;
  min-height: 3rem;
  padding: .45rem .7rem;
  border: 1px solid #a9dcf484;
  border-radius: .8rem;
  background: #071725db;
  box-shadow: 0 4px 24px #061522b8, 0 0 19px #52bddb33;
  color: #f6fbff;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
}

.relations-star:nth-child(3n + 2) {
  border-color: #f1c68c8c;
  box-shadow: 0 4px 24px #061522b8, 0 0 19px #ffbb6738;
}

.relations-star:hover,
.relations-star:focus-visible {
  z-index: 4;
  border-color: #fff;
  background: #122b40f5;
  box-shadow: 0 8px 30px #061522d9, 0 0 24px #8cdcf5a8;
}

.relations-star:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.relations-star[aria-busy="true"] {
  cursor: progress;
}

.relations-star-glow {
  grid-row: 1 / 3;
  display: block;
  width: .78rem;
  height: .78rem;
  border: 2px solid #d6f6ff;
  border-radius: 50%;
  background: #75d9ef;
  box-shadow: 0 0 0 4px #6ed5e53b, 0 0 18px 5px #6ed5e5a8;
}

.relations-star:nth-child(3n + 2) .relations-star-glow {
  border-color: #fff0ca;
  background: #ffd28a;
  box-shadow: 0 0 0 4px #ffd28a3b, 0 0 18px 5px #ffd28aa8;
}

.relations-star-name,
.relations-star small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relations-star-name {
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.2;
}

.relations-star small {
  grid-column: 2;
  color: #b9d8e5;
  font-size: .66rem;
  line-height: 1.2;
}

.relations-nebula-status {
  position: absolute;
  z-index: 3;
  top: 4.5rem;
  left: 1.4rem;
  max-width: calc(100% - 2.8rem);
  margin: 0;
  padding: .38rem .65rem;
  border-radius: .5rem;
  background: #061725c2;
  color: #d3e5ee;
  font-size: .76rem;
  line-height: 1.4;
}

.relations-nebula-status.ready {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.relations-preview-bottom > strong { text-shadow: 0 2px 18px #061522; }
.relations-preview-bottom small { max-width: 32rem; line-height: 1.45; }

@keyframes relations-nebula-drift {
  to { transform: scale(1.13) translate3d(1%, -1%, 0); }
}

@media (max-width: 600px) {
  .relations-entry-visual { min-height: 420px; }
  .relations-nebula-status { top: 3.8rem; left: 1rem; max-width: calc(100% - 2rem); }
  .relations-star { width: 7.7rem; min-width: 0; max-width: none; padding: .4rem .55rem; }
  .relations-star:nth-child(1) { left: 28%; top: 21%; }
  .relations-star:nth-child(2) { left: 72%; top: 22%; }
  .relations-star:nth-child(3) { left: 28%; top: 35%; }
  .relations-star:nth-child(4) { left: 72%; top: 37%; }
  .relations-star:nth-child(5) { left: 28%; top: 51%; }
  .relations-star:nth-child(6) { left: 72%; top: 53%; }
  .relations-star:nth-child(n + 7) { display: none; }
  .relations-preview-bottom { padding-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .relations-entry-visual .relations-nebula-backdrop,
  .relations-star { animation: none; }
}
