.legend-container {
    position: absolute;
    z-index: 25;
    filter: drop-shadow(0px 10px 20px rgba(0, 0, 0, 0.6));
    animation: floating 3.5s ease-in-out infinite;
}

/* DIUBAH: dari position:absolute (bottom:3%; left:2%) jadi position:static
   -> id lebih spesifik dari class .legend-container di atas, jadi ini
   OVERRIDE position-nya. Sekarang posisi ditentukan oleh wrapper
   "#left-bottom-stack" di peta_wisata.css, letaknya di BAWAH Kalender Event. */
#sidebar-legend {
    position: static;
    width: 200px;
    max-width: 25vw;
}

.legend-board {
    background-color: #f6ebd8;
    border: 3px solid #d4a373;
    border-radius: 14px;
    padding: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.legend-header {
    background: linear-gradient(180deg, #558b2f 0%, #33691e 100%);
    color: white;
    text-align: center;
    border-radius: 20px;
    padding: 5px 10px;
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.3);
    border: 1px solid #1b5e20;
    cursor: pointer;
    transition: all 0.2s ease;
}

.legend-header:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5), 0 4px 6px rgba(0,0,0,0.2);
}

.legend-header.small-header {
    font-size: 11px;
    padding: 3px 10px;
    margin-top: 12px;
    margin-bottom: 8px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    cursor: default;
}
.legend-header.small-header:hover {
    filter: none;
    transform: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.3);
}

.legend-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legend-item {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.legend-item:hover, .legend-item.active {
    background-color: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.l-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.l-icon svg {
    width: 14px;
    height: 14px;
}

.l-text {
    font-weight: 800;
    color: #4e342e;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.ket-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 8px 4px 8px;
}

.ket-item {
    display: flex;
    align-items: center;
}

.ket-line-box {
    width: 20px;
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.ket-line {
    width: 100%;
}

.ket-text {
    font-weight: 800;
    color: #4e342e;
    font-size: 10px;
}