/* EarthBound wiki: reference tables for items, enemies, locations and secrets. */
.eb-catalog .eb-heading{margin:26px 0 8px;font-size:21px}
.eb-catalog .eb-note{margin:0 0 10px;font-size:14px;line-height:1.5;opacity:.85}
.eb-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 12px}
.eb-tools label{font-weight:700;font-size:14px}
.eb-tools input{flex:1 1 220px;max-width:420px;padding:8px 11px;border:1px solid #775045;border-radius:6px;background:var(--surface);color:inherit;font:inherit}
.eb-jump{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 6px}
.eb-jump a{padding:6px 11px;border:1px solid #775045;border-radius:5px;font-size:14px;text-decoration:none}
.eb-jump small{opacity:.7}
.eb-table-section{scroll-margin-top:16px}
.eb-table-wrap{overflow-x:auto;margin:0 0 18px;border:1px solid #775045;border-radius:6px;background:var(--surface)}
.eb-table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.4}
.eb-table th,.eb-table td{padding:7px 10px;text-align:left;vertical-align:top;border-bottom:1px solid rgba(119,80,69,.45)}
.eb-table thead th{position:sticky;top:0;background:var(--surface);font-size:12px;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.eb-table tbody th{font-weight:700;white-space:nowrap}
.eb-table tbody tr:nth-child(even){background:rgba(127,127,127,.07)}
.eb-table tbody tr:last-child th,.eb-table tbody tr:last-child td{border-bottom:0}
.eb-table tbody tr:target{outline:2px solid #e6c4ff;outline-offset:-2px}
.eb-catalog .smash-catalog-grid.earthbound-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:700px){.eb-table{font-size:13px}.eb-table th,.eb-table td{padding:6px 8px}.eb-catalog .smash-catalog-grid.earthbound-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.eb-table td.eb-pic{width:112px;padding:5px 8px}
.eb-thumb img{display:block;width:96px;height:auto;image-rendering:pixelated;border-radius:3px}
.eb-figures{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.eb-figures figure{margin:0;max-width:220px}
.eb-figures img{display:block;max-width:100%;height:auto;image-rendering:pixelated;border:1px solid #775045;border-radius:4px}
.eb-figures figcaption{font-size:12px;margin-top:4px;opacity:.8}

/* In-game screenshots beside guide sections and sprites in the cast table (earthbound-screenshots.mjs). */
.eb-shots{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0 6px}
.eb-shots figure{margin:0;flex:0 1 300px;max-width:300px}
.eb-shots a{display:block}
.eb-shots img{display:block;width:100%;height:auto;image-rendering:pixelated;border:1px solid #775045;border-radius:4px}
.eb-shots figcaption{font-size:13px;line-height:1.45;margin-top:5px;opacity:.85}
.eb-table td.eb-sprite{text-align:center}
.eb-table td.eb-sprite .eb-thumb img{display:inline-block;width:auto;height:48px;max-width:96px;object-fit:contain;border-radius:0}
@media (max-width:700px){.eb-shots figure{flex-basis:100%;max-width:340px}}

/* Spriters Resource sprites, PSI frames and maps (earthbound-sprites.mjs). Pixel art keeps whole-number sizes. */
.eb-spr{display:flex;flex-wrap:wrap;gap:14px;margin:12px 0 8px;align-items:flex-end}
.eb-spr figure{margin:0;max-width:100%}
.eb-spr a{display:block}
.eb-spr img{display:block;max-width:100%;height:auto;image-rendering:pixelated}
.eb-spr img.eb-smooth{image-rendering:auto;border:1px solid #775045;border-radius:4px}
.eb-spr figcaption{font-size:13px;line-height:1.45;margin-top:5px;opacity:.85;max-width:300px}
.eb-spr-cast figure{flex:0 1 170px}
.eb-spr-cast figcaption{font-size:12px}
.eb-spr-maps{align-items:flex-start}
.eb-spr-maps figure{flex:0 1 auto}
.eb-battle{display:flex;flex-wrap:wrap;align-items:flex-end;gap:6px;margin-top:8px}
.eb-battle img{display:block;max-width:100%;height:auto;image-rendering:pixelated}
.eb-battle small{flex-basis:100%;font-size:11px;opacity:.7}
.eb-maplinks{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:4px;font-size:12px;white-space:nowrap}

/* All enemies by area on the Enemies page (earthbound-enemies.mjs): battle sprite cards with animated map sprites. */
.eb-foes{scroll-margin-top:16px}
.eb-foes .eb-jump{margin-bottom:14px}
.eb-foe-top{margin:4px 0 14px}
.eb-foe-area{scroll-margin-top:16px}
.eb-foe-area h3.eb-heading{display:flex;align-items:baseline;gap:8px;margin:22px 0 10px;font-size:19px}
.eb-foe-area h3 small{font-size:13px;font-weight:400;opacity:.65}
.eb-foe-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.eb-foe{position:relative;display:flex;flex-direction:column;border:1px solid #775045;border-radius:6px;background:var(--surface);overflow:hidden;scroll-margin-top:16px}
.eb-foe:target{outline:2px solid #e6c4ff;outline-offset:1px}
.eb-foe-boss{border-color:#b0477a;box-shadow:inset 0 3px 0 #b0477a}
.eb-foe-art{display:flex;align-items:flex-end;justify-content:center;height:154px;padding:8px 8px 10px;background:#f1e8d4 repeating-conic-gradient(#e7dcc3 0 25%,transparent 0 50%) 0 0/16px 16px}
.eb-foe-art img{display:block;max-width:100%;max-height:100%;image-rendering:pixelated;object-fit:contain}
.eb-foe-walk{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;padding:4px 4px 1px;border:1px solid rgba(119,80,69,.6);border-radius:5px;background:#f1e8d4}
.eb-foe-walk img{display:block;image-rendering:pixelated}
.eb-foe-walk small{font-size:9px;line-height:1.4;color:#5a4038;letter-spacing:.02em;white-space:nowrap}
.eb-foe-body{display:flex;gap:8px;align-items:flex-start;justify-content:space-between;padding:8px 8px 10px 10px}
.eb-foe-text{min-width:0}
.eb-foe-body h4{margin:0;font-size:14px;line-height:1.3}
.eb-foe-body p{margin:4px 0 0;font-size:12px;line-height:1.4;opacity:.8}
.eb-foe-tag{display:inline-block;margin-top:5px;padding:1px 7px;border-radius:9px;background:#b0477a;color:#fff;font-size:11px;font-weight:700;letter-spacing:.03em}
@media (max-width:700px){.eb-foe-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.eb-foe-art{height:146px}}
@media (prefers-reduced-motion:reduce){.eb-foe-walk{display:none}}
.eb-foe[hidden],.eb-foe-area[hidden]{display:none}
@media (max-width:700px){.eb-foes .eb-jump{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;-webkit-overflow-scrolling:touch}.eb-foes .eb-jump a{flex:0 0 auto}}
.eb-foe-wide{grid-column:span 2}
.eb-foe-wide .eb-foe-art{gap:10px}
.eb-foe-art a{display:flex;align-items:flex-end;justify-content:center;max-width:100%;max-height:100%;min-width:0}
.eb-foe-body small{display:block;font-size:11px;letter-spacing:.05em;text-transform:uppercase;opacity:.7;margin-bottom:2px}
.eb-foe-body h3{margin:0;font-size:14px;line-height:1.3}
.eb-foe-body h3 a{color:inherit;text-decoration:none}

/* Wiki home page (earthbound-home.mjs): compact layout matching the Diamond/Pearl home. */
.ebh{--ebh-line:color-mix(in srgb,var(--line,#393732) 85%,#fff 15%);--ebh-soft:color-mix(in srgb,var(--surface,#1c1c1c) 80%,#000 20%);font-size:15px;line-height:1.5;min-width:0}
.ebh h1{font-size:clamp(1.45rem,1.1rem + 1.4vw,2rem);line-height:1.15;margin:.2rem 0 .7rem}
.ebh h2{font-size:1.15rem;margin:1.6rem 0 .6rem;padding-bottom:.3rem;border-bottom:1px solid var(--ebh-line)}
.ebh p{margin:.4rem 0}
.ebh a{color:var(--accent,#e6c4ff)}
.ebh small{display:block;color:var(--muted,#aaa69d);font-size:.78rem}
.ebh img{max-width:100%;height:auto}
.ebh .ebh-px,.ebh-rail .ebh-px{image-rendering:pixelated}
.ebh-hero{display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px;align-items:start}
.ebh-hero>a img{display:block;width:100%;border-radius:5px}
.ebh-lead{font-size:1.02rem;max-width:70ch}
.ebh-facts{display:flex;flex-wrap:wrap;gap:6px;margin:.7rem 0;padding:0}
.ebh-facts>div{background:var(--ebh-soft);border:1px solid var(--ebh-line);border-radius:6px;padding:4px 10px}
.ebh-facts dt{font-size:.68rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#aaa69d)}
.ebh-facts dd{margin:0;font-weight:600;font-size:.9rem}
.ebh-cta a{font-weight:700}
.ebh-topics,.ebh-heroes,.ebh-sanct{display:grid;gap:8px}
.ebh-topics{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.ebh-heroes{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.ebh-sanct{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
.ebh .ebh-topics a,.ebh .ebh-heroes a,.ebh .ebh-sanct a{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--text);border:1px solid var(--ebh-line);border-radius:7px;padding:8px;background:var(--ebh-soft);font-size:.82rem;min-width:0}
.ebh .ebh-topics a:hover,.ebh .ebh-heroes a:hover,.ebh .ebh-sanct a:hover,.ebh .ebh-foes a:hover{border-color:var(--accent,#e6c4ff)}
.ebh-topics strong,.ebh-heroes strong,.ebh-sanct strong{display:block;color:var(--accent,#e6c4ff);font-size:.95rem}
.ebh-thumb{display:grid;place-items:center;width:64px;height:56px;flex:none;background:#111;border-radius:4px;overflow:hidden}
.ebh-thumb img{max-width:64px;max-height:56px;width:auto;height:auto;object-fit:contain}
.ebh-heroes a{align-items:flex-start}
.ebh-heroes a>span{flex:1;min-width:0}
.ebh-heroes em{display:block;font-style:normal;font-size:.76rem;color:var(--muted,#aaa69d);margin-bottom:2px}
.ebh .ebh-hero-art{width:auto;height:72px;flex:none}
.ebh .ebh-walk{width:32px;height:48px;flex:none;align-self:center;padding:4px;border-radius:5px;background:#f1e8d4;box-sizing:content-box}
.ebh-guard{display:grid;place-items:end center;width:64px;height:60px;flex:none;padding:2px;border-radius:4px;background:#f1e8d4 repeating-conic-gradient(#e7dcc3 0 25%,transparent 0 50%) 0 0/12px 12px}
.ebh-guard img{max-width:60px;max-height:56px;width:auto;height:auto}
.ebh-foes{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px}
.ebh .ebh-foes a{display:flex;flex-direction:column;align-items:center;gap:4px;text-decoration:none;color:var(--text);font-size:.78rem;text-align:center;border:1px solid var(--ebh-line);border-radius:7px;overflow:hidden;background:var(--ebh-soft);padding-bottom:6px}
.ebh-foes a>span{display:grid;place-items:end center;width:100%;height:64px;padding:6px 4px;box-sizing:border-box;background:#f1e8d4 repeating-conic-gradient(#e7dcc3 0 25%,transparent 0 50%) 0 0/12px 12px}
.ebh-foes img{max-height:52px;width:auto}
.ebh-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
.ebh-gallery figure{margin:0;font-size:.76rem;text-align:center}
.ebh-gallery figure>a{display:block;border-radius:5px;overflow:hidden;background:#111}
.ebh-gallery img{display:block;width:100%;height:auto;image-rendering:pixelated}
.ebh-gallery figcaption{margin-top:3px}
.ebh-tips ul,.ebh-trivia{padding-left:1.3rem;margin:.3rem 0}
.ebh-tips li,.ebh-trivia li{margin:.25rem 0}
.ebh-trivia{font-size:.9rem}
.ebh-faq details{border:1px solid var(--ebh-line);border-radius:6px;padding:6px 10px;margin:6px 0;background:var(--ebh-soft)}
.ebh-faq summary{cursor:pointer;font-weight:600}
.ebh-sources{margin-top:1.4rem;font-size:.82rem;color:var(--muted,#aaa69d)}
.ebh-sources summary{cursor:pointer}
.ebh-sources ul{columns:2;column-gap:20px;padding-left:1.1rem}
.ebh-sources li{overflow-wrap:anywhere}
.ebh-rail .infobox>a>img{display:block;width:100%;height:auto;max-height:220px;object-fit:contain}
.ebh-rail-nav{border:1px solid var(--line);border-radius:6px;padding:10px;background:var(--surface);margin-top:12px}
.ebh-rail-nav h2{font-size:.95rem;margin:0 0 .4rem}
.ebh-rail-nav a{display:flex;gap:8px;align-items:center;padding:4px 0;text-decoration:none;font-size:.85rem;border-top:1px solid var(--line)}
.ebh-rail-nav small{display:block;font-size:.7rem;color:var(--muted,#aaa69d)}
.ebh-rail-face{display:grid;place-items:center;width:36px;height:34px;flex:none;border-radius:3px;background:#f1e8d4}
.ebh-rail-face img{max-width:34px;max-height:32px;width:auto;height:auto}
@media (max-width:700px){.ebh-hero{grid-template-columns:1fr}.ebh-hero>a{max-width:300px}.ebh-sources ul{columns:1}.ebh-foes{grid-template-columns:repeat(4,minmax(0,1fr))}.ebh-topics{grid-template-columns:1fr 1fr}.ebh-topics a{flex-direction:column;align-items:flex-start}}
@media (prefers-reduced-motion:reduce){.ebh-walk{display:none}}

/* Characters page animations (earthbound-characters.mjs): walking map sprites extracted from the game. */
.eb-anim-img{display:block;image-rendering:pixelated;object-fit:contain;max-width:100%}
.eb-walk-badge{display:inline-flex;flex-direction:column;align-items:center;gap:1px;margin:8px 0 2px;padding:5px 7px 2px;border-radius:6px;background:#f1e8d4;border:1px solid rgba(119,80,69,.6)}
.eb-walk-badge small{font-size:9px;line-height:1.3;color:#5a4038;letter-spacing:.02em}
.eb-anim-tile{display:grid;place-items:end center;min-width:56px;height:72px;padding:6px 8px;box-sizing:border-box;border-radius:5px;background:#f1e8d4 repeating-conic-gradient(#e7dcc3 0 25%,transparent 0 50%) 0 0/12px 12px}
.eb-anim-tile .eb-anim-img{max-height:60px}
.eb-anim-heroes{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px;margin:8px 0 14px}
.eb-anim-hero{border:1px solid #775045;border-radius:6px;padding:8px 10px 10px;background:var(--surface)}
.eb-anim-hero h3{margin:0 0 6px;font-size:16px}
.eb-anim-row{display:flex;flex-wrap:wrap;gap:8px}
.eb-anim-row figure{margin:0;text-align:center;width:72px}
.eb-anim-row figcaption{font-size:11px;line-height:1.3;margin-top:3px;opacity:.8}
.eb-table th.eb-anim-col,.eb-table td.eb-anim-cell{text-align:center;white-space:nowrap}
.eb-table td.eb-anim-cell .eb-anim-img{display:inline-block;vertical-align:bottom;margin:0 2px;padding:3px;border-radius:4px;background:#f1e8d4}
.eb-anim-inline{display:flex;gap:4px;margin-top:6px;padding:4px 6px;border-radius:5px;background:#f1e8d4;width:max-content;max-width:100%;align-items:flex-end}
.eb-anim-inline .eb-anim-img{max-height:96px}
.eb-anim-folk{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px;margin:8px 0 14px}
.eb-anim-folk article{display:flex;gap:10px;align-items:center;border:1px solid #775045;border-radius:6px;padding:8px;background:var(--surface)}
.eb-anim-folk h3{margin:0;font-size:14px;line-height:1.3}
.eb-anim-folk small{display:block;font-size:11px;letter-spacing:.05em;text-transform:uppercase;opacity:.7}
.eb-anim-folk p{margin:2px 0 0;font-size:12px;line-height:1.4;opacity:.85}
@media (prefers-reduced-motion:reduce){.eb-walk-badge,.eb-anim-inline{display:none}}
