body { font-family: sans-serif; }
#map { height: 90vh; width: 100%; background: #222; }

/* Zones(이동 영역)
   NOTE: zonesPane z-index를 overlayPane 위로 조정하여 “잠깐 보였다가 사라짐” 문제를 해결했으므로
   여기서 display/opacity를 !important로 강제하지 않는다. */
.popup-content { max-height: 400px; overflow-y: auto; }
#top-right-ui { position: absolute; top: 20px; right: 20px; z-index: 1001; display: flex; gap: 8px; }
.ui-btn { background: rgba(255,255,255,0.9); border: 2px solid #555; border-radius: 8px; padding: 10px 15px; font-weight: bold; cursor: pointer; transition: all 0.2s; height: 40px; box-sizing: border-box; display: flex; align-items: center; }
.ui-btn:hover { background: #eee; transform: scale(1.05); }
#backBtn { display: none; }
#reportBtn { display: block; }
.report-container { position: relative; }
.report-menu { display: none; position: absolute; top: 100%; right: 0; margin-top: 8px; background: white; border-radius: 5px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); list-style: none; padding: 5px 0; z-index: 1002; width: 160px; }
.report-menu div { padding: 10px 15px; cursor: pointer; }
.report-menu div:hover { background: #f5f5f5; }

/* Filter UI (current markup uses #filter-ui-container / #filter-panel / #filter-toggle-btn) */
#filter-ui-container {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000; /* ensure above leaflet panes */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

#filter-panel {
    display: none;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#filter-panel.active {
    display: block;
}

#filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(80px, 1fr));
    gap: 8px;
}

#filter-toggle-btn {
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    color: #f0f0f0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#filter-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #f0f0f0;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background: #ffc800;
    color: #1a1a1a;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(255, 200, 0, 0.5);
}

/* Emoji marker icons (Leaflet DivIcon) */
.emoji-marker {
    background: transparent;
    border: none;
}

.emoji-marker__inner {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(20, 20, 24, 0.85);
    /* 가시성용 단색 테두리 */
    border: 2px solid #0b0b0e;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    font-size: 16px;
    line-height: 1;
    transform: translateZ(0);
    user-select: none;
}

/* subtle tints per type (optional) */
.emoji-marker--npc .emoji-marker__inner { background: rgba(40, 120, 255, 0.20); }
.emoji-marker--monster .emoji-marker__inner { background: rgba(255, 70, 70, 0.20); }
.emoji-marker--event .emoji-marker__inner { background: rgba(200, 120, 255, 0.22); }
.emoji-marker--object .emoji-marker__inner { background: rgba(255, 200, 0, 0.22); }
.emoji-marker--other .emoji-marker__inner { background: rgba(255, 255, 255, 0.14); }

/* active marker highlight */
.emoji-marker--active .emoji-marker__inner {
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.95),
        0 0 0 6px rgba(255, 200, 0, 0.85),
        0 10px 18px rgba(0, 0, 0, 0.45);
    transform: scale(1.12);
}

/* Search UI visibility */
#map-search-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}

#map-search-input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

#map-search-input:focus {
    outline: none;
    border-color: rgba(255, 200, 0, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 200, 0, 0.25);
}
