/* Hunting Grounds page (/hunting.html) */

.hg-sub {
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-smoke);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.hg-section { margin-bottom: 22px; }
.hg-sect-h {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 11px;
}
.hg-sect-h h2 {
  margin: 0;
  font-family: var(--fh);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.hg-sect-h .ln { flex: 1; height: 1px; background: var(--border-iron); }
.hg-sect-h .meta {
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-mist);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hg-difficulty { display: flex; gap: 2px; margin-right: 6px; }
.hg-difficulty span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-iron);
}
.hg-difficulty span.on { background: var(--ember-bright); }
.hg-difficulty span.crit { background: var(--blood-bright); }

.hg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 9px;
}
.hg-zone {
  background: var(--bg-card);
  border: 1px solid var(--border-iron);
  border-radius: 5px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: all .14s;
  cursor: pointer;
  position: relative;
}
.hg-zone:hover {
  border-color: var(--border-blade);
  transform: translateY(-1px);
}
.hg-zone .ic {
  width: 42px;
  height: 42px;
  background: var(--bg-deep);
  border: 1px solid var(--border-iron);
  border-radius: 4px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  font-family: var(--fh);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .02em;
  line-height: 1;
  position: relative;
  overflow: hidden;
}
.hg-zone .ic small {
  display: block;
  font-family: var(--fm);
  font-size:12px;
  letter-spacing: .16em;
  color: var(--fg-smoke);
  font-weight: 700;
  margin-top: 1px;
  text-transform: uppercase;
}
/* Map thumbnail mode — image fills the box, floor badge sits in top-left corner. */
.hg-zone.has-thumb .ic {
  width: 56px;
  height: 56px;
  background: var(--bg-void);
}
.hg-zone.has-thumb .ic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hg-ic-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  background: rgba(7, 6, 10, 0.78);
  border: 1px solid rgba(201, 168, 118, 0.4);
  border-radius: 3px;
  padding: 1px 4px;
  font-family: var(--fh);
  font-size:13px;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  z-index: 1;
}
.hg-ic-badge small {
  display: inline;
  font-family: var(--fm);
  font-size:12px;
  margin-top: 0;
  letter-spacing: .12em;
  color: var(--fg-ash);
}
.hg-ic-badge.special {
  color: var(--purple-bright);
  border-color: rgba(155, 140, 186, 0.5);
}
/* Tier color overlay on the badge */
.hg-zone.t1 .hg-ic-badge { color: var(--moss-bright); border-color: rgba(122, 157, 94, 0.5); }
.hg-zone.t2 .hg-ic-badge { color: var(--rune-bright); border-color: rgba(125, 142, 176, 0.5); }
.hg-zone.t3 .hg-ic-badge { color: var(--ember-bright); border-color: rgba(245, 158, 11, 0.5); }
.hg-zone.t4 .hg-ic-badge { color: var(--blood-bright); border-color: rgba(185, 28, 28, 0.5); }
.hg-zone.t5 .hg-ic-badge { color: var(--purple-bright); border-color: rgba(155, 140, 186, 0.5); }
.hg-zone .body { flex: 1; min-width: 0; }
.hg-zone .nm {
  font-family: var(--fb);
  font-weight: 700;
  font-size:13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-parchment);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.hg-zone .ko {
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-smoke);
  letter-spacing: .04em;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
/* Reserve space for the ⋯ menu so the title doesn't run beneath it. */
.hg-zone.with-menu .body { padding-right: 24px; }
.hg-zone .lvmeta {
  font-family: var(--fm);
  font-size:12px;
  color: var(--fg-mist);
  letter-spacing: .1em;
  margin-top: 3px;
  text-transform: uppercase;
}

/* Tier color for zone icons */
.hg-zone.t1 .ic { color: var(--moss-bright); }
.hg-zone.t2 .ic { color: var(--rune-bright); }
.hg-zone.t3 .ic { color: var(--ember-bright); }
.hg-zone.t4 .ic { color: var(--blood-bright); }
.hg-zone.t5 .ic { color: var(--purple-bright); }

/* Special zones */
.hg-zone.special {
  border-color: rgba(155, 140, 186, 0.4);
  background: linear-gradient(180deg, rgba(155, 140, 186, 0.06), var(--bg-card));
}
.hg-zone.special .ic {
  background: rgba(7, 6, 10, 0.6);
  border-color: rgba(155, 140, 186, 0.4);
}
.hg-zone.special .nm { color: var(--purple-bright); }
.hg-zone.special .ko { font-size:13px; white-space: normal; }

/* ===== Buffs page Sân-săn tab — re-grid #buffs-grid so the hg-zone cards
   wrap into 220px columns instead of inheriting bz-grid's 280px tracks. ===== */
.bz-grid.hunting-mode {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 9px;
}

/* ===== With-menu variant — used by /buffs.html so the same map card carries
   the catalog Edit/Duplicate/Delete affordance. ===== */
.hg-zone.with-menu { position: relative; }
.hg-zone.with-menu .menu {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: var(--gold-bright);
  border: 1px solid var(--border-iron);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0.75;
  transition: opacity .15s ease, background .15s ease;
}
.hg-zone.with-menu:hover .menu { opacity: 1; }
.hg-zone.with-menu .menu:hover { background: rgba(0, 0, 0, 0.85); }

/* ===== Detail modal v2 — hero map + 2-col monster grid ===== */
.hg-modal-v2 {
  position: relative;
  background: var(--bg-stone);
  border: 1px solid var(--border-blade);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,168,118,0.05);
  max-width: 1080px;
  width: 100%;
  max-height: calc(100vh - 48px);
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */
.hg-modal-v2 .mh {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-iron);
  background: linear-gradient(180deg, var(--bg-raised), var(--bg-stone));
  flex-shrink: 0;
}
.hg-modal-v2 .mh-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.hg-modal-v2 .mh-title .vi {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-parchment);
  white-space: nowrap;
}
.hg-modal-v2 .mh-title .ko {
  font-family: var(--fh);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .02em;
  color: var(--gold-bright);
  white-space: nowrap;
  line-height: 1;
}
.hg-modal-v2 .mh-title .sep {
  color: var(--border-blade);
  font-family: var(--fm);
  font-size: 14px;
}
.hg-modal-v2 .mh-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}
.hg-modal-v2 .btn-icon {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-iron);
  background: var(--bg-deep);
  color: var(--fg-mist);
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}
.hg-modal-v2 .btn-icon:hover {
  color: var(--fg-parchment);
  border-color: var(--border-blade);
}

/* Body 2-col */
.hg-modal-v2 .mb {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Left: map + vertical meta */
.hg-modal-v2 .ml {
  padding: 18px;
  border-right: 1px solid var(--border-iron);
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 420px;
  overflow-y: auto;
}
.hg-modal-v2 .thumb {
  width: 100%;
  aspect-ratio: 700 / 403;
  background: var(--bg-deep);
  border: 1px solid var(--border-iron);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.hg-modal-v2 .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hg-modal-v2 .thumb .ph {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 35% 40%, #3a2a1d 0%, #1a120a 55%, #0c0805 100%);
}
.hg-modal-v2 .thumb .ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0, transparent 18px, rgba(201,168,118,0.04) 18px, rgba(201,168,118,0.04) 19px);
}
.hg-modal-v2 .thumb .ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 35%, rgba(201,168,118,0.12), transparent 50%);
}
.hg-modal-v2 .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,6,10,0.4) 0%, transparent 22%, transparent 75%, rgba(7,6,10,0.4) 100%);
  pointer-events: none;
  z-index: 1;
}
.hg-modal-v2 .thumb .corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--gold);
  opacity: .85;
  z-index: 3;
}
.hg-modal-v2 .thumb .corner.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.hg-modal-v2 .thumb .corner.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.hg-modal-v2 .thumb .corner.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.hg-modal-v2 .thumb .corner.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }
.hg-modal-v2 .thumb .stamp {
  position: absolute;
  left: 10px;
  top: 10px;
  font-family: var(--fm);
  font-size:12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(7,6,10,0.82);
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid rgba(201,168,118,0.3);
  backdrop-filter: blur(4px);
  font-weight: 700;
  z-index: 4;
}
.hg-modal-v2 .thumb .stamp .dim {
  color: var(--fg-mist);
  margin-left: 6px;
  font-weight: 500;
}
.hg-modal-v2 .thumb .upload-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-family: var(--fm);
  font-size:12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-parchment);
  background: rgba(7,6,10,0.82);
  padding: 5px 10px;
  border-radius: 3px;
  border: 1px solid var(--border-blade);
  backdrop-filter: blur(4px);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 4;
  cursor: pointer;
}
.hg-modal-v2 .thumb .upload-hint::before {
  content: "⤒";
  font-size: 12px;
  color: var(--gold-bright);
}
.hg-modal-v2 .thumb .upload-hint:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* Vertical meta strip */
.hg-modal-v2 .zone-info {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.hg-modal-v2 .zinfo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: var(--bg-card);
  border: 1px solid var(--border-iron);
  border-radius: 5px;
}
.hg-modal-v2 .zinfo-row .k {
  font-family: var(--fm);
  font-size:12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-smoke);
  font-weight: 700;
  flex-shrink: 0;
  width: 60px;
}
.hg-modal-v2 .zinfo-row .v {
  flex: 1;
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-parchment);
  font-weight: 600;
  font-feature-settings: "tnum";
}
.hg-modal-v2 .zinfo-row .v .ko {
  color: var(--gold-bright);
  font-style: italic;
  margin-left: 5px;
  font-weight: 500;
}

/* Right: monster list */
.hg-modal-v2 .mr {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  overflow-y: auto;
}
.hg-modal-v2 .mr-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}
.hg-modal-v2 .mr-h h3 {
  margin: 0;
  font-family: var(--fh);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.hg-modal-v2 .mr-h .ct {
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-mist);
  letter-spacing: .14em;
  font-weight: 600;
}
.hg-modal-v2 .mr-h .ct b {
  color: var(--gold-bright);
  font-weight: 700;
}
.hg-modal-v2 .moblist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.hg-modal-v2 .mob {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-iron);
  border-radius: 5px;
  transition: all .12s;
  cursor: default;
  position: relative;
  min-width: 0;
  text-align: center;
}
.hg-modal-v2 .mob:hover {
  border-color: var(--border-blade);
}
.hg-modal-v2 .mob .mic {
  width: 150px;
  height: 150px;
  /* Light parchment bg so dark game sprites (skeletons, trolls, etc.) pop
     instead of blending into the page's --bg-deep. */
  background: #e8dcc4;
  border: 1px solid var(--border-iron);
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #1a140a;
  font-family: var(--fh);
  font-size: 36px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  padding: 8px;
}
.hg-modal-v2 .mob .mic img {
  width: 100%;
  height: 100%;
  /* Use contain (not cover) so the full sprite is visible + centered. */
  object-fit: contain;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
/* Initial KR letter shown only when every fallback URL 404s
   (hunting.js mobImgHtml onerror sets parent .no-img). */
.hg-modal-v2 .mob .mic .mic-initial { display: none; }
.hg-modal-v2 .mob .mic.no-img .mic-initial { display: block; }
.hg-modal-v2 .mob .mb-body {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.hg-modal-v2 .mob .nm {
  font-family: var(--fb);
  font-weight: 700;
  font-size: 14px;
  color: var(--fg-parchment);
  line-height: 1.2;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}
.hg-modal-v2 .mob .ko {
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-smoke);
  letter-spacing: .04em;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
}
/* Lv badge floats over the top-right corner of the icon — frees the bottom
   row entirely for the mob name. */
.hg-modal-v2 .mob .lv {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--fm);
  font-size:13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-ash);
  font-weight: 700;
  white-space: nowrap;
  background: rgba(7, 6, 10, 0.82);
  border: 1px solid var(--border-iron);
  border-radius: 3px;
  padding: 3px 6px;
  backdrop-filter: blur(2px);
  z-index: 2;
}
.hg-modal-v2 .mob .lv b {
  color: var(--gold-bright);
  font-weight: 700;
  margin-left: 4px;
  font-size: 12px;
  font-feature-settings: "tnum";
}
.hg-modal-v2 .mob.t1 { border-left: 2px solid var(--moss-bright); }
.hg-modal-v2 .mob.t2 { border-left: 2px solid var(--rune-bright); }
.hg-modal-v2 .mob.t3 { border-left: 2px solid var(--ember-bright); }
.hg-modal-v2 .mob.t4 { border-left: 2px solid var(--blood-bright); }
.hg-modal-v2 .mob.t5 { border-left: 2px solid var(--purple-bright); }
.hg-modal-v2 .mob.t1 .lv b { color: var(--moss-bright); }
.hg-modal-v2 .mob.t2 .lv b { color: var(--rune-bright); }
.hg-modal-v2 .mob.t3 .lv b { color: var(--ember-bright); }
.hg-modal-v2 .mob.t4 .lv b { color: var(--blood-bright); }
.hg-modal-v2 .mob.t5 .lv b { color: var(--purple-bright); }
.hg-modal-v2 .mob .upload-mob {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 22px;
  height: 22px;
  display: none;
  border: 1px solid var(--border-blade);
  background: rgba(7, 6, 10, 0.82);
  color: var(--fg-parchment);
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
  z-index: 2;
}
.hg-modal-v2 .mob:hover .upload-mob {
  display: grid;
}
.hg-modal-v2 .mob .upload-mob:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
}
.hg-modal-v2 .mob.empty {
  border-style: dashed;
  border-color: var(--border-iron);
  background: var(--bg-deep);
  color: var(--fg-mist);
  justify-content: center;
  font-family: var(--fm);
  font-size:13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
}
.hg-modal-v2 .mob.empty:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}
.hg-modal-v2 .mob.empty::before {
  content: "+";
  font-size: 16px;
  font-weight: 400;
  margin-right: 6px;
  color: currentColor;
}

/* Footer */
.hg-modal-v2 .mf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--border-iron);
  background: var(--bg-stone);
  flex-shrink: 0;
}
.hg-modal-v2 .mf .stat {
  font-family: var(--fm);
  font-size:13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-smoke);
  font-weight: 600;
}
.hg-modal-v2 .mf .stat b {
  color: var(--moss-bright);
  font-weight: 700;
}
.hg-modal-v2 .mf-actions {
  display: flex;
  gap: 8px;
}

/* Responsive */
@media (max-width: 840px) {
  .hg-modal-v2 .mb { grid-template-columns: 1fr; }
  .hg-modal-v2 .ml {
    border-right: 0;
    border-bottom: 1px solid var(--border-iron);
    width: auto;
  }
  .hg-modal-v2 .moblist { grid-template-columns: 1fr; }
}

/* ===== Old detail modal (kept for compat) ===== */
.hg-detail { max-width: 600px; }
.hg-detail-meta {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--bg-deep);
  border: 1px solid var(--border-iron);
  border-radius: 4px;
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-ash);
}
.hg-detail-meta b { color: var(--gold-bright); font-weight: 700; }
.hg-detail-mobs {
  max-height: 280px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  padding: 4px 0;
}
.hg-mob {
  background: var(--bg-deep);
  border: 1px solid var(--border-iron);
  border-radius: 3px;
  padding: 6px 9px;
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-parchment);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.hg-mob .lvl {
  font-size:13px;
  color: var(--gold-bright);
  letter-spacing: .04em;
  font-weight: 700;
}

/* Detail modal: mob layout = avatar + name/id */
.hg-detail-mobs .hg-mob {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
}
.hg-mob-info { flex: 1; min-width: 0; }
.hg-mob-name {
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-parchment);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hg-mob-id {
  font-family: var(--fm);
  font-size:12px;
  color: var(--fg-mist);
  letter-spacing: .04em;
}

/* Mob avatar strip (in zone card) */
.mob-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
}
.mob-more {
  font-family: var(--fm);
  font-size:12px;
  color: var(--fg-mist);
  margin-left: 3px;
  letter-spacing: .04em;
  font-weight: 600;
}

/* Mob avatar (KR initial circle + level overlay).
   Tier colour follows the same scheme as zones (mob level → tier). */
.mob-av {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-iron);
  background: linear-gradient(135deg, var(--bg-deep), var(--bg-card));
  border-radius: 50%;
  cursor: help;
}
.mob-av.sm { width: 22px; height: 22px; }
.mob-av.md { width: 36px; height: 36px; }
.mob-av .mob-initial {
  font-family: var(--fh);
  font-weight: 700;
  color: var(--gold-bright);
  font-size:13px;
  line-height: 1;
  position: absolute;
  z-index: 1;
  /* Hidden when image loads; shown when image errors via .no-img class. */
  opacity: 0;
}
.mob-av.no-img .mob-initial { opacity: 1; }
.mob-av.md .mob-initial { font-size: 16px; }
.mob-av .mob-img {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg-deep);
  z-index: 2;
}
.mob-av { cursor: pointer; }
.mob-av .mob-lvl {
  position: absolute;
  bottom: -3px;
  right: -3px;
  z-index: 3;
  background: var(--bg-void);
  color: var(--fg-parchment);
  font-family: var(--fm);
  font-size: 10px;
  letter-spacing: .02em;
  font-weight: 700;
  padding: 0 2px;
  border-radius: 5px;
  border: 1px solid var(--border-blade);
  line-height: 1.35;
}
/* Sm avatars are too small to fit the lvl pill without overlapping the
   silhouette — hide it; card already shows the LV range in .lvmeta. */
.mob-av.sm .mob-lvl { display: none; }
.mob-av.md .mob-lvl {
  font-size:12px;
  bottom: -4px;
  right: -4px;
  padding: 1px 4px;
}
/* Tier accents on mob avatars */
.mob-av.t1 { border-color: rgba(122, 157, 94, 0.5); }
.mob-av.t1 .mob-initial { color: var(--moss-bright); }
.mob-av.t2 { border-color: rgba(125, 142, 176, 0.5); }
.mob-av.t2 .mob-initial { color: var(--rune-bright); }
.mob-av.t3 { border-color: rgba(245, 158, 11, 0.5); }
.mob-av.t3 .mob-initial { color: var(--ember-bright); }
.mob-av.t4 { border-color: rgba(185, 28, 28, 0.5); }
.mob-av.t4 .mob-initial { color: var(--blood-bright); }
.mob-av.t5 { border-color: rgba(155, 140, 186, 0.5); }
.mob-av.t5 .mob-initial { color: var(--purple-bright); }

/* Mob detail popover */
.mob-popover {
  position: absolute;
  width: 290px;
  background: var(--bg-card);
  border: 1px solid var(--border-blade);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  padding: 12px;
  z-index: 9000;
  font-family: var(--fb);
  display: none;
}
.mob-popover .mp-head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-iron);
  margin-bottom: 10px;
}
.mob-popover .mp-head img {
  width: 48px; height: 48px;
  background: var(--bg-deep);
  border: 1px solid var(--border-iron);
  border-radius: 4px;
  object-fit: cover;
}
.mob-popover .mp-name {
  font-family: var(--fm);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-bright);
}
.mob-popover .mp-fam {
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-smoke);
  margin-top: 2px;
}
.mob-popover .mp-lvl {
  font-family: var(--fh);
  font-weight: 700;
  font-size: 18px;
  color: var(--fg-parchment);
  letter-spacing: .04em;
}
.mob-popover .mp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.mob-popover .mp-stats > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: var(--bg-deep);
  border: 1px solid var(--border-iron);
  border-radius: 3px;
  padding: 5px 8px;
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-ash);
}
.mob-popover .mp-stats b {
  color: var(--fg-parchment);
  font-weight: 700;
  font-size: 12px;
}
.mob-popover .mp-stats b.hp { color: var(--blood-bright); }
.mob-popover .mp-stats b.mp { color: var(--rune-bright); }
.mob-popover .mp-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.mob-popover .mp-traits span {
  font-family: var(--fm);
  font-size:12px;
  color: var(--ember-bright);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 3px;
  padding: 2px 6px;
  letter-spacing: .04em;
}
.mob-popover .mp-section {
  font-family: var(--fm);
  font-size:12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-smoke);
  font-weight: 700;
  margin-bottom: 5px;
}
.mob-popover .mp-drops {
  border-top: 1px solid var(--border-iron);
  padding-top: 8px;
}
.mob-popover .mob-drop {
  display: inline-block;
  font-family: var(--fm);
  font-size:13px;
  color: var(--fg-parchment);
  background: var(--bg-deep);
  border: 1px solid var(--border-iron);
  border-radius: 3px;
  padding: 3px 6px;
  margin: 0 3px 3px 0;
}

/* =============================================================
   Mobile responsive — /hunting.html zone cards & detail modal
   Existing @840px stacks the modal layout; these add tighter spacing
   and smaller widgets on phone-sized viewports.
   ============================================================= */
@media (max-width: 768px) {
  .hg-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 7px; }
  .hg-zone { padding: 8px 9px; gap: 9px; }
  .hg-zone .ic { width: 38px; height: 38px; font-size: 13px; }
  .hg-zone.has-thumb .ic { width: 48px; height: 48px; }
  .hg-ic-badge { font-size:13px; padding: 1px 3px; }
  .hg-zone .nm { font-size:13px; letter-spacing: .1em; }
  .hg-zone .ko { font-size:13px; }
  .hg-zone .lvmeta { font-size:12px; letter-spacing: .06em; }

  .hg-section { margin-bottom: 16px; }
  .hg-sect-h { gap: 8px; }
  .hg-sect-h h2 { font-size: 13px; letter-spacing: .14em; }
  .hg-sect-h .meta { font-size:12px; }

  /* Detail modal — header + footer compact, mob list 1 col */
  .hg-modal-v2 { max-height: calc(100vh - 16px); border-radius: 6px; }
  .hg-modal-v2 .mh { padding: 12px 14px; }
  .hg-modal-v2 .mh-title { font-size: 14px; letter-spacing: .1em; }
  .hg-modal-v2 .mh-title .ko { font-size:13px; }
  .hg-modal-v2 .mb { padding: 12px; gap: 12px; }
  .hg-modal-v2 .ml { gap: 10px; }
  .hg-modal-v2 .zone-info { gap: 6px; padding: 10px 12px; }
  .hg-modal-v2 .zinfo-row { font-size:13px; }
  .hg-modal-v2 .moblist { grid-template-columns: 1fr; gap: 6px; }
  .hg-modal-v2 .mob { padding: 8px; gap: 8px; }
  .hg-modal-v2 .mf { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .hg-modal-v2 .stat { font-size:13px; }
}

@media (max-width: 480px) {
  .hg-grid { grid-template-columns: 1fr; }
  .hg-zone { padding: 8px; }
  .hg-zone.with-menu .body { padding-right: 22px; }
  .hg-modal-v2 .thumb { aspect-ratio: 16/9; }
}
