/* 지도 페이지 전용 — map-core/myomap/style.css 의 좌측패널+지도 레이아웃을 gam119 톤으로 재구성 */
.mapbody {
  overflow-x: hidden;
}
#wrap {
  display: grid;
  grid-template-columns: 392px 1fr;
  height: calc(100vh - 61px);
  min-height: 520px;
  border-top: 1px solid var(--line);
}

/* ── 좌측 패널 ── */
#panel {
  position: relative;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--white);
  min-width: 0;
}
#brand {
  padding: 18px 20px 14px;
  background: var(--ink);
  color: var(--white);
}
#brand h1 {
  font-size: 20px;
}
#brand p {
  margin-top: 5px;
  font-size: 12.5px;
  color: #9da0a5;
}
#searchbox {
  display: flex;
  gap: 8px;
  padding: 14px 16px 10px;
}
#searchbox input {
  margin-top: 0;
  padding: 10px 12px;
  font-size: 14px;
}
#searchbox button {
  flex: none;
  padding: 0 16px;
  background: var(--ink);
  color: #fff;
  border: 0;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
#searchbox button:hover {
  background: var(--orange);
}
#filters {
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--line);
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--steel);
  cursor: pointer;
}
.chip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
  opacity: 0.3;
}
.chip.on {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--concrete);
}
.chip.on i {
  opacity: 1;
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.row2 select {
  margin-top: 0;
  padding: 9px 10px;
  font-size: 13.5px;
  background: var(--white);
  border-color: var(--line);
}
.suspectToggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #44474c;
  cursor: pointer;
}
.suspectToggle input {
  width: auto;
  margin: 0;
  accent-color: var(--orange);
}

#listHead {
  padding: 11px 16px;
  font-size: 13px;
  color: var(--steel);
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}
#listHead b {
  color: var(--orange-deep);
  font-size: 15px;
}
#listHead .hint {
  font-size: 12px;
}
#list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.item:hover {
  background: #fff7f3;
}
.item .t {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.item .tag {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  padding: 2px 7px;
  letter-spacing: 0.02em;
}
.item .nm {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
}
.item .addr {
  font-size: 12.5px;
  color: var(--steel);
  margin-top: 4px;
  word-break: keep-all;
}
.item .meta {
  margin-top: 7px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #44474c;
}
.item .meta em {
  font-style: normal;
  color: var(--steel);
}
.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border: 1.5px solid var(--orange);
  color: var(--orange-deep);
  background: #fff4ee;
}
.badge.grey {
  border-color: var(--line);
  color: var(--steel);
  background: var(--concrete);
}
.empty {
  padding: 34px 20px;
  text-align: center;
  color: var(--steel);
  font-size: 13.5px;
  line-height: 1.7;
}

/* ── 상세 ── */
#detail {
  position: absolute;
  inset: 0;
  background: var(--white);
  z-index: 20;
  overflow-y: auto;
  padding-bottom: 24px;
}
#detail.hidden,
.hidden {
  display: none !important;
}
#backBtn {
  position: sticky;
  top: 0;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  background: var(--ink);
  color: #fff;
  border: 0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}
/* ── 본건 로드뷰 ── */
#rvBox {
  position: relative;
  width: 100%;
  height: 208px;
  background: var(--ink);
  overflow: hidden;
}
#roadview {
  width: 100%;
  height: 100%;
}
#rvMsg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  background: var(--ink);
  color: #9da0a5;
  font-size: 13px;
  line-height: 1.6;
}
#rvMsg.hidden {
  display: none !important;
}
#rvOpen {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid var(--ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
#rvOpen:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
#rvOpen.hidden {
  display: none !important;
}

#detailBody {
  padding: 18px 18px 0;
}
#detailBody h2 {
  font-size: 19px;
  line-height: 1.4;
  word-break: keep-all;
}
#detailBody .sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--steel);
  line-height: 1.65;
}
table.dt {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13.5px;
}
table.dt th,
table.dt td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
table.dt th {
  background: var(--concrete);
  width: 38%;
  font-weight: 700;
  white-space: nowrap;
}
table.dt td.a {
  text-align: right;
}
#detailBody h3 {
  margin-top: 20px;
  font-size: 15px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink);
}
.dwarn {
  margin-top: 16px;
  background: #fff4ee;
  border-left: 4px solid var(--orange);
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #44474c;
}
.dcta {
  display: block;
  margin-top: 14px;
  padding: 13px;
  text-align: center;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
}
.dcta:hover {
  background: var(--orange-deep);
}
.dcta.dark {
  background: var(--ink);
}
.dcta.dark:hover {
  background: #34373c;
}

#src {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fafafa;
  font-size: 11.5px;
  color: var(--steel);
  line-height: 1.6;
}
#srcMeta {
  font-weight: 700;
  color: #44474c;
}

/* ── 지도 영역 ── */
#mapArea {
  position: relative;
  min-width: 0;
}
#map {
  width: 100%;
  height: 100%;
  background: var(--concrete);
}
#mapFallback {
  position: absolute;
  inset: 0;
  background: var(--concrete);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 5;
}
.fb-box {
  max-width: 520px;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--orange);
  padding: 30px 28px;
}
.fb-box h2 {
  font-size: 20px;
  margin-bottom: 16px;
}
.fb-box ol {
  margin: 0 0 16px 18px;
  font-size: 14px;
  line-height: 1.9;
}
.fb-box code {
  background: var(--concrete);
  padding: 1px 5px;
  font-size: 12.5px;
}
.fb-key {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.fb-key input {
  margin-top: 0;
}
.fb-key .btn {
  flex: none;
  padding: 12px 18px;
  font-size: 14px;
}

/* ── 지도 위 상시 컨트롤 ── */
.mapctl {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--white);
  border: 2px solid var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(27, 29, 33, 0.25);
}
.mapctl:hover {
  border-color: var(--orange);
  color: var(--orange-deep);
}
.mapctl .ico {
  width: 13px;
  height: 13px;
  flex: none;
  border: 2px solid currentColor;
  background: transparent;
}
.mapctl[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 3px 3px 0 var(--ink);
}
.mapctl[aria-pressed="true"]:hover {
  background: var(--orange-deep);
  color: #fff;
}
.mapctl[aria-pressed="true"] .ico {
  background: #fff;
  border-color: #fff;
}

/* ── 지적 레이어 ── */
#parcelStatus {
  position: absolute;
  top: 56px; /* 상시 컨트롤 아래 */
  left: 12px;
  z-index: 6;
  background: rgba(27, 29, 33, 0.9);
  color: #fff;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
}
#parcelStatus.warn {
  background: rgba(194, 65, 12, 0.94);
}
#parcelStatus .spin {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#parcelInfo {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 7;
  width: 268px;
  max-width: calc(100% - 24px);
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--orange);
  padding: 15px 16px 14px;
}
#parcelInfo #parcelClose {
  position: absolute;
  top: 4px;
  right: 6px;
  border: 0;
  background: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--steel);
  padding: 4px 6px;
}
#parcelInfo #parcelClose:hover {
  color: var(--orange-deep);
}
#parcelInfo .pi-jibun {
  font-family: "Black Han Sans", sans-serif;
  font-size: 19px;
  line-height: 1.25;
}
#parcelInfo .pi-jimok {
  display: inline-block;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: 3px;
}
#parcelInfo .pi-addr {
  font-size: 12.5px;
  color: var(--steel);
  margin-top: 5px;
  word-break: keep-all;
}
#parcelInfo dl {
  margin-top: 11px;
  border-top: 1px solid var(--line);
}
#parcelInfo dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
#parcelInfo dt {
  color: var(--steel);
  flex: none;
}
#parcelInfo dd {
  font-weight: 700;
  text-align: right;
}
#parcelInfo dd.hl {
  color: var(--orange-deep);
}
#parcelInfo .pi-note {
  margin-top: 9px;
  font-size: 11px;
  color: var(--steel);
  line-height: 1.5;
}

#legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  padding: 9px 12px;
  font-size: 12px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
#legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
#legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}
#legend i.ring {
  background: #fff;
  border: 3px solid var(--orange);
}

/* ── 지도 위 마커/오버레이 ── */
.pdot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.pdot.sus {
  box-shadow:
    0 0 0 3px #f4581c,
    0 1px 3px rgba(0, 0, 0, 0.4);
}
.plabel {
  background: #fff;
  border: 2px solid var(--orange);
  border-left-width: 5px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plabel.stalled {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.plabel small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--steel);
}
.plabel.stalled small {
  color: #b9bcc0;
}
.cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  background: rgba(244, 88, 28, 0.85);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ── 반응형: 모바일은 지도 위/목록 아래 ── */
@media (max-width: 900px) {
  #wrap {
    grid-template-columns: 1fr;
    grid-template-rows: 46vh 1fr;
    height: auto;
  }
  #mapArea {
    order: -1;
    min-height: 300px;
  }
  #panel {
    border-right: 0;
    height: 62vh;
  }
  #legend {
    font-size: 11px;
    padding: 7px 9px;
    gap: 10px;
  }
}
