body{
  margin: 0; /* 기본 8px 여백 제거: 지도가 화면 가장자리까지 꽉 차도록 */
  background-color : black;
  box-sizing: border-box;
}


#map{
  width:100vw;
  height:100vh;
  position: relative;
  z-index: 0; /* Leaflet 패널(z-index 400~700)이 마커·서치바 위로 올라오지 않게 스택 컨텍스트 생성 */
}
.searchBox {
  position:absolute;
  top:100px;
  right:30px;
}

.listBox {
  max-width: 500px;
  display: none;
}

#temp{
  margin-left: 600px;
}

.listInner {
  background-color: #dedede;
  margin: 10px 5px;
  padding: 4px;
  display: none;
}

/* ───────── 검색 결과 핀 + 건물 이름 ───────── */
/* Leaflet이 JS에서 inline으로 지정하는 크기/앵커(75px 고정)를 CSS 변수로 덮어써 반응형으로 만든다.
   pin.png 비율(549x455 ≈ 0.8288)을 유지하고, 핀 끝(하단 중앙)이 건물 좌표를 가리키도록 앵커를 맞춘다. */
.user-wrap {
  --pin-w: clamp(40px, 5.8vw, 75px);
  --pin-h: calc(var(--pin-w) * 0.8288);
  width: var(--pin-w) !important;
  height: var(--pin-h) !important;
  margin-left: calc(var(--pin-w) / -2) !important;
  margin-top: calc(var(--pin-h) * -1) !important;
}
.user-wrap a {
  display: block;
  position: relative;
  text-decoration: none;
}

/* Leaflet 기본 규칙(.leaflet-container .leaflet-marker-pane img {width:auto})보다 우선하도록 선택자를 길게 쓴다 */
.leaflet-container .user-wrap .point {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.45));
  transform-origin: 50% 100%;
  animation: pin-drop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.25);
}
@keyframes pin-drop {
  from { opacity: 0; transform: translateY(-14px) scale(0.85); }
  to   { opacity: 1; transform: none; }
}

.text {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0.9em 0.4em 0.75em;
  box-sizing: border-box;
  max-width: 70vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 clamp(12px, 1.25vw, 16px) / 1.3 Hind, calibri;
  letter-spacing: 0.01em;
  color: #14171c;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.text::before { /* 검색창 버튼과 같은 노란 포인트 */
  content: "";
  flex: none;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: #ffd530;
  box-shadow: 0 0 0 2px rgba(255, 213, 48, 0.35);
}
.user-wrap a:hover .text,
.user-wrap a:focus-visible .text {
  background: #ffd530;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 213, 48, 0.45);
}
.user-wrap a:hover .text::before,
.user-wrap a:focus-visible .text::before { background: #14171c; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  .point { animation: none; }
  .text { transition: none; }
  .marker_link::after { animation: none; opacity: 0; }
  .marker_link::before { transition: none; }
}

/* 호버 영역 40x40 (크기/앵커는 main.js의 MARKER_SIZE와 맞춘다). 눈에 보이는 점은 그 안의 20px */
.marker{
    position: absolute;
    width: 40px;
    height: 40px;
}

.marker_info {
    font-family: Consolas, monospace;
    font-size: 20px;
    padding: 10px 15px;
    background-color: #444444;
    border-radius: 5px;
    color: #ffffff;
    position:absolute;
    display: none;
    top: 36px;                   /* 호버 영역(40px) 바로 아래 */
    left: 50%;
    transform: translateX(-50%); /* 박스 가운데가 마커 중심 아래에 오도록 */
    white-space: nowrap;         /* 텍스트 길이에 맞춰 박스가 늘어나고 한 줄로 유지 */
    pointer-events: none;        /* 툴팁이 호버를 가로채 깜빡이지 않게 */
}

/* <a> 전체가 40px 원형 호버 영역. 점/펄스는 ::before/::after로 그려 호버 영역 크기는 변하지 않는다 */
.marker_link {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.marker_link::before,
.marker_link::after {
    content: "";
    position: absolute;
    inset: 10px;            /* 40px 영역 가운데 20px */
    box-sizing: border-box;
    border-radius: 50%;
}

/* 진한 노랑 점 + 흰 테두리 + 그림자: 위성 이미지 위에서도 또렷하게 */
.marker_link::before {
    background: #ffc400;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.55);
    transition: transform 0.15s ease, background 0.15s ease;
}

/* 퍼져나가는 링: 지도 어디에 마커가 있는지 한눈에 보이게 */
.marker_link::after {
    border: 2px solid rgba(255, 196, 0, 0.8);
    animation: marker-pulse 2s ease-out infinite;
    pointer-events: none;
}
@keyframes marker-pulse {
    from { transform: scale(1);   opacity: 0.9; }
    to   { transform: scale(2.2); opacity: 0; }
}

.marker_link:hover::before {
    background: #ff9500;
    transform: scale(1.4);
}
.marker_link:hover::after { animation: none; opacity: 0; }

.map-notice-text {
    position: absolute;
    bottom: 0;
    left: 0;
    white-space: nowrap;
    font-size: 14px;
    color: #ffffff;
    text-shadow: 0 0 3px #000000, 0 0 6px #000000; /* 위성 이미지 위에서도 읽히도록 */
    pointer-events: none;
}

.marker_link:hover + .marker_info{    
  position:absolute;
  display: block;
}

button, input {
    font: 1em Hind, calibri;
    line-height: 1.5em;
}

/* ───────── Search ───────── */
.srch_form {
  --sb-accent: #ffd530;
  --sb-accent-hover: #ffe066;
  --sb-ink: #14171c;
  --sb-muted: #6b7280;
  /* 뷰포트에 따라 같이 커지고 줄어드는 기준값 */
  --sb-gap: clamp(5px, 1.6vw, 20px);   /* 오른쪽 여백 */
  --sb-top: clamp(24px, 4vw, 56px);     
  --sb-w: 90%;                          /* 펼친 검색창 너비 (자동완성 목록도 같은 값으로 정렬) */
  --sb-h: clamp(40px, 3.4vw, 52px);
  --sb-font: clamp(14px, 1.15vw, 16px);
  position: absolute;
  top: var(--sb-top);
  right: var(--sb-gap);
  /* 좌상단 줌 컨트롤(약 60px)을 침범하지 않도록 상한을 둔다 */
  width: min(clamp(280px, 26vw, 360px), calc(100vw - 60px - var(--sb-gap)));
  z-index: 1000; /* map(z-index:0) 위 */
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--sb-h);
  padding: 4px;
  width: var(--sb-w);
  margin-left: auto; /* 항상 오른쪽 끝에 고정: 펼칠 때 왼쪽으로만 확대 */
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: width 0.25s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.search-bar:focus-within {
  border-color: var(--sb-accent);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(255, 213, 48, 0.45);
}

.search-btn {
  order: -1;
  flex: none;
  display: grid;
  place-items: center;
  width: calc(var(--sb-h) - 8px);
  height: calc(var(--sb-h) - 8px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sb-accent);
  color: var(--sb-ink);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.search-btn:hover { background: var(--sb-accent-hover); }
.search-btn:active { transform: scale(0.94); }
.search-btn:focus-visible { outline: 2px solid var(--sb-ink); outline-offset: 2px; }
.search-btn svg { width: 50%; height: 50%; display: block; }
.search-btn span { /* 스크린리더 전용 */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 12px 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sb-ink);
  font-size: var(--sb-font);
  letter-spacing: 0.01em;
  text-overflow: ellipsis; /* 좁아져도 플레이스홀더가 어색하게 잘리지 않게 */
  -webkit-appearance: none;
  appearance: none;
}
.search-bar input::placeholder { color: var(--sb-muted); }
.search-bar input::-webkit-search-decoration { -webkit-appearance: none; }
.search-bar input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-right: 4px;
  cursor: pointer;
  opacity: 0.55;
  background: no-repeat center / 100% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314171c' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}
.search-bar input::-webkit-search-cancel-button:hover { opacity: 1; }

/* Ctrl: required 가 켜져 있으면 비어 있고 포커스 없을 때 아이콘만 남기고 접는다 */
.search-bar:has(input:invalid:not(:focus)) {
  width: var(--sb-h);
}
.search-bar:has(input:invalid:not(:focus)) input { visibility: hidden; }

/* ───────── Autocomplete ───────── */
.autocomplete-items {
  position: absolute;
  top: calc(100% + 8px);
  left: calc(100% - var(--sb-w));
  right: 0;
  z-index: 99;
  max-height: min(260px, 40vh);
  overflow-y: auto;
  padding: 6px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}
.autocomplete-items div {
  padding: 9px 12px;
  border-radius: 10px;
  color: #3a404a;
  font-size: calc(var(--sb-font) - 1px);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.autocomplete-items div strong { color: var(--sb-ink); font-weight: 700; }
.autocomplete-items div:hover { background: rgba(20, 23, 28, 0.07); }
.autocomplete-items .autocomplete-active,
.autocomplete-items .autocomplete-active:hover {
  background: var(--sb-accent);
  color: var(--sb-ink);
}

@media screen and (prefers-color-scheme: dark) {
    body {
        color: #f1f1f1;
        background: #171717;
    }
}