/* Byrgenwerth: enemy pages and the Enemy Directory gallery.
   Plain HTML and CSS, no scripts: a picture gallery of cards (hooks/enemy_gallery.py builds it),
   a wiki-style infobox on each enemy page, and its pictures. Colours come from the site's tokens
   (wiki.css), so both themes work. Pictures are full-resolution files; CSS only scales or crops
   them for display, and each one links to the full file. */

/* Evidence label used on enemy pages, added to the badge vocabulary of wiki.css. */
.wk-badge--hypothesis { --c: #a993c9; }
:root[data-theme="light"] .wk-badge--hypothesis { --c: #5d4a85; }

/* ── Enemy Directory gallery ─────────────────────────────────────────────────── */
.en-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  margin: 1.4em 0 2em;
}
.en-card {
  display: flex;
  flex-direction: column;
  color: var(--wk-text);
  background: var(--wk-bg-raised);
  border: 1px solid var(--wk-line);
  border-radius: var(--wk-radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--wk-dur-fast) var(--wk-ease), border-color var(--wk-dur-fast), box-shadow var(--wk-dur-fast);
}
.en-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #000;
}
.en-card-name {
  padding: 12px 14px 14px;
  font-family: var(--wk-font-title);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: var(--wk-heading);
}
a.en-card:hover, a.en-card:focus-visible {
  color: var(--wk-text);
  text-decoration: none;
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--wk-gold) 55%, var(--wk-line));
  box-shadow: var(--wk-shadow);
}
a.en-card:focus-visible { outline: 2px solid var(--wk-gold); outline-offset: 3px; }
a.en-card:hover .en-card-name { color: var(--wk-gold); }

/* ── Infobox: floats right on wide screens, full width on phones ────────────── */
.en-infobox {
  float: right;
  clear: right;
  width: min(340px, 42%);
  margin: 0 0 1.2em 1.6em;
  background: var(--wk-bg-raised);
  border: 1px solid var(--wk-line);
  border-radius: var(--wk-radius);
  overflow: hidden;
  font-size: .9rem;
}
.en-infobox-title {
  margin: 0;
  padding: 10px 14px;
  font-family: var(--wk-font-title);
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  color: var(--wk-heading);
  background: color-mix(in srgb, var(--wk-blood) 35%, var(--wk-bg-raised));
}
.en-infobox a.en-infobox-img { display: block; }
.en-infobox img { display: block; width: 100%; height: auto; }
.en-infobox-caption { margin: 0; padding: 6px 12px; font-size: .78rem; color: var(--wk-text-muted); border-bottom: 1px solid var(--wk-line); }
.en-infobox dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 12px; margin: 0; padding: 12px 14px 14px; }
.en-infobox dt { font-family: var(--wk-font-display); font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--wk-text-faint); padding-top: .25em; }
.en-infobox dd { margin: 0; }
.en-infobox dd p { margin: 0; }

/* A picture inside the article, scaled to the column and linked to its full-resolution file. */
.en-figure { margin: 1.4em 0; }
.en-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--wk-line); border-radius: var(--wk-radius-s); }
.en-figure figcaption { margin-top: 6px; font-size: .84rem; color: var(--wk-text-muted); }

/* Tables and the closing notes start below the infobox rather than squeezed beside it. */
.en-clear { clear: both; }

@media (max-width: 760px) {
  .en-infobox { float: none; width: 100%; margin: 0 0 1.4em; }
}
