/* ════════ ABYSS MAP (URBAN) ════════ */
.map-wrap {
  width: min(960px, 94vw);
  margin: 0 auto;
  position: relative;
}
#abyss-map {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 34px rgba(0,0,0,0.65));
}

/* 달 */
.map-moon {
  fill: #c084fc;
  opacity: 0.16;
}

/* 건물 실루엣 */
.map-bldg-far rect {
  fill: #1a1226;
  stroke: #2d1b4e;
  stroke-width: 1;
  opacity: 0.8;
}
.map-bldg-mid rect {
  fill: #221731;
  stroke: #4a2d7a;
  stroke-width: 1;
  opacity: 0.9;
}
.map-bldg-win rect { opacity: 0.5; }

/* 보스 마천루 */
.map-tower .bldg-main {
  fill: #241635;
  stroke: #7c3aed;
  stroke-width: 1.4;
  opacity: 0.95;
}
.map-tower .bldg-side {
  fill: #1c122a;
  stroke: #4a2d7a;
  stroke-width: 1;
  opacity: 0.85;
}
.map-tower .tower-antenna {
  stroke: #9d5cf0;
  stroke-width: 2;
  opacity: 0.8;
}

/* 도로 보조선 */
.map-street path {
  fill: none;
  stroke: #4a2d7a;
  stroke-width: 1;
  stroke-dasharray: 3 7;
  opacity: 0.16;
}

/* 가로등 */
.map-lamp line {
  stroke: #4a2d7a;
  stroke-width: 1.6;
  opacity: 0.7;
}
.map-lamp circle {
  fill: #c084fc;
  opacity: 0.75;
  filter: url(#mapGlow);
}

.map-runes-svg text {
  fill: #4a2d7a;
  font-size: 18px;
  opacity: 0.5;
}

/* 경로 세그먼트 */
.map-seg {
  fill: none;
  stroke: #2d1b4e;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 0.018 0.03; /* pathLength=1 기준 점선 */
  opacity: 0.35;
}
.map-seg.revealed {
  stroke: var(--purple-glow);
  stroke-dasharray: none;
  opacity: 0.9;
  filter: url(#mapGlow);
}
.map-seg.drawing {
  stroke: var(--purple-light);
  opacity: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: segDraw 1.1s ease forwards;
  filter: url(#mapGlow);
}
@keyframes segDraw { to { stroke-dashoffset: 0; } }

/* 거점 노드 */
.map-node {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.18s ease;
}
.map-node .node-ring  { fill: none; stroke: var(--purple-mid); stroke-width: 2; transition: stroke 0.25s, stroke-width 0.25s; }
.map-node .node-core  { fill: #130d1c; stroke: var(--purple-bright); stroke-width: 1.5; transition: fill 0.25s, stroke 0.25s; }
.map-node .node-num   { fill: var(--purple-light); font-family: 'Cinzel', serif; font-size: 15px; font-weight: 700; text-anchor: middle; pointer-events: none; }
.map-node .node-label { fill: var(--text-mid); font-family: 'Noto Serif KR', serif; font-size: 13px; text-anchor: middle; pointer-events: none; }
.map-node .node-lock  { display: none; font-size: 14px; text-anchor: middle; pointer-events: none; }
.map-node .node-halo  {
  fill: none;
  stroke: var(--purple-glow);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

/* 호버/클릭 이펙트 */
.map-node:not(.locked):hover { transform: scale(1.1); }
.map-node:not(.locked):hover .node-ring {
  stroke: var(--purple-light);
  filter: url(#mapGlow);
}
.map-node:not(.locked):hover .node-core { fill: #1e1230; }
.map-node:not(.locked):active { transform: scale(0.94); }
.map-node.clicked { animation: nodeClick 0.3s ease; }
@keyframes nodeClick {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.map-node.selected .node-ring {
  stroke: var(--purple-light);
  stroke-width: 3.2;
  filter: url(#mapGlow);
}

/* 잠김 */
.map-node.locked { cursor: not-allowed; opacity: 0.45; }
.map-node.locked .node-num { display: none; }
.map-node.locked .node-lock { display: block; }
.map-node.locked .node-label { fill: var(--text-dim); }

/* 정화됨 */
.map-node.cleared .node-ring { stroke: var(--purple-bright); opacity: 0.85; }
.map-node.cleared .node-core { fill: #1c122a; stroke: var(--purple-bright); }

/* 현재 목표 */
.map-node.current .node-ring { stroke: var(--purple-light); }
.map-node.current .node-core { stroke: var(--purple-light); fill: #21142f; }
.map-node.current .node-num  { fill: var(--text-bright); }
.map-node.current .node-halo { animation: haloPing 2s ease-out infinite; }
@keyframes haloPing {
  0%   { transform: scale(0.62); opacity: 0.85; }
  75%  { transform: scale(1.65); opacity: 0; }
  100% { transform: scale(1.65); opacity: 0; }
}

/* 보스 노드 */
.map-node.boss .node-ring { stroke-width: 2.6; }
.map-node.boss.current .node-ring,
.map-node.boss.current .node-core { stroke: #ff7a9c; }
.map-node.boss.current .node-halo { stroke: #ff7a9c; }
.map-node.boss.current .node-num { fill: #ffc4d4; }

/* 해금 연출 */
.map-node.unlocking .node-core { animation: unlockFlash 0.9s ease; }
.map-node.unlocking { animation: unlockPop 0.9s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes unlockFlash {
  0%   { fill: #efe2ff; stroke: #fff; }
  100% { }
}
@keyframes unlockPop {
  0%   { transform: scale(0.7); }
  55%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* 잠김 노드 클릭 거부 */
.map-node.denied { animation: nodeShake 0.4s ease; }
@keyframes nodeShake {
  20% { transform: translateX(-4px); }
  45% { transform: translateX(4px); }
  70% { transform: translateX(-2.5px); }
  90% { transform: translateX(2.5px); }
}

/* 하단 정보 패널 */
.map-info {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
  padding: 14px 20px;
  border: 1px solid var(--border-purple);
  background: rgba(16, 10, 22, 0.85);
  min-height: 74px;
}
.map-info-text { flex: 1; text-align: left; }
.map-info-name {
  font-family: 'Noto Serif KR', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 4px;
}
.map-info-desc {
  font-size: 0.75rem;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.map-info-meta { font-size: 0.72rem; color: var(--text-mid); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.map-stars { color: var(--purple-light); letter-spacing: 2px; }
.map-stars .star-empty { color: var(--purple-dark); }
.map-diff-label { color: var(--purple-glow); }
.map-enemy-list { color: var(--text-dim); }
.map-cleared-tag {
  font-size: 0.65rem;
  color: #7dc98f;
  border: 1px solid #3d6247;
  padding: 1px 7px;
  margin-left: 8px;
  vertical-align: middle;
}
.btn-map-go { white-space: nowrap; }
.btn-map-go:disabled { opacity: 0.35; cursor: not-allowed; }
