.skill-icos { display: inline-flex; gap: 4px; margin-right: 8px; vertical-align: middle; }
.skill-ico { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--line); }
.set-fx { color: #8fd18f; white-space: nowrap; }
.set-box { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #120e0b; }
.set-title { margin: 0 0 8px; color: #8fd18f; font-weight: 900; }
.set-items { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.set-item { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.set-item img { width: 24px; height: 24px; }
.set-item:hover, .set-item.on { border-color: var(--gold); color: var(--gold); }
.set-bonus { margin: 0; font-weight: 800; }
.set-bonus b { margin-right: 6px; color: var(--gold); }
.db-top { margin: 0 0 18px; }
.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #140f0c;
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
}
.home-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.home-btn:hover { border-color: var(--gold); }
.db-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.db-nav a { display: block; border: 2px solid transparent; border-radius: 12px; overflow: hidden; opacity: 0.72; }
.db-nav a:hover { opacity: 1; filter: brightness(1.06); }
.db-nav a.on { border-color: var(--gold); opacity: 1; }
.db-nav img { display: block; width: 100%; height: auto; }
.db-nav.db3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { padding: 8px 16px; border: 0; border-right: 1px solid var(--line); background: #140f0c; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: rgba(228, 195, 106, 0.22); color: var(--gold); }
.pick { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #140f0c; color: var(--ink); font: inherit; font-weight: 800; }
.pick[hidden] { display: none; }
.pick-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pick-row[hidden] { display: none; }
.pick-row button { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #140f0c; color: var(--muted); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.pick-row button:hover { color: var(--ink); }
.pick-row button.on { border-color: var(--gold); background: rgba(228, 195, 106, 0.22); color: var(--gold); }
.pick-row.sub { padding-left: 10px; border-left: 2px solid rgba(228, 195, 106, 0.45); }
.pick-row.sub button { padding: 4px 10px; font-size: 12px; }
.count { margin: 6px 0 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.mon-db tbody tr, .craft-db tbody tr { cursor: pointer; }
.mon-db tbody tr:hover td.name, .craft-db tbody tr:hover td.name { color: var(--gold); }
.mon-db th, .mon-db td, .craft-db th, .craft-db td { text-align: center; }
.mon-db td.name, .craft-db td.name { text-align: left; white-space: nowrap; }
.mon-ico { display: inline-block; flex: none; margin-right: 8px; border-radius: 6px; background-color: #120e0b; background-repeat: no-repeat; vertical-align: middle; image-rendering: pixelated; }
.mon-ico-lg { margin-right: 0; border: 1px solid var(--line); }
.more { color: var(--muted); font-size: 0.88em; }
.undead { color: #c9a0ff; }
td.drops { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: var(--muted); }
td.npc { white-space: nowrap; }
td.mats { text-align: right; white-space: nowrap; }
.mat { position: relative; display: inline-block; width: 40px; height: 40px; margin-left: 4px; border: 1px solid var(--line); border-radius: 6px; background: #120e0b; vertical-align: middle; }
.mat img { width: 32px; height: 32px; margin: 3px; image-rendering: pixelated; }
.mat b { position: absolute; right: 2px; bottom: 0; font-size: 11px; line-height: 1.2; color: #fffdf6; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.mat .enc { position: absolute; left: 2px; top: 0; font-size: 10px; font-style: normal; font-weight: 900; color: #8ec5ff; text-shadow: 0 0 2px #000; }
.wpop-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.wpop-card { max-height: calc(100vh - 36px); overflow-y: auto; }
.pop-h { margin: 14px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--gold); font-size: 15px; font-weight: 900; }
.pop-list { line-height: 1.6; }
.wpop-line > b { min-width: 72px; }
.chips { display: flex; flex: 1; flex-wrap: wrap; gap: 4px; }
.chip { padding: 2px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.ipop { z-index: 41; }
.drop-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 3px; background: #120e0b; color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.drop-chip img { width: 26px; height: 26px; object-fit: contain; image-rendering: pixelated; }
.drop-chip .mon-ico { margin-right: 2px; }
.drop-chip:hover { border-color: var(--gold); color: var(--gold); }
.item-desc { margin: 8px 0; color: var(--muted); font-size: 13px; font-weight: 800; white-space: pre-line; }
.craft-link { color: #8ec5ff; font-weight: 900; text-decoration: none; }
.craft-link:hover { text-decoration: underline; }
.mat-list, .npc-list { margin: 0; padding: 0; list-style: none; }
.mat-list li, .npc-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-weight: 800; }
.mat-list img { width: 32px; height: 32px; image-rendering: pixelated; }
.mat-list li > b { margin-left: auto; color: var(--gold); }
.npc-list li b { min-width: 64px; color: var(--ink); }
h2 {
  margin: 28px 0 10px;
  font-size: 20px;
  font-weight: 900;
}
h2 span { margin-left: 8px; color: var(--muted); font-size: 14px; }
.find {
  display: block;
  width: min(360px, 100%);
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #140f0c;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}
.scroll { margin-bottom: 8px; }
.find-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 8px;
}
.find-row .find { margin: 0; }
.fx-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.fx-checks label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}
.fx-checks input { width: 16px; height: 16px; margin: 0; accent-color: var(--gold); cursor: pointer; }
table { min-width: 720px; }
th:first-child { text-align: center; }
td:first-child, td.name { text-align: left; }
.weapon-db th,
.weapon-db td,
.weapon-db th:nth-child(2),
.weapon-db td:nth-child(2),
.weapon-db td.fx { text-align: center; }
.weapon-db td:first-child,
.weapon-db td.name { text-align: left; }
.weapon-db th:last-child,
.weapon-db td:last-child,
.gear-db th:last-child,
.gear-db td:last-child { text-align: center; }
.icon {
  width: 32px;
  height: 32px;
  margin-right: 8px;
  object-fit: contain;
  vertical-align: middle;
  image-rendering: pixelated;
}
td.fx { white-space: normal; text-align: left; min-width: 180px; max-width: 420px; }
h2[hidden], .scroll[hidden] { display: none; }
.cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}
.cats button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(228, 195, 106, 0.08);
  color: var(--gold);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.cats button img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
}
.cats button.on {
  border-color: var(--gold);
  background: rgba(228, 195, 106, 0.22);
  color: #fffdf6;
}
.cats button:hover { filter: brightness(1.08); }
@media (min-width: 900px) {
  .cats { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
.cats.cats4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cats.cats5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.legal { margin: 28px 0 0; color: var(--muted); font-size: 13px; font-weight: 800; text-align: center; }
.legal a { color: inherit; text-decoration: none; }
.legal a:hover { color: #fffdf6; text-decoration: underline; }
tr.hidden { display: none; }
th.cls,
td.cls { text-align: center; }
th.sort { cursor: pointer; user-select: none; white-space: nowrap; }
th.sort:hover { color: var(--ink); }
th.sort[data-dir="up"]::after { content: " ▲"; font-size: 0.75em; }
th.sort[data-dir="down"]::after { content: " ▼"; font-size: 0.75em; }
.cls-grid {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}
.cls-grid img { display: block; width: 20px; height: 20px; }
.weapon-db td.name, .armor-db td.name { cursor: pointer; }
.weapon-db td.name:hover, .armor-db td.name:hover { color: var(--gold); }
.wpop[hidden] { display: none; }
.wpop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.66);
}
.wpop-card {
  width: min(560px, 100%);
  padding: 22px 22px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #16110d;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.wpop-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.wpop-enc {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.wpop-enc button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(228, 195, 106, 0.1);
  color: var(--gold);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.wpop-enc button:disabled { opacity: 0.35; cursor: default; }
.wpop-enc b {
  min-width: 52px;
  color: var(--gold);
  font-size: 18px;
  text-align: center;
}
.wpop-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  flex: none;
}
.wpop-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}
.wpop-x {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}
.wpop-x:hover { color: var(--ink); }
.wpop-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 8px;
  font-weight: 800;
}
.wpop-line b { color: var(--gold); font-weight: 900; }
.wpop-enc-row { align-items: center; margin-bottom: 10px; }
.wpop-cls-row { align-items: center; }
.wpop-cls-row .cls-grid img { width: 24px; height: 24px; }
.wpop-play {
  padding: 0;
  border: 0;
  background: none;
  color: #8ec5ff;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.wpop-play:hover { color: #b8dcff; }
.wpop-video[hidden] { display: none; }
.wpop-video {
  margin-top: 12px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.wpop-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.wpop-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; font-weight: 800; }
a.drop-chip { text-decoration: none; }
.back-link { display: inline-flex; align-items: center; margin: 0 0 10px; padding: 5px 12px; border: 1px solid var(--gold); border-radius: 8px; background: #120e0b; color: var(--gold); font-size: 13px; font-weight: 900; text-decoration: none; }
.back-link:hover { background: var(--gold); color: #120e0b; }
.src-craft { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(18, 14, 11, 0.6); }
.src-craft-h { margin: 0 0 6px; font-weight: 800; }
.src-craft-h > b, .src-npc > b { margin-right: 6px; color: var(--gold); }
.src-npc { margin: 6px 0 0; font-size: 13px; font-weight: 800; line-height: 1.6; }
.pop-db td.name { cursor: pointer; }
.pop-db td.name:hover { color: var(--gold); }
.stack-pop { background: rgba(0, 0, 0, 0.28); }
.stack-pop .wpop-card { max-height: calc(100vh - 80px); border-color: rgba(228, 195, 106, 0.55); box-shadow: -8px -8px 24px rgba(0, 0, 0, 0.55), 0 24px 60px rgba(0, 0, 0, 0.7); animation: stack-in 0.16s ease-out; }
@keyframes stack-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
tr.set-first td { border-top: 2px solid rgba(228, 195, 106, 0.5); }
.seg-label { min-width: 34px; color: var(--muted); font-size: 13px; font-weight: 900; }
.sp-cls { display: inline-flex; gap: 8px; white-space: nowrap; vertical-align: middle; }
.sp-cls > span { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 12px; font-weight: 800; }
.sp-cls img { display: block; width: 20px; height: 20px; }
.wpop .sp-cls img { width: 24px; height: 24px; }
.sp-cost { white-space: nowrap; }
.sp-cat { display: inline-flex; align-items: center; gap: 1px; margin-left: 4px; font-size: 12px; vertical-align: middle; }
.sp-cat img { width: 22px; height: 22px; image-rendering: pixelated; }
