/* 📖 the Pokédex (2026-11-04): /dex's species grid, a species page, and the profile's caught-and-researched grid. Loaded after db.css and game.css
   (the type colours --tc and the .type chips come from game.css). */

/* ── /dex ── */
.dx-today { margin-top:10px; font-size:.92rem; color:var(--muted); }
.dx-today a { color:var(--gold); font-weight:700; text-decoration:none; } .dx-today a:hover { text-decoration:underline; }
.dx-mine { padding:14px 18px; min-width:220px; }
.dx-mine .k { font-size:.68rem; letter-spacing:.09em; text-transform:uppercase; color:var(--muted); }
.dx-mine .v { font-family:var(--font-d); font-weight:700; font-size:1.5rem; color:var(--gold); line-height:1.15; font-variant-numeric:tabular-nums; }
.dx-mine .v small { font-size:.8rem; color:var(--dim); font-family:var(--font-b); font-weight:500; }
.dx-mine .s { font-size:.74rem; color:var(--dim); }
.dx-tools .chips { flex:1 1 auto; }
.dx-tools .search { position:relative; flex:1 1 180px; min-width:160px; max-width:280px; }
.dx-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(132px, 1fr)); gap:12px; }
.dx-tile { position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; padding:12px 8px 10px; text-decoration:none; color:inherit; transition:transform .25s var(--ease), box-shadow .25s; }
.dx-tile::after { content:''; position:absolute; inset:auto 18% 46px; height:40px; border-radius:50%; background:radial-gradient(closest-side, color-mix(in srgb, var(--tc, #7c3aed) 35%, transparent), transparent); filter:blur(6px); pointer-events:none; }
.dx-tile:hover { transform:translateY(-3px); box-shadow:0 0 0 1px color-mix(in srgb, var(--tc, #a878ff) 55%, transparent), 0 16px 34px rgba(0,0,0,.45); }
.dx-tile img { position:relative; z-index:1; width:88px; height:88px; object-fit:contain; image-rendering:pixelated; image-rendering:crisp-edges; margin:-4px 0 0; }
.dx-n { font-family:var(--font-m); font-size:.68rem; color:var(--dim); margin-top:2px; }
.dx-name { font-weight:800; font-size:.86rem; line-height:1.2; max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dx-foot { font-size:.7rem; color:var(--muted); margin-top:2px; font-variant-numeric:tabular-nums; }
.dx-marks { position:absolute; top:6px; right:8px; z-index:2; display:flex; gap:2px; font-size:.86rem; }
.dx-tile.focus { box-shadow:inset 0 0 0 1px rgba(255,201,77,.45); }
.dx-me { position:absolute; top:6px; left:8px; z-index:2; padding:1px 7px; border-radius:8px; font-size:.62rem; font-weight:800; letter-spacing:.04em; color:#fff; background:linear-gradient(135deg, var(--violet), var(--violet-2)); }
.dx-me.shiny { color:#2b1600; background:linear-gradient(135deg, #ffe08a, #ffb020); }
.dx-tile.mine-no img { filter:brightness(0) opacity(.35); }
.dx-tile.mine-no .dx-name { color:var(--muted); }
.dx-none { text-align:center; padding:30px 0; }

/* ── /dex/:slug ── */
.sp-hero { position:relative; display:grid; grid-template-columns:auto 1fr; gap:28px; align-items:center; padding:26px 30px; margin-top:6px; overflow:hidden; }
.sp-hero::before { background:radial-gradient(70% 120% at 0% 50%, color-mix(in srgb, var(--tc, #7c3aed) 32%, transparent), transparent 70%); opacity:1; }
.sp-art { position:relative; width:200px; height:200px; display:grid; place-items:center; }
.sp-art::before { content:''; position:absolute; inset:30px 20px 12px; border-radius:50%; background:radial-gradient(closest-side, color-mix(in srgb, var(--tc, #7c3aed) 55%, transparent), transparent); filter:blur(10px); }
.sp-main { position:relative; width:192px; height:192px; object-fit:contain; image-rendering:pixelated; image-rendering:crisp-edges; }
.sp-shiny { position:absolute; right:-6px; bottom:0; width:72px; height:72px; object-fit:contain; image-rendering:pixelated; border-radius:50%; background:rgba(6,3,13,.6); box-shadow:inset 0 0 0 1px rgba(255,201,77,.45); }
.sp-copy h1 { font-family:var(--font-d); font-size:clamp(1.9rem, 4.4vw, 2.8rem); letter-spacing:-.03em; line-height:1.05; margin:6px 0 10px; }
.sp-types { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.sp-types .type { font-size:.72rem; padding:3px 10px; }
.sp-copy .lead { margin-top:10px; }
.sp-where { margin-top:16px; }
.sp-where h3 { font-size:.72rem; letter-spacing:.09em; text-transform:uppercase; color:var(--muted); margin-bottom:6px; }
.dx-wild { list-style:none; display:grid; gap:6px; }
.dx-wild li { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:.86rem; }
.dx-wild b { margin-right:4px; }
.dx-wild span { padding:2px 10px; border-radius:20px; background:rgba(255,255,255,.05); box-shadow:inset 0 0 0 1px var(--line); font-size:.8rem; }
.sp-grid { display:grid; grid-template-columns:1.3fr 1fr; gap:14px; margin-top:16px; }
.sp-grid > * { min-width:0; }
.dx-leaders { list-style:none; display:grid; gap:4px; }
.dx-leaders li { display:grid; grid-template-columns:26px minmax(0, 1fr) auto auto; gap:4px 10px; align-items:center; padding:7px 10px; border-radius:10px; background:rgba(255,255,255,.025); }
.dx-leaders li.top { background:rgba(255,201,77,.08); box-shadow:inset 0 0 0 1px rgba(255,201,77,.3); }
.dx-leaders a { color:var(--text); font-weight:700; text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .dx-leaders a:hover { color:var(--violet); }
.dx-rk { font-family:var(--font-d); font-weight:700; color:var(--muted); text-align:center; font-size:.85rem; }
.dx-stars { font-size:.7rem; letter-spacing:1px; color:var(--gold); white-space:nowrap; } .dx-stars i { font-style:normal; opacity:.18; }
.dx-lvn { font-family:var(--font-d); font-weight:700; font-size:.8rem; color:var(--gold); font-variant-numeric:tabular-nums; }
.dx-leaders .bdg { grid-column:2 / -1; justify-self:start; }
.dx-shinyby { display:flex; flex-wrap:wrap; gap:8px; }
.dx-shinyby a { padding:5px 12px; border-radius:20px; font-size:.84rem; font-weight:600; color:var(--text); text-decoration:none; background:rgba(255,201,77,.07); box-shadow:inset 0 0 0 1px rgba(255,201,77,.3); }
.dx-shinyby a:hover { box-shadow:inset 0 0 0 1px rgba(255,201,77,.7); }
.dx-focus-b { font-size:.7rem; }
.sp-nav { display:flex; justify-content:space-between; gap:12px; margin-top:26px; }
.sp-nav .cn img { width:48px; height:48px; object-fit:contain; image-rendering:pixelated; border-radius:0; box-shadow:none; }

/* ── the profile's grid ── */
.dex-kpis { margin-bottom:12px; }
.dex-tabs { margin-bottom:10px; }
.dex-tabs button small { margin-left:6px; color:inherit; opacity:.7; font-weight:500; }
.dexgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(34px, 1fr)); gap:4px; padding:12px; }
.dexgrid a { position:relative; aspect-ratio:1; display:grid; place-items:center; border-radius:7px; font-family:var(--font-m); font-size:.6rem; color:var(--dim); text-decoration:none; background:rgba(255,255,255,.03); }
.dexgrid a.c { color:var(--text); background:linear-gradient(160deg, #3a2a63, #241a3d); box-shadow:inset 0 0 0 1px rgba(168,120,255,.3); }
.dexgrid a.s { color:#2b1600; font-weight:800; background:linear-gradient(160deg, #ffe08a, #e0a020); box-shadow:0 0 10px rgba(255,201,77,.35); }
.dexgrid a i { position:absolute; right:2px; bottom:1px; font-style:normal; font-size:.52rem; font-weight:800; color:var(--gold); line-height:1; }
.dexgrid a.s i { color:#5b21b6; }
.dexgrid a.p::after { content:'✨'; position:absolute; left:1px; top:0; font-size:.5rem; line-height:1; }
.dexgrid a:hover { outline:1px solid var(--violet); z-index:1; }

@media (max-width:720px) {
  .sp-hero { grid-template-columns:1fr; justify-items:center; text-align:center; padding:20px 16px; gap:10px; }
  .sp-types, .dx-wild li { justify-content:center; }
  .sp-art { width:160px; height:160px; } .sp-main { width:150px; height:150px; }
  .sp-grid { grid-template-columns:1fr; }
  .dx-grid { grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)); gap:8px; }
  .dx-tile img { width:72px; height:72px; }
  .dx-tools .search { max-width:none; flex-basis:100%; }
  .dx-mine { width:100%; }
  .dexgrid { grid-template-columns:repeat(auto-fill, minmax(30px, 1fr)); padding:8px; gap:3px; }
  .sp-nav .cn span { font-size:.8rem; }
}
@media (max-width:440px) { .dx-leaders .dx-stars { display:none; } }
