.bestiary-shell {
  min-height: 100vh;
  padding: 8rem 1.25rem 4rem;
}

.bestiary-header {
  max-width: 920px;
  margin: 0 auto 2rem;
  text-align: center;
}

.bestiary-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1.5rem;
  max-width: 1220px;
  margin: 0 auto;
  align-items: start;
}

.bestiary-list {
  position: sticky;
  top: 6rem;
  border: 1px solid var(--border-color);
  background: rgba(12, 10, 14, 0.82);
  padding: 1rem;
  border-radius: 8px;
}

.bestiary-list h2 {
  margin: 0 0 0.8rem;
  color: var(--accent-gold);
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.bestiary-filters {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.bestiary-filters label {
  display: grid;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.bestiary-filters input,
.bestiary-filters select {
  width: 100%;
  min-height: 2.55rem;
  border: 1px solid rgba(212, 175, 55, 0.24);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--text-primary);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.bestiary-filters input:focus,
.bestiary-filters select:focus {
  outline: 1px solid var(--accent-gold);
  border-color: var(--accent-gold);
}

.creature-list {
  display: grid;
  gap: 0.55rem;
}

.creature-button {
  width: 100%;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.75rem;
  text-align: left;
  font: inherit;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.creature-button:hover,
.creature-button.active {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.12);
  transform: translateY(-1px);
}

.creature-button strong {
  display: block;
  color: var(--accent-gold);
  font-family: var(--font-serif);
  font-size: 1.08rem;
}

.creature-button span {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.bestiary-reading {
  display: flex;
  min-height: 760px;
  margin-top: 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.bestiary-muted {
  color: var(--text-muted);
  margin: 0;
}

.bestiary-kicker {
  margin: 0 0 0.35rem;
  color: #765d43;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: center;
}

.bestiary-media {
  width: max(50%, 210px);
  max-width: 62%;
  float: left;
  margin: 0.15rem 1rem 0.65rem 0;
  border: 1px solid rgba(74, 55, 40, 0.32);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  padding: 0.45rem;
  transform: rotate(-1deg);
  box-shadow: 0 8px 18px rgba(70, 45, 20, 0.18);
}

.bestiary-media img,
.bestiary-media video,
.bestiary-media iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(74, 55, 40, 0.2);
  background: #d8c497;
}

.bestiary-media iframe {
  min-height: 220px;
}

.bestiary-media figcaption {
  margin-top: 0.4rem;
  color: #705b45;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.25;
  text-align: center;
}

.bestiary-media-empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #705b45;
  text-align: center;
}

.bestiary-media-empty div {
  width: 100%;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(74, 55, 40, 0.35);
  background: repeating-linear-gradient(
    -45deg,
    rgba(74, 55, 40, 0.08),
    rgba(74, 55, 40, 0.08) 8px,
    rgba(255, 255, 255, 0.08) 8px,
    rgba(255, 255, 255, 0.08) 16px
  );
  font-family: var(--font-serif);
  font-style: italic;
}

.bestiary-report::after {
  content: '';
  display: block;
  clear: both;
}

.bestiary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.bestiary-stat {
  border: 1px solid rgba(74, 55, 40, 0.25);
  border-radius: 6px;
  padding: 0.5rem;
  color: #4a3728;
  background: rgba(255, 255, 255, 0.18);
}

.bestiary-stat span {
  display: block;
  color: #765d43;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.bestiary-entry {
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(139, 69, 19, 0.22);
  text-align: left;
}

.bestiary-entry strong {
  color: #4a3728;
  font-size: 1.05rem;
}

.bestiary-entry small {
  display: block;
  margin: 0.1rem 0 0.25rem;
  color: #705b45;
}

.bestiary-entry p {
  margin: 0.25rem 0 0;
  color: #3d3d3d;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .bestiary-layout {
    grid-template-columns: 1fr;
  }

  .bestiary-list {
    position: static;
  }

  .bestiary-reading {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .bestiary-media {
    width: 100%;
    max-width: 100%;
    float: none;
    margin: 0 0 1rem;
    transform: none;
  }
}
