:root {
  --theme-bg-color: #ffcc33;
  --theme-bg-image: url('../PokemonBG-Emerald.png');
  --theme-fg: #003399;
  --theme-link: #cc0000;
  --theme-link-hover: #7a0000;
  --navbar-bg: #cc0000;
  --navbar-fg: #ffffff;
  --nav-link-hover-bg: #990000;
  --content-bg: #ffffff;
  --content-border: #cc0000;
  --btn-bg: #003399;
  --btn-fg: #ffffff;
  --btn-hover-bg: #00266f;
}

.wiki-infobox {
  border: 1px solid #000000;
  border-radius: 0;
  background: #ffffff;
  padding: 0.8rem 1rem;
  margin: 0.6rem 0 1rem 1rem;
  float: right;
  width: min(320px, 100%);
}
.wiki-infobox table {
  margin: 0;
  width: 100%;
}
.wiki-infobox-clear {
  clear: both;
}
.wiki-infobox-sprite {
  image-rendering: pixelated;
  width: 96px;
  height: 96px;
  display: block;
  margin: 0.2rem auto 0.6rem auto;
}
.wiki-icon {
  image-rendering: pixelated;
  vertical-align: middle;
}
.wiki-icon-top-frame {
  object-fit: cover;
  object-position: top;
}
.wiki-type-icon {
  image-rendering: pixelated;
  vertical-align: middle;
}
.wiki-type {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 0;
  font-size: 0.75rem;
  line-height: 1.2;
  color: #fff;
  margin-right: 0.25rem;
  font-weight: 600;
}
.wiki-type-normal { background: #9fa19f; }
.wiki-type-fire { background: #e62829; }
.wiki-type-water { background: #2980ef; }
.wiki-type-electric { background: #fac000; color: #222; }
.wiki-type-grass { background: #3fa129; }
.wiki-type-ice { background: #3fd8ff; color: #222; }
.wiki-type-fighting { background: #ff8000; }
.wiki-type-poison { background: #9141cb; }
.wiki-type-ground { background: #915121; }
.wiki-type-flying { background: #81b9ef; color: #222; }
.wiki-type-psychic { background: #ef4179; }
.wiki-type-bug { background: #91a119; }
.wiki-type-rock { background: #afa981; }
.wiki-type-ghost { background: #704170; }
.wiki-type-dragon { background: #5060e1; }
.wiki-type-dark { background: #624d4e; }
.wiki-type-steel { background: #60a1b8; }
.wiki-type-mystery { background: #ffffff; color: #222; }
.wiki-evo-chain {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.wiki-evo-stage {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.wiki-evo-card {
  border: 1px solid #000000;
  border-radius: 0;
  padding: 0.45rem;
  min-width: 86px;
  text-align: center;
  background: #fff;
}
.wiki-evo-arrow {
  font-size: 0.85rem;
  color: #555;
}
.wiki-base-stats {
  max-width: 520px;
  border: 1px solid #000000;
  border-radius: 0;
  background: #fff;
  padding: 0.6rem;
  display: flow-root;
  box-sizing: border-box;
}
.wiki-base-stats-row {
  display: grid;
  grid-template-columns: 64px 42px 1fr;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.wiki-base-stats-label {
  font-weight: 600;
  font-size: 0.82rem;
}
.wiki-base-stats-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #1f2328;
  font-size: 0.82rem;
}
.wiki-base-stats-bar {
  height: 0.6rem;
  background: #eaeef2;
  border-radius: 0;
  overflow: hidden;
}
.wiki-base-stats-fill {
  display: block;
  height: 100%;
  transition: width 0.3s ease;
}
.wiki-base-stats-total {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid #d8dee4;
}
.wiki-infobox table th,
.wiki-infobox table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.wiki-machine-icon {
  image-rendering: pixelated;
  margin-left: 0.35rem;
  vertical-align: text-bottom;
}
.wiki-sprite-gallery {
  max-width: 640px;
}
.wiki-sprite-table {
  width: 100%;
  border-collapse: collapse;
}
.wiki-sprite-table th,
.wiki-sprite-table td {
  border: 1px solid #000000;
  padding: 0.45rem;
  text-align: center;
  vertical-align: middle;
}
.wiki-sprite-table th:first-child,
.wiki-sprite-table td:first-child {
  text-align: left;
  width: 90px;
}
.wiki-sprite-gallery-img {
  image-rendering: pixelated;
  max-width: 96px;
  max-height: 96px;
}
.wiki-sprite-missing {
  color: #6b7280;
  font-size: 0.82rem;
}
.wiki-form-sprite-galleries {
  margin-top: 0.8rem;
}
.wiki-form-sprite-details {
  border: 1px solid #000000;
  border-radius: 0;
  padding: 0.35rem 0.5rem;
  margin-top: 0.55rem;
  background: #fff;
}
.wiki-form-sprite-details > summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.45rem;
}
@media (max-width: 900px) {
  .wiki-infobox {
    float: none;
    width: calc(100% - 20px);
  }
}
