/* Super Smash Bros. Melee wiki (games/super-smash-bros-melee/melee-wiki.mjs). Classes use an mlg- prefix. Pictures are
   taken from the game's own files; stock icons are pixel art shown at whole-number scales. Name plates, emblems and
   silhouettes are white on transparent, so they always sit on the dark stage background. */
.mlg{--mlg-line:color-mix(in srgb,var(--line,#33405a) 85%,#fff 15%);--mlg-soft:color-mix(in srgb,var(--surface,#1b2233) 84%,#000 16%);--mlg-stage:radial-gradient(ellipse at 50% 115%,#2d4f8f 0 28%,transparent 72%),linear-gradient(180deg,#0a1124,#152346);--mlg-gold:#e5c580;font-size:15px;line-height:1.5;min-width:0}
.mlg h1{font-size:clamp(1.45rem,1.1rem + 1.4vw,2rem);line-height:1.15;margin:.2rem 0 .7rem}
.mlg h2{display:flex;align-items:center;gap:8px;font-size:1.15rem;margin:1.6rem 0 .6rem;padding-bottom:.3rem;border-bottom:1px solid var(--mlg-line)}
.mlg h3{font-size:1rem;margin:1.1rem 0 .5rem}
.mlg p{margin:.4rem 0}
.mlg a{color:var(--accent,#bad9ff)}
.mlg small{display:block;color:var(--muted,#aab3c5);font-size:.76rem;line-height:1.3}
.mlg img{max-width:100%;height:auto}
.mlg .mlg-px,.mlg img.mlg-stock{image-rendering:pixelated}
.mlg img.mlg-stock{vertical-align:middle;flex:none}
.mlg-note,.mlg-credit{font-size:.86rem;color:var(--muted,#aab3c5)}
.mlg-credit{font-size:.78rem;margin-top:.6rem}
.mlg-lead{font-size:1.02rem;max-width:72ch}
.mlg-crumbs{font-size:.8rem;color:var(--muted,#aab3c5);margin:.2rem 0 .4rem}
.mlg-crumbs a{color:inherit}
/* Hero */
.mlg-hero{display:grid;grid-template-columns:280px minmax(0,1fr);gap:18px;align-items:start}
.mlg-hero-art{display:flex;flex-direction:column;align-items:center;gap:4px;padding:14px 10px 0;border-radius:8px;text-decoration:none;background:var(--mlg-stage);border:1px solid var(--mlg-line);overflow:hidden}
.mlg .mlg-logo{width:238px;height:auto}
.mlg .mlg-logo-melee{width:150px;height:auto;margin-top:-4px}
.mlg-hero-cast{display:flex;align-items:flex-end;justify-content:center;margin-top:6px}
.mlg-hero-cast img{width:75px;height:auto;margin:0 -4px}
.mlg-facts{display:flex;flex-wrap:wrap;gap:6px;margin:.7rem 0;padding:0}
.mlg-facts>div{background:var(--mlg-soft);border:1px solid var(--mlg-line);border-radius:6px;padding:4px 10px;min-width:0}
.mlg-facts dt{font-size:.68rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#aab3c5)}
.mlg-facts dd{margin:0;font-weight:600;font-size:.9rem;display:flex;align-items:center;gap:6px}
.mlg-facts-sm dd{font-size:.84rem;font-weight:500}
.mlg-cta a{font-weight:700}
/* Topic grid */
.mlg-topics{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.mlg .mlg-topics a{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--text);border:1px solid var(--mlg-line);border-radius:7px;padding:8px;background:var(--mlg-soft);font-size:.82rem;min-width:0}
.mlg-topics strong{display:block;color:var(--accent,#bad9ff);font-size:.95rem}
.mlg-thumb{display:grid;place-items:center;width:72px;height:60px;flex:none;background:var(--mlg-stage);border-radius:4px;overflow:hidden}
.mlg .mlg-thumb img{max-width:68px;max-height:56px;object-fit:contain}
/* Character-select portraits */
.mlg-csps{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:6px}
.mlg .mlg-csp{display:flex;flex-direction:column;text-decoration:none;color:#fff;border:2px solid #2a3b63;border-radius:6px;overflow:hidden;background:#0d1a38}
.mlg .mlg-csp:hover{border-color:var(--mlg-gold)}
.mlg-csp-pic{display:block;aspect-ratio:136/188;background:var(--mlg-stage)}
.mlg .mlg-csp-pic img{display:block;width:100%;height:100%;object-fit:cover}
.mlg-csp-name{display:flex;align-items:center;gap:4px;padding:3px 5px;background:#000;font-size:.74rem;line-height:1.1}
.mlg-csp-name strong{font-weight:700;letter-spacing:.02em;min-width:0;overflow-wrap:anywhere}
.mlg-stack{display:flex;flex-direction:column;align-items:center}
/* Series */
.mlg-series{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}
.mlg-series>div{display:grid;grid-template-columns:64px minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:8px;padding:6px;border:1px solid var(--mlg-line);border-radius:7px;background:var(--mlg-soft);font-size:.85rem}
.mlg-emblem{grid-row:1/3;display:grid;place-items:center;height:52px;border-radius:5px;background:var(--mlg-stage)}
.mlg .mlg-emblem img{max-height:44px;width:auto}
.mlg-series-cast{display:flex;flex-wrap:wrap;gap:2px;margin-top:3px}
.mlg-emblem-sm{display:inline-grid;place-items:center;width:30px;height:24px;border-radius:3px;background:#0d1a38}
.mlg .mlg-emblem-sm img{max-height:20px;width:auto}
/* Stages */
.mlg-stagegrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:6px}
.mlg .mlg-stagegrid a{display:flex;flex-direction:column;text-decoration:none;color:var(--text);text-align:center}
.mlg-stagegrid a>span{display:block;border-radius:5px;overflow:hidden;border:1px solid var(--mlg-line)}
.mlg .mlg-stagegrid img{display:block;width:100%;height:auto;aspect-ratio:64/56;object-fit:cover}
.mlg-stagegrid small{margin-top:3px;color:var(--text);font-size:.74rem}
.mlg-stages{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:10px}
.mlg-stage{display:grid;grid-template-columns:128px minmax(0,1fr);gap:10px;padding:8px;border:1px solid var(--mlg-line);border-radius:8px;background:var(--mlg-soft);scroll-margin-top:12px}
.mlg-stage-pic{display:block;align-self:start;border-radius:5px;overflow:hidden}
.mlg .mlg-stage-pic img{display:block;width:100%;height:auto}
.mlg-stage p{font-size:.84rem}
.mlg .mlg-plate{display:block;max-width:100%;height:auto;padding:4px 8px;box-sizing:border-box;border-radius:4px;background:#0d1a38}
/* Challengers */
.mlg-challenge{display:grid;grid-template-columns:200px minmax(0,1fr);gap:12px;align-items:center;padding:10px;border-radius:8px;background:repeating-linear-gradient(135deg,#1a0606 0 14px,#2a0909 14px 28px);border:1px solid #5a1a1a}
.mlg .mlg-warning{width:100%;height:auto}
.mlg-sils{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:6px}
.mlg .mlg-sils a{display:flex;flex-direction:column;align-items:center;text-align:center;text-decoration:none;color:#fff}
.mlg .mlg-sils img{height:80px;width:auto}
.mlg-sils small{color:#f0c9c9;font-size:.7rem}
/* Items */
.mlg-itemstrip{display:flex;flex-wrap:wrap;gap:4px}
.mlg .mlg-itemstrip a{display:grid;place-items:center;width:56px;height:56px;border-radius:6px;background:var(--mlg-stage)}
.mlg .mlg-itemstrip img{width:48px;height:48px}
.mlg-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:6px}
.mlg .mlg-items>a,.mlg .mlg-items>div{display:flex;flex-direction:column;align-items:center;text-align:center;text-decoration:none;color:var(--text);font-size:.78rem;line-height:1.2;border:1px solid var(--mlg-line);border-radius:7px;background:var(--mlg-soft);overflow:hidden;padding-bottom:5px}
.mlg-items span{display:grid;place-items:center;width:100%;height:76px;background:var(--mlg-stage);margin-bottom:4px}
/* Movie frames, clear pictures, galleries */
.mlg-frames,.mlg-clears{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px}
.mlg-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.mlg-frames figure,.mlg-clears figure,.mlg-gallery figure,.mlg-costumes figure,.mlg-hudgrid figure{margin:0;display:flex;flex-direction:column;border:1px solid var(--mlg-line);border-radius:7px;overflow:hidden;background:var(--mlg-soft)}
.mlg-frames figure>a,.mlg-clears figure>a{display:block;background:#000}
.mlg .mlg-frames img,.mlg .mlg-clears img{display:block;width:100%;height:auto}
.mlg-gallery figure>a{display:grid;place-items:center;min-height:120px;padding:6px;background:var(--mlg-stage)}
.mlg .mlg-gallery img{max-height:170px;width:auto;object-fit:contain}
.mlg .mlg-gallery img.mlg-stagepic{width:100%;max-height:none}
.mlg-frames figcaption,.mlg-clears figcaption,.mlg-gallery figcaption,.mlg-costumes figcaption,.mlg-hudgrid figcaption{display:flex;align-items:center;gap:5px;padding:5px 8px;font-size:.78rem;line-height:1.3;color:var(--muted,#aab3c5)}
/* Fighters page */
.mlg-jump{display:flex;flex-wrap:wrap;gap:5px;margin:.8rem 0}
.mlg .mlg-jump a{display:inline-flex;align-items:center;gap:4px;padding:2px 9px 2px 3px;border:1px solid var(--mlg-line);border-radius:999px;background:var(--mlg-soft);text-decoration:none;font-size:.8rem}
.mlg-fighter,#others{scroll-margin-top:12px}
.mlg-fighter-intro{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;align-items:start}
.mlg-fighter-pic{display:block;border-radius:6px;overflow:hidden;background:var(--mlg-stage);border:2px solid #2a3b63}
.mlg .mlg-fighter-pic img{display:block;width:100%;height:auto}
.mlg-unlock{display:flex;gap:10px;align-items:center;padding:6px 8px;border-radius:7px;background:repeating-linear-gradient(135deg,#1a0606 0 14px,#2a0909 14px 28px);border:1px solid #5a1a1a}
.mlg-unlock .mlg-facts{margin:0}
.mlg .mlg-sil{height:96px;width:auto;flex:none}
.mlg-links{font-size:.84rem}
.mlg-costumes{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:6px}
.mlg-costumes figure>a{display:block;background:var(--mlg-stage)}
.mlg .mlg-costumes img:not(.mlg-stock){display:block;width:100%;height:auto}
.mlg-sheik{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.mlg-sheik span{display:flex;gap:4px}
.mlg-others{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:8px}
.mlg-others>div{display:flex;gap:10px;align-items:center;padding:8px;border:1px solid var(--mlg-line);border-radius:8px;background:var(--mlg-soft)}
.mlg-others img{background:var(--mlg-stage);border-radius:6px;padding:4px}
/* Match texts */
.mlg-hudgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.mlg-hudgrid figure{align-items:center;justify-content:space-between;background:var(--mlg-stage);padding-top:8px}
.mlg .mlg-hudgrid img{max-height:70px;width:auto}
.mlg-hudgrid figcaption{align-self:stretch;background:var(--mlg-soft)}
.mlg-digits{display:flex;align-items:center;gap:2px;flex-wrap:wrap;padding:8px;border-radius:7px;background:var(--mlg-stage)}
.mlg-digits .mlg-note{margin-left:12px;color:#ccd6ea}
/* Lists */
.mlg-tips ul,.mlg-trivia{padding-left:1.2rem}
.mlg-tips li,.mlg-trivia li{margin:.25rem 0}
.mlg-faq details{border:1px solid var(--mlg-line);border-radius:6px;padding:6px 10px;margin:6px 0;background:var(--mlg-soft)}
.mlg-faq summary{cursor:pointer;font-weight:600}
.mlg-sources{margin-top:1.4rem;font-size:.85rem;color:var(--muted,#aab3c5)}
.mlg-sources summary{cursor:pointer;font-weight:600;color:var(--text)}
.mlg.mlg-insert{clear:both;margin-top:1.6rem}
/* Right rail */
.mlg-rail-art{display:block}
.mlg-rail-art img{display:block;width:100%;height:auto}
.mlg-rail-nav{margin-top:12px}
.mlg-rail-nav h2{font-size:1rem;margin:0 0 6px}
.mlg-rail-nav a{display:flex;gap:8px;align-items:center;padding:3px 0;text-decoration:none;color:var(--text);font-size:.86rem;border-bottom:1px solid rgba(255,255,255,.08)}
.mlg-rail-nav img{image-rendering:pixelated;flex:none}
@media (max-width:760px){
 .mlg-hero,.mlg-challenge{grid-template-columns:minmax(0,1fr)}
 .mlg-hero-art{max-width:340px}
 .mlg-challenge .mlg-warning{max-width:220px}
 .mlg-fighter-intro{grid-template-columns:110px minmax(0,1fr)}
}
@media (max-width:420px){
 .mlg-stages,.mlg-others{grid-template-columns:minmax(0,1fr)}
 .mlg-stage{grid-template-columns:100px minmax(0,1fr)}
 .mlg-csps{grid-template-columns:repeat(3,minmax(0,1fr))}
 .mlg-stagegrid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .mlg-fighter-intro{grid-template-columns:minmax(0,1fr)}
 .mlg-fighter-pic{max-width:150px}
 .mlg-unlock{flex-direction:column;align-items:flex-start}
}
