.maps-section { font-family: 'Open Sans', sans-serif; }

.map-card__ico img { image-rendering: pixelated; max-width: 38px; max-height: 30px; }

.map-row { grid-template-columns: 44px minmax(0, 1fr) 150px 150px 16px; }
.map-row__ico img { image-rendering: pixelated; max-width: 38px; max-height: 30px; }
.map-row__stats { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #5a6284; justify-self: start; }
.map-row__stats .qs { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-row__stats .qs i { font-size: 10.5px; color: #8f9ac4; }

.map-hero__mark { image-rendering: pixelated; height: 52px; max-height: 52px; width: auto; }
.map-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.map-hero__meta .quest-pill {
  background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); color: #e7ebfa;
}
.map-hero__meta .quest-pill i { color: #ff5b7b; margin-right: 6px; font-size: 10.5px; }
.quest-badge--alt { background: linear-gradient(120deg, #2764d8, #4f8dff); }

.maps-areabar { margin: 16px 0; }
.maps-noresults { margin-top: 16px; }

.map-toc__n { margin-left: 8px; font-size: 10.5px; font-weight: 700; color: var(--dms-muted, #6b7280); }
.map-toc .cls-toc__job.is-cur { color: var(--dms-accent, #f82249); }
.map-toc .cls-toc__inner { top: 164px; max-height: calc(100vh - 184px); display: flex; flex-direction: column; overflow: hidden; padding-right: 0; }
.map-toc .cls-toc__top { flex: none; }
.map-toc .cls-toc__inner nav { overflow-y: auto; min-height: 0; padding-right: 6px; }

.map-street { margin-top: 16px; }
.map-street__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.map-street__head h2 {
  font-family: 'Raleway', sans-serif; font-weight: 800; font-size: 17px;
  color: var(--dms-navy-900, #0e1b4d); margin: 0;
}
.map-street__n { font-size: 12px; font-weight: 600; color: var(--dms-muted, #6b7280); white-space: nowrap; }
.map-street__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.map-srow {
  display: grid; grid-template-columns: minmax(0, 1fr) 12px; gap: 10px; align-items: center;
  padding: 9px 12px; text-decoration: none;
  background: var(--dms-paper-2, #f7f8fc);
  border: 1px solid var(--dms-border, rgba(14,27,77,.10));
  border-radius: 10px; transition: transform .15s ease, box-shadow .15s ease;
}
.map-srow:hover { transform: translateY(-1px); box-shadow: var(--dms-shadow, 0 18px 38px -18px rgba(14,27,77,.35)); }
.map-srow__name { font-size: 13.5px; font-weight: 600; color: var(--dms-ink, #100e17); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-srow__chev { color: #b6bdd2; font-size: 12px; }

.mm-panel { margin-top: 16px; }
.mm-note { color: var(--dms-muted, #6b7280); font-size: 12.5px; margin: 0 0 12px; }

.mm-scroll { overflow-x: auto; padding: 4px 0; }
.mm-stage { position: relative; margin: 0 auto; line-height: 0; }
.mm-img {
  width: 100%; height: auto; display: block; image-rendering: pixelated;
  border: 1px solid var(--dms-border, rgba(14,27,77,.10));
  border-radius: 10px; background: rgba(14, 27, 77, .04);
}
.mm-mk { position: absolute; display: block; line-height: 0; z-index: 2; }
.mm-mk::before { content: ''; position: absolute; inset: -7px; }
.mm-mk--portal { transform: translate(-50%, -50%); }
.mm-mk:hover, .mm-mk:focus-visible { z-index: 6; }
.mm-dot {
  display: block; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(14, 27, 77, .5);
}
.mm-pulse {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 5;
  background: var(--dms-accent, #f82249); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(14, 27, 77, .55);
}
.mm-pulse[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .mm-pulse::after {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid var(--dms-accent, #f82249);
    animation: mm-pin-pulse 1.8s ease-out infinite;
  }
  @keyframes mm-pin-pulse {
    0% { transform: scale(.55); opacity: .7; }
    100% { transform: scale(1.9); opacity: 0; }
  }
}
.mm-tip {
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: var(--dms-navy-900, #0e1b4d); color: #fff;
  font-family: 'Open Sans', sans-serif; font-size: 11px; font-weight: 600; line-height: 1.3;
  padding: 4px 9px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s ease; z-index: 7;
}
.mm-mk:hover .mm-tip, .mm-mk:focus-visible .mm-tip { opacity: 1; }
.mm-none { color: var(--dms-muted, #6b7280); font-size: 13.5px; margin: 4px 0 0; }

.map-connlist { display: flex; flex-direction: column; gap: 6px; }
.map-connrow {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 11px; text-decoration: none;
  background: var(--dms-paper-2, #f7f8fc);
  border: 1px solid var(--dms-border, rgba(14,27,77,.10));
  border-radius: 10px;
  font-size: 12.5px; font-weight: 600; color: var(--dms-navy-700, #1d2f6b);
  transition: transform .15s ease, box-shadow .15s ease, color .15s ease;
}
a.map-connrow:hover { transform: translateY(-1px); box-shadow: var(--dms-shadow, 0 18px 38px -18px rgba(14,27,77,.35)); color: var(--dms-accent, #f82249); }
.map-connrow--town { border-color: rgba(248, 34, 73, .30); }
.map-connrow--plain { color: var(--dms-muted, #6b7280); }
.map-connrow__sw { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(14, 27, 77, .15); }
.map-connrow__ico { flex: none; width: 22px; height: 16px; object-fit: contain; image-rendering: pixelated; }
.map-connrow__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.map-count {
  font-size: 11.5px; font-weight: 700; color: var(--dms-muted, #6b7280);
  background: rgba(14, 27, 77, .06); padding: 2px 9px; border-radius: 999px;
  margin-left: 7px; vertical-align: 2px;
}

.map-hint { font-size: 12.5px; color: var(--dms-muted, #6b7280); margin: 0 0 6px; }
.map-npc { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--dms-border, rgba(14,27,77,.12)); }
.map-npc:last-child { border-bottom: 0; padding-bottom: 2px; }
.map-npc--pin { cursor: pointer; transition: background .12s ease; }
.map-npc--pin:hover { background: rgba(14, 27, 77, .035); }
.map-npc--pin.is-active { background: rgba(248, 34, 73, .08); }
.map-npc--pin:focus-visible { outline: 2px solid var(--dms-accent, #f82249); outline-offset: 2px; }
.map-npc__render { max-height: 72px; max-width: 84px; object-fit: contain; flex: none; }
.map-npc__who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.map-npc__who b { font-size: 14px; color: var(--dms-ink, #100e17); }
.map-npc__who span { font-size: 12px; color: var(--dms-muted, #6b7280); }

.map-mob { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--dms-border, rgba(14,27,77,.12)); }
.map-mob:last-child { border-bottom: 0; padding-bottom: 2px; }
.map-mob__name { font-size: 13.5px; font-weight: 600; color: var(--dms-ink, #100e17); min-width: 0; }

.map-x {
  margin-left: auto; flex: none;
  font-family: 'Raleway', sans-serif; font-weight: 800; font-size: 11.5px;
  color: var(--dms-navy-700, #1d2f6b); background: rgba(14, 27, 77, .06);
  padding: 3px 9px; border-radius: 999px;
}

@media (max-width: 768px) {
  .map-row {
    grid-template-columns: 44px minmax(0, 1fr) 16px;
    grid-template-areas: 'ico main chev' 'ico meta chev';
    row-gap: 6px;
  }
  .map-row .map-row__ico { grid-area: ico; }
  .map-row .quest-row__main { grid-area: main; }
  .map-row .quest-row__chev { grid-area: chev; }
  .map-row .quest-chip { display: none; }
  .map-row__stats { grid-area: meta; flex-direction: row; gap: 12px; flex-wrap: wrap; }
  .map-street__list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .map-srow, .mm-tip, .map-connrow, .map-npc--pin { transition: none; }
}
