/* 장소 (Location): 위치 카드 · 위치 태그 · 장소 붙이기 창 · 지도 창 — CACHI 에서 옮겨 와 EDIT 모양으로
   지도 타일은 회색조로 보입니다 (핀만 캐릭터 색). */

/* 위치 카드 (메신저 · 로그) */
.loc {
  display: flex; gap: 10px; align-items: stretch; width: 100%; max-width: 360px; margin: 6px 0 2px; padding: 6px;
  background: #fff; border: 1px solid #000; text-align: left; color: #111; font: inherit; cursor: pointer;
  box-shadow: 3px 3px 0 #000;
}
.loc:hover { background: #f4f4f4; }
.loc:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 #000; }
.loc__map { position: relative; flex: none; width: 92px; height: 72px; overflow: hidden; border: 1px solid #000; background: #e6e6e6; }
.loc__map svg { display: block; width: 100%; height: 100%; }
.loc__map--tiles img:not(.loc__pin) { position: absolute; width: 256px; height: 256px; max-width: none; filter: grayscale(1) contrast(.92) brightness(1.04); }
.loc__pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -21px 0 0 -11px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
.loc__info { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.loc__info b { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; line-height: 1.25; }
.loc__info b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc__info b img { flex: none; width: 14px; height: 14px; }
.loc__info small { color: var(--muted); font-size: 11.5px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.loc__go { align-self: flex-start; margin-top: 2px; padding: 1px 8px; background: #111; color: #fff; border: 1px solid #000; font-size: 11px; font-weight: 700; line-height: 1.6; }

/* 위치 태그 (대화 · SNS) */
.loc-chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; margin: 2px 0 0; padding: 1px 9px 1px 5px;
  border: 1px solid #000; background: #fff; color: #111; font-size: 11.5px; font-weight: 700; line-height: 1.7; cursor: pointer;
  box-shadow: 2px 2px 0 #000;
}
.loc-chip:hover { background: #f0f0f0; }
.loc-chip img { flex: none; width: 12px; height: 12px; }
.loc-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat__loc { list-style: none; margin: 10px 0; }
.chat__loc .loc { max-width: 420px; }

/* SNS: 게시물 이름 아래 위치 줄 · 격자 칸의 작은 핀 · 새 게시물의 위치 */
.sp__where, .sc__loc { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; margin-top: 2px; padding: 0; border: 0; background: none; color: #111; font-size: 11.5px; font-weight: 700; line-height: 1.4; cursor: pointer; }
.sp__where { text-decoration: underline; text-underline-offset: 2px; }
.sp__where img, .sc__loc img { width: 12px; height: 12px; flex: none; }
.sp__where span, .sc__loc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc__loc { cursor: default; }
.sc__loc i { margin-left: 6px; font-style: normal; color: var(--muted); cursor: pointer; }
.sn__tile .sn__pin { position: absolute; left: 5px; top: 5px; width: 15px; height: 15px; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }

/* 장소 붙이기 창 */
.la { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; overflow: auto; background: var(--paper); font-size: 12.5px; }
.la__tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.la__tabs button { padding: 5px 10px; border: 1px solid #000; background: var(--bar-off); color: #111; font-size: 12px; font-weight: 700; cursor: pointer; }
.la__tabs button.on { background: #111; color: #fff; }
.la__form { display: flex; flex-direction: column; gap: 9px; }
.la__form[hidden], .la__recent[hidden], .la__link[hidden] { display: none; }
.la label { display: flex; flex-direction: column; gap: 3px; font-weight: 700; }
.la label small { font-weight: 500; color: var(--muted); }
.la .field { font-weight: 400; }
.la__xy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.la__st { flex: 1; min-width: 160px; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; }
.la__st img { width: 12px; height: 12px; }
.la__row { display: flex; align-items: center; gap: 8px; }
.la__row b { width: 54px; flex: none; }
.la__row .seg { display: flex; gap: 4px; flex-wrap: wrap; }
.la__row .btn.is-on { background: #111; color: #fff; }
.la__pv { padding: 8px; border: 1px dashed #000; background: #fff; }
.la__pv > small { display: block; margin-bottom: 4px; color: var(--muted); }
.la__pv .loc { cursor: default; margin: 0; }
.la__empty { margin: 6px 0; color: var(--muted); }
.la__recent { display: flex; flex-direction: column; gap: 4px; min-height: 120px; }
.la__ri { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #000; background: #fff; text-align: left; font: inherit; color: #111; cursor: pointer; }
.la__ri:hover { background: #111; color: #fff; }
.la__ri:hover small { color: #cfcfcf; }
.la__ri img { width: 16px; height: 16px; flex: none; }
.la__ri span { min-width: 0; display: flex; flex-direction: column; }
.la__ri small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.la__btns { margin-top: auto; display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

/* 장소 창 (회색조 지도) */
.lm { height: 100%; display: flex; flex-direction: column; background: var(--paper); }
.lm__tb { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--tool); color: #fff; border-bottom: 1px solid #000; }
.lm__tb .fill { flex: 1; }
.lm__name { min-width: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.lm__name img { width: 16px; height: 16px; flex: none; }
.lm__name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm__tb a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.lm__map { position: relative; flex: 1; min-height: 160px; margin: 8px; overflow: hidden; border: 1px solid #000; box-shadow: 3px 3px 0 #000; background: #e6e6e6; cursor: grab; touch-action: none; user-select: none; }
.lm__map.is-drag { cursor: grabbing; }
.lm__map.is-fake { cursor: default; }
.lm__tiles, .lm__pins { position: absolute; inset: 0; }
.lm__tiles svg { width: 100%; height: 100%; display: block; }
.lm__tiles img { position: absolute; width: 256px; height: 256px; max-width: none; filter: grayscale(1) contrast(.92) brightness(1.04); pointer-events: none; }
.lm__tiles img.is-bad { visibility: hidden; }
.lm__pin { position: absolute; display: flex; align-items: center; gap: 0; padding: 0; border: 0; background: none; transform: translate(-13px, -30px); cursor: pointer; }
.lm__pin img { width: 26px; height: 30px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .25)); }
.lm__pin span { position: absolute; left: 28px; top: 1px; padding: 0 7px; height: 20px; white-space: nowrap; background: #fff; border: 1px solid #000; box-shadow: 2px 2px 0 #000; font-size: 11.5px; font-weight: 800; line-height: 20px; color: #111; text-align: center; }
.lm__pin.is-flip span { left: auto; right: 28px; }
.lm__pin:not(.is-main) img { width: 20px; height: 24px; }
.lm__pin:not(.is-main) { transform: translate(-10px, -24px); }
.lm__pin:not(.is-main) span { display: none; top: -2px; left: 22px; }
.lm__pin:not(.is-main).is-flip span { right: 22px; }
.lm__pin:not(.is-main):hover span, .lm__pin:not(.is-main):focus-visible span { display: block; }
.lm__pin.is-main { z-index: 2; }
.lm__zoom { position: absolute; left: 8px; top: 8px; z-index: 3; display: flex; flex-direction: column; border: 1px solid #000; background: #fff; box-shadow: 2px 2px 0 #000; }
.lm__zoom[hidden] { display: none; }
.lm__zoom button { width: 26px; height: 26px; padding: 0; border: 0; border-bottom: 1px solid #000; background: #fff; font-size: 16px; font-weight: 800; line-height: 1; color: #111; cursor: pointer; }
.lm__zoom button:hover { background: #111; color: #fff; }
.lm__zoom button:last-child { border-bottom: 0; }
.lm__attr { position: absolute; right: 0; bottom: 0; z-index: 3; padding: 1px 5px; background: rgba(255, 255, 255, .85); color: #555; font-size: 9.5px; }
.lm__attr a { color: inherit; }
.lm__info { margin: 0 8px 8px; padding: 8px 10px; display: grid; grid-template-columns: 64px 1fr; gap: 3px 8px; background: #fff; border: 1px solid #000; font-size: 12px; }
.lm__info dt { color: var(--muted); font-weight: 700; }
.lm__info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .loc { max-width: none; }
  .lm__tb { flex-wrap: wrap; }
  .lm__name { flex: 1 1 100%; }
}
.sn__tile--txt .sn__pin { left: auto; right: 6px; top: 6px; }
