/* Isle Compendium: a warm field archive inside Antipodea's dark shell. */
body.isle-compendium-view {
  background-color: #eee9d8;
  background-image: linear-gradient(#877a4e08 1px, transparent 1px), linear-gradient(90deg, #877a4e08 1px, transparent 1px);
  background-size: 40px 40px;
}
.isle-compendium-view .preview-notice {
  background: #1b231a;
  color: #bdc7ae;
}
.compendium-page {
  --text: #2d3b23;
  --muted: #626b54;
  --line: #d0cdbd;
  --olive: #44572f;
  --sand: #af9150;
  color: var(--text);
  background: none;
  padding-bottom: 60px;
}
.compendium-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 42px 0 30px;
}
.compendium-heading h1 {
  font: 500 clamp(34px, 3.6vw, 54px)/1.1 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.compendium-heading .eyebrow {
  font-family: var(--display);
  letter-spacing: 1.8px;
  color: #68734e;
}
.compendium-heading p:not(.eyebrow) {
  font-size: 14px;
}
.compendium-edition {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 210px;
  font: 500 10px/1.6 var(--display);
  color: #71795f;
  letter-spacing: 1px;
}
.compendium-edition span {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #b5ad8c;
  font-size: 26px;
  color: #46532d;
}
.compendium-library {
  background: #fcfaf3;
  border: 1px solid #cdc9b6;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 8px 25px #514b2710;
  margin-bottom: 28px;
}
.compendium-library:before,
.compendium-page .species-card:before {
  display: none;
}
.compendium-tools {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(180px, 250px) auto;
  gap: 20px;
  align-items: end;
  padding: 22px;
}
.compendium-tools label > span {
  display: block;
  font: 500 13px/1.4 var(--display);
  text-transform: uppercase;
  margin-bottom: 9px;
  color: #626d4b;
}
.compendium-tools input,
.compendium-tools select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cbc8b7;
  border-radius: 3px;
  background: #fffdf5;
  color: var(--text);
  padding: 11px 14px;
  font-size: 14px;
}
.compendium-tools input::placeholder { color: #787e6b; }
.compendium-tools input { font-family: var(--display); font-size: 15px; }
.compendium-tools select { cursor: pointer; }
.compendium-tools :focus-visible,
.compendium-page a:focus-visible {
  outline: 2px solid #7f622c;
  outline-offset: 3px;
}
.compendium-page .compendium-portal {
  min-height: 48px;
  background: #303e21;
  color: #fffdf4;
  border-color: #303e21;
  font: 500 14px/1.3 var(--display);
  text-transform: uppercase;
  padding: 12px 20px;
  border-radius: 3px;
}
.compendium-page .compendium-portal:hover { background: #465731; }
.compendium-count {
  align-self: end;
  padding: 15px 0;
  white-space: nowrap;
  color: #66714d;
  font: 500 12px/1.4 var(--display);
  text-transform: uppercase;
}
.compendium-library-key {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 26px;
  padding: 12px 22px;
  background: #e2dcc0;
  border-top: 1px solid #d3ccb0;
  font: 500 11px/1.5 var(--display);
  color: #65704e;
}
.compendium-library-key strong { text-transform: uppercase; color: #303e21; }
.compendium-library-key b {
  display: inline-block;
  background: #384625;
  color: #fffdf1;
  padding: 4px 7px;
  margin-right: 8px;
  font-weight: 500;
  border-radius: 2px;
}
.compendium-library-key a { margin-left: auto; color: #394c28; }
.compendium-page .species-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.compendium-page .species-card {
  background: #fcfbf5;
  border: 1px solid #d5d1c2;
  border-radius: 7px;
  box-shadow: 0 9px 24px #4a482916;
  display: flex;
  flex-direction: column;
}
.compendium-page .species-card:hover {
  border-color: #a8a57c;
  box-shadow: 0 14px 30px #4a482922;
}
.compendium-page .species-image {
  min-height: 0;
  aspect-ratio: 4 / 3;
  background: #dadbc7;
  border-bottom: 1px solid #cfcbb7;
  overflow: hidden;
}
.compendium-page .species-image:after,
.compendium-page .species-card-body:after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 12px;
  background: linear-gradient(#b9a767, #b9a767) left top/23px 2px no-repeat,
    linear-gradient(#b9a767, #b9a767) left top/2px 23px no-repeat,
    linear-gradient(#b9a767, #b9a767) right top/23px 2px no-repeat,
    linear-gradient(#b9a767, #b9a767) right top/2px 23px no-repeat;
}
.compendium-page .species-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compendium-page .species-image .dino-art {
  object-fit: contain;
  padding: 36px 22px;
  opacity: 0.55;
  filter: brightness(0.65);
}
.compendium-page .image-pending {
  background-image: linear-gradient(#707e3d0c 1px, transparent 1px), linear-gradient(90deg, #707e3d0c 1px, transparent 1px);
  background-size: 24px 24px;
}
.compendium-page .archive-code {
  top: 21px;
  left: 23px;
  padding: 3px 6px;
  background: #f7f3e6e8;
  color: #53613e;
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.5px;
}
.image-pending-label {
  position: absolute;
  bottom: 15px;
  left: 0;
  width: 100%;
  text-align: center;
  color: #64714e;
  font: 500 10px/1.4 var(--display);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.compendium-page .species-card-body {
  position: relative;
  padding: 25px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.compendium-page .species-card-body:after { transform: rotate(180deg); background-position: left top, left top, right top, right top; }
.compendium-page .species-card-body h2 {
  font: 500 23px/1.18 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}
.compendium-page .species-classification {
  color: #68704f;
  font: 500 13px/1.5 var(--display);
  margin-bottom: 14px;
}
.compendium-page .species-summary p {
  color: #6a705d;
  font-size: 12px;
  line-height: 1.65;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.species-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.species-record-tag {
  background: #e6e8dd;
  border: 1px solid #d0d3c3;
  border-radius: 2px;
  padding: 6px 8px;
  font: 500 10px/1.3 var(--display);
  text-transform: uppercase;
  color: #4d5c39;
}
.species-open { display: grid; place-items: center; width: 38px; min-height: 38px; color: #687843; font-size: 21px; }
.compendium-page .reference-note { border-color: #cbc5ac; }
.compendium-page .reference-note p { color: #697053; }
.compendium-page .empty-inline { grid-column: 1 / -1; color: #3e4e2d; background: #faf8ee; border-color: #ccc7af; }
@media (max-width: 1180px) {
  .compendium-page .species-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compendium-tools { grid-template-columns: auto minmax(0, 1fr) minmax(170px, 220px); gap: 16px; }
  .compendium-count { grid-column: 1 / -1; padding: 0; }
}
@media (max-width: 850px) {
  .compendium-page .species-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .compendium-tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .compendium-portal { grid-column: 1 / -1; justify-self: start; }
  .compendium-edition { display: none; }
}
@media (max-width: 560px) {
  .compendium-heading { padding: 30px 0 24px; }
  .compendium-heading h1 { font-size: clamp(28px, 8vw, 38px); }
  .compendium-tools { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .compendium-count { grid-column: auto; }
  .compendium-library-key { padding: 12px 18px; gap: 12px; }
  .compendium-library-key a { margin-left: 0; }
  .compendium-page .species-grid { grid-template-columns: minmax(0, 1fr); }
  .compendium-page .species-card-body { padding: 24px; }
  .compendium-page .species-card-body h2 { font-size: 27px; }
  .compendium-page .reference-note { align-items: start; flex-wrap: wrap; }
}
