/* ═══════════════════════════════════════════════════════
   Wiki (loaded on /wiki pages after style.min.css)
   Shell: sticky wiki bar, side menu (a bottom sheet on phones), content, "on this page".
   ═══════════════════════════════════════════════════════ */

@font-face { font-family: 'CCUI'; src: url("../fonts/ZenKakuGothicNew-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: 'CCUI'; src: url("../fonts/ZenKakuGothicNew-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: 'CCUI'; src: url("../fonts/ZenKakuGothicNew-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

.wiki-page {
    --font-ui: 'CCUI', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --wk-bar: 56px;
    --wk-panel: rgba(32,21,11,.82);
    --wk-panel-2: #2b1d10;
    --wk-line: rgba(201,150,12,.24);
    --wk-line-2: rgba(245,239,224,.08);
    --wk-muted: rgba(245,239,224,.66);
    --wk-text: #f2e9d4;
}
/* The site header scrolls away on wiki pages; the wiki bar (search, menu) stays. */
.wiki-page .site-top { position: relative; }
.wiki-page .site-top-in > .site-search { display: none; }
.wiki-page main { width: 100%; }
.wiki-page [hidden] { display: none !important; }

/* ── Wiki bar ── */
.wk-bar {
    position: sticky; top: 0; z-index: 900;
    background: rgba(17,11,5,.94); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--wk-line);
}
.wk-bar-in {
    max-width: 1360px; margin: 0 auto; height: var(--wk-bar);
    display: flex; align-items: center; gap: 1rem;
    padding: 0 max(1.25rem, env(safe-area-inset-left, 0px));
}
.wk-brand { font-family: var(--font-display); color: var(--gold-light); font-size: 1rem; letter-spacing: .08em; white-space: nowrap; }
.wk-brand:hover { color: var(--gold-light); }
.wk-crumbs { min-width: 0; overflow: hidden; }
.wk-crumbs ol { list-style: none; display: flex; align-items: center; gap: .35rem; white-space: nowrap; font-family: var(--font-ui); font-size: .85rem; color: var(--wk-muted); }
.wk-crumbs li + li::before { content: "›"; margin-right: .35rem; opacity: .55; }
.wk-crumbs a { color: var(--gold-light); }
.wk-crumbs li:last-child { overflow: hidden; text-overflow: ellipsis; }
.wk-browse {
    display: none; align-items: center; gap: .45rem; height: 40px; padding: 0 .8rem; flex: none;
    border: 1px solid var(--wk-line); border-radius: 8px; background: var(--wk-panel);
    color: var(--gold-light); font: 700 .9rem var(--font-ui); cursor: pointer;
}
.wk-search { position: relative; margin-left: auto; width: min(380px, 40%); flex: none; }
.wk-search input {
    width: 100%; height: 38px; border-radius: 8px; border: 1px solid var(--wk-line);
    background: #0d0804; color: var(--wk-text); font: .92rem var(--font-ui); padding: 0 2.6rem 0 2.3rem;
}
.wk-search input::placeholder { color: rgba(245,239,224,.45); }
.wk-search input:focus { outline: 2px solid rgba(232,184,75,.55); outline-offset: 1px; border-color: var(--gold); }
.wk-search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--wk-muted); pointer-events: none; }
.wk-search kbd { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font: .72rem var(--font-ui); color: var(--wk-muted); border: 1px solid var(--wk-line); border-radius: 4px; padding: 0 .35rem; }
.wk-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wk-preview {
    max-width: 1360px; margin: .9rem auto 0; padding: .7rem 1rem;
    border: 2px dashed var(--crimson-light); border-radius: 8px; background: rgba(139,26,26,.25);
    font-family: var(--font-ui); font-size: .9rem;
}

/* ── Layout ── */
.wk {
    max-width: 1360px; margin: 0 auto; display: grid; gap: 2rem; align-items: start;
    grid-template-columns: 236px minmax(0, 1fr);
    padding: 1.5rem max(1.25rem, env(safe-area-inset-right, 0px)) 3.5rem max(1.25rem, env(safe-area-inset-left, 0px));
}
.wk--toc { grid-template-columns: 236px minmax(0, 1fr) 196px; }
.wk-main { min-width: 0; font-family: var(--font-ui); }
.wk-main > * + * { margin-top: 0; }

/* Side menu */
.wk-side {
    position: sticky; top: calc(var(--wk-bar) + 1rem); max-height: calc(100vh - var(--wk-bar) - 2rem);
    overflow-y: auto; overscroll-behavior: contain; padding-right: .3rem;
    font-family: var(--font-ui); scrollbar-width: thin; scrollbar-color: #4a3620 transparent;
}
.wk-side-head, .wk-side .wk-search, .wk-side-grab { display: none; }
.wk-side h2 {
    font: 700 .7rem var(--font-ui); letter-spacing: .14em; text-transform: uppercase;
    color: var(--wk-muted); margin: 1rem .55rem .35rem;
}
.wk-side h2:first-of-type { margin-top: 0; }
.wk-side ul { list-style: none; }
.wk-side a {
    display: flex; align-items: center; gap: .6rem; padding: .38rem .55rem; border-radius: 7px;
    color: #e6dcc5; font-size: .9rem; line-height: 1.3;
}
.wk-side a:hover { background: rgba(245,239,224,.05); color: var(--gold-light); }
.wk-side a[aria-current] { background: var(--wk-panel-2); color: var(--gold-light); box-shadow: inset 2px 0 0 var(--gold); }
.wk-side img, .wk-side .wk-dot { width: 20px; height: 20px; flex: none; image-rendering: pixelated; }
.wk-dot { display: grid; place-items: center; }
.wk-dot::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--gold)); }
.wk-side .n { margin-left: auto; font-size: .75rem; color: var(--wk-muted); font-variant-numeric: tabular-nums; }
.wk-side .wk-sub a { padding-left: 2.4rem; font-size: .84rem; color: var(--wk-muted); }
.wk-side .wk-sub a[aria-current] { color: var(--gold-light); }

/* On this page */
.wk-toc { position: sticky; top: calc(var(--wk-bar) + 1rem); display: grid; gap: 1rem; font-family: var(--font-ui); min-width: 0; }
.wk-toc h2 { font: 700 .7rem var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--wk-muted); margin-bottom: .3rem; }
.wk-toc ol { list-style: none; }
.wk-toc a { display: block; padding: .25rem 0 .25rem .75rem; border-left: 2px solid var(--wk-line-2); font-size: .84rem; color: var(--wk-muted); }
.wk-toc a:hover { color: var(--gold-light); }
.wk-toc a.is-on { border-left-color: var(--gold); color: var(--gold-light); }
.wk-toc .wiki-cta { margin: 0; padding: .85rem; border-left-width: 1px; }
.wk-toc .wiki-cta-title { font-size: .95rem; }
.wk-toc .wiki-cta-ip code { font-size: .78rem; padding: .3rem .45rem; }
.wk-toc .wiki-cta-note { font-size: .78rem; }
.wk--toc .wk-main > .wiki-cta { display: none; }

/* ── Page header ── */
.wk-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; margin-bottom: 1.25rem; }
.wk-head--plain { grid-template-columns: minmax(0, 1fr); }
.wk-eyebrow { font: 700 .72rem var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); }
.wk-head h1 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); color: var(--gold-light); line-height: 1.1; letter-spacing: .02em; margin-top: .15rem; text-wrap: balance; }
.wk-lede { font-family: var(--font-body); color: rgba(245,239,224,.88); font-size: 1rem; line-height: 1.65; max-width: 68ch; margin: 0 0 1.25rem; }
/* Which server the feature is on (one sentence under the lede: quoted passages keep the server name). */
.wk-server { font-family: var(--font-ui); color: rgba(245,239,224,.72); font-size: .9rem; line-height: 1.55; max-width: 68ch; margin: -.6rem 0 1.25rem; }
.wk-icon {
    width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--accent, var(--gold)) 22%, #1a1008);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, var(--gold)) 55%, transparent);
}
.wk-icon img { width: 40px; height: 40px; image-rendering: pixelated; }
.wk-icon img.wk-block { image-rendering: auto; }
.wk-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .82rem; color: var(--wk-muted); margin-top: .35rem; }

/* Sections inside a page */
.wk-sec { margin-top: 2.25rem; scroll-margin-top: calc(var(--wk-bar) + 4rem); }
.wk-sec > h2, .wk-h2 {
    font-size: clamp(1.15rem, 2.5vw, 1.4rem); color: var(--gold-light); letter-spacing: .02em;
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .7rem; margin-bottom: .85rem;
}
.wk-sec > h2 small, .wk-h2 small { font: 500 .82rem var(--font-ui); letter-spacing: 0; color: var(--wk-muted); }
.wk-panel { background: var(--wk-panel); border: 1px solid var(--wk-line); border-radius: 12px; min-width: 0; }
.wk-note { font-size: .84rem; color: var(--wk-muted); margin-top: .6rem; }
.wk-chip {
    display: inline-flex; align-items: center; gap: .4rem; min-height: 30px; padding: .15rem .7rem;
    border-radius: 999px; border: 1px solid var(--wk-line); background: var(--wk-panel);
    font: .84rem var(--font-ui); color: #e6dcc5; white-space: nowrap; max-width: 100%;
}
a.wk-chip:hover { border-color: var(--gold); color: var(--gold-light); }
.wk-chip i { width: 9px; height: 9px; border-radius: 3px; background: var(--c, var(--gold)); flex: none; }
.wk-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.wk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 38px; padding: 0 1rem;
    border-radius: 8px; border: 1px solid var(--wk-line); background: var(--wk-panel-2); color: var(--wk-text);
    font: 500 .9rem var(--font-ui); cursor: pointer; white-space: nowrap;
}
.wk-btn:hover { border-color: var(--gold); color: var(--gold-light); }
.wk-btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }
.wk-btn--gold:hover { background: var(--gold-light); color: var(--ink); }
.wk-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; border: 1px solid var(--wk-line); background: #0d0804; }
.wk-seg button, .wk-seg a {
    display: inline-flex; align-items: center; gap: .35rem; height: 30px; padding: 0 .75rem; border: 0; border-radius: 6px;
    background: none; color: var(--wk-muted); font: 500 .84rem var(--font-ui); cursor: pointer; white-space: nowrap;
}
.wk-seg [aria-pressed="true"], .wk-seg [aria-current] { background: var(--wk-panel-2); color: var(--gold-light); box-shadow: inset 0 0 0 1px var(--wk-line); }

/* Type and rarity badges, wiki-wide (keeps the old class names working) */
.wiki-page .wiki-type, .wiki-page .ty {
    font: 700 .74rem var(--font-ui); letter-spacing: .02em; padding: .1rem .6rem; color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,.3);
}
.wiki-page .wiki-type--normal, .wiki-page .ty-normal { background: #9fa19f; } .wiki-page .wiki-type--fire, .wiki-page .ty-fire { background: #e51f20; }
.wiki-page .wiki-type--water, .wiki-page .ty-water { background: #1170e8; } .wiki-page .wiki-type--electric, .wiki-page .ty-electric { background: #d9a800; }
.wiki-page .wiki-type--grass, .wiki-page .ty-grass { background: #3fa129; } .wiki-page .wiki-type--ice, .wiki-page .ty-ice { background: #2fb7d9; }
.wiki-page .wiki-type--fighting, .wiki-page .ty-fighting { background: #ff8000; } .wiki-page .wiki-type--poison, .wiki-page .ty-poison { background: #9141cb; }
.wiki-page .wiki-type--ground, .wiki-page .ty-ground { background: #915121; } .wiki-page .wiki-type--flying, .wiki-page .ty-flying { background: #6f9fd8; }
.wiki-page .wiki-type--psychic, .wiki-page .ty-psychic { background: #e51357; } .wiki-page .wiki-type--bug, .wiki-page .ty-bug { background: #91a119; }
.wiki-page .wiki-type--rock, .wiki-page .ty-rock { background: #a39d74; } .wiki-page .wiki-type--ghost, .wiki-page .ty-ghost { background: #704170; }
.wiki-page .wiki-type--dragon, .wiki-page .ty-dragon { background: #5060e1; } .wiki-page .wiki-type--dark, .wiki-page .ty-dark { background: #624d4e; }
.wiki-page .wiki-type--steel, .wiki-page .ty-steel { background: #60a1b8; } .wiki-page .wiki-type--fairy, .wiki-page .ty-fairy { background: #e060e0; }
/* Light type colours take dark text: white on them is under 4.5:1 (WCAG AA). */
.wiki-page .wiki-type--normal, .wiki-page .ty-normal, .wiki-page .wiki-type--electric, .wiki-page .ty-electric, .wiki-page .wiki-type--grass, .wiki-page .ty-grass, .wiki-page .wiki-type--ice, .wiki-page .ty-ice, .wiki-page .wiki-type--fighting, .wiki-page .ty-fighting, .wiki-page .wiki-type--flying, .wiki-page .ty-flying, .wiki-page .wiki-type--bug, .wiki-page .ty-bug, .wiki-page .wiki-type--rock, .wiki-page .ty-rock, .wiki-page .wiki-type--steel, .wiki-page .ty-steel, .wiki-page .wiki-type--fairy, .wiki-page .ty-fairy { color: #16110b; text-shadow: none; }
.wiki-page .wiki-rarity, .wiki-page .rr { font: 700 .74rem var(--font-ui); letter-spacing: .02em; }

/* Render discs: a Pokémon render on a lacquer disc tinted by its first type */
.wk-art, .dx-grid s { position: relative; display: block; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--tc, #c9960c) 34%, transparent), transparent 68%); }
.wk-art::before, .dx-grid s::before { content: ""; position: absolute; inset: 7%; border-radius: 50%; border: 1px solid rgba(232,184,75,.18); }
.wk-art::after, .dx-grid s::after { content: ""; position: absolute; left: 24%; right: 24%; bottom: 9%; height: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); }
.wk-art img, .dx-grid s img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
.wk-art--empty::before { border-style: dashed; }
.wk-silhouette { position: relative; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; color: rgba(245,239,224,.25); font: 700 2rem var(--font-display); }
.tc-normal{--tc:#9fa19f}.tc-fire{--tc:#e62829}.tc-water{--tc:#2980ef}.tc-grass{--tc:#3fa129}.tc-electric{--tc:#fac000}.tc-ice{--tc:#3dcef3}
.tc-fighting{--tc:#ff8000}.tc-poison{--tc:#9141cb}.tc-ground{--tc:#915121}.tc-flying{--tc:#81b9ef}.tc-psychic{--tc:#ef4179}.tc-bug{--tc:#91a119}
.tc-rock{--tc:#afa981}.tc-ghost{--tc:#704170}.tc-dragon{--tc:#5060e1}.tc-dark{--tc:#624d4e}.tc-steel{--tc:#60a1b8}.tc-fairy{--tc:#ef70ef}

/* ── Wiki home ── */
.hm-hero {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: center;
    padding: 1.75rem 2rem; border-radius: 16px; border: 1px solid var(--wk-line); overflow: hidden;
    background: radial-gradient(120% 140% at 100% 0%, rgba(139,26,26,.45), transparent 55%), linear-gradient(180deg, #24170c, #1a1109);
}
.hm-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--gold-light); line-height: 1.05; margin: .3rem 0 .6rem; }
.hm-hero .wk-lede { margin-bottom: 0; }
.hm-search { position: relative; margin-top: 1.25rem; display: flex; gap: .5rem; }
.hm-search input {
    flex: 1; min-width: 0; height: 50px; border-radius: 10px; border: 1px solid rgba(232,184,75,.55); background: #0d0804;
    color: var(--wk-text); font: 1rem var(--font-ui); padding: 0 1rem 0 2.8rem; box-shadow: 0 0 0 4px rgba(201,150,12,.08);
}
.hm-search input:focus { outline: 2px solid rgba(232,184,75,.6); outline-offset: 1px; }
.hm-search svg { position: absolute; left: 1rem; top: 17px; width: 17px; height: 17px; color: var(--gold-light); pointer-events: none; }
.hm-search .wk-btn { height: 50px; }
.hm-pop { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .8rem; font-size: .8rem; color: var(--wk-muted); }
.hm-shelf { position: relative; height: 260px; }
.hm-shelf img { position: absolute; filter: drop-shadow(0 10px 10px rgba(0,0,0,.5)); }
.hm-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; margin-top: 1.1rem; }
.hm-card {
    position: relative; display: block; overflow: hidden; padding: 1.3rem 1.4rem; min-height: 170px;
    border-radius: 14px; border: 1px solid var(--wk-line); background: var(--wk-panel); color: var(--wk-text);
}
.hm-card:hover { border-color: var(--gold); color: var(--wk-text); }
.hm-card h2 { font-size: 1.5rem; color: var(--gold-light); }
.hm-card p { color: rgba(245,239,224,.82); font-size: .9rem; max-width: 30ch; margin-top: .35rem; }
.hm-go { display: inline-flex; align-items: center; gap: .35rem; margin-top: .8rem; color: var(--gold-light); font-weight: 700; font-size: .85rem; }
.hm-card--dex { background: radial-gradient(90% 120% at 100% 100%, rgba(230,57,70,.28), transparent 60%), var(--wk-panel); }
.hm-trio { position: absolute; right: .25rem; bottom: -.4rem; display: flex; align-items: flex-end; pointer-events: none; }
.hm-trio img { width: 118px; height: 118px; margin-left: -36px; filter: drop-shadow(0 8px 8px rgba(0,0,0,.5)); }
.hm-trio img:nth-child(2) { width: 140px; height: 140px; position: relative; z-index: 1; }
.hm-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 1rem; }
.hm-swatches i { height: 22px; border-radius: 4px; background: var(--c); }
.hm-secs { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .7rem; }
.hm-sec a {
    display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: .8rem; align-items: start; height: 100%;
    padding: .8rem; border-radius: 12px; border: 1px solid var(--wk-line-2); background: rgba(32,21,11,.7); color: var(--wk-text);
}
.hm-sec a:hover { border-color: var(--wk-line); background: var(--wk-panel-2); color: var(--wk-text); }
.hm-sec .wk-icon { width: 46px; height: 46px; border-radius: 10px; --accent: var(--c); }
.hm-sec .wk-icon img { width: 28px; height: 28px; }
.hm-sec b { display: block; font-size: .98rem; }
.hm-sec span.s { display: block; font-size: .82rem; color: var(--wk-muted); line-height: 1.4; margin-top: .1rem; }
.hm-sec em { display: block; font-style: normal; font-size: .76rem; color: var(--gold-light); margin-top: .3rem; }
.hm-all {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .8rem;
    padding: .8rem 1rem; border: 1px dashed var(--wk-line); border-radius: 10px; color: var(--wk-muted); font-size: .9rem;
}
.hm-all b { color: var(--gold-light); }

/* ── Pokédex ── */
.dx-filters {
    position: sticky; top: var(--wk-bar); z-index: 20; margin: 0 -.25rem 1rem; padding: .7rem .25rem;
    background: rgba(17,11,5,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--wk-line-2);
    display: grid; gap: .6rem;
}
.dx-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.dx-field { position: relative; display: flex; }
.dx-field--grow { flex: 1 1 14rem; }
.dx-field input, .dx-field select {
    width: 100%; height: 38px; border-radius: 8px; border: 1px solid var(--wk-line); background: #0d0804;
    color: var(--wk-text); font: .9rem var(--font-ui); padding: 0 .8rem;
}
.dx-field input { padding-left: 2.2rem; }
.dx-field svg { position: absolute; left: .7rem; top: 11px; width: 16px; height: 16px; color: var(--wk-muted); pointer-events: none; }
.dx-field select { padding-right: 1.8rem; min-width: 9.5rem; }
.dx-field input:focus, .dx-field select:focus { outline: 2px solid rgba(232,184,75,.55); outline-offset: 1px; }
.dx-types { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.dx-types::-webkit-scrollbar { display: none; }
.dx-types button {
    flex: none; height: 28px; padding: 0 .7rem; border: 0; border-radius: 999px; cursor: pointer;
    font: 700 .76rem var(--font-ui); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.3); opacity: .55;
}
.dx-types button:hover { opacity: .85; }
.dx-types button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px #110b05, 0 0 0 3.5px currentColor; }
.dx-count { margin-left: auto; font-size: .84rem; color: var(--wk-muted); white-space: nowrap; }
.dx-fbtn, .dx-sheet-head, .dx-apply { display: none; }
.dx-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: .65rem; }
.dx-grid > li > a {
    position: relative; display: flex; flex-direction: column; height: 100%; padding: .5rem .7rem .7rem;
    border-radius: 12px; border: 1px solid var(--wk-line-2); background: rgba(32,21,11,.75); color: var(--wk-text);
    transition: border-color .15s, transform .15s;
}
.dx-grid > li > a:hover { border-color: var(--gold); transform: translateY(-1px); color: var(--wk-text); }
.dx-grid s { width: 86%; margin: 0 auto .15rem; text-decoration: none; }
.dx-grid i { font-style: normal; position: absolute; top: .5rem; left: .65rem; z-index: 2; font-size: .72rem; color: var(--wk-muted); font-variant-numeric: tabular-nums; }
.dx-grid b { font-family: var(--font-display); font-weight: 400; font-size: .95rem; color: var(--gold-light); line-height: 1.25; overflow-wrap: normal; word-break: normal; hyphens: auto; }
.dx-grid a > span { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .4rem; }
.dx-grid a > span .ty, .dx-grid a > span .rr { font-size: .68rem; padding: .02rem .45rem; }
.dx-grid .rr { display: inline-block; border: 1px solid currentColor; border-radius: 4px; line-height: 1.5; white-space: nowrap; }
.dx-grid .rr-none, .dx-grid .rr-unknown, .dx-grid .rr-snack { border-style: dashed; }
.dx-more { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-top: 1.25rem; font-size: .88rem; color: var(--wk-muted); }
.dx-grid.is-limited > li.is-later { display: none; }

/* ── Pokémon page ── */
.pk-hero {
    display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.75rem; padding: 1.4rem;
    border-radius: 16px; border: 1px solid var(--wk-line);
    background: radial-gradient(90% 120% at 0% 0%, color-mix(in srgb, var(--tc, #c9960c) 22%, transparent), transparent 60%), linear-gradient(180deg, #24170c, #1b1209);
}
.pk-art { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.pk-art .wk-art { width: 100%; }
.pk-art-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.pk-info { min-width: 0; display: flex; flex-direction: column; gap: .7rem; }
.pk-info h1 { font-size: clamp(2rem, 4vw, 2.6rem); color: var(--gold-light); line-height: 1; letter-spacing: .02em; }
.pk-types { display: flex; flex-wrap: wrap; gap: .4rem; }
.pk-types .wiki-type { font-size: .82rem; padding: .2rem .8rem; }
.pk-intro { font-family: var(--font-body); font-size: .95rem; line-height: 1.6; color: rgba(245,239,224,.88); max-width: 62ch; }
.pk-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--wk-line-2); border: 1px solid var(--wk-line-2); border-radius: 10px; overflow: hidden; }
.pk-facts > div { background: #1c130a; padding: .6rem .8rem; min-width: 0; }
.pk-facts dt { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--wk-muted); }
.pk-facts dd { margin: .15rem 0 0; font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pk-facts dd small { font-weight: 400; color: var(--wk-muted); font-size: .78rem; }
.wk-tabs {
    position: sticky; top: var(--wk-bar); z-index: 20; margin: 1.25rem 0 0; padding: .5rem 0;
    background: rgba(17,11,5,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--wk-line-2);
}
.wk-tabs ol { list-style: none; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
.wk-tabs ol::-webkit-scrollbar { display: none; }
.wk-tabs a { display: inline-flex; align-items: center; height: 34px; padding: 0 .9rem; border-radius: 999px; font-size: .88rem; font-weight: 500; color: var(--wk-muted); white-space: nowrap; }
.wk-tabs a:hover { color: var(--gold-light); }
.wk-tabs a.is-on { background: var(--gold-light); color: var(--ink); }
.pk-callout { margin-top: 1.25rem; }

.pk-spawns { display: grid; gap: .8rem; }
.pk-spawn { padding: 1rem 1.1rem; display: grid; gap: .85rem; }
.pk-spawn--snack { border-style: dashed; }
.pk-spawn-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; font-size: .92rem; }
.pk-spawn-head .lv { font-weight: 700; font-variant-numeric: tabular-nums; }
.pk-spawn-head .s { color: var(--wk-muted); }
.pk-spawn-head .lbl { font-weight: 700; color: var(--wk-text); }
.pk-label { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wk-muted); margin-bottom: .4rem; }
.pk-spawn .wiki-dchips { gap: .35rem; }
.pk-spawn .bc { font: .84rem var(--font-ui); padding: .2rem .6rem; border-radius: 999px; }
.pk-spawn .wiki-dim { font-size: .82rem; }
.pk-conds { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.pk-cond { padding: .55rem .75rem; border-radius: 10px; border: 1px solid var(--wk-line-2); background: #1b1209; font-size: .88rem; overflow-wrap: anywhere; }
.pk-cond .or { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--wk-muted); margin-bottom: .2rem; }
.pk-boost { display: flex; align-items: center; gap: .4rem; font-size: .88rem; color: #8fdcb4; }
.pk-best { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.pk-best b { color: var(--gold-light); font-weight: 700; }
.pk-best small { color: var(--wk-muted); }
.pk-odds { margin-top: .8rem; }
.pk-odds > summary, .pk-more > summary {
    cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 8px;
    border: 1px solid var(--wk-line); color: var(--gold-light); font-size: .86rem; list-style: none;
}
.pk-odds > summary::-webkit-details-marker, .pk-more > summary::-webkit-details-marker { display: none; }
.pk-odds[open] > summary, .pk-more[open] > summary { margin-bottom: .7rem; }

.pk-evo { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem 1rem; padding: 1rem; }
.pk-evo-stage { display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.pk-evo-mon { display: flex; flex-direction: column; align-items: center; gap: .15rem; color: var(--wk-text); width: 128px; text-align: center; }
.pk-evo-mon:hover { color: var(--gold-light); }
.pk-evo-mon .wk-art { width: 112px; }
.pk-evo-mon b { font-family: var(--font-display); font-weight: 400; color: var(--gold-light); font-size: .95rem; }
.pk-evo-mon small, .pk-evo-how { font-size: .75rem; color: var(--wk-muted); }
.pk-evo-mon[aria-current] .wk-art { box-shadow: 0 0 0 2px var(--gold-light); }
.pk-evo-arrow { display: flex; flex-direction: column; align-items: center; gap: .1rem; color: var(--gold); max-width: 120px; text-align: center; }
.pk-evo-arrow .pk-evo-how { max-width: 120px; }

.pk-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.pk-stats { padding: .9rem 1rem; display: grid; gap: .45rem; }
.pk-stat { display: grid; grid-template-columns: 4.2rem 2.4rem minmax(0, 1fr); gap: .6rem; align-items: center; font-size: .86rem; }
.pk-stat span { color: var(--wk-muted); }
.pk-stat b { text-align: right; font-variant-numeric: tabular-nums; }
.pk-stat i { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--wk-line-2); overflow: hidden; }
.pk-stat i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 4px; background: var(--c, var(--gold)); }
.pk-stat.is-best span, .pk-stat.is-best b { color: var(--gold-light); }
.pk-total { display: flex; justify-content: space-between; border-top: 1px solid var(--wk-line-2); padding-top: .5rem; font-size: .86rem; color: var(--wk-muted); }
.pk-total b { color: var(--wk-text); }
.pk-match { padding: .9rem 1rem; display: grid; gap: .55rem; }
.pk-match div { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: .5rem; align-items: center; }
.pk-match dt { font-size: .82rem; font-weight: 700; }
.pk-match dd { margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.pk-abil { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; margin-top: 1rem; }
.pk-abil > div { padding: .8rem 1rem; }
.pk-abil b { display: block; }
.pk-abil b small { font-weight: 500; color: var(--gold-light); font-size: .78rem; margin-left: .4rem; }
.pk-abil p { font-size: .86rem; color: var(--wk-muted); margin-top: .2rem; }

.wk-tbl { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.wk-tbl th { text-align: left; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--wk-muted); font-weight: 500; padding: .6rem .8rem; border-bottom: 1px solid var(--wk-line); }
.wk-tbl td, .wk-tbl tbody th { padding: .6rem .8rem; border-bottom: 1px solid var(--wk-line-2); vertical-align: middle; text-align: left; font-weight: 400; }
.wk-tbl tr:last-child td, .wk-tbl tr:last-child th { border-bottom: 0; }
.wk-tbl .r { text-align: right; }
.wk-tbl .src b { display: block; }
.wk-tbl .src small { display: block; color: var(--wk-muted); font-size: .78rem; }
.wk-tbl .ph { display: none; }
.wk-pct { display: inline-flex; align-items: center; gap: .5rem; justify-content: flex-end; white-space: nowrap; }
.wk-pct i { position: relative; display: block; width: 56px; height: 6px; border-radius: 3px; background: var(--wk-line-2); overflow: hidden; }
.wk-pct i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--gold); border-radius: 3px; }
.pk-get .det { color: var(--wk-muted); font-size: .82rem; }
.pk-get .det .wiki-dchips { display: inline-flex; }
.pk-cat { display: inline-flex; align-items: center; gap: .35rem; color: var(--wk-muted); white-space: nowrap; }
.pk-cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pk-moves .lvl { font-weight: 700; color: var(--gold-light); }
.pk-moves .mv { font-weight: 700; }
.pk-movelists { display: grid; gap: .6rem; margin-top: .8rem; }
.pk-movelists .wiki-chips { margin: 0; gap: .35rem .5rem; }
.pk-movelists .wiki-chips li { display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; }
.pk-items { padding: .7rem 1rem; display: grid; gap: .55rem; }
.pk-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: .8rem; align-items: center; }
.pk-item img, .pk-item .wk-noicon { width: 32px; height: 32px; image-rendering: pixelated; }
.pk-item img.wk-block { image-rendering: auto; }
.wk-noicon { display: block; border-radius: 6px; border: 1px dashed var(--wk-line); }
.pk-item b { display: block; font-size: .92rem; }
.pk-item small { color: var(--wk-muted); font-size: .76rem; overflow-wrap: anywhere; }
.pk-item .q { text-align: right; font-size: .86rem; font-variant-numeric: tabular-nums; }
.pk-item .q b { color: var(--gold-light); }
.pk-facts3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--wk-line-2); border: 1px solid var(--wk-line); border-radius: 12px; overflow: hidden; }
.pk-facts3 > div { background: var(--wk-panel); padding: .65rem .9rem; min-width: 0; }
.pk-facts3 dt { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--wk-muted); }
.pk-facts3 dd { margin: .15rem 0 0; font-size: .9rem; overflow-wrap: anywhere; }
.pk-skins { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .65rem; }
.pk-skins a { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .5rem; border-radius: 12px; border: 1px solid var(--wk-line-2); background: var(--wk-panel); color: var(--wk-text); }
.pk-skins a:hover { border-color: var(--gold); color: var(--gold-light); }
.pk-skins .wk-art { width: 100%; }
.pk-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 2.25rem; }
.pk-prevnext a { display: flex; align-items: center; gap: .7rem; padding: .5rem .9rem; border-radius: 12px; border: 1px solid var(--wk-line-2); background: var(--wk-panel); color: var(--wk-text); min-width: 0; }
.pk-prevnext a:hover { border-color: var(--gold); color: var(--wk-text); }
.pk-prevnext a + a, .pk-prevnext .next { justify-content: flex-end; text-align: right; }
.pk-prevnext img { width: 52px; height: 52px; flex: none; }
.pk-prevnext small { display: block; color: var(--wk-muted); font-size: .76rem; }
.pk-prevnext b { font-family: var(--font-display); font-weight: 400; color: var(--gold-light); }
.wk-foot { margin-top: 1.5rem; font-size: .8rem; color: var(--wk-muted); }
.wk-foot a { color: var(--gold-light); }

/* ── Feature, section, biome pages ── */
.ft-glance { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1px; background: var(--wk-line-2); border: 1px solid var(--wk-line); border-radius: 12px; overflow: hidden; }
.ft-glance li { background: var(--wk-panel); padding: .7rem .95rem; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.ft-glance .v { font-family: var(--font-display); font-size: 1.2rem; color: var(--gold-light); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ft-glance .l { font-size: .78rem; color: var(--wk-muted); }
.ft-glance .nt { font-size: .74rem; color: rgba(245,239,224,.5); }
.ft-cmds { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.ft-cmd { display: inline-flex; align-items: center; gap: .6rem; min-height: 36px; padding: .2rem .35rem .2rem .8rem; border-radius: 8px; border: 1px solid var(--wk-line); background: #0d0804; max-width: 100%; }
.ft-cmd code { font: .86rem ui-monospace, Consolas, monospace; color: var(--wk-text); overflow-wrap: anywhere; }
.ft-cmd button { flex: none; border: 0; background: var(--wk-panel-2); color: var(--gold-light); height: 26px; padding: 0 .6rem; border-radius: 6px; font: 500 .75rem var(--font-ui); cursor: pointer; }
.ft-cmd button:not(.is-ready) { visibility: hidden; }
.ft-feats { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .65rem; }
.ft-feats a { display: block; height: 100%; padding: .85rem 1rem; border-radius: 12px; border: 1px solid var(--wk-line-2); background: var(--wk-panel); color: var(--wk-text); }
.ft-feats a:hover { border-color: var(--gold); color: var(--wk-text); }
.ft-feats b { display: block; color: var(--gold-light); font-family: var(--font-display); font-weight: 400; }
.ft-feats span { display: block; font-size: .85rem; color: var(--wk-muted); margin-top: .2rem; }
.wiki-page .wiki-prose { font-family: var(--font-body); }
.wiki-page .wiki-prose h3, .wiki-page .wiki-prose h4 { color: var(--gold-light); }
.wiki-page .wiki-prose blockquote { margin: 1rem 0; padding: .8rem 1rem; border-radius: 10px; border: 1px solid rgba(208,74,59,.55); background: rgba(139,26,26,.22); }
.wiki-page .wiki-hero-img img { border-radius: 14px; }
.wk-list { list-style: none; display: grid; gap: .3rem; }
.wk-list a { display: flex; align-items: baseline; gap: .6rem; padding: .55rem .8rem; border-radius: 10px; border: 1px solid var(--wk-line-2); background: var(--wk-panel); color: var(--wk-text); }
.wk-list a:hover { border-color: var(--gold); color: var(--wk-text); }
.wk-list b { color: var(--gold-light); font-weight: 500; }
.wk-list span { color: var(--wk-muted); font-size: .86rem; }

/* Biome pages: spawn lists with renders */
.bm-list .wk-art { width: 44px; flex: none; }
.bm-mon { display: flex; align-items: center; gap: .6rem; color: var(--wk-text); }
.bm-mon:hover { color: var(--gold-light); }
.bm-mon b { font-weight: 700; }

/* Item icons inside table chips */
.ic .ii { width: 16px; height: 16px; image-rendering: pixelated; vertical-align: -3px; margin-right: .3rem; }
.ic .ii.wk-block { image-rendering: auto; }

/* Older wiki blocks inside the new shell */
.wiki-page .wiki-block { margin-top: 2.25rem; scroll-margin-top: calc(var(--wk-bar) + 4rem); }
.wiki-page .wiki-h2 { color: var(--gold-light); border-bottom-color: var(--wk-line); }
.wiki-page .wiki-table-wrap { border-color: var(--wk-line); border-radius: 12px; background: var(--wk-panel); }
.wiki-page .wiki-table { font-family: var(--font-ui); }
.wiki-page .wiki-table thead th { font-family: var(--font-ui); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: .7rem; color: var(--wk-muted); background: #24180c; }
.wiki-page .wiki-cta { font-family: var(--font-ui); }
.wiki-page .wiki-kv-value, .wiki-page .wiki-num { font-family: var(--font-display); }

/* ── Medium screens: no "on this page" column ── */
@media (max-width: 1180px) {
    .wk--toc { grid-template-columns: 220px minmax(0, 1fr); }
    .wk-toc { display: none; }
    .wk--toc .wk-main > .wiki-cta { display: block; }
}

/* ── Phones and tablets: the menu becomes a bottom sheet ── */
@media (max-width: 900px) {
    .wk, .wk--toc { grid-template-columns: minmax(0, 1fr); padding-top: 1rem; gap: 0; }
    .wk-brand, .wk-crumbs { display: none; }
    .wk-browse { display: inline-flex; }
    .wk-bar-in { gap: .5rem; padding: 0 .75rem; }
    .wk-search { width: auto; flex: 1; margin: 0; }
    .wk-search input { height: 40px; font-size: 1rem; }
    .wk-search kbd { display: none; }
    .wk-side {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1001; max-height: 84vh; max-height: 84dvh;
        padding: .4rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
        background: #1c130a; border-top: 1px solid var(--wk-line); border-radius: 18px 18px 0 0;
        box-shadow: 0 -20px 40px rgba(0,0,0,.5); transform: translateY(105%); transition: transform .25s ease; visibility: hidden;
    }
    .wk-side:target, .wk-side.is-open { transform: none; visibility: visible; }
    .wk-side-grab { display: block; width: 42px; height: 4px; border-radius: 2px; background: #4a3620; margin: .35rem auto .6rem; }
    .wk-side-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
    .wk-side-head b { font-family: var(--font-display); color: var(--gold-light); font-size: 1.15rem; }
    .wk-side-head a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--wk-line); }
    .wk-side .wk-search { display: block; width: 100%; margin: 0 0 .5rem; }
    .wk-side a { padding: .6rem .55rem; font-size: 1rem; }
    .wk-veil { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.55); }
    .wk-head { gap: .8rem; }
    .wk-icon { width: 52px; height: 52px; }
    .wk-icon img { width: 32px; height: 32px; }

    .hm-hero { grid-template-columns: minmax(0, 1fr); padding: 1.25rem 1rem; gap: .4rem; }
    .hm-shelf { order: -1; height: 190px; width: 260px; margin: 0 auto -.5rem; }
    .hm-row { grid-template-columns: minmax(0, 1fr); }
    .hm-search .wk-btn { display: none; }
    .hm-trio img { width: 74px; height: 74px; margin-left: -24px; }
    .hm-trio img:nth-child(2) { width: 90px; height: 90px; }
    .hm-card p { max-width: 21ch; }
    .hm-secs { grid-template-columns: minmax(0, 1fr); gap: .5rem; }

    .pk-hero { grid-template-columns: minmax(0, 1fr); padding: 1rem; gap: .9rem; }
    .pk-art .wk-art { width: min(230px, 70vw); }
    .pk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pk-split { grid-template-columns: minmax(0, 1fr); }
    .wk-tabs { margin-left: -.75rem; margin-right: -.75rem; padding-left: .75rem; padding-right: .75rem; }
    .pk-facts3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .dx-filters { margin: 0 -.75rem .9rem; padding: .6rem .75rem; }
    .dx-row--sheet, .dx-types-row { display: none; }
    .dx-filters.is-open .dx-row--sheet, .dx-filters:target .dx-row--sheet, .dx-filters.is-open .dx-types-row, .dx-filters:target .dx-types-row { display: flex; }
    .dx-fbtn { display: inline-flex; height: 40px; }
    .dx-fbtn em { font-style: normal; background: var(--gold-light); color: var(--ink); border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 0 .45rem; }
    .dx-count { display: none; }
    .dx-filters.is-open, .dx-filters:target {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1001; margin: 0; max-height: 84dvh; overflow-y: auto;
        padding: .8rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
        background: #1c130a; border-top: 1px solid var(--wk-line); border-radius: 18px 18px 0 0;
    }
    .dx-filters.is-open .dx-sheet-head, .dx-filters:target .dx-sheet-head { display: flex; justify-content: space-between; align-items: center; }
    .dx-filters.is-open .dx-sheet-head b, .dx-filters:target .dx-sheet-head b { font-family: var(--font-display); color: var(--gold-light); font-size: 1.15rem; }
    .dx-filters.is-open .dx-row--main, .dx-filters:target .dx-row--main { display: none; }
    .dx-filters.is-open .dx-types, .dx-filters:target .dx-types { flex-wrap: wrap; }
    .dx-filters.is-open .dx-field, .dx-filters:target .dx-field { flex: 1 1 100%; }
    .dx-filters.is-open .dx-field select, .dx-filters:target .dx-field select { height: 44px; }
    .dx-filters.is-open .dx-apply, .dx-filters:target .dx-apply { display: flex; width: 100%; height: 46px; }
    .dx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }

    .pk-facts3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .pk-evo-mon { width: 96px; }
    .pk-evo-mon .wk-art { width: 84px; }
    .pk-prevnext img { width: 40px; height: 40px; }

    /* Tables become rows: no sideways scrolling on phones */
    .wk-tbl thead { display: none; }
    .wk-tbl, .wk-tbl tbody, .wk-tbl tr, .wk-tbl td, .wk-tbl tbody th { display: block; }
    .wk-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .7rem; padding: .7rem .85rem; border-bottom: 1px solid var(--wk-line-2); }
    .wk-tbl tr:last-child { border-bottom: 0; }
    .wk-tbl td, .wk-tbl tbody th { padding: 0; border: 0; }
    .wk-tbl td[data-l]::before { content: attr(data-l) " "; color: var(--wk-muted); font-size: .76rem; }
    .wk-tbl .ph { display: block; }
    .wk-tbl .hp { display: none; }
    .pk-get td.src { grid-row: span 2; }
    .pk-get td.r { justify-self: end; }
    .pk-moves tr { grid-template-columns: 2.6rem minmax(0, 1fr) auto; }
    .pk-moves .lvl { grid-row: span 2; align-self: center; font-size: 1rem; }
    .pk-moves .ty { grid-column: 3; grid-row: 1; justify-self: end; }
    .pk-moves .ct { grid-column: 2; grid-row: 2; font-size: .8rem; }
    .pk-moves .ph { grid-column: 3; grid-row: 2; text-align: right; font-size: .76rem; color: var(--wk-muted); }

    .wiki-page .wiki-table-wrap--stack, .wiki-page .wk-rows { overflow: visible; border: 0; background: none; }
    .wk-rows .wiki-table { min-width: 0; }
    .wk-rows .wiki-table thead { display: none; }
    .wk-rows .wiki-table, .wk-rows .wiki-table tbody, .wk-rows .wiki-table tr, .wk-rows .wiki-table th, .wk-rows .wiki-table td { display: block; width: 100%; min-width: 0 !important; }
    .wk-rows .wiki-table tr { border: 1px solid var(--wk-line); border-radius: 10px; margin-bottom: .55rem; background: var(--wk-panel); padding: .2rem 0; }
    .wk-rows .wiki-table th, .wk-rows .wiki-table td { border: 0; padding: .35rem .8rem; }
    .wk-rows .wiki-table tbody th { font-weight: 700; color: var(--gold-light); }
    .wk-rows .wiki-table td[data-label]::before { content: attr(data-label); display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--wk-muted); margin-bottom: .1rem; }
    .wk-rows .wiki-table td:empty, .wk-rows .wiki-table td.is-empty { display: none; }
    .wiki-page .wiki-table-wrap--tall { max-height: none; }
}

@media (max-width: 420px) {
    .pk-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .pk-facts > div { padding: .5rem .65rem; }
    .pk-evo { gap: .2rem .4rem; padding: .8rem .4rem; }
    .pk-evo-arrow .pk-evo-how { max-width: 72px; }
}

@media (prefers-reduced-motion: reduce) {
    .wk-side, .dx-grid > li > a { transition: none; }
}

/* Small "Play" box in the "on this page" column (the full one stays in the article) */
.wk-play { display: grid; gap: .45rem; padding: .8rem; border-radius: 12px; border: 1px solid var(--wk-line);
    background: linear-gradient(160deg, rgba(139,26,26,.35), var(--wk-panel)); }
.wk-play b { font-family: var(--font-display); color: var(--gold-light); font-size: .92rem; line-height: 1.3; }
.wk-play code { font-size: .74rem; word-break: break-all; color: var(--wk-text); background: #0d0804;
    border: 1px solid var(--wk-line); border-radius: 6px; padding: .35rem .45rem; }
.wk-play .wk-btn { height: 32px; font-size: .82rem; }
.wk-play .wk-btn:not(.is-ready) { visibility: hidden; }
.pk-get .det span { margin-right: .5rem; }
.pk-get .det span + span::before { content: ""; }

/* Page filters (commands, features) */
.wk-pagesearch { display: flex; gap: .5rem; margin: 0 0 1.25rem; max-width: 560px; }
.wk-pagesearch input {
    flex: 1; min-width: 0; height: 42px; border-radius: 8px; border: 1px solid var(--wk-line); background: #0d0804;
    color: var(--wk-text); font: .95rem var(--font-ui); padding: 0 .9rem;
}
.wk-pagesearch input:focus { outline: 2px solid rgba(232,184,75,.55); outline-offset: 1px; }
.wk-pagesearch .wk-btn { height: 42px; }
.wiki-page .wiki-letters { justify-content: flex-start; margin-bottom: 1rem; font-family: var(--font-ui); }
.wiki-page .wiki-letters a { font-family: var(--font-ui); font-weight: 700; border-radius: 8px; }

/* Biome spawn lists (compact rows: big biomes list hundreds of Pokémon) */
.wiki-spawnlist th { min-width: 13rem; }
.wiki-spawnlist th a { display: inline-flex; align-items: center; gap: .55rem; vertical-align: middle; font-weight: 700; }
.wiki-spawnlist th img { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.45)); }
@media (max-width: 700px) {
    .wk-rows--grid .wiki-spawnlist td::before { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--wk-muted); }
    .wk-rows--grid .wiki-spawnlist td:nth-of-type(1)::before { content: "Day"; }
    .wk-rows--grid .wiki-spawnlist td:nth-of-type(2)::before { content: "Night"; }
    .wk-rows--grid .wiki-spawnlist td:nth-of-type(3)::before { content: "Rarity"; }
    .wk-rows--grid .wiki-spawnlist td:nth-of-type(4)::before { content: "Levels"; }
    .wk-rows--grid .wiki-spawnlist td:nth-of-type(5)::before { content: "When"; }
    .wk-rows--grid .wiki-spawnlist td:nth-of-type(6)::before { content: "Base stats"; }
    .wk-rows--grid .wiki-spawnlist tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wk-rows--grid .wiki-spawnlist th { grid-column: 1 / -1; }
}

/* Skin gallery */
.sk-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.sk-card a {
    display: flex; flex-direction: column; align-items: center; gap: .15rem; height: 100%; padding: .6rem .6rem .8rem;
    border-radius: 14px; border: 1px solid var(--wk-line-2); background: var(--wk-panel); color: var(--wk-text); text-align: center;
}
.sk-card a:hover { border-color: var(--gold); color: var(--wk-text); }
.sk-card .wk-art { width: 100%; }
.sk-card b { font-family: var(--font-display); font-weight: 400; color: var(--gold-light); }
.sk-card small { color: var(--wk-muted); font-size: .78rem; }
.sk-card:target a { border-color: var(--gold-light); box-shadow: 0 0 0 2px rgba(232,184,75,.35); }
.sk-store { margin-top: 1.5rem; }
@media (max-width: 700px) {
    .sk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .wiki-spawnlist th { min-width: 0; }
}

/* Filter rows never push the page wider (the type chips scroll inside their row) */
.dx-filters, .dx-row, .dx-row > * { min-width: 0; }
.dx-types-row .dx-types { flex: 1 1 auto; }
.wk-main, .wk-main > * { max-width: 100%; }

/* Phones: table rows as compact two-line entries (title, then label/value pairs side by side) */
@media (max-width: 700px) {
    .wk-rows .wiki-table tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem; padding: .55rem .8rem; margin-bottom: .45rem; }
    .wk-rows .wiki-table tbody th { flex: 1 1 100%; width: auto; padding: 0; }
    .wk-rows .wiki-table td { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .35rem; width: auto; max-width: 100%; padding: 0; }
    .wk-rows .wiki-table td[data-label]::before { display: inline; margin: 0; }
    .wk-rows .wiki-table td .wiki-dchips { display: inline-flex; }
    .wk-rows .wiki-commands td { display: block; width: 100%; }
    .wk-rows .wiki-usage, .wk-rows .wiki-cmd { white-space: normal; overflow-wrap: anywhere; }
    .wk-rows--grid .wiki-spawnlist tr { display: grid; }
}

/* Table groups as tabs (wiki.js); filtering shows every group again */
.has-tabs .wiki-dtable-group.is-off { display: none; }
.has-tabs.is-filtering .wiki-dtable-group.is-off { display: block; }
.has-tabs .wiki-dtable-group .wiki-h3 { display: none; }
.has-tabs.is-filtering .wiki-dtable-group .wiki-h3 { display: block; }
.has-tabs [data-table-tabs] { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
.has-tabs [data-table-tabs] .wiki-chip { white-space: nowrap; }
.wiki-chips a[aria-current="true"] { background: var(--gold-light); border-color: var(--gold-light); color: var(--ink); font-weight: 700; }

/* Lists styled as rows or chips never show bullets (flex items keep list-item markers) */
.wiki-page ul[role="list"], .wiki-page ol[role="list"], .wk-chips, .wiki-page .wiki-chips { list-style: none; }

/* 3D viewer (wiki-3d.js draws into a canvas over the picture) */
.wk-art.is-3d > img, .wk-art.is-3d > .wk-silhouette { visibility: hidden; }
.wk-art.is-3d::after { display: none; }
.wk-3d-canvas { position: absolute; inset: -6%; width: 112%; height: 112%; z-index: 2; cursor: grab; }
.wk-3d-canvas:active { cursor: grabbing; }
.pk-art-btns [aria-pressed="true"] { border-color: var(--gold); color: var(--gold-light); }

/* Skin gallery dialog */
.sk-dialog { margin: auto; width: min(560px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 1rem; border-radius: 18px;
    border: 1px solid var(--wk-line); background: #1c130a; color: var(--wk-text); font-family: var(--font-ui); }
.sk-dialog::backdrop { background: rgba(0,0,0,.65); }
.sk-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.sk-dialog-head b { font-family: var(--font-display); color: var(--gold-light); font-size: 1.2rem; }
.sk-stage { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: .5rem auto 0;
    background: radial-gradient(circle at 50% 45%, rgba(201,150,12,.22), transparent 68%); border-radius: 50%; }
.sk-stage img { width: 100%; height: 100%; object-fit: contain; }
.sk-stage.is-3d img { visibility: hidden; }
.sk-hint { text-align: center; font-size: .8rem; color: var(--wk-muted); margin: .25rem 0 0; }
.sk-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .75rem; }

/* Phones: long row lists fold after 30 rows (wiki.js adds the "Show all" button) */
.wk-rows tr.is-folded, .wiki-compact > li.is-folded { display: none !important; }
.wk-unfold { display: flex; margin: .5rem auto 0; }

.hm-shelf img { height: auto; }
@media (max-width: 700px) {
    .wiki-page .wiki-usage, .wiki-page .wiki-cmd, .wiki-page .wiki-cmdlist code { white-space: normal; overflow-wrap: anywhere; }
    .wiki-page .wiki-cmdlist-item { min-width: 0; }
}

/* Regional forms next to their spawn label */
.pk-form { width: 40px; height: 40px; margin: -.4rem -.1rem -.4rem 0; vertical-align: middle; filter: drop-shadow(0 3px 4px rgba(0,0,0,.45)); }

/* Cosmetics gallery: the button on the cosmetics feature and section pages */
.wk-gallery-link { margin: .25rem 0 1.25rem; }
/* Player guides about the feature (/guides): long titles wrap on phones */
.wk-guide-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.wk-guide-links .wk-btn { height: auto; min-height: 38px; padding: .45rem 1rem; white-space: normal; text-align: left; }
@media (max-width: 700px) {
    /* A set (hat, weapon, back piece) fits one row */
    .cs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
    .cs-grid .sk-card a { padding: .4rem .3rem .55rem; }
    .cs-grid .sk-card b { font-size: .82rem; line-height: 1.15; }
    .cs-grid .sk-card small { font-size: .7rem; }
}

/* Wild variants: the line switch and name filter on one row; particle effect toggles in the 3D dialog */
.wd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 1.25rem; }
.wd-tools .wk-pagesearch { flex: 1 1 220px; margin: 0; }
.wd-tools .wk-seg small { font-size: .75rem; opacity: .75; }
.wd-text { margin: -.35rem 0 .9rem; }
.sk-auras { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .6rem; }
.sk-auras .wk-chip { cursor: pointer; color: var(--wk-muted); }
.sk-auras .wk-chip[aria-pressed="true"] { border-color: var(--gold); background: var(--wk-panel-2); color: var(--gold-light); }
.sk-auras .wk-chip:not(:disabled):hover { border-color: var(--gold); }
.sk-auras .wk-chip:disabled { opacity: .45; cursor: not-allowed; }
