body, html { margin: 0; padding: 0; height: 100%; font-family: 'Malgun Gothic', sans-serif; overflow: hidden; touch-action: none; }
.container { display: flex; height: 100vh; width: 100vw; position: relative; }
#map { width: 100%; height: 100%; background-color: #e5e3df; }

/* 정보 패널 기본 설정 */
#info-panel {
    position: absolute; top: 0; right: 0; width: 380px; height: 100%;
    background-color: white; box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    box-sizing: border-box; z-index: 9999;
    /* 부드러운 스냅 애니메이션 */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); 
    display: flex; flex-direction: column;
}
#info-panel.hidden { transform: translateX(100%); }

#drag-handle-visual { 
    width: 45px; height: 6px; background-color: #ddd; 
    border-radius: 3px; margin: 15px auto 5px auto; flex-shrink: 0;
}

#panel-content { flex: 1; overflow-y: auto; padding: 10px 20px 30px 20px; box-sizing: border-box; }

h2 { margin-top: 10px; color: #2c3e50; font-size: 1.5rem; }
p { line-height: 1.6; color: #34495e; font-size: 0.95rem; margin-bottom: 15px; }
strong { color: #16a085; display: block; margin-bottom: 5px; font-weight: bold; }
.desc-title { color: #16a085; display: block; margin-bottom: 5px; font-size: 0.95rem; }

/* 사진 로딩 영역 (배경색 추가하여 부드럽게) */
#town-image { width: 100%; height: 220px; object-fit: cover; border-radius: 12px; margin-bottom: 15px; display: none; background-color: #f9f9f9; }

#find-me-btn {
    position: absolute; bottom: 30px; left: 30px; z-index: 1000;
    padding: 12px 18px; background-color: white; border: 1px solid #ccc; border-radius: 30px; font-size: 1rem; font-weight: bold; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: all 0.2s;
}

#filter-container {
    position: absolute; top: 20px; left: 60px; z-index: 1000;
    background-color: white; border: 1px solid #ddd; border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); padding: 8px 15px;
    display: flex; gap: 12px; font-size: 0.95rem; font-weight: bold; color: #2c3e50;
}
#filter-container label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
#filter-container input[type="checkbox"] { cursor: pointer; width: 16px; height: 16px; accent-color: #16a085; }

/* 기본 이모지 마커 */
.emoji-marker {
    background: none; border: none; font-size: 32px;
    text-align: center; line-height: 32px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); 
    transition: all 0.2s ease-in-out; 
}

/* 지도가 축소되었을 때 동그라미로 변신 및 텍스트 정렬 */
.map-zoomed-out .emoji-marker {
    font-size: 0 !important; 
    text-shadow: none !important;
    background-color: rgba(110, 204, 57, 0.9) !important; 
    border: 2px solid white !important; 
    border-radius: 50% !important; 
    width: 30px !important; 
    height: 30px !important;
    margin-left: -15px !important; 
    margin-top: -15px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    display: flex !important; 
    align-items: center !important;
    justify-content: center !important;
}
.map-zoomed-out .emoji-marker::after {
    content: "1"; font-size: 14px !important; color: white !important; font-weight: bold !important;
}

/* 👇 사용자 피드백 반영(2번): 이모지 자리에 완벽하게 대체되는 빨간색 입체 강조 핀 디자인 */
.active-marker {
    font-size: 0 !important; /* 기존 이모지는 숨김 */
    text-shadow: none !important;
    /* 첨부 이미지의 입체감을 살린 Crimson Red 핀 */
    background: radial-gradient(circle at 35% 35%, rgba(220, 20, 60, 0.9), rgba(150, 0, 0, 1)) !important;
    border: 3px solid white !important; /* 하얀 테두리 */
    border-radius: 50% 50% 50% 0 !important; /* 물방울 모양 깎기 */
    transform: rotate(-45deg) !important; /* 핀 꼬리를 아래로 */
    width: 42px !important; /* 크기 확대 */
    height: 42px !important;
    margin-left: -21px !important; /* 중심점 중앙 정렬 다시 맞춤 */
    margin-top: -38px !important; /* 뾰족한 끝이 좌표를 정확히 찌르도록 Y축 조정 */
    box-shadow: 0 6px 12px rgba(0,0,0,0.4) !important; /* 그림자 추가로 입체감 극대화 */
}
/* 강조 핀도 축소되면 동그라미로 통일 (짙은 빨간색으로 변신) */
.map-zoomed-out .active-marker {
    background: none !important;
    background-color: rgba(180, 0, 0, 1) !important;
    border-radius: 50% !important; 
    transform: rotate(0deg) !important; 
    width: 30px !important; 
    height: 30px !important;
    margin-left: -15px !important; 
    margin-top: -15px !important;
}
.map-zoomed-out .active-marker::after {
    display: none !important;
}

@media (max-width: 768px) {
    #info-panel { 
        top: 10vh; height: 90vh; right: 0; left: 0; width: 100%; border-radius: 20px 20px 0 0; 
        transform: translateY(100%); cursor: grab;
    }
    #info-panel.hidden { transform: translateY(100%) !important; }
    /* 미니 패널 상태 (구글 맵처럼 걸려있게 함, 130px 노출) */
    #info-panel.mini {
        transform: translateY(calc(90vh - 130px)) !important;
    }
}