/* ============================================================
   맵별 열쇠 (keys.html · js/keys.js, 2026-10-10)
   작업 영역(.bx-work/.bx-col)·지도 레이어·마커(.rp-*)는 style.css 의 보스 도감·동선 플래너 규칙을 그대로 쓴다.
   style.css 와 따로 둔다 (여러 세션이 style.css 를 같이 고쳐서 충돌을 줄이려고)
   ============================================================ */

/* 지도 위 잠금 — 열쇠 아이콘, 테두리 색 = 종류(문 금색 · 트렁크 파랑) */
.kx-pin {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 4px;
  border: 2px solid var(--c); background: #15150f;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.6);
  overflow: hidden; font-size: 13px;
}
.kx-pin img { width: 100%; height: 100%; object-fit: contain; }
.kx-lock { cursor: pointer; }
.kx-lock .rp-mlabel { top: 17px; max-width: 170px; }
.kx-lock.hl .kx-pin { box-shadow: 0 0 0 3px var(--text-strong), 0 2px 8px rgba(0, 0, 0, 0.7); }
.kx-card-q { color: var(--tan-bright); }
.kx-en { margin-top: 0; margin-bottom: 3px; }

.kx-legend { white-space: nowrap; margin-left: 4px; }
.kx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 3px; vertical-align: -1px; border: 2px solid; }
.kx-legend i.d { border-color: #e8b64c; }
.kx-legend i.t { border-color: #5fb7e5; }

/* 오른쪽 목록 */
.kx-search {
  width: 100%; margin: 0; padding: 7px 10px;
  font: inherit; font-size: 0.86rem; color: var(--text-strong);
  background: var(--bg-alt); border: 1px solid var(--border-strong); border-radius: 2px;
}
.kx-search:focus { outline: none; border-color: var(--tan); }
.kx-row { background: var(--bg-alt); border-left: 3px solid var(--border-strong); border-radius: 2px; margin-bottom: 6px; }
.kx-row.sel { background: var(--panel-hover); border-left-color: var(--tan-bright); box-shadow: inset 0 0 0 1px var(--border-strong); }
.kx-row-head {
  display: flex; align-items: flex-start; gap: 9px; width: 100%;
  padding: 7px 8px; background: none; border: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.kx-row-head:hover { background: var(--panel-hover); }
.kx-row-head[data-noloc] { cursor: default; }
.kx-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 2px; overflow: hidden;
  border: 1px solid var(--border-strong); background: #15150f;
}
.kx-icon img { width: 100%; height: 100%; object-fit: contain; }
.kx-row-main { flex: 1; min-width: 0; }
.kx-row-name { display: block; color: var(--text-strong); font-size: 0.9rem; line-height: 1.35; }
.kx-row-en { display: block; color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.kx-row-sub { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); line-height: 1.6; }
.kx-row-q { display: block; font-size: 0.74rem; color: var(--tan-bright); line-height: 1.45; }
.kx-empty { color: var(--muted); font-size: 0.84rem; padding: 10px 4px; }
.kx-other-head {
  margin: 12px 0 6px; padding-top: 10px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted);
}
.kx-other {
  display: block; width: 100%; margin-bottom: 4px; padding: 5px 8px;
  font: inherit; font-size: 0.82rem; text-align: left; cursor: pointer;
  color: var(--text); background: var(--panel); border: 1px solid var(--border); border-radius: 2px;
}
.kx-other:hover { border-color: var(--tan); color: var(--text-strong); }
.kx-other-map {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--tan-bright);
  border: 1px solid var(--border-strong); border-radius: 2px; padding: 0 4px; margin-right: 6px;
}
/* 같은 자리 잠금은 --dx/--dy 로 벌린다 (scale 뒤 translate 라 확대해도 간격 그대로 — 보스 도감과 같은 방식) */
.rp-marker.kx-lock {
  transform: translate(-50%, -50%) scale(var(--rp-inv)) translate(var(--dx, 0px), var(--dy, 0px));
}

/* 리뉴얼 (css/renewal.css 와 짝) — 각진 모서리·고정폭 글꼴을 리뉴얼 톤으로 */
html[data-design="renewal"] .kx-search { border-radius: 9px; background: rgba(10, 11, 13, 0.85); padding: 8px 12px; }
html[data-design="renewal"] .kx-search:focus { box-shadow: 0 0 0 3px rgba(242, 207, 74, 0.15); }
html[data-design="renewal"] .kx-row { border-radius: 8px; background: rgba(255, 255, 255, 0.03); border-left-width: 2px; }
html[data-design="renewal"] .kx-row.sel { background: rgba(242, 207, 74, 0.07); }
html[data-design="renewal"] .kx-row-head { border-radius: 8px; }
html[data-design="renewal"] .kx-icon { border-radius: 7px; border-color: var(--border); background: rgba(0, 0, 0, 0.35); }
html[data-design="renewal"] .kx-row-sub,
html[data-design="renewal"] .kx-other-head,
html[data-design="renewal"] .kx-other-map { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
html[data-design="renewal"] .kx-row-sub { font-size: 0.76rem; }
html[data-design="renewal"] .kx-other { border-radius: 8px; }
html[data-design="renewal"] .kx-other-map { border-radius: 5px; padding: 0 5px; }
html[data-design="renewal"] .kx-pin { border-radius: 7px; }
html[data-design="renewal"] .kx-legend i { border-radius: 3px; }
