/* wiki.ximon.io: game palette (public/style.css, web/style.css) in a reading layout: top bar, sidebar, article, on-this-page.
   Pages are static HTML from scripts/export-wiki.ts. */
:root {
  --bg: #120f0d; --bg-2: #17130f; --card: #201a15; --card-2: #2a221b; --line: #352a21; --line-2: #4a3a2d;
  --text: #fff1dc; --text-2: #e8d5bb; --muted: #b59c80; --accent: #ff7a1a; --accent-hi: #ff8f3d; --yellow: #ffc933; --on-accent: #120f0d;
  --fire: #ff6b4a; --water: #3fa9f5; --earth: #c9965a; --wind: #4fd1a5; --light: #ffc933; --dark: #a37cf0;
  --r: 14px; --top: 60px; --side: 264px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text-2); font: 16px/1.65 "Noto Sans Thai", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, canvas { image-rendering: pixelated; }
h1, h2, h3 { color: var(--text); line-height: 1.25; letter-spacing: -0.01em; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid var(--line); }
.top-in { height: 100%; display: flex; align-items: center; gap: 16px; padding: 0 20px; }
.logo { color: var(--text); font-weight: 700; font-size: 18px; white-space: nowrap; }
.logo span { color: var(--accent); }
.logo b { font-weight: 600; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--card-2); color: var(--yellow); margin-left: 4px; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.logo:hover { text-decoration: none; }
.burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; padding: 10px 9px; cursor: pointer; flex: none; border-radius: 10px; }
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; margin: 4px 0; }
.burger:hover { background: var(--card); }
.srch { position: relative; flex: 1; max-width: 520px; margin-left: 24px; }
.srch input { width: 100%; height: 40px; font: inherit; font-size: 15px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 40px 0 38px; outline: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b59c80' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 13px center; }
.srch input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.srch kbd, .hh-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px/1 ui-monospace, monospace; color: var(--muted); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 6px; }
.srch input:focus + kbd { display: none; }
.sres { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.55); padding: 6px; max-height: min(70vh, 520px); overflow: auto; }
.sres a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.sres a[aria-selected="true"], .sres a:hover { background: var(--card-2); text-decoration: none; }
.sres img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.sres .si { width: 28px; height: 28px; border-radius: 6px; background: var(--card-2); flex: none; }
.sres b { display: block; font-weight: 600; font-size: 14px; }
.sres small { color: var(--muted); font-size: 12px; }
.sres .none { margin: 8px 10px; color: var(--muted); font-size: 14px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; margin-left: auto; }
.lang a { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 10px; border-radius: 999px; min-height: 28px; display: flex; align-items: center; }
.lang a[aria-current] { background: var(--accent); color: var(--on-accent); }
.lang a:hover { text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--on-accent); font: inherit; font-weight: 600; font-size: 15px; border: 0; border-radius: 999px; padding: 10px 20px; min-height: 42px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--yellow); text-decoration: none; }
.btn.sm { font-size: 13px; padding: 6px 14px; min-height: 32px; }
.btn.ghost { background: transparent; color: var(--yellow); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover, .btn.ghost[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.play { min-height: 36px; padding: 6px 16px; font-size: 14px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; border-right: 1px solid var(--line); padding: 20px 14px 24px; background: var(--bg-2); display: flex; flex-direction: column; gap: 18px; scrollbar-width: thin; }
.ng { margin-bottom: 14px; }
.ngh { margin: 0 0 6px 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-size: 14px; line-height: 1.4; }
.side nav a:hover { background: var(--card); text-decoration: none; color: var(--text); }
.side nav a[aria-current] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; font-size: 13px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.side-foot a { color: var(--muted); }
.scrim { position: fixed; inset: var(--top) 0 0 0; background: rgba(0,0,0,.55); z-index: 24; }
.main { min-width: 0; padding: 20px clamp(16px, 4vw, 48px) 0; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text-2); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; max-width: 1180px; }
.cols.has-toc { grid-template-columns: minmax(0, 1fr) 200px; }
.page { min-width: 0; max-width: 920px; padding-bottom: 32px; }
.toc { position: sticky; top: calc(var(--top) + 20px); align-self: start; font-size: 13px; border-left: 1px solid var(--line); padding-left: 14px; max-height: calc(100vh - var(--top) - 40px); overflow: auto; }
.toc p { margin: 0 0 8px; font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc a { display: block; color: var(--muted); padding: 3px 0; }
.toc a:hover, .toc a.on { color: var(--yellow); text-decoration: none; }
.foot { border-top: 1px solid var(--line); margin-top: 24px; padding: 20px 0 32px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13px; color: var(--muted); max-width: 1180px; }
.foot nav { display: flex; gap: 16px; }
.foot a { color: var(--text-2); }
.upd { margin-top: 40px; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }
@media (max-width: 1180px) { .cols.has-toc { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 960px) {
  .burger { display: block; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: var(--top); left: 0; bottom: 0; height: auto; width: min(300px, 86vw); z-index: 25; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 8px 0 32px rgba(0,0,0,.5); }
  .nav-open .side { transform: none; }
  .srch { margin-left: 4px; }
}
@media (max-width: 640px) {
  .top-in { gap: 8px; padding: 0 10px; }
  .logo b, .srch kbd, .play { display: none; }
  .logo { font-size: 16px; }
  .srch input { font-size: 16px; padding-right: 10px; }
  .main { padding-top: 14px; }
}
@media (max-width: 400px) { .logo { display: none; } }

/* ---------- article type ---------- */
.ph { margin: 4px 0 20px; }
.ph h1, .mhead h1 { font-size: clamp(28px, 4vw, 40px); margin: 0; font-weight: 700; }
.ph p { color: var(--muted); margin: 6px 0 0; }
.page h2 { font-size: 23px; margin: 44px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.page h2 small { font-size: 13px; font-weight: 500; color: var(--muted); }
.page h3 { font-size: 17px; margin: 0 0 4px; }
.lead { font-size: 17px; color: var(--text); margin: 0 0 18px; max-width: 760px; }
.small { font-size: 13px; color: var(--muted); }
.callout { border: 1px solid var(--line-2); background: var(--card); border-left: 3px solid var(--yellow); border-radius: 10px; padding: 12px 16px; margin: 18px 0; font-size: 15px; }
.callout.warn { border-left-color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 0 0 20px; }
.facts div { background: var(--card); padding: 12px 16px; }
.facts dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; color: var(--text); font-size: 14px; }
.rules { padding-left: 20px; } .rules li { margin: 6px 0; }
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; border-radius: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tbl th { text-align: center; background: var(--card-2); color: var(--text); font-weight: 600; padding: 9px 10px; font-size: 13px; white-space: nowrap; }
.tbl td { padding: 8px 10px; border-top: 1px solid var(--line); text-align: center; }
.tbl td.l, .tbl th:first-child { text-align: left; }
.tbl.num td { font-variant-numeric: tabular-nums; }
.tbl tr.dim td { color: var(--muted); }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
.tbl.mini { font-size: 13px; } .tbl.mini td, .tbl.mini th { padding: 6px 8px; }
.code { background: #0d0b09; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.7; overflow-x: auto; }
.code code { display: block; font-family: ui-monospace, "SF Mono", Menlo, "Noto Sans Thai", monospace; color: #ffe2b8; white-space: pre-wrap; word-break: break-word; }
.code code + code { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #2a221b; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.kchip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--card-2); color: var(--yellow); border: 1px solid var(--line-2); }
.kchip:hover { border-color: var(--yellow); text-decoration: none; }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--card-2); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
a.pill:hover { text-decoration: none; background: var(--line-2); }
.pair { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--card-2); color: var(--text-2); }
.tag.mut { color: #fff; background: linear-gradient(90deg, #ff4d4d, #ffa94d, #ffe066, #69db7c, #4dabf7, #9775fa); text-shadow: 1px 1px 0 #000; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }

/* game tags (public/style.css element-chip / lean-chip) */
.ico { --size: 20px; display: inline-block; vertical-align: -4px; width: var(--size); height: var(--size); flex: none; background: url(/a/i/icons.png) no-repeat;
  background-size: calc(var(--icons-n, 16) * var(--size)) var(--size); background-position: calc(var(--i, 0) * -1 * var(--size)) 0; image-rendering: pixelated; }
.echip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; font-size: 13px; font-weight: 700; background: var(--el-core); color: var(--el-rim);
  box-shadow: 0 -2px 0 var(--el-rim), 0 2px 0 var(--el-rim), -2px 0 0 var(--el-rim), 2px 0 0 var(--el-rim); }
.lchip { display: inline-flex; align-items: center; padding: 3px 10px; font-size: 13px; font-weight: 700; color: #fff; box-shadow: 3px 3px 0 #0c0a08; }
.lean-attack { --lc: #d9542f; } .lean-defense { --lc: #3a7fc0; } .lean-speed { --lc: #3f9a70; } .lean-balanced { --lc: #9a6ae0; }
.lchip { background: var(--lc); }

/* sprite: idle strip (top row) played with CSS steps; --z scales a 96 px frame */
.sprite { --f: 96px; --z: 1; display: inline-block; flex: none; width: calc(var(--f) * var(--z)); height: calc(var(--f) * var(--z)); background: var(--src) 0 0 / auto 200% no-repeat; image-rendering: pixelated; animation: play calc(var(--ms) * var(--n)) steps(var(--n)) infinite; }
@keyframes play { to { background-position-x: calc(var(--f) * var(--z) * var(--n) * -1); } }
@media (prefers-reduced-motion: reduce) { .sprite { animation: none; } }

/* ---------- home ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 28px 28px; margin: 4px 0 18px; border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 100% 0%, #3b6d9e 0%, #23384c 28%, var(--card) 62%); overflow: hidden; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--yellow); letter-spacing: .06em; text-transform: uppercase; }
.home-hero h1 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 10px; }
.home-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--yellow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero p { margin: 0 0 18px; color: var(--text-2); }
.hh-search { position: relative; width: 100%; max-width: 420px; text-align: left; font: inherit; font-size: 15px; color: var(--muted); background: rgba(0,0,0,.35); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 16px; cursor: text; }
.hh-art { display: grid; grid-template-columns: repeat(3, 1fr); justify-items: center; }
.hh-txt, .hh-art { min-width: 0; }
.hh-art .sprite { --z: 1; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 0 0 8px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; }
.stats b { display: block; font-size: 24px; color: var(--text); line-height: 1.2; }
.stats span { font-size: 12px; color: var(--muted); }
.page h2.hh2 { margin-top: 32px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); transition: border-color .15s, transform .15s; }
.cat:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.cat b { font-size: 16px; } .cat small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.cimg { display: flex; gap: 4px; align-items: flex-end; height: 48px; margin-bottom: 8px; }
.cimg img { object-fit: contain; }
.cimg.mons .sprite { margin: -10px -8px -4px; }
.cshot { width: 100%; height: 56px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; image-rendering: auto; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.box p { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) {
  .home-hero { grid-template-columns: 1fr; padding: 20px; }
  .hh-art { grid-template-columns: repeat(6, 1fr); } .hh-art .sprite { --f: 52px; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .two { grid-template-columns: 1fr; }
}

/* ---------- guide ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 4px 0 8px; }
.steps .sn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 17px; margin-top: 30px; }
.steps h2 { margin-top: 24px !important; }

/* ---------- monsters ---------- */
.filters { display: grid; gap: 10px; margin-bottom: 8px; position: sticky; top: var(--top); z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 10px 0; }
.filters input { height: 42px; font: inherit; font-size: 16px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; outline: none; max-width: 420px; -webkit-appearance: none; }
.filters input:focus { border-color: var(--accent); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { font: inherit; font-size: 13px; color: var(--text-2); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; min-height: 34px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.count { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mcard { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); color: var(--text); transition: border-color .15s, transform .15s; }
.mcard:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.mcard.secret { border-color: var(--yellow); box-shadow: 0 0 0 2px color-mix(in srgb, var(--yellow) 40%, transparent); }
.mcard .sprite { margin-bottom: -6px; }
.mcard b { font-size: 15px; }
.mcard small { color: var(--muted); font-size: 11.5px; line-height: 1.35; margin: 2px 0 8px; }
.mtags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.mtags em { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: var(--lc, var(--card-2)); color: #fff; }
.mtags em.mut { background: linear-gradient(90deg, #ff4d4d, #ffa94d, #69db7c, #4dabf7, #9775fa); text-shadow: 1px 1px 0 #000; }
.empty { color: var(--muted); text-align: center; padding: 24px; }
@media (max-width: 520px) { .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .mcard .sprite { --f: 80px; } }

.mhead { margin: 4px 0 8px; }
.mhead .sub { color: var(--muted); margin: 4px 0 0; }
.infobox { float: right; width: 300px; margin: 0 0 20px 28px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.ib-art { display: grid; place-items: center; padding: 8px 0 0; background: linear-gradient(180deg, #5fb8ff 0%, #a6dcff 70%, #8fcf6a 70%, #6fb54c 100%); }
.ib-art .sprite { margin-bottom: -8px; }
.ib-cap { margin: 0; text-align: center; font-size: 13px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.infobox dl { margin: 0; }
.infobox dl div { display: grid; grid-template-columns: 110px 1fr; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.infobox dl div:first-child { border-top: 0; }
.infobox dt { color: var(--muted); } .infobox dd { margin: 0; color: var(--text); }
@media (max-width: 820px) { .infobox { float: none; width: 100%; margin: 12px 0 8px; } .ib-art .sprite { --f: 80px; } }
.evo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; clear: none; }
.ecol { display: flex; flex-direction: column; gap: 8px; }
.ecol > i { font-style: normal; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.eo { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text); min-height: 112px; justify-content: flex-end; }
a.eo:hover { border-color: var(--accent); text-decoration: none; }
.eo.me { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.eo.mut { border-style: dashed; }
.eo b { font-size: 13px; } .eo small { font-size: 11.5px; color: var(--muted); }
.eo.lock { justify-content: center; color: var(--muted); background: repeating-linear-gradient(135deg, var(--card) 0 10px, var(--bg-2) 10px 20px); }
.eo .q { font-size: 32px; font-weight: 700; color: var(--line-2); line-height: 1; }
@media (max-width: 640px) { .evo { grid-template-columns: repeat(5, 132px); overflow-x: auto; padding-bottom: 6px; } }
.mlinks { display: flex; flex-wrap: wrap; gap: 8px; }
.mlinks .eo { width: 140px; }
.mlink { display: inline-flex; align-items: center; gap: 4px; color: var(--text); padding: 2px 10px 2px 2px; border-radius: 999px; background: var(--card-2); font-size: 13px; }
.mlink .sprite { margin: -8px -4px -8px -6px; }
.mlink:hover { text-decoration: none; background: var(--line-2); }
.mlinks.sm { gap: 6px; margin: 8px 0; }
.navbox { clear: both; margin-top: 40px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.navbox > p { margin: 0; padding: 10px 14px; background: var(--card-2); color: var(--text); font-weight: 600; font-size: 14px; }
.navbox > div { padding: 12px 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; }
.navbox b { color: var(--text); }

/* elements */
.emx { border-collapse: separate; border-spacing: 4px; margin: 0 auto; font-size: 14px; }
.emx th { font-weight: 600; color: var(--muted); padding: 4px; text-align: center; }
.emx th small { display: block; font-size: 11px; }
.emx th .ico { display: block; margin: 0 auto; }
.emx td { width: 64px; height: 44px; text-align: center; background: var(--card); border-radius: 8px; color: var(--muted); font-weight: 600; }
.emx td.up { background: color-mix(in srgb, #3f9a70 45%, var(--card)); color: #d8ffe9; }
.emx td.dn { background: color-mix(in srgb, #d9542f 40%, var(--card)); color: #ffe0d6; }
@media (max-width: 560px) { .emx td { width: 40px; height: 34px; font-size: 12px; } .emx { border-spacing: 3px; } }
.ecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ecard { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--r); padding: 14px 16px; }
.ecard h3 { display: flex; align-items: center; gap: 8px; } .ecard p { font-size: 13px; color: var(--muted); margin: 4px 0; }

/* ladder (evolution stages, god tiers) */
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.step i { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); }
.step b { display: block; color: var(--text); } .step small { color: var(--muted); font-size: 12px; } .step p { font-size: 12.5px; margin: 6px 0 0; color: var(--text-2); }
.step.secret { background: repeating-linear-gradient(135deg, var(--card) 0 10px, var(--bg-2) 10px 20px); }
@media (max-width: 760px) { .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* formulas */
.fx { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0 0 14px; }
.fx h3 { margin-bottom: 10px; }
.foe { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; font-size: 14px; }
.foe li { padding-left: 12px; border-left: 2px solid var(--line-2); }
.foe b { color: var(--text); margin-right: 6px; } .foe b::after { content: ":"; }

/* skills */
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tcard { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 12px; color: var(--text); }
.tcard:hover { border-color: var(--c); text-decoration: none; }
.tcard span { display: flex; flex-direction: column; min-width: 0; }
.tcard small { color: var(--muted); font-size: 12.5px; } .tcard em { font-style: normal; font-size: 12px; color: var(--yellow); }
.tree-h h1, .cl-h h1 { display: flex; align-items: center; gap: 12px; }
.tree-h .dot { width: 16px; height: 16px; }
.tree-h { border-left: 4px solid var(--c); padding-left: 14px; }
.nodes { display: grid; gap: 10px; }
.node { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.node:target { border-color: var(--yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--yellow) 25%, transparent); }
.node img { border-radius: 8px; background: var(--bg-2); }
.node p { margin: 6px 0 0; font-size: 14.5px; }
.type { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 5px; background: var(--card-2); color: var(--muted); }
.type.A { background: #20374d; color: #9fd2ff; } .type.C { background: #4d3412; color: var(--yellow); } .type.P { background: #2a2f22; color: #c5e3a3; }
.nf { margin-top: 10px; }
.nf summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--yellow); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.nf summary::-webkit-details-marker { display: none; }
.nf summary::before { content: "▸"; transition: transform .15s; } .nf[open] summary::before { transform: rotate(90deg); }
.nf .code { margin-top: 8px; }
.page h2 small { margin-left: 4px; }
.bridges { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.bridge { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.bridge:target { border-color: var(--yellow); }
.bridge b { color: var(--text); } .bridge p { font-size: 14px; margin: 6px 0 0; }
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ccard { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--r); color: var(--text); }
.ccard:hover { border-color: var(--c); text-decoration: none; }
.ccard small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.cl-h { display: flex; gap: 18px; align-items: center; border-left: 4px solid var(--c); padding-left: 16px; }
.trait { border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 10px; background: var(--card); padding: 14px 16px; }
.trait b { color: var(--text); } .trait p { margin: 4px 0 0; }
.page h3.jobh { margin: 22px 0 10px; font-size: 14px; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }

/* gods + gear */
.gods { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.god { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.god:target { border-color: var(--yellow); }
.god canvas { width: 100%; height: auto; display: block; background: radial-gradient(100% 120% at 50% 100%, #3a2b1f, var(--bg-2)); }
.god-b { padding: 14px; } .god-b small { color: var(--muted); font-size: 12px; } .god-b .tbl { margin-top: 8px; }
.gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.gcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.gcard:target { border-color: var(--yellow); }
.gcard header { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.gcard header b { color: var(--text); display: block; } .gcard header small { color: var(--muted); font-size: 12px; }
.gcard img { background: var(--bg-2); border-radius: 8px; }
.gcard p { font-size: 13.5px; margin: 0 0 8px; }
.gcard .tbl { background: var(--bg-2); }
.gcard.legend { border-color: color-mix(in srgb, #ffb340 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, #ffb340 7%, var(--card)), var(--card)); }
.ab { font-size: 13.5px; margin-bottom: 8px; } .ab b { color: var(--yellow); } .ab ul { margin: 4px 0 0; padding-left: 18px; }
.pen { font-size: 13px; color: #ff9d85; }

/* tarot */
.tarots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tarots.boss { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tarot { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.tarot:target { border-color: var(--yellow); }
.boss .tarot { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tarot .tn { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.tarot img { width: 64px; height: 96px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.tarot b { color: var(--text); font-size: 14px; }
.tarot .pair { justify-content: center; }
.star { font-size: 13px; margin: 6px 0 0; text-align: left; } .star b { color: var(--yellow); }

/* charms */
.aprev { position: sticky; top: calc(var(--top) + 10px); z-index: 4; display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 16px 8px 8px; margin-bottom: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.aprev canvas { width: 130px; height: 120px; border-radius: 10px; background: linear-gradient(180deg, #5fb8ff 0%, #a6dcff 74%, #8fcf6a 74%, #6fb54c 100%); flex: none; }
.aprev div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.aprev b { color: var(--text); font-size: 17px; } .aprev small { color: var(--muted); font-size: 12.5px; }
.aprev.pop { border-color: var(--yellow); }
@media (max-width: 640px) { .aprev { top: var(--top); border-radius: 0 0 var(--r) var(--r); margin: 0 -16px 8px; } .aprev canvas { width: 104px; height: 96px; } }
.charms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.charm { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--line-2)); border-radius: var(--r); padding: 14px; scroll-margin-top: calc(var(--top) + 150px); }
.charm:target { border-color: var(--yellow); }
.charm header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.charm header small { color: var(--muted); font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; }
.pieces { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.pieces li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; }
.pieces canvas { width: 40px; height: 40px; background: var(--bg-2); border-radius: 8px; }
.pieces small { color: var(--accent); font-size: 11px; font-weight: 700; } .pieces b { color: var(--text); font-size: 14px; display: block; } .pieces p { margin: 2px 0 0; font-size: 13px; }
.setb { font-size: 13.5px; margin: 8px 0 4px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); } .setb b { color: var(--yellow); }
.src { margin: 4px 0 0; } .src b { color: var(--text-2); }

/* modes */
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mode { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--text); }
.mode:hover { border-color: var(--accent); text-decoration: none; }
.mode img, .mode .noimg { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: auto; }
.mode .noimg { display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, #3a2b1f, var(--bg-2)); color: var(--muted); font-weight: 700; }
.mode b { padding: 12px 14px 0; } .mode small { padding: 2px 14px 14px; color: var(--muted); font-size: 13px; }
.shot { margin: 0 0 8px; } .shot img { width: 100%; border-radius: var(--r); border: 1px solid var(--line); image-rendering: auto; }

.nf404 { text-align: center; padding: 80px 0; } .nf404 h1 { font-size: 72px; margin: 0; color: var(--accent); }
.clr { clear: both; }
