/* Super Mario World wiki (games/super-mario-world/smw-wiki.mjs). Classes use an smwg- prefix. Sprites, poses and maps
   are pixel art from the game: they are shown at whole-number scales with pixelated scaling, on a light sky backdrop. */
.smwg{--smwg-line:color-mix(in srgb,var(--line,#2c4535) 85%,#fff 15%);--smwg-soft:color-mix(in srgb,var(--surface,#1a2a21) 82%,#000 18%);--smwg-stage:linear-gradient(180deg,#68a8e8,#a8d8f8);--smwg-hi:#ffd860;--smwg-warm:#ffc28a;font-size:15px;line-height:1.5;min-width:0}
.smwg h1{font-size:clamp(1.45rem,1.1rem + 1.4vw,2rem);line-height:1.15;margin:.2rem 0 .7rem}
.smwg h2{font-size:1.15rem;margin:1.6rem 0 .6rem;padding-bottom:.3rem;border-bottom:1px solid var(--smwg-line)}
.smwg h3{font-size:1rem;margin:1.1rem 0 .5rem}
.smwg p{margin:.4rem 0}
.smwg a{color:var(--accent,#b6ec9c)}
.smwg small{display:block;color:var(--muted,#a9b5ad);font-size:.76rem;line-height:1.3}
.smwg img{max-width:100%;height:auto}
.smwg-px,.smwg .smwg-px,.smwg-rail .smwg-px,img.smwg-standin.smwg-px{image-rendering:pixelated;image-rendering:crisp-edges}
@supports (image-rendering:pixelated){.smwg-px,.smwg .smwg-px,.smwg-rail .smwg-px,img.smwg-standin.smwg-px{image-rendering:pixelated}}
.smwg-note,.smwg-credit{font-size:.86rem;color:var(--muted,#a9b5ad)}
.smwg-credit{font-size:.78rem;margin-top:.6rem}
.smwg-lead{font-size:1.02rem;max-width:72ch}
.smwg-crumbs{font-size:.8rem;color:var(--muted,#a9b5ad);margin:.2rem 0 .4rem}
.smwg-crumbs a{color:inherit}
/* Hero */
.smwg-hero{display:grid;grid-template-columns:270px minmax(0,1fr);gap:18px;align-items:start}
.smwg-hero-art{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 10px 10px;border-radius:8px;text-decoration:none;background:linear-gradient(180deg,#58a0e8 0,#9cd0f8 72%,#5cbc4c 72%,#3e9a36 100%);border:1px solid var(--smwg-line)}
.smwg .smwg-logo{width:208px;height:auto}
.smwg-hero-cast{display:flex;align-items:flex-end;justify-content:center;gap:14px;min-height:150px;padding-bottom:4px}
.smwg-facts{display:flex;flex-wrap:wrap;gap:6px;margin:.7rem 0;padding:0}
.smwg-facts>div{background:var(--smwg-soft);border:1px solid var(--smwg-line);border-radius:6px;padding:4px 10px}
.smwg-facts dt{font-size:.68rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#a9b5ad)}
.smwg-facts dd{margin:0;font-weight:600;font-size:.9rem}
.smwg-cta a{font-weight:700}
/* Topic grid */
.smwg-topics{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.smwg .smwg-topics a{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--text);border:1px solid var(--smwg-line);border-radius:7px;padding:8px;background:var(--smwg-soft);font-size:.82rem;min-width:0}
.smwg-topics strong{display:block;color:var(--accent,#b6ec9c);font-size:.95rem}
.smwg-thumb{display:grid;place-items:center;width:72px;height:60px;flex:none;background:var(--smwg-stage);border-radius:4px;overflow:hidden}
.smwg .smwg-thumb img{max-width:68px;max-height:56px;height:auto;object-fit:contain}
/* Cards with a dark stage */
.smwg-cards,.smwg-suits,.smwg-moves{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.smwg .smwg-cards>a,.smwg .smwg-cards>div,.smwg .smwg-suits>a,.smwg .smwg-suits>div,.smwg .smwg-moves>div{display:flex;flex-direction:column;align-items:center;text-align:center;text-decoration:none;color:var(--text);border:1px solid var(--smwg-line);border-radius:7px;overflow:hidden;background:var(--smwg-soft);padding-bottom:8px;font-size:.85rem;min-width:0}
.smwg-cards strong,.smwg-suits strong,.smwg-moves strong{display:block;margin-top:6px;padding:0 6px;color:var(--accent,#b6ec9c);font-size:.9rem;line-height:1.2}
.smwg-cards small,.smwg-suits small,.smwg-moves small{padding:2px 8px 0}
.smwg-stage{display:grid;place-items:center;width:100%;height:150px;box-sizing:border-box;background:var(--smwg-stage);overflow:hidden}
.smwg .smwg-stage img{max-height:150px;max-width:100%;height:auto;object-fit:contain}
.smwg .smwg-stage img.smwg-roomimg,.smwg .smwg-thumb img.smwg-roomimg{width:100%;height:100%;max-width:none;max-height:none;object-fit:cover}
.smwg-stage-boss{position:relative}
.smwg-inset{position:absolute;right:5px;bottom:5px;display:grid;place-items:center;width:46%;height:62%;border-radius:5px;background:rgba(4,8,6,.88);box-shadow:0 0 0 1px var(--smwg-line)}
.smwg .smwg-inset img{max-width:94%;max-height:94%;width:auto;height:auto;object-fit:contain}
.smwg-area-cards{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}
.smwg-suits{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
.smwg-suit-pics{display:flex;align-items:flex-end;justify-content:center;gap:14px;width:100%;min-height:132px;padding:10px 0 8px;background:var(--smwg-stage)}
.smwg-moves{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
.smwg-moves .smwg-stage{height:140px}
h3.smwg-sub{font-size:.95rem;color:var(--muted,#a9b5ad);font-weight:600;margin:.8rem 0 .5rem}
/* Sprite strips */
.smwg-sprites{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px}
.smwg .smwg-sprites>a{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;text-decoration:none;color:var(--text);font-size:.8rem;line-height:1.2;padding:0 0 6px;border:1px solid var(--smwg-line);border-radius:7px;background:var(--smwg-soft);overflow:hidden}
.smwg-sprites>a>span{display:grid;place-items:center;width:100%;height:96px;background:var(--smwg-stage)}
.smwg .smwg-sprites img{max-height:88px;max-width:96px;height:auto;object-fit:contain}
.smwg-sprites-sm{grid-template-columns:repeat(auto-fill,minmax(92px,1fr))}
.smwg-sprites-sm>a>span{height:80px}
.smwg .smwg-sprites-sm img{max-height:72px;max-width:84px}
/* Picture galleries and strips */
.smwg-gallery,.smwg-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.smwg-gallery figure,.smwg-strip figure{margin:0;display:flex;flex-direction:column;border:1px solid var(--smwg-line);border-radius:7px;overflow:hidden;background:var(--smwg-soft)}
.smwg-gallery figure>a,.smwg-strip figure>a{display:grid;place-items:center;min-height:150px;background:var(--smwg-stage)}
.smwg .smwg-gallery figure img,.smwg .smwg-strip figure img{max-height:200px;max-width:100%;height:auto;object-fit:contain}
.smwg-gallery figcaption,.smwg-strip figcaption{padding:6px 8px;font-size:.8rem;line-height:1.3;color:var(--muted,#a9b5ad)}
.smwg-gallery figcaption strong{display:block;color:var(--text)}
/* Rooms */
.smwg-rooms{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.smwg-roomcard{margin:0;border:1px solid var(--smwg-line);border-radius:7px;overflow:hidden;background:var(--smwg-soft)}
.smwg-roomcard>a{display:block;background:var(--smwg-stage);aspect-ratio:256/176}
.smwg .smwg-roomcard img{display:block;width:100%;height:100%;object-fit:cover}
.smwg-roomcard figcaption{padding:6px 8px;font-size:.82rem}
.smwg-roomcard strong{display:block}
/* Areas page */
.smwg-jump{display:flex;flex-wrap:wrap;gap:6px;margin:.8rem 0}
.smwg .smwg-jump a{padding:4px 10px;border:1px solid var(--smwg-line);border-radius:999px;background:var(--smwg-soft);text-decoration:none;font-size:.85rem}
.smwg-jump small{display:inline;color:var(--muted,#a9b5ad);margin-left:3px}
.smwg-area{scroll-margin-top:12px}
.smwg-area-intro{display:grid;grid-template-columns:256px minmax(0,1fr);gap:14px;align-items:start}
.smwg-area-pic{display:grid;place-items:center;background:var(--smwg-stage);border-radius:6px;overflow:hidden;border:1px solid var(--smwg-line)}
.smwg .smwg-area-pic img{display:block}
/* Enemies page */
.smwg-bosslist{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}
.smwg-boss{display:grid;grid-template-columns:150px minmax(0,1fr);gap:10px;padding:8px;border:1px solid var(--smwg-line);border-radius:8px;background:var(--smwg-soft);scroll-margin-top:12px}
.smwg-boss h3{margin:.1rem 0 .2rem;font-size:1rem}
.smwg-boss p{font-size:.85rem}
.smwg-boss-pic{position:relative;display:block;align-self:start;background:var(--smwg-stage);border-radius:5px;overflow:hidden;aspect-ratio:256/176}
.smwg .smwg-boss-pic>img{display:block;width:100%;height:100%;object-fit:cover}
.smwg-foes{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:8px}
.smwg-foe{display:grid;grid-template-columns:96px minmax(0,1fr);gap:10px;padding:8px;border:1px solid var(--smwg-line);border-radius:8px;background:var(--smwg-soft);scroll-margin-top:12px}
.smwg-foe-pic{display:grid;place-items:center;height:96px;border-radius:5px;background:var(--smwg-stage);overflow:hidden}
.smwg .smwg-foe-pic img{max-width:92px;max-height:92px;height:auto;object-fit:contain}
.smwg-foe h4{margin:0 0 .15rem;font-size:.95rem;color:var(--accent,#b6ec9c)}
.smwg-foe p{font-size:.82rem;margin:.2rem 0}
.smwg-foe-stats{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.smwg-hp{display:inline-block;padding:1px 7px;border-radius:4px;background:#2a1b10;color:var(--smwg-warm);font-size:.78rem;border:1px solid #5a3b22}
.smwg-hp b{font-size:.88rem}
.smwg-dmg{display:inline-flex;align-items:baseline;gap:3px;padding:1px 7px;border:1px solid var(--smwg-line);border-radius:4px;font-size:.78rem;line-height:1.3;white-space:nowrap}
.smwg-dmg b{font-size:.84rem}
.smwg-dmg i{font-style:normal;color:var(--muted,#a9b5ad)}
.smwg-dmg i:first-child{margin-right:2px;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em}
.smwg-dmg-none{padding:2px 7px;color:var(--muted,#a9b5ad)}
.smwg-also{color:var(--muted,#a9b5ad)}
/* Tables */
.smwg-tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.smwg-table{width:100%;border-collapse:collapse;font-size:.85rem}
.smwg-table th,.smwg-table td{padding:6px 8px;border-bottom:1px solid var(--smwg-line);text-align:left;vertical-align:middle}
.smwg-table thead th{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted,#a9b5ad)}
.smwg-tablepic{display:block;width:112px;aspect-ratio:256/176;background:var(--smwg-stage);border-radius:4px;overflow:hidden}
.smwg .smwg-tablepic img{display:block;width:100%;height:100%;object-fit:cover}
/* Lists */
.smwg-tips ul,.smwg-trivia{padding-left:1.2rem}
.smwg-tips li,.smwg-trivia li{margin:.25rem 0}
.smwg-faq details{border:1px solid var(--smwg-line);border-radius:6px;padding:6px 10px;margin:6px 0;background:var(--smwg-soft)}
.smwg-faq summary{cursor:pointer;font-weight:600}
.smwg-sources{margin-top:1.4rem;font-size:.85rem;color:var(--muted,#a9b5ad)}
.smwg-sources summary{cursor:pointer;font-weight:600;color:var(--text)}
/* Inserted into existing pages */
.smwg.smwg-insert{clear:both;margin-top:1.6rem}
.smwg-strip{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.smwg-strip figure>a{min-height:140px}
/* Right rail */
.smwg-rail-art{display:block}
.smwg-rail-art img{display:block;width:100%;height:auto}
.smwg-rail-nav{margin-top:12px}
.smwg-rail-nav h2{font-size:1rem;margin:0 0 6px}
.smwg-rail-nav a{display:flex;gap:8px;align-items:center;padding:4px 0;text-decoration:none;color:var(--text);font-size:.86rem;border-bottom:1px solid var(--smwg-line,rgba(255,255,255,.08))}
.smwg-rail-nav small{display:block;color:var(--muted,#a9b5ad);font-size:.7rem}
.smwg-rail-pic{flex:none;width:58px;aspect-ratio:256/176;border-radius:3px;overflow:hidden;background:#2a5c94}
.smwg-rail-pic img{display:block;width:100%;height:100%;object-fit:cover}
@media (max-width:760px){
 .smwg-hero,.smwg-area-intro{grid-template-columns:minmax(0,1fr)}
 .smwg-hero-art{max-width:320px}
 .smwg-area-pic{justify-self:start;max-width:100%}
 .smwg-boss{grid-template-columns:120px minmax(0,1fr)}
}
@media (max-width:420px){
 .smwg-foes,.smwg-bosslist{grid-template-columns:minmax(0,1fr)}
 .smwg-cards,.smwg-suits,.smwg-moves{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Super Mario World additions */
.smwg-world-cards{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}
.smwg .smwg-stage.smwg-mapstage{background:#2a5c94}
.smwg .smwg-mapstage img{width:100%;height:100%;max-width:none;max-height:none;object-fit:cover}
.smwg-stage-sm{height:120px;gap:12px;grid-auto-flow:column}
.smwg-forms,.smwg-yoshis{grid-template-columns:repeat(auto-fill,minmax(126px,1fr))}
.smwg .smwg-stage img.smwg-photo{max-height:140px}
.smwg-quote{margin:.6rem 0;padding:10px 14px;border-left:4px solid var(--smwg-hi);background:var(--smwg-soft);border-radius:0 6px 6px 0}
.smwg-quote blockquote{margin:0;font-style:italic}
.smwg-quote figcaption{margin-top:4px;font-size:.78rem;color:var(--muted,#a9b5ad)}
.smwg-cast{font-size:.86rem;line-height:1.7;letter-spacing:.02em}
.smwg-more{display:flex;flex-wrap:wrap;gap:4px;margin:.3rem 0}
.smwg .smwg-more a{display:grid;place-items:center;width:48px;height:48px;border-radius:4px;background:var(--smwg-stage)}
.smwg .smwg-more img{max-width:46px;max-height:46px}
.smwg-foe-pic{text-decoration:none}
.smwg-foesmall{display:flex;flex-wrap:wrap;gap:3px}
.smwg .smwg-foesmall a{display:grid;place-items:center;width:36px;height:36px;border-radius:4px;background:var(--smwg-stage)}
.smwg .smwg-foesmall img{max-width:34px;max-height:34px}
.smwg-levels td:last-child{min-width:160px;width:42%}
.smwg-secret{display:inline-block;margin-left:4px;padding:0 6px;border-radius:999px;background:#7a1f1f;color:#ffd7d0;font-size:.7rem;font-weight:600;vertical-align:middle;white-space:nowrap}
.smwg-world{scroll-margin-top:12px}
.smwg-world-intro{display:grid;grid-template-columns:240px minmax(0,1fr);gap:14px;align-items:start;margin-bottom:.6rem}
.smwg-world-map{display:block;border-radius:6px;overflow:hidden;border:1px solid var(--smwg-line);background:#2a5c94}
.smwg .smwg-world-map img{display:block;width:100%;height:auto}
.smwg-mainmap{margin:.8rem 0}
.smwg-mainmap>a{display:block;max-width:512px;border-radius:6px;overflow:hidden;border:1px solid var(--smwg-line)}
.smwg .smwg-mainmap img{display:block;width:100%;height:auto}
.smwg-levels th[scope=row]{white-space:nowrap}
.smwg-levels td:nth-child(2){min-width:180px}
.smwg .smwg-maps figure>a{background:#2a5c94}
.smwg .smwg-maps figure img{max-height:none;width:100%}
.smwg-boss-pic{display:grid;place-items:center;aspect-ratio:auto;height:130px}
.smwg .smwg-boss-pic>img{max-width:100%;max-height:126px;height:auto;object-fit:contain}
img.smwg-standin{object-fit:contain;background:linear-gradient(180deg,#68a8e8,#a8d8f8)}
@media (max-width:760px){.smwg-world-intro{grid-template-columns:minmax(0,1fr)}.smwg-world-map{max-width:320px}}
.cx-picture:has(img.smwg-char),.bp-related-picture:has(img.smwg-char){display:grid;place-items:center;overflow:hidden;background:linear-gradient(180deg,#68a8e8,#a8d8f8)}
.cx-grid .cx-picture img.smwg-char,.cx-picture img.smwg-char,.bp-related-picture img.smwg-char{padding:0;box-sizing:content-box;max-width:none;max-height:none;object-fit:contain;image-rendering:pixelated;background:none;margin:auto}
/* items page: each item drawn from the game, centred on a sky panel at a whole-number scale */
.cx-picture:has(img.smwg-item){display:grid;place-items:center;overflow:hidden;min-height:150px;background:linear-gradient(180deg,#68a8e8,#a8d8f8)}
.cx-grid .cx-picture img.smwg-item,.cx-picture img.smwg-item{padding:0;box-sizing:content-box;max-width:none;max-height:none;object-fit:contain;image-rendering:pixelated;background:none;margin:auto}
