/* Grid card styles live here (not as Tailwind utilities) so 1,000+ server-rendered cards stay small. */
.card { content-visibility: auto; contain-intrinsic-size: auto 214px; }
.link { display: flex; height: 100%; flex-direction: column; border-radius: 1rem; background: #fff; padding: .625rem; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.05); transition: transform .15s, box-shadow .15s; color: inherit; }
.link:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -6px rgba(0,0,0,.18), 0 0 0 1px rgba(220,10,45,.4); }
.link:focus-visible { outline: 3px solid #dc0a2d; outline-offset: 2px; }
.thumb { position: relative; display: grid; aspect-ratio: 1; place-items: center; overflow: hidden; border-radius: .75rem; background: radial-gradient(circle at 50% 58%, #fff 0, #fff 36%, transparent 37%) #f3f4f6; }
.num { position: absolute; left: .5rem; top: .375rem; font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: #a1a1aa; }
.sprite { width: 78%; height: 78%; object-fit: contain; image-rendering: pixelated; transition: transform .15s; }
.link:hover .sprite { transform: scale(1.1); }
.unseen .sprite { filter: brightness(0); opacity: .3; }
.tag { position: absolute; bottom: .375rem; border-radius: .25rem; padding: .125rem .375rem; font-size: 10px; font-weight: 700; line-height: 1.3; }
.tagUnseen { right: .375rem; background: #27272a; color: #fff; }
.tagForm { left: .375rem; background: #fff; color: #52525b; box-shadow: 0 0 0 1px #e4e4e7; }
.body { display: flex; flex: 1; flex-direction: column; padding: .5rem .125rem 0; }
.name { display: block; word-break: keep-all; font-size: 15px; font-weight: 800; line-height: 1.25; color: #18181b; }
.en { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #a1a1aa; }
.types { margin-top: auto; display: flex; flex-wrap: wrap; gap: .25rem; padding-top: .5rem; }
.type { display: inline-flex; min-width: 2.75rem; justify-content: center; border-radius: .375rem; padding: .25rem .375rem; font-size: 11px; font-weight: 700; line-height: 1; }
.type[data-t="Normal"]{background:#A8A878;color:#18181b}
.type[data-t="Fire"]{background:#F08030;color:#fff}
.type[data-t="Water"]{background:#6890F0;color:#fff}
.type[data-t="Electric"]{background:#F8D030;color:#18181b}
.type[data-t="Grass"]{background:#78C850;color:#18181b}
.type[data-t="Ice"]{background:#98D8D8;color:#18181b}
.type[data-t="Fighting"]{background:#C03028;color:#fff}
.type[data-t="Poison"]{background:#A040A0;color:#fff}
.type[data-t="Ground"]{background:#E0C068;color:#18181b}
.type[data-t="Flying"]{background:#A890F0;color:#18181b}
.type[data-t="Psychic"]{background:#F85888;color:#fff}
.type[data-t="Bug"]{background:#A8B820;color:#18181b}
.type[data-t="Rock"]{background:#B8A038;color:#fff}
.type[data-t="Ghost"]{background:#705898;color:#fff}
.type[data-t="Dragon"]{background:#7038F8;color:#fff}
.type[data-t="Dark"]{background:#705848;color:#fff}
.type[data-t="Steel"]{background:#B8B8D0;color:#18181b}
.type[data-t="Fairy"]{background:#EE99AC;color:#18181b}
