:root {
  --nb-card: var(--panel-bg);
  --nb-border: var(--panel-border);
}

.nexus-bestiary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.75rem;
}

.nexus-bestiary__card {
  background: var(--nb-card);
  border: 1px solid var(--nb-border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  cursor: pointer;
}

.nexus-bestiary__card:hover {
  border-color: var(--link-color);
}

.nexus-bestiary__img {
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--panel-border);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.nexus-bestiary__card .nexus-bestiary__img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.nexus-bestiary__img--modal {
  width: 96px;
  height: 96px;
  border-width: 2px;
  border-radius: 0.85rem;
}

.nexus-bestiary__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.nexus-bestiary__detailGrid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.9rem;
  align-items: start;
}

.nexus-bestiary__detailTitle {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--heading-color);
}

.nexus-bestiary__detailSub {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.nexus-bestiary__kvTable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.18);
}

.nexus-bestiary__kvTable th,
.nexus-bestiary__kvTable td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
  font-size: 0.9rem;
}

.nexus-bestiary__kvTable tr:last-child th,
.nexus-bestiary__kvTable tr:last-child td {
  border-bottom: none;
}

.nexus-bestiary__kvTable th {
  width: 42%;
  color: var(--text-muted);
  font-weight: 700;
}

.nexus-bestiary__sectionTitle {
  margin: 0.9rem 0 0.35rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--heading-accent);
}

.nexus-bestiary__name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--heading-color);
}

.nexus-bestiary__meta {
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.nexus-bestiary__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(13, 202, 240, 0.10);
  border: 1px solid rgba(13, 202, 240, 0.18);
  color: #e9faff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
}
