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