/* Trainer cards only (region tiles with game sprites, entry hero, profile).
   Loaded after /ba-dex.css, which holds the page frame, entry, card gallery,
   Pokémon chips and footer shared with the Pokédex and the artist database. */

/* ── Region sections and trainer tiles ── */
.tr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:0 28px}
.tr-card{display:grid;grid-template-columns:64px minmax(0,1fr);grid-template-rows:auto auto;column-gap:14px;row-gap:3px;align-content:center;min-height:90px;padding:12px 0;border-bottom:1px solid var(--rule)}
.tr-pic-box{grid-row:1 / 3;align-self:center;display:flex;align-items:center;justify-content:center;width:64px;height:64px}
.tr-pic{width:64px;height:64px;object-fit:contain;image-rendering:pixelated}
.tr-pic.is-card,.tr-hero__pic.is-card,.tr-fr-pic.is-card{image-rendering:auto;object-fit:cover;width:46px;height:64px;border-radius:4px}
.tr-pic--none{display:flex;align-items:center;justify-content:center;width:52px;height:52px;border:1px dashed var(--rule-2);border-radius:50%;font:800 16px/1 var(--display);color:var(--ink-3)}
.tr-name{align-self:end;min-width:0;font:800 16px/1.25 var(--display);letter-spacing:-.012em;text-decoration:underline;text-decoration-color:var(--rule-2);text-decoration-thickness:1px;text-underline-offset:4px;overflow-wrap:anywhere}
.tr-meta{align-self:start;font:700 12px/1.45 var(--text);letter-spacing:.07em;text-transform:uppercase;color:var(--ink-3)}
@media (hover:hover){.tr-card:hover .tr-name{text-decoration-color:var(--gold);text-decoration-thickness:2px}}
.tr-card:focus-visible{outline-offset:2px}
@container page (max-width:600px){.tr-card{min-height:80px;padding:8px 0}}

/* Search results: the sprite, pixel-crisp */
.tr-fr-pic{image-rendering:pixelated}
.tr-fr-pic.is-card{width:34px;height:48px;justify-self:center}
.fr__pic.tr-pic--none{width:40px;height:40px;font-size:13px}

/* ── Trainer entry ── */
.tr-hero{grid-template-columns:200px minmax(0,1fr)}
.tr-hero__box{display:flex;align-items:center;justify-content:center;width:200px;height:200px;background:var(--bg-2);border:1px solid var(--rule);border-top:3px solid var(--tr-colour,var(--rule-2))}
.tr-hero__pic{width:160px;height:160px;object-fit:contain;image-rendering:pixelated}
.tr-hero__pic.is-card{width:auto;height:176px;border-radius:6px}
.tr-hero__box .tr-pic--none{width:120px;height:120px;font-size:40px}
.tr-quote{font-style:italic}
.tr-facts{margin-bottom:0}
@container page (max-width:600px){
    .tr-hero{grid-template-columns:112px minmax(0,1fr)}
    .tr-hero__box{width:112px;height:112px}
    .tr-hero__pic{width:96px;height:96px}
    .tr-hero__pic.is-card{height:100px}
    .tr-hero__box .tr-pic--none{width:72px;height:72px;font-size:24px}
}
