:root {
  --bg: #17181c; --panel: #212329; --panel2: #2a2d35; --line: #363a44;
  --text: #dcdde2; --dim: #9a9eaa; --link: #8ec5ff; --accent: #e8643c;
  --gold: #e6b450; --gold-bg: rgba(230, 180, 80, .09); --boss: #c0392b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel2); padding: 0 4px; border-radius: 3px; font-size: 13px; }
small, .small { color: var(--dim); font-size: 12.5px; }

header { background: #101114; border-bottom: 2px solid var(--accent); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; gap: 20px; max-width: 1180px; margin: 0 auto; padding: 8px 16px; }
.logo { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.logo b, .hero h1 b { color: var(--accent); }
.search { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.search input { width: 100%; padding: 7px 10px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 4px; font-size: 14px; }
.search input:focus { outline: none; border-color: var(--accent); }
.results { position: absolute; left: 0; right: 0; top: 38px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; max-height: 70vh; overflow: auto; display: none; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.results.open { display: block; }
.results a { display: flex; align-items: center; gap: 10px; padding: 4px 10px; color: var(--text); }
.results a.sel, .results a:hover { background: var(--panel2); text-decoration: none; }
.results a.custom span:first-of-type { color: var(--gold); }
.results img { width: 30px; height: 30px; image-rendering: pixelated; object-fit: contain; }
.results em { margin-left: auto; color: var(--dim); font-style: normal; font-size: 12px; }
nav { display: flex; flex-wrap: wrap; max-width: 1180px; margin: 0 auto; padding: 0 10px; }
nav a { color: var(--dim); padding: 6px 10px; font-size: 14px; }
nav a.on, nav a:hover { color: #fff; text-decoration: none; box-shadow: inset 0 -2px var(--accent); }

main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; }
footer { text-align: center; color: var(--dim); font-size: 12px; padding: 20px; border-top: 1px solid var(--line); }
h1 { margin: 0 0 6px; font-size: 28px; color: #fff; }
h2 { font-size: 19px; color: #fff; margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
h3 { font-size: 15px; color: var(--dim); text-transform: uppercase; letter-spacing: .6px; margin: 16px 0 6px; }
section { margin-bottom: 8px; }

.spr { image-rendering: pixelated; image-rendering: crisp-edges; vertical-align: middle; }
.spr.none { display: inline-block; width: 40px; height: 40px; }
.head { display: flex; gap: 18px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 14px 18px; }
.head .spr { flex: none; }
.head h1, .head h2 { border: 0; margin: 0 0 4px; padding: 0; }
.desc { color: var(--dim); font-style: italic; margin: 6px 0 0; max-width: 760px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 3px; text-transform: uppercase;
  letter-spacing: .5px; background: var(--panel2); color: var(--text); }
.badge.custom { background: var(--gold); color: #1a1408; }
.badge.ut { background: #6c3fa5; color: #fff; }
.badge.boss { background: var(--boss); color: #fff; }
.badge.sb { background: #2f5d7c; color: #fff; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.cols > *, main > section { min-width: 0; overflow-x: auto; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } .bar { flex-wrap: wrap; } }

table { border-collapse: collapse; width: 100%; }
.kv th { text-align: left; color: var(--dim); font-weight: 600; width: 34%; padding: 4px 8px; vertical-align: top; }
.kv td { padding: 4px 8px; }
.kv tr:nth-child(odd), .list tr:nth-child(even) { background: rgba(255,255,255,.025); }
.list th { text-align: left; font-size: 12.5px; color: var(--dim); font-weight: 600; padding: 5px 8px;
  border-bottom: 1px solid var(--line); }
.list td { padding: 3px 8px; vertical-align: middle; border-bottom: 1px solid rgba(255,255,255,.04); }
.list td.num, .list th.num { text-align: right; white-space: nowrap; }
.list td.note { color: var(--dim); font-size: 13px; }
.list tr.custom td:first-child { box-shadow: inset 3px 0 var(--gold); }
.list tr.custom { background: var(--gold-bg); }
.items td:nth-child(3) { font-size: 13.5px; }

.ent { display: inline-flex; align-items: center; gap: 6px; }
.ent.custom span { color: var(--gold); }
.grid { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.tierloot { font-weight: 600; margin-right: 8px; text-transform: capitalize; }
.sample { display: inline-flex; flex-wrap: wrap; vertical-align: middle; }
.sample .spr { width: 24px; height: 24px; }
.loot td:first-child { line-height: 1.2; }

.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.toc a { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 2px 9px; font-size: 13.5px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.card { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px 14px; }
.card.custom, .tile.custom { border-color: var(--gold); background: linear-gradient(var(--gold-bg), var(--gold-bg)), var(--panel); }
.card.big { align-items: flex-start; }
.tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.tile { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 16px; color: var(--text); font-weight: 600; min-height: 56px; }
.tile:hover { border-color: var(--accent); text-decoration: none; }
.hero { padding: 26px 0 10px; }
.hero h1 { font-size: 40px; }
.hero p { color: var(--dim); max-width: 700px; }

.bosscard { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--boss);
  border-radius: 6px; padding: 4px 18px 14px; margin-top: 18px; }
.bosscard h2 { border: 0; }
.bossart { display: flex; gap: 16px; align-items: center; }
.states { margin: 4px 0; padding-left: 20px; }
.states li { margin: 2px 0; }
blockquote { margin: 4px 0; padding: 3px 12px; border-left: 3px solid var(--line); color: #c9c3b0; font-style: italic; }
.notes { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 2px 18px 10px; margin-top: 18px; }
.notes h2 { border: 0; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; margin: 6px 0; }
summary { cursor: pointer; font-weight: 600; }
.classgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 14px; }
.cls { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 0 0 8px; }
.cls .head { border: 0; background: none; }
.cls .stats { margin: 0 14px; width: calc(100% - 28px); }
@media (max-width: 600px) { .classgrid { grid-template-columns: 1fr; } }
.notes .ent { display: inline; white-space: nowrap; }
.notes .ent .spr { width: auto; height: 20px; margin: -3px 3px 0 0; }
.notes .ent .spr.none { display: none; }
