/* The wiki's look: the game's own fonts (VAG Rounded for titles, Noto Sans for text) and colors. */
@font-face { font-family: "VAG Rounded"; src: url("../assets/ui-icons/vag-rounded-bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("../assets/fonts/noto-sans/NotoSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("../assets/fonts/noto-sans/NotoSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
:root {
  --bg: #e7f2fb; --paper: #ffffff; --ink: #1a2440; --soft: #5b6884; --line: #d6e2ee; --link: #1565c8; --head: #0f2f6b;
  --accent: #26b0e8; --th: #f1f7fd; --mark: #fff3c4; --good: #2e9e52; --bad: #d8453b;
  --shadow: 0 1px 2px rgba(15, 47, 107, .08), 0 6px 18px rgba(15, 47, 107, .07);
  --title: "VAG Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1224; --paper: #111b31; --ink: #e2e9f5; --soft: #9aa7bf; --line: #24324d; --link: #7cc4ff; --head: #c4e4ff;
    --th: #172440; --mark: #3a3410; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1224; --paper: #111b31; --ink: #e2e9f5; --soft: #9aa7bf; --line: #24324d; --link: #7cc4ff; --head: #c4e4ff;
  --th: #172440; --mark: #3a3410; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .25); color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--title); font-weight: 700; color: var(--head); line-height: 1.25; }
h1 { margin: 4px 0 10px; font-size: 32px; }
h2 { font-size: 22px; margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
h3 { font-size: 17px; margin: 18px 0 8px; }
p { margin: 8px 0 12px; }
.lead { font-size: 16.5px; color: var(--soft); margin-top: 0; }
.note { color: var(--soft); font-size: 13.5px; }
mark { background: var(--mark); color: inherit; }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; gap: 14px; align-items: center; height: 60px; padding: 0 18px;
  background:
    radial-gradient(1px 1px at 12% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 70%, #cfe9ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 63% 64%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 81% 34%, #bfe6ff 50%, transparent 51%), radial-gradient(1px 1px at 93% 75%, #fff 50%, transparent 51%),
    linear-gradient(180deg, #0c1d4f, #0a1433);
  border-bottom: 3px solid var(--accent); box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.logo { color: #fff; font: 700 20px var(--title); white-space: nowrap; letter-spacing: .2px; }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.find { position: relative; flex: 1; max-width: 480px; min-width: 0; }
#q { width: 100%; padding: 8px 14px; border-radius: 999px; border: 2px solid #4cc3ef; background: #eaf8ff; color: #10295a; font: inherit; font-size: 14px; }
#q:focus { outline: 3px solid rgba(76, 195, 239, .45); outline-offset: 1px; }
#results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 280px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); max-height: 65vh; overflow: auto; }
#results a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
#results a:hover, #results a.on { background: var(--th); text-decoration: none; }
#results small { color: var(--soft); }
.play { margin-left: auto; color: #fff; background: linear-gradient(180deg, #4cc95c, #22963a); padding: 6px 18px; border-radius: 999px; font: 700 15px var(--title); white-space: nowrap; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }
.play:hover { text-decoration: none; filter: brightness(1.08); }
.menu { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 38px; height: 38px; padding: 8px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); cursor: pointer; }
.menu i { display: block; height: 2px; background: #fff; border-radius: 2px; }

/* Page frame */
.wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; max-width: 1340px; margin: 0 auto; padding: 20px 18px 48px; }
.side { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; padding: 4px 4px 12px; }
.side .group + .group { margin-top: 10px; }
.side h4 { margin: 0 0 4px; padding: 0 10px; font: 700 11.5px var(--title); letter-spacing: .8px; text-transform: uppercase; color: var(--soft); }
.side a { display: block; padding: 5px 10px; border-radius: 9px; color: var(--ink); font-size: 14px; }
.side a:hover { background: var(--paper); text-decoration: none; }
.side a[aria-current] { background: var(--paper); color: var(--head); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
main { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 22px 30px 36px; box-shadow: var(--shadow); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--soft); margin-bottom: 6px; }
.crumbs > * + *::before { content: "\203A"; margin-right: 6px; color: var(--soft); }
.toc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 18px; padding: 10px 12px; background: var(--th); border: 1px solid var(--line); border-radius: 14px; }
.toc::before { content: "On this page"; font: 700 12px var(--title); color: var(--soft); text-transform: uppercase; letter-spacing: .6px; margin-right: 4px; }
.toc a { padding: 3px 11px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.toc a:hover { border-color: var(--accent); text-decoration: none; }

/* Tags */
.tags { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px; border-radius: 999px; font: 700 12px/1.6 "Noto Sans", system-ui, sans-serif; color: #fff; background: var(--tc, #64748b); white-space: nowrap; vertical-align: middle; }
p > .tag, td > .tag, td > span > .tag, li > .tag { margin-right: 3px; }
a.tag:hover { text-decoration: none; filter: brightness(1.1); }
.tag img { width: 16px; height: 16px; object-fit: contain; margin-left: -4px; }
.tag.z { background: #22406f; color: #fff; }
.tag.t { background: var(--th); color: var(--ink); border: 1px solid var(--line); }
.tag.place { color: var(--link); }
/* (rarity 0-9 as mogas.json, the game's colour table (game/js/core/rarity.js) a shade darker; Galactic a rainbow) */
.r0, .r1, .r2 { --tc: #74839c; } .r3 { --tc: #2fa548; } .r4 { --tc: #2f7fe0; } .r5 { --tc: #15a596; } .r6 { --tc: #d63fa8; } .r7 { --tc: #d93030; }
.r8 { --tc: #8a4ce0; }
.tag.r9 { background: linear-gradient(90deg, #e04545, #e08a1c, #c9a800, #2fa548, #2f7fe0, #8a4ce0); }
.c-striker { --tc: #e0533a; --cc: #e0533a; } .c-balanced { --tc: #2f8fd8; --cc: #2f8fd8; } .c-tank { --tc: #3f9a55; --cc: #3f9a55; }
.c-mystic { --tc: #8a55d6; --cc: #8a55d6; } .c-sentinel { --tc: #c4860e; --cc: #c4860e; }
.e-fire { --tc: #ee6129; --el: #ee6129; } .e-water { --tc: #2b8fe0; --el: #2b8fe0; } .e-earth { --tc: #9a7240; --el: #9a7240; } .e-air { --tc: #3fb0c9; --el: #3fb0c9; } .e-none { --el: #7f93ad; }
.tag.lv { --tc: #1d4f91; } .tag.good { --tc: var(--good); } .tag.bad { --tc: var(--bad); } .tag.realm { --tc: #6b3fc4; }
.k-wild { --tc: #37a34f; } .k-trainer { --tc: #e08a0b; } .k-guardian { --tc: #d9372c; } .k-gate { --tc: #6b3fc4; } .k-place { --tc: #7b8794; }
.status { --tc: #7b8794; } .status:empty { display: none; } .status.live { --tc: var(--good); } .status.soon { --tc: #e08a0b; }
.stars { color: #f0a800; letter-spacing: 1px; white-space: nowrap; }
.stars .se { color: #3a4560; }
.stars .sh { background: linear-gradient(90deg, #f0a800 50%, #3a4560 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qty { color: var(--soft); font-weight: 700; font-size: 13px; }
.il { white-space: nowrap; }
.il img, .ml img { width: 22px; height: 22px; object-fit: contain; vertical-align: -6px; margin-right: 4px; }
.ai { width: 34px; height: 34px; object-fit: contain; flex: none; image-rendering: auto; }
.ai.sm { width: 20px; height: 20px; vertical-align: -5px; margin-right: 5px; }
.ai.lg { width: 52px; height: 52px; }

/* Blocks */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; margin: 12px 0 16px; }
.facts > div { background: var(--th); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; min-width: 0; }
.facts small { display: block; font: 700 11px var(--title); color: var(--soft); text-transform: uppercase; letter-spacing: .6px; }
.facts b { display: block; font-size: 15px; }
.callout { margin: 10px 0 14px; padding: 12px 16px; border-radius: 12px; border-left: 5px solid var(--cc, var(--accent)); background: color-mix(in srgb, var(--cc, var(--accent)) 9%, var(--paper)); }
.button { display: inline-block; padding: 7px 16px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 14px var(--title); }
.button:hover { text-decoration: none; filter: brightness(1.08); }
.cards-grid { display: grid; gap: 12px; margin: 12px 0 18px; grid-template-columns: repeat(auto-fill, minmax(var(--min, 200px), 1fr)); }
.cards-grid.mogas { --min: 148px; } .cards-grid.nav { --min: 240px; } .cards-grid.classes { --min: 190px; } .cards-grid.abilities { --min: 210px; }
.cards-grid.items { --min: 320px; } .cards-grid.regions { --min: 230px; } .cards-grid.locations { --min: 260px; } .cards-grid.kinds { --min: 200px; }
.cards-grid > a, .cards-grid > article { transition: transform .12s ease, box-shadow .12s ease; }
.cards-grid > a:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }

/* Moga cards and picture rows */
.mc { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px 10px; text-align: center; border: 1px solid var(--line); border-radius: 16px; color: var(--ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--el, #7f93ad) 20%, var(--paper)), var(--paper) 72%); }
.mc img { width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18)); }
.mc b { font: 700 14.5px var(--title); color: var(--head); }
.mc .tags { justify-content: center; }
.mc .tag { font-size: 11px; padding: 0 8px; }
.mc small { color: var(--soft); font-size: 12px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.thumbs a { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--th); border: 1px solid var(--line); }
.thumbs a:hover { border-color: var(--accent); }
.thumbs img { width: 44px; height: 44px; object-fit: contain; }

/* A Moga's page */
.mhead { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: center; padding: 20px 24px; border: 1px solid var(--line); border-radius: 20px;
  background: radial-gradient(circle at 22% 45%, color-mix(in srgb, var(--el) 34%, transparent), transparent 58%), linear-gradient(135deg, color-mix(in srgb, var(--el) 15%, var(--paper)), var(--paper)); }
.portrait { display: flex; align-items: center; justify-content: center; height: 250px; }
.portrait .art { width: 100%; height: 100%; max-height: 236px; overflow: visible; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .15)); }
.portrait img.art { width: 150px; height: 150px; object-fit: contain; }
.minfo h1 { margin: 0 0 8px; font-size: 36px; }
.num { font: 700 13px var(--title); color: var(--soft); letter-spacing: .5px; }
.desc { color: var(--soft); font-size: 15px; margin: 12px 0 4px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0 0; }
.pager a { padding: 4px 14px; border-radius: 999px; background: var(--th); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink); }
.pager a:hover { border-color: var(--accent); text-decoration: none; }
.moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.move { border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px 8px; background: var(--paper); }
.move.wide { grid-column: 1 / -1; }
.move header { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.move header small, .acard small { display: block; font: 700 11px var(--title); color: var(--soft); text-transform: uppercase; letter-spacing: .6px; }
.move header b { font: 700 17px var(--title); color: var(--head); }
.move p { margin: 4px 0 8px; color: var(--soft); font-size: 14px; }
.tiers { list-style: none; margin: 0; padding: 0; }
.tiers li { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-top: 1px dashed var(--line); }
.tiers .lv { flex: none; min-width: 52px; text-align: center; padding: 1px 6px; border-radius: 7px; background: var(--th); color: var(--soft); font-weight: 700; font-size: 12px; }
.tiers small { display: block; color: var(--soft); font-size: 13px; }
.bars { display: grid; gap: 7px; margin: 10px 0 14px; max-width: 640px; }
.bars > div { display: grid; grid-template-columns: 130px 1fr 60px; gap: 12px; align-items: center; font-size: 14px; }
.bars i { position: relative; height: 12px; border-radius: 99px; background: var(--th); border: 1px solid var(--line); overflow: hidden; }
.bars i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, #26b0e8, #2f6fe0); }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
.matchups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.matchups > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); }
.matchups small { flex-basis: 100%; font: 700 11px var(--title); text-transform: uppercase; letter-spacing: .6px; }
.matchups .good { background: color-mix(in srgb, var(--good) 9%, var(--paper)); } .matchups .good small { color: var(--good); }
.matchups .bad { background: color-mix(in srgb, var(--bad) 8%, var(--paper)); } .matchups .bad small { color: var(--bad); }
.found { list-style: none; margin: 8px 0; padding: 0; }
.found li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.found li:last-child { border-bottom: 0; }
.evo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.evo .stage { display: flex; flex-direction: column; gap: 8px; }
.evo .arrow { font-size: 24px; color: var(--soft); }
.evo-m { display: flex; flex-direction: column; align-items: center; width: 140px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); text-align: center; color: var(--ink); }
.evo-m:hover { border-color: var(--accent); text-decoration: none; }
.evo-m.on { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); }
.evo-m img { width: 60px; height: 60px; object-fit: contain; }
.evo-m b { font: 700 14px var(--title); color: var(--head); }
.evo-m small { color: var(--soft); font-size: 11.5px; line-height: 1.35; }

/* Classes and abilities */
.ccard { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-top: 5px solid var(--cc); border-radius: 16px; color: var(--ink); background: color-mix(in srgb, var(--cc) 7%, var(--paper)); }
.ccard .ci { height: 30px; }
.ccard .ci img { height: 28px; width: auto; }
.ccard b { font: 700 19px var(--title); color: var(--cc); }
.ccard > small { color: var(--soft); }
.ccard .uses { display: flex; gap: 6px; }
.ccard .uses > span { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 4px 2px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: 11px; color: var(--soft); }
.ccard .uses i { font: 700 18px var(--title); font-style: normal; color: var(--ink); }
.ccard em { font-style: normal; font-weight: 700; color: var(--cc); font-size: 13.5px; }
.acard { display: grid; grid-template-columns: 40px 1fr; gap: 2px 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); }
.acard .ai { grid-row: span 2; width: 40px; height: 40px; }
.acard b { font: 700 15px var(--title); color: var(--head); margin-right: 6px; }
.acard small { text-transform: none; letter-spacing: 0; font-family: inherit; font-weight: 400; font-size: 12.5px; }
/* (the Buff/Debuff tag beside the count, 2026-10-29: beside a long name it wrapped and made that card taller) */
.acard small .tag { margin-right: 6px; vertical-align: 1px; }
.ahead { display: flex; gap: 14px; align-items: center; }
.ahead p { margin: 0; }

/* Items */
.icard { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.icard:target { outline: 3px solid var(--accent); }
.icard .pic { flex: 0 0 68px; height: 68px; display: grid; place-items: center; border-radius: 14px; background: var(--th); border: 1px solid var(--line); }
.icard .pic img { max-width: 52px; max-height: 52px; }
.icard h3 { margin: 0 0 4px; }
.icard p { margin: 0 0 6px; font-size: 14px; }
.icard ul { margin: 0; padding-left: 18px; color: var(--soft); font-size: 13px; }

/* Regions and locations */
.rcard, .rhead { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; color: #fff; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(5, 12, 35, .78)), var(--pic, none) center / cover, linear-gradient(135deg, #2b4f8f, #1a2d5c); }
.rcard { min-height: 140px; padding: 12px 16px; }
.rcard b { font: 700 19px var(--title); text-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.rhead { min-height: 190px; padding: 18px 22px; margin-bottom: 14px; }
.rhead h1 { color: #fff; margin: 0; font-size: 36px; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.rcard .tag.t, .rhead .tag.t { background: rgba(255, 255, 255, .2) !important; color: #fff !important; border-color: transparent !important; }
.lcard { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); }
.lcard .bg { display: block; width: 100%; height: 118px; object-fit: cover; background: linear-gradient(135deg, #2b4f8f, #1a2d5c); }
.lbody { padding: 10px 14px 12px; }
.lbody h3 { margin: 0 0 6px; }
.lbody p { margin: 8px 0 0; color: var(--soft); font-size: 13.5px; }
.lcard .thumbs { margin: 8px 0 0; gap: 5px; }
.lcard .thumbs a { width: 42px; height: 42px; border-radius: 10px; }
.lcard .thumbs img { width: 38px; height: 38px; }

/* Events */
.evlist { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); margin: 12px 0 18px; }
.evcard { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
.evcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.evcard .date { flex: 0 0 56px; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; color: #fff; background: linear-gradient(160deg, #2fb4ea, #2f5fd0); }
.evcard .date small { font: 700 11px var(--title); text-transform: uppercase; letter-spacing: .6px; }
.evcard .date b { font: 700 24px/1 var(--title); }
.evbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.evbody > b { font: 700 16px var(--title); color: var(--head); }
.evbody > small { color: var(--soft); font-size: 12.5px; }
.evcard > img { width: 52px; height: 52px; object-fit: contain; }

/* Collections */
.sets { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin: 12px 0 18px; }
.set { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--paper); }
.set header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.set h3 { margin: 0; font-size: 15.5px; }
.cardpics { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cardpics img { width: 52px; height: 52px; object-fit: contain; border-radius: 10px; background: var(--th); border: 1px solid var(--line); }
.set footer { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13.5px; padding-top: 8px; border-top: 1px solid var(--line); }
.set footer small { font: 700 11px var(--title); color: var(--soft); text-transform: uppercase; letter-spacing: .6px; }

/* Systems */
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 10px 0 16px; }
.days > div { padding: 10px 12px; border-radius: 14px; background: var(--th); border: 1px solid var(--line); font-size: 13.5px; }
.days small { display: block; font: 700 12px var(--title); color: var(--soft); text-transform: uppercase; margin-bottom: 4px; }
.kcard { padding: 12px 14px; border-radius: 14px; background: var(--th); border: 1px solid var(--line); }
.kcard b { font: 700 16px var(--title); color: var(--head); }
.kcard p { margin: 4px 0 0; font-size: 14px; }
/* (an event's Mogas, each with how to get it; a quest's steps, 2026-10-28) */
.cards-grid.wide { --min: 300px; }
.kcard .row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kcard ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.kcard li { margin: 3px 0; }
.steps { margin: 6px 0 14px; padding-left: 22px; }
.steps li { margin: 6px 0; line-height: 1.5; }
.meter { display: inline-block; min-width: 140px; padding: 0 8px; border-radius: 7px; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 32%, transparent) var(--w), var(--th) var(--w)); }

/* Main page */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 30px; border-radius: 20px; color: #fff; overflow: hidden;
  background:
    radial-gradient(1.5px 1.5px at 8% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 35% 80%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 15%, #e0f4ff 50%, transparent 51%), radial-gradient(1px 1px at 72% 60%, #fff 50%, transparent 51%),
    radial-gradient(circle at 85% 30%, rgba(80, 200, 255, .35), transparent 45%), linear-gradient(135deg, #0d2a6b, #1a5bb8 60%, #2fb4ea); }
.hero h1 { color: #fff; font-size: 38px; margin: 0 0 14px; text-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.counts { display: flex; flex-wrap: wrap; gap: 8px; }
.counts span { padding: 6px 14px; border-radius: 14px; background: rgba(255, 255, 255, .14); font-size: 13px; }
.counts b { display: block; font: 700 22px/1.2 var(--title); }
.parade { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; max-width: 300px; }
.parade img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); animation: bob 3.2s ease-in-out infinite; }
.parade img:nth-child(2n) { animation-delay: -1.1s; } .parade img:nth-child(3n) { animation-delay: -2.2s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .parade img { animation: none; } .cards-grid > a, .evcard { transition: none; } }
.ncard { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); }
.ncard .ni { flex: 0 0 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--th); border: 1px solid var(--line); overflow: hidden; }
.ncard .ni img { max-width: 40px; max-height: 40px; object-fit: contain; }
.ncard .ni img[src$=".jpg"] { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.ncard b { display: block; font: 700 15.5px var(--title); color: var(--head); }
.ncard small { display: block; color: var(--soft); font-size: 12.5px; }
.spot { display: inline-flex; gap: 16px; align-items: center; padding: 12px 22px 12px 14px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--paper)), var(--paper)); }
.spot:hover { text-decoration: none; box-shadow: var(--shadow); }
.spot img { width: 76px; height: 76px; object-fit: contain; }
.spot b { display: block; font: 700 22px var(--title); color: var(--head); margin-bottom: 4px; }

/* Lists: filter bar and tables */
.toolbar { position: sticky; top: 70px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 14px; padding: 10px 12px; border-radius: 14px; background: var(--th); border: 1px solid var(--line); box-shadow: var(--shadow); }
.toolbar input, .toolbar select { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; }
.toolbar input { flex: 1 1 200px; min-width: 0; }
.toolbar input:focus, .toolbar select:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.toolbar .count { margin-left: auto; color: var(--soft); font-size: 13px; font-weight: 700; white-space: nowrap; }
.views { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.views button { padding: 6px 12px; border: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.views button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 700; }
.tw { overflow-x: auto; margin: 8px 0 18px; border: 1px solid var(--line); border-radius: 14px; }
.wt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.wt th { position: sticky; top: 0; background: var(--th); color: var(--soft); font-size: 12.5px; text-align: left; padding: 9px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.wt td { padding: 8px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.wt tbody tr:first-child td { border-top: 0; }
.wt tbody tr:hover td { background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.wt.num td { font-variant-numeric: tabular-nums; }
.wt.sortable th { cursor: pointer; user-select: none; }
.wt.sortable th:hover { color: var(--link); }
.wt th[data-dir="asc"]::after { content: " \25B2"; font-size: 9px; } .wt th[data-dir="desc"]::after { content: " \25BC"; font-size: 9px; }
.wt img.th { width: 38px; height: 38px; object-fit: contain; display: block; }

@media (max-width: 900px) {
  .menu { display: flex; }
  .wrap { display: block; padding: 12px 12px 36px; }
  .side { position: fixed; z-index: 25; top: 60px; left: 0; bottom: 0; width: 270px; max-height: none; padding: 14px 10px 30px; background: var(--paper); border-right: 1px solid var(--line);
    box-shadow: 6px 0 24px rgba(0, 0, 0, .2); transform: translateX(-105%); transition: transform .18s ease; }
  body.nav-open .side { transform: none; }
  main { padding: 16px 16px 28px; border-radius: 16px; }
  h1 { font-size: 27px; }
  .mhead { grid-template-columns: 1fr; padding: 16px; text-align: center; }
  .mhead .tags { justify-content: center; }
  .portrait { height: 190px; }
  .minfo h1 { font-size: 30px; }
  .moves, .matchups { grid-template-columns: 1fr; }
  .toolbar { position: static; }
  .hero { flex-direction: column; align-items: flex-start; padding: 20px; }
  .hero h1 { font-size: 30px; }
  .parade { justify-content: flex-start; max-width: none; }
  .parade img { width: 48px; height: 48px; }
  .bars > div { grid-template-columns: 100px 1fr 52px; }
}
@media (max-width: 560px) {
  .top { gap: 8px; padding: 0 10px; }
  .logo { font-size: 16px; }
  .logo span { display: none; }
  .play { padding: 5px 12px; font-size: 14px; }
  .evlist, .sets, .cards-grid.items { grid-template-columns: 1fr; }
  .cards-grid.mogas { --min: 130px; }
}
