.pokedex-board {
    --header-map: url("/art/pokedex/research-bench.webp");
    --map-position: 67%;
}
.dex-head { padding-top: 36px; }
.dex-head::before { width: min(100%, 760px); }
.dex-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 170px) minmax(116px, 152px) auto;
    align-items: center;
    gap: 10px;
    margin: 18px 0 8px;
}
.dex-filters .board-search { max-width: none; margin: 0; }
.dex-filters select, .dex-pages select {
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--edge);
    border-radius: 7px;
    background-color: #22262d;
    color: var(--paper);
    font: 600 .9rem/1.2 Sans, sans-serif;
}
.dex-live { justify-self: end; min-height: 44px; padding-inline: 5px; }
.dex-results-head, .dex-result-count, .dex-pages {
    display: flex;
    align-items: center;
}
.dex-results-head { justify-content: space-between; gap: 8px; min-height: 48px; margin-bottom: 5px; }
.dex-result-count { gap: 12px; flex-wrap: wrap; }
.dex-result-count h2 { margin: 0; font-size: 1.5rem; }
.dex-result-count a, .dex-empty a { color: var(--gold); font-size: .85rem; }
.dex-pages { gap: 2px; color: var(--muted); }
.dex-pages a {
    display: grid; place-items: center; min-width: 40px; min-height: 42px;
    color: var(--paper); font: 1.65rem/1 Sans, sans-serif; border-radius: 6px;
}
.dex-pages select { min-height: 40px; background: transparent; font-weight: 500; font-size: .84rem; }
.dex-pages option { background: var(--panel); }
.dex-pages a:hover { background: var(--panel); color: var(--gold); text-decoration: none; }
.dex-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.dex-entry {
    position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
    border: 1px solid var(--edge); border-radius: 10px; background: var(--panel);
}
.dex-entry:focus-within { border-color: var(--gold); }
.dex-entry .dex-tile {
    flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0; border: 0; border-radius: 0; color: var(--paper); background: transparent;
}
.dex-entry a:focus-visible { outline-offset: -3px; }
.dex-tile::after { content: ""; position: absolute; inset: 0; }
.dex-art {
    position: relative; isolation: isolate; display: grid; place-items: center;
    height: 128px;
    background:
        radial-gradient(ellipse at 58% 75%, color-mix(in srgb, var(--type, #aab6c6) 17%, transparent), transparent 75%),
        linear-gradient(150deg, #252a31, #22262d);
}
.dex-art::before {
    content: ""; position: absolute; z-index: -1; inset: 0;
    background-image: radial-gradient(circle, #e4f1ff26 .85px, transparent 1px);
    background-size: 11px 11px;
    mask-image: linear-gradient(135deg, #0009, transparent 48%, transparent 70%, #0006);
}
.dex-number {
    position: absolute; left: 12px; top: 10px; color: #d1d4da;
    font: 600 .75rem/1.2 Mono, monospace; font-variant-numeric: tabular-nums;
}
.dex-portrait {
    height: calc(100% - 8px); width: 76%; min-height: 0; object-fit: contain;
    margin-left: 12%; filter: drop-shadow(0 5px 4px #11151c60);
    transition: transform .16s ease-out;
}
@media (hover: hover) {
    .dex-entry:hover { border-color: color-mix(in srgb, var(--type, #acb8c7) 65%, var(--edge)); }
    .dex-tile:hover .dex-portrait { transform: translateY(-2px) scale(1.04); }
}
.dex-tile:active .dex-portrait { transform: scale(.97); }
.dex-identity { padding: 8px 12px 12px; }
.dex-identity h3 { font: 700 1.68rem/1.1 Cond, sans-serif; margin: 0; overflow-wrap: anywhere; }
.dex-types {
    display: flex; gap: 4px 11px; flex-wrap: wrap; list-style: none;
    padding: 0; margin: 7px 0 0; color: #dbe0e6; font-size: .81rem;
}
.dex-types li { display: inline-flex; align-items: center; gap: 4px; }
.dex-types img { display: block; object-fit: contain; }
.dex-shiny { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; margin: 7px 0 0; color: #e9cb88; font-size: .75rem; }
.dex-rate { color: #c5c9d2; }
.dex-entry-foot {
    display: flex; align-items: stretch; justify-content: space-between;
    padding-inline: 10px; gap: 4px; border-top: 1px solid #ffffff12; background: #1e2229;
}
.dex-entry-foot > * {
    display: inline-flex; align-items: center; gap: 4px; min-height: 43px;
    padding-inline: 2px; font-size: .78rem; line-height: 1.1;
}
.dex-sightings { color: var(--muted); }
.dex-sightings[data-active] { color: #92dfc3; }
.dex-forms { position: relative; color: var(--paper); }
.dex-forms span { color: var(--gold); }
.dex-empty { padding: 36px 12px; }
.dex-empty p { margin: 8px 0; }
@media (max-width: 980px) { .dex-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    .dex-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .dex-filters { grid-template-columns: 1fr 1fr auto; gap: 6px; margin: 10px 0 2px; }
    .dex-filters .board-search { grid-column: 1 / -1; }
}
@media (max-width: 580px) {
    body:has(.pokedex-board) .mast nav { flex-wrap: nowrap; justify-content: space-between; min-width: 0; gap: 8px; }
    .dex-head { padding-top: 21px; }
    .dex-head::before {
        background-image: linear-gradient(0deg, var(--bg) 4%, transparent 49%), var(--header-map);
        mask-image: linear-gradient(90deg, transparent 10%, #0006 34%, black 58%, black 94%, transparent);
    }
    .dex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .dex-head .raid-phases { gap: clamp(12px, 4vw, 22px); }
    .dex-filters select { padding-inline: 5px; font-size: .82rem; }
    .dex-live { padding: 0; gap: 4px; font-size: .78rem; }
    .dex-result-count { column-gap: 7px; }
    .dex-result-count h2 { font-size: 1.2rem; }
    .dex-results-head { margin-bottom: 1px; }
    .dex-art { height: clamp(92px, 26vw, 132px); }
    .dex-identity { padding: 7px 9px 10px; }
    .dex-identity h3 { font-size: 1.46rem; }
    .dex-types { gap: 3px 7px; font-size: .76rem; }
    .dex-number { left: 8px; top: 8px; font-size: .7rem; }
    .dex-entry-foot { padding-inline: 7px; }
}
@media (max-width: 360px) {
    .dex-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dex-live { grid-column: 1 / -1; justify-self: start; gap: 8px; font-size: .875rem; }
    .dex-entry-foot > *, .dex-shiny { font-size: .71rem; }
    .dex-result-count { align-items: flex-start; flex-direction: column; }
}
