/* Database (items + mobs) */

.db-page { padding-top: 64px; }

/* Hero — unified pattern: left-heavy dark vignette for text legibility,
   fading right so the image breathes. */
.db-hero {
  position: relative;
  padding: 120px 0 80px;
  background:
    linear-gradient(180deg, transparent 0%, transparent 55%, rgba(0,0,0,1) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.85) 30%, rgba(0,0,0,0.60) 55%, rgba(0,0,0,0.20) 80%, rgba(0,0,0,0.35) 100%),
    url('/images/database.png') center / cover no-repeat,
    #000;
  overflow: hidden;
  text-align: left;
}
.db-hero .container { position: relative; z-index: 1; }
.db-title { font-size: clamp(34px, 5vw, 54px); font-weight: 800; color: #fff; margin-top: 4px; }
.db-sub   { font-size: 16px; color: var(--muted); margin-top: 14px; max-width: 640px; line-height: 1.6; }

.db-section { padding: 28px 0 60px; }

/* Tabs */
.db-tabs {
  display: flex; gap: 8px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border2);
}
.db-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--muted); text-decoration: none;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  transition: color 0.15s, background 0.15s;
}
.db-tab:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.db-tab.active {
  color: var(--gold-lt);
  background: var(--card);
  border-color: var(--border2);
  position: relative; top: 1px;
}
.db-tab-icon { font-size: 16px; }

/* Filters */
.db-filters {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end;
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 12px; padding: 18px 22px;
  margin-bottom: 20px;
}
.db-filter { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.db-filter-search { flex: 1 1 240px; position: relative; }
.db-filter-actions { flex-direction: row; align-items: flex-end; gap: 8px; }
.db-filter-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted);
}

.db-input, .db-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.db-input { width: 100%; }
.db-input:focus, .db-select:focus { outline: none; border-color: var(--gold); }
.db-select {
  padding-right: 32px;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23999' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
.db-select:hover { border-color: var(--border); }

.db-btn {
  background: linear-gradient(180deg, var(--gold-lt), var(--gold-dk));
  color: #1a1208;
  border: 1px solid var(--gold-dk);
  padding: 9px 16px; border-radius: 6px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
  transition: filter 0.15s;
}
.db-btn:hover { filter: brightness(1.08); }
.db-btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border2);
}
.db-btn-ghost:hover { color: var(--text); border-color: var(--border); }

.db-filter-info {
  margin-left: auto;
  font-size: 12px; color: var(--muted);
  font-weight: 600;
  align-self: flex-end;
}
.db-filter-info #db-count { color: var(--gold); font-size: 16px; font-weight: 800; }

/* Search suggest dropdown */
.db-search-wrap { position: relative; }
.db-suggest {
  position: absolute; top: 100%; left: 0; right: 0;
  margin-top: 4px;
  background: rgba(8, 14, 28, 0.98);
  border: 1px solid var(--border2);
  border-radius: 8px;
  list-style: none;
  z-index: 50;
  max-height: 360px; overflow-y: auto;
  box-shadow: 0 8px 28px rgba(0,0,0,0.6);
}
.db-suggest[hidden] { display: none; }
.db-suggest-section {
  padding: 6px 12px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted);
  background: rgba(255,255,255,0.02);
}
.db-suggest-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-top: 1px solid rgba(255,255,255,0.03);
  text-decoration: none;
}
.db-suggest-item:hover, .db-suggest-item.is-active { background: rgba(201,147,58,0.10); }
.db-suggest-id { color: var(--muted); font-size: 11px; margin-left: auto; }
.db-suggest-icon { width: 24px; height: 24px; flex-shrink: 0; image-rendering: pixelated; }

/* Grid */
.db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.db-grid-mobs { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.db-card {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
  min-height: 76px;
}
.db-card:hover { border-color: var(--border); transform: translateY(-1px); }

.db-card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border2);
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
}
.db-card-icon img {
  max-width: 40px; max-height: 40px;
  image-rendering: pixelated;
}
.db-card-icon img.db-no-icon { display: none; }
.db-card-icon::before {
  content: '?';
  position: absolute;
  font-size: 18px; font-weight: 700; color: var(--muted);
  opacity: 0;
}
.db-card-icon img[src=""], .db-card-icon img:not([src]) { display: none; }
.db-card-icon img[src=""] + ::before { opacity: 1; }
/* Use ::after fallback when img loads-error and has no src */
.db-card-icon img.db-no-icon ~ ::before { opacity: 1; }

.db-card-icon-mob { width: 60px; height: 60px; }
.db-card-icon-mob img { max-width: 56px; max-height: 56px; }

.db-card-body { flex: 1; min-width: 0; }
.db-card-name {
  font-size: 14px; font-weight: 700;
  color: var(--text);
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.db-slots { color: var(--gold); font-weight: 700; }
.db-mvp {
  font-size: 10px; font-weight: 800;
  background: linear-gradient(180deg, #f5d885, #b67e1f);
  color: #1a1208;
  padding: 1px 6px; border-radius: 3px;
  letter-spacing: 0.06em;
}
.db-boss {
  font-size: 10px; font-weight: 800;
  background: rgba(224,85,85,0.18);
  color: #ff8888;
  padding: 1px 6px; border-radius: 3px;
  letter-spacing: 0.06em;
  border: 1px solid rgba(224,85,85,0.4);
}

.db-card-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 4px;
}
.db-tag, .db-tag-sub {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  color: var(--muted);
  white-space: nowrap;
}
.db-tag-sub { background: transparent; border-style: dashed; }
.db-tag-equip { background: rgba(110,168,212,0.12); color: #8ec0e4; border-color: rgba(110,168,212,0.3); }
.db-tag-consumable { background: rgba(46,213,115,0.10); color: #5fe39a; border-color: rgba(46,213,115,0.25); }
.db-tag-card { background: rgba(201,147,58,0.14); color: var(--gold-lt); border-color: rgba(201,147,58,0.34); }
.db-tag-ammo { background: rgba(170,170,170,0.10); color: #c0c0c0; border-color: rgba(170,170,170,0.22); }
.db-tag-etc  { background: rgba(255,255,255,0.04); }

.db-tag-race-undead   { background: rgba(120,80,160,0.15); color: #b89cd6; border-color: rgba(120,80,160,0.35); }
.db-tag-race-demon    { background: rgba(200,60,60,0.15);  color: #ff8888; border-color: rgba(200,60,60,0.35); }
.db-tag-race-angel    { background: rgba(255,225,140,0.15);color: #ffe18c; border-color: rgba(255,225,140,0.35); }
.db-tag-race-dragon   { background: rgba(80,160,200,0.15); color: #8ed0e4; border-color: rgba(80,160,200,0.35); }
.db-tag-race-plant    { background: rgba(110,200,110,0.12);color: #6ec86e; border-color: rgba(110,200,110,0.30); }
.db-tag-race-insect   { background: rgba(180,200,80,0.12); color: #b0c850; border-color: rgba(180,200,80,0.30); }
.db-tag-race-fish     { background: rgba(80,180,200,0.12); color: #50b4c8; border-color: rgba(80,180,200,0.30); }
.db-tag-race-brute    { background: rgba(180,140,80,0.12); color: #b48c50; border-color: rgba(180,140,80,0.30); }

.db-tag-ele-fire   { background: rgba(255,120,60,0.12);  color: #ff8c50; border-color: rgba(255,120,60,0.30); }
.db-tag-ele-water  { background: rgba(70,150,220,0.12);  color: #6aa8e0; border-color: rgba(70,150,220,0.30); }
.db-tag-ele-earth  { background: rgba(180,140,80,0.12);  color: #b48c50; border-color: rgba(180,140,80,0.30); }
.db-tag-ele-wind   { background: rgba(160,200,180,0.12); color: #a0c8b4; border-color: rgba(160,200,180,0.30); }
.db-tag-ele-poison { background: rgba(170,90,200,0.12);  color: #aa5ac8; border-color: rgba(170,90,200,0.30); }
.db-tag-ele-holy   { background: rgba(255,225,140,0.12); color: #ffe18c; border-color: rgba(255,225,140,0.30); }
.db-tag-ele-shadow { background: rgba(120,90,160,0.12);  color: #785aa0; border-color: rgba(120,90,160,0.30); }
.db-tag-ele-undead { background: rgba(120,80,160,0.12);  color: #b89cd6; border-color: rgba(120,80,160,0.30); }
.db-tag-ele-ghost  { background: rgba(180,180,220,0.10); color: #b4b4dc; border-color: rgba(180,180,220,0.25); }

.db-card-stats {
  display: flex; gap: 14px; margin-top: 4px;
  font-size: 12px; color: var(--muted);
}
.db-card-stats b { color: var(--text); font-weight: 700; }

.db-card-id {
  position: absolute; top: 8px; right: 10px;
  font-size: 10px; color: var(--muted);
  font-weight: 600; letter-spacing: 0.08em;
}

.db-card.is-boss { border-color: rgba(224,85,85,0.35); }
.db-card.is-boss:hover { border-color: rgba(224,85,85,0.6); }
.db-card.is-mvp { border-color: rgba(245,216,133,0.35); box-shadow: 0 0 0 1px rgba(245,216,133,0.08) inset; }
.db-card.is-mvp:hover { border-color: rgba(245,216,133,0.7); }

/* Empty */
.db-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--border2);
  border-radius: 12px;
  font-size: 14px;
}

/* Pagination */
.db-pagination {
  display: flex; justify-content: center;
  gap: 4px; margin-top: 28px;
  flex-wrap: wrap;
}
.db-page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px;
  padding: 0 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text); text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 6px;
  transition: border-color 0.15s, background 0.15s;
}
.db-page-link:hover { border-color: var(--border); }
.db-page-link.active {
  color: var(--gold-lt);
  border-color: var(--gold);
  background: rgba(201,147,58,0.08);
}
.db-page-gap {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; color: var(--muted);
}

/* ─── Detail page ──────────────────────────────────────────────────────── */
.db-detail .db-detail-hero {
  padding: 28px 0 36px;
  background:
    radial-gradient(circle at 50% 0%, rgba(201,147,58,0.10), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border2);
}
.db-detail .db-detail-hero.is-mvp {
  background:
    radial-gradient(circle at 50% 0%, rgba(245,216,133,0.20), transparent 65%),
    var(--bg);
}
.db-detail .db-detail-hero.is-boss {
  background:
    radial-gradient(circle at 50% 0%, rgba(224,85,85,0.14), transparent 60%),
    var(--bg);
}

.db-back {
  display: inline-block;
  font-size: 13px; color: var(--muted);
  text-decoration: none;
  margin-bottom: 14px;
}
.db-back:hover { color: var(--text); }

.db-detail-head {
  display: flex; align-items: center; gap: 28px;
  flex-wrap: wrap;
}
.db-detail-icon {
  width: 100px; height: 100px;
  background: #fff;
  border: 1px solid var(--border2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.db-detail-icon img {
  max-width: 92px; max-height: 92px;
  image-rendering: pixelated;
}
.db-detail-icon img.db-icon-fallback {
  max-width: 48px; max-height: 48px;
}
.db-detail-icon-mob { width: 140px; height: 140px; background: rgba(255,255,255,0.04); }
.db-detail-icon-mob img { max-width: 130px; max-height: 130px; }

.db-detail-titles { flex: 1; min-width: 240px; }
.db-detail-name {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800;
  color: #fff; margin-top: 6px;
  display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.db-detail-altname {
  font-size: 14px; color: var(--muted);
  margin-top: 6px; font-style: italic;
}

.db-detail-quickstats {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-left: auto;
}
.db-qs {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px 18px;
  min-width: 90px;
}
.db-qs-label { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.db-qs-value { font-size: 22px; color: #fff; font-weight: 800; margin-top: 2px; }

/* Detail panels */
.db-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.db-panel {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 22px 24px;
}
.db-panel-wide { grid-column: 1 / -1; }
.db-panel-title {
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--gold-lt);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.db-panel-count {
  font-size: 11px; color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 1px 8px; border-radius: 999px;
}
.db-panel-sub {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted);
  margin: 16px 0 8px; padding-top: 12px;
  border-top: 1px solid var(--border2);
}
.db-panel-sub:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.db-panel-empty { color: var(--muted); font-size: 13px; }

.db-props {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  font-size: 13px;
}
.db-props dt { color: var(--muted); font-weight: 600; }
.db-props dd { color: var(--text); }

.db-effects { list-style: none; padding: 0; margin: 0; }
.db-effect {
  font-size: 13px;
  padding: 5px 0;
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.db-effect:last-child { border-bottom: none; }
.db-effect-raw {
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255,255,255,0.025);
  padding: 4px 8px;
  border-radius: 4px;
  margin: 2px 0;
}

.db-statgrid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.db-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 10px;
  display: flex; flex-direction: column; align-items: center;
}
.db-stat span {
  font-size: 10px; color: var(--muted);
  letter-spacing: 0.16em; font-weight: 700;
}
.db-stat b { font-size: 20px; color: #fff; font-weight: 800; margin-top: 2px; }

.db-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.db-mode-tag {
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  color: var(--text);
}
.db-mode-aggressive { background: rgba(224,85,85,0.12); color: #ff8888; border-color: rgba(224,85,85,0.32); }
.db-mode-boss       { background: rgba(245,216,133,0.14); color: #f5d885; border-color: rgba(245,216,133,0.32); }
.db-mode-looter     { background: rgba(160,140,80,0.14); color: #c8a850; border-color: rgba(160,140,80,0.32); }
.db-mode-detector   { background: rgba(110,168,212,0.12); color: #6ea8d4; border-color: rgba(110,168,212,0.32); }
.db-mode-plant      { background: rgba(110,200,110,0.10); color: #6ec86e; border-color: rgba(110,200,110,0.28); }

/* Drop tables */
.db-droptable {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.db-droptable thead { background: rgba(255,255,255,0.025); }
.db-droptable th {
  padding: 9px 14px; text-align: left;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted);
  border-bottom: 1px solid var(--border2);
}
.db-droptable th.db-num { text-align: right; }
.db-droptable td {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.db-droptable td.db-num { text-align: right; font-variant-numeric: tabular-nums; }
.db-droptable tr:last-child td { border-bottom: none; }
.db-droptable tr.is-mvp-drop { background: rgba(245,216,133,0.04); }

.db-droprow-icon { width: 30px; padding: 4px 6px !important; }
.db-droprow-icon img {
  width: 24px; height: 24px;
  image-rendering: pixelated;
}

.db-link {
  color: var(--text); text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: border-color 0.15s, color 0.15s;
}
.db-link:hover { color: var(--gold-lt); border-bottom-color: var(--gold-lt); }
.db-link.is-boss { color: #ff8888; }
.db-link.is-boss:hover { color: #ffaaaa; border-bottom-color: #ff8888; }

.db-slot-mvp {
  font-size: 10px; font-weight: 800;
  background: linear-gradient(180deg, #f5d885, #b67e1f);
  color: #1a1208;
  padding: 1px 6px; border-radius: 3px;
}

/* Mobile */
@media (max-width: 720px) {
  .db-grid { grid-template-columns: 1fr; }
  .db-grid-mobs { grid-template-columns: 1fr; }
  .db-detail-quickstats { width: 100%; margin-left: 0; }
  .db-qs { flex: 1 1 0; min-width: 70px; padding: 8px 10px; }
  .db-qs-value { font-size: 18px; }
  .db-statgrid { grid-template-columns: repeat(3, 1fr); }
  .db-droptable th, .db-droptable td { padding: 7px 8px; font-size: 12px; }
  .db-filter-info { width: 100%; margin-left: 0; text-align: right; }
}

/* ─── Maps tab v3 ─── */
.db-grid-maps { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.db-grid-npcs { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.db-card-icon-npc {
  width: 64px; height: 96px;
  background: transparent;
  border: none;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;          /* feet rest on the bottom — natural RO pose */
  justify-content: center;
  overflow: visible;
}
.db-card-icon-npc img {
  max-width: 64px;
  max-height: 96px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.db-card-icon-npc img.db-no-icon { display: none; }
.db-card-npc {
  align-items: stretch;            /* let icon column reach card height */
}
.db-card-coords {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.db-card-coords code {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10.5px;
}
.db-tag-npc-cat {
  background: rgba(155,89,182,0.14);
  color: #c9a3e0;
  border: 1px solid rgba(155,89,182,0.36);
  text-transform: capitalize;
}
.db-filter-toggle { align-self: flex-end; }
.db-checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text);
  user-select: none;
  padding: 6px 0;
}
.db-checkbox input { accent-color: var(--gold); cursor: pointer; }
.db-card-npc {
  cursor: default;
}
.db-card-npc:hover {
  /* Card itself isn't clickable now, just the map link below */
  border-color: rgba(155,89,182,0.45);
}
.db-tag-link {
  text-decoration: none;
  color: var(--gold);
  cursor: pointer;
  transition: color 0.15s;
}
.db-tag-link:hover {
  color: var(--gold-lt);
  text-decoration: underline;
}
/* NPC sprite icon — uses real sprite when available, otherwise falls back to a tinted placeholder */
.db-card-icon-npc img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}
.db-card-icon-npc img.db-no-icon { display: none; }
.db-card-icon-npc:has(img.db-no-icon)::before {
  /* Placeholder bubble icon when no sprite available */
  content: '💬';
  font-size: 20px;
  opacity: 0.5;
}
.db-card-icon-map { width: 72px; height: 72px; background: #0a1424; border: 1px solid var(--border2); border-radius: 6px; overflow: hidden; }
.db-card-icon-map img { max-width: 100%; max-height: 100%; image-rendering: auto; }
.db-card-icon-map img.db-no-icon { display: none; }
.db-tag-kind-city     { background: rgba(241,196,15,0.12);  color: #f1c40f; border-color: rgba(241,196,15,0.35); }
.db-tag-kind-field    { background: rgba(46,204,113,0.12);  color: #2ecc71; border-color: rgba(46,204,113,0.35); }
.db-tag-kind-dungeon  { background: rgba(155,89,182,0.15);  color: #b894dc; border-color: rgba(155,89,182,0.40); }
.db-tag-kind-surface  { background: rgba(85,170,255,0.10);  color: #5ab0ff; border-color: rgba(85,170,255,0.35); }
.db-tag-kind-guild    { background: rgba(192,57,43,0.12);   color: #e74c3c; border-color: rgba(192,57,43,0.40); }
.db-tag-kind-landmark { background: rgba(243,156,18,0.12);  color: #f39c12; border-color: rgba(243,156,18,0.35); }
.db-tag-kind-indoor   { background: rgba(176,140,100,0.14); color: #c8a880; border-color: rgba(176,140,100,0.36); }
.db-tag-kind-pvp      { background: rgba(231,76,60,0.14);   color: #ff7468; border-color: rgba(231,76,60,0.40); }
.db-tag-kind-instance { background: rgba(52,152,219,0.12);  color: #5dade2; border-color: rgba(52,152,219,0.35); }
.db-tag-kind-unknown  { background: rgba(149,165,166,0.10); color: #95a5a6; border-color: rgba(149,165,166,0.30); }

/* ─── Map detail page (database-map.ejs) ─── */
.db-back-link {
  display: inline-block;
  font-size: 13px; color: var(--muted);
  text-decoration: none;
  margin-bottom: 22px;
  transition: color 0.15s;
}
.db-back-link:hover { color: var(--gold); }

.dbmap-hero {
  display: flex; gap: 24px; align-items: center;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 28px;
}
.dbmap-hero-img {
  flex: 0 0 auto;
  width: 160px; height: 160px;
  border-radius: 8px; overflow: hidden;
  background: #0a1424;
  border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
}
.dbmap-hero-img img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
}
.dbmap-hero-img img.db-no-icon { display: none; }
.dbmap-hero-meta { flex: 1 1 auto; min-width: 0; }
.dbmap-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}
.dbmap-tech-name {
  font-size: 12px; color: var(--muted);
  margin-bottom: 14px;
}
.dbmap-tech-name code {
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
}
.dbmap-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* Sections grid */
.dbmap-grid {
  display: grid; grid-template-columns: 1fr; gap: 22px;
}
@media (min-width: 1100px) {
  .dbmap-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.dbmap-section {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 18px 22px;
}
.dbmap-section-title {
  font-size: 15px; font-weight: 800;
  color: #fff;
  margin: 0 0 16px 0;
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border2);
}
.dbmap-section-icon { font-size: 18px; }
.dbmap-section-count {
  margin-left: auto;
  font-size: 12px; font-weight: 700;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 28px; text-align: center;
}

.dbmap-empty {
  font-size: 13px; color: var(--muted);
  text-align: center; padding: 18px 0;
  font-style: italic;
}

/* Mobs list */
.dbmap-mobs {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 720px; overflow-y: auto;
}
.dbmap-mob {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.dbmap-mob:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
.dbmap-mob.is-mvp {
  background: rgba(241,196,15,0.05);
  border-color: rgba(241,196,15,0.25);
}
.dbmap-mob.is-mvp:hover {
  background: rgba(241,196,15,0.10);
  border-color: rgba(241,196,15,0.5);
}
.dbmap-mob-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}
.dbmap-mob-icon img { max-width: 36px; max-height: 36px; }
.dbmap-mob-icon img.db-no-icon { display: none; }
.dbmap-mob-info { flex: 1 1 auto; min-width: 0; }
.dbmap-mob-name {
  font-size: 13.5px; font-weight: 700; color: #fff;
  margin-bottom: 4px;
}
.dbmap-mob-name .db-mvp {
  display: inline-block; margin-left: 6px;
  font-size: 9px; font-weight: 800;
  background: rgba(241,196,15,0.2); color: #f1c40f;
  padding: 1px 6px; border-radius: 3px;
  border: 1px solid rgba(241,196,15,0.4);
  text-transform: uppercase; letter-spacing: 0.08em;
  vertical-align: middle;
}
.dbmap-mob-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 11px; color: var(--muted);
  align-items: center;
}
.dbmap-mob-qty {
  flex: 0 0 auto;
  font-size: 14px; font-weight: 800;
  color: var(--gold);
  min-width: 40px; text-align: right;
}

/* NPCs list */
.dbmap-npcs {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 720px; overflow-y: auto;
}
.dbmap-npc {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  font-size: 13px; color: var(--text);
}
.dbmap-npc-name { font-weight: 600; }
.dbmap-npc-count {
  font-size: 11px; font-weight: 700;
  color: var(--muted);
}

/* Warps list */
.dbmap-warps {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 720px; overflow-y: auto;
}
.dbmap-warp {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px; color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.dbmap-warp:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
.dbmap-warp-arrow { color: var(--gold); font-weight: 700; }
.dbmap-warp-label { flex: 1 1 auto; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbmap-warp-tech {
  font-family: monospace; font-size: 11px;
  color: var(--muted);
  background: rgba(0,0,0,0.2);
  padding: 1px 5px;
  border-radius: 3px;
}
.dbmap-warp-count {
  font-size: 11px; font-weight: 700;
  color: var(--muted);
}

/* ─── Spawn maps list (mob detail page) ─── */
.db-spawnmap-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 480px; overflow-y: auto;
}
.db-spawnmap-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.db-spawnmap-row:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(241,196,15,0.35);
}
.db-spawnmap-img {
  width: 48px; height: 48px;
  object-fit: cover;
  background: #0a1424;
  border-radius: 4px;
  flex-shrink: 0;
}
.db-spawnmap-info { flex: 1 1 auto; min-width: 0; }
.db-spawnmap-label {
  font-size: 13px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.db-spawnmap-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11px;
}
.db-spawnmap-tech {
  font-family: monospace; font-size: 10px;
  color: var(--muted);
  background: rgba(0,0,0,0.25);
  padding: 1px 5px; border-radius: 3px;
}
.db-spawnmap-qty {
  flex: 0 0 auto;
  font-size: 14px; font-weight: 800;
  color: var(--gold);
  min-width: 36px; text-align: right;
}
