/* Pokédex page */
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.mon {
  --tc: #777; --tc2: var(--tc);
  position: relative; display: flex; flex-direction: column; min-height: 252px; padding: 12px 14px 14px;
  border-radius: 20px; overflow: hidden; text-decoration: none; color: #fff; isolation: isolate;
  background: var(--tc);
  background: linear-gradient(158deg, color-mix(in srgb, var(--tc) 88%, #fff 12%) 0%, color-mix(in srgb, var(--tc) 72%, #0c0f2a 28%) 62%, color-mix(in srgb, var(--tc2) 55%, #0c0f2a 45%) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(0,0,0,.18), 0 10px 24px rgba(2, 3, 16, .35);
  content-visibility: auto; contain-intrinsic-size: 196px 252px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.mon:hover, .mon:focus-visible { color: #fff; transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 0 2px rgba(255,255,255,.85), 0 16px 30px rgba(2, 3, 16, .45); }
.mon::before { /* Poké Ball watermark */
  content: ""; position: absolute; z-index: -1; width: 190px; height: 190px; right: -54px; top: 34px; border-radius: 50%;
  background: radial-gradient(circle, transparent 0 17%, rgba(255,255,255,.13) 17% 25%, transparent 25%),
              linear-gradient(180deg, transparent 0 46%, rgba(255,255,255,.13) 46% 54%, transparent 54%);
  box-shadow: inset 0 0 0 16px rgba(255,255,255,.1);
}
.mon .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.mon .no { font-family: var(--pixel); font-size: 18px; line-height: 1; color: rgba(255,255,255,.88); text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.mon .types { flex-direction: column; align-items: flex-end; gap: 4px; }
.mon .types .type { box-shadow: 0 0 0 1.5px rgba(255,255,255,.55), inset 0 -2px 0 rgba(0,0,0,.18); }
.mon .stage { flex: 1; min-height: 128px; margin: 2px 0 6px; }
.mon .stage::before { width: 82%; bottom: 4%; }
.mon .stage .sprite { margin-bottom: 9%; filter: drop-shadow(0 3px 0 rgba(0,0,0,.12)); }
.mon .stage .pokeball-ico.ph { width: 46px; height: 46px; margin-bottom: 18%; opacity: .7; }
.mon .nm { font-weight: 900; font-size: 18.5px; line-height: 1.15; letter-spacing: .1px; text-shadow: 0 2px 0 rgba(0,0,0,.22); overflow-wrap: anywhere; }
.mon .sp { font-size: 12.5px; color: rgba(255,255,255,.78); font-weight: 700; }
.mon .foot { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.mon .foot .badge { background: rgba(10, 12, 40, .38); color: #fff; }
.mon .foot .badge.limited { background: linear-gradient(180deg, #ffe07a, #ffb81f); color: #3a2200; }
.dex-more { display: flex; justify-content: center; margin-top: 22px; }

/* detail */
.dx-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 9px 14px 9px 10px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line-2); color: #fff; text-decoration: none; font-weight: 900; }
.dx-back svg { width: 18px; height: 18px; }
.dx-back:hover { color: #fff; background: rgba(255,255,255,.12); }
.dx-top { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: 18px; }
.dx-stage {
  --tc: #777;
  position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 360px; display: flex; flex-direction: column;
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--tc) 55%, #fff 10%), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--tc) 40%, #12163a 60%) 0%, #0f1334 100%);
  border: 1px solid var(--line-2);
}
.dx-stage .bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 0; gap: 8px; }
.dx-stage .no { font-family: var(--pixel); font-size: 26px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.dx-stage .stage { flex: 1; min-height: 250px; }
.dx-stage .stage::before { width: 78%; height: 20%; bottom: 10%; }
.dx-stage .stage .sprite { margin-bottom: 15%; }
.dx-stage .modes { display: flex; justify-content: center; padding: 0 12px 14px; }
.dx-stage .types { justify-content: center; padding-bottom: 12px; }
.dx-info { padding: 22px 24px; }
.dx-info h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(30px, 5vw, 50px); line-height: 1; letter-spacing: .8px; text-shadow: 0 4px 0 #8e1222; overflow-wrap: anywhere; }
.dx-info .species { margin: 6px 0 12px; color: var(--gold); font-weight: 900; }
.dx-info .flavor { color: #d8ddf8; font-size: 16.5px; max-width: 62ch; margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fact { padding: 10px 12px; border-radius: 14px; background: rgba(10, 12, 40, .35); border: 1px solid var(--line); }
.fact b { display: block; font-size: 12.5px; color: var(--muted); font-weight: 800; }
.fact span { font-weight: 900; font-size: 15.5px; }
.fact .hidden-ab { color: var(--gold); }
.dx-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.dx-sec { padding: 20px 22px; margin-top: 18px; }
.dx-row .dx-sec { margin-top: 0; }
.stats { display: grid; gap: 7px; }
.stat { display: grid; grid-template-columns: 74px 40px 1fr; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.stat .v { font-family: var(--pixel); font-size: 20px; text-align: right; }
.stat .track { display: block; height: 12px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.stat .fill { display: block; height: 100%; border-radius: 99px; background: var(--sc, #33d68b); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.stat.total { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.mu { display: grid; gap: 12px; }
.mu h3 { margin: 0 0 6px; font-size: 14px; color: var(--muted); font-weight: 900; }
.mu .types { gap: 6px; }
.mu .type i { font-style: normal; font-family: var(--pixel); margin-left: 6px; padding: 0 5px; border-radius: 5px; background: rgba(0,0,0,.25); font-size: 15px; line-height: 1; }
.evo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.evo-step { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.evo-mon { display: grid; justify-items: center; gap: 2px; width: 142px; padding: 10px 8px; border-radius: 16px; background: rgba(10, 12, 40, .35); border: 1px solid var(--line); text-decoration: none; color: #fff; font-weight: 900; font-size: 14px; text-align: center; }
.evo-mon:hover { color: #fff; border-color: rgba(255,255,255,.6); }
.evo-mon.here { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(255, 200, 61, .25); }
.evo-mon .stage { height: 104px; width: 100%; }
.evo-mon .stage::before { bottom: 2%; }
.evo-arrow { display: grid; justify-items: center; color: var(--gold); font-weight: 900; font-size: 12px; min-width: 70px; text-align: center; }
.evo-arrow::after { content: ""; width: 54px; height: 3px; margin-top: 4px; border-radius: 3px; background: linear-gradient(90deg, rgba(255,200,61,.2), var(--gold)); }
.evo-branch { display: grid; gap: 8px; }
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.skin { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 8px 12px; border-radius: 16px; background: rgba(10, 12, 40, .35); border: 1px solid var(--line); text-align: center; font-weight: 900; font-size: 14px; color: #fff; text-decoration: none; min-width: 0; }
.skin .pic { height: 110px; width: 100%; display: grid; place-items: center; }
.skin .pic img { max-height: 110px; }
.skin .pic .pokeball-ico.ph { width: 40px; height: 40px; opacity: .6; }
.skin .of { color: var(--muted); font-weight: 800; font-size: 12.5px; }
.skin .soon { color: var(--muted); font-weight: 800; font-size: 11.5px; }
.skin.nopic .pic { opacity: .8; }
.skin .badge.limited { position: absolute; top: 8px; right: 8px; }
.skin.limited { border-color: rgba(255, 200, 61, .55); background: linear-gradient(180deg, rgba(255, 200, 61, .12), rgba(10, 12, 40, .35) 60%); }
a.skin:hover { color: #fff; border-color: rgba(255,255,255,.6); }
.tbl-wrap { overflow-x: auto; margin: 0 -6px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 900; font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl td.n { font-family: var(--pixel); font-size: 18px; }
.tbl tr:hover td { background: rgba(255,255,255,.03); }
.tbl a { color: #fff; font-weight: 900; text-decoration: none; }
.tbl a:hover { text-decoration: underline; }
.cat { font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.1); }
.cat.Physical { background: #c8452c; } .cat.Special { background: #4a6fd8; } .cat.Status { background: #8a8aa0; }
.rate { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.rate .track { flex: 1; height: 8px; border-radius: 9px; background: rgba(255,255,255,.08); overflow: hidden; }
.rate .fill { height: 100%; background: var(--gold); border-radius: 9px; }
.rate span { font-family: var(--pixel); font-size: 18px; min-width: 46px; text-align: right; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .dx-top, .dx-row { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .dex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mon { min-height: 218px; padding: 10px 10px 12px; border-radius: 16px; }
  .mon .stage { min-height: 104px; }
  .mon .nm { font-size: 15.5px; }
  .mon .types .type { font-size: 10.5px; padding: 2px 7px; }
  .stat { grid-template-columns: 62px 34px 1fr; }
  .evo-mon { width: 104px; }
}

#dx-types .chip { padding: 4px; border-color: transparent; background: none; }
#dx-types .chip .type { padding: 4px 11px !important; font-size: 12.5px; opacity: .78; }
#dx-types .chip:hover .type { opacity: 1; }
#dx-types .chip[aria-pressed="true"] { background: none; border-color: transparent; }
#dx-types .chip[aria-pressed="true"] .type { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 14px var(--tc); }

/* forms (Megas, Gigantamax, regional and other forms) on a Pokémon's page */
.forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 10px; }
.forms .evo-mon { width: auto; min-width: 0; }
.forms .evo-mon .fk { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.forms .evo-mon.here .fk { color: var(--gold); }
.mon .foot .badge.fcount { background: rgba(255, 255, 255, .16); }
@media (max-width: 520px) { .forms { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); } }

/* Egg Moves tab (Nov 2026) */
.dx-egg-note { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.dx-egg-note strong { color: var(--gold); font-weight: 800; }
@media (max-width: 420px) { .dx-sec .seg button { padding: 9px 12px; } }
