.bestiary-index { display: grid; gap: var(--app-space); }
.bestiary-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--app-space-sm);
  align-items: end;
  padding: var(--app-space);
  border: 1px solid var(--app-color-border);
  border-radius: var(--app-radius, 0.5rem);
  background: var(--app-color-bg-raised);
}
.bestiary-filters .field { display: flex; flex-direction: column; gap: var(--app-space-2xs); }
.bestiary-filters label { font-size: 0.85rem; font-weight: 600; color: var(--app-color-fg-muted); }
.bestiary-filters input,
.bestiary-filters select {
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--app-color-fg);
  background: var(--app-color-bg);
  border: 1px solid var(--app-color-border);
  border-radius: var(--app-radius, 0.5rem);
  min-width: 12rem;
}
.bestiary-filters .actions { display: flex; gap: var(--app-space-2xs); }
.bestiary-filters .btn {
  padding: 0.45rem 1rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--app-radius, 0.5rem);
  cursor: pointer;
  border: 1px solid var(--app-color-border);
  background: var(--app-color-accent);
  color: var(--app-color-accent-on);
}
.bestiary-filters .btn.btn-secondary {
  background: var(--app-color-bg);
  color: var(--app-color-fg);
}

/* Name cell: small uniform thumbnail (cover or initial placeholder) beside
   the linked creature name. Covers are shown whole (object-fit: contain) on a
   white mat so off-aspect plates aren't clipped. */
.bestiary-name { display: inline-flex; align-items: center; gap: var(--app-space-sm); color: var(--app-color-fg); text-decoration: none; font-weight: 600; }
.bestiary-name:hover .bestiary-name-text { text-decoration: underline; }
.bestiary-thumb {
  flex: none; width: 44px; height: 44px; border-radius: var(--app-radius, 0.5rem);
  object-fit: contain; object-position: center; background: #fff;
}
.bestiary-thumb.is-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; line-height: 1;
  color: var(--app-color-fg-muted);
  background: color-mix(in srgb, var(--app-color-accent) 8%, var(--app-color-bg));
}
.chip {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--app-color-border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--app-color-fg-muted);
  background: var(--app-color-bg);
}
.chip.system { background: color-mix(in srgb, var(--app-color-accent) 12%, transparent); color: var(--app-color-fg); }

.bestiary-empty { padding: var(--app-space-lg); text-align: center; color: var(--app-color-fg-muted); }

.bestiary-alpha { display: flex; flex-wrap: wrap; gap: var(--app-space-2xs); align-items: center; }
.bestiary-alpha .alpha {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.9rem; padding: 0.25rem 0.5rem;
  border: 1px solid var(--app-color-border); border-radius: var(--app-radius, 0.5rem);
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  color: var(--app-color-fg); background: var(--app-color-bg-raised);
}
.bestiary-alpha a.alpha:hover { border-color: var(--app-color-accent); }
.bestiary-alpha .alpha.active {
  background: var(--app-color-accent); color: var(--app-color-accent-on);
  border-color: var(--app-color-accent);
}
.bestiary-alpha .alpha.disabled { opacity: 0.35; background: transparent; color: var(--app-color-fg-muted); }
